Run simple hex program while power on in mini2440

Amul Patel
HI, 
I want to run a simple led blinking code while power on. without any os as
well as without any bootloader. just like simple Microcontroller program in
while 1.
can any help me out regarding flashing program to run state???
I have mini2440 board.

Thanks in advance.

Amul

Anatoliy Besplemennov
Hi Amul,
What you want is impossible!
How can you put your program in memory without any booter?

Shortest way - install STARTOS on mini2440,
write next Prog on SD card name it START.BIN and it will be automatically
runned after power on.

Prog look like this:

#define rGPBCON    (*(volatile unsigned *)0x56000010)  //Port B control
#define rGPBDAT    (*(volatile unsigned *)0x56000014)  //Port B data

int     data = 0x06;
int    i;

void Main(void)
{
  rGPBCON = 0x155555;
      
     for  (i=0; i<30; i++)
     {       
       rGPBDAT = (data<<5);
       Delay(200);
       data =~data;
  }
    Exit();
}

After compilling it will be < 220 Bytes!
And work!
OS will do all duty work for you (Init all devices, etc.)