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


Debugging with ST-Link V2

I have created a SW4STM32 project using STM32CubeMX. I then imported the project into System Workbench. The project builds.

I then created a new custom board debug script (target-actuator.cfg) using means 5.3 as discussed hereQuestion; i.e. Get a custom board debug script created when creating a project using your custom board (may be a no-firmware project with an empty main program). Copy the System Workbench-generated debug script in your project and browse to it. This is usually convenient if you define your own board, create a custom board in a System Workbench-generated test project and want to reuse it in your STM32CubeMX-generated project (see Create a custom board).

I also confirmed that the project target properties were correct; i.e.
Series: STM32F4
Mcu: STM32F405RGTx
Board: target-actuator

I then created a debug configuration as discussed hereQuestion. When I selected “Use local script”, and clicked on Debug, I got the error:

‘Launching target-actuator Debug’ has encountered a problem.
OpenOCD Script not found (or not support yet): target-actuator.cfg
(/home/gateway/eclipse/plugins/fr.ac6.mcu.debug_1.11.0.201610101240/resources/openocd/scripts/st_board)

I read this to mean, that it has ignored my selection of “Use local script” and instead looked in the plugins folder. I copied the script into the plugins folder, and the error has gone away.

My first question is, what further needs to be done so I can use a script local to my project?

When I debug my application, it doesn’t immediatly halt on main(). There is a single thread (as expected) which never halts. In order to get it to halt at main(), I need to do the following (as discussed hereQuestion).
Step1: press “Suspend”: button to pause my program.
Step2: Go to “Console Window”, type “monitor reset halt”.
Step3: Press “F8” (Resume).

My second question is, is this necessary? Or have I missed something?

Regards, Matt.

Hello,

Did you update SW4STM32 software ?
Menu Help => Check For updates

Then, something is not clear, you wrote you created “example-target.cfg” file but in the openocd error, the name is “target-actuator.cfg”.
So, i am not sure you selected the right file in your debug launch session.

You should not have to type in console window.

Are you working on Windows ? or Linux or Mac os ?

Did you check the remark on optimisations on another post ?

Rgds,
Laurent

Another thing: what debug config did you choose ?
You should choose “Ac6 STM32 Debugging” and not “GDB Hardware Debugging”.

Rgds,
Laurent

Hi Laurent.
I have checked for updates. I am up-to-date.
Sorry for the confusion, I was trying to avoid confusion by NOT using my project name. I have updated the post to only say “target-actuator”. I have selected the correct file.
I am working on Ubuntu 15.10. Eclipse Mars.2 Release 4.5.2. Ac6 1.11.
I have changed optimisation to debug, and I am using Ac6 STM32 debugging.

If I copy my OCD script to the eclipse plugins folder, and check “use default script”, everything works. If I then copy the file to my project root folder and check “use local script”, everything still appears happy. If I then reopen Debug Configurations, “use local script” is still selected but “Configuration Script” now reads “SCRIPT NOT FOUND”.

I have done a grep for all references in my workspace to “.cfg”. I found the following:
1) There is a file in my project root directory called “.custom.cfg”. I’m not sure where this came from or if it is being used.
2) There is an entry in the .launches file:
./.metadata/.plugins/org.eclipse.debug.core/.launches/target-actuator Debug.launch:
Do I need to manually change this file to remove “${openstm32_openocd_script_path}/”?


 

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