-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nextpnr ECP5 images #22
Conversation
I took your commit and merged the code into the existing
According to Additional notes for building nextpnr, we can use
Right now we duplicate the build stages and the final images; but, surprisingly, the image for ECP5 only is smaller than the image for ICE40 only. Hence, I was unnecessarily worried about deps for ECP5 being much larger than the existing image. I believe we should build a single target that supports both architecture families and distribute a single image. This might change when Xilinx's 7 Series devices are supported, but that's not something we need to worry about now. According to Getting Started, "Recent OpenOCD for device programming (
@antonblanchard, overall:
I have successfully programmed an Icestick with prjtrellis in stage prjtrellis-build seems to be succesfully built if packages If programming ECP5 boards requires the same packages as icestorm plus OpenOCD, I think we might distribute a single image for programming boards, say |
The syntax is
In the end, I decided to keep three images:
All this WIP is in branch pnr-ecp5 (the README is updated accordingly). |
Good to know.
Great! I tested with both the
It looks like the trellis image needs a libboost library:
Thanks for doing this, it makes using all the tools so much easier. |
Note that I didn't push these changes to
Good! I tried to add ghdl-yosys-blink to the workflow (as a sanity test). See Some unrelated comments/suggestions that apply to ghdl-yosys-blink (or any other project where you might use these images):
I now added Apart of that, what about openocd? That would fit in image
I'm so glad to know that these images are useful! Unfortunately, that hardware community is lagging behind with regard to OCI usage adoption; but I hope that these or other similar images will be useful for new users as the technology spreads (podman, buildkit, WSL2 supported on Windows Home...). Currently, containers seem to be associated to docker and kubernetes, which kind of hides how useful they are for local development/testing with rapidly evolving tools. BTW, it is possible to use dbhi/qus to build docker images for foreign architectures. For example, in dbhi/docker, GHDL, GtkWave, Octave, etc. are built for amd64, arm and arm64. Each of them is published as a separate image, and a multi-arch manifest is available too. |
Done. I also switched it to default to docker because I presume most people have that and not podman.
Great, I removed the absolute path.
I do :) I got one directly from Greg who is currently working on a second revision. Hopefully it will be available sometime. I've been told the ULX3S is nice but it doesn't seem to be available either.
We should be able to install the specific boost images instead of the catch all one. If I get a chance I'll take a look.
I'm just using the Fedora 31 installed version of openocd. I presume any recentish version of openocd would work. I wonder how well a docker image of it would work, we'd need to connect the JTAG USB device to the container.
I did wonder if I should convert to a build system which is Windows compatible (cmake, meson?). I don't have much experience here.
Very nice! |
Yes, I think it is interesting because podman is not available on Windows yet. Hence, users of Docker for Windows or WSL are likely to use/require docker yet.
Cool. Note that this does not affect any of the features we provide; it'd just be an interesting enhancement. Hence, rather than trying to guess it ourselves, it'd be ok to just remember to ask it whenever we get the chance to talk to someone who is used to developing with boost.
Yes, the USB device needs to be shared between the host and the container. On GNU/Linux, this is straightforward, as you just share it with The same approach works on Windows. However, HyperV (the hypervisor where VMs are executed) does NOT support sharing USB devices other than storage devices (pendrives or hard drives). Hence, a mechanism is needed to make the device/port from the host Windows machine available as a device/port inside the container. This is USB over IP, USBIP. There is an open source USPIP server kernel module that can be installed in the VM where the docker daemon is executed. Further notes:
Summarizing, I'm interested on you being able to program the boards with a local
I'm a Windows user, but I do use MSYS2 and containers as my main terminals. Hence, I'm not specially interested on using Windows-flavoured scripts/build systems. Although WSL1 was limited to Windows Pro, it seems that WSL2 will be available for any version of Windows. Hence, any user will be able to use GNU/Linux tools. Regarding other architectures, I don't want to maintain all of the images for all the archs, because that'd be a lot of work. Nonetheless, should you be interested on having some specific image (say nextpnr-ecp5 for ppc64), just let me know. |
Oh, I forgot to say that... lucky you! 😄 I do need DDR for the projects I want to test, so ULX3S is not specially useful. Will have to wait until Greg gets his second revision. And to meet him/you at some conference. I don't think that shipping costs will be worth... |
The test passed cleanly now: https://github.com/ghdl/docker/runs/395612255#step:3:3558. I also added openocd to image |
I just tested openocd, and it works with I added a GENERIC so the LED always blinks at 1 Hz. I also tweeted it out :) Thanks for all your help! |
Great! I merged into
That's a cool feature that Tristan added very recently. It's also cool that you tweeted about it! None of us uses twitter, so these enhancements get little exposure. Thank you for testing and spreading the word! |
This is a first pass at nextpnr ECP5. I haven't hooked it into the build system yet. I presume we need a separate nextnpr binary for each target but I haven't looked closely.
It's also a separate Docker image to the ICE40, I wonder if we want to just merge them all into one.