Undefined reference to `pvPortMalloc' when build MCUXpresso project

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Undefined reference to `pvPortMalloc' when build MCUXpresso project

2,277 次查看
TiDiChi
Contributor I

I have just created a mcuxpresso project. this used freertos component from adding operating systerm in SDK wizard.

When i run file main without using xTaskCreate function, build successed. then i add a task, build failed.

My IDE uses sdk version 2.14.0 and manifest vesion 3.13.0.

What do i need to fix this bug ?

0 项奖励
回复
3 回复数

2,208 次查看
TiDiChi
Contributor I

Hi @Harvey021

This error exists because heap file is not in MemMang folder (FreeRTOS component).

I solved my issuse by downgrading SDK version from 2.14 down 2.13 and manifest version from 3.13.0 down to 3.10.0

 

Best regards

TiDiChi

 

0 项奖励
回复

2,248 次查看
Harvey021
NXP TechSupport
NXP TechSupport

Hi @TiDiChi 

Can you share the build error?

 

Best regards

Harvey

0 项奖励
回复

1,801 次查看
stefanct
Contributor IV

The problem, as @TiDiChi noted, is that the MemMang does not contain any files where the different heap implementations of FreeRTOS should be visible, i.e., the contents of rtos/freertos/freertos-kernel/portable/MemMang. However, only one of the implementations is supposed to be compiled and linked in eventually, depending on the heap type selected via `configFRTOS_MEMORY_SCHEME` in `FreeRTOSConfig.h` because they all implement the same functions (e.g., `pvPortMalloc`).
I think it should be rather easy to reproduce if you link the SDK sources instead of copying them. I have not tested it with the latter. At least I ran into this with 11.9.0 and SDK 2.15.0 (from git).

Once the correct heap*.c is added to the project (manually), it compiles fine.

The question is if MCUX is supposed to support heaps at all and if so how to choose the correct version?

0 项奖励
回复