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


Support for JLINK/converted ST LINKs

As ST Micro now has a collaboration with SEGGER to allow reflash their STLINKs to an almost non limited JLINK (on the Nucleo and Discovery boards, see https://www.segger.com/jlink-st-link.htmlQuestion), when is the JLINK finally supported out of the box in System Workbench/OpenSTM32?

I’m sick of all the workarounds fiddeling in scripts manually and so on to get the JLINK running. It’s officially supported by STM, so it should be supported in OpenSTM32 as well.

Markus


Hi Markus,

Did you get any reply at all?

Thanks,
Evgeny

__Hi Markus,

Did you get any reply at all?

Thanks,
Evgeny__

Not really. I know I can make it work manually but why is it just not running out-of-the-box. Segger is de facto standard for debugging. I would like to have an option when creating a new project which debugger to use.


Yes it does work.
I have used STM32F407-Discovery with onboard STLINK that was upgraded to JLink.

1.
After jlink firmware upgrade, install this into STM workbench in the normal fashion under eclipse: http://gnu-mcu-eclipse.netlify.com/v4-neon-updates
2.
Then create a new debug configuration and choose GDB Segger Jlink Debugging.
3.
Under Debugger tab ensure “Executable” is set to ${jlink_path}${jlink_gdbserver} which in my case resolves to “C:/Program Files (x86)/SEGGER/JLink_V620g/JLinkGDBServerCL.exe
4.
Set device name eg. STM32F407VG
5.
Set GDB client setup Executable to: ${openstm32_compiler_path}\arm-none-eabi-gdb.exe

That’s it.


Console under debugger should produce some output:



SEGGER J-Link GDB Server V6.20g Command Line Version

JLinkARM.dll V6.20g (DLL compiled Oct 20 2017 17:09:27)

Command line: -if swd -device STM32F407VG -endian little -speed 4000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
---GDB Server start settings---
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
--J-Link related settings--
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
--Target related settings--
Target device: STM32F407VG
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link STLink V2 compiled Jun 26 2017 10:34:41
Hardware: V1.00
S/N: ##########
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x20020000)
Read 2 bytes @ address 0x00000000 (Data = 0x0000)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x0800070C)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20020000, MSP= 20020000, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 0800070C
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x0800070C (Data = 0xD034F8DF)
Read 2 bytes @ address 0x0800070C (Data = 0xF8DF)
Received monitor command: speed 4000
Target interface speed set to 4000 kHz
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Received monitor command: semihosting enable
Semi-hosting enabled (Handle on BKPT)
Received monitor command: semihosting IOClient 1
Semihosting I/O set to TELNET Client
Received monitor command: SWO DisableTarget 0xFFFFFFFF
SWO disabled successfully.
Received monitor command: SWO EnableTarget 0 0 0x1 0
SWO enabled successfully.
Read 4 bytes @ address 0x0800070C (Data = 0xD034F8DF)
Downloading 392 bytes @ address 0x08000000 - Verified OK
Downloading 1884 bytes @ address 0x08000190 - Verified OK
Downloading 8 bytes @ address 0x080008EC - Verified OK
Downloading 4 bytes @ address 0x080008F4 - Verified OK
Downloading 1068 bytes @ address 0x080008F8 - Verified OK
Read 4 bytes @ address 0x0800070C (Data = 0xD034F8DF)
Read 2 bytes @ address 0x0800067E (Data = 0x2300)
Read 2 bytes @ address 0x0800067E (Data = 0x2300)
Read 2 bytes @ address 0x0800067E (Data = 0x2300)
Read 2 bytes @ address 0x08000682 (Data = 0x687B)
Received monitor command: clrbp
Received monitor command: reset
Comparing flash .................... Done.
Verifying flash .................... Done.
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x0800070C)
Read 2 bytes @ address 0x0800067E (Data = 0x2300)
Read 2 bytes @ address 0x0800067E (Data = 0x2300)
Read 2 bytes @ address 0x0800067E (Data = 0x2300)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 20020000, MSP= 20020000, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = 0800070C
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Read 4 bytes @ address 0x0800070C (Data = 0xD034F8DF)
Setting breakpoint @ address 0x0800067E, Size = 2, BPHandle = 0x0001
Setting breakpoint @ address 0x08000682, Size = 2, BPHandle = 0x0002
Starting target CPU...
...Breakpoint reached @ address 0x0800067E
Reading all registers
Read 4 bytes @ address 0x0800067E (Data = 0x607B2300)
Removing breakpoint @ address 0x0800067E, Size = 2
Removing breakpoint @ address 0x08000682, Size = 2
Read 4 bytes @ address 0x08000742 (Data = 0x00004770)
Read 2 bytes @ address 0x08000730 (Data = 0x4B09)
Read 4 bytes @ address 0x08000758 (Data = 0x2000059C)
Read 2 bytes @ address 0x08000732 (Data = 0x429A)
Read 2 bytes @ address 0x08000734 (Data = 0xD3F9)
Read 4 bytes @ address 0x2001FFF4 (Data = 0x00000000)
Read 4 bytes @ address 0x2001FFF4 (Data = 0x00000000)


Thanks, step 5 “Set GDB client setup Executable to: ${openstm32_compiler_path}\arm-none-eabi-gdb.exe” saved my day, after wasting many hours searching for the solution. Finally i can debug with a J-link.

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  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. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs