I couldn't get this program working when compiled from
multiple source files...
It is composed of 2 .c files and .h files...
When I concatenate the 2 .c files in one and compile it
runs perfectly.
The .ihx is different 70 bytes more in one file compilation
sdcc -v
SDCC :
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51
/ds400/hc08 2.4.8 #9
54 (Feb 9 2005) (MINGW32)
catiadoc@free.fr
2 .c files, 2.h files and Makefile (needed to checked for correct paths) for mingw32 environment
Logged In: YES
user_id=635249
I'm not sure if there are any other problems, but the interrupt
function needs to be visible from the file containing main()
since this is where the interrupt vector table is generated. Try
adding the prototype to serial.h:
void SerInt( void ) interrupt 4 using 2;
Logged In: YES
user_id=1071228
Thanks a lot it works well, Perhaps we can add an
explanation in the "Multiple source files" section in the
documentation
Logged In: YES
user_id=888171
We could, but remember it already is in the "Interrupt Service
Routines - General Information" chapter. And I'm trying to get
rid of this requirement (see RFE 866632). As you can see
there, you already can leave out the "using 2" in the
prototype declaration with the latest SDCC and still use it in
your function definition.
Anyway, this one is solved and therefor closed.