Crates.io | coresight |
lib.rs | coresight |
version | 0.1.0 |
source | src |
created_at | 2019-10-03 23:19:50.547485 |
updated_at | 2019-10-03 23:19:50.547485 |
description | A collection of coresight tools to comminicate with ARM chips. |
homepage | https://github.com/probe-rs/probe-rs/coresight |
repository | https://github.com/probe-rs/probe-rs/coresight |
max_upload_size | |
id | 169733 |
size | 27,941 |
A debugging toolset and library for debugging ARM cores on a separate host.
The goal of this library is to provide a toolset to interact with a variety of embedded MCUs and debug probes. For starters, ARM cores will be supported with use of the CoreSight protocol. If there is high demand and more contributors, it is intended to add support for other architectures.
Similar projects like OpenOCD, PyOCD, Segger Toolset, ST Tooling, etc. exist. They all implement the GDB protocol and their own protocol on top of it to enable GDB to commuicate with the debug probe. This is not standardized and also little bit unstable sometimes. For every tool the commands are different and so on.
This project gets rid of the GDB layer and provides a direct interface to the debug probe, which then enables other software, for example VisualStudio to use it's debug functionality.
What's more is that we can use CoreSight to its full extent. We can trace and modify memory as well as registers in real time.
The end goal is a complete library toolset to enable other tools to use the functionality of CoreSight.
The lib can connect to a DAPLink and read and write memory correctly. It can read ROM tables and extract CoreSight component information. Writing an entire hex file is halfaways there. The lib can also connect to an ST-Link, attach to an STM32F429 (it should be able to connect to any target; this one was just used for testing) and read DAP registers. Reading ROM tables is buggy because of some STLink troubles but should possibly fixed in the long run.
Focus of the development is having a full implementation (CoreSight, Flashing, Debugging) working for the DAPLink and go from there.
To demonstrate the functionality a small cli was written. Fire it up with
cargo run -p cli -- help
The help dialog should then tell you how to use the CLI.
For using the tracer fire
cargo run -p cli -- trace <n> <address> | python3 cli/update_plot.py
The pipe interface is binary for now.
Here is how it looks if you do everything correct and you trace a memory location with a changing value:
Don't hesitate to file an issue, ask questions on irc, or contact @Yatekii by e-mail.
Please have a look at the issues or open one if you feel that something is needed.
Any contibutions are very welcome!
Also have a look at CONTRIBUTING.md.
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.