FreeRTOS and MSPFG4618

anne13 wrote on Sunday, June 12, 2011:

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  file(s) deleted.
Updating build tree…
croutine.c 
heap_1.c 
list.c 
main.c 
Warning: statement is unreachable C:\MSP430\Agamatrix project\FreeRTOS\Demo\msp430_IAR\main.c 177
port.c 
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 
tasks.c 
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

rtel wrote on Monday, June 13, 2011:

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

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.

enridl wrote on Monday, June 13, 2011:

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  <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.

anne13 wrote on Monday, June 13, 2011:

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