Bringing support for the EOS-S3 in Rust

Overview

eos-s3-rs

WIP

Bringing support for the EOS-S3 in Rust.

Embedded-hal traits implemented:

  • ADC traits
  • digital IO (but must decide what to do with #3)
  • delay/timer
  • serial UART
  • I2C
  • SPI
  • watchdog

Traits like CAN and PWN cannot be implemented for the M4 subsystem which is the app we can modify from Rust, but it would be nice to have examples in which such things are implemented on the eFPGA.

About other features

  • Implementing the FPGA loading sequence is already possible. Qorc implementation can be used as a guide.
  • Sensors in the devboards don't seem to have Rust drivers as of now, so that's also on the backlog
  • I2S & PDM is somewhat low priority, hal traits are the first stuff that I'll be working on.
  • Contributions are welcome.

Additional notes

  • Higher integration with the symbiflow workflow is desirable. Perhaps if this can be achieved with a cargo subcommand ergonomics for hybrid (hdl + rust) workflows, it would make of Rust a comfy language for this kind of thing, which could also lead to it being the de-facto "thing".
  • This should help in the clock implementation: https://qorc-sdk.readthedocs.io/en/latest/guides/clock-power/clock-power.html
  • The SVD is ready, but it would be nice to have QuickLogic check everything is in order.
  • The SVD does not contain the core CM4F peripherals, as those don't seem to be required for pac generation. If you are an user of the SVD but not the rust libraries, feel free to contribute the transcription of the core peripherals in the yaml files already in the repo
  • I cannot overstate how useful it is to have the tools/libraries mantained by the Rust Embedded Working Group. The ecosystem is amazing, if you are somewhat new to embedded rust and somehow got to this place before any of the other projects, please check this repo - it has a list of all the nice things Embedded Rust has to offer.

Credit

The work on this repository is based on the information found on the EOS-S3 and qork-sdk repositories. Both of these projects are licensed under the Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0). QuickLogic does not provide an SVD file for the EOS-S3, but it does provide an excel file with the specification of the memory map.

License

The code in this repository is licensed under either of:

at your option.

Contribution

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.

You might also like...
Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance calculations and string search.

triple_accel Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance cal

Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)

rust-bert Rust native Transformer-based models implementation. Port of Hugging Face's Transformers library, using the tch-rs crate and pre-processing

👄 The most accurate natural language detection library in the Rust ecosystem, suitable for long and short text alike
👄 The most accurate natural language detection library in the Rust ecosystem, suitable for long and short text alike

Table of Contents What does this library do? Why does this library exist? Which languages are supported? How good is it? Why is it better than other l

Snips NLU rust implementation

Snips NLU Rust Installation Add it to your Cargo.toml: [dependencies] snips-nlu-lib = { git = "https://github.com/snipsco/snips-nlu-rs", branch = "mas

A fast, low-resource Natural Language Processing and Text Correction library written in Rust.

nlprule A fast, low-resource Natural Language Processing and Error Correction library written in Rust. nlprule implements a rule- and lookup-based app

A fast implementation of Aho-Corasick in Rust.

aho-corasick A library for finding occurrences of many patterns at once with SIMD acceleration in some cases. This library provides multiple pattern s

Natural Language Processing for Rust

rs-natural Natural language processing library written in Rust. Still very much a work in progress. Basically an experiment, but hey maybe something c

finalfusion embeddings in Rust

Introduction finalfusion is a crate for reading, writing, and using embeddings in Rust. finalfusion primarily works with its own format which supports

Rust-tokenizer offers high-performance tokenizers for modern language models, including WordPiece, Byte-Pair Encoding (BPE) and Unigram (SentencePiece) models

rust-tokenizers Rust-tokenizer offers high-performance tokenizers for modern language models, including WordPiece, Byte-Pair Encoding (BPE) and Unigra

Comments
  • Script for regenerating PAC from SVD

    Script for regenerating PAC from SVD

    Something like https://github.com/rp-rs/rp2040-pac/blob/main/update.sh so that others can make SVD changes and reproduce the PAC. The script doesn't need to be as complicated as the rp2040 one, but at least having a specific version of svd2rust would allow for repeatable builds.

    opened by 9names 2
  • SVD changes

    SVD changes

    I used resetValue in several places. This should be changed for reset masks that take into consideration the reserved fields in different registers. The access property should be moved to fields too, for now I assumed some reserved registers to be read-write, but this might be incorrect. For the reserved fields it would be sensible to have them as read-only. I will get this done after finishing the PMU register yaml

    opened by Josfemova 1
  • Help getting started on development

    Help getting started on development

    Hi,

    I'm interested in contributing to this project. I just got a Sparkfun EOS S3 Thing Plus, and would love to get some Rust code running on it. I have a decent amount of experience with Embedded Rust, but only on well-supported chips (RP2040, nRF528xx), and have never explored the process of creating a PAC or HAL from scratch. I understand the principle of mapping out the chip's registers in an SVD file and using the automated tools to convert to Rust structs, but have never actually performed the process.

    Is this still a project that you are interested in pursuing? Are there any reasons that this might not be worth pursuing? With a little bit of guidance I would be happy to fork this repo and start trying to make some contributions. :)

    Thanks!

    opened by shulltronics 1
  • GPIO  hal implementation discussion/reminder

    GPIO hal implementation discussion/reminder

    Basic context:

    M4 GPIO output control in the EOS-S3 is inherently unsafe as all 8 GPIO outputs are controlled from a single register (see here). For embedded-hal gpio implementation it might be better to wrap single gpios with a mutex in order to make them thread-safe. There's a long road before work on the hal starts but I'm opening this as a reminder

    opened by Josfemova 0
Releases(v0.1.0-alpha.0)
  • v0.1.0-alpha.0(Jan 13, 2022)

    This just contains the first patched SVD for the EOS-S3 SVD. No CM4F core peripherals included.

    Works with Cortex Debug and svd2rust, should work with other debug and code generation tools.

    This is NOT and official SVD from QuickLogic, at least not for now. If you find any error in the SVD feel free to contact me.

    Source code(tar.gz)
    Source code(zip)
    eos-s3.svd(1.03 MB)
Owner
José Morales
Computer Eng. student @ TEC CR Embedded Rust enthusiast openFPGA-curious
José Morales
Text calculator with support for units and conversion

cpc calculation + conversion cpc parses and evaluates strings of math, with support for units and conversion. 128-bit decimal floating points are used

Kasper 82 Jan 4, 2023
Font independent text analysis support for shaping and layout.

lipi Lipi (Sanskrit for 'writing, letters, alphabet') is a pure Rust crate that provides font independent text analysis support for shaping and layout

Chad Brokaw 12 Sep 22, 2022
Rust-nlp is a library to use Natural Language Processing algorithm with RUST

nlp Rust-nlp Implemented algorithm Distance Levenshtein (Explanation) Jaro / Jaro-Winkler (Explanation) Phonetics Soundex (Explanation) Metaphone (Exp

Simon Paitrault 34 Dec 20, 2022
Elastic tabstops for Rust.

tabwriter is a crate that implements elastic tabstops. It provides both a library for wrapping Rust Writers and a small program that exposes the same

Andrew Gallant 212 Dec 16, 2022
An efficient and powerful Rust library for word wrapping text.

Textwrap Textwrap is a library for wrapping and indenting text. It is most often used by command-line programs to format dynamic output nicely so it l

Martin Geisler 322 Dec 26, 2022
⏮ ⏯ ⏭ A Rust library to easily read forwards, backwards or randomly through the lines of huge files.

EasyReader The main goal of this library is to allow long navigations through the lines of large files, freely moving forwards and backwards or gettin

Michele Federici 81 Dec 6, 2022
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

regex A Rust library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a f

The Rust Programming Language 2.6k Jan 8, 2023
Natural language detection library for Rust. Try demo online: https://www.greyblake.com/whatlang/

Whatlang Natural language detection for Rust with focus on simplicity and performance. Content Features Get started Documentation Supported languages

Sergey Potapov 805 Dec 28, 2022
Multilingual implementation of RAKE algorithm for Rust

RAKE.rs The library provides a multilingual implementation of Rapid Automatic Keyword Extraction (RAKE) algorithm for Rust. How to Use Append rake to

Navid 26 Dec 16, 2022
A Rust library for generically joining iterables with a separator

joinery A Rust library for generically joining iterables with a separator. Provides the tragically missing string join functionality to rust. extern c

Nathan West 72 Dec 16, 2022