IDE generates a wrong default project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-08 7:05 AM
I'm using the P-NUCLEO-WB55 development board, and I'm using the IDE to auto-generate the project/code.
However, the default linker script is mis-configured.
indeed, the _estack variable is set to 0x2003FFFF instead of 0x20030000.
The first address is wrong for 2 reasons:
- It's odd. It should be 0x20040000;
- The range [0x20030000, 0x2003FFFF] is accessible only by the 2nd core (M0) and not by the 1st one (M4).
For these reasons, the default project will trigger a Hardware Fault when compiled and executed.
- Labels:
-
STM32CubeIDE
-
STM32CubeMX
-
STM32WB series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-14 9:20 PM
To add to the answer above, I had to change the two following files in in the projects top level directory:
STM32WB55RGVX_FLASH.ld
STM32WB55RGVX_RAM.ld
Change the estack= line in both files to read:
estack = 0x20030000; /* end of "RAM" Ram type memory */
The project now runs, but "Generate" Code overwrites these files. I'll keep digging on how to make the change permanent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-14 9:58 PM
Thank you!!!!! I missed the second edit in the RAM id file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-14 10:01 PM
About the linker script overwrite, go to the project build settings, and change the linker script "managed" settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-14 10:06 PM
Further details: that SRAM region is accessible only by CPU2 (M0), unless you change the "securable area" settings.
However, out of the box, that area is not accessible.
This holds true for the flash area as well, but I don't remember the protected addresses.
Again, protection can be disabled (or addresses can be changed), but by default it is not.
​
Nevertheless, even if all memory is accessible by any core, the odd SRAM address is still... odd (wrong).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-30 7:22 AM
After endless hours of searching I found this post. Thanks a lot, now it works! You made my day :)
