RFQ - Extend Litex Support - help wanted

So the GOAL is to extend platformio with the ability to easily compile firmware for litex FPGA based boards.

something like this: platformio + <board>_csr.json + src/code => firmware.bin

So the basic workflow can be:

  1. Create your FPGA design using LiteX or just create a hardware instantiation of the readily available board configurations in litex-boards, during this process a board_csr.json configuration can be generated.

  2. Use the board_csr.json with github.com/litex-hub/litex-renode/pull/34 in order to generate DST and configuration overlays for the platformio Zephyr framework.

There is still some stuff to work out:

  • [ ] Add platformio patch to allow for rv32im[a] compilation, see: github.com/platformio/zephyr/pull/9
  • [ ] Would be nice to add generate-zephyr-dts.py as part of github.com/zephyrproject-rtos/zephyr
  • [ ] Engage with the platformio community on how to deal with specific board variants.
    Multiple solutions exist but it depends on what the community feels most comfortable with…

Some initial support is in github.com/hvegh/platform-litex

If you have affinity with litex || platformio || zephyr. Or you have always wanted to experiment FPGA’s and use this exciting technology the tools are readily available for everyone…

Please note I am not a seasoned platformio dev so I will make much more mistakes, if you know how to move some of this stuff and can help that would be awesome!

2 Likes

Note:
This Pythone script generates Zephyr overlays from csr_json files and works in standalone mode:
generate-zephyr-dts.py