cancel
Showing results for 
Search instead for 
Did you mean: 

Load hex code from SD card and execute

tkjmail2
Associate II
Posted on April 10, 2010 at 23:15

Load hex code from SD card and execute

#sd-efsl-hex
5 REPLIES 5
picguy2
Associate II
Posted on May 17, 2011 at 13:46

Load raw biunary into RAM.  Or you could decode a hex file for the same result.  Once your code is in RAM simply jump or call it.  You may want to relocate your interrupt vector. 

Most code executes faster out of flash ROM because there are seperate busses.

tkjmail2
Associate II
Posted on May 17, 2011 at 13:46

Any examples or code snippets would be preciated!

Thomas

repzak
Associate II
Posted on May 17, 2011 at 13:46

Hello,

Maybe you could look how the circle_os is made from the Primer2.

I think they have a array with pointers to all the functions there is embedded in the OS, this list is as i remember placed fixed after the IRQ vectors.

Then you can call these functions from the ''application'' there is on ram.

The same way you need to let the OS know which appliaction to run and the pointer to that.. maybe you have several calls in the application, then you could let the first 10 words in the application be pointers to the functions in the applications.

Kasper
tkjmail2
Associate II
Posted on May 17, 2011 at 13:46

I have absolutely no idea how to do this :(

Any help would be appreciated!

btan
Associate II
Posted on May 17, 2011 at 13:46

Hello Thoamas,

I'm trying to read/write HEX data to SD card to be read later on a PC using EFSL.  Had not much luck searching for sample code from ST.  Could you post you sample code?

Thanks,

Ben