Skip to content

FL0WL0W/EFIGenieSTM32F401C

Repository files navigation

EFIGenieSTM32F401C

Development Environment Setup

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

VSCode

Download VSCode from here. The installation is straight forward and additional information for setting up VSCode can be found here.

ARM Embedded Toolchain

Download the toolchain from here. Choose the correct download for your operating system.

Windows

  1. For windows, download the toolchain installer executable from the link above. It will be the download with extension "win32.exe"
  2. Open the executable and follow the prompts for your language and EULA.
  3. 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

Linux

need to update

Mac

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

CMake

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.

CMake Generator

Download Ninja from the releases here.

Windows

  1. Unzip Ninja
  2. 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

Linux

need to update

Mac

***TODO, setup probably similar to Linux

Debugging

OpenOCD is used in conjunction with an ST-Link V2 adapter. OpenOCD binaries can be found here.

Windows

  1. Extract the zip file to a directory on your machine. In my case C:\OpenOCD
  2. 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"
    image
  3. Click the button "Environment Variables..."
    image
  4. Select the Path variable and click "Edit"
    image
  5. Select "New" and enter the location of the OpenOCD bin. In this case C:\OpenOCD\bin
    image

Cloaning the project

  1. 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
  1. Open folder in VSCode and install the recommended extensions that it prompts you when opening the project.

Building the project

  1. Select the configuration and build presets at the bottom of vscode
    image
    image
  2. Navigate to the Cmake extension and click "Configure All Projects" followed by "Build All Projects"
    image

Debugging the project

  1. Build the project
  2. Connect the STM32F401 to the ST-Link V2 and then to your computer
  3. Navigate to the Cortex-Debug extension and click "Start Debugging" This will load the build to the STM32F401
    image

Running the project without an ST-Link

  1. Build the project
  2. 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.
  3. Navigate to the Erasing and Programming tab and select the firmware file and click "Start Programming"
    image

Loading a tune

Burning the tune from the GUI is currently in progress so tunes must loaded by burning the tune.bin using STM32CubeProgrammer

  1. Use EFIGenieEditor to generate a bin file by clicking "Save Bin"
  2. Connect STM32CubeProgrammer to the STM32F401 using either an ST-Link or the USB bootloader
  3. Navigate to the Erasing and Programming tab and select the tune file, set the Start Address to 0x08004000 and click "Start Programming"
    image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages