As another data point, I installed an older version of SDCC to see if the 
behavior changed.  Interestingly, it did.

With version SDCC : 
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.0 #4309 
(Jul 28 2006) (MINGW32)

I get this:

C:\projects\rewrite>sdcc -S -V -mpic14 -p12f675 main.c
+ C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -std=c99 -obj-ext=.o -DSDCC_MOD
EL_SMALL -DSDCC=260 -DSDCC_pic14 -D__pic14 -DSDCC_PROCESSOR="12f675" -I"C:\Progr
am Files\SDCC\bin\..\include\pic14" -I"C:\Program Files\SDCC\bin\..\include" -I"
C:\Program Files\SDCC\bin\..\include\pic"  "main.c"
C:\projects\rewrite>gpasm -c main.asm
C:\projects\rewrite>gplink -m -c -s 12f675i.lkr -o rfpic.hex -I c:\projects\rewr
ite libsdcc.lib pic12f675.lib main.o
error: linker script has no definition that matches the type of section "data_ma
in"

It looks like the linker file and the .asm don't agree, but I'm hardly an 
expert.  I hope that someone has fought this battle before (and won, of course).

Thanks again for any help.

Dan
-------------- Original message -------------- 
From: [EMAIL PROTECTED] 

Hello everyone.
I'm new to SDCC, and I could use a nudge in the right direction.
I have installed the latest snapshot (sdcc-20080609-5192-setup.exe) under Win 
XP (SP2) and also the latest GPUtils.  I've created a very basic project for 
the PIC12F675, consisting of a main.h and a main.c.
The tools all seem to be installed and working, as I can compile and assemble, 
and the assembly looks exactly as I would expect.  The issue that I have is 
during the link process.  I'm not sure if it is the libsdcc.lib that is causing 
the problem, but I think that I've got the right one (from the pic directory).  
Anyway, when I build, I get:
--------------------------------------------
C:\projects\rewrite>sdcc -S -V -mpic14 -p12f675 main.c
+ C:\PROGRA~1\SDCC\bin\sdcpp.exe -nostdinc -Wall -std=c99 -obj-ext=.o -DSDCC_MOD
EL_SMALL -DSDCC=282 -DSDCC_REVISION=5192 -DSDCC_pic14 -D__pic14 -DSDCC_PROCESSOR
="12f675" -I"C:\Program Files\SDCC\bin\..\include\pic14" -I"C:\Program Files\SDC
C\bin\..\include" -I"C:\Program Files\SDCC\bin\..\include\pic"  "main.c"
C:\projects\rewrite>gpasm -c main.asm
C:\projects\rewrite>gplink -m -c -s 12f675i.lkr -o rfpic.hex -I c:\projects\ligh
tcontrol\rewrite libsdcc.lib pic12f675.lib main.o
warning: processor mismatch in "shadowregs.o"
warning: processor mismatch in "idata.o"
warning: processor mismatch in "_gptrget1.o"
warning: processor mismatch in "_gptrget2.o"
error: linker script has no definition that matches the type of section "UDL_ida
ta_0"
---------------------------------------------
Could someone please give me some hints on what might be wrong?
I appreciate the help!
Dan
SDCC version:
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.2 
#5192 (Jun  9 2008) (MINGW32)
The source code is really simple:
main.c
---------------------------------------------
#define __12f675
#include <pic12f675.h>
#include "main.h"
#define CONFIG_WORD _CPD_OFF & _CP_OFF & _BODEN_OFF & _MCLRE_ON & _PWRTE_ON & 
_WDT_OFF & _INTRC_OSC_NOCLKOUT
unsigned int at 0x2007  __CONFIG = CONFIG_WORD;
static void Intr(void) interrupt 0
{
}
void initialize (void)
{
}
void main (void)
{
initialize();
 while(1) //main program loop
 {
 
 }
}
---------------------------------------------
main.h has only a single #define that I'll use later in development:
#define    CARD_READER    1
---------------------------------------------
--- Begin Message ---
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

--- End Message ---
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to