Searching \ for 'Linker Problem' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/index.htm?key=linker+problem
Search entire site for: 'Linker Problem'.

Truncated match.
PICList Thread
'Linker Problem'
2009\05\31@175643 by Marcelo Rodrigues

picon face
Hi all,

I`m trying to compile a code for the PIC16F916 using the SDCC compiler, but
it has a strange problem when it calls the linker.

1) line command without specifying the linker file, it calls the default
linker:

C:\>sdcc -mpic16 --out-fmt-ihx test.c
message: using default linker script "C:\Program
Files\gputils\lkr\18f452.lkr"

It`s ok.

2) if I try to specify another linker file, it doesn`t accept and calls the
default:

C:\>sdcc -mpic16 -l 16f916.lkr --out-fmt-ihx test.c
error: "C:\Program Files\gputils\lkr\16f916.lkr" is not a valid coff object
or archive
message: using default linker script "C:\Program
Files\gputils\lkr\18f452.lkr"

I can`t realize where is the error, because the file 16f916.lkr exists in
the folder.

3) Now is the proble:, if i specify the default linker file, it shows the
error message and calls it anyway:

C:\>sdcc -mpic16 -l 18f452.lkr test.c
error: "C:\Program Files\gputils\lkr\18f452.lkr" is not a valid coff object
or archive
message: using default linker script "C:\Program
Files\gputils\lkr\18f452.lkr"

Do you have any idea on what`s happening here?

Thanks in advance.

--
Marcelo dos Santos Rodrigues

2009\05\31@190635 by M.L.

flavicon
face
You have to specify the processor, not the linker file:
sdcc -mpic14 -p16f916 ...

Also note that the 16F916 is a 14 bit core device, not 16 bit.
--
Martin K.



On Sun, May 31, 2009 at 5:56 PM, Marcelo Rodrigues <spam_OUTmsrmailTakeThisOuTspamgmail.com>wrote:

{Quote hidden}

> -

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...