the underlying function is sd_init.
Simply let it return 0 in Disk_status, indicating success.
Disk_read can see that the input has four parameter values, namely the device type PDRV, the data buffer pointer buff, the sector address sector, and the number of sectors count. This shows that Disk_read can read more than one sector at a time, adding in the function body
for (cnt=0; cnt
Res =sd_readsingleblock (sector+cnt, buff+cnt*512);
if (res! = RES_OK
. Run the uboot Startup File
Here, the file we are about to burn is the u-boot-iTOP-4412.bin file.
Terminal:
If represents the input file address, take your u-boot-iTOP-4412.bin the actual address of this file, of represents the output address, take your tf/SD card the actual device number.
At this point, you can insert the tf/SD
[datalength+ -]= (savedate[5]/Ten)+0x30; Commandtext[datalength+ -]= (savedate[5]%Ten)+0x30; Commandtext[datalength+ -]=0x0D; Commandtext[datalength+ -]=0x0A; uint8_t Checksum=0x00; for(i=2; i1; i++) {Checksum+=Commandtext[i]; } Commandtext[count-1]=checksum; Statusbyte=SendCommand (Commandtext,count); returnStatusbyte;}( 6 ) Save File CommandThis command provides the host with the ability to save the current open file, in order to prevent the frequent writing of the
The android simulator allows us to use the disk image in FAT32 format as the SD card simulation:All of the following operations are performed in Windows
First, run cmd to go to the command line interface (you need to set the tools in the directory where your android SDK is located to the environment variable path in advance)
In addition to the eclipse method, the following commands are run on the comman
partition ' s system IDU Change display/entry unitsV Verify the partition tableW Write table to disk and exitxExtra functionality (experts only)Well, these commands are simple and clear. Let's partition the SD card.Command (M for help):D//If only one partition is deleted directly, if multiple partitions, there will be a number, select the partition you want to deleteCommand (M for help): N//Add new partitionPartition Type:P Primary (2 primary, 0 exte
divide the first partition and specify the partition as FAT16.The second one, I try to partition for the Linux partitionCommand (M for help): NCommand ActionE ExtendedP primary partition (1-4)PPartition number (1-4): 2First cylinder (48002-62528, default 48002):Using Default Value 48002Last cylinder, +cylinders or +size{k,m,g} (48002-62528, default 62528):Using Default Value 62528Command (M for help): tPartition number (1-4): 2Hex code (type L to list codes): 83Okay, look at the results.Command
will be SD card is inserted via card reader Virtual in-Machine , perform the following command detection Hanging on location. Mount | Grep/mediaUninstalling the SD cardsudo umount/dev/sdxxUse the "dd" command to clear the MRB and partition information:sudo dd if=/dev/zero of=/dev/sdx bs=10m count=1To modify a partition
SD card driver recently writtenProgram. After reading datasheet, sort it as follows:
The first thing you need to know is:SD card ProtocolAndHarddisk (File System)Block and sectorIt does not mean anything.
For sdks, see "Maid physical_layer_simplified_specification_ver_3.020.final_100518.pdf" (click to download)
The meanings of block and sector in the
Use SD card in Google Android SimulatorFrom the perspective of this document, the android simulator allows us to use a disk image in the FAT32 format as a simulation of the SD card. Today, I tried to record the process and share it with you:1. Go to the tools subdirectory under the android SDK directory and runMksdcard
is *"Echo "* running. The script will complete ,*"Echo "* but your SD card may be too upted .*"Echo "**"Echo "* press Echo "************************************** **********************"Read junk
For I in 'LS-1 $ device? '; DoEcho "unmounting device '$ I '"Umount $ I 2>/dev/nullDone
Execute "dd If =/dev/Zero of = $ device BS = 1024 COUNT = 1024"
# Get the partition information.Total_size = 'fdisk-L $ devic
You cannot start the file system from the SD card-Linux general technology-Linux technology and application information. The following is a detailed description. I am using the vm7 virtual machine, the source code is linux-2.6.18, make a file system to start from the SD card. The ext3 item is added to the kernel, but t
This example mainly implements Android to get the data in the Assets folder and write it to the SD card, which is mainly to read the database in the Assets folder and write it to the SD memory card.
The complete sample code is as follows:
Import Java.io.File;
Import Java.io.FileOutputStream;
Import java.io.IOExce
If you want to use SD card during development, you must specify
There are two ways to create an SD card. One is to directly enter the size to be created and the ADT is automatically created. The other is the image file of the specified sdcard.
Use the mksdcard.exe tool in sdkto create an image file for sdcard. For
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.