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


Can't use debugger on MavOS X

Hello!

I installed SW4 and I have problme to use the debugger.

What it does:
After building the application, I run in debug mode with project righ-click->debug as->AC6 STM32 C/C++ application
It starts like every debugger would. The int main() is highlit with a green background.
If I press continue, it seems to start the program (I have set a led toggle in systick and it works). However, the
highlight is still green on the same line (main).
Simultaneousley, I have many lines (30 ~ 50 of them) in the console saying Error: JTAG failure -4.

Any idea how to solve this?

Dora.

---------
Configurations as follows:
Eclipse IDE version Neon.3 release 4.6.3
Installed from package install_sw4stm32_macos_64bits-v2.2.run
downloaded a few days ago. The installer seems to behave normally (i.e. no error).

--- Here is what the console says when starting the debugger, before pressing continue -----
Open On-Chip Debugger 0.10.0-dev-00004-gcef2a8c-dirty (2017-08-31-14:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1800 kHz
adapter_nsrst_delay: 100
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v25 API v2 M v14 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 0.012615
Error: target voltage may be too low for reliable debugging
Info : Stlink adapter speed set to 1800 kHz
Info : STM32F769BITx.cpu: hardware has 8 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection on tcp/3333
Info : Stlink adapter speed set to 1800 kHz
adapter speed: 1800 kHz
STM32F769BITx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800210c msp: 0x20080000
Info : Stlink adapter speed set to 4000 kHz
adapter speed: 4000 kHz
Info : flash size probed value 2048
Info : flash size probed value 2048
Info : Stlink adapter speed set to 1800 kHz
adapter speed: 1800 kHz
STM32F769BITx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800210c msp: 0x20080000
Info : Stlink adapter speed set to 1800 kHz
adapter speed: 1800 kHz
STM32F769BITx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800210c msp: 0x20080000
Info : Stlink adapter speed set to 4000 kHz
adapter speed: 4000 kHz
STM32F769BITx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000084 msp: 0x20080000
Info : Stlink adapter speed set to 1800 kHz
adapter speed: 1800 kHz
STM32F769BITx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800210c msp: 0x20080000

Hello Dora,

Thanks for the detailled description of the issue, will try this on our side.
Could you simply indicate your OSX version?


Hello,

First, you can update the stlink firmware to the latest version (V2 J28).
You can find the stlink firmware upgrade on ST website.

Then, it seems you didn’t connect the Vdd mcu to the stlink since the log says target voltage measured at 0V.
Maybe not important but if you can connect it, it’s better.

Did you connect the STlink reset line to the mcu reset pin ?

The STlink is from a nucleo board ?
If yes, did you remove the 2 jumper for Nucleo mode ?

How did you create the project ?

Maybe you can try a simple project without interrupts first.

Rgds,
Laurent


Hello!

Sorry for the delay.
My OSX is the latest one. It says MacOS Sierra Version 10.12.6

LaurentL wrote:

First, you can update the stlink firmware to the latest version (V2 J28).
You can find the stlink firmware upgrade on ST website.

Done, but no change.

LaurentL wrote:

Then, it seems you didn’t connect the Vdd mcu to the stlink since the log says target voltage measured at 0V.
Maybe not important but if you can connect it, it’s better.

I don’t think it’s important, and I even think it would do more harm than good. My board (custom) is powered
externally. Beside this, it works pedfectly with IAR, so I think it’s a software problem.

LaurentL wrote:
Did you connect the STlink reset line to the mcu reset pin ?

Yes.

LaurentL wrote:

The STlink is from a nucleo board ?
If yes, did you remove the 2 jumper for Nucleo mode ?

Yes, its’ a STLink, but it’s cut-off from the board in order to make it smaller.

LaurentL wrote:
How did you create the project ?

With my fingers...
Joke aside: I have made it with CubeMX. It used to work fine untile I installed some
upgrades to the IDE.

LaurentL wrote:
Maybe you can try a simple project without interrupts first.

Do you mean that interrupts can cause problems to the software? In this case, it would
certainly be a big issue for me because I can’t program without interrupts.

Thanks,

Dora.


Hello again!

How can I quote text? I tried some code I use on other forums, but apparently it doesn’t work. It simply
strips the square brackets.

Thanks,
Dora.