cancel
Showing results for 
Search instead for 
Did you mean: 

IDE generates a wrong default project

pierpaolo
Associate II

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:

  1. It's odd. It should be 0x20040000;
  2. 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.

5 REPLIES 5
BoardSurfer
Associate II

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.

Thank you!!!!! I missed the second edit in the RAM id file.

About the linker script overwrite, go to the project build settings, and change the linker script "managed" settings.

pierpaolo
Associate II

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).

After endless hours of searching I found this post. Thanks a lot, now it works! You made my day 🙂