Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
April 7, 2009 - 11:00am
|
Is it possible to copy a code of Flash Area to RAM in RKit-stm8 like fctcpy function of COSMIC Compiler. |
Hi Laffer,
Yes of course. You can use the standard memcpy() function for this.
If you have plans to do in-application programming of your ROM, you have to ensure that ALL the necessary code for flashing is in RAM before launching its execution. Once all your necessary code is in RAM, you can just execute it and you are done.
Here is a piece of code which is pure standard C (except for the //-style comments) which performs code execution in RAM.
I hope this helps,
Bruno