Programmatically upload flash

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Programmatically upload flash

Postby snahmad75 » Fri May 04, 2018 3:28 pm

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Programmatically upload flash

Postby kolban » Fri May 04, 2018 4:48 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: Programmatically upload flash

Postby snahmad75 » Sat May 05, 2018 9:22 am

Hi Kolban,

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

Thanks,
Naeem

Who is online

Users browsing this forum: tahseenabbas52 and 62 guests