Uploading image to FPGA
-
- Posts: 20
- Joined: Thu Oct 02, 2014 8:26 am
Uploading image to FPGA
Hi,
I've been working away with the RedPitaya and trying to make a few changes at each of the various levels (HTML, C, Verilog) and have been struggling with updating the FPGA using the procedure given by the FPGA Development Environment Wiki page and the forum page: viewtopic.php?f=8&t=49.
I've managed to make the environment and the applications in my cloned repository. After that, I've used Vivado 2013.3 to alter a few simple things in the FPGA, i've compiled it and made the .bit file, and then made it into a .bin file using the Promgen tool.
But now I'm a bit stuck and would really appreciate some advice. I'm not quite sure what .bin file is needed to be given to the RedPitaya (red_pitaya_top.bin or boot.bin) and how to send it - the Wiki page talks about "loading the new image" and I was wondering how to do this.
I've been able to do the "cat red_pitaya_top.bin > /dev/xdevcfg" command but am unsure as to what it actually does - I'm very new to FPGAs.
If anyone could spare some advice, it would be much appreciated.
Thanks!
I've been working away with the RedPitaya and trying to make a few changes at each of the various levels (HTML, C, Verilog) and have been struggling with updating the FPGA using the procedure given by the FPGA Development Environment Wiki page and the forum page: viewtopic.php?f=8&t=49.
I've managed to make the environment and the applications in my cloned repository. After that, I've used Vivado 2013.3 to alter a few simple things in the FPGA, i've compiled it and made the .bit file, and then made it into a .bin file using the Promgen tool.
But now I'm a bit stuck and would really appreciate some advice. I'm not quite sure what .bin file is needed to be given to the RedPitaya (red_pitaya_top.bin or boot.bin) and how to send it - the Wiki page talks about "loading the new image" and I was wondering how to do this.
I've been able to do the "cat red_pitaya_top.bin > /dev/xdevcfg" command but am unsure as to what it actually does - I'm very new to FPGAs.
If anyone could spare some advice, it would be much appreciated.
Thanks!
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Uploading image to FPGA
After you have successfully created a new boot.bin, you just need to copy it to the SD-card into the root directory.
Either mount the SD-card in your development system and overwrite the existing boot.bin (create a backup first!), or transmit your new boot.bin to the running RedPitaya and copy it in place like this (I'm assuming you scp'ed your boot.bin to /tmp):When you reboot the RedPitaya with the altered SD-card, your new FPGA design will become active.
When you use cat xxx >/dev/xdevcfg, you reconfigure the FPGA once with the new bitstream. Your design will become active immediately, but will be lost after a reboot. For development purposes this is a very convenient option.
Either mount the SD-card in your development system and overwrite the existing boot.bin (create a backup first!), or transmit your new boot.bin to the running RedPitaya and copy it in place like this (I'm assuming you scp'ed your boot.bin to /tmp):
Code: Select all
redpitaya> rw
redpitaya> mv /opt/boot.bin /opt/boot.bin.old
redpitaya> cp /tmp/boot.bin /opt/
redpitaya> chmod 755 /opt/boot.bin
redpitaya> ro
redpitaya> reboot
When you use cat xxx >/dev/xdevcfg, you reconfigure the FPGA once with the new bitstream. Your design will become active immediately, but will be lost after a reboot. For development purposes this is a very convenient option.
-
- Posts: 20
- Joined: Thu Oct 02, 2014 8:26 am
Re: Uploading image to FPGA
It works!
Thank you so much - that's unbelievably helpful and has resolved all of my struggles from the last week.
Thank you so much - that's unbelievably helpful and has resolved all of my struggles from the last week.
-
- Posts: 20
- Joined: Thu Oct 02, 2014 8:26 am
Re: Uploading image to FPGA
Hi again,
The temporary upload is working perfectly but when I change the boot.bin file to the one I've built, it won't load. I presume that I have forgotten some aspect of the file so as it is incomplete.
I've followed the:
make FPGA_TOOL=vivado clean -- deletes all temporary files
make FPGA_TOOL=vivado fpga -- builds red_pitaya.bit
make FPGA_TOOL=vivado sw_package -- builds fsbl.elf, device_tree.dts,...
make FPGA_TOOL=vivado image -- runs ./image/Makefile, makes boot.bin, patched device_tree.dtb. Results can be found in ./image/out directory
procedure, creating an out file under image for the boot.bin and devicetree to be stored under. I then copy my boot.bin over the RP's /tmp.
Have I forgotten anything?
Thanks very much
The temporary upload is working perfectly but when I change the boot.bin file to the one I've built, it won't load. I presume that I have forgotten some aspect of the file so as it is incomplete.
I've followed the:
make FPGA_TOOL=vivado clean -- deletes all temporary files
make FPGA_TOOL=vivado fpga -- builds red_pitaya.bit
make FPGA_TOOL=vivado sw_package -- builds fsbl.elf, device_tree.dts,...
make FPGA_TOOL=vivado image -- runs ./image/Makefile, makes boot.bin, patched device_tree.dtb. Results can be found in ./image/out directory
procedure, creating an out file under image for the boot.bin and devicetree to be stored under. I then copy my boot.bin over the RP's /tmp.
Have I forgotten anything?
Thanks very much
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Uploading image to FPGA
Just to avoid misunderstandings, after the copy did you also do the steps outlined in my previous post ?I then copy my boot.bin over the RP's /tmp.
Have I forgotten anything?
(namely, making the SD writable, copying the boot.bin to /opt, etc.)
-
- Posts: 20
- Joined: Thu Oct 02, 2014 8:26 am
Re: Uploading image to FPGA
Yes I did. Then after I reboot it, it won't reconnect.
Is the boot.bin file I need the one in /image/out? That's the one I've been using
Is the boot.bin file I need the one in /image/out? That's the one I've been using
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Uploading image to FPGA
Yes, that is the right file. The way you created it is not exactly the same as during a full build, but the steps look right.
You could try to do an ecosystem build from a fresh checkout (provided you have a commit with your functional changes somewhere) and try the /target/boot.bin file that is emitted in the process. That's the only idea I have right now.
You could try to do an ecosystem build from a fresh checkout (provided you have a commit with your functional changes somewhere) and try the /target/boot.bin file that is emitted in the process. That's the only idea I have right now.
-
- Posts: 20
- Joined: Thu Oct 02, 2014 8:26 am
Re: Uploading image to FPGA
I remade the ecosystem and applications, and used the boot.bin file under build. This worked perfectly.
Thanks again
Thanks again
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Uploading image to FPGA
You're welcome. I don't know if you followed the other discussions, or if you found out yourself already, but as it turns out you can also "make build/boot.bin" explicitly. Thought I'd mention it^^
-
- Posts: 20
- Joined: Thu Oct 02, 2014 8:26 am
Re: Uploading image to FPGA
Ah, I did see that at some point but didn't put it all together! I'll try that next time - it's probably much faster
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 19 guests