main() dont in 0000h in SDCC

Thread Starter


Joined Dec 5, 2011
I guys,

I new here.

I new in PIC world (i like so much processors and memorys, but for other thinks, i liked use PIC). I am using a 18F2550.

I yet do some programs, and its works very fine, but when i "refining" it, the .hex and .asm dont works...

Whats happen: I use this lines above in compiller:
sdcc -S -mpic16 -p18f2550 -D__18f2550 --use-non-free %1.c -o %1.asm
gpasm -c %1.asm
gplink -m -s "c:\Arquivos de Programas\gputils\lkr\18f2550.lkr" -o %1.hex "c:\Arquivos de Programas\sdcc\non-free\lib\pic16\libdev18f2550.lib" %1.o
But in .map, for sample, show it:
S_blinkaled__delay_ms code 00000000 program 0x0000b8
S_blinkaled__main code 0x0000b8 program 0x00003a
The .main dont is the 0000000h, it after all functons that i create. I try many type of put the functions, defining address, but is the same, main() is after all functions.

In the SDCC of z80, works very well, with many sources, functions, includes e more, in 32KB of programm, but in pic is this.

Have some think that i can do ?

PS: With interruptions is very poor, in the first line, the cond jump to 000008h, when is the interruption.. :p...

Ty for help
Moacir Jr.
Last edited: