Skip to content

openocd's new linuxgpiod driven xcore.cfg has issues #34

@Apehaenger

Description

@Apehaenger

Sometime ago I switched openocd's xcore.cfg adapter driver to linuxgpiod to get CM5 support (the old bcm2835gpio isn't supported by CM5).

I tested it that time with CM4 as well as CM5, but today I do have problems when doing openmower update-bootloader.

openmower@shrek:~ $ openmower update-bootloader
ℹ Info: Fetching latest firmware release from GitHub ...
Downloaded firmware archive: /tmp/tmpfl37g4n8/xcore-boot-v1.1.7.zip
Extracting firmware archive ...
Uploading firmware via openocd ...
Open On-Chip Debugger 0.12.0+dev-00002-gcd4873400 (2026-02-03-18:08)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Warn : Switch PCIe power saving off or the first couple of pulses gets clocked as fast as 20 MHz
Warn : Issue 'echo performance | sudo tee /sys/module/pcie_aspm/parameters/policy'
Info : Linux GPIOD JTAG/SWD bitbang driver
Info : Note: The adapter "linuxgpiod" doesn't support configurable speed
Info : SWD DPIDR 0x6ba02477 DPv2
Info : [stm32h7x.ap2] Examination succeed
Info : [stm32h7x.cpu0] Cortex-M7 r1p2 processor detected
Warn : [stm32h7x.cpu0] Erratum 3092511: Cortex-M7 can halt in an incorrect address when breakpoint and exception occurs simultaneously
Info : [stm32h7x.cpu0] The erratum 3092511 workaround will resume after an incorrect halt
Info : [stm32h7x.cpu0] target has 8 breakpoints, 4 watchpoints
Info : [stm32h7x.cpu0] Examination succeed
Info : [stm32h7x.ap2] gdb port disabled
Info : [stm32h7x.cpu0] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
[stm32h7x.cpu0] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Info : Device: STM32H72x/73x
Info : flash size probed value 1024k
Info : STM32H7 flash has a single bank
Info : Bank (0) size is 1024 kb, base address is 0x08000000
[stm32h7x.cpu0] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Error: Translation from khz to adapter speed not implemented
Error: [stm32h7x.cpu0] Execution of event reset-init failed:

** Programming Started **
Info : Padding image section 1 at 0x08018f1c with 4 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x08018f20 .. 0x0801ffff
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
Error: [stm32h7x.cpu0] clearing lockup after double fault
[stm32h7x.cpu0] halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0xfffffffe msp: 0xffffffd8
Error: [stm32h7x.cpu0] Polling failed, trying to reexamine
Info : [stm32h7x.cpu0] Cortex-M7 r1p2 processor detected
Warn : [stm32h7x.cpu0] Erratum 3092511: Cortex-M7 can halt in an incorrect address when breakpoint and exception occurs simultaneously
Info : [stm32h7x.cpu0] The erratum 3092511 workaround will resume after an incorrect halt
Info : [stm32h7x.cpu0] target has 8 breakpoints, 4 watchpoints
Info : [stm32h7x.cpu0] Examination succeed
✔ Firmware upload finished (release v1.1.7).

CM4 user can simply fix that by rm ~/.config/openmower-cli/xcore.cfg which will re-download the old bcm2835gpio based xcore.cfg on next openmower update-*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions