#881 Problem with multiple files

closed-fixed
nobody
linker (61)
5
2013-05-25
2005-02-15
Eltorio
No

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

Discussion

  • Eltorio

    Eltorio - 2005-02-15

    2 .c files, 2.h files and Makefile (needed to checked for correct paths) for mingw32 environment

     
  • Erik Petrich

    Erik Petrich - 2005-02-15

    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;

     
  • Eltorio

    Eltorio - 2005-02-15

    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

     
  • Eltorio

    Eltorio - 2005-02-15
    • status: open --> open-fixed
     
  • Maarten Brock

    Maarten Brock - 2005-02-16
    • milestone: --> non_bugs
    • status: open-fixed --> closed-fixed
     
  • Maarten Brock

    Maarten Brock - 2005-02-16

    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.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks