#1293 no definition that matches the type of section "udata_test_0

closed-out-of-date
nobody
5
2013-05-25
2007-02-17
neomilium
No

Hi,

I would like to use sdcc with my pic16f874a and i have wrote a little code to check if it's possible to use sdcc with it.

my test.c is:

#define _16F874A
#include <pic16f874a.h>

unsigned int i;

void main(void) {
TRISD = 0;

while(1) {
PORTD=0xFF;
for (i=1;i<10000;i++);
PORTD=0x00;
for (i=1;i<10000;i++);
}
}
/* EOF */

I compile with the following command line:
$ sdcc -mpic14 -p16f874a test.c

But the result is:
message: using default linker script "/usr/share/gputils/lkr/16f874a.lkr"
error: linker script has no definition that matches the type of section "udata_test_0"

I use:
Debian etch.
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.0 #4309 (Oct 15 2006) (UNIX).
gpasm : gpasm-0.13.4 beta
gplink : gplink-0.13.4 alpha

What's going wrong?

Thanks a lot.

C U soon.

neomilium

Discussion

  • Raphael Neider
    Raphael Neider
    2007-02-18

    • milestone: --> fixed
    • status: open --> closed-out-of-date
     
  • Raphael Neider
    Raphael Neider
    2007-02-18

    Logged In: YES
    user_id=1115835
    Originator: NO

    The problem can be solved in various ways:

    (1) update your SDCC installation either from a snapshot from http://sdcc.sf.net/snap.php or via subversion, especially the PIC14 port has seen tremendous improvements since your (ancient) 2.6.0 release (r4309, current revision is r4637...)

    (2) pass -r to the linker using sdc -Wl,-r to allow the use of SHAREBANKs for udata sections

    (3) modify the linker script, replacing the SHAREBANK tuple with a single DATABANK, which covers only one of the address ranges

    (1) is recommended, (2) shuold be a temporary workaround the problem, avoid (3)...

    Regards,
    Raphael

     
  • neomilium
    neomilium
    2007-02-19

    Logged In: YES
    user_id=1449979
    Originator: YES

    Hi,

    Thanks a lot, tecodev!

    I'll try your solution next weekend.

    Thanks again : it's a great work!

    Regards,
    neomilium