Reputation: 38
I have recently started working with Simplicity Studio to develop a program for a 8051 based development board. Via the configurator, I enabled Interrupts, which creates a Interrupts.c
file. This file isn't being explicitly included in the main file, yet the interrupts defined there work as they should.
Now, my concern is that I want to toggle a few flag variables from the interrupts, and use them in the main file. And since it is not explicitly included, the linker does not find the global variables of Interrupts.c
and throws an error.
L104: Multiple Function Definitions
for all ISR functions as well as global variables.L127: Unresolved External Symbol
as well as L128: Reference made to Unresolved External
Upvotes: 0
Views: 110
Reputation: 1
in the main file:
volatile uint87_t your_var=123;
in Interrupts.c:
extern volatile uint87_t your_var;
Upvotes: 0
Reputation: 6329
In the Peripherals tab look for interrrupts. There usually is a setting "Generate Interrupt Functions". Disable this and include your own IRQ module to the sources.
Upvotes: 0