This repository contains a template for automatically porting Zephyr RTOS to a SiFive Freedom E-Series board based on that board's DTS file.
- Choose a location for storing custom board configurations. We'll refer to this directory as
<BOARD_DIRECTORY>
git clone https://github.com/sifive/zephyr-sifive-freedom-template.git <YOUR_BOARD_NAME>
cd <YOUR_BOARD_NAME>
- Copy your DTS file into the current directory
./customize_board.sh
- Select your desired ROM Boot address
customize_board.sh
is idempotent, so feel free to re-run it as many times as you like.
source /opt/zephyr/<ZEPHYR_VERSION>/zephyr-env.sh
cd /opt/zephyr/<ZEPHYR_VERSION>/samples/hello_world
mkdir build && cd build
cmake -DBOARD=<YOUR_BOARD_NAME> -DBOARD_ROOT=<BOARD_DIRECTORY> ..
make -j$(nproc)
- The output binary is in zephyr/zephyr.elf
git clean -dfx
will reset the template to a clean state