Quality RTOS & Embedded Software
About   Contact   Support   FAQ

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs Books & Kits Trace Tools Ecosystem TCP & FAT Training

Last site update June 02 2015

Embedded TCP/IP stack for RTOS advert


Porting FreeRTOS 5.4.2 to MSP430FG4618 EXP. B

Posted by enridl on November 2, 2009
Hi to everyone,

I managed to sucsessfully port FreeRTOS to MSP430FG4618 using GCC+Eclipse cdt.
I could run the FlashTasks for 3 on board LCD Leds, checking if otherTasks are running+MathTest+ApplicationIdleHookNotStalling+CheckIfErrors, each task toggling a LED. I defined another task in main(), similar to CheckIfErrors, that toggles a led with mainNoError rate just for comparing the rate it toggles a LED, with mainErrorCheck rate.

I am using the small memory model(heap1.c in memoryManagement and including Minimal in Common folder).

But, i have a problem!
I cannot use more than 7 tasks a time, because i get a _stop_prog_exec() error, while debugging
So if i use just 2 LEDs in flash.c, i can use all the other 5 tasks, or i can use 3 LEDs toggling in flash.c, but i can't use the task i defiined NoErrorCheck() in this case.
Could anyone tell me what is this _stop_prog_exec() error about? am i using all the available stack reserved in Minimal memory management model.

I have another question: I notice while debugging that it keeps running a task called _udivmod4 for a very long time interval.
I could get no description in FreeRTOS.org about that. does anyone know what is this about? Sometimes it gets stuck when i run the step mode debugging while it is in this udivmod4si.

Any advice is welcome



RE: Porting FreeRTOS 5.4.2 to MSP430FG4618 EXP. B

Posted by enridl on November 2, 2009
..and there's something else:

I cannot run it in preemptive scheduling, because as soon as i set #define use preemptive to 1 in FreeRTOSConfig, none of the tasks Toggles any LED.

What could be wrong?

Please, could anyone help me!
Thanks for your time,

RE: Porting FreeRTOS 5.4.2 to MSP430FG4618 EXP. B

Posted by enridl on November 10, 2009
Is there any one who could help me?
Please Richard, are you there?

thank you and excuse me for your time,

RE: Porting FreeRTOS 5.4.2 to MSP430FG4618 EXP. B

Posted by Richard on November 10, 2009
Sounds to me like you are simply running out of heap space. Can you free some memory from anywhere else and/or increase configTOTAL_HEAP_SIZE?

I have no idea what _stopprog_exec() but guess it is a library that comes with your compiler, or simply a function from the start up code.

I would also guess that _udivmod4 was part of your compilers maths libraries, but that is only a guess.

Neither function are anything to do with FreeRTOS.


RE: Porting FreeRTOS 5.4.2 to MSP430FG4618 EXP. B

Posted by enridl on November 10, 2009
Thanks Richard,

i think you're right. Iam probably running out of heap space. I will try to increase the configTOTALHEAPSIZE, because it is configured for the smaller F449 microcontroller.
But could you please give me a hint: how could i know exactly which is the maximum heapsize i can use for my microcontroller, is there any way i can figure that out, and what are the bad conseguences that could come out by increasing it?

thank you very much for your reply, and thank you very much for FreeRTOS, its a great work you have done, i liked a lot working with it. I would like to contribute. Could you please give me some hints, as soon as i have the final version of this port, what should i do for giving it to the community.


RE: Porting FreeRTOS 5.4.2 to MSP430FG4618 EXP. B

Posted by Anne Thomas on June 13, 2011
Dear enridl:

Were you able to get the FreeRTOS port to the msp430fg4618? I am having trouble configuring FreeRTOS to run on msp430fg4618. (Please see my post under "anne13".) Any help/suggestions would be appreciated.

Thank you,

RE: Porting FreeRTOS 5.4.2 to MSP430FG4618 EXP. B

Posted by Richard on June 13, 2011


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2015 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News - New Book Edition!

Receive a complimentary pre-release pdf of our up-coming book "Mastering the FreeRTOS Real Time Kernel, a Hands-On Tutorial Guide" with every purchased copy of the existing "Using the FreeRTOS Real Time Kernel" book.

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists