GithubHelp home page GithubHelp logo

julia_rust_embedded's Introduction

Introduction

NOTE: This document is a working in progress, feel free to add or modify information in it to make it more up-to-date.

This source code is used to control the Circuit Board Julia PCI(version 1.10).

Part of the code is multiplatform agnostic and part is plataform specific (AVR microcontroler).

Prerequisites

  • A recent version of the nightly Rust compiler. Anything including or greater than rustc 1.63.0-nightly (fee3a459d 2022-06-05) can be used.

    for example this version is known to work: rustc 1.67.0-nightly (53e4b9dd7 2022-12-04)

  • The rust-src rustup component - $ rustup component add rust-src
  • AVR-GCC on the system for linking
  • AVR-Libc on the system for support libraries
  • gnu-make

Usage

Before start building, enter terminal go to the directory project and type:

> rustup toolchain install nightly-2022-12-04

then type:

> rustup default nightly-2022-12-04
> rustup override set nightly-2022-12-04
> rustup override nightly-2022-12-04
> rustup component add rust-src --toolchain nightly-2022-12-04-x86_64-pc-windows-msvc

If you want to install cargo-watch utility type this:

> cargo install cargo-watch

Note: Some of upabove commands may be unnecessary, check and update this doc when possible.

This will install the specified version of the rust toolchain.

Finally tpe:

> make

The make command will run the Makefile rules that compile, upload code to the board and show the total size of your compiled program.

You can also type make build upload size, or if you prefer type only parts of this rules, exemple: make upload to just upload without compiling code, or make build to just compile code without upload it, etc.

To see all rules available see the Makefile in the project's main directory.

Configuring IDE

You may use Visual Studio Code as your IDE do program this project.

TIP: This video shows one good way to config it.

Building manually (details)

This section of this document must be improved

rustup override set nightly

# Ensure time delays are consistent with a 16MHz microcontroller.
export AVR_CPU_FREQUENCY_HZ=16000000

# Compile the crate to an ELF executable.
cargo build -Z build-std=core --target avr-atmega328p.json --release

# Note: there is work in progress to make that easier
#       peeking in .cargo/config.tom  will show that
#            cargo build --release
#       is the short version
```powershell
There should now be an ELF file at `target/avr-atmega328p/release/blink.elf`. It
can be flashed directly to an AVR microcontroller or ran inside a simulator.


## Resources

  * The [AVR-Rust book](https://book.avr-rust.com)

julia_rust_embedded's People

Contributors

fvilante avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.