Page 1 of 1

Post-Compile Uploader

Posted: Fri Aug 18, 2017 1:28 am
by stevel95
Trying to use Arduino Builder to upload sample FreematicsONE+ datalogger sketch, but keep getting errors: Error code: 2 typically, sometimes failure to connect. Using default settings, COM5 USB port which seems to work fine for the Serial Monitor. Arduino Builder 1.0.2 output pasted below. Any suggestions? Thanks

_____________________________________

Linking all objects...

Generating flash binary (C:\New-Projects\Freematics\master\firmware_v5\datalogger\datalogger\datalogger.bin)...
text data bss dec hex filename
155462 36844 3632 195938 2fd62 C:\Users\Stephen\AppData\Local\Temp/ArduinoUploader/datalogger.elf

Compiliation successfully completed!

Starting upload for ESP32 via COM5...
Start uploading @512000bps
hardware/tools/python/python hardware/tools/esptool/esptool.py --chip esp32 --port COM5 --baud 512000 --before default_reset --after hard_reset write_flash -z --flash_freq 40m --flash_mode dio --flash_size 4MB 0x1000 hardware/tools/esp32/sdk/bin/bootloader.bin 0x8000 hardware/tools/esp32/partitions/default.bin 0xe000 hardware/tools/esp32/partitions/boot_app0.bin 0x10000 "C:\New-Projects\Freematics\master\firmware_v5\datalogger\datalogger\datalogger.bin"
esptool.py v2.0-beta3
Connecting...esptool.py v2.0-beta3
Connecting.....________......______....____.....______........_.....________.__..........__....________....._____

Then "Uploading not successful (Error code:2)

Re: Post-Compile Uploader

Posted: Tue Aug 22, 2017 10:46 pm
by stanley
Please retry with "Verify" option ticked. It is recommended not to use any USB hub for high baudrate uploading.

Re: Post-Compile Uploader

Posted: Tue Aug 22, 2017 11:35 pm
by Polkpolk
I have exactly the same problem. But when I switch speed to 57000Baud, it works 3 out of 5 times to connect and upload firmware.

Re: Post-Compile Uploader

Posted: Thu Aug 24, 2017 8:12 am
by stevel95
Turns out to be a problem with USB port, still unresolved. Checked drivers, reset PC, USB-serial, etc.. Tried on HP laptop and it worked.

Re: Post-Compile Uploader

Posted: Sat Aug 26, 2017 5:25 am
by stevel95
Thanks for the suggestions. Tried both - Verify flag and every baud rate available for upload multiple tries. No luck. Uninstalled and installed Silicon Labs drivers, too. If I find a solution, I'll post for everyone's benefit. In the meantime, I'll use my laptop.

Re: Post-Compile Uploader

Posted: Wed Aug 30, 2017 11:38 pm
by stanley
A couple of factors can cause uploading issue.

1. use of USB hub
2. USB cable quality issue
3. insufficient current output from USB port

If default/high baudrate fails uploading, using 115200bps for uploading is recommended.