Freescale S12

From ErikaWiki

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

Contents

Freescale S12 support

  • Compiler

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;


  • 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. This stack configuraton can only be used when the scheduling algorithm implemented by the kernel insures that there is not an interleaving among the various tasks in the system. That is, the kernel must guarantee that there are no blocking primitives implemented in the system. OSEK/VDX Immediate Priority Ceiling Protocol guarantees that property. The Monostack configuration has some nice properties, in particular due to the fact that, in the FP, EDF, and FRSH kernels, there is no need to save registers when a context switch happens because a task called a primitive.

    • Multi-stack:

Multistack HAL: Every thread can have its private stack, or it can share it with other threads. This allows the Kernel Layer to use scheduling algorithms that could block threads in synchronization primitives (as for example, a fixed priority scheduler with semaphores) or for arbitrary reasons (as, for example, a classical round robin scheduler).


  • 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: [2]
  • Procedure for installation:
    • Step 1:
Personal tools