Page 1 of 1

RAM to FLASH migration

Posted: Sat May 28, 2022 10:08 am
by ivand58
Hi
Is it possible to flash an image from elf file and to instruct the boot loader to mimic "load_ram" command ?

I have a code that works with direct loading in RAM :

Code: Select all

esptool.py load_ram [/Codebox]
and I'd like to flash it in a partition so that the second stage boot loader will load it in the RAM and start it.

Re: RAM to FLASH migration

Posted: Sun May 29, 2022 1:32 am
by ESP_Sprite
You should be able to take your elf file and feed it to `esptool.py elf2image` to generate a flashable image.

Re: RAM to FLASH migration

Posted: Sun May 29, 2022 6:27 am
by ivand58
Thank you @ESP_Sprite,

I have the image for the RAM, is it the same for the flash?

The remaining part of the question is how to incorporate this image with the bootlader?

Also would you please tell me how to write it at a specific partition if it is not joined with the bootloader (i.e. how to find the correct place for writing)?

Re: RAM to FLASH migration

Posted: Mon May 30, 2022 3:10 am
by ESP_Sprite
I think you should be able to flash it either as the bootloader, or as an app (in place of the app ESP-IDF produces). Either way, the code doesn't need to be appended or anything: simply flash it to the correct partition/location and it should work.