Main Content

socWriteSDCardImage

Write board-specific SD card image files to host SD card location

Since R2024a

Description

status = socWriteSDCardImage(imageFilePath) writes the SD card image files of the specified board to the specified SD card drive location on the host computer. The SD card image files contain a bootloader and the suitable operating system information.

example

status = socWriteSDCardImage(imageFilePath,Name=Value) specifies options using one or more name-value arguments. For example, RemoteIPAddress="192.168.0.8" sets the internet protocol (IP) address of the target SoC device.

Examples

collapse all

This example writes the SD card image of a supported board to an SD card drive location on the host computer. For a complete list of supported boards, see Supported Third-Party Tools and Hardware.

Get the SD card image location of ZedBoard™.

imgFilePath = socSDCardImage("ZedBoard");

Write the SD card image to the G: drive for a Windows® operating system.

status = socWriteSDCardImage(imgFilePath,SDCardDrive="G:");

Write the SD card image to the sda drive for a Linux® operating system.

status = socWriteSDCardImage(imgFilePath,SDCardDrive="/dev/sda");

This example writes the SD card image of a custom board to an SD card drive location on the host computer.

Write the SD card image from the c:/ProgramData/tmp/ location to the G: drive for a Windows operating system.

status = socWriteSDCardImage("c:/ProgramData/tmp/sdcard.zip", ...
SDCardDrive="G:");

Write the SD card image to the G: drive and update the IP address of the target SoC device.

status = socWriteSDCardImage("c:/ProgramData/tmp/sdcard.zip", ...
SDCardDrive="G:",RemoteIPAddress="10.10.10.33");

Input Arguments

collapse all

Path of the SD card image file, specified as a character vector or string scalar.

Example: "c:/ProgramData/zzz/sdcard.zip"

Data Types: char | string

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: success = socWriteSDCardImage("c:/ProgramData/zzz/sdcard.zip" , SDCardDrive="G:");

Name of SD card drive location on the host computer, specified as a character vector or string scalar.

Example: "G:" for Windows operating system

Example: "/media/username/261D-2F2B" for Linux operating system

Data Types: char | string

IP address of the target SoC device, specified as a character vector or string scalar. The target IP address must be a set of four numbers consisting of integers in the range [0, 255] that are separated by dots.

Example: "192.168.0.8".

The host network interface card (NIC) address must be on the same subnet as the target SoC device.

Example: If you specify this value as "192.168.0.8", the host NIC address can be 192.168.0.x, where the variable x is any integer in the range [1, 7] and [9, 255].

If you do not specify the SDCardDrive argument, the function updates the SD card image on the SD card of a custom board specified by the RemoteIPAddress argument. In this case, the SD card image must be in zip format.

Data Types: char | string

Output Arguments

collapse all

Status of the write operation, returned as a logical scalar. When status is 1 (true), the function successfully writes the firmware image to the SD card connected to the host computer, or to the SD card located on the target SoC device.

Data Types: logical

Version History

Introduced in R2024a