EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

AT91 - Execution out of internal SRAM

Started by Dan Rhodes February 27, 2004
Hi All -

I'm trying to set up my code to execute out of internal SRAM on an
AT91FR40162 using the IAR EWARM toolset.  Does anyone have any advice
on how to do this?

If the linker thinks ROM starts at 0x00000000 (which it does prior to
remap) and the remap command moves the internal SRAM to address
0x00000000, there should be no problem simply copying the code from
flash into sram before the remap.  Is there more to it than this?

Many Thanks...

Dan
Dan Rhodes wrote:
> Hi All - > > I'm trying to set up my code to execute out of internal SRAM on an > AT91FR40162 using the IAR EWARM toolset. Does anyone have any advice > on how to do this? > > If the linker thinks ROM starts at 0x00000000 (which it does prior to > remap) and the remap command moves the internal SRAM to address > 0x00000000, there should be no problem simply copying the code from > flash into sram before the remap. Is there more to it than this? > > Many Thanks... > > Dan
I would not do anything special until after I have initialized the H/W and remapped. In 99% of the cases, it is the wrong thing to do. You might want to ask your local friendly IAR distributor. On Green Hills you can create a ROM or even Compressed ROM section which gets copied into SRAM by libstartup. It is very likely that you can do the same with IAR. -- Best Regards Ulf at atmel dot com These comments are intended to be my own opinion and they may, or may not be shared by my employer, Atmel Sweden.
drmachismo@yahoo.com (Dan Rhodes) wrote in message news:<72e98626.0402271252.47b7698d@posting.google.com>...
> Hi All - > > I'm trying to set up my code to execute out of internal SRAM on an > AT91FR40162 using the IAR EWARM toolset. Does anyone have any advice > on how to do this? > > If the linker thinks ROM starts at 0x00000000 (which it does prior to > remap) and the remap command moves the internal SRAM to address > 0x00000000, there should be no problem simply copying the code from > flash into sram before the remap. Is there more to it than this? > > Many Thanks... > > Dan
Also look at the AT91EBxx example supplied in the IAR default instalation -it explains the remap. Look in config.h. Make sure your target is set to 'ramcode' not 'flashcode' Jason Moore
drmachismo@yahoo.com (Dan Rhodes) wrote in message news:<72e98626.0402271252.47b7698d@posting.google.com>...
> Hi All - > > I'm trying to set up my code to execute out of internal SRAM on an > AT91FR40162 using the IAR EWARM toolset. Does anyone have any advice > on how to do this?
Email me directly and I will send information that works with EB40A. Sten Larsson Nohau Corp

The 2024 Embedded Online Conference