So I have an esp8266 application I am building using eclipse cross GCC using Rtos SDK.
Most compiler and linker flags were manually setup and I have successful compilation and linkage. But depending on the ordering of the library passed to the linker, the code runs on the target or not
I started linking with the command below
Code: Select all
xtensa-***-gcc -nostdlib -u call_user_start -WL,--gc-sections -L"<libPath> -T"<linker script.ld>" -Wl,--start-group -lcirom -l... ./main.o
Sorry I couldn't write my exact commands as I am away from the system and currently accessing this site from a mobile phone
But when I started referencing codes from the SDK library, I have errors 'undefined reference to xxx' as expected. So rearranged my libraries as
Code: Select all
xtensa-***-gcc -nostdlib -u call_user_start -WL,--gc-sections -L"<libPath> -T"<linker script.ld>" -Wl,--start-group ./main.o -lcirom -l...
Compilation and linkage successful but now the target will not execute. Even with exactly the same main.c code compiled with the first command, it still wouldn't.
I am doing something wrong. Right?
Thanks for your assistance