== Writing SD Cards: Windows == A port of dd is available for Windows from [http://www.chrysocome.net/dd http://www.chrysocome.net/dd]. We have sucessfully tested verison 0.6beta3 on Win 7 64-bit. Download dd.exe from the site above. Move it to somewhere in your path, then rename it win-dd.exe (this avoids conflicts with the dd.exe distributed with the EDK, which isn't useful for writing SD cards in Windows). '''Finding the SD card descriptor:'''[[BR]] 1. Insert the SD card. Take note of which drive letter it is assigned in Windows Explorer. 1. Open a command prompt '''as administrator''' and run {{{win-dd --list}}}. The output will be similar to: {{{ C:\xps_proj\SDK_Workspace\MyProj_hw_platform>win-dd --list rawwrite dd for windows version 0.6beta3. Written by John Newbigin This program is covered by terms of the GPL Version 2. Win32 Available Volume Information \\.\Volume{72603844-0595-11e1-822c-806e6f6e6963}\ link to \\?\Device\HarddiskVolume2 fixed media Not mounted \\.\Volume{72603845-0595-11e1-822c-806e6f6e6963}\ link to \\?\Device\HarddiskVolume3 fixed media Mounted on \\.\c: \\.\Volume{9654066c-60bd-11e1-9757-001018af5a78}\ link to \\?\Device\HarddiskVolume4 removeable media Mounted on \\.\f: \\.\Volume{72603848-0595-11e1-822c-806e6f6e6963}\ link to \\?\Device\CdRom0 CD-ROM Mounted on \\.\d: NT Block Device Objects \\?\Device\CdRom0 size is 2147483647 bytes \\?\Device\Harddisk0\Partition0 link to \\?\Device\Harddisk0\DR0 Fixed hard disk media. Block size = 512 size is 500107862016 bytes \\?\Device\Harddisk0\Partition1 link to \\?\Device\HarddiskVolume1 Fixed hard disk media. Block size = 512 size is 41094144 bytes \\?\Device\Harddisk0\Partition2 link to \\?\Device\HarddiskVolume2 \\?\Device\Harddisk0\Partition3 link to \\?\Device\HarddiskVolume3 \\?\Device\Harddisk1\Partition0 link to \\?\Device\Harddisk1\DR1 Removable media other than floppy. Block size = 512 size is 1977614336 bytes \\?\Device\Harddisk1\Partition1 link to \\?\Device\HarddiskVolume4 Removable media other than floppy. Block size = 512 size is 32002048 bytes Virtual input devices /dev/zero (null data) /dev/random (pseudo-random data) - (standard input) Virtual output devices - (standard output) /dev/null (discard the data) }}} 3. To find the descriptor for the SD card itself (and not its FAT partition): 1. Look in the "Win32 Available Volume Information" section and find the device descriptor for the SD card FAT partition. In this system the SD card mounts as drive {{{F:}}}. The corresponding descriptor is {{{\\?\Device\HarddiskVolume4}}} 1. Look in the "NT Block Device Objects" section and find the alias for the same descriptor. In this example, it is: {{{ \\?\Device\Harddisk1\Partition1 link to \\?\Device\HarddiskVolume4 Removable media other than floppy. Block size = 512 size is 32002048 bytes }}} 3. Look for the device with the same {{{Harddisk}}} number but with {{{Partition0}}}. In this example, it is: {{{ \\?\Device\Harddisk1\Partition0 link to \\?\Device\Harddisk1\DR1 Removable media other than floppy. Block size = 512 size is 1977614336 bytes }}} 4. The block device listed is your SD card descriptor. In this example it is {{{\\?\Device\Harddisk1\Partition0}}}. * Confirm that the size of the {{{Partition0}}} device approximates the capacity of your SD card. The SD card in this example is 2GB (all Mango-supplied cards are 2GB). * Confirm that your computer's hard drives have different {{{Harddisk}}} numbers. In this example the C: drive is {{{\\?\Device\Harddisk0}}}. || [[Image(wiki:HardwareUsersGuides/WARPv3/files:important.png,valign=middle,nolink)]] ||'''NOTE''': The actual device descriptor on your system is likely different than this example. The descriptor can also change between reboots. '''Always confirm the current descriptor before copying to the SD card.''' || '''Copying the .bin file:'''[[BR]] 1. Run this command, replacing the last three arguments with the correct values: {{{ win-dd bs=512 seek= if= of= --progress }}} 1. '''': depends on the target slot number; use (131072 + slotNum*32768). More details [wiki:..#Copying.binFilesSDCards here]. 1. '''': the binary FPGA configuration file 1. '''': SD device descriptor, usually in the format of {{{\\?\Device\HarddiskX\Partition0}}}. See instructions above. 1. If successful, dd should report the following: {{{ 18032+1 records in 18032+1 records out }}} 1. win-dd may report "Error reading file: 87 The parameter is incorrect". In our experience this is normal and not an actual error. 1. Repeat for additional .bin config files in additional slots, if needed. 1. Eject the SD card. ---- == Alternate Method == A port of dd is available for Windows from [http://www.chrysocome.net/dd http://www.chrysocome.net/dd]. We have sucessfully tested verison 0.6beta3 on Win 7 64-bit. Download dd.exe from the site above. Move it to somewhere in your path, then rename it win-dd.exe (this avoids conflicts with the dd.exe distributed with the EDK, which isn't useful for writing SD cards in Windows). 1. Insert the SD card. Take note of which drive letter it is assigned in Windows Explorer. 1. Open a command prompt '''as administrator''' and change directory to the folder containing your .bin file 1. Run this command, replacing the last three arguments with the correct values: {{{ win-dd bs=512 seek= if= od=\\.\: --progress }}} * {{{}}}: depends on the target slot number; use (131072 + slotNum*32768). More details [wiki:..#Copying.binFilesSDCards here]. * {{{}}}: the binary FPGA configuration file * {{{}}}: Drive letter for the SD card as mounted by Windows '''IMPORTANT''': Note the output argument is '''{{{od}}}''' ('''o'''utput '''d'''isk), not {{{of}}}, as is common with {{{dd}}} in other operating systems For example, if your .bin file is {{{ref_design.bin}}}, you're writing to slot 0 and your SD card is mounted as {{{H:}}}, you would run: {{{ win-dd bs=512 seek=131072 if=ref_design.bin od=\\.\H: --progress }}} If successful, dd should report the following: {{{ 18032+1 records in 18032+1 records out }}} win-dd may report "Error reading file: 87 The parameter is incorrect". In our experience this is normal and not an actual error.