Undefined reference to `pvPortMalloc' when build MCUXpresso project

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Undefined reference to `pvPortMalloc' when build MCUXpresso project

2,273件の閲覧回数
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,204件の閲覧回数
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,244件の閲覧回数
Harvey021
NXP TechSupport
NXP TechSupport

Hi @TiDiChi 

Can you share the build error?

 

Best regards

Harvey

0 件の賞賛
返信

1,797件の閲覧回数
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 件の賞賛
返信