Using FreeRTOS heap_5.c in S32 IDE 2.2

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

Using FreeRTOS heap_5.c in S32 IDE 2.2

576 Views
maximillion
Contributor II

Hi,

I am using S32K142 and S32 Design Studio 2.2 so https://community.nxp.com/t5/MCUXpresso-SDK-Knowledge-Base/Using-FreeRTOS-heap-5-in-MCUXpresso-SDK/t... according to this link I want to implement heap_5.c. I attached my code snippet below. When I run the code, tashscheduler did not start an error occured. I am not sure static __attribute__ ((used,section(".m_data_2"))) uint8_t ucHeap[SRAM_UPPER_SIZE]; m_data_2 is correct?

Ekran görüntüsü 2023-07-24 092347.png

Tags (1)
0 Kudos
Reply
3 Replies

482 Views
NamLee
NXP Employee
NXP Employee

Hi maximillion,

I saw the memory section .m_data_2 only for SRAM_U, shall we expand it to SRAM_L address to have enough required memory?

m_data_2.png

I checked linker_flash in Platform of K148 but it seems different, did you check those files?

Thank you,

Nam.

0 Kudos
Reply

540 Views
NamLee
NXP Employee
NXP Employee

Hi maximillion,

Sorry for this lately reply.

Firstly, i checked the SRAM of S32K142, i think your address of SRAM_LOWER_START_ADDRESS is matching with size of LOWER, so the Heap region will continously from LOWER to UPPER. So i don't think the address of your SRAM in any problems.

S32K142_SRAM.png

Secondly, about m_data_2 i can't find it in linker file of S32k142, did you using GCC or IAR compiler?

Can you share your using linker file?

I will as OS team about this issue for more investigation, so it's really helpful if you can share to me the error log and details of package that you're using now.

Please let me know if you have further information.

Thank you,

Nam.

0 Kudos
Reply

522 Views
maximillion
Contributor II

Hi @NamLee,

I added Linker Files used in the project.

Actually I am currently using heap_4.c now but when I run the code it throws an error in the vTaskStartScheduler function. According to the information from you, I will share the error codes when I try heap_5.c again.

0 Kudos
Reply