From: "Tom Deconinck" <t.deconinck@gmail.com>
To: airdelroy <aaron-nabble@planetrichardson.net>,
ecos-discuss@sourceware.org
Subject: Re: [ECOS] RAM Images on AT91SAM7s256
Date: Wed, 02 Apr 2008 06:12:00 -0000 [thread overview]
Message-ID: <e37cb5250804012312y3b39a007p3f8dc623eb30e757@mail.gmail.com> (raw)
In-Reply-To: <16435229.post@talk.nabble.com>
On Wed, Apr 2, 2008 at 3:48 AM, airdelroy
<aaron-nabble@planetrichardson.net> wrote:
>
> I am also trying to get a RAM image running on an AT91SAM7s256. I ultimately
> will run my applications from the flash, would like to debug in RAM.
> Currently I can load via sam-ba a rom image that will communicate over the
> serial port, so I have this to start from.
>
> Sam-ba I believe uses the first 8k of RAM. So I think that the ldi file
> should look like this:
>
>
> MEMORY
> {
> ram : ORIGIN = 0x00202000, LENGTH = 0xE000
> }
>
> SECTIONS
> {
> SECTIONS_BEGIN
> SECTION_rom_vectors (ram, 0x00202000, LMA_EQ_VMA)
> SECTION_fixed_vectors (ram, 0x00200040, LMA_EQ_VMA)
> SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
>
> SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA)
>
> SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
> CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
> SECTIONS_END
> }
>
> Is the SECTION_fixed_vectors section correct? Or should it be:
>
> SECTION_fixed_vectors (ram, ALIGN (0x1), LMA_EQ_VMA)
>
> I think I found my version in some other arm variant...
>
> Also should I modify these?
> #define CYGMEM_REGION_ram (0x00200000)
> #define CYGMEM_REGION_ram_SIZE (0x10000)
>
> Now I need to modify startup code for vector memory remapping. Where do I
> find the RAM code that needs to be modified?
>
> thanks,
> Aaron
> --
> View this message in context: http://www.nabble.com/RAM-Images-on-AT91SAM7s256-tp15138638p16435229.html
> Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
>
>
According to me, your fixed_vectors section is correct, if you use
SECTION_fixed_vectors (ram, ALIGN (0x1), LMA_EQ_VMA), the linker will
place the vectors just after the rom section. However since you talk
about the SAM-BA boot, this setting will probably overwrite a part of
that bootloader and cause havoc. If you would use a JTAG probe to load
in your RAM image, that setting is correct, in your case you probably
need to place them after the SAM-BA boot thing. Note that the
exception and interrupt vectors have to be at address 0x0.
Startup assembly code can be found in
hal\arm\at91\at91sam7s\current\include\hal_platform_setup.h specific
for AT91 and alikes
And the code that relocates vectors and such: hal\arm\arch\current\src\vectors.S
Tom
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2008-04-02 6:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 16:08 Alois Z.
2008-01-28 16:47 ` Andrew Lunn
2008-01-28 17:06 ` Alois Z.
2008-01-28 17:10 ` Alois Z.
2008-01-28 17:19 ` Andrew Lunn
2008-01-28 18:36 ` Alois Z.
2008-01-29 12:19 ` Tom Deconinck
2008-04-02 1:48 ` airdelroy
2008-04-02 6:12 ` Tom Deconinck [this message]
2008-04-05 0:14 ` airdelroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e37cb5250804012312y3b39a007p3f8dc623eb30e757@mail.gmail.com \
--to=t.deconinck@gmail.com \
--cc=aaron-nabble@planetrichardson.net \
--cc=ecos-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).