2024-12-17 10:04 AM - edited 2024-12-17 10:11 AM
Folks,
I’m grappling with what looks like a low level bug** , and the root cause could be running out of stack space. At the same time, I’ve got plenty of unused RAM, so I’d like to increase the stack size as a diagnostic measure, and see if the bug goes away*** . In the CubeIDE user guide (UM2906) there’s a mention that heap and stack size are set in the LinkerScript.ld (comments in the code on p. 69).
If I want to change the _Min_Stack_Size , should I edit the LinkerScript.ld file directly?
Or is the LinkerScript.ld file (re)generated by the IDE, and I should make the change through the IDE GUI?
If so then where are these settings?
I couldn't figure it out from the UM2906. I saw hints that CubeMX had GUI fields settings for stack and heap.
** Can post the details of the bug if anyone’s interested.
*** Don’t know if that’s the right long-term solution. I could also try to declare fewer string buffers on the stack.
Best regards,
- Nick
2024-12-17 10:11 AM - edited 2024-12-17 10:13 AM
I understand the dilemma, the .LD impacts what the Linker actually builds, but ST for years has nailed the GNU/GCC stack to Top-of-Ram directly via _estack
And then used SP to provide a heap ceiling for _sbrk, ie from end-of-statics to base-of-stack
2024-12-19 1:02 AM - edited 2024-12-20 12:11 AM
Hello @Nick Alexeev
In order to change the _Min_Stack_Size and _Min_Heap_Size using GUI fields.
just go to Project manager -->project
Unfortunately, for the meantime, there is a limitation in this option that has been tracked with internal ticket 197963.
THX
Ghofrane
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.
2024-12-19 2:34 AM
That doesn't answer the more general question about editing the .ld file.
How should that be managed - especially for things that are not provided in the MX GUI ?
2024-12-19 8:39 AM
An IDE bug is a serious matter. Where are the details of the IDE bug published? Post a link, please.