-
Notifications
You must be signed in to change notification settings - Fork 2
Setting up the Development Environment
To download the repository:
git clone https://github.com/UofA-SPEAR/embedded
cd embedded
git submodule update --init
You need to have the following tools installed:
- gcc-arm-none-eabi (GCC arm toolchain)
- make tools
- For windows, install MSYS
- OpenOCD
(On debian-based systems)
sudo apt install make libtool pkg-config autoconf automake build-essential git libusb-1.0-0-dev
git clone git://git.code.sf.net/p/openocd/code openocd
cd openocd
./bootstrap
./configure
# After you configure, make sure ST-Link support is enabled
make -j
sudo make install
Download the x86_64 linux version from here, and extract it somewhere.
Then you can simply add it to your path.
- ChibiOS Documentation
- STM32 Datasheet
- [STM32 Reference Manual](https://www.st.com/content/ccc/resource/technical/document/reference_manual/4a/19/6e/18/9d/92/43/32/DM00043574.pdf/files/DM00043574.pdf/jcr:content/translations/en. DM00043574.pdf)
Note that the supported environment is Linux preferably, I will help with Windows, but I can't make guarantees.
The supported IDE is VSCode.
VSCode will need several extensions to work properly:
- C/C++
- cortex-debug
There should be a different .vscode folder for each project.
Possibly more work coming this way in the future, but it's at a decent state now.
Unfortunately there aren't any VSCode tools for getting the include directories from a makefile setup. However, we can write our own target to output what we need. Essentially just follow these steps:
- Run
make vscode_scanin the project directory. - Delete anything inside the
includePathvariable inc_cpp_settings.json - Copy the output of
make vscode_scaninto theincludePathvariable - Delete the trailing comma and enter
Ctrl-Shift-Ito format the file - It should work now!
These steps need to be run any time a change is made to the makefile, i.e. if you change which ChibiOS components you include.
Install the gcc-arm-none-eabi toolchain.
Download it from here.
Unpack it somewhere and make sure your $PATH points to the bin/ folder.
Install Git Bash
Install the ARM GNU toolchain from the ARM website: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
It works to build the makefile using git Bash, or anything like linux for windows, but I haven't done full integration into windows yet. (mostly because windows development sucks)