#semihosting
New Black Magic Debug V2.1.0 Firmware release! Twenty one new supported targets, RISC-V semihosting, non halting RTT, BMDA WCH-Link support and more! Thanks to everyone who contributed and those that bought our hardware! #embedded #jtag #swd #electronics #debugging #mcu codeberg.org/blackmagic-d...
\ git://git.kernel.org/pub/scm/.../linux.git \ my-linux $ cd /path/to/my/codebase $ git commit except the base path.
Tool only if the original repository from the ref does not permit.
codeberg.org
August 19, 2026 at 7:48 PM
This week Elecia and Chris talk to each other about setting aside memory in a linker file and merit badges.

Listen here: embedded.fm/episodes/484

Here's a quote from the show:

Thank you to Memfault for sponsoring the show!

#engineering #embedded #skills #badges #semihosting
September 13, 2024 at 3:54 PM
This week Elecia and Chris talk to each other about setting aside memory in a linker file, semihosting, looking around a new code base, among others.

Listen here: embedded.fm/episodes/484.

Here's Elecia and Chris on pointers as optimization:
#transcript #engineering #embedded #skills #badges
September 12, 2024 at 5:31 PM
This week Elecia and Chris talk to each other about setting aside memory in a linker file, semihosting, looking around a new code base, among others.

Listen here: embedded.fm/episodes/484.
Here they're on strategies for exploring new code bases:

Thank you to Memfault for sponsoring the show!
September 11, 2024 at 8:01 PM
Elecia and Chris talk to each other about semihosting, looking around a new code base, thinking of pointers as optimization and merit badges.

You can read the show's transcript here: embedded.fm/transcripts/... .

#transcript #engineering #embedded #semihosting
484: Collecting My Unhelpful Badge — Embedded
Transcript from 484: Collecting My Unhelpful Badge with Christopher White and Elecia White.
embedded.fm
September 10, 2024 at 8:19 PM
Join Elecia and Chris this week on Embedded as they talk to each other about setting aside memory in a linker file, printing using a debugger, skilltrees among others.
Listen here: embedded.fm/episodes/484 or anywhere you get your podcast.

#semihosting #skillstree #embedded #engineering #code
September 6, 2024 at 11:56 AM
Glad you enjoyed it!

I used arm-none-eabi-gdb to flash the device and cortex_m_semihosting with openocd for logging - mostly what is documented here docs.rs/cortex-m-sem...

Not great tbh, the feedback loop is pretty slow. I saw now probe.rs so I might give that a go one day.
cortex_m_semihosting - Rust
Semihosting for ARM Cortex-M processors
docs.rs
December 16, 2024 at 5:11 PM
J-Link RTT for the Masses using Semihosting on ARM | Discussion
J-Link RTT for the Masses
How to do bidirectional logging over SWD on ARM.
bogdanthegeek.github.io
September 15, 2025 at 12:40 AM
September 15, 2025 at 12:32 AM
Though apparently semihosting is the best option in QEMU I heard
February 1, 2025 at 7:39 PM
The third is RTT, which is somewhere in the middle.

Like Semihosting, it operates over your existing SWD/JTAG connection, so no additional HW needed. However it uses a more efficient technique (a ringbuffer on your MCU memory) to have much better performance.
November 6, 2024 at 11:16 AM
The second is ITM/SWO, which is like a "debugger accelerated serial port". The upside is that it is MUCH faster than Semihosting, and only a bit more complicated to use.

The downside is it requires debugger HW support (the cheap ones usually don't), or a separate fast USB-UART.
November 6, 2024 at 11:03 AM
Semihosting is a technique of "logging over the debugger", instead of over a serial port.

From a plus side: It's very easy to implement, and if you have a JTAG/SWD debugger, you don't need a separate serial port! All these messages just go through the debugger.
November 6, 2024 at 10:51 AM
In terms of mediating the cost of print debugging, there are a couple "power user" techniques that are great to add to your toolbox. At least for Cortex-M devices, these include:

* Semihosting
* ITM/SWO
* RTT
* Memoized logging
* Deferred Formatting
November 6, 2024 at 10:45 AM
probe-rs can also read semihosting output, it is RTT that is spoiling you this time ;)
May 8, 2026 at 8:04 PM
J-Link RTT for the Masses

You can use semihosting on any ARM CPU to send and receive data in a few lines of code. Click here to see an example implementation on a 10p “disposable” microcontroller. There are many ways to debug embedded projects. For high speed stuff, you might toggle a pin at the…
J-Link RTT for the Masses
You can use semihosting on any ARM CPU to send and receive data in a few lines of code. Click here to see an example implementation on a 10p “disposable” microcontroller. There are many ways to debug embedded projects. For high speed stuff, you might toggle a pin at the beginning and end of a subroutine. On a more advanced project, you might have structured logging to a file-system. In 99% of cases however, most people resort to either firing up a debugger or logging to a console (aka. printf…
n24usa.com
September 15, 2025 at 12:38 AM
Maybe I'm too stuck in my old ways, but has anyone legitimately used semihosting (Cortex-M, RISC-V, doesn't matter) to successfully diagnose a bug?

I've consistently found firmware with semihosting to run too slow for anything except playing around. I tough cases, I use gdb breakpoint scripts.
February 1, 2025 at 6:58 PM
J-Link RTT for the Masses using Semihosting on ARM
L: https://bogdanthegeek.github.io/blog/insights/jlink-rtt-for-the-masses/
C: https://news.ycombinator.com/item?id=45244601
posted on 2025.09.14 at 20:00:17 (c=0, p=3)
September 15, 2025 at 12:31 AM
**RISC-V Bytes: Semihosting with Zephyr on an ESP32**

I've always found semihosting to be a useful tool for enhancing the embedded development workflow. In this post, I explore the Zephyr built-in RISC-V support on the ESP32-C3.
https://danielmangum.com/posts/risc-v-bytes-semihosting-zephyr-esp32/
May 30, 2023 at 11:49 AM
the performance isn't terrible either: i measure about 25 ms per semihosting call
May 7, 2025 at 2:15 AM
by popular request: do-it-yourself implementation of semihosting using the new #GlasgowInterfaceExplorer ARM7TDMI debug probe
May 7, 2025 at 2:02 AM
J-Link RTT for the Masses using Semihosting on ARM

https://bogdanthegeek.github.io/blog/insights/jlink-rtt-for-the-masses/
September 15, 2025 at 1:00 AM
這真的是太誇張了 #wtf

網站架設在一次性電子菸上 http://ewaste.fka.wtf/

作者描述了一個別出心裁的實驗:他將一個一次性電子菸改造成一台能夠運行網站的迷你伺服器。起初,他只是收集朋友與家人丟棄的電子菸,用來回收電池。但隨著產品日漸複雜,他發現裡頭搭載了相當完整的微控制器,例如基於 ARM Cortex-M0+ 的 PUYA PY32 系列晶片,內含 24KB 的快閃記憶體與 3KB RAM。雖然這樣的規格乍看極其有限,但作者決定挑戰讓它承載一個能連上網的網站。

為了實現這個計畫,他透過 semihosting 技術讓微控制器能和主機互動,並利用 SLIP […]
Original post on mistyreverie.org
mistyreverie.org
September 15, 2025 at 3:59 AM
```
// need to disable semihosting to run outside of openocd + gdb
// use cortex_m_semihosting::hprintln;
// dummy hprintln
#[macro_export]
macro_rules! hprintln {
( $( $x:expr ),* ) => {
}
}
```

github.com/lucasw/misc_...
to run without openocd + gdb 'run' need to disable semihosting · lucasw/misc_rust@7d81e0b
github.com
August 2, 2025 at 3:06 PM
Just needed to disable semihosting and now it runs fine without gdb- I'm sure the rust embedded book probably mentioned that.

stackoverflow.com/a/70492258/6...
Flashing via OpenOCD does not allow the embedded program to run, however running using GDB with an OpenOCD bridge works fine
I am running into an issue with using Rust for embedded purposes where I can run and debug programs just fine, but if I try to flash programs such that they can run without being connected to my co...
stackoverflow.com
August 2, 2025 at 3:06 PM