axf file to SD Card

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

axf file to SD Card

Jump to solution
1,325 Views
contra
Contributor III

Hi, I am creating a bare metal application for i.mx28 EVK using ARM-DS5. My project outputs a .axf file. How can I get this onto SD card so that I can boot it?

I don't need to use Linux or Windows CE as my application is very simple and requires boot speed.

Labels (1)
0 Kudos
1 Solution
879 Views
PeterChan
NXP Employee
NXP Employee

If the AXF contains records in ELF format, you can use the tool "elftosb" to convert the ELF file into i.MX28 binary format .SB.

Usage

usage: elftosb [-?|--help] [-v|--version] [-f|--chip-family <family>]

              [-c|--command <file>] [-o|--output <file>]

              [-P|--product <version>] [-C|--component <version>]

              [-k|--key <file>] [-z|--zero-key] [-D|--define <const>]

              [-O|--option <option>] [-d|--debug] [-q|--quiet] [-V|--verbose]

              [-p|--search-path <path>] files...

Options:

  -?/--help                    Show this help

  -v/--version                Display tool version

  -f/--chip-family <family>    Select the chip family (default is 37xx)

  -c/--command <file>          Use this command file

  -o/--output <file>          Write output to this file

  -p/--search-path <path>      Add a search path used to find input files

  -P/--product <version        Set product version

  -C/--component <version>    Set component version

  -k/--key <file>              Add OTP key, enable encryption

  -z/--zero-key                Add default key of all zeroes

  -D/--define <const>=<int>    Define or override a constant value

  -O/--option <name>=<value>  Set or override a processing option

  -d/--debug                  Enable debug output

  -q/--quiet                  Output only warnings and errors

  -V/--verbose                Print extra detailed log information

After installing the i.MX28 LTIB, the "elftosb" can be found at the path "/opt/freescale/ltib/usr/bin". Please let me know if you need to run in Windows.

Example

Usually, we provide a command file to specify how to load and run the input ELF. The command file can be as simple as

File: uboot.bd

______________________________________________________________________

// STMP378x ROM command script to load and run U-Boot

sources {

    u_boot="/ltib/rootfs/boot/u-boot.elf";

}

section (0) {

    //----------------------------------------------------------

    //  Load and call u_boot - ELF ARM image

    //----------------------------------------------------------

        load u_boot;

        call u_boot;

}

_______________________________________________________________________


and the command line to execute elftosb is

elftosb -z -f imx28 -c ./uboot.bd -o imx28_uboot.sb

View solution in original post

0 Kudos
2 Replies
879 Views
YixingKong
Senior Contributor IV

David, please clickCorrect Answer/Helpful Answer if your issue had been resolved.

Thanks,

Yixing

0 Kudos
880 Views
PeterChan
NXP Employee
NXP Employee

If the AXF contains records in ELF format, you can use the tool "elftosb" to convert the ELF file into i.MX28 binary format .SB.

Usage

usage: elftosb [-?|--help] [-v|--version] [-f|--chip-family <family>]

              [-c|--command <file>] [-o|--output <file>]

              [-P|--product <version>] [-C|--component <version>]

              [-k|--key <file>] [-z|--zero-key] [-D|--define <const>]

              [-O|--option <option>] [-d|--debug] [-q|--quiet] [-V|--verbose]

              [-p|--search-path <path>] files...

Options:

  -?/--help                    Show this help

  -v/--version                Display tool version

  -f/--chip-family <family>    Select the chip family (default is 37xx)

  -c/--command <file>          Use this command file

  -o/--output <file>          Write output to this file

  -p/--search-path <path>      Add a search path used to find input files

  -P/--product <version        Set product version

  -C/--component <version>    Set component version

  -k/--key <file>              Add OTP key, enable encryption

  -z/--zero-key                Add default key of all zeroes

  -D/--define <const>=<int>    Define or override a constant value

  -O/--option <name>=<value>  Set or override a processing option

  -d/--debug                  Enable debug output

  -q/--quiet                  Output only warnings and errors

  -V/--verbose                Print extra detailed log information

After installing the i.MX28 LTIB, the "elftosb" can be found at the path "/opt/freescale/ltib/usr/bin". Please let me know if you need to run in Windows.

Example

Usually, we provide a command file to specify how to load and run the input ELF. The command file can be as simple as

File: uboot.bd

______________________________________________________________________

// STMP378x ROM command script to load and run U-Boot

sources {

    u_boot="/ltib/rootfs/boot/u-boot.elf";

}

section (0) {

    //----------------------------------------------------------

    //  Load and call u_boot - ELF ARM image

    //----------------------------------------------------------

        load u_boot;

        call u_boot;

}

_______________________________________________________________________


and the command line to execute elftosb is

elftosb -z -f imx28 -c ./uboot.bd -o imx28_uboot.sb

0 Kudos