Bug #18044 2011-04-01 20:14

freedomlives

SDCC 3.0.0 won't link

When trying to build with SDCC I get this error:

sdcc -mpic16 -p18f2321 -I/usr/share/sdcc/non-free/include/pic16 -I/usr/share/sdcc/include/pic16 -I/home/andrew/projects/programming/Incubator/ -c Incubator.c -o obj/Release/Incubator.rel

INFO: changing configuration word at 0x300006 from 0xfb to 0xbb due to pic16devices.txt

sdcc -L/usr/share/sdcc/lib/pic16 -L/usr/share/sdcc/non-free/lib/pic16 -o bin/Release/Incubator -mpic16 -p18f2321 obj/Release/Incubator.rel

at 1: warning 119: don't know what to do with file 'obj/Release/Incubator.rel'. file extension unsupported

SDCC : pic16/pic14 3.0.0 #6037 (Nov 7 2010) (Linux)

I can compile in a terminal by removing the '-c' and '-o' options and adding the '-L' options, so I believe the problem must be that sdcc won't function as a linker, which mode the second command implies.

I could be totally wrong on my analysis of this however, since this is the first time I've tried using SDCC, following the guide on the wiki.

Category
Compiler
Group
 
Status
Open
Close date
 
Assigned to
 
ID_32699 2011-04-04 07:57

SDCC < 3 used .rel as object file extension.

For SDCC >=3, this was changed to ".o", you have to change this in the advanced compiler options.

Don't forget the --use-non-free SDCC option for PIC compilation.

Regards

freedomlives 2011-04-04 11:57

Great! That works.

In case anyone else has trouble finding it, the advanced compiler options are at: Settings -> Compiler and Debugger -> Other Options -> Advanced Options -> Others -> Object file extension