Skip to content

Litex add litespi flash and watchdog #30

Litex add litespi flash and watchdog

Litex add litespi flash and watchdog #30

Workflow file for this run

name: CI builds
on: [push, pull_request]
jobs:
Bitstream-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
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 update
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
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
./install.sh
- name: Install yosys
run: |
git clone https://github.com/YosysHQ/yosys.git
cd yosys
make config-gcc
make -j`nproc`
sudo make install
cd ..
rm -rf yosys
- name: Install prjoxide
run: |
git clone --recursive https://github.com/gatecat/prjoxide
cd prjoxide/libprjoxide
export PATH=$HOME/.cargo/bin:$PATH
cargo install --path prjoxide
cd ../../
rm -rf prjoxide
- name: Install nextpnr
run: |
git clone --recursive https://github.com/YosysHQ/nextpnr
cd nextpnr
cmake -DARCH=nexus -DOXIDE_INSTALL_PREFIX=$HOME/.cargo .
make -j`nproc`
sudo make install
cd ..
rm -rf nextpnr
- name: Build bitstream
run: |
source ./init
pip3 install packaging
echo $PATH
./make.py --board=sdi_mipi_bridge --toolchain=oxide --build --csr-json csr.json
- 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@v3
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@v2
- uses: actions/download-artifact@v3
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 https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.15.0/zephyr-sdk-0.15.0_linux-x86_64.tar.gz
tar xvf zephyr-sdk-0.15.0_linux-x86_64.tar.gz
rm -v zephyr-sdk-0.15.0_linux-x86_64.tar.gz
- 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-0.15.0/
./setup.sh -h -t riscv64-zephyr-elf
cd ../
- name: Build Zephyr App
run: |
export CMAKE_PREFIX_PATH=$PWD/zephyr-sdk-0.15.0
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