Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic esptool: error: too few arguments (Read 1389 times)
NF1Z
Junior Member
**
Offline


Posts: 49
Joined: Aug 18th, 2013
esptool: error: too few arguments
Nov 3rd, 2021 at 4:30am
Print Post  
Hi,
Been a while since I posted, due to other activities.  I do however, think I had this problem before, just can't remember or locate the answer, if so.

I get this when trying to upload to an ESP32 board:

Uploading 'BlinkWithoutDelay' to 'DOIT ESP32 DEVKIT V1' using 'COM2Uploader started for board DOIT ESP32 DEVKIT V1
Upload method will be: bootloader
Uploading via Bootloader 
ol.exe --chip esp32 --port "COM2
<deleted>
esptool: error: too few arguments

Interestingly, I get the same error with some other ESP32 boards, but I don't get it when using the Arduino IDE on the same PC, or when using Visual Micro/VS on my laptop.

I am using VM 1.2021.0917 and VS 16.11.5 and the latest Arduino, and have tried reinstalling Arduino and VM.

The problem looks pretty obvious:  the com port value inserted in the esptool command is being corrupted, but I cannot find a cause.  The recipe for upload looks OK to me:

tools.esptool_py.upload.pattern="{path}/{cmd}" --chip esp32 --port "{serial.port}" --baud {upload.speed}  --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size detect 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x1000 }.bin" 0x10000 "{build.path}/{build.project_name}.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin"
 
I also notice that Arduino IDE (and my laptop's VM) has the following additional boards manager URL (for esp32):

https://dl.espressif.com/dl/package_esp32_index.json

This is what is in C:\Users\jed\AppData\Local\arduino15.  But VM has:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32...

I have tried to copy the Arduino value into the VM IDE Locations page, but it gets overwritten (auto-discovery?).  Not sure if this is the problem or not, but it's the major difference I see between Arduino and my laptop and the VM on my PC.

Any ideas or fixes?

Thanks,
Jed


  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: esptool: error: too few arguments
Reply #1 - Nov 3rd, 2021 at 9:31am
Print Post  
Thanks for the report.

Can you send us the VCXPROJ file from this project for inspection?
  
Back to top
 
IP Logged
 
NF1Z
Junior Member
**
Offline


Posts: 49
Joined: Aug 18th, 2013
Re: esptool: error: too few arguments
Reply #2 - Nov 3rd, 2021 at 6:51pm
Print Post  
Simon,
Thanks for the response.  I can email you the vcxproj file, but I think I managed to fix it.  I had discounted my PC's setup because Arduino was working OK, but I chanced upon your website comment to use CP210x version 6 drivers, not version 10.  I checked and I had installed version 10.  After replacing, all worked fine.  For anyone who might need a hint, the drivers are in"CP210x_VCP_Windows.zip".  The non-VCP drivers might also work, not tested by me.

I still find it odd that VM fails but Arduino doesn't; as the same driver is used, I expected no change.  Also odd is that my laptop is using the version 10 drivers with no trouble.  With the version 10 drivers on my PC, I noticed that in the Options page, Last Port has a value filled with Asian characters underneath the COM port name; I'm speculating that the driver returns a corrupted port name when queried, which messes up the esptool command line; Arduino and my laptop manage to not get upset by it, somehow.

Anyhow, thanks for the support, and apologies for wasting your time.  But maybe this will help someone else.

Regards,
Jed
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: esptool: error: too few arguments
Reply #3 - Nov 4th, 2021 at 10:11am
Print Post  
Thanks for the detailed update, and we were thinking there may be some unexpected characters in the COM port but weren't sure from where.

Glad its all working again and thanks for clarifying the solution.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint