Comments (6)
semihosting support
semihosting as in "ARM-style" semihosting as implemented by OpenOCD and QEMU?
how much semihosting support do we want to expose? just the exit function or also the open, close, read, write API?
I'd be wary of providing 2 ways to do IO with the host: semihosting and RTT. RTT is non-blocking so I consider it the better solution for device-host communication.
My other concern is that having the probe checking for semihosting invocations (check if device halted; then check register 0) will eat some of the USB bandwidth used by the RTT polling mechanism so it will effectively reduce the rate at which the host can clear the device's RTT buffer. This is less of an issue if we only support semihosting exit because we can defer the semihosting check when the device's RTT buffer is empty (which would indicate that the device has halted), but if we have semihosting IO and RTT running concurrently then RTT's bandwidth may be more significantly reduced.
from probe-run.
semihosting as in "ARM-style" semihosting as implemented by OpenOCD and QEMU?
Yeah, the "official" semihosting for ARM, so that we can reuse the existing device-side implementation.
how much semihosting support do we want to expose? just the exit function or also the open, close, read, write API?
Just exit would be enough I think. We have no way to handle multiple data streams at the moment anyways. We could however detect attempts to use semihosting I/O and tell the user that it isn't supported.
Re: Bandwidth – since semihosting halts the device anyways, couldn't we still just check for it if the RTT buffer is empty (while the device is waiting on a semihosting call it wouldn't write anything to RTT)? It would make semihosting even slower, but probe-run needs to download the RTT data at some point anyways, so we could just schedule the bandwidth so that RTT always takes precedence, right?
from probe-run.
This could replace our current scheme, where we terminate the program after any breakpoint was hit, and look at the stack backtrace to determine whether to use an exit status that indicates failure (being in the HardFault exception handler is treated as a failure).
note that probe-run also puts a break point on HardFault. Without the breakpoint, the program would get stuck in an infinite loop: that's the default behavior of HardFault. I'm not sure if I would remove this breakpoint mechanism. If we do remove it then we need to override HardFault
to call exit(1)
which can result in linker errors if the user set a custom HardFault
to do something else. If we don't override HardFault
then UDF would result in an infinite loop.
from probe-run.
Hmm, yeah, we probably want to keep that mechanism.
I'm mostly looking for a more ergonomic way to control the exit status than to cause a hard fault or put loop { bkpt(); }
into every app.
from probe-run.
(Note that cortex-m-semihosting exit function is not divergent so you would still end up with loop { exit(0) }
instead of loop { bkpt() }
, which I'm not sure it's much of an improvement.)
from probe-run.
Hmm, yeah. Maybe that should use a loop internally. Seems like the intent is always to actually exit the app.
from probe-run.
Related Issues (20)
- `probe-run` fails to build due to yanked dependency HOT 8
- Probe run error points to old trouble shooting section
- CMSIS_DAP is not recognised (fix available link to PR)
- probe-run fails with `thread 'main' panicked at 'no entry found for key'` on heavy traffic and (maybe) buggy global logger. HOT 2
- The erase-all flag erases entire chip unnecessarily on nrf5340 which affects performance HOT 7
- Allow single line log output HOT 6
- Feature request: Timestamps on RTT messages HOT 1
- probe-run cannot detect pico HOT 4
- println! unexpectedly prints the statement's location before the formatted string
- probe-run assumes stack fits within a memory region
- Add an optional flag to halt once Ctrl+C is pressed
- Cannot install probe-run on Mac M1 HOT 5
- Running app on STM32F4 crashes core with unrecoverable exception HOT 8
- --log-format is inconvenient when only timestamp must be added HOT 1
- Cannot execute binary file HOT 2
- Issues using `probe-run` with an fe310g002 microcontroller HOT 5
- RP 2040: "ARM specific error" HOT 2
- Wrong SRAM regions for STM32L4 HOT 3
- Using app-template - Timeout occurred during operation HOT 2
- release final version with deprecation notice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from probe-run.