[S32K3X] About newlib

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

[S32K3X] About newlib

386 Views
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 Kudos
Reply
3 Replies

262 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

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

0 Kudos
Reply

325 Views
Changhawn
Contributor III

Refer to Below link, did workaround.

newlib and FreeRTOS (nadler.com)

0 Kudos
Reply

360 Views
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 Kudos
Reply