Quality RTOS & Embedded Software

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


Loading

FreeRTOS takes up all ROM and Program memory

Posted by *anonymous on January 21, 2009

Hello all,

I've been messing around with FreeRTOS for the PIC32MX460512L and have successfully managed to create a project from scratch and create two tasks which blink some LEDs. However, checking the Memory Usage Gauge in MPLAB shows that my very simple system is taking up 131471 out of 134140 words of ROM and 31404 out of 32768 words of RAM!!

I only found out about this when I tried to incorporate FreeRTOS into an existing PIC32 project. Without FreeRTOS, this project consumes 35160 words of ROM and 8460 words of RAM. However, once I add the FreeRTOS files in, the linker brings up these error messages:

Executing: "C:Program FilesMicrochipMPLAB C32 Suitebinpic32-gcc.exe" -mprocessor=32MX360F512L "Main.o" "list.o" "queue.o" "tasks.o" "port.o" "port_asm.o" "heap_2.o" -o"BD176-01.elf" -Wl,-L"C:Program FilesMicrochipMPLAB C32lib",-L"C:Program FilesMicrochipMPLAB C32pic32mxlib",--defsym=__MPLAB_BUILD=1,-Map="BD176-01.map" C:Program FilesMicrochipMPLAB C32 Suitepic32mxbinld.exe: region kseg1_data_mem is full (BD176-01.elf section .bss) C:Program FilesMicrochipMPLAB C32 Suitepic32mxbinld.exe: address 0xa00091b0 of BD176-01.elf section .heap is not within region kseg1_data_mem C:Program FilesMicrochipMPLAB C32 Suitepic32mxbinld.exe: address 0xa00095b0 of BD176-01.elf section .stack is not within region kseg1_data_mem C:Program FilesMicrochipMPLAB C32 Suitepic32mxbinld.exe: address 0xa0009800 of BD176-01.elf section .ramfunc is not within region kseg1_data_mem Link step failed.

Any ideas?

--Amr


FreeRTOS takes up all ROM and Program memory

Posted by davedoors on January 21, 2009

I have seem FreeRTOS run with file system, TCP/IP stack and other software all at once so ROM should not be an issue. I suggest you look at the map file to see where it is going. Probably to the GCC libraries. Are you using sprintf() or something similar? There are lower cost versions in the download.

Regarding RAM. What you are seeing is the heap RAM, nearly all of which will be free. This is just a big array set by configTOTAL_HEAP_SIZE.


FreeRTOS takes up all ROM and Program memory

Posted by *anonymous on January 21, 2009

Thanks for your reply Dave,

The heap was causing the problem - the default heap size was set to 28000 but my program was already using 8460 words of ram in variables and the two couldn't fit into the 32768 words of on chip ram. Changing the heap to 20000 fixed the problem and the project now compiles just fine.

Thanks for your help!

--Amr


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


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

Latest News

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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