Hi magic forum,
I've been trying to make a small bare-metal program working on terasic de10 board with altera cyclone V soc ARM on it. I have some trouble when trying to boot the program from sd card. Here is a brief summary what I did:
For the FPGA part, I just use the example program called DE10-Standard_GHRD from DE10 system CD, compiled with Quartus and generate preloader from it according to this(pg. 69-70). Basically I leave everything as default but enabled FAT-SUPPORT, BOOT_FROM_SDMMC, disabled WATCHDOG_ENABLE. Then I run make to get preloader-mkpimage.bin.
For the software, I made a small program to blink LED, to load this program, I first tried with DS-5 debugger and load through JTAG to the board, it works fine.
Then I tried to load the program from sd card, I've write the preloader(preloader-mkpimage.bin) to a2 partition and put this LED blinking program image(blinking.img) in the fat partition, however, this time it won't work. I can see from putty terminal that the preloader tried to load the image but it stuck at reading blinking.img. However if i replace the blinking.img with linux image, then the linux will be booted. So I think the preloader is ok.
Any ideas which part I might do wrong? I double checked the program entry address and matched the image name with the one I specified in bsp editor.
Thanks in advance!
I've been trying to make a small bare-metal program working on terasic de10 board with altera cyclone V soc ARM on it. I have some trouble when trying to boot the program from sd card. Here is a brief summary what I did:
For the FPGA part, I just use the example program called DE10-Standard_GHRD from DE10 system CD, compiled with Quartus and generate preloader from it according to this(pg. 69-70). Basically I leave everything as default but enabled FAT-SUPPORT, BOOT_FROM_SDMMC, disabled WATCHDOG_ENABLE. Then I run make to get preloader-mkpimage.bin.
For the software, I made a small program to blink LED, to load this program, I first tried with DS-5 debugger and load through JTAG to the board, it works fine.
Then I tried to load the program from sd card, I've write the preloader(preloader-mkpimage.bin) to a2 partition and put this LED blinking program image(blinking.img) in the fat partition, however, this time it won't work. I can see from putty terminal that the preloader tried to load the image but it stuck at reading blinking.img. However if i replace the blinking.img with linux image, then the linux will be booted. So I think the preloader is ok.
Any ideas which part I might do wrong? I double checked the program entry address and matched the image name with the one I specified in bsp editor.
Thanks in advance!