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
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.
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.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.