Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


CUBE error for STM32F476RG causes these processors to not work

There is a mistake with the STM32L476R processor in CUBE.

This affects the Nucleo-L476RG board.

The size of the memory it wrong, as a result CUBE will place the stack in memory that does not exist. The result being that you can’t run or debug the program. In the debugger you are always in an infinite loop as soon as a subroutine call is made.

To fix it:
To get CUBE working correctly with the STM32L476RG:

Edit the file “families.xml” (C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\families.xml)

Line 20608, in the entry:

Mcu Name=”STM32L476R(C-E-G)Tx” PackageName=”LQFP64” RefName=”STM32L476RGTx” RPN=”STM32L476RG”

The field:

Ram

Was 128, change it to 96.

-Matt

Tunisia

Hi Matthew,

Thank You for reporting this issue, the issue is reported to MX dev team

But the modification that you have done will not fix the issue.

In fact this MCU has two SRAM memories:

  1. SRAM1 (96KB = 0x18000) starts from 0x20000000
  2. SRAM2 (32KB = 0x08000) (with parity check) starts from 0x10000000


The root cause of this runtime crash is as you have said that the stack is misplaced:
to fix this issue you need to modify the _estack and RAM size in you linker :

  1. _estack should be 0x18000 instead of 0x20000
  2. RAM size should be 96K


Regards,
Tarek

If you modify the file I mentioned in the CUBE, it will modify the file you mentioned (the linker file).

My initial move was to fix the linker file, but every time I used CUBE it would reset it.

By modifying the families.xml file CUBE will product the correct linker file.

-Matt


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs