Hi,
I have one question about Cortexm3 from smartfusion device from actel. Could you pls help me?
from <keil uvision and actel smartfuison>, I know how to implement Flash target and RAM target.
Flash target mode: download and run from inner flash memory and RW data are placed in inner ram space. Ram target mode: run from inner ram space and RW data are placed in inner ram space.
However the two modes will result from below two potential problems:
(1) flash target modes will bring up speed limits. You know max speed is only 80Mhz when the program runs from inner flash memory.and speed will become to be up to 100Mhz when program runs from inner ram.
(2) ram target modes can't make programs work when the board are re-power-cycled.
I'd like to implement following function to overcome the above problems:
(1) all executed codes are downloaded to flash memory space firstly (2) then these codes are copied to inner ram space automatically (3) PC are pointed to new RAM address so as to program runs from inner ram.
I don't know how to implement it. Anybody can help me to get one example? or guidelines?
Thank you very much.
BR
Fisher
This statement ".ANY (+RW +ZI)" should be replaced by something like this:
"<module name.o> (+RO)"
where module name is the name of the C file containing your code (see above example). You can use linker sections to place certain functions in RAM, not all the code in a module (see manual).
(1)I find when load region start address is different from execute region start address (here LMA start address is 0x0 and EMA start address is 0x20000000), below error information will occur:
\f\Blinky.axf: Error: L6202E: __main.o(!!!main) cannot be assigned to non-root region 'RW_IRAM1'
(2) according to your reply, only part of codes or certain functions can be copied to ram space automatically rather than all. right?
Right.
LR_IROM1 0x00000000 0x00040000 { ; load region size_region ER_IROM1 0x00000000 0x00040000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) } RW_IRAM1 0x20000000 0x00010000 { ; RW data .ANY (+RO) .ANY (+RW +ZI) } }
above scatter file will not result in compile error. however, it will make program don't work.
I got it. thanks.