forward declaration of interrupts?

  • Matthias Arndt

    Matthias Arndt - 2007-03-15


    I have a small project with two source files, one of them implementing interruptdriven serial I/O for 8051.
    However I cannot get SDCC to link my files. I have added a prototype of the interrupt to the main.c containing main() as said in the manual. I still get the following linker error:

    $ sdcc --code-loc 0x100 main.rel sio.rel

    ?ASlink-Warning-Undefined Global '_com_isr' referenced by module 'main'

    My main.c has the following declaration:
    extern static void com_isr (void) interrupt 4;

    While the ISR itself is defined as follows in the sio.c file:
    static void com_isr (void) interrupt 4

    The files themselves do compile and the assembler output looks sane.

    Is there a special trick to this?

    Matthias Arndt

    • Frieder Ferlemann

      try without 'static'

    • Matthias Arndt

      Matthias Arndt - 2007-03-15

      Thanks alot, that did help!


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks