From: "Tom Deconinck" <t.deconinck@gmail.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Running code from external ram on the AT91SAM7SE
Date: Tue, 06 Nov 2007 10:13:00 -0000 [thread overview]
Message-ID: <e37cb5250711060213h651ab1a5id4e2bf00e4f917bc@mail.gmail.com> (raw)
Hello,
I having problems running code out of external SDRAM on the
AT91SAM7SE512. This is a CPU similar to the AT91SAM7S family, but it
has an external bus interface and an integrated SDRAM controller.
So far I have tried an eCos minimal setup and a 'normal' hello world
application, both without any success.
My setup is as follows: I have a BDI2000 that sets up and configures
the SDRAM controller, then I use GDB to load in the ELF file (via the
BDI probe) and then I start the program.
My ecos configuration is identical to the one I use to boot from ROM,
except I changed the startup type to RAM. (The ROM setup works like a
charm) I also added the required linker settings:
MEMORY
{
ram : ORIGIN = 0x20000000, LENGTH = 0x2000000
sram : ORIGIN = 0x00200000, LENGTH = 0x8000
rom : ORIGIN = 0x00100000, LENGTH = 0x80000
}
SECTIONS
{
SECTIONS_BEGIN
CYG_LABEL_DEFN(__reserved_bootmon) = 0x00000000; . =
CYG_LABEL_DEFN(__reserved_bootmon) + 0x01000;
SECTION_rom_vectors (ram, 0x20200000, LMA_EQ_VMA)
SECTION_text (ram, ALIGN (0x1), 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_fixed_vectors (ram, 0x20000040, LMA_EQ_VMA)
SECTION_data (ram, ALIGN (0x4), FOLLOWING (.gcc_except_table))
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
SECTIONS_END
}
I think I tracked down the problem to this code in
/arm/arch/current/src/vectors.S:
<snip>
start:
LED 5
#if defined(CYG_HAL_STARTUP_RAM) && \
!defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
// If we get restarted, hang here to avoid corrupting memory
ldr r0,.init_flag
ldr r1,[r0]
1: cmp r1,#0
bne 1b
ldr r1,init_done
str r1,[r0]
#endif
</snip>
Could someone explain what this code is supposed to do? According to
me, it just spins forever, but my assembly is kinda rusty.
--
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 reply other threads:[~2007-11-06 10:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 10:13 Tom Deconinck [this message]
2007-11-06 10:34 ` Andrew Lunn
2007-11-06 16:12 ` Tom Deconinck
2007-11-06 16:23 ` Andrew Lunn
2007-11-07 12:34 ` Tom Deconinck
2007-11-07 12:48 ` Andrew Lunn
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=e37cb5250711060213h651ab1a5id4e2bf00e4f917bc@mail.gmail.com \
--to=t.deconinck@gmail.com \
--cc=ecos-discuss@ecos.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).