Page 1 of 1

LDFLAG with unresolved symbol not working

Posted: Tue Jan 15, 2019 7:37 pm
by opcode_x64
Hello everybody,

like explained on this site https://docs.espressif.com/projects/esp ... rupts.html I have added the symbol name of my assembly file to the COMPONENT_ADD_LDFLAGS line, but the linker is ignoring it. I am using the component.mk file located in .platformio/packages/framework-espidf/components/esp32/

Is there anyway to output the assembly file of my hole program to verify if my assembly file is linked while building ?

thank you

Re: LDFLAG with unresolved symbol not working

Posted: Wed Jan 16, 2019 8:27 am
by ESP_Sprite
You can use 'objdump -S build/projectname.elf' and see if the function is in the assembly output.

Re: LDFLAG with unresolved symbol not working

Posted: Sun Jan 20, 2019 10:45 pm
by opcode_x64
Hello ESP_Sprite !

Thank you for the hint ! I am using the following command to do it:

Code: Select all

./xtensa-esp32-elf-objdump -d -S /..../...../...../PlatformIO/Projects/<ProjectName>/.pioenvs/esp32dev/firmware.elf >> firmware.S
which outputs the assembly output directly into a new file called firmware.S.

To make it a bit more comfortable, I wrote a small shell script which I can execute directly in my IDE (ATOM with PlatformIO):

Code: Select all

#!/bin/bash
rm -r firmware.S	#delete the old file...
./xtensa-esp32-elf-objdump -d -S /..../...../...../PlatformIO/Projects/<ProjectName>/.pioenvs/esp32dev/firmware.elf >> firmware.S
atom firmware.S 	#open it directly in the currently opened "atom" session.
Thank you !

Best regards,
opcode_x64