Reply by Dan Lyke May 13, 20092009-05-13
Answering myself:

On Mon, 11 May 2009 09:56:23 -0700
Dan Lyke wrote:
> 1. Does someone have a quick reference to the memory map I can expect
> on the 9XE-EK? I've been using SDRAM as a cast of AT91C_SDRAM,
[snip]

Looks like that's the way to go.

> 2. Anyone got a quick example of loading a linked binary image and
> running it?

The direction Atmel has sent me is that for the speed hungry stuff I
should just use the linker and run-time library's mechanism for loading
specific functions into RAM automatically, which is prefixing my
function calls with:

__attribute__ ((section (".ramfunc")))

And making sure my linker's .lds file is doing the right thing with
that.

Dan
Reply by manu singh May 13, 20092009-05-13
HI,
u can use examples which is already provided by Atmel.I suggest use its latest examples softpack version 1.5. it is having source code for how to access sdram & sram.

--Manu

--- On Mon, 11/5/09, Dan Lyke wrote:

From: Dan Lyke
Subject: [AT91SAM] 9XE-EK: Using SRAM and SDRAM?
To: A...
Date: Monday, 11 May, 2009, 10:26 PM

I could spend half the day digging through documentation, but if

someone could quickly point me in the right direction, I've got a

couple of questions:

1. Does someone have a quick reference to the memory map I can expect

on the 9XE-EK? I've been using SDRAM as a cast of AT91C_SDRAM, , but I

need to be a little smarter about how I use it and knowing when I'm

going to stomp on GCC using it.

2. Anyone got a quick example of loading a linked binary image and

running it? I've got makefiles generating *-sram.bin, I think I

remember using SAM-BA to load them and execute them, but how should I

do this from an app running in Flash? Is it as simple as loading the

*-sram.bin at 0x300000, and then something like

void (*callSRAM)( ) = ((*)())0x300000;

callSRAM()

and waiting for it to return?

Thanks.

Dan

Explore and discover exciting holidays and getaways with Yahoo! India Travel http://in.travel.yahoo.com/
Reply by "Frog Twissell, Blue Sky Solutions" May 11, 20092009-05-11
Hi Dan,
If your binary image is a compiled C program in its own right then it will
probably never return - a return from main() typically goes silently into an
infinite loop.
I've done similar things on other platforms though...
When the program is run it will set up the C runtime environment
(initialised variables, stack). Provided that the variables don't overlap
the ones used by the program in flash then all is well (kind of). Since the
stack has essentially been replaced, you can never return as such, but the
program in RAM could call routines in flash (I did this using a jump table
at a known location in flash).

If you're writing in assembler, of course, you can return from the RAM
program.

Good luck,
Frog

_____

From: A... [mailto:A...] On Behalf Of
Dan Lyke
Sent: Tuesday, 12 May 2009 4:56 a.m.
To: A...
Subject: [AT91SAM] 9XE-EK: Using SRAM and SDRAM?

I could spend half the day digging through documentation, but if
someone could quickly point me in the right direction, I've got a
couple of questions:

1. Does someone have a quick reference to the memory map I can expect
on the 9XE-EK? I've been using SDRAM as a cast of AT91C_SDRAM, , but I
need to be a little smarter about how I use it and knowing when I'm
going to stomp on GCC using it.

2. Anyone got a quick example of loading a linked binary image and
running it? I've got makefiles generating *-sram.bin, I think I
remember using SAM-BA to load them and execute them, but how should I
do this from an app running in Flash? Is it as simple as loading the
*-sram.bin at 0x300000, and then something like

void (*callSRAM)() = ((*)())0x300000;
callSRAM()

and waiting for it to return?

Thanks.

Dan

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.320 / Virus Database: 270.12.21/2103 - Release Date: 05/11/09
05:52:00
Reply by tasbihmr May 11, 20092009-05-11
Hello Dan,
I have no idea about running the application of the RAM, but I was interested on your post when I saw that you are using the SAM9XE-EK. So did you program the board already with some applications? How is the board performance? Actually I had this idea on using the SAM9XE, and since it can run at least 200 MHz internally, it should be able to do much better than a for example SAM7X at least theoretically, and since it has all this external buses, a lot more can be interfaced to it.
Any comments on this from you are welcome :-).
Thank you and regards.

--- In A..., Dan Lyke wrote:
>
> I could spend half the day digging through documentation, but if
> someone could quickly point me in the right direction, I've got a
> couple of questions:
>
> 1. Does someone have a quick reference to the memory map I can expect
> on the 9XE-EK? I've been using SDRAM as a cast of AT91C_SDRAM, , but I
> need to be a little smarter about how I use it and knowing when I'm
> going to stomp on GCC using it.
>
> 2. Anyone got a quick example of loading a linked binary image and
> running it? I've got makefiles generating *-sram.bin, I think I
> remember using SAM-BA to load them and execute them, but how should I
> do this from an app running in Flash? Is it as simple as loading the
> *-sram.bin at 0x300000, and then something like
>
> void (*callSRAM)() = ((*)())0x300000;
> callSRAM()
>
> and waiting for it to return?
>
> Thanks.
>
> Dan
>

Reply by Dan Lyke May 11, 20092009-05-11
I could spend half the day digging through documentation, but if
someone could quickly point me in the right direction, I've got a
couple of questions:

1. Does someone have a quick reference to the memory map I can expect
on the 9XE-EK? I've been using SDRAM as a cast of AT91C_SDRAM, , but I
need to be a little smarter about how I use it and knowing when I'm
going to stomp on GCC using it.

2. Anyone got a quick example of loading a linked binary image and
running it? I've got makefiles generating *-sram.bin, I think I
remember using SAM-BA to load them and execute them, but how should I
do this from an app running in Flash? Is it as simple as loading the
*-sram.bin at 0x300000, and then something like

void (*callSRAM)() = ((*)())0x300000;
callSRAM()

and waiting for it to return?

Thanks.

Dan