GithubHelp home page GithubHelp logo

oussemanaffetyy / embedded Goto Github PK

View Code? Open in Web Editor NEW

This project forked from u2654/embedded

0.0 0.0 0.0 7.66 MB

embedded systems lab

License: Apache License 2.0

Python 0.13% Shell 0.02% C 90.85% Assembly 2.26% C++ 4.41% Makefile 0.13% GDB 0.01% HTML 2.19%

embedded's Introduction

Tools for Embedded Systems Lab

Objective

The aim of this repository is to provide a solution for lab assignments relating to distance teaching of the embedded systems course at the Bielefeld University of Applied Sciences, Campus Minden.

For further information, please vision https://www.iot-minden.de.

Introduction

We use the RISC-V based virtual prototyp of AGRA Uni Bremen (https://github.com/agra-uni-bremen/riscv-vp) so that we have a virtual embedded system with breadboard. Further, we provide examples based on parts of FreeRTOS and of SiFive Freedom-E-SDK. You find the corresponding licenses of these and their examples in their directories.

Instruction for our toolchain

  1. We require a running Linux system (though macOS would work, too). Hence, a native Linux or a Linux virtual machine has to be set up. We give no support for setting up a Linux machine. The following packages should be installed: autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev libboost-iostreams-dev qt5-default

  2. We use Visual Studio Code (vscode) with various extensions, namely:

    • C/C++ IntelliSense

    • PlatformIO IDE

    • RISC-V Venus Simulator The following extension are useful but optional:

    • GNU Linker Map files

    • hexdump for VSCode

    • Intel HEX format

    • LinkerScript

    • RISC-V Support

    • C/C++ Advanced Lint

    Please install vscode with the extensions (e.g. see instructions on the vscode website).

  3. Install the SiFive framework with the PlatformIO in vscode.

    code

    Goto Platforms on PIO Home and search for SiFive under Embedded and install. Leave vscode.

  4. Clone this project with submodules (in a terminal shell, use bash). We put everything in the home directory. Adapt the following steps for another destination.

    cd ~
    git clone https://github.com/U2654/embedded.git
    cd embedded	
    git submodule update --init riscv-vp
    cd riscv-vp
    git submodule update --init vp/src/core/common/gdb-mc/libgdb/mpc
  5. Build the virtual prototyp of a embedded board with the steps:

    • riscv-vp
    cd ../riscv-vp/vp/dependencies
    ./build_systemc_233.sh
    ./build_softfloat.sh
    cd ..
    mkdir build
    cd build
    cmake ..
    make install
    • vp-breadboard
    cd ../../env/redv/vp-redboard
    qmake 
    make
  6. Set environment variables (for bash, append to .bashrc in home).

    export PATH=~/.platformio/packages/toolchain-riscv/bin:$PATH
    export PATH=~/embedded/riscv-vp/vp/build/bin:$PATH
    export PATH=~/embedded/riscv-vp/env/redv/vp-redboard:$PATH
  7. Again in the shell, check if everything works and build an example project. Start a vp-breadboard and vscode in the shell.

    vp-redboard &
    code &

    In vscode, open the folder ~/embedded/workspace/led and then the file led.c. Run the example using the gui (piodebug).

    Open the preferences using the gui in vp-redboard. Choose the data path where config files etc. is located, this should be ~/embedded/risc-vp/env/redv/ and click ok. Open the blink.json file. Push the connect button (second from left hand side). You should see a blinking led in the vp-redboard. Screenshot

For Windows: WSLg as an alternative to a virtual machine

WSLg is the Linux subsystem for Windows 11 and allows various Linux distributions to run natively on Windows.

There is also the Linux subsystem for Window 10, which is called WSL2, but this has no automatic graphical output.

Click here to install WSL

Even though Linux-programs in Windows can be started with graphical output using WSLg, some still prefer a classic desktop. With the help of RDP this can be achieved.

Set up RDP with WSL

From now on you can simply follow the Linux instructions.

Tip: The Windows version of Visual Studio Code can also be used for Linux.

vp-breadboard

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.