Interrupt Service Routine not reached

9 ビュー (過去 30 日間)
Ramakrishnan Murthy
Ramakrishnan Murthy 2017 年 4 月 17 日
回答済み: Sonam Gupta 2017 年 4 月 19 日
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.

回答 (1 件)

Sonam Gupta
Sonam Gupta 2017 年 4 月 19 日
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"

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by