Forum Discussion

AJama4's avatar
AJama4
Icon for Occasional Contributor rankOccasional Contributor
6 years ago

De1-SoC: Running bare-metal from SD Card

Hi Guys, I am stuck in running a bare-metal program from SD Card. I would highly appreciate if somebody could suggest whats going wrong.

Here’s what I’ve done sofar:

  1. Created basic HPS design with UART and SDMMC peripherals enabled but I have also tried with De1-SoC Computer system that’s shipped as an example design in Intel SOC FPGA program.
  2. Built hardware design to .SOF without error and converted SOF to RBF so that it can be loaded by pre-loader
  3. Using the ‘hps_isw_handoff’, created the spl_bsp with bsp-editor and in the settings, I checked “boot from SDMMC”.
  4. Compiled preloader using ‘make’ which generated preloader-mkpimage.bin without error
  5. Ran alt-boot-disk-util to update pre-loader image on special partition of SD card ( Type ‘a2’)
  6. Created C LED blinking eclipse project in SoC EDS application. Verified the working of the program in Bare-metal debugger. Works fine using debugger script and BTW preloader is also working while showing all the preloader booting messages on my serial terminal.
  7. Compiled example C project to .AXF with no errors using baremetal compiler. Then convert it to .bin using fromelf command and then convert it in .img with mkimage tool.
  8. (mkimage -A arm -O u-boot -T standalone -C none -a 0x02100000 -e 0 -n “baremetal
  9. image” -d blink.bin blink.img) [[Am I using the correct load address (hex)??]]
  10. Copied BIN file and .RBF file to SD card FAT partition and inserted SD card into board
  11. Load .sof file on De1-SoC board (because .rbf file was not able to program FPGA by the preloader )
  12. Reset HPS by pressing reset button

Pre-loader uboot output is as follows:

U-Boot SPL 2013.01.01 (Aug 27 2019 - 08:37:10)

And it does nothing…

Am I missing something very basic? It’s strange that I could not found official documentation on it.

Best regards,

Adeel

4 Replies