# FreeRTOS and MSPFG4618

**URL:** <https://forums.freertos.org/t/freertos-and-mspfg4618/1507>\
**Category:** Kernel\
**Created:** [June 12, 2011, 8:50pm UTC](https://forums.freertos.org/t/freertos-and-mspfg4618/1507 "2011-06-12T20:50:01Z")\
**Posts on this page:** 4\
**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:** [June 12, 2011, 8:50pm UTC](https://forums.freertos.org/t/freertos-and-mspfg4618/1507/1 "2011-06-12T20:50:01Z")

</div>

**[anne13](https://sourceforge.net/u/anne13/)** wrote on [Sunday, June 12, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/4392a530/#f9b2):

Dear FreeRTOS Forum:

I am using IAR Workbench and got the FreeRTOS demo “msp430\_IAR” to build. However, this demo’s architecture is for SoftBaugh’s ES449 prototyping board.

I followed the instructions on p. 161 (steps 1 - 6) of the FreeRTOS tutorial book for adapting one of the supplied demo projects. I removed all demo source files except heap\_1.c and main.c and got the project to compile.

However, I want to port to the MSP430FG4618 (instead ES449). So I changed the header file in FreeRTOSConfig.h from “#include \<msp430x44x.h\>” to “#include \<msp430xG46x.h\>”. Now the project will not compile. How can I get project to work on FG4618? Here are the error messages:

Building configuration: RTOSDemo - Debug  
Updating build tree…

15&nbsp; file(s) deleted.  
Updating build tree…  
croutine.c&nbsp;  
heap\_1.c&nbsp;  
list.c&nbsp;  
main.c&nbsp;  
Warning: statement is unreachable C:\MSP430\Agamatrix project\FreeRTOS\Demo\msp430\_IAR\main.c 177  
port.c&nbsp;  
portext.s43  
Error: Bad instruction C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 925  
Error: Bad instruction C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 941  
Error: Duplicate label:‘sfrl’ C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 959  
Error: Bad instruction C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 959  
Error: Duplicate label:‘sfrl’ C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 975  
Error: Bad instruction C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 975  
Error: Duplicate label:‘sfrl’ C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 993  
Error: Bad instruction C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 993  
Error: Duplicate label:‘sfrl’ C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 1009  
Error: Bad instruction C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 1009  
Error: Segment too long (max is ffff) C:\Program Files\IAR Systems\Embedded Workbench 6.0 Evaluation\430\INC\msp430xG46x.h 925  
Error while running Assembler  
queue.c&nbsp;  
tasks.c&nbsp;  
Warning: conversion from integer to smaller pointer C:\MSP430\Agamatrix project\FreeRTOS\Source\tasks.c 470

Total number of errors: 22  
Total number of warnings: 4

---

<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:** [June 13, 2011, 8:13am UTC](https://forums.freertos.org/t/freertos-and-mspfg4618/1507/2 "2011-06-13T08:13:03Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Monday, June 13, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/4392a530/#0d45):

The MSP430F449 uses an MSP430 core.&nbsp; The MSP430FG4618 uses an MSP430X core.&nbsp; The FreeRTOS download contains 2 demos for the MSP430X in the FreeRTOS/Demo/MSP430X\_MSP430F5438\_CCS4 and FreeRTOS/Demo/MSP430X\_MSP430F5438\_IAR directories respectively.&nbsp; Each demo uses 3 different memory models.&nbsp; There is a lot of code behind it.&nbsp;

The ports for these demos are found in the FreeRTOS/Source/portable/CCS4/MSP430X and FreeRTOS/Source/portable/IAR/MSP430X directories respectively.

I suggest you look at one of these demos as a starting point.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 13, 2011, 2:11pm UTC](https://forums.freertos.org/t/freertos-and-mspfg4618/1507/3 "2011-06-13T14:11:42Z")

</div>

**[enridl](https://sourceforge.net/u/enridl/)** wrote on [Monday, June 13, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/4392a530/#34bf):

So I changed the header file in FreeRTOSConfig.h from “#include \<msp430x44x.h\>” to “#include \<msp430xG46x.h\>”.  
I think this might be the first error: check if it the right to get included&nbsp; \<msp430xG46x.h\>"

then check any error above, and try to edit the right folder/file which gets an error. I’ll send you more notes later.

Regards,  
Enri.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 13, 2011, 2:35pm UTC](https://forums.freertos.org/t/freertos-and-mspfg4618/1507/4 "2011-06-13T14:35:21Z")

</div>

**[anne13](https://sourceforge.net/u/anne13/)** wrote on [Monday, June 13, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/4392a530/#bb03):

Hi Enrid:

Thank you for your help. If you are able to send me your code, that would be great. I am using IAR Workbench IDE, but as you said, I can make the necessary changes.

The reason for needing this port is that I am trying to adapt FreeRTOS for use on the MSP430fg4618/MSP430f2013 experimenter’s board. It’s not for a specific project at this time. However, I want to be able to add FreeRTOS experience to my resume, as some companies I’m looking at are interested in this.

Thank you again.

Regards,  
Anne
