interrupt vector table & multiple file builds

Help
2006-11-27
2013-03-12
  • David Plentovich

    I am using SDCC for a 8051 target.  I have my source broken into multiple files.  When I build (the build is successful) but the interrupt vector table is missing all the interrupt functions that are not located in main.c.  If I move the interrupt function from another file  (eg. timer0.c) into main.c then re-build, the interrupt vector table now has the correct entry for timer0 interrupt.  Is it required for SDCC that all interrupt functions must reside in main.c?  Is there a pragma statement that would allow the interupt functions to be located in other files than main.c?  If I want to have interrupt functions in files other than main.c do I need to manually create the interrupt vector table (in main.c?); any examples on how to manually create the interrupt vector table?
    Thanks, David Plentovich

     
    • Anonymous - 2006-11-27

      You just need to place all interrupt function prototypes in main.c, but they can be defined anywhere. It can be found in the manual somewhere.
      mlynki

       
    • David Plentovich

      Thanks.  By adding the following prototype to main.c now the vector table is correct.
      """void timer0_isr(void) interrupt 1 using 1;"""

       

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