Page 1 of 1

Programmatically upload flash

Posted: Fri May 04, 2018 3:28 pm
by snahmad75
Hi,
We know we can upload .bin file via make flash. and another command to use to upload encrypted binary image to esp32 device.
I wonder how we can programmatically upload flash using C/C++ first time via serial or anyway.

I am not talking about OTA process.

Thanks,
Naeem

Re: Programmatically upload flash

Posted: Fri May 04, 2018 4:48 pm
by kolban
Howdy Naeem,
It can be done but is quite tricky. First the sender must form a serial connection to the ESP32 and place it in flash mode. With that done, the sender can then use the serial protocol commands described in detail here:

https://github.com/espressif/esptool/wi ... l-Protocol

This is the protocol that esptool uses.

I'm working on a project where I need to be able to transmit these commands from a Node.js application and there is a follow on project where I may need to send data from C/C++. I have the Node.js app working satisfactorily and have convinced myself that the protocol spec is comprehensible. Un-known whether these components can be open sourced yet as they are work for hire.

Re: Programmatically upload flash

Posted: Sat May 05, 2018 9:22 am
by snahmad75
Hi Kolban,

Thanks for your reply. understood. Let me know when you finish c++ project to upload flash.

Thanks,
Naeem