icebreaker-fpga / icebreaker-litex-examples

Example litex Risc-V SOC and some example code projects in multiple languages.
65 stars 17 forks source link

Update LiteX examples #9

Closed gregdavill closed 2 years ago

gregdavill commented 2 years ago

The LiteX example has suffered a bit of bit-rot. This example is mostly immune from upstream changes as we have a local copy of a LiteX at a specific commit, but after some repos moved I think this stopped building.

I've updated to the latest commit of LiteX, and fixed some small bugs in that process.

I've added the picolibc and compiler_rt submodules. Even though we're not building the LiteX bios it appears there is no way to remove this dependency.

I've also added a github action so that the SoC and firmware is built in a CI, to detect when things might break in the future.

gregdavill commented 2 years ago

So this doesn't appear to run... Let me poke a bit more around with some hardware.

Disasm commented 2 years ago

You're a new contributor and GitHub requires a repo maintainer to press a button to run CI for the first time. Maybe @esden could do this?

gregdavill commented 2 years ago

You're a new contributor and GitHub requires a repo maintainer to press a button to run CI for the first time. Maybe @esden could do this?

I should have been clear, in it's current state, it doesn't run on the icebreaker.

Disasm commented 2 years ago

I performed the build locally and it works fine. LEDs blink and UART shows "a" characters (provided the rust firmware was uploaded).

gregdavill commented 2 years ago

Interesting. Here the SoC as presented in this pull-request does not boot. I'm testing the c-firmware.

Appears it's related to the memory-mapped flash, since updating to use LiteSPI works, but then there is an upstream bug that breaks the documentation generation.

Disasm commented 2 years ago

C firmware doesn't work for me neither. I noticed that literally all litex-related files (including generated ones) in this example are outdated. However, updating these files didn't help.

Disasm commented 2 years ago

Now both Rust and C examples work for me :) Could you also commit the updated contents of rust/icebesoc-pac?

gregdavill commented 2 years ago

It should be working again. But these changes hit this bug when generating documentation: https://github.com/litex-hub/litespi/issues/61

I'd like to get the docs automatically published/updated in the ci-build.

esden commented 2 years ago

I have just tested it. Without debug it all works great. Thus I am merging it. Unfortunately I can't get the --debug version of the core to work with wishbone-tool. Not really sure what is going on there. But this is definitely much much better than not working at all. :) Thank you very much for the great contribution @gregdavill :)

gregdavill commented 2 years ago

Thanks! I didn't run through the debug steps as outlined in the readme. I'll take a look at that.