Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
320 Discussions

How to access files on the SD Card from a bare metal application?

FSola1
Beginner
1,304 Views

Hello;

 

I am currently writing a C program, in a bare metal approach (I need bare metal due performance restrictions), currently I am able to transfer data from the C program to the FPGA . The board that I'm using the Altera Cyclone V DE1 - SoC.

 

Next step, is to access a file on the SD Card from the HPS and then transfer that information to the FPGA. However, I can't find any documentation or examples to do this process. Do I need to write a SD Card driver from scratch? Is there any example available?

 

EDIT: what i need is a way to access files that are stored on the SD card from the bare metal C code.

 

Thanks in advance.

3 Replies
Ahmed_H_Intel1
Employee
434 Views
Hi, Are you using the SD card in booting? Can you share the SD card format? I will check if this needs a certain driver to control the SD card.
FSola1
Beginner
434 Views

Hi,

 

Yes I am booting from the SD card using the preloader, that loads u-boot, and then it loads the bare metal C program to the HPS, and the .rbf code to program the FPGA as well.

Here is the SD Layout I am using

 

sd_layout.png

Ahmed_H_Intel1
Employee
434 Views
Hi, The following document has a useful info for you, please check: https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_bm.pdf
Reply