Versions Compared

Key

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

...

Note
titleM1 Mac Users

If you have an M1 Apple silicon-based Mac, please follow the specific environment setup steps at Environment Setup For M1 Based Macs.

Prerequisites

To set up the development environment, you need to install the following tools.

  • Vagrant: a tool for managing and configuring Virtual Machines. Download the latest distro of Vagrant here
  • VirtualBox: Download the latest version of Virtualbox VirtualBox 7.0. You need both the main application and the "Oracle VM VirtualBox Extension Pack", available here. Check that the versions are the same 😉
  • Git: make sure to go on Github and create an account.

...

Code Block
languagebash
# You should still be ssh'd into the box
# Check with whoami - it should say "vagrant"
whoami
# Access the shared folder - found at box/shared
cd ~/shared
# Clone the firmware repo
git clone git@githubhttps://github.com:/uw-midsun/fwxv.git && cd fwxv
# Try to build the firmware (if you are on Apple Silicon, ignore this) 
scons


Info

Note: You will need to setup an ssh key to access github with your account. 

If you have already performed git clone with https, you can alternatively set up a token to be able to push any changes to our repo and you will need to enter this token in replacement of your password each time you push.

If you are setting up fresh, you need to use an ssh key to link your account. To learn how to add an ssh key you can run run the following commands in vagrant. Then, make sure to link it to your Github account.

Code Block
languagebash
# Create an ssh key
ssh-keygen -t ed25519 -C "your_email@example.com"
# Press enter to save at default location, and enter again to use no passphrase

# Add your ssh key to the ssh agent
eval "$(ssh-agent -s)"

# Add all keys to the ssh agent
ssh-add


Also, if you have already performed git clone with https, you can switch to ssh by performing the command below. If you don't, you will constantly be prompted for your user/token still even if you've already added your ssh key and linked it to your Github account.

Code Block
languagebash
# Make sure you are in the git repo
cd fwxv

# Switch from https to ssh
git remote set-url origin git@github.com:uw-midsun/fwxv.git


...

Code Block
languagebash
# Configure git
git config --global user.name "Your Name"
git config --global user.email youremail@example.com

git config --global push.default simple
git config --global core.autocrlf input

# Only works for git >= 2.9
git config core.hooksPath
hooks
# If git < 2.9 (All boxes before the 18.04 release)
rm -rf .git/hooks && ln -s ~/shared/fwxv/hooks .git/hooks

# Make sure that pylint is up to date so that the hooks don't fail, and install autopep8 for Python formatting
pip3 install pylint autopep8

# Make sure virtualenv is installed so Python dependencies get properly installed
sudo pip3 install virtualenv

Please use the email that's associated with your GitHub account.

YOU ARE FINISHED HERE

Update existing box

Only worry about this if you had the old box previously

...