2019-08-06 01:20 PM
Typical user symptom: sprintf with floating point doesn't work or crashes.
I've provided a complete explanation and required fixes here:
http://www.nadler.com/embedded/newlibAndFreeRTOS.html
To illustrate the crash in minimal test application, I've provided this example project ready to run for a Nucleo 429:
http://www.nadler.com/embedded/20190804_STM_malloc-Kaboom_demo.zip
Set breakpoints at:
sysmem.c: on the line with errno = ENOMEM;
main.c, in default task, on line kaboomP1 = malloc(16);
Enjoy the fireworks.
Comments on (one of) the problems are provided in sysmem.c
The fixes are explained in the web page linked above, and illustrated in this corrected minimal project:
http://www.nadler.com/embedded/20191115_malloc-Kaboom_fixed.zip
It would be great if STM could:
- confirm they understand this set of bugs
- fix them in a prompt release of ST32cubeIDE/CubeMX/etc.
OK, we can dream, right?
Thanks,
Best Regards, Dave
Solved! Go to Solution.
2019-12-20 02:29 AM
Any news about this problem ?
2019-12-20 06:22 AM
Latest update is that it won't be in the upcoming version of CubeIDE. It's still prioritized highly and it's targeted release is the release after the upcoming one.
2019-12-20 07:45 AM
What's the reason behind this? As someone who just found this thread today after spending hours tracking down the hard-faulting code that *you* provided in CubeIDE, this seems like crazy talk. Why this isn't pants-on-fire high priority is beyond me...
2019-12-20 01:46 PM
Welcome to the **** show. We can look forward to a fix sometime in Q4 2020 I’m guessing based on past experiences.
2019-12-23 12:06 AM
As far as I know it's because it's a cross-team solution which slows things down as well as priority issues. Even if it is prioritized highly, much due to me pressing the dev team because of this thread, other things are prioritized higher still.
2020-01-06 02:56 PM
@Community member - You're being very optimistic...
2020-01-07 12:06 PM
Haha they must love the smack we give them, I just wish it wasn’t the truth. For all I love the processors themselves, everything else is just terrible. I guess they have just embraced it
2020-02-08 08:45 PM
Am I wrong or is this fixed in STM32CubeMX 5.5.0 for STM32CubeIDE generated projects? Calling printf() with the "#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)" macro seems to work before the RTOS scheduler starts and from within a RTOS task.
I ask because I want to implement the same fix to System Workbench projects since these are still broken when generated by CubeMX.
If so, what is the fix for STM32CubeIDE projects so I can port it?
Thanks!
2020-02-09 08:25 AM
@DerekR - Last I checked this was still not fixed, did you really check???
Specifically, did you read the web page carefully, and verify in your project:
@Markus GIRDLAND - Any update as to when this will be fixed, in both CubeMX and all FreeRTOS examples from ST?
2020-02-09 02:36 PM
Hey Dave!
I have read quite a few of your posts on this forum as well as the FreeRTOS forums and some others. I appreciate your dedication and support to the community and those such as myself.
In the current version of STM32CubeMX (v5.5.0), it generates a STM32CubeIDE project without the following:
I did not test the following:
My observation of the current STM32CubeIDE generated project:
I am currently using:
I still plan to develop with System Workbench for STM32 since it seems more stable and user friendly at the moment.
Few questions:
Thanks again!
Derek