espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.46k stars 7.25k forks source link

Hot Reloading (IDFGH-11517) #12642

Open mmackh opened 10 months ago

mmackh commented 10 months ago

Is your feature request related to a problem?

Changing a single line, compiling and flashing a larger project can take up to 30s with each iteration and adds up over a day. Other programming environments like Android Studio offer hot reloading, increasing productivity by a lot.

Describe the solution you'd like.

Please introduce a idf.py command that allows for hot reloading - based on the changes in the binary, write only the relevant flash locations and reboot the system.

There is already a working prototype located here by cnlohr: https://github.com/cnlohr/esp32s2-cookbook/tree/master/idf_sandbox

A demo video has been posted on twitter as well: https://x.com/cnlohr/status/1546445702636584960?s=12

This would be game changing if it was directly built into esp-idf and supported all different chips.

Describe alternatives you've considered.

No response

Additional context.

No response

igrr commented 10 months ago

Thanks for opening this feature request! That's a cool idea, and something that we have also been discussing internally.

The initial version of this solution based on esp-elfloader will appear in arduino-esp32 project hopefully within the next few weeks/months. Based on experience and users' feedback, we will consider bringing it into ESP-IDF as well.

chipweinberger commented 10 months ago

wow that video by cnlohr is amazing

I had no idea GCC supported linking like that.

this would have saved me months of time.

mmackh commented 8 months ago

Has there been progress in this area?

ammaree commented 7 months ago

+99 for ESP-IDF v5.x please

On 23/11/21, 23:37, "Ivan Grokhotkov" @.**@.>> wrote:

Thanks for opening this feature request! That's a cool idea, and something that we have also been discussing internally.

The initial version of this solution based on esp-elfloaderhttps://components.espressif.com/components/espressif/elf_loader will appear in arduino-esp32https://github.com/espressif/arduino-esp32 project hopefully within the next few weeks/months. Based on experience and users' feedback, we will consider bringing it into ESP-IDF as well.

— Reply to this email directly, view it on GitHubhttps://github.com/espressif/esp-idf/issues/12642#issuecomment-1821729988, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYT7GB2XPEIMBG7Y54ACATYFUNKDAVCNFSM6AAAAAA7VDSYY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRRG4ZDSOJYHA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

chipweinberger commented 7 months ago

This is the single most important feature ESP-IDF could add. It should have an engineer assigned to it.

and3rson commented 6 months ago

This would be awesome. Furthermore, it would be great to be able to use elf-loader from arduino-esp32 environment.

Hello1024 commented 6 months ago

One way to achieve this:

chipweinberger commented 6 months ago

@cnlohr maybe youd like to be in this thread too

cnlohr commented 6 months ago

I appreciate the ping (I had no idea this thread existed), but don't know if I have anything to offer? It's how I do most of my ESP32-S2 development recently. But, it doesn't "fit" into the IDF mentality very well, so I never even considered trying to upstream anything.

mmackh commented 1 month ago

Has there been any progress on this front?

Timmwardion commented 4 weeks ago

+1