arm-memory

Crates.ioarm-memory
lib.rsarm-memory
version0.1.0
sourcesrc
created_at2019-10-03 23:26:53.929134
updated_at2019-10-03 23:26:53.929134
descriptionA collection of memory inspection tools to comminicate with ARM chip memories.
homepagehttps://github.com/probe-rs/probe-rs/memory
repositoryhttps://github.com/probe-rs/probe-rs/memory
max_upload_size
id169735
size45,711
Noah Hüsser (Yatekii)

documentation

https://docs.rs/memory/

README

probe-rs

Build Status

A debugging toolset and library for debugging ARM cores on a separate host.

Motivation

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.

Functionality

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.

CLI

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:

counter plot

Roadmap

  • v0.1.0
    • Basic debugging for Cortex m0, m3, m4.
      • Stepping in
      • Halting
      • Breaking
      • Running
    • Basic VSCode plugin
      • Stepping in
      • Halting
      • Breaking
      • Running
      • Variable inspection
        • Structs
        • Enums
        • Basic types
      • Stackframes
    • Basic CLI
      • Stepping in
      • Halting
      • Breaking
      • Running
  • Flash downloader.
  • Semihosting.
  • Tracing.
  • SWD file support.

FAQ

I need help!

Don't hesitate to file an issue, ask questions on irc, or contact @Yatekii by e-mail.

How can I help?

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.

License

Licensed under either of

Contributing

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.

Commit count: 5440

cargo fmt