Quality RTOS & Embedded Software

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


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 ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 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:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

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

Silicon Labs low power RTOS 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