Giter VIP home page Giter VIP logo

litex-template's Introduction

Template project for LiteX - based SoCs

Various pieces and examples that are not in LiteX yet and a reproducible environment to build and use them.

Features:

  • LiteX-related repositories are registered as git submodules so that their exact versions are tracked
  • a poetry environment is used to keep your system and user Python environments clean, therefore you can have multiple such projects using different versions of LiteX repositories etc.
  • LiteX-related packages are installed in the development mode so that they can be worked on easily
  • simple and compact

How to use:

  • clone this repository recursively
  • check the dependencies below
  • use one of the following:
    • A complete (gateware + Cortex-A9 firmware) workflow for Zynq-7000 demonstrated on Digilent Zedboard
    • Xilinx KV260 / ZCU216: build all required binaries and run LiteX gateware and BIOS on Zynq Ultrascale+ / Cortex-A53 via JTAG: make -f Makefile.kv260 load (or Makefile.zcu216); use USB-serial terminal on the board (more detailed description coming)
    • Quicklogic Quickfeather - build and flash complete (gateware + BIOS on Cortex-M4) boot images: make -f Makefile.quickfeather flash; serial terminal is on pins J3.2/J3.3
    • Gowin AHB Flash access simulation with LiteX and Verilator
    • other SoC/software/simulation examples in src: new description coming soon

External dependencies - have to be in PATH:

  • GNU Make, Ninja, Python 3.9+, poetry (Ubuntu 20.04 and similar: apt install make ninja-build python3.9 python3-pip; pip install poetry)
  • For RISC-V cores: RISC-V GNU toolchain (riscv64-elf variant is usually fine)
  • For all 32-bit ARM cores: GNU Arm Embedded Toolchain (arm-none-eabi) - 10.3-2021.10 tested
  • For 64-bit ZynqMP: GNU Toolchain for the A-profile Architecture (aarch64-none-elf) - 10.3-2021.07 tested
  • For Xilinx Zynq(MP) to build U-Boot: GNU Toolchain for the A-profile Architecture (aarch64-none-linux for ZynqMP, arm-none-linux-gnueabihf for Zynq7000) - 10.3-2021.07 tested
  • For ZynqMP PMU firmware build: makeinfo, help2man, libtool (apt install texinfo help2man libtool-bin)
  • For implementation on Xilinx devices: Xilinx Vivado (2021.2 tested; for some Zynq-related tasks it is convenient to install it as Vitis configuration)
  • For implementation on Gowin devices: Gowin EDA
  • optional: OSS CAD Suite - yosys for synthesis, OpenOCD and openFPGALoader for programming, verilator and gtkwave for simulations
  • see LiteX readme for potential additional requirements like json-c and libevent

litex-template's People

Contributors

dependabot[bot] avatar sergachev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

litex-template's Issues

Booting Zedboard ARM BIOS

I was playing around to get Zedboard ARM BIOS working, and eventually port it to Pynq Z1 board.

Running make gateware:

make[1]: Leaving directory '/home/rax/exp/litex/litex-template/build/software/liblitesata'
make[1]: Entering directory '/home/rax/exp/litex/litex-template/build/software/firmware'
CC isr.o
CC main.o
CC firmware.elf
riscv64-unknown-elf-gcc: error: ../libbase/crt0.o: No such file or directory
make[1]: *** [/home/rax/exp/litex/litex-template/src/firmware/Makefile:14: firmware.elf] Error 1
make[1]: Leaving directory '/home/rax/exp/litex/litex-template/build/software/firmware'
Traceback (most recent call last):
File "/home/rax/exp/litex/litex-template/src/main.py", line 53, in
main()
File "/home/rax/exp/litex/litex-template/src/main.py", line 49, in main
builder.build(run=args.build_gateware, synth_mode="yosys" if args.yosys else "vivado")
File "/home/rax/exp/litex/litex-template/lib/litex/litex/soc/integration/builder.py", line 319, in build
self._generate_rom_software(compile_bios=use_bios)
File "/home/rax/exp/litex/litex-template/lib/litex/litex/soc/integration/builder.py", line 263, in _generate_rom_software
subprocess.check_call(["make", "-C", dst_dir, "-f", makefile])
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-C', '/home/rax/exp/litex/litex-template/build/software/firmware', '-f', '/home/rax/exp/litex/litex-template/src/firmware/Makefile']' returned non-zero exit status 2.
Command exited with non-zero status 1
0:01.21

I understand there has been some path changes recently from libbase to bios for crt0.o etc. Some guidance to fix this would be helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.