hello everyone,I have a problem of K64 with KSDK2.0 on freertos,when I Create a project of K64 with KSDK2.0 on freertos in kds3.0,the total of heap usage graph of freertos is only 25kb,how can I expand it?
Modify configTOTAL_HEAP_SIZE in FreeRTOSConfig.h
I hope this helps,
Erich
thank you for your answer ,but when I change it a little big like now, like about
"#define configTOTAL_HEAP_SIZE ((size_t)(26 * 1024))"
it will prompt an error:
c:/program files (x86)/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: GroundControl.elf section `.bss' will not fit in region `m_data'
c:/program files (x86)/gnu tools arm embedded/4.9 2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `m_data' overflowed by 852 bytes
I used it in kds3.0,is there need to change any Settings for it?
Hi wang,
I have meet same problem early. because freertos define it's heap as a normal variable. you should make some change like follow,
1. in FreeRTOSConfig.h,
#define configAPPLICATION_ALLOCATED_HEAP 1
2. in any .c file, may be in main.c
unsigned char __attribute__((section (".heap"))) ucHeap[configTOTAL_HEAP_SIZE];
3. in .ld file add a .heap define inside SECTIONS
.heap :
{
. = ALIGN(8);
__end__ = .;
PROVIDE(end = .);
__HeapBase = .;
. += HEAP_SIZE;
__HeapLimit = .;
__heap_limit = .; /* Add for _sbrk */
} > m_data_2
hope this help.
Cai.
thank you very much for your help,it's work now~~~~