cancel
Showing results for 
Search instead for 
Did you mean: 

Azure ThreadX newlib _sbrk

ESawa.1
Associate III

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

4 REPLIES 4
ESawa.1
Associate III

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
Associate III

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

Hello @ESawa.1​ ,

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

Thanks for your contribution.

BeST Regards,

Walid

ESawa.1
Associate III

Hey together,

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

Best regards,

Eric