[S32K3X] About newlib

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

[S32K3X] About newlib

389 次查看
Changhawn
Contributor III

Dear

About LWIP Network stack
When loading the lwip stack, an assertion occurs in rand() as shown in the log below.

assertion "REENT malloc succeeded" failed: file "../../../../../../../../src_newlib/newlib/libc/stdlib/rand.c", line 78

It operates normally if the related rand() is removed or newlib is set to no I/O like picture

newlib_selection.png

We are in an environment that uses FreeRTOS + LWIP + MbedTLS(HSE),

Please guide me on which newlib to use and how to correct the above problem to accurately resolve it.

0 项奖励
回复
3 回复数

265 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

did you tried newlib instead newlib_nano? Newlib_nano has some limitations. 

0 项奖励
回复

328 次查看
Changhawn
Contributor III

Refer to Below link, did workaround.

newlib and FreeRTOS (nadler.com)

0 项奖励
回复

363 次查看
Changhawn
Contributor III

Additional reproduction comment.

A1. make sample project for RTD testing.

A2. change as newlib semihost or newlib nano semihost in library support

A3. add rand() in main function.

A4. run and test

 

or 

B1. make FreeRTOS + LWIP + MbedTLS(HSE) project

B2. do as A2 , A3, A4

 

compare Between A & B,  check if working is ok?

0 项奖励
回复