FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5892 Discussions

CycloneV U-Boot FPGA Load Fails: Code -6

JFrye2
Novice
1,634 Views

Hello, I am trying to program the FPGA of my CycloneV from U-Boot. It appears to be failing and I am not sure why. The exact u-boot commands are

echo --- Programming FPGA --- echo -----Loading image------ # load rbf from FAT partition into memory fatload mmc 0:1 ${fpgadata} socfpga.rbf; # program FPGA echo -----Print filesize----- printenv filesize; echo -----Program FPGA------- fpga load 0 ${fpgadata} ${filesize}; # enable HPS-to-FPGA, FPGA-to-HPS, LWHPS-to-FPGA bridges echo -----Enabling IFs-------- bridge enable;

What I am seeing during boot is the following

Hit any key to stop autoboot: 0 449 bytes read in 3 ms (145.5 KiB/s) ## Executing script at 02000000 --- Programming FPGA --- -----Loading image------ 7007204 bytes read in 366 ms (18.3 MiB/s) -----Print filesize----- filesize=6aebe4 -----Program FPGA------- Command 'load' failed: Error -6 -----Enabling IFs-------- switch to partitions #0, OK mmc0 is current device

What does the error code -6 mean? When I look at FPGA manager status in Linux, it prints the following.

root@cyclone5:~# cat /sys/class/fpga_manager/fpga0/state write init

 

 

0 Kudos
5 Replies
Ahmed_H_Intel1
Employee
1,471 Views

Is this based on the GHRD? or custom design.

 

0 Kudos
JFrye2
Novice
1,471 Views

@AhmedH_Intel​ , sorry for the delayed response. This is a custom design. I tried putting my question out on the u-boot mailing list and they redirected me back here since Intel maintains https://github.com/altera-opensource/u-boot-socfpga

 

I am targetting DE1-SoC with the u-boot software from the repo above.

 

I tried socfpga_cyclone5_defconfig and that led to the programming error.

 

I also tried socfpga_de1_soc_defconfig and I didnt even get console messages when I booted when I used that configuration.

 

 

I can send you a zip of the hardware design if needed.

 

Thanks.

0 Kudos
Ahmed_H_Intel1
Employee
1,471 Views

Hi,

Are you trying to store the kernel or the FPGA image on the flash? (like Nand flash)

I saw this issue before while storing them on a NAND flash. We recommend storing the file system on NAND.

Please confirm.

0 Kudos
sf69
Beginner
1,374 Views

with the Cyclone V SOC Development Board

i have the same issue, loading from u-boot the rbf file:

=> dhcp ${loadaddr} soc_system.rbf
.....
Bytes transferred = 7007204 (6aebe4 hex)
=> fpga load 0 ${loadaddr} $filesize;
Command 'load' failed: Error -6

But if i compress the rbf file:

=> dhcp ${loadaddr} soc_system_compressed.rbf
Bytes transferred = 3051080 (2e8e48 hex)
=> fpga load 0 ${loadaddr} $filesize;

it works

is there a size limit somewhere ?

thanks

 

 

 

0 Kudos
MV
New Contributor I
533 Views

I think this is a good question and begs for an answer.
Running into a similar issue and also speculating about a size limit of .rbf file that perhaps  u-boot or the FPGA driver is able to handle.
Anyone can shed light on this?
Thanks!

0 Kudos
Reply