FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2009 Threads] FreeRTOS on MSP430F2274Posted 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,
Andre.
RE: FreeRTOS on MSP430F2274Posted 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. Peter
RE: FreeRTOS on MSP430F2274Posted 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.
Regards, john
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|