LDFLAG with unresolved symbol not working

opcode_x64
Posts: 47
Joined: Sun Jan 13, 2019 5:39 pm

LDFLAG with unresolved symbol not working

Postby opcode_x64 » Tue Jan 15, 2019 7:37 pm

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

ESP_Sprite
Posts: 9040
Joined: Thu Nov 26, 2015 4:08 am

Re: LDFLAG with unresolved symbol not working

Postby ESP_Sprite » Wed Jan 16, 2019 8:27 am

You can use 'objdump -S build/projectname.elf' and see if the function is in the assembly output.

opcode_x64
Posts: 47
Joined: Sun Jan 13, 2019 5:39 pm

Re: LDFLAG with unresolved symbol not working

Postby opcode_x64 » Sun Jan 20, 2019 10:45 pm

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

Who is online

Users browsing this forum: No registered users and 124 guests