NOTE:This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the
FreeRTOS forums.
FreeRTOS Support Archive
The FreeRTOS support forum can be used for active support both from Amazon Web Services and the community. In return for using our software for free, we request you play fair and do your bit to help others! Sign up for an account and 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. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.
[FreeRTOS Home]
[Live FreeRTOS Forum]
[FAQ]
[Archive Top]
[October 2009 Threads]
How to manage memory on PIC24.
Posted by
echortos on October 7, 2009
Hi,
I start to use freeRTOS. But i have some problem. when i announce more variable,Compiler is build failed.
it show message
"..\..Sourcecroutine.o: Link Error: Could not allocate section .ndata, size = 2 bytes, attributes = data near
Link Error: Could not allocate data memory
Release build of project `C:FreeRTOSDemoPIC24_MPLAB_EditRTOSDemo_PIC24.mcp’
failed.
Wed Oct 07 15:04:38 2009
BUILD FAILED
"
please advice me.
How to manage memory on PIC24.
Posted by
petermeier on October 7, 2009
Hej,
as the linker said -> Could not allocate data in section -> NDATA.
You are running out of RAM. This ram is being static declared in your source code. e.g.
unsigned char buffer;
This statement will allocate 512 bytes of memory.
So you need to reduce the memory usage of freeRTOS. See in FreeRTOSconfig.h for the parameters.
Also have a look in MPLAB at View -> Memory Usage Gauge to have an overview of you consumed ram.
Kind regards,
Peter
How to manage memory on PIC24.
Posted by
richardbarry on October 7, 2009
Look at the configTOTAL_HEAP_SIZE parameter in FreeRTOSConfig.h. It allocates a huge array that is used as the heap. Lowing it will reduce the RAM consumption.
Regards.
How to manage memory on PIC24.
Posted by
echortos on October 8, 2009
Thank You.
First i look to Memory Usage Gauge,When i do not add variable. it show that have free memory about 2042 byte.
But When i add more variable,i build Failed.
Second i try to reduce configTOTAL_HEAP_SIZE from 5120 to 4864 byte. but it do not work too.
Best regards.
EchoRtos
How to manage memory on PIC24.
Posted by
richard_damon on October 8, 2009
Note that it said you were out of "near" memory. Pic24s have if I remember right 2k of "near" ram and the rest is "far" ram. You may need to change your memory model or explicitly declare some buffer to be put into "far" memory.
How to manage memory on PIC24.
Posted by
echortos on October 8, 2009
Thank you very much for your kindy.
it work, when i announce with far attribute.
Other Question. When i announce configTOTALHEAPSIZE 4864 byte, But memory useage gauge is show that it use data memory same as announce 5120 byte. Why?
Best regards.
EchoRtos
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.