Page 1 of 1

esp32 linker script to build a app for direct execution from flash

Posted: Fri Feb 22, 2019 12:47 am
by benvinkorea
xtensa-esp32-elf toolchain has following linker scripts.

What is each for?
Could somebody help to find the correct file to use (to build) a application for direct execution from flash?

~/esp_toolchain/xtensa-esp32-elf/lib/ldscripts$ ls
elf32xtensa.x elf32xtensa.xd elf32xtensa.xn elf32xtensa.xsc elf32xtensa.xw
elf32xtensa.xbn elf32xtensa.xdc elf32xtensa.xr elf32xtensa.xsw
elf32xtensa.xc elf32xtensa.xdw elf32xtensa.xs elf32xtensa.xu

Re: esp32 linker script to build a app for direct execution from flash

Posted: Fri Feb 22, 2019 2:59 am
by ESP_Sprite
None are applicable, as we use our own linker script (that actually gets generated on the fly) in esp-idf, see esp-idf/components/esp32/ld. Also, if you compile something with esp-idf, it already is compiled in such a way that most of the program gets executed directly from flash; we place some routines in IRAM but only because they either need the speed or need to be usable when the flash is otherwise occupied as well.