Skip to main content
ESawa.1
Associate III
August 10, 2021
Question

Azure ThreadX newlib _sbrk

  • August 10, 2021
  • 3 replies
  • 1493 views

Hey together,

I'm switching from freeRTOS to Azure ThreadX at the moment. I know that there are problems when using newlib functions like printf with %f and so on with freeRTOS. As explained in the following link this has to do with the issue that the _sbrk implementation of ST is not reentrant. This was solved by the file of Dave Nadler:

https://nadler.com/embedded/newlibAndFreeRTOS.html

Is there anyone who has a similar working implementation for ThreadX instead of freeRTOS?

Best regards,

Eric

This topic has been closed for replies.

3 replies

ESawa.1
ESawa.1Author
Associate III
August 16, 2021

Hey together,

did anyone faced a similar problem? Wouldn't it be enough to provide an extra semaphore for the __sbrk function, get it on the entry of the function and put it on leave? I would just have to track if I am inside an ISR or not. If so I cant wait and have to leave direct, if not I could wait until the semphore gets released.

Best regards,

Eric

ESawa.1
ESawa.1Author
Associate III
August 26, 2021

Hey together,

@Walid ZRELLI​ could you please raise this topic internally? I think it is very important if someone wants to use Azure RTOS. with functions like printf %f.

Best regards,

Eric

Walid ZRELLI
Visitor II
August 27, 2021

Hello @ESawa.1​ ,

Your issue has been raised internally. I will keep you informed.

Thanks for your contribution.

BeST Regards,

Walid

ESawa.1
ESawa.1Author
Associate III
October 28, 2021

Hey together,

@Walid ZRELLI​ are there any news regarding my question?

Best regards,

Eric