VSCode is the IDE used for developing EFIGenie as well as the STM32 branches. The recommneded extensions are listed in .vscode/extensions.json and when opening the project in VSCode it will prompt you to install these extensions if you haven't already In addition to VSCode, you will also need the ARM Embedded Toolchain and a cmake generator to compile the project. The CMake generator typically used is ninja
Download VSCode from here. The installation is straight forward and additional information for setting up VSCode can be found here.
Download the toolchain from here. Choose the correct download for your operating system.
- For windows, download the toolchain installer executable from the link above. It will be the download with extension "win32.exe"
- Open the executable and follow the prompts for your language and EULA.
- Before clicking finish, select "Add path to environment variable." If this step is skipped, you will need to add the path for the toolchain bin manually to your environment path. Instructions for how to add the path to your environment path can be found below in the installation for OpenOCD
need to update
M1 Mac does not work with the lates arm toolchain so you will need to download 10.3-2021.07 instead of 10.3-2021.10 ***TODO, setup probably similar to Linux
Download and install CMake from here. Additional information for installation of CMake can be found here. You will need to install for command line use.
Download Ninja from the releases here.
- Unzip Ninja
- You will need to place this in your environment path, the easiest way to do this is to place it in the same folder as your arm toolchain bin which can be found here C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\bin
need to update
***TODO, setup probably similar to Linux
OpenOCD is used in conjunction with an ST-Link V2 adapter. OpenOCD binaries can be found here.
- Extract the zip file to a directory on your machine. In my case C:\OpenOCD
- Add the bin folder to your environment path. To do this, type "Environment Variable" into the start menu and select "Edit the system environment variables"
- Click the button "Environment Variables..."
- Select the Path variable and click "Edit"
- Select "New" and enter the location of the OpenOCD bin. In this case C:\OpenOCD\bin
- Clone this repository and then run the following git commands to pull in the dependencies. On linux you can just run the gitinit.sh script, not sure how to do that on windows.
git submodule init
git submodule update
cd libs/EFIGenie
git submodule init
git submodule update
- Open folder in VSCode and install the recommended extensions that it prompts you when opening the project.
- Select the configuration and build presets at the bottom of vscode
- Navigate to the Cmake extension and click "Configure All Projects" followed by "Build All Projects"
- Build the project
- Connect the STM32F401 to the ST-Link V2 and then to your computer
- Navigate to the Cortex-Debug extension and click "Start Debugging" This will load the build to the STM32F401
- Build the project
- In the build folder there is both a firmware.bin and firmware.hex file which can be loaded using the STM32CubeProgrammer from ST. STM32CubeProgrammer can be connected to the STM32F401 in USB bootloader mode by holding the boot pin load during reset. STM32CubeProgrammer can be downloaded here.
- Navigate to the Erasing and Programming tab and select the firmware file and click "Start Programming"
Burning the tune from the GUI is currently in progress so tunes must loaded by burning the tune.bin using STM32CubeProgrammer