Writing a mono-stack with interrupt not nested

From ErikaWiki

Revision as of 12:30, 17 November 2009 by Erikadds (Talk | contribs)
Jump to: navigation, search

Reference test

examples/s12xs/porting_examples/EEtest2

examples/s12xs/porting_examples/EEtest3

examples/s12xs/porting_examples/EEtest4


Description

examples/s12xs/porting_examples/EEtest2:

  • The goal is to activate a task within an interrupt. To configure the task set we must change the files eecfg.h and eecfg.c located inside the Debug folder.
  • The isr configuration is architecture dependent. In this case we modified the vector_s12x.c file.
  • Finally, we created inside the EEtest0 a C file with a main() function. That function explicitly calls the function for periodic interrupt timer configuration and finishing with a for(;;). Please note that this small application can be executed to test the behaviour of the interrupt stub. The demo must finsih with an executable fully linked.

examples/s12xs/porting_examples/EEtest3:

  • The goal is to activate two tasks with different priorities to test the preemption behaviour. The main function activates the low priority task. The high priority task is activated within the interrupt and is executed at the end of the interrupt. Then the low priority task can continue until the end.

examples/s12xs/porting_examples/EEtest4:

  • The goal is to activate two tasks with different priorities to test again the preemption behaviour. The main function activates the high priority task. The low priority task is activated within the interrupt and is not executed at the end of the interrupt. The rtos continues the execution of the first task and then the low priority task is scheduled.


Expected output

When everything is done in the right way, with the following commands we can have the executable file:

  • open a Cygwin shell
  • cd into the Debug directory
  • the commands make clean and make all should work correctly producing an executable inside the Debug directory.

To simulate the application we can use directly the hardware or a "good" software debugger.

Personal tools