News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

read/write datasets

Started by Fady, May 12, 2015, 11:44:47 AM

Previous topic - Next topic

Fady

hi,

i succeeded to boot a petalinux image on zynq 7020 with sd card. i tried petalinux "hello world" custom application. and now i want to create another petalinux application that reads datasets from sd card(rootfs) and stock it in ddr or nand memory.

so how can i do it? if there is a tutorial.

best regards,

Tim S.

#1
Hi Fady,

my first idea is to memory map your SD card. Look in google for 'memory mapping'. I recommend you http://www.gnu.org/software/libc/manual/html_node/Memory_002dmapped-I_002fO.html.

After you have allocated a pointer to your SD card you can easily access the data.

To memory map your SD card you have to know the CPU memory space address of your SD controller. Mabye this page is useful for you: http://linux-sunxi.org/Memory_map. Look for  'MMC0 Config registers'.

I run this method successfully to get data from my own created counter in FPGA via AXI and subsequently to display it in putty.

Best regards

Tim

EDIT: Use the attached text file for better understanding, maybe you can modify and use it.