AnsweredAssumed Answered

Help booting bare-metal

Question asked by Mathew Young on Apr 26, 2013
Latest reply on May 12, 2013 by Mathew Young
Branched to a new discussion

Hey everyone,

I recently bought an i.mx233 based board to mess around with and give me some more power than the AVR uC's I've been doing abit with lately. However I'm having trouble getting my code to run on the board (not really interested at putting an OS on it at this stage) and there doesn't seem to be much information floating around the web on how to do it either (one thing I miss about the AVR's).


As far as I can tell, once I have my compiled .elf file from my source code, which just attempts to turn on an GPIO pin on the board as output, I need to run elftosb (provided by freescale) to turn it into a safeboot file which I do using the following command:


elftosb -z -c make_boot.db -o boot.elf


where my make_boot.db file is


// Define one input file that will be the first file listed
// on the command line. The file can be either an ELF file
// or an S-record file.


sources {

inputFile = extern(0);



// create a section
section (0) {

load inputFile; // load all sections
call inputFile; // jump to entry point



straight from the elftosb manual because it seems to be all I need


Once I have the safeboot file I need to get it onto a bootable uSD card which I do using the CFImager program (provided by freescale) and the command


CFImager -f -d D


where D is the drive my uSD card is mounted.


I never get any errors but when I put it into my board no matter what state I set the GPIO pin to, nothing changes


Any Ideas?