Skip to main content
Visitor II
July 12, 2023
Question

Error after calling printf

  • July 12, 2023
  • 13 replies
  • 9732 views

Hello everyone, 

I'm currently working with the STM32CubeIDE and I'm encountering an error after the new Update 1.13.1. 

After using the printf function the following function in the newlib_lock_glue.c  throws me into the Error_Handler in the main.c, after checking the lock for a NULL value.

 

 

__retarget_lock_acquire_recursive(_LOCK_T lock) 
{
 STM32_LOCK_BLOCK_IF_NULL_ARGUMENT(lock); //This line results in the Error_Handler
 stm32_lock_acquire(STM32_LOCK_PARAMETER(lock));
}

 


This behaviour just started after the version upgrade from 1.12.1 to 1.13.1 of the IDE.
I tried to change the MCU Toolchain settings to the older GNU Tools version (10.3.-2021.10)

now printf works just fine, but if I use the new GNU Tools version (11.3.rel1), which is

the new default setting of the IDE im encountering said Error.


How can this be avoided in the new version of the GNU Tools?


Maybe someone can help me with this issue.
Please inform me if you need further information.

Thanks in advance

    This topic has been closed for replies.

    13 replies

    Super User
    August 17, 2023

    Does anyone have a test that demonstrates correct working (or failing) of __retarget_lock_acquire_recursive and all this newlib locking,  with FreeRTOS?

    Graduate II
    August 21, 2023

    Still broken in 1.13.1, reverting my development environment again. (Thank you Apple, Time Machine is a good thing).

    Explorer
    September 25, 2023

    In the recent version of Cube IDE 1.13.2 the issue seems to be resolved for good.