I was trying program bootloader to DE10-nano evaluation board and got the following error:
$ quartus_hps.exe -c 1 -o PV 'c:\My\1609\preloader-mkpimage.bin'
Current hardware is: DE-SoC [USB-1]
Successfully change hardware frequency to 16Mhz
Found HPS at device 1
Double check JTAG chain
HPS Device IDCODE: 0x4BA00477
AHB Port is located at port 0
APB Port is located at port 1
Double check device identification ...
Error: BSEL (5) is neither from NAND nor QSPI, set the correct BSEL and powercycle your board
Error: Quartus Prime Programmer was unsuccessful. 0 errors, 0 warnings
Error: Peak virtual memory: 4254 megabytes
Error: Processing ended: Thu Aug 18 11:58:45 2022
Error: Elapsed time: 00:00:02
Error: Total CPU time (on all processors): 00:00:00
Later I found that Terasic DE10-nano Wiki says the board does not have neither NAND nor QSPI flash but the board schematic do shows S25FL128 flash connected to Cyclone V.
When I set MSEL switch on board to EPCS configuration and I can see FPGA demo LEDs work so why can't I program this flash with HPS boot image?
I think the schematic you are looking at is a base reference for other Cyclone V models as well.
Refer to the link below from Terasic Wiki, DE10 Nano doesnt have NAND and QSPI flash mounted on the board:
This is a bit strange because I when take the SD card out and set the MSEL switch to QSPI mode the board has FPGA configured after reset - the orange conf LED is on and user LEDs are blinking with a nice looking pattern. Probably, this Wiki page is not up to date.
I suspect the problem is that Golden Reference design does not have QSPI as HPS peripheral.
We do not receive any response from you to the previous question/reply/answer that I have provided. This thread will be transitioned to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.