Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open the Embedded-Base repo, and run

Code Block
python ner_environment/ner_setup.py

(if your default python version is 2, run “python3” instead of “python. You can find your default version by running “python --version”)

...

This should work for any platform, but as mentioned above, it hasn’t been rigorously tested, so let someone know if it doesn't work

Note

If you are on Windows, please use bash shell for this. It comes installed with Git, and you can use any terminal ( just run “bash” to open it, or you will also see a dropdown on VSCode terminals to select any shell)

...

This script does quite a bit behind the scenes. It pull our docker image, it creates a python venv, and installs packages and sets up aliases & entry-points for it. It also installs some other local packages, like probe-rs OpenOCD (an open source debugger written in Rust). For a list of all tools that we use, take a look at the next section.

This script will prompt you to answer ‘yes’ (or simply ‘y') or no (or simply 'n’) quite a bit. For most users, you should select yes to all of the prompts. These options are mostly just there in case you have a really weird linux distro (cough cough jack rubacha), or really know what you are doing and want to go about it manually.

  1. (IF ON LINUX ONLY, ELSE SKIP) Fix Rust-Sudo Dynamic

...

Note: need to use “sudo” for steps 2 and 3 in the above link

  1. Set up shell aliases
    This is by Set up shell aliases
    This is by no means mandatory, but it might be helpful and is a bit hard to automate in the above script. If you’d like to save time activating and de-activating the virtual environment, you can alias these commands for whichever shell you are using For now, I’m not going to walk through instructions for doing this here; there’s many shells you all might be using, and a million ways to do this, but if you are unsure of how to do it feel free to ask someone and they can help you through it. I use fish shell on Linux, so I’ve added this line to my config.fish file:

...

The virtual environment can then be deactivated from anywhere by running “deactivate”

Note

When activiating, you may see an error that says soemthing about ls: cant find /bin/bash. No worries if you do, it shouldnt prevent anything from workingYou always need the venv active when trying to interact with our build system

Developing on our Team

a. Overview

...

Mainly, our Cmake build system and Renode Emulator work in docker. Whenever executing commands related to this, the command is passed into the container and run in there, streaming the output back to the user’s console. Most other tools, such as those to flash and debug, monitor serial output, and using git happen locally on the user’s machine inside of their venv.

b. Commands

We alias a lot of the most helpful commands to make them easier to use. Here is a (likely incomplete) list of some that you may use the most:

...

Build - runs the cmake build command in docker

...

Flash - runs the probe-rs command to upload code to a connected board

...

.

b. Commands

See this page for a full overview of the NER build system

Learning Resources

a. Git

View file
nameGit 101 (Basics of Git).pdf

...

Follow the link posted here, when available (expected by Saturday, 9/14 latest):

https://classroom.github.com/a/_1lecy_U

main.c - the application main code, with task/thread definitions and functional logic.

...