Changes between Version 4 and Version 5 of howto/SD_Config


Ignore:
Timestamp:
Aug 25, 2012, 9:16:06 PM (12 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • howto/SD_Config

    v4 v5  
    7272The default WARP v3 CPLD design loads configuration files from the SD card starting at an offset of 64MB. Up to 8 configuration files can be stored per card, with each file separated by 16MB. The active configuration file is selected by the config DIP switch on the WARP v3 board. You must choose which "slot" when copying the .bin file to the SD card.
    7373
    74 We use the open-source dd tool to write configuration files to SD cards. dd is available for OS X, Linux and Windows (and probably other OSs). Each call to dd copies one configuration file. There are four arguments:
     74We use the open-source dd tool to write configuration files to SD cards. dd is available for OS X, Linux and Windows (and probably other OSs). Each call to dd copies one configuration file. There are four required arguments:
    7575{{{
    76 dd bs=512 seek=BaseAddr if=someFile.bin of=sdCardDevice
     76dd bs=512 seek=<base_block_addr> if=<config_file.bin> of=<sd_device_descriptor>
    7777}}}
    7878 * bs: Block size, always 512 for SD cards
    79  * if: input file (your .bin file)
    80  * of: device descriptor for SD card (OS specific; see below)
     79 * if: Input file (your .bin file)
     80 * of: Device descriptor for SD card (OS specific; see below)
    8181 * seek: Staring address for the output file, in units of block size. Use (131072 + slotNum*32768) for standard WARP v3 config design:
    8282  * Slot 0: 131072
     
    8989  * Slot 7: 360448
    9090
    91 === OS X ===
    92 Apple provides a copy of dd with recent releases of OS X (at least since 10.7, probably earlier).
     91The specific calls to dd depend on your operating system.
     92 * [wiki:./OSX OS X]
     93 * [wiki:./Linux Linux]
     94 * [wiki:./Windows Windows]
    9395
    94 '''Finding the SD card descriptor:'''[[BR]]
    95  1. Insert the SD card
    96  1. In a terminal run {{{diskutil list}}} to find device descriptor for SD card. Look for the SD card in the list of disks. On a MBP, the shows:
    97 {{{
    98    #:                       TYPE NAME                    SIZE       IDENTIFIER
    99    0:      GUID_partition_scheme                        *500.1 GB   disk0
    100    1:                        EFI                         209.7 MB   disk0s1
    101    2:                  Apple_HFS Macintosh HD            499.2 GB   disk0s2
    102    3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    103 /dev/disk1
    104    #:                       TYPE NAME                    SIZE       IDENTIFIER
    105    0:     FDisk_partition_scheme                        *2.0 GB     disk1
    106    1:                 DOS_FAT_32 WARP SD                 32.0 MB    disk1s1
    107 }}}
    108  2. In this example, the SD card device descriptor is /dev/disk1. The actual descriptor will differ on other machines with different disk configurations.
    109 
    110 '''Copying the .bin file:'''[[BR]]
    111  1. Unmount ('''not''' eject) the drive using this command:
    112 {{{
    113 diskutil unmountDisk /dev/diskX
    114 }}}
    115  1. Run this command, replacing the last three arguments with the correct values:
    116 {{{
    117 dd bs=512 seek=<N> if=<yourFile.bin> of=</dev/diskX>
    118 }}}
    119   1. ''<N>'': depends on the target slot number; see the list above
    120   1. ''<yourFile.bin>'': the binary FPGA configuration file
    121   1. ''</dev/diskX>'': device descriptor for the SD card
    122  1. If successful, dd should report the following (the time/throughput values will differ):
    123 {{{
    124 18032+1 records in
    125 18032+1 records out
    126 9232444 bytes transferred in 8.503631 secs (1085706 bytes/sec)
    127 }}}
    128  1. Repeat for additional .bin config files if needed.
    129  1. Eject the SD card in the Finder (if it's mounted).
    13096
    13197----