element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Atmel Xplained Boards
  • Products
  • Dev Tools
  • Atmel Xplained Boards
  • More
  • Cancel
Atmel Xplained Boards
Blog sama5d3 xplained violet - mount and access the SD card slot
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Atmel Xplained Boards to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 4 Oct 2014 5:37 PM Date Created
  • Views 416 views
  • Likes 1 like
  • Comments 0 comments
Related
Recommended

sama5d3 xplained violet - mount and access the SD card slot

Former Member
Former Member
4 Oct 2014

This post is about being able to access the SD card slot on the xplained board.

 

First off, we need to log into our xplained board, either use the usb cable and follow the connection guide or read my blog post on accessing it using ssh (http://www.element14.com/community/community/designcenter/sama5d3xplained/blog/2014/10/04/sama5d3-xplained-violet--ssh-into-the-sama5d3-xplained-through-network-cable).

 

Once your at the command prompt of the xplained board:

 

type:

cat /etc/fstab

this should produce the following

 

# stock fstab - you probably want to override this with a machine specific one

 

rootfs                         /                        auto             defaults              1  1

proc                           /proc                  proc             defaults              0  0

devpts                        /dev/pts             devpts          mode=0620,gid=5       0  0

usbdevfs                    /proc/bus/usb      usbdevfs      noauto                0  0

tmpfs                         /run                    tmpfs           mode=0755,nodev,nosuid,strictatime 0  0

tmpfs                         /var/volatile         tmpfs           defaults              0  0

 

 

 

# uncomment this if your device has a SD/MMC/Transflash slot

#/dev/mmcblk0p1       /media/card          auto            defaults,sync,noauto  0  0

 

The part we are interested in is the very bottom line, its been commented out. All we need to do is remove the "#" in order to uncomment it.

The /dev/mmcblk0p1 is the actual device. and the /media/card is where then device will mount to and where we will find the files.

 

Before we uncomment it, lets make the directory where we would like it mounting since it doesn't yet exist.

 

type

mkdir /media/card

 

You can mount it elsewhere by changing the location in the fstab file and creating the physical directory elsewhere, but for the time being lets keep things easy.

 

next is to uncomment the bottom line in your fstab file:

 

type

vi /etc/fstab

You will now be in a basic text editor, feel free to do a google search to see how to use it, but for our purposes its very simple. move your cursor to the bottom line using the down arrow and delete the "#" hash character highlighted in bold and underlined below. just navigate to it and press the delete button on your keyboard.

 

# stock fstab - you probably want to override this with a machine specific one

rootfs                         /                        auto             defaults              1  1

proc                           /proc                  proc             defaults              0  0

devpts                        /dev/pts             devpts          mode=0620,gid=5       0  0

usbdevfs                    /proc/bus/usb      usbdevfs      noauto                0  0

tmpfs                         /run                    tmpfs           mode=0755,nodev,nosuid,strictatime 0  0

tmpfs                         /var/volatile         tmpfs           defaults              0  0

 

 

# uncomment this if your device has a SD/MMC/Transflash slot

#/dev/mmcblk0p1       /media/card          auto            defaults,sync,noauto  0  0

then type

 

:wq

you need to type the colon first then "wq" then press enter. the colon tells it that we are issuing a command. the"wq" says that we would like to quit and save changes.

 

you should now be back at the command prompt, lets have a quick look at the file to make sure our changes have been saved:

 

cat /etc/fstab

 

we should see

 

# stock fstab - you probably want to override this with a machine specific one

 

rootfs               /                    auto       defaults              1  1

proc                 /proc                proc       defaults              0  0

devpts               /dev/pts             devpts     mode=0620,gid=5       0  0

usbdevfs             /proc/bus/usb        usbdevfs   noauto                0  0

tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0

tmpfs                /var/volatile        tmpfs      defaults              0  0

 

# uncomment this if your device has a SD/MMC/Transflash slot

/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  0

 

 

virtually the same as before only without the "#" at the beginning of the bottom line, this means that line is now active.

 

If you insert a card into the sdcard slot and type

mount /dev/mmcblk0p1

The sdcard is now mounted and you will find its contents in /media/card just type

ls /media/card

to retrieve a directory listing of the files on your card. From there, use standard commands to copy, execute files etc.. and the umount command to safely unmount the sdcard before you remove it.

 

***********************************************TODO**************************************************************

 

Another thing for my todo list: create a script to auto mount the sdcard when one is inserted

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube