Coder Social home page Coder Social logo

jonlamb-gh / oxcc Goto Github PK

View Code? Open in Web Editor NEW
18.0 6.0 5.0 233 KB

A port of Open Source Car Control written in Rust

License: Apache License 2.0

GDB 0.46% Shell 0.26% Rust 99.23% RenderScript 0.04%
rust rust-embedded stm32 stm32f767zi autonomous-vehicles autonomous-driving nucleo-f767zi can-bus bootloader no-std

oxcc's Introduction

OxCC

Overview

A port of Open Source Car Control written in Rust.

OxCC runs on the NUCLEO-F767ZI STM32F767ZI board.

It is built around the traits and patterns provided by the embedded-hal project and community: see the BSP crate, the HAL crate, and the device crate.

OSCC Divergence

Apart from the change in MCU/board, OxCC combines all of the OSCC modules (throttle, brake, steering, CAN gateway) into a single application.

Hardware

A new layout and schematic is currently in the works, check out the rough pinout to get started.

  • CAN

    OxCC uses the stm's on-board bxCAN controller. For a transceiver I've been using the SN65HVD230 from Waveshare.

Getting Started

Dependencies

Building

The default Cargo configuration will build for the Kia Soul EV vehicle with the panic-over-abort strategy.

See the [features] section of the Cargo.toml to change configurations.

  • Install system package dependencies:
    sudo apt-get install openocd
    sudo apt-get install gdb-arm-none-eabi
    sudo apt-get install binutils-arm-none-eabi
  • Install stlink from source: guide
  • Install Rust nightly and additional components:
    curl https://sh.rustup.rs -sSf | sh
    rustup install nightly
    rustup component add rust-src
    rustup component add rustfmt-preview --toolchain nightly
    rustup target add thumbv7em-none-eabihf
  • Install svd2rust:
    cargo install svd2rust
  • Build OxCC firmware:
    cargo build

Deploying

Deploy the firmware Using st-flash (provided by stlink):

# Convert ELF to ihex format
arm-none-eabi-objcopy \
    -O ihex \
    target/thumbv7em-none-eabihf/release/oxcc \
    target/thumbv7em-none-eabihf/release/oxcc.hex

# Upload to flash
st-flash \
    --format ihex \
    write \
    target/thumbv7em-none-eabihf/release/oxcc.hex

Debugging

In one terminal, start openocd:

openocd -f board/stm32f7discovery.cfg

In the OxCC terminal, use the runner to start a gdb session:

cargo run

License

Licensed under either of

at your option.

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.