From: Raphael N. <ne...@te...> - 2005-05-04 10:49:32
|
Hi again, > #pragma stack 0x00 64 > > $ sdcc -mpic16 -p18f452 -llibc18f.lib test.c > Processor: 18f452 > message: using default linker script > "/home/daryl/local/share/gputils/lkr/18f452.lkr" > error: multiple sections using address 0 > > I must be missing something obvious here. Indeed: you placed the stack at adresses 0 .. 63 (into the access bank). The area 0..~30 is used by the compiler for local variables. I propose to relocate the stack to something like #pragma 0x300 0xff effectively reserving the fourth bank for stack (0x300..0x3FF), just because 4 is a good number (and all pics have at least 4 banks of mem). > I've also tried using printf_tiny() and defining my own putchar() as > described in the docs. No luck. > > When I try to do it with -p18f1220 I get a different error: > > error: missing definition for symbol "_SSPBUF" > > The SSPBUF issue appears to stem from the fact that there is no ssp on > the 18f1220 but the library code assumes there is. Also, building lib-io > is broken for the 18f1220 because of no i2c support. Regarding _SSPBUF: no idea (yet) - sorry :-(, can you safely ignore the failing sources (renaming them to *.c__ or something)? I have changed libio/Makefile to support exclusion of subdirectories for certain pics by creating files "${dir}.ignore" and putting their id (e.g. "1220") ni there. Having a file i2c.ignore with "1220" in it will no longer build the i2c library for the p18f1220. This enables the libraries to build (though incompletely)... The attached files belong into device/lib/pic16/libio - maybe they help a bit... Regards, Raphael |