-
Notifications
You must be signed in to change notification settings - Fork 4
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
New port to colorlight_i5 ecp5 board #5
Comments
Update: If I store the user program in a1, the user program starts on boot, but no way to get to the bootloader any more ... Very puzzling .. Update2: Hmmm seems my board has 32Mbit flash not BYTE, so that makes it 4Mbyte! I have adjusted the bardinfo.vh file accordingly .. I have put the bootloader into A2 partition and the User code into A0 as that is the one at the bootaddr of 0x100000 .. |
@oskirby Regarding what you said on the |
Hey @bmentink the ability to support multiple boot images on the ECP5 family is unfortunately rather crude. But hopefully this might help explain the boot process:
This reset logic can be chained as many times as you like. So the user image could set yet another The first three partitions in the SPI flash, starting from address zero, are ordered as followed:
However, the normal convention I've observed with the DFU protocol is that alternate mode zero (the default) should normally be the one that the user is expected to work with when updating their board. And for this reason I decided to use I hope that help clears some things up. |
@oskirby If the If the lack of getting to ( I have limited schematics for this board. It has been partially reverse-enginerred, but not everything, I suspect I will have to have the board x-rayed, or re-flow the BGA,to see where the W3 pin goes to .. it should in the very least go to a pull-up resistor) |
@oskirby ? |
I didn't test this but from reading the Lattice docs the equivalent of toggling |
Hey there @oskirby @bmentink - I came across this thread as I am also playing with multiboot on the colorlight i5/i9. I am using a different bootloader BUT I believe I found the PROGRAMN pin on the Colorlight i5 (board rev V7.0). By poking around (at risk of damage of course) I found it is exposed on an external pullup resistor. R106, the pad closest to the ECP5 part -- I verified that it works by flashing 2 images with different LED blinking behaviours, the first one with bootaddr 0x100000 and the second one with bootaddr 0x0, and shorting this pin to ground seemed to switch between the two images correctly - which indicates it is PROGRAMN and not some other kind of reset. You have to be VERY careful shorting it, I found if you don't make good contact it would just restart back into the old image (probably some debouncing / minimum time required) So in theory a rudimentary hack for the Colorlight i5 could be to add a bodge wire connecting this pad to some other pin. Just thought I'd share this to save someone else some time :) |
Hi There,
I am trying to port your booloader to the above board. After tweaking the board pin constraints file to the new board, and a few other tweaks, I now have the bootloader running when I download directly to the FPGA. (Based my port on the logicbone_ecp5 target board)
I then see the dfu device and
dfu-util -l
reports the following:I can use dfu-util to upload the bootloader *.bit file to the a2 partion, and that completes fine. I then upload my user code to a1 partion, and that also completes fine. (should it be a1 or a0?)
I then unplug my usb(s) and reboot using only the usb that is direct conneced to the FPGA and the bootloader runs.
My problem is that I can't see a way to boot my user code over the same direct connected USB interface. Does the pwr_button have something to do with that? (I had to set it to"0" to get everything working)
Please explain what this button does, I don't have a user button on this board ..
Please explain how the bootloader decides what image to boot .. (bootloader at a2, or user image at a1)
Many Thanks for the great code ..
PS: I see to have 32Mb Flash on this colorlight module, but I still have the boardinfo.vh file, SPI_FLASH_SIZE still at 16Mb, is that an issue?
The text was updated successfully, but these errors were encountered: