litex-hub / zephyr-on-litex-vexriscv

BSD 2-Clause "Simplified" License
12 stars 10 forks source link

Zephyr-on-litex-vexriscv

Zephyr on LiteX VexRiscv is a LiteX SoC builder for the litex_vexriscv platform in Zephyr. Currently it supports Digilent Arty A7-35T Development Board and SDI MIPI Video Converter.

Prerequisites

First, if you want to run Zephyr on Digilent Arty, you have to install the F4PGA toolchain. It can be done by following instructions in this tutorial. For SDI MIPI Video Converter - install oxide (yosys+nextpnr) toolchain by following these instructions.

Then, clone and enter the Zephyr-on-litex-vexriscv repository:

git clone https://github.com/litex-hub/zephyr-on-litex-vexriscv.git && cd zephyr-on-litex-vexriscv

Get all required submodules and packages, and run the install script:

git submodule update --init --recursive
apt-get install build-essential bzip2 python3 python3-dev python3-pip
./install.sh

Build

Build the bitstream by following these steps:

Build options

Option Help
--toolchain FPGA toolchain
--board FPGA board
--build build bitstream
--variant FPGA board variant
--load load bitstream
--with-ethernet Enable ethernet
--with_i2s Enable i2s
--sys-clk-freq System clock frequency
--with_spi Enable SPI
--with_spi_flash Enable SPI flash
--with_i2c Enable i2c
--with_pwm Enable PWM
--spi-data-width SPI data width
--spi-clk-freq SPI clock frequency
--spi_flash_rate SPI flash rate
--with_mmcm Enable MMCM
--local-ip local IP address
--remote-ip remote IP address

Load bitstream

Connect your board using the serial port and load the bitstream:

For Digilent Arty board:

source ./init
./make.py --board=arty --load

For SDI MIPI board:

source ./init
./make.py --board=sdi_mipi_bridge --load