Forum Discussion
Yes, I solve, in http://electronix.ru/forum/index.php?showtopic=121400 recipe in home language. Big application based on hwlib load self from QSPI to DDR, download .rbf to FPGA and through 2 sec blink with its LEDS!
About armulator and __cs3_start_asm_sim don't know, problem was in ARM-semihosting in hwlib and Preloader: hwlib before main() uses system call "SVC 123456" with various input parameters (open stdin/stdout etc.), debugger hooks these calls and send to host, receive results and pass back to application. Without debugger or after command "set semihosting enabled false" call "SVC 123456" enter exception 2 instead processing in debugger, go to standard pure vector FFFF0008 and cycle there forever. I read semihosting API on ARM site, research necessary calls and answers back, add my semihost-simulating function "int svc_my_handler(int R0, int R1)" to C:\altera\13.1\embedded\examples\hardware\cv_soc_devkit_ghrd\software\spl_bsp\uboot-socfpga\common\spl\spl.c and set her address to FFFF0008 from "__weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)", disable interrupts (in my kit very often strange 1 to pin CP15.I) and all work !!! May be in application without using hwlib all is OK and as usual, if not using semihosting and open stdin + stdout. In 14th version of SoC EDS appear these possibility or wait another 15+th ? :)- AKb7 years ago
Occasional Contributor
Hello,
I have a custom board with cyclone V SOC . I have a 1Gbit QSPI flash attached to the HPS portion of SOC. I want to boot the HPS with qspi flash. I able to do it debug mode. But not able to do it in program mode. what i mean is that i am able to load the rbf files into the qspi flash and read back this files and program the fpga successfully in debug mode. But when i try to do it program mode it is not working. I have generated preloader_-mkpimage.bin file with all the necesssary settings as mentioned in HPS qspi boot guide documentation. i load this preloader-mkpimage in 0x00000000 address of QSPI flash using the commands in SOC Command shell. then i load my application bin file generated after compilation of my design at 0x60000 address of flash by using commands in SOC EDS Command shell. Both this operation is successfull. MSEL pins are correctly selected for QSPI Boot. When i reboot the equipment the system is not booting. Am i missing certain settings at bsp generation or in make file or the linker file. Please specify.
Regards
Avi
- hsaee65 years ago
New Contributor
We made our own baremetal tutorial.
this tutorial explains the start to end complete procedure for making the baremetal application on the HPS.overview about this tutorial
- you need to make the DDR3 settings in the QSYS HPS.
- you need to use the “hps_isw_handoff” generated by QSYS HPS and make the preloader from bsp editor.
- do the settings of the bsp editor so that you can boot from QSPI.
- make the preloader and store the preloader on the QSPI.
- make the binary image of your baremetal application using the fromelf command in DS-5 Build steps.
- add the baremetal header to your binary file which is generated from your c code compilation.
- program this binary file on the QSPI and power off and on your device.
now you are successful to boot your c program