When using SDCC to compile a project for the pic18f13k22, it comes up with the following error which is a problem with the linker script
C File: test.c
~~~~~~~~
char test;
void main(void) {
test=0;
}
~~~~~~~~~~
Compile: sdcc --use-non-free -mpic16 -p18f13k22 test.c
Output:
message: using default linker script "C:\Program Files\gputils\lkr\18f13k22_g.lkr"
warning: relocation of section "stack_section" failed, relocating to a shared memory location
error: linker script has no definition that matches the type of section "stack_section"
When compiling using the pic18f14k22 it works fine. The only difference between the two are the DATABANK lines in the linker scripts.
Adding the sdcc compile option --no-crt (do not link any default run-time initialization module) compiles correctly, however I'm not sure how this is related to the "stack_section" & DATABANK in the linker script? I also don't know what the run-time initialization module is, and what the effects are of leaving it out?
This seems to be a SDCC issue. Ticket moved to the SDCC bug tracker.
Borut
Ticket moved from /p/gputils/bugs/267/
Can't be converted: