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


Hardware fault, stuck in infinite loop at Default_Handler before reaching main() on STM32F3348-DISCO

I’m using a Discovery board for the STM32F334, called the STM32F3348-DISCOQuestion which has a STM32F334c8t6. Using CubeMX to generate a project, the project for EWARM runs ok but the project for SW4STM32 (OpenStm32) will fault before main() is reached. It faults at the first push to the stack. By default the stack is located at 0x20004000 as determined by the STM32F334C8Tx_FLASH.ld file generated by CubeMX for an SW4STM32 project. If I change this .ld file for a 12k rather than 16kB RAM size (i.e., locate the stack to 0x20003000), the program runs without faulting. The SRAM size specs (http://www.st.com/web/en/resource/technical/document/datasheet/DM00097745.pdfQuestion) are a little mis-leading - there is 16k of RAM but it’s not contiguous. The 12k portion is at 0x20000000 and the 4k ‘CCM RAM’ is at 0x10000000.

The work-around I found is to modify the .ld file with 2 changes:

  • change RAM size from 16k to 12k and,
  • more importantly, change the stack location from 0x20004000 to 0x20003000.

CubeMX will over-write these changes the next time the project is regenerated, so watch for that. Also, the makefile generated by CubeMX for OpenStm32 will not automatically re-build if the .ld file is changed so it’ll be necessary to force a rebuild (e.g. ‘clean’, or touch a .c file etc).

This was reported as a CubeMX bug on st.com hereQuestion.

 

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