KV10 with freeRTOS

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

KV10 with freeRTOS

Jump to solution
945 Views
borjaserra
Contributor I

Good morning,

 

I have the FRDM-KV10Z and I just started a new SDK2.0 project (including all drivers) with FreeRTOS. It comes with an example with a simple task publishing "Hello world" in the serial interface. When I try to build the project I get an error such as:

 

file.elf section `.bss' will not fit in region `m_data'

region m_data overflowed with stack and heap

region `m_data' overflowed by 3440 bytes

 

I have been checking and found that this could be an SRAM size issue. The KV10 has 8kB memory so I am afraid the MCU hasn't memory enough to run with FreeRTOS. I found this explanation in this website with another MCU from NXP:

 

FreeRTOS Heap with Segmented Kinetis K SRAM | MCU on Eclipse 

in this case the KV10 doesnt have 2 partitions in the SRAM as far as I saw on the .Id file

 

 

However I have also been checking on the FreeRTOS website but they don't look like using that much SRAM.

 

FreeRTOS FAQ relating to FreeRTOS memory management and usage. FreeRTOS is an Open Source RTOS Kerne... 

 

My question would be if my assumption is right. In case I want to run with FreeRTOS, do I need a MCU with bigger SRAM size? Probably upgrading to KV3?

 

Thanks

 

Borja

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
821 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Although I do not know the required SRAM size of the freeRtos exactly,  pls refer to the line

#define configTOTAL_HEAP_SIZE ((size_t)(10 * 1024)) in FreeRTOSConfig.h

The heap size is defined as 10K Bytes, that is why there is SRAM size limit error if your physical SRAM has only 8K bytes, if you adjust the above parameter for example, redefine the parameter as:

#define configTOTAL_HEAP_SIZE ((size_t)(4 * 1024))

can you pass the compiling?

Hope it can help you

BR

Xiangjun Rong

View solution in original post

0 Kudos
Reply
2 Replies
821 Views
borjaserra
Contributor I

Thank you. I didn't see that definition in the header file before. As you said I changed it and it worked :smileyhappy:

0 Kudos
Reply
822 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Although I do not know the required SRAM size of the freeRtos exactly,  pls refer to the line

#define configTOTAL_HEAP_SIZE ((size_t)(10 * 1024)) in FreeRTOSConfig.h

The heap size is defined as 10K Bytes, that is why there is SRAM size limit error if your physical SRAM has only 8K bytes, if you adjust the above parameter for example, redefine the parameter as:

#define configTOTAL_HEAP_SIZE ((size_t)(4 * 1024))

can you pass the compiling?

Hope it can help you

BR

Xiangjun Rong

0 Kudos
Reply