FreeRTOS and HCS12X

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS and HCS12X

1,920 Views
DEMO9S12XEP100
Contributor II

I have a developpement kit DEMO9S12XEP100 and i want to use a freeRTOS but i do not know it s compatible with HCS12X.

in http://www.freertos.org/ the freeRTOS covers the HCS12 but what about HCS12X ?

 

Tank you for your reponse

Labels (1)
0 Kudos
4 Replies

737 Views
icecold
Contributor I

Hey Visitor,

 

I hope you don't mean visitor, like in 24 Season 6 the tv series!

 

Off the topic (lol), I was wondering if there are any mother board issues? In other words, FreeRTOS.com states that it supports HCS12 , but is that independent of the board on which the HCS12 is connected? For example, I have the MCUSLK Project board  - 2 that has the MC9S12C32 connected to it.

 

Chhers,

 

ice

0 Kudos

737 Views
BlackNight
NXP Employee
NXP Employee

Hello,

FreeRTOS needs to distinguish between S12 and S12X, as the interrupt stack frame is different.

Additionally both for S12 and S12X you can have the small (non-banked) and the banked memory model.

All this makes things a little bit complicated.

 

There is now a complete port of FreeRTOS as Processor Expert component available, see

http://mcuoneclipse.wordpress.com/2012/02/11/back-to-classic-freertos-for-freescale-s12x/

 

An example of this port has been posted on the FreeRTOS site under community contributions:

http://interactive.freertos.org/forums/104161-freescale

 

 

 

 

0 Kudos

737 Views
dtharper
Contributor I

I have successfully used this port. 

http://interactive.freertos.org/attachments/token/hdyi5fvvqwwocdq/?name=HCS12_HCS12X_CodeWarrior_OAF...

 

i have it running on the demo9s12xep100 softec board without any issues.  you do need to spend some time going through the code to make sure you have the correct compiller flags enabled.

 

Also if you re-enable processor expert it will want to keep changing the TIOS byte on you.  i had to put a command in to reset it to what the example requires.  Also processor expert will continually overwrite your vectors.c file if you re-enbalce it, so basically lock that file from being written.  also events.c will have the same issues. unfortunately you can't prevent processor expert from overwritting it.

 

my compiler flags are as follows.

-CPUHCS12XE -D_HCS12 -DHCS12_CODE_WARRIOR -D__NO_FLOAT__ -D__MAP_FLASH__ -D__HCS12X__ -Mb -WmsgSd1420 -WmsgSd4001 -WmsgSd4002 -WmsgSd4301 -WmsgSd5703 -WmsgSd5904 -WmsgSd5905 -WmsgSd5909 -WmsgSd5917 -WmsgSd12053 -WmsgSd12056

 

add this line to your main function after the PE_low_level_init()  instruction

clrReg8Bits(ECT_TIOS, 128)

 

 

enjoy.

 

0 Kudos

737 Views
freescale_satya
Contributor III

Please check the below link, maybe it will be helpful

 

https://community.freescale.com/message/46918#46918

 

 

0 Kudos