cancel
Showing results for 
Search instead for 
Did you mean: 

_malloc_r trap

MFäh.1
Associate II

Hi

I suddenly have a strange trap, even if i go back to a working version in Git. 

MFh1_0-1708792532241.png

Any Ideas?

 

Thanks and cheers

 

7 REPLIES 7
STTwo-32
ST Employee

Hello @MFäh.1 

This error message means that the debugger is trying to access the source code for the _malloc_r() function but cannot find i. I think you should check your debug configuration settings (Optimization Level, and Debug Level). For that, I advise you to check this post (not updated but it Can help) and this video. it may help you. Also, have a look at this article in the debug section: How to make sure the STM32 starts properly in our design?

 

Best Regards.

 

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

MFäh.1
Associate II

Thank you very much.

It helped somewhat: it no longer pops up at this location, but rather later. Is there a way to return to the previous setup (reinstall or something similar)?

 

Thanks

Happy to know that work for you. I don't think there is steps to come back to the previous setup. You can ask for any new problem on a new post to give it more visibility so you can get more replies.

Best Regards.

STTwo-32 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

It worked partially as the same problem still occurs at another location in the code... so it is not really 'the solution' yet. Any other ideas? What i did was:

 

Project => Properties => C/C++ Build (Tree) => Settings => Tool Settings (Tab) => MCU GCC Compiler (Tree) => Optimization

In the “Optimization Level�? list box field I selected “Optimize for Debug (-Og)"

Project => Properties => C/C++ Build (Tree) => Settings => Tool Settings (Tab) => MCU GCC Compiler (Tree) => Debugging

In the “Debug Level�? list box field I selected “Maximum (-g3)�?

 

Cheers

MFäh.1
Associate II

... and do you have any insight into where this issue might have originated from suddenly?

TDK
Guru

Look in the breakpoints tab for any breakpoint or watchpoint you've forgotten about.

If you feel a post has answered your question, please click "Accept as Solution".
MFäh.1
Associate II

I reinstalled STMCubeIDE and it is working again. The breakpoints could have been an idea so.

 

Thank you all