xtensa-esp32-elf-ld does not create symbols from binary file

sap1359
Posts: 3
Joined: Sun Apr 22, 2018 8:26 am

xtensa-esp32-elf-ld does not create symbols from binary file

Postby sap1359 » Sun Apr 22, 2018 8:59 am

Hi
I am working on ESP-WROOM-32 module. I want to embedding a whole binary file ( i.e. all sections + ...) as an array.

I know this can be achieved via ld command. I test this approach and it works fine for arm processor and PC (x86_64).
with this

Code: Select all

arm-linux-gnueabihf-ld -r -b binary pproc -o pproc.dat 
I have these symbols which can be accessed from source code.

Code: Select all

0000346c D _binary_pproc_end
0000346c A _binary_pproc_size
00000000 D _binary_pproc_start
but I can not create appropriate object file with xtensa-esp32-elf-ld. when I used this approach

Code: Select all

xtensa-esp32-elf-ld -r -b binary pproc -o pproc.dat --no-relax 
output file is the same as the input and no symbol is reported via xtensa-esp32-elf-nm. :?

How can I do it?

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: xtensa-esp32-elf-ld does not create symbols from binary file

Postby ESP_igrr » Sun Apr 22, 2018 9:34 am

You can use objcopy with the following arguments:
https://github.com/espressif/esp-idf/bl ... er.mk#L289

or ask the build system to do that for you:
https://docs.espressif.com/projects/esp ... inary-data

sap1359
Posts: 3
Joined: Sun Apr 22, 2018 8:26 am

Re: xtensa-esp32-elf-ld does not create symbols from binary file

Postby sap1359 » Sun Apr 22, 2018 12:09 pm

ESP_igrr wrote:You can use objcopy with the following arguments:
https://github.com/espressif/esp-idf/bl ... er.mk#L289

or ask the build system to do that for you:
https://docs.espressif.com/projects/esp ... inary-data
The second approach sound better. I using platformIO along with the Atom text editor. How can I feed the COMPONENT_EMBED_FILES into the PlatformIO (which itself is defined in a component.mk file)?

Thank again "ESP_igrr" in advance

Who is online

Users browsing this forum: No registered users and 131 guests