Skip to content

Is semihosting supported when running on an ST-Link/v2? #1368

Answered by dragonmux
Elias-Graf asked this question in Q&A
Discussion options

You must be logged in to vote

monitor arm semihosting enable is only for OpenOCD. BMP implements a different set of monitor commands (monitor help to list), and that we remember, semihosting should always be enabled once attached to an ARM core. Semihosting output goes to the secondary serial port for BMP (/dev/ttyBmpTarg if on Linux) when you run monitor redirect_stdout enable.

The ST-Link v2 platform should support semihosting, so the redirect command should be visible in the monitor help output.

You are correct that you do have to compile with an appropriate crate that invokes the semihosting halo using the break instruction that encodes to 0xbeab, but that should be all that is required.

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Elias-Graf
Comment options

You must be logged in to vote
10 replies
@Elias-Graf
Comment options

@Elias-Graf
Comment options

@dragonmux
Comment options

@Elias-Graf
Comment options

@dragonmux
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants