Porting esptool.py to C

thereza
Posts: 5
Joined: Tue Dec 01, 2015 3:11 am

Porting esptool.py to C

Postby thereza » Fri Jul 20, 2018 9:42 pm

We have an embedded device connected to the ESP32. We would like to be able to remotely reflash the ESP using our other microcontroller.

1) Does anyone have any idea of the required complexity in porting the protocol to C?
2) Is there any interest from the community in doing said porting if we paid a bounty for the development work?

Thanks

Ritesh
Posts: 1167
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Porting esptool.py to C

Postby Ritesh » Sat Jul 21, 2018 9:39 am

Hi,

Would you please provide your requirements in clear as well as in details for porting esptool.py into C? Means what is your exact requirement and purpose for that?

So that anyone can help you as per your requirement for that
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Porting esptool.py to C

Postby loboris » Sat Jul 21, 2018 3:10 pm

I'm working on a C version of esptool.py. My plan is to use the custom ESP32 board (WROVER based, SDCard, TFT touch display, power management,...) as a programmer for other ESP32 boards.
With minor modification (UART communication), it should also be possible to compile it for different microcontrollers.

The project is of low priority for now, I expect to finish it in 2-3 months.
When finished, the sources will be available on GitHub, probably also the board schematics and gerber files.

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

Re: Porting esptool.py to C

Postby kolban » Sun Jul 22, 2018 4:44 am

I had a need for a port of the serial protocol to Javascript ... a sample is available here:

https://github.com/nkolban/esp32-snippe ... ptool_libs

The protocol is documented here:

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

Some folks had contacted me in an effort to produce a C library to achieve the task. Now that we know the protocols, it wouldn't have been hard but it isn't on my "list of things to just do" so I asked for compensation for my time and that was the end of the story.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

thereza
Posts: 5
Joined: Tue Dec 01, 2015 3:11 am

Re: Porting esptool.py to C

Postby thereza » Mon Jul 23, 2018 5:05 am

Kolban,

Happy to compensate for your time. Our only requirement is to be able to take a binary file and be able to reflash an ESP32 over serial, with the code capable of being run on an STM32L4 (straightforward uart write functions, and we use a DMA to read from the UART to a ringbuffer but that can be changed). Can you provide a timeline and cost as a private message?

Thanks,
Reza

JeppeB
Posts: 2
Joined: Tue Jan 29, 2019 9:37 pm

Re: Porting esptool.py to C

Postby JeppeB » Tue Jan 29, 2019 9:43 pm

Hi

I am having the exact same need for a C version of the flashing tool. I need to flash the ESP32 from a MCU (LPC4076) through the UART.
@Kolban: did you end up porting it ? if Yes is it available as open source :).

Regards

ESP_Angus
Posts: 2193
Joined: Sun May 08, 2016 4:11 am

Re: Porting esptool.py to C

Postby ESP_Angus » Thu Jan 30, 2020 6:08 am

Sorry to drag up an old thread.

There is a now an official open source library for flashing ESP32s from other MCUs: https://github.com/espressif/esp-serial-flasher

Deouss
Posts: 408
Joined: Tue Mar 20, 2018 11:36 am

Re: Porting esptool.py to C

Postby Deouss » Thu Jan 30, 2020 4:02 pm

I tried once porting it to C# which would be much smoother but got stuck on SLIP protocol and stopped project.

Who is online

Users browsing this forum: Baidu [Spider], JosuGZ, murbancic and 50 guests