-
Notifications
You must be signed in to change notification settings - Fork 550
Firmware
LiteX is normally used with custom firmware running on the Soft-CPU inside the gateware (although in some cases it can be used with software running on a computer connected to the FPGA).
This firmware can either be custom bare metal C code or be built on top of an existing real time operating system or even full operating system. All Soft-CPUs let you write your own bare metal firmware, but only some configurations work with operating systems.
Firmware which runs on LiteX Google Doc
All Soft-CPUs let you write your own bare metal firmware.
-
lm32
(any variant) -
or1k
(any variant) -
vexriscv
(any variant) -
picorv32
(any variant) -
minerva
(any variant)
MicroPython via FuPy Project
From the FuPy website;
The aim of this project is to make MicroPython run on FPGAs using the LiteX & Migen+MiSoC technologies. This allows you to do full stack development (FPGA gateware & soft CPU firmware) in Python!
MicroPython is great to use when ease and speed of development is more important than performance. When coupled with LiteX you can push MicroPython even further by moving performance critical parts into FPGA gateware.
MicroPython is very light on requirements;
- 32 kilobytes memory - can normally use internal block ram inside FPGA.
- 128 kilobytes of storage - can normally use spare space in SPI flash used to configure the FPGA.
-
lm32
(any variant), in FuPy repository -
or1k
(any variant), in FuPy repository - (in progress)
vexriscv
(any variant), in FuPy repository - (in progress)
picorv32
(any variant), in FuPy repository
From the NuttX website;
NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller environments, the primary governing standards in NuttX are Posix and ANSI standards. Additional standard APIs from Unix and other common RTOS's (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
NuttX is a good option if you are already using NuttX or need to use a function that is already available in the NuttX ecosystem.
Unknown.
LiteEth networking is supported.
-
lm32
(any variant), in upstream repository
From the Zephyr website;
The Zephyr Project is a scalable real-time operating system (RTOS) supporting multiple hardware architectures, optimized for resource constrained devices, and built with safety and security in mind.
Zephyr is a great choice if you don't want to write your own bare metal firmware. It is under active development and moving forward quickly.
It also has a coding style which makes it easy to move to Linux at a later state if you outgrow the abilities of Zephyr.
Zephyr is very light on requirements;
- 32 kilobytes memory - can normally use internal block ram inside FPGA.
- Some storage - can normally use spare space in SPI flash used to configure the FPGA.
-
vexriscv
(any variant), in upstream repository -
picorv32
(any variant), out of tree port
From Wikipedia;
Linux is a family of free and open-source software operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. ... Linux also runs on embedded systems, i.e. devices whose operating system is typically built into the firmware and is highly tailored to the system. This includes routers, automation controls, televisions, digital video recorders, video game consoles, and smartwatches. Many smartphones and tablet computers run Android and other Linux derivatives.[30] Because of the dominance of Android on smartphones, Linux has the largest installed base of all general-purpose operating systems.
Linux tends to run quite slowly on the soft-CPUs supported by LiteX and needs hardware acceleration to do most useful operations. Linux makes the most sense were the existing large pool of Linux drivers or software is helpful.
Linux operating support generally needs;
- Large and fast FPGA, something like Lattice ECP5 or Xilinx Artix 7 / Spartan 6.
- 32+ megabytes memory, generally meaning external SDRAM or DDR RAM.
- UART serial console.
- Fast Ethernet (100 Megabit or 1 Gigabit Ethernet).
- Some type of storage, large SPI flash or SD Card or SATA hard drives potential options.
-
or1k
(linux
variant), out of tree port being upstreamed -
vexriscv
(linux
variant), out of tree port being upstreamed
Have a question or want to get in touch? Our IRC channel is #litex at irc.libera.chat.
- Welcome to LiteX
- LiteX's internals
- How to
- Create a minimal SoC-TODO
- Add a new Board-TODO
- Add a new Core-WIP
- Add a new CPU-WIP
- Reuse-a-(System)Verilog,-VHDL,-Amaranth,-Spinal-HDL,-Chisel-core
- Use LiteX on the Acorn CLE 215+
- Load application code the CPU(s)
- Use Host Bridges to control/debug a SoC
- Use LiteScope to debug a SoC
- JTAG/GDB Debugging with VexRiscv CPU
- JTAG/GDB Debugging with VexRiscv-SMP, NaxRiscv and VexiiRiscv CPUs
- Document a SoC
- How to (Advanced)