Skip to content

humility does not expect 0x prefix on hex numbers from openocd #560

@cbrune

Description

@cbrune

It looks like recent versions of openocd changed how hex strings are represented.

With this environment:

OS: Ubuntu 24.04.2 LTS
openocd version: Open On-Chip Debugger 0.12.0

This was found trying to run cargo xtask humility app/demo-stm32h7-nucleo/app-h753.toml -- tasks from the hubris repo.

openocd was started like this:

$ sudo openocd -f src/oxide/hubris/chips/stm32h7/openocd.cfg

Launching cargo xtask ... looks like this:

$ cargo xtask humility app/demo-stm32h7-nucleo/app-h753.toml -- tasks

humility: attached via OpenOCD
humility tasks failed: failed to read image ID at 0x8005530; board mismatch?

Caused by:
    invalid digit found in string
Error: humility failed

The output on the openocd console looks like:

Open On-Chip Debugger 0.12.0
DEPRECATED! use 'read_memory' not 'mem2array'
0 0xc8 1 0x12 2 0xfc 3 0x90 4 0xe0 5 0xfc 6 0xfa 7 0x24
0x20000dc0
DEPRECATED! use 'read_memory' not 'mem2array'
0 0x72 1 0x5c 2 0x3c 3 0x0 4 0x0 5 0x0 6 0x0 7 0x0
0x20000dc0

Looking at the humility code, it looks like humility does expect to see 0x in the hex numbers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions