Semihosting with VS Code on RP2040
mcuoneclipse.com
mcuoneclipse.com
And then there is no Decline or Settings button, but only "Learn More". I do not consider myself particularly sensitive about such stuff, but this one was too bold!
Nowhere does this need bullshit analytics, ads, or worst of all selling visitor data to 721 adtech parties. Yet here we are...
The one you talk about does it for the joy of writing or showcasing their projects.
But there is another where writing is a part of it, but getting views and feeling heard is another part, where numbers going up on a dashboard gives them dopamine.
They need analytics as that's the way they verify that someone is actually paying attention. Without it, they would never know if someone is reading it or not, and that's a part of their motivation.
Yet another group just want to know which of their post is more popular than another, they maybe don't really care about the specific numbers but more the ratio between posts, so they can keep writing what people seem to be reading the most.
Regardless, none of that actually need intrusive client-side analytics and tracking, it all can be done server-side but seems we've collectively forgotten how to do this.
Hear, hear. Heaven forbid someone in need of some dopamine greps their server logs, or increments some counter in a db...
The application runs on the microcontroller, and the output is displayed in your IDE/terminal. Depending on the capabilities of the microcontroller and its development environment, value interpolation might not be fully operational, and step by step debugging can go from fully supported to barely able to support breakpoints.
Or maybe there are other usages than just debugging ?
* hosted == we're running on a real OS, and printf etc become system calls to that OS
* freestanding == this is a bare metal program (perhaps it is itself an OS kernel) and much of the C library facilities are simply unavailable
* semihosted == an in-between position, similar to freestanding but with printf and some other facilities talking over a debug protocol to a connected development system, so you get more of the conveniences of a hosted C library during the development process
(the first two are C standard terminology.)
The use of the bkpt insn is also fairly new, being specific to M-profile (which is the device the blog post author happens to be using). The original 32-bit Arm version uses SVC (the system call instruction). Either way, use of the instruction is caught (by a debug ROM on the guest, or by a JTAG debugger, or by an emulator/software model) to perform the necessary operations, in a flow that is separate from use of bkpt as a true breakpoint).
More recently some other architectures have borrowed the "semihosting" term to refer to the equivalent ABI they provide.
However for some tasks such as proper debugging, stepping, or inspecting interrupt vectors while printing messages fast, native tools are the way to go.