Writing a mono-stack application without interrupts

From ErikaWiki

(Difference between revisions)
Jump to: navigation, search
Line 7: Line 7:
* Finally, we created inside the <tt>EEtest0</tt> a C file with a main() function. That function explicitly calls ActivateTask finishing with a <tt>for(;;)</tt>. Please note that this small application can be executed to test the behviour of the kernel during a task activation. The function must be linked and used without problems resulting in an executable fully linked.
* Finally, we created inside the <tt>EEtest0</tt> a C file with a main() function. That function explicitly calls ActivateTask finishing with a <tt>for(;;)</tt>. Please note that this small application can be executed to test the behviour of the kernel during a task activation. The function must be linked and used without problems resulting in an executable fully linked.
-
*Note1: At this point we have to write two function: <tt>EE_hal_begin_nested_primitive</tt> and <tt>EE_hal_end_nested_primitive</tt> in the header file "ee_internal.h" at the path <tt>ee\pkg\cpu\cosmic_hs12xs\inc</tt>.
+
*Note1: At this point we have to write two functions: <tt>EE_hal_begin_nested_primitive</tt> and <tt>EE_hal_end_nested_primitive</tt> in the header file "ee_internal.h" at the path <tt>ee\pkg\cpu\cosmic_hs12xs\inc</tt>.
-
*Note2:Another header files to change is <tt>ee_cpu.h</tt> that contains some useful macros and the types definitions.
+
*Note2: Another header file to change is <tt>ee_cpu.h</tt> that contains some useful macros and the types definitions.
*Note3: The task termination will be tested in the following examples.
*Note3: The task termination will be tested in the following examples.

Revision as of 15:05, 17 November 2009

Reference test

examples/s12xs/porting_examples/EEtest1

Description

  • The goal now is to activate a task. To configure the task set we change the files eecfg.h and eecfg.c located inside the Debug folder (the basic structure is inspired to the Microchip PIC30 port). At the end of the porting the task set configuration will be deducted from the .oil file.
  • Finally, we created inside the EEtest0 a C file with a main() function. That function explicitly calls ActivateTask finishing with a for(;;). Please note that this small application can be executed to test the behviour of the kernel during a task activation. The function must be linked and used without problems resulting in an executable fully linked.
  • Note1: At this point we have to write two functions: EE_hal_begin_nested_primitive and EE_hal_end_nested_primitive in the header file "ee_internal.h" at the path ee\pkg\cpu\cosmic_hs12xs\inc.
  • Note2: Another header file to change is ee_cpu.h that contains some useful macros and the types definitions.
  • Note3: The task termination will be tested in the following examples.

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