ESP8266 Developer Zone The Official ESP8266 Forum 2016-10-02T12:22:11+08:00 https://bbs.espressif.com:443/feed.php?f=65&t=2829 2016-10-02T12:22:11+08:00 2016-10-02T12:22:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2829&p=10032#p10032 <![CDATA[Re: Esp8266 doesn't boot depending on linkage ordering]]>
Here is a related post that contains a lot of useful information:
http://stackoverflow.com/questions/4513 ... ors-in-gcc

Statistics: Posted by Guest — Sun Oct 02, 2016 12:22 pm


]]>
2016-10-01T01:25:40+08:00 2016-10-01T01:25:40+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2829&p=10014#p10014 <![CDATA[Re: Esp8266 doesn't boot depending on linkage ordering]]>

Code:

xtensa-lx106-elf-gcc -L"C:\ESP8266\esp8266-bsp\RTOS-SDK\lib" -L"C:\ESP8266\HAL" -nostdlib -u call_user_start -Wl,-static -TC:/ESP8266/esp8266-bsp/RTOS-SDK/ld/eagle.app.v6_4M.ld -Wl,--gc-sections -o "RGBDisplay" -Wl,--start-group -lminic -lmirom -lcirom -lm -lgcc -lhal -lphy -lpp -lnet80211 -lwpa -lcrypto -lmain -lfreertos -llwip -lssc -lspiffs  ./main.o -Wl,--end-group


Thanks for your response.

But I will still like to know what the difference is between that and the command below as far as esp8266 is concerned

Code:

xtensa-lx106-elf-gcc -L"C:\ESP8266\esp8266-bsp\RTOS-SDK\lib" -L"C:\ESP8266\HAL" -nostdlib -u call_user_start -Wl,-static -TC:/ESP8266/esp8266-bsp/RTOS-SDK/ld/eagle.app.v6_4M.ld -Wl,--gc-sections -o "RGBDisplay" -Wl,--start-group ./main.o -lminic -lmirom -lcirom -lm -lgcc -lhal -lphy -lpp -lnet80211 -lwpa -lcrypto -lmain -lfreertos -llwip -lssc -lspiffs  -Wl,--end-group

Statistics: Posted by sake402 — Sat Oct 01, 2016 1:25 am


]]>
2016-09-30T18:45:12+08:00 2016-09-30T18:45:12+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2829&p=10009#p10009 <![CDATA[Re: Esp8266 doesn't boot depending on linkage ordering]]> You can try to copy all from the makefile provided in Espressif SDK download.

Statistics: Posted by Guest — Fri Sep 30, 2016 6:45 pm


]]>
2016-09-30T07:39:38+08:00 2016-09-30T07:39:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2829&p=9996#p9996 <![CDATA[Esp8266 doesn't boot depending on linkage ordering]]> 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:

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:

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

Statistics: Posted by sake402 — Fri Sep 30, 2016 7:39 am


]]>