Litex add litespi flash and watchdog #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI builds | |
on: [push, pull_request] | |
jobs: | |
Bitstream-build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip bzip2 cmake build-essential clang bison flex tcl-dev libffi-dev mercurial graphviz xdot pkg-config python3 libftdi-dev python3-dev libeigen3-dev zlib1g-dev | |
sudo apt-get install -y libboost-dev libboost-filesystem-dev libboost-thread-dev libboost-program-options-dev libboost-iostreams-dev libboost-dev libboost-system-dev libboost-python-dev libboost-filesystem-dev | |
sudo apt-get install -y gcc-riscv64-unknown-elf | |
- name: Install OSS CAD tools | |
run: | | |
curl -s https://api.github.com/repos/YosysHQ/oss-cad-suite-build/releases/latest \ | |
| grep "browser_download_url.*oss-cad-suite-linux-x64-" \ | |
| cut -d : -f 2,3 \ | |
| tr -d \" \ | |
| wget -qi - | |
tar -xf oss-cad-suite-linux-x64-*.tgz | |
rm -v oss-cad-suite-linux-x64-*.tgz | |
- name: Build bitstream | |
run: | | |
source oss-cad-suite/environment | |
source ./init | |
pip3 install packaging meson ninja | |
echo $PATH | |
./make.py --board=sdi_mipi_bridge --toolchain=oxide --build --csr-json csr.json --with_all | |
- name: Generate dts and config | |
run: ./third_party/litex/litex/tools/litex_json2dts_zephyr.py --dts overlay.dts --config overlay.config csr.json | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{github.job}} | |
path: | | |
./build/antmicro_sdi_mipi_video_converter/gateware/antmicro_sdi_mipi_video_converter.bit | |
./overlay.dts | |
./overlay.config | |
Zephyr-build: | |
runs-on: ubuntu-22.04 | |
needs: Bitstream-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Bitstream-build | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install -y --no-install-recommends ninja-build gperf ccache dfu-util device-tree-compiler libssl-dev gcc g++ python3-dev python3-pip | |
sudo apt update | |
sudo apt-get install -y --no-install-recommends python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libmagic1 libsdl2-dev | |
- name: Download Zephyr SDK | |
run: | | |
wget -q -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.8/zephyr-sdk-0.16.8_linux-x86_64.tar.xz | tar -J -xf - | |
- name: Prepare Zephyr | |
run: | | |
pip3 install west | |
west init zephyrproject | |
cd zephyrproject/ | |
west update | |
west zephyr-export | |
pip3 install -r zephyr/scripts/requirements.txt | |
cd .. | |
- name: Install Zephyr SDK | |
run: | | |
cd zephyr-sdk-* | |
./setup.sh -h -t riscv64-zephyr-elf | |
cd ../ | |
- name: Build Zephyr App | |
run: | | |
export ZEPHYR_SDK_INSTALL_DIR=$PWD | |
cd zephyrproject/zephyr | |
cat ../../Bitstream-build/overlay.config | xargs west build -b litex_vexriscv samples/philosophers/ -- -DDTC_OVERLAY_FILE= ../../Bitstream-build/overlay.dts | |
cd ../../ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{github.job}} | |
path: ./zephyrproject/zephyr/build/zephyr/zephyr.bin |