Hi. Iím having  problems when I compile for a 68HC908GP32, and Iím not sure if what happens, is a bug.

I would be grateful if someone can help me on my first steps with SDCC, although not on C programming.

I wrote a simple program to see some leds to blink, to test the SDCC, and Iím working on

Windows 2000.

The program named prueba.c is:



void main(void)


int h;


 DDRD = 0xFF;

 PTD = 0x00;


PTD = 0xFF;

for(h = 0; h <= 800; h++){}

PTD = 0x00;

for(h = 0; h <= 800; h++){}



and I compiled it with a ďdojob.batĒ file with the command lines as follows:


sdcc -mhc08 -c prueba.c

sdcc --model-small -c prueba.c

sdcc --code-loc 0x8000 --data-loc 0x0040 --stack-loc 0x023F  prueba.c

sdcc --out-fmt-s19 prueba.c


I can see the content of the prueba.s19 output file, but after I upload it with

PROG08SZ - Flash Programmer, the uC does nothing.

Probably Iím doing something wrong. Is it?

On other way I tried the program prueba.c  with only

void main(void){ } and without any header file, and got the prueba.s19 file with SDCC.

I did the same with the ImageCraft compiler and got a different content on the

prueba.s19 file. Both with the same code and data locations.

I donít know what Iím doing wrong,

Can someone help me please?.


Casiano Charles Budden