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




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