# FreeRTOS on a S12X based board 

**URL:** <https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313>\
**Category:** Kernel\
**Created:** [April 8, 2011, 9:48am UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313 "2011-04-08T09:48:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 8, 2011, 9:48am UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/1 "2011-04-08T09:48:31Z")

</div>

**[cchatel](https://sourceforge.net/u/cchatel/)** wrote on [Friday, April 08, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#0843):

Hello,

I’ve a S12X based board (freescale MC9S12XEP100) and I want to use an Operating System for my dev. I decide to use freeRTOS with CodeWarrior, download the HCS12\_CodeWarrior\_banked demo and compile it.  
With some modifications this works.  
Then I want to configure this software for the MC9S12XEP100 board, and then upload it to the board. There is no simple solution  
- it’s not possible to convert the project as it contains many targets,  
- opening a new project and copying freeRTOS files in it, doesn’t seem to work due to differences in the CW version used and the version in which the OS has been compiled (prepared).

Do you have any suggestions to do this job?

Is there a new freeRTOS release compatible with the last CodeWarrior?

Thank for you answers

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [April 10, 2011, 6:35pm UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/2 "2011-04-10T18:35:16Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Sunday, April 10, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#0be7):

The CodeWarrier version used for the port has not changed since the port was created.&nbsp; If you want it to target another chip, can you just change the memory map (and maybe the vector table), or are there more differences between the chips?

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 11, 2011, 10:21am UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/3 "2011-04-11T10:21:32Z")

</div>

**[cchatel](https://sourceforge.net/u/cchatel/)** wrote on [Monday, April 11, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#7940):

I use CodeWarrior in release 5.9.0 build 5294.  
I just downloaded the FreeRTOSV6.1.1, go to the HCS12\_CodeWarrior\_banked directory and double-click on the CodeWarrior Project.&nbsp; A pop-up windows tell me if I want to use Processor Expert for this project. I click on the ‘yes’ button.  
Then I obtain those warning:  
The following access path in target “P&E ICD” of project “RTOSDemo.mcp” cannot be found:  
{Compiler}bin\Plugins\support\ProcessorExpert\PESL\HCS12

The following access path in target “P&E ICD” of project “RTOSDemo.mcp” cannot be found:  
{Compiler}bin\Plugins\support\ProcessorExpert

The following access path in target “Simulator” of project “RTOSDemo.mcp” cannot be found:  
{Compiler}bin\Plugins\support\ProcessorExpert\PESL\HCS12

The following access path in target “Simulator” of project “RTOSDemo.mcp” cannot be found:  
{Compiler}bin\Plugins\support\ProcessorExpert

If I push the ‘make’ button I obtain 96 errors due to error in compiler command line arguments:  
Error&nbsp;&nbsp; : C52: Error in command line '-BfaGapLimitBits0 -Cf -D\_HCS12 -DHCS12\_CODE\_WARRIOR -D\_\_NO\_FLOAT\_\_ -I. -I…\…\Source\portable\CodeWarrior\HCS12  
-I…\Common\include -I…\…\Source\include -Mb -Os -Ou -Of -Oi -OiLib=a -OnB=abl -OnCstVar -OnPMNC -Or -TD4LD4LLD4 -WmsgSd1420  
-WmsgSd4001 -WmsgSd4002 -WmsgSd4301 -WmsgSd5703 -WmsgSd5904 -WmsgSd5905 -WmsgSd5909 -WmsgSd5917 -WmsgSd12053 -WmsgSd12056 -env"GENPATH=C:\Documents  
and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked;C:\Documents and Settings\c.chatelain\Mes  
documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\bin;C:\Documents and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\prm;C:\Documents  
and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\cmd;C:\Documents and Settings\c.chatelain\Mes  
documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\Sources;C:\Program Files\Freescale\CWS12v5.1\lib\HC12c\lib;C:\Program  
Files\Freescale\CWS12v5.1\lib\HC12c\src;C:\Documents and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\Code;C:\Documents  
and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\doc;C:\Program Files\Freescale\CWS12v5.1\lib\hc12c\include;C:\Documents  
and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\ParTest;C:\Documents and Settings\c.chatelain\Mes  
documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\serial;C:\Documents and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Source;C:\Documents  
and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Source\portable\MemMang;C:\Documents and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\Common\Minimal;C:\Documents  
and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Source\portable\CodeWarrior\HCS12;C:\Documents and Settings\c.chatelain\Mes  
documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\CODE;C:\Documents and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\DOC;C:\Program  
Files\Freescale\CWS12v5.1\lib\HC12c\include" -env"LIBPATH=C:\Program Files\Freescale\CWS12v5.1\lib\HC12c\include" -env"OBJPATH=C:\Documents  
and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\bin" -env"TEXTPATH=C:\Documents and Settings\c.chatelain\Mes  
documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\bin" -objn=“C:\Documents and Settings\c.chatelain\Mes documents\soft\FreeRTOSV6.1.1\Demo\HCS12\_CodeWarrior\_banked\RTOSDemo\_Data\P&E\_ICD\ObjectCode\Cpu.C.o”  
’

Error&nbsp;&nbsp; : Error in command line!

Error&nbsp;&nbsp; : C4202: Invalid pragma OPTION, Invalid Options

IO\_Map.h line 40&nbsp;&nbsp;

Error&nbsp;&nbsp; : Compile failed

These errors make me feel that there is some differences in software release. If there is another explanation I will be happy to know.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [April 21, 2011, 9:10pm UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/4 "2011-04-21T21:10:41Z")

</div>

**anonymous** wrote on [Thursday, April 21, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#8210):

I receive such error. There are any results?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 14, 2011, 4:35pm UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/5 "2011-05-14T16:35:46Z")

</div>

**[cchatel](https://sourceforge.net/u/cchatel/)** wrote on [Saturday, May 14, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#f86f):

Finally we suceeded to run FreeRtos on the MC9S12XEP100 board (HCS12X). We made a lot of changes: first to compile FreeRtos for HCS12 component (I made a document in french to explained my change), and later, to compile it, and run it, for HCS12(X) component (there is some changes in memory map, vector table and port.c; CCR register contains 16 bits in HCS12X versus 8 in HSC12).  
If you have any question,&nbsp; I would be pleased to answer.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 14, 2011, 8:05pm UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/6 "2011-05-14T20:05:06Z")

</div>

**[edwards3](https://sourceforge.net/u/edwards3/)** wrote on [Saturday, May 14, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#0b8b):

Please post the code up at [http://interactive.freertos.org](http://interactive.freertos.org) and the documentation as well even it it is in French. Google translate is my friend.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 14, 2011, 2:57pm UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/7 "2011-06-14T14:57:23Z")

</div>

**[abacus1980](https://sourceforge.net/u/abacus1980/)** wrote on [Tuesday, June 14, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#52d9):

I am working with the same processor and the OAF port does not seem to work with paging or global memory.&nbsp; Did you have this same problem?&nbsp; if so were you able to solve it?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 30, 2011, 12:01am UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/8 "2011-06-30T00:01:52Z")

</div>

**anonymous** wrote on [Thursday, June 30, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#f48f):

Excuse me for my late answer. I made a document in which I explain how  
I procede to make my port. First I tried to compile FREERTOS for the  
“MC9S12DP256 banked model”, then using CodeWarrior Processor Expert I  
move the code to the MC9S12XEP100 Cpu as explained in the document  
that i send to [http://interactive.freertos.org..](http://interactive.freertos.org..)  
Good luck!

Regards

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [July 4, 2011, 4:12pm UTC](https://forums.freertos.org/t/freertos-on-a-s12x-based-board/4313/9 "2011-07-04T16:12:02Z")

</div>

**[abacus1980](https://sourceforge.net/u/abacus1980/)** wrote on [Monday, July 04, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/bc27884e/#4cac):

Thank you very much for your efforts.&nbsp; I really appreciate you following up!
