Skip to main content
pierpaolo
Associate II
May 8, 2019
Question

IDE generates a wrong default project

  • May 8, 2019
  • 2 replies
  • 1681 views

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.

This topic has been closed for replies.

2 replies

BoardSurfer
Associate
May 15, 2019

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.

pcbwiz
Associate II
May 15, 2019

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

pierpaolo
pierpaoloAuthor
Associate II
May 15, 2019

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