cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
1,998 Views
Registered: ‎04-25-2018

Filo I/O operations from SD card in Xilinx Zynq ZCU102

I'm using a Xilinx Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit. I want to run a C++ program in the Xilink SDK tool(running on a Windows machine) that can do Filo I/O operations on a binary file stored in the SD card in the Zync board. I have the command line tool(xsct) setup. My questions are as follows:

  1. What are the commands that I have to execute in XSCT tool to mount the SD card?
  2. Once the SD card is mounted, how can I query for the SD card drive(whether C:\ or D:\ drive)?
0 Kudos
5 Replies
Highlighted
Moderator
Moderator
1,967 Views
Registered: ‎06-27-2017

Hi @naveen.periasamy,

 

1. You do not need to use the command to mount from xsct. you can directly use the drive where windows monted the SD card.

2. Yes, you can directly point like how you are accessing C or D drive(like C:\ or D:\)

 

---------------------------------------------------------------------------------------------------

Kindly mark this post as accepted solution if provided information is helpful

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
Highlighted
1,956 Views
Registered: ‎04-25-2018

Hi @gudishak,

                         Thanks for the response. So I understand I can directly plug in the SD card and start running my Filo I/O programs on it. But, Please clarify on the following:

 

"2. Yes, you can directly point like how you are accessing C or D drive(like C:\ or D:\)"

 

How do I know which drive to point to for SD card? Is there a way to query that in the xsct terminal?

0 Kudos
Highlighted
1,934 Views
Registered: ‎04-25-2018

@gudishak, to clarify, neither the Zync board nor the SD card in it shows up as a removable storage device in the windows PC to which the Zync board is connected. So how can I find out the drive information for the SD card? 

0 Kudos
Highlighted
Moderator
Moderator
1,876 Views
Registered: ‎06-27-2017

Hi @naveen.periasamy,

 

If you are running standalone application in SDK to access SD card, you might need to initialize the SD as mentioned in standalone driver below,

https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/sdps/src/xsdps.c

 

you can access SD from xsct shell if you connected it to your windows PC.

 

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
Highlighted
1,861 Views
Registered: ‎04-25-2018

Hi @gudishak,

                          Thanks for the reply. Just a few clarifications,

 

1. In xsdps.c, I don't see a main function that calls the SD call initialization subroutines XSdPs_CardInitialize and XSdPs_SdCardInitialize. It is not clear how InstancePtr pointer is initialized. Is there any document or thread you can point to which explaines how these subroutines are run to initialize the SD card?

 

2.

"you can access SD from xsct shell if you connected it to your windows PC."

So just to clarify, I can use the xsct terminal to access SD card only if it is directly connect to the windows PC and not to the Zync board connect to the windows PC? 

 

3. What commands do I use to access the SD card or see the drive information? 

I see a command called 'targets' in this document, which shows the processors in the zync board. Is there a similar command which will show the SD card information? 
 

 

0 Kudos