Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


FreeRTOS on MSP430F2274

Posted by Andre Carvalhais on August 26, 2009
Hi folks,

I was trying to compile FreeRTOS to run on a F2274 (32kb flash and 1kb ram), from a eZRF2500 board that TI distributed in last year´s MSP Day. After adjusting things a little bit, when I tried to compile a simple code I got the following errors (mspgcc 3.2.3 with eclipse):

**** Build of configuration Debug for project SPECTraS ****

**** Internal Builder is used for build ****
msp430-gcc -mmcu=msp430x2274 -oSPECTraS.elf sys\init.o SPECTraS.o FreeRTOS\tasks.o FreeRTOS\queue.o FreeRTOS\port.o FreeRTOS\list.o FreeRTOS\heap_1.o FreeRTOS\croutine.o
C:\Program Files\mspgcc\bin\..\lib\gcc-lib\msp430\3.2.3\..\..\..\..\msp430\bin\ld.exe: region data is full (SPECTraS.elf section .bss)
C:\Program Files\mspgcc\bin\..\lib\gcc-lib\msp430\3.2.3\..\..\..\..\msp430\bin\ld.exe: region data is full (SPECTraS.elf section .bss)
Build error occurred, build is stopped
Time consumed: 157 ms.

My FreeRTOSConfig.h is as follows:

#define configUSE_PREEMPTION1
#define configUSE_IDLE_HOOK0
#define configUSE_TICK_HOOK0
#define configCPU_CLOCK_HZ( ( unsigned portLONG ) 16000000 ) /* Clock setup from main.c in the demo application. */
#define configTICK_RATE_HZ( (portTickType)(configCPU_CLOCK_HZ/32768) )
/* If configUSE_WDT_AS_TICKER is set below, this
* must be set as ( configCPU_CLOCK_HZ / 32768 ) */
#define configMAX_PRIORITIES( ( unsigned portBASE_TYPE ) 2 )
#define configMINIMAL_STACK_SIZE( ( unsigned portSHORT ) 50 )
#define configTOTAL_HEAP_SIZE( ( size_t ) ( 800 ) )
#define configMAX_TASK_NAME_LEN( 4 )
#define configUSE_TRACE_FACILITY0
#define configUSE_16_BIT_TICKS1
#define configIDLE_SHOULD_YIELD0
#define configUSE_WDT_AS_TICKER1

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 0 )

/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet1
#define INCLUDE_uxTaskPriorityGet1
#define INCLUDE_vTaskDelete0
#define INCLUDE_vTaskCleanUpResources0
#define INCLUDE_vTaskSuspend0
#define INCLUDE_vTaskDelayUntil1
#define INCLUDE_vTaskDelay1

configWDT_AS_TICKER is just an option I´ve added to allow me to use the watchdog timer instead of the timer a to generate the ticker interrupts.

The code is really simple, it just creates a task to toggle the onboard led (it uses vTaskDelay to generate the delay). Is FreeRTOS really that big or am I missing something here?
I also don´t understand why the compiler tries to link croutines.o since I have turned configUSE_CO_ROUTINES off.
Could someone please help me? Thanks in advance,


RE: FreeRTOS on MSP430F2274

Posted by Peter on August 26, 2009
Hi Andre,
iam not familar with that particular chip i even don't know if its a 8/16/32 bit architecture but it seems if your chip has only 1kB = 1024 bytes of Ram and if you defined a total heap size (#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 800 ) ) ) of 800 * (depending on the register size. e.g. for a 8 bit machine 1 byte, 16 bit = 2 bytes, 32 bits = 4 bytes) you will lead into a memory usage of 800, 1600, 3200 bytes...
As you can see, the linker is posting the message: Region data is full (SPECTraS.elf section .bss). In .bss-section (this is at pic32 gcc compiler, so i assume gcc behaves the same on different platforms) contains the uninitialized data which will be copies at startup into ram, which will not fit.

Hope this helps.

RE: FreeRTOS on MSP430F2274

Posted by John W. on August 27, 2009
Good answer Peter.

To Andre:
Cut your heap size in half. Make sure GCC isn't trying to allocate another block of heap. Make sure you are not linking in clib or any of the stdlibs.
You may have to play with task stack sizes - and cut down to the bare-minimum on tasks just to get it to work.

Having WDT as the timer doesn't really buy you much.


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

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo, Nuvoton Cortex-M23 demo & STM32H745 dual core (AMP) demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner