Development for EVT firmware can be done on Linux, MacOS, or Windows. There are many ways that development can be done, but this page outlines a basic setup with all the recommended tools, which can be a good start. If you want to use an alternate setup, first set up your environment using this method. Then, talk with the firmware lead to ensure the new setup is compatible before moving on to modify your setup.
The following script was created to streamline the process of installing all of the required dependencies for a Windows EVT environment. To get started, paste the following command into Powershell.
irm "https://raw.githubusercontent.com/RIT-EVT/Setup-Script/main/setup_windows.ps1" | iex
The script will automatically install CMake, the ARM Toolchain, and clang-format. It WILL NOT register the arm tools into your path since many users choose to install GCC_ARM_TOOLS_PATH in every project individually.
Set Up SSH Keys
If you need to set up git ssh-keys, follow the steps here Github SSH Key Tutorial
if you have multiple ssh keys, instead use
git clone git@github.com:RIT-EVT/EVT-core.git --config core.sshCommand="ssh -i ~/location/to/private_ssh_key"
If this is not set up correctly, you will get an error later on when trying to clone repositories suggesting you check you have the correct permissions
EVT-core repo can be found at the following link: https://github.com/RIT-EVT/EVT-core
Clone repo
Navigate to directory to put 'EVT-core' folder in, for example EVT/
git clone git@github.com:RIT-EVT/EVT-core.git
Update submodules
git submodule update --init --recursive
This will need to be done every time a new repository is cloned
The code can be edited using your preferred text editor. Recommendations are shown below
Clion - Fully Fledged IDE for C/C++ development. Student License provided by RIT. See 'Utilizing Clion IDE section'
Visual Studio Code - Lightweight editor that provides lots of useful functionality and suffices in most cases.
Fully Fledged IDE for C/C++ development. Provides the following useful features
Syntax highlighted and easy code navigation
GUI Interface for OpenOCD build tools that provide 1 click code building and board programming
GUI Interface for GDB Debugger for debugging code with breakpoints and memory view
Optional view of direct peripheral registers.
Set up an account on https://www.jetbrains.com/
Use RIT email and apply for educational license
Download and install IDE
Download from https://www.jetbrains.com/clion/download/#section=windows
Follow installer instructions
Launch Clion from Start Menu
Complete steps necessary to register IDE
Open EVT-core project
Cloning the Repository
Using CLion's GitHub Integration
If you haven't already, make sure you have a GitHub account with access to the EVT-core repository (more detail)
Select Get from VCS
Select GitHub from the righthand side
Log in to GitHub following the prompts on the JetBrains website
Select RIT-EVT/EVT-core from the list of repositories
Select Clone in the bottom right corner
If you have any errors with this process you may need to use Git Bash instead
Using a shell (like Git Bash)
Navigate to directory you wish to clone EVT-core into
Clone Repo
Right click in windows file manager and select 'Git Bash Here'
Type in command git clone git@github.com:RIT-EVT/EVT-core.git
If you have issues with git integration within Clion see:
Fill out the Project Wizard
Toolchain
You should just use the default MinGW settings
If you don't have MinGW installed, select "Download..." and follow the provided steps
Click Next
CMake
Edit build directory to 'build'
Edit build options to '-j'
Set environment to GCC_ARM_TOOLS_PATH=<your_path_to_gcc_arm>\bin
Replace '\' with '/'
Click OK
Don't worry about making mistakes here. These can be edited later in File → Settings → Build, Execution, Deployment → CMake
Set up Clang Tools
Confirm that Clang Tools is working by selecting File → Reload CMake Project.
Lastly, go to File → Settings → Editor → Code Style, and make sure "Enable ClangFormat" is checked.
Light Weight Fully Fledged IDE for C/C++ development. Provides the following useful features
Syntax highlighted and easy code navigation
Helpful customizations to enable high efficiency coding
GUI Interface for GDB Debugger for debugging code with breakpoints and memory view
Download VS Code: https://code.visualstudio.com/download
Download necessary VS Code extensions
On the left hand side of the VS Code window, there is an extensions tab. Click on this tab and search for and install the following extensions:
C/C++ Extension Pack
Github Repositories
Github Pull Requests and Issues
Clang-Format
Set up a Github account if you do not already have one: https://github.com/join
Use this tutorial to setup/authorize your github account in vscode: https://docs.microsoft.com/en-us/learn/modules/introduction-to-github-visual-studio-code/
See the current firmware lead to get access to EVT-Core github repository
Make a local folder on your laptop that can serve as your vscode workspace for EVT-Core
make sure this folder is not automatically backed up by any cloud storage service like Google Drive or OneDrive!
Install Cmake
Download Windows installer from: https://cmake.org/download/
Choose Add to path option (can choose current user or all users)
Install GNU ARM Tools Path
Download the installer for v12.3 from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Should have a name similar to "arm-gnu-toolchain-12.3.rel1-mingw-w64-i686-arm-none-eabi.exe"
To avoid problems later on, make sure the path to the toolchain has no spaces
You will have to manually modify the automatically generated path because it has spaces in it
Ex: C:\Program_Files_No_Spaces\Arm_GNU_Toolchain_arm-none-eabi\12.3_rel1
Take note of the install location and save for later.
Install Git for Windows
Download Installer from https://git-scm.com/download/win
Download the LLVM Windows installer from https://releases.llvm.org
Make sure the version is 15.0.7
The installer should be titled something like "LLVM-x.x.x-win64.exe"
Run the installer, making sure to select the option to add LLVM to the system PATH
Clang tools will not start working until after a restart.
Restart your PC
The following script was created to streamline the process of installing all of the required dependencies for a macOS EVT environment. Just simply paste these commands all at once (or one by one) into your Terminal.
curl https://raw.githubusercontent.com/RIT-EVT/Setup-Script/main/setup_mac.sh | sh
The script will automatically install Homebrew, CMake, the ARM Toolchain, and clang-format. It will also automatically register PATH variable GCC_ARM_TOOLS_PATH to the correct value for your system and architecture.
Set Up SSH Keys
If you need to set up git ssh-keys, follow the steps here Github SSH Key Tutorial
if you have multiple ssh keys, instead use
git clone git@github.com:RIT-EVT/EVT-core.git --config core.sshCommand="ssh -i ~/location/to/private_ssh_key"
If this is not set up correctly, you will get an error later on when trying to clone repositories suggesting you check you have the correct permissions
EVT-core repo can be found at the following link: https://github.com/RIT-EVT/EVT-core
Clone repo
Navigate to directory to put 'EVT-core' folder in, for example ~/EVT/
git clone git@github.com:RIT-EVT/EVT-core.git
Update submodules
git submodule update --init --recursive
This will need to be done every time a new repository is cloned
The code can be edited using your preferred text editor. Recommendations are shown below
Clion - Fully Fledged IDE for C/C++ development. Student License provided by RIT. See 'Utilizing Clion IDE section'
Visual Studio Code - Lightweight editor that provides lots of useful functionality and suffices in most cases.
Fully Fledged IDE for C/C++ development. Provides the following useful features:
Syntax highlighted and easy code navigation
GUI Interface for OpenOCD build tools that provide 1 click code building and board programming
GUI Interface for GDB Debugger for debugging code with breakpoints and memory view
Optional view of direct peripheral registers.
Set up an account on https://www.jetbrains.com/
Use RIT email and apply for educational license
Download and install IDE
Put the following int a terminal: brew install --cask clion
Launch Clion from application manager
Complete steps necessary to register IDE
Open EVT-core project
Select Open (May be File→Open).
Select EVT-core folder to open
While opening it will ask you to configure CMake settings. These can be edited later in File → Settings → Build, Execution, Deployment → CMake
edit build directory to 'build'
edit build options to '-j'
Edit the code as desired within IDE
This is a manual installation of all of the components that the automatic script installs. If you wish to install everything manually you can follow these steps!
Go to https://brew.sh and install the homebrew package manager.
Tap the required repository to retreive the arm-gnu-toolchain v12.3
brew tap actuallytaylor/formulae
Install the arm-gnu-toolchain
brew install arm-gnu-toolchain@12
Set GCC_ARM_TOOLS_PATH environment variable
Add export GCC_ARM_TOOLS_PATH="$HOMEBREW_PREFIX/bin/" to your ~/.zshrc if you have ZSH or ~/.bash_profile if you have bash.
To see what shell you are using you can use the command echo $SHELL
Run source ~/.zshrc if you have ZSH or source ~/.bash_profile if you have bash.
Install Cmake
brew install --cask cmake
Add export PATH=$PATH:/Applications/CMake.app/Contents/bin to your ~/.zshrc if you have ZSH or ~/.bash_profile if you have bash.
Install clang-format
brew install clang-format
The following script was created to streamline the process of installing all of the required dependencies for a Linux EVT environment. To get started, paste the following script into a Linux terminal.
curl https://raw.githubusercontent.com/RIT-EVT/Setup-Script/main/setup_linux.sh | sh
The script will automatically install CMake, the ARM Toolchain, and clang-format.
Set Up SSH Keys
If you need to set up git ssh-keys, follow the steps here Github SSH Key Tutorial
if you have multiple ssh keys, instead use
git clone git@github.com:RIT-EVT/EVT-core.git --config core.sshCommand="ssh -i ~/location/to/private_ssh_key"
If this is not set up correctly, you will get an error later on when trying to clone repositories suggesting you check you have the correct permissions
EVT-core repo can be found at the following link: https://github.com/RIT-EVT/EVT-core
Clone repo
Navigate to directory to put 'EVT-core' folder in, for example ~/repos
git clone git@github.com:RIT-EVT/EVT-core.git
Update submodules
git submodule update --init --recursive
This will need to be done every time a new repository is cloned
The code can be edited using your preferred text editor. Recommendations are shown below
Visual Studio Code - Lightweight editor that provides lots of useful functionality and suffices in most cases.
Clion - Fully Fledged IDE for C/C++ development. Student License provided by RIT. See 'Utilizing Clion IDE section'
Fully Fledged IDE for C/C++ development. Provides the following useful features:
Syntax highlighted and easy code navigation
GUI Interface for OpenOCD build tools that provide 1 click code building and board programming
GUI Interface for GDB Debugger for debugging code with breakpoints and memory view
Optional view of direct peripheral registers.
Set up an account on https://www.jetbrains.com/
Use RIT email and apply for educational license
Download and install IDE
sudo snap install clion --classic
Launch Clion from application manager
Complete steps necessary to register IDE
Open EVT-core project
Select Open (May be File→Open).
Select EVT-core folder to open
While opening it will ask you to configure CMake settings. These can be edited later in File → Settings → Build, Execution, Deployment → CMake
Edit build directory to 'build'
Edit build options to '-j'
Set environment to GCC_ARM_TOOLS_PATH=<your_path_to_gcc_arm>/bin
Click OK
Edit the code as desired within IDE
Procedure written for a Debian Ubuntu environment, but the procedure can be easily adapted for any linux distro
Install GNU ARM Embedded Toolchain
Download 'arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi.tar.xz' from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
On MacOS, you will want 'arm-gnu-toolchain-12.3.rel1-darwin-x86_64-arm-none-eabi.tar.xz'
Extract code to desired directory.
tar -xvf <gcc-arm-tar.bz2> -C <desired compiler location>
The compiler location should be somewhere permanent
Set GCC_ARM_TOOLS_PATH environment variable
Edit ~/.bashrc or ~/.zshrc depending on your shell and append the following line:
export GCC_ARM_TOOLS_PATH=<your_path_to_gcc_arm>/bin
On fish, it's ~/.config/fish/config.fish
set -gx GCC_ARM_TOOLS_PATH <your_path_to_gcc_arm>/bin
On MacOS there are two possible locations you may need to put the line above. Execute the command below to determine where to place the line:
echo "$SHELL"
If you got /bin/zsh then add the export to ~/.zshrc, if you have /bin/bash then add the export to ~/.bash_profile.
Update environment
Easiest way is to restart your shell (close & open the terminal window)
source ~/.bashrc or ~/.zshrc or ~/.config/fish/config.fish
On MacOS source ~/.zshrc if you have ZSH or ~/.bash_profile if you have bash
Install cmake
Ubuntu / Debian: sudo apt-get install cmake
Arch: sudo pacman -S cmake
On MacOS install CMake from here, then add the following line to either ~/.zsh or ~/.bash_profile depending on which you have and re-run the source ~/.zshrc or source ~/.bash_profile
export PATH=$PATH:/Applications/CMake.app/Contents/bin
Setting up Clang Format
Debian / Ubuntu
Run: sudo apt-get install clang-format-15
Verify your system is using the correct version: clang-format --version
If not run this command to select it: sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 100
Arch
If you have an AUR helper, such as paru, you can just do <helper> -S clang-format-static-bin
If not, manually install it
cd ~/Downloads
git clone https://aur.archlinux.org/clang-format-static-bin.git
cd clang-format-static-bin
makepkg -si
cd ..
rm -rf clang-format-static-bin
Put the binary in your path
# first make somewhere to put it
mkdir ~/bin
cd ~/bin
# symlink the binary
ln -s /opt/clang-format-static/clang-format-12 clang-format
Edit ~/.bashrc or ~/.zshrc to include it in your path with:
export PATH=$PATH:/home/<username>/bin
With fish, set -gx PATH $PATH "/home/<username>/bin"
You may need a space instead of a :