How to use heap_useNewlib ?

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

How to use heap_useNewlib ?

4,493 次查看
jbrud
Contributor III

Hi,

previously I updated the SDK to Version 2.7 and I noticed the new FreeRTOS heap "heap_useNewlib" implementation. After reading Dave Nadlers blog post(Thanks for that !) and as I use Newlib, I would like to switch. But I wondering how it is meant to use it with MCUXpressoSDK. My first idea was drop in heap_useNewlib.c file and add new number in FreeRTOSConfig.h for example configFRTOS_MEMORY_SCHEME 6.

But this conflicts with NXP's FreeRTOS extension freertos_tasks_c_additions.h which checks configFRTOS_MEMORY_SCHEME > 5  at line 53.  It's clear I could just modify the SDK sources to get it working but that is what I want to avoid. Any advises ?

Additionally there is a uppercase lowercase mistake in heap_useNewlib.c. It tries to inlcude #include "freeRTOS.h"  it should be #include "FreeRTOS.h".

Thanks !

标记 (3)
0 项奖励
回复
8 回复数

4,228 次查看
davenadler
Senior Contributor I

j.bruder‌ - Typo fixed and a few other updates on github (you'd need to merge NXP's LD symbols.
configFRTOS_MEMORY_SCHEME does not come into play; do not define it.
Hope that helps,
Best Regards, Dave

0 项奖励
回复

4,228 次查看
np
Contributor IV

Hi Johannes,

The heap_newlib thing has its roots in Dave Nadler's page here: newlib and FreeRTOS  I'd recommend reading this to understand why using NXP's heap_newlib() is probably a good idea.

There's a comment here (from July 2020) that may answer your issue: https://mcuoneclipse.com/2020/05/31/tutorial-adding-freertos-to-where-there-is-no-freertos/#comment-...

Cheers, Nick

0 项奖励
回复

4,228 次查看
jbrud
Contributor III

Any news here ?

0 项奖励
回复

4,228 次查看
danielchen
NXP TechSupport
NXP TechSupport

From what I know, this issue will be fixed  in version sdk 2.9, since this fix will be involved with IDE team and FreeRTOS team.

Regards

Daniel

0 项奖励
回复

4,227 次查看
jbrud
Contributor III

@NXP Any feedback here ?

0 项奖励
回复

4,228 次查看
danielchen
NXP TechSupport
NXP TechSupport

Thanks Johannes , there seems an issue here. Let me consult with develop and let you know the results.

Regards

Daniel

0 项奖励
回复

4,228 次查看
Pavel
NXP Employee
NXP Employee

It looks like your SDK is not SDK for PowerPC or Layerscape processors.

 

NXP offers Yocto Linux BSP SDK 2.7 for PowerPC or Layerscape processors.

https://source.codeaurora.org/external/qoriq/qoriq-components/yocto-sdk/about/

Have a great day,
Pavel Chubakov

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

4,228 次查看
jbrud
Contributor III

I'm working on a MK64F12, which is a ARM Cortex-M4 and the SDK is generated by NXP's MCUXpresso SDK Builder.

 

What do you mean ?

0 项奖励
回复