Post-Compile Uploader

Inquiry and support for Freematics products
Post Reply
stevel95
Posts: 4
Joined: Thu Aug 03, 2017 11:42 pm

Post-Compile Uploader

Post 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)
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Post-Compile Uploader

Post by stanley »

Please retry with "Verify" option ticked. It is recommended not to use any USB hub for high baudrate uploading.
Polkpolk
Posts: 10
Joined: Thu May 18, 2017 11:01 pm

Re: Post-Compile Uploader

Post 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.
stevel95
Posts: 4
Joined: Thu Aug 03, 2017 11:42 pm

Re: Post-Compile Uploader

Post 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.
stevel95
Posts: 4
Joined: Thu Aug 03, 2017 11:42 pm

Re: Post-Compile Uploader

Post 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.
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Post-Compile Uploader

Post 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.
Post Reply