Interrupt Service Routine not reached
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a Interrupt Service Routine (ISR) named ABC whose declaration is interrupt void ABC(void);. I have also added "interrupt=" in the Macro option in Configration. And I also added "ABC" in the Interrupts option in the Multitasking configuration. Inspite of this, this ISR "ABC" is shown as NOT REACHABLE. Am I missing something?
I also face a similar issue while executing tasks from a scheduler. Did the same as above in the Cyclic Tasks option but the tasks are shown as not reachable.
0 Kommentare
Antworten (1)
Sonam Gupta
am 19 Apr. 2017
In Polyspace, the source code has to be adapted to allow asynchronous tasks and interruptions to be taken into account. Without such adaptations, interrupt service routines will appear as grey (dead code) in the Viewer. The standard execution model is such that the main is executed initially. Only if the main terminates and returns control (i.e. if it is not an infinite loop and has no red errors) will the entry points be started, with all potential starting sequences being modeled automatically. There are several different approaches which may be adopted to implement the required adaptations.
As an example you can modify your main from:
void main (void)
{
int J = 0;
Init_globals(J);
while (1)
management();
}
to
void main (void)
{
int J = 0;
Init_globals(J);
}
void main_task (void)
{
while (1)
management();
}
So the main() function will terminate. Additionally you need to specify the new entry point like -entry-points "main_task"
0 Kommentare
Siehe auch
Kategorien
Mehr zu Options at Command Line Only finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!