On Wed, Jul 9, 2014 at 9:52 AM, JuanPi <juanpi@dwengo.org> wrote:
In the makefile that I sent you you could see that I was renaming the
.o into .rel.
Works fine like that.


Here is my millage.
I tried renaming the .o's to .rel's and then with the pic flag still enabled sdcc complains it doesn't know what a rel file is.

====
user@enj:~/sdcc/proj/uipTest$ for i in $( ls *.o ); do cp $i $i.rel; done
user@enj:~/sdcc/proj/uipTest$ sdcc --std-c99 -mpic16 --use-non-free -p18f97j60 uipTest.o.rel `ls *.rel | grep -v uipTest.o.rel`
at 1: warning 119: don't know what to do with file 'uipTest.o.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'ETH97J60.o.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'Helpers.o.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'tapdev.o.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'Tick.o.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'Tick.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'uip_arp.o.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'uip.o.rel'. file extension unsupported
at 1: warning 119: don't know what to do with file 'uipTest.rel'. file extension unsupported
====

If I try it without the target platform it says it ran out of  header area.

====
user@enj:~/sdcc/proj/uipTest$ sdcc uipTest.o.rel `ls *.rel | grep -v uipTest.o.rel`
Header area list overflow
====

I am assuming that is because it doesn't have the correct structure to stuff it all in.

I get farther by calling the linker manually.

====
user@enj:~/sdcc/proj/uipTest$ gplink -I/usr/local/share/sdcc/lib/pic16 -I/usr/local/share/sdcc/non-free/lib/pic16 -w -r -o uipTest uipTest.o `ls *.o | grep -v uipTest.o`  crt0i.o libdev18f97j60.lib libsdcc.lib
message: Using default linker script "/usr/local/share/gputils/lkr/18f97j60_g.lkr".
error: Missing definition for symbol "_strlen", required by "Helpers.o".
error: Missing definition for symbol "_uip_ipchksum", required by "uip.o".
error: Missing definition for symbol "_uip_tcpchksum", required by "uip.o".
error: Missing definition for symbol "_ReadPHYReg", required by "ETH97J60.o".
error: Missing definition for symbol "_memcpy", required by "ETH97J60.o".
error: Missing definition for symbol "_uip_add32", required by "uip.o".
error: Missing definition for symbol "_strncpy", required by "Helpers.o".
error: Missing definition for symbol "_memset", required by "uip_arp.o".
====

Currently addressing the first missing symbol.

strlen is used from the string.h header file which I am assuming is 
/home/user/sdcc/sdcc/device/include/pic16/string.h

Anyone know what I am missing in the call to gplink so that it can find the library for string.h?
~Joshua