With support from NXP, I was able to obtain instructions to program an SD card for SD card boot mode and then boot from the SD card.
The issue is those steps corrupt the SD card's FAT32 formatting. I am not an expert on SD card FAT32 formatting but I found a utility that allows me to select a FAT32 sector size of 4KB.
4KB is relevant because the boot ROM was carefully designed to boot the image from SD card address 4K (0x1000) to leave space for a boot table.
Still, it seems, the steps to use blhost to write the image to 0x1000 on the SD card still results in the SD card no longer being recognized when I plug it back into my Windows 10 PC.
I need a set of instructions that allows me to load an image, block that the area starting at 0x1000 for the size of the image, but still retain the ability to use the SD card with the SDK fatfs library functions.
Solved! Go to Solution.
In BLHost, the erase region should not start at 0. That will erase the partition table, starts at 4k (0x1000) to start of filesystem partition. (see below how to assign un-allocate region)
The BLHost flash-erase-region end address must not exceed the filesystem partition created using diskpart
$BLHOST -t 100000 -- flash-erase-region 0x1000 0x200000 0x120
If you have windows OS (Win 8 – Win 10), use diskpart command in command prompt (administrator).
***** NOTE: Be VERY EXTREMELY careful when you select the drive, accidently select the wrong drive will not be NXP responsibility!!! *****
I have a 4GB standard SD card to USB adapter connects to PC. Type list disk to list all the drives.
Type select disk # to select the disk you want to work on.
Type list disk again, you will see ‘ * “ next to the disk. That means the disk is selected.
Type clean will delete the partition
Provide offset when create the partition. The filesystem is defined when format is used.
Another example: 4MB offset
The partition is not formatted, it needs to be assigned a file system (FAT32/exFAT/NTFS) by formating it using the following methods:
In BLHost, the erase region should not start at 0. That will erase the partition table, starts at 4k (0x1000) to start of filesystem partition. (see below how to assign un-allocate region)
The BLHost flash-erase-region end address must not exceed the filesystem partition created using diskpart
$BLHOST -t 100000 -- flash-erase-region 0x1000 0x200000 0x120
If you have windows OS (Win 8 – Win 10), use diskpart command in command prompt (administrator).
***** NOTE: Be VERY EXTREMELY careful when you select the drive, accidently select the wrong drive will not be NXP responsibility!!! *****
I have a 4GB standard SD card to USB adapter connects to PC. Type list disk to list all the drives.
Type select disk # to select the disk you want to work on.
Type list disk again, you will see ‘ * “ next to the disk. That means the disk is selected.
Type clean will delete the partition
Provide offset when create the partition. The filesystem is defined when format is used.
Another example: 4MB offset
The partition is not formatted, it needs to be assigned a file system (FAT32/exFAT/NTFS) by formating it using the following methods:
Hi @dash ,
So, now, your download to the SD card and boot app from sd card all works, just the sd card can't be detect directly by the PC, right?
Seems your SD card MBR is broken.
Please try to modify the erase range:
blhost -u 0x1fc9,0x0020 -t 100000 -- flash-erase-region 0x0 0x100000 0x120
Please don't erase from the 0X0, as that area put the MBR, you can try to modify from 0X400, which is the FCB area, then test it again, whether it is OK or not?
Any updated information, please kindly let me know.
Best Regards,
Kerry