#2202 PIC18F13K22 GPUtils Linker Script

open
nobody
None
PIC16
1
2013-12-20
2013-07-25
Steve
No

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
~~~~~~~~

include "pic18f13k22.h"

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.

Discussion

  • Steve

    Steve - 2013-07-25

    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?

     
  • Borut Ražem

    Borut Ražem - 2013-07-30

    This seems to be a SDCC issue. Ticket moved to the SDCC bug tracker.

    Borut

     
  • Borut Ražem

    Borut Ražem - 2013-07-30

    Ticket moved from /p/gputils/bugs/267/

    Can't be converted:

    • _milestone: None
     
  • Maarten Brock

    Maarten Brock - 2013-12-20
    • Category: --> PIC16
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks