Convert an MCU register description from the EDC format to the SVD format

Overview

edc2svd

Convert an MCU register description from the EDC format to the SVD format

EDC files are used to describe the special function registers of PIC32 microcontrollers. This program can generate Peripheral Access Crates to be used in Rust programs.

Usage

First, an EDC file is converted with this tool to an SVD file. Then svd2rust can be used to generate the Peripheral Access Crate as follows:

edc2svd PIC32MX170F256B.PIC PIC32MX170F256B.svd
svd2rust --target none -i PIC32MX170F256B.svd
rm -rf src
form -i lib.rs -o src/ && rm lib.rs
cargo fmt

Installation

$ cargo install edc2svd
You might also like...
This crate allows writing a struct in Rust and have it derive a struct of arrays layed out in memory according to the arrow format.

Arrow2-derive - derive for Arrow2 This crate allows writing a struct in Rust and have it derive a struct of arrays layed out in memory according to th

Serializer and deserializer for the VCR Cassette format

vcr-cassette Serializer and deserializer for the VCR Cassette format API Docs | Releases | Contributing Examples Given the following .json VCR Cassett

IDX is a Rust crate for working with RuneScape .idx-format caches.
IDX is a Rust crate for working with RuneScape .idx-format caches.

This image proudly made in GIMP License Licensed under GNU GPL, Version 3.0, (LICENSE-GPL3 or https://choosealicense.com/licenses/gpl-3.0/) Contributi

Parses .off (Object File Format) files. This implementation follows this spec from the Princeton Shape Benchmark.

off-rs - A simple .off file parser Parses .off (Object File Format) files. This implementation follows this spec from the Princeton Shape Benchmark. S

Small utility to display hour in a binary format on the Novation's Launchpad X.
Small utility to display hour in a binary format on the Novation's Launchpad X.

lpx-binary-clock Small utility to display hour in a binary format on the Novation's Launchpad X. Hours, minutes and seconds are displayed one digit pe

A decoder and utility for the Flipnote Studios .ppm animation format
A decoder and utility for the Flipnote Studios .ppm animation format

A decoder and utility for the Flipnote Studios .ppm animation format

Generate Rust register maps (`struct`s) from SVD files

svd2rust Generate Rust register maps (structs) from SVD files This project is developed and maintained by the Tools team. Documentation API Minimum Su

A bare metal STM32F103C8T6/STM32F103 MCU program written in pure Rust
A bare metal STM32F103C8T6/STM32F103 MCU program written in pure Rust

A bare metal (register level) STM32F103C8T6/STM32F103 MCU program written in pure Rust without any IDE, SDK, HAL or library, and no assembly code, the only tool required is the Rust compiler.

Community SVD file, peripheral access crate in embedde Rust for WinnerMicro W800, W801 & W806 chip

Community SVD file, peripheral access crate in embedde Rust for WinnerMicro W800, W801 & W806 chip

A simple script (in Rust lang) to create HTML from SVD
A simple script (in Rust lang) to create HTML from SVD

A simple script to create HTML from an SVD file This is a simple script written in Rust language to create a single HTML file from an SVD file. It's r

convert CHAIN format to PAF format

convert CHAIN format to PAF format

Rust version of the Haskell ERD tool. Translates a plain text description of a relational database schema to dot files representing an entity relation diagram.

erd-rs Rust CLI tool for creating entity-relationship diagrams from plain text markup. Based on erd (uses the same input format and output rendering).

Register access crate for AVR microcontrollers

avr-device Auto-generated wrappers around registers for AVR microcontrollers. Usage Add the following to Cargo.toml: [dependencies.avr-device] version

Services Info Register/KeepAlive/Publish/Subscribe. Based on etcd-rs, tokio

Services Info Register/KeepAlive/Publish/Subscribe. Based on etcd-rs, tokio

A Rust-like Hardware Description Language transpiled to Verilog

Introduction This projects attempts to create a Rust-like hardware description language. Note that this has nothing to do with Rust itself, it just ha

The Resurgence VM, a register virtual machine designed for simplicity and ease of use, based on the old Rendor VM
The Resurgence VM, a register virtual machine designed for simplicity and ease of use, based on the old Rendor VM

Resurgence Join the Discord server! Resurgence aims to be an embeddable virtual machine with an easy-to-use API for projects like: Game engines Langua

Fetch and extract HTML's title and description by given link.

extd Fetch and extract HTML's title and description by given link. Usage in Cargo.toml: [dependencies] extd = "0.1.4" Example use extd::extract_td; f

Low-level CPU and register abstractions for the N64 console

Description This crate is a low-level abstraction (aka a Peripheral Access Crate) over the CPU and memory-mapped registers available on the Nintendo 6

The Solid-State Register Allocator

The Solid-State Register Allocator A simple, extremely fast, reverse linear scan register allocator. See the detailed write-up for an in-depth explana

Comments
  • Thread panic with PIC32MZ pic file

    Thread panic with PIC32MZ pic file

    When running edc2svd on the PIC32MZ2048EFG100.PIC and it cause a thread panic. The file was acquired directly from an MPLABS install, so it should be a valid example of it.

    It appears to be a purposeful panic with cperi.len() being 0 for the file, so im not sure where this comes from.

    dc2svd ./PIC32MZ2048EFG100.PIC PIC32MZ2048EFG100.svd           
    cname = CPUPRI but name = EXLPRI
    cname = SQI1MD but name = SQIMD
    cname = SQI1MD but name = SQIMD
    cname = SQI1MD but name = SQIMD
    cname = SQI1MD but name = SQIMD
    thread 'main' panicked at 'empty peripheral info for _ICDCON', /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/edc2svd-0.3.0/src/main.rs:205:17
    note: run with 'RUST_BACKTRACE=1' environment variable to display a backtrace
    
    opened by jg2562 13
Owner
Stephan
Stephan
A bare metal STM32F103C8T6/STM32F103 MCU program written in pure Rust

A bare metal (register level) STM32F103C8T6/STM32F103 MCU program written in pure Rust without any IDE, SDK, HAL or library, and no assembly code, the only tool required is the Rust compiler.

Hema Shushu 105 Dec 18, 2022
A simple script (in Rust lang) to create HTML from SVD

A simple script to create HTML from an SVD file This is a simple script written in Rust language to create a single HTML file from an SVD file. It's r

Björn Quentin 14 Aug 22, 2022
Register access crate for AVR microcontrollers

avr-device Auto-generated wrappers around registers for AVR microcontrollers. Usage Add the following to Cargo.toml: [dependencies.avr-device] version

Rahix 103 Dec 23, 2022
Convert Hygea calendar to an iCal file to easily import it to Google Calendar (Rust version)

Hygea to iCal Goal Hygea provides a calendar via PDF and an application called Recycle. I just wanted to use an iCal file to import it in my calendar.

Guillaume Quittet 2 Oct 28, 2021
Emoji-printer - Utility to convert strings with emoji shortcodes to strings with the emoji unicode

Emoji Printer Intro Utility to convert strings with emoji shortcodes (:sushi:) to strings with the emoji unicode ( ?? ) Install cargo add emoji-printe

Kyle Scully 2 Dec 30, 2021
Count and convert between different indexing schemes on utf8 string slices

Str Indices Count and convert between different indexing schemes on utf8 string slices. The following schemes are currently supported: Chars (or "Unic

Nathan Vegdahl 11 Dec 25, 2022
Convert number like 42 to forty-two

num2words Convert number like 42 to forty-two Usage This crate can be either used as a library or a binary. Library Example usage: use num2words::Num2

Asperatus 5 Mar 30, 2022
Convert Juniper configurations to 'set-style'

JCC: Juniper Config Converter Convert Juniper configurations. Takes a Juniper configuration as displayed using show configuration and transforms it to

null 4 Sep 1, 2023
Adapters to convert between different writable APIs.

I/O adapters This crate provides adapters to compose writeable traits in the standard library. The following conversions are available: fmt::Write ->

Alex Saveau 16 Dec 21, 2023
transmute-free Rust library to work with the Arrow format

Arrow2: Transmute-free Arrow This repository contains a Rust library to work with the Arrow format. It is a re-write of the official Arrow crate using

Jorge Leitao 708 Dec 30, 2022