the problem of K64 with KSDK2.0 on freertos in kds3.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

the problem of K64 with KSDK2.0 on freertos in kds3.0

1,120 Views
wyflsxy
Contributor II

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?

Labels (1)
4 Replies

924 Views
BlackNight
NXP Employee
NXP Employee

Modify configTOTAL_HEAP_SIZE in FreeRTOSConfig.h

I hope this helps,

Erich

0 Kudos
Reply

924 Views
wyflsxy
Contributor II

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?

0 Kudos
Reply

924 Views
phantomgz
Contributor III

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.

924 Views
wyflsxy
Contributor II

thank you very much for your help,it's work now~~~~

0 Kudos
Reply