Freescale S12
From ErikaWiki
(Difference between revisions)
(→How to build a project in RT-DRUID) |
(→How to build a project in RT-DRUID) |
||
Line 56: | Line 56: | ||
= How to build a project in RT-DRUID = | = How to build a project in RT-DRUID = | ||
- | # | + | # In Eclipse/RT-Druid environment, open the ''New Project'' window. |
#; [[image:druid.PNG|center]] | #; [[image:druid.PNG|center]] | ||
- | # | + | # Select a template from the ''s12xs'' menu. |
#; [[image:task.PNG|center]] | #; [[image:task.PNG|center]] | ||
- | # | + | # Name your project. |
#; [[image:name.PNG|center]] | #; [[image:name.PNG|center]] | ||
- | #* | + | #* the folder appears in the ''Project Explorer''; |
#; [[image:oil.PNG|center]] | #; [[image:oil.PNG|center]] | ||
- | # | + | # Build the project (click with the right button of the mouse on the project name); |
#; [[image:build.PNG|center]] | #; [[image:build.PNG|center]] | ||
- | #* | + | #* the compilation starts; |
#; [[image:progress.PNG|center]] | #; [[image:progress.PNG|center]] | ||
- | #* | + | #* the executable file appear in the ''Debug'' folder of the project. |
#; [[image:elf.PNG|center]] | #; [[image:elf.PNG|center]] | ||
- | # | + | # Open the RT-debugger. |
#; [[image:hiwave.PNG|center]] | #; [[image:hiwave.PNG|center]] | ||
- | # | + | # From the menu ''File'' choose ''Open Configuration...''; |
#; [[image:conf.PNG|center]] | #; [[image:conf.PNG|center]] | ||
- | #* | + | #* and load the debugger environment configuration (.ini); |
#; [[image:fullchip.PNG|center]] | #; [[image:fullchip.PNG|center]] | ||
- | # | + | # From the menu ''HCS12XS'' click on ''Load...''. |
#; [[image:load.PNG|center]] | #; [[image:load.PNG|center]] | ||
- | #* | + | #* and load the executable of your application; |
#; [[image:load_exe.PNG|center]] | #; [[image:load_exe.PNG|center]] | ||
- | # | + | # Then starts the simulation and enjoy!!!. |
#; [[image:start.PNG|center]] | #; [[image:start.PNG|center]] |
Revision as of 16:50, 2 December 2009
Contents |
Freescale S12 support
ERIKA Enterprise supports HCS12X microcontrollers. The support for RT-Druid is now available on release 1.5.0. The HCS12X support includes:
- support for COSMIC compiler.
- support for single and multi stack configurations (multi stack will be available soon...).
- ISR interrupt supported.
- support for Freescale Debugger.
- Supported compiler
- COSMIC C cross compiler and ELF module generation for debugging information.
- Mode of operation
- Mono-stack: The Monostack configuration of the ERIKA Kernel models the fact that all tasks and ISRs in the system share the same stack.
- Multistack HAL: Every thread can have its private stack, or it can share it with other threads.
- Handling of paging registers
- The compiler supports bank switching for code and data, using the internal window mechanism provided by the HCS12X processor.
- Bank switching mechanism delivers 32-bit performance with all the advantages and efficiencies of a 16-bit MCU.
- Bank switching is supported via:
- - @far type qualifier to describe a function relocated in a different bank. Calling such a function implies a special calling
- sequence, and a special return sequence. Such a function has to be defined @far and referenced as @far in all the files using
- it. The compiler also provides a specific option +modf to automatically consider all the functions to be @far. The @far type
- modifier is also used to declared variables allocated in a data bank.
- - Linker options are required to ensure proper physical and logical addresses computations. The linker is also able to
- automatically fill banks without any need to take care of the page boundaries.
MCUs
- The MCUs supported are currently the following:
- Freescale MC9S12XS128; (an efficient 16-bit microcontroller with four modes of operation: normal single chip mode, normal single chip mde with active background debug mode, stop low power mode, wait low power mode).
Boards
- The MCUs supported are currently the following:
- SofTec Microsystems DEMO9S12XSFAME demo board.
Examples
- The examples and tests are available at: [1].
Download and install pre-release
- To download the S12 plug-in for Eclipse refer the following site: Plug-in download site.
Procedure for installation:
- Step 1:
- Open Eclipse;
- From the menu Help select Install New Software...;
- Add with the button Add... the reference site mentioned above (fill the Loaction field with this: http://retis.sssup.it/~durin/rtd_150/site_s12/);
- Tick all the plug-ins and install them clicking on the button Next;
- Restart Eclipse;
- Step 2:
- From the menu File select New and then RT-Druid Oil and C/C++ Project;
- From the Project menu select one of the available S12 demo tests;
- Then click on the project name with the right mouse button and build to obtain the elf object module for debugging;
How to build a project in RT-DRUID
- In Eclipse/RT-Druid environment, open the New Project window.
- Select a template from the s12xs menu.
- Name your project.
- the folder appears in the Project Explorer;
- Build the project (click with the right button of the mouse on the project name);
- the compilation starts;
- the executable file appear in the Debug folder of the project.
- Open the RT-debugger.
- From the menu File choose Open Configuration...;
- and load the debugger environment configuration (.ini);
- From the menu HCS12XS click on Load....
- and load the executable of your application;
- Then starts the simulation and enjoy!!!.