boot from SD-card

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

boot from SD-card

940 Views
mjbcswitzerland
Specialist V

Hi All

The TWR-VF65GS10 Rev. H is delivered with an SD card containing code that boots. I don't know what the code does apart from blink a few LEDs, but it is obviously operational.

Now I have my own code and I would like to put it on the SD card so that it boots in the same way.

From what I can make out, a header needs to be added to the code (IVT, DCD, Boot data structures). Also it looks like this image is copied to the SD card in a RAW format (no FAT).

How does one do this?

- is there some PC program that generates the header? (input A5 and M4 programs - output a bootable image)?

- how does one write RAW data to an SD card using a PC - the supplied card looks to have a small FAT partition and lots of unused space where presumably the bootable code is hiding?

Since the SD card is probably the simplest method to use to start with (seeing that it can be programmed in another device) I expect that many people are using it for development work and so this must be a fairly standard procedure (some how).

Regards

Mark

Labels (1)
0 Kudos
Reply
1 Reply

735 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi Mark,

The Header can be compiled as a struct in your code.

I suggest you to refer to the  MQX bootloader example. The example already contains the IVT header.

I normally use Linux and the command dd to copy the raw data to the sd card. I think there is a tool that runs in windows and found in the MQX installation folder as well. (\tools\ddcopy)

The sd card you are using already has u-boot bootloader. You can use the bootloader to load the application from SD (found in FAT format) too.

This can be done using fatload and go commands in u-boot.

Best Regards,

Alejandro