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


Cannot Step Through Source Code

I have this error appear when I start a debugging session:

No source available for "main() at 0x800d520"

I cannot step through source code, but I can step through assembly code.

This is an STM32CubeMX Version 4.14 generated project. When the project was imported into Eclipse the “Copy projects into workspace” checkbox was unchecked. That the files are linked to is confirmed in the Microsoft WIndows Explorer where I see the source code related directories are empty, and I see mostly files with the extension .o in the Debug directory.

STM32CubeMX did generate code in the System Workbench workspace, just I set it up to do.

To be sure that nothing go accidentally corrupted I deleted the Eclipse project files, regenerated the code in STM32CubeMX, and imported the project into Eclipse exactly as instructed in:
http://www.openstm32.org/Importing+a+STCubeMX+generated+projectQuestion
The debugger was still not able to find the source code.

What do I need to do to make the source code available to be stepped through?

This problem is solved. This is what I did to solve it:

With the project selected in the Project Explorer panel I did these settings:

Project => Properties => C/C++ Build (Tree) => Settings => Tool Settings (Tab) => MCU GCC Compiler (Tree) => Optimization
In the “Optimization Level” list box field I selected “Optimize for Debug (-Og)

Project => Properties => C/C++ Build (Tree) => Settings => Tool Settings (Tab) => MCU GCC Compiler (Tree) => Debugging
In the “Debug Level” list box field I selected “Maximum (-g3)”


 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs