This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: eCos 3.0 on AT91SAM7X256
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Bernhard Gebert <bernhard_gebert at web dot de>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 28 Apr 2009 18:01:40 +0100
- Subject: [ECOS] Re: eCos 3.0 on AT91SAM7X256
- References: <49F48A52.6090507@web.de>
Hi Bernhard
Bernhard Gebert wrote:
> * Built RedBoot using ConfigTool
> - Loaded Template "Atmel AT91SAM7XEK..."
> - Package "default"
> - Added Package "RedBoot ROM monitor"
> - Changed "Build RedBoot ROM binary image = 1"
> -> RedBoot_ROM.bin has a size of 78 kb
It is preferable to start with the "redboot" package template when
building RedBoot. Take a look at the redboot_ROM.ecm file in the
platform HAL package of a similar target for details of typical
configuration options for building RedBoot for ROM startup. In
particular, you will need:
CYG_HAL_STARTUP == ROM
CYGSEM_HAL_ROM_MONITOR enabled
CYGSEM_HAL_USE_ROM_MONITOR disabled
> * Programmed RedBoot_ROM.bin to Flashbank 0 offset 0 using OpenOCD and
> JTagkey
> * Built the eCos lib with Template "Atmel AT91SAM7XEK...", no changes
> -> "Behave as a ROM monitor = 1" und "Work with a ROM monitor = 0"
> * Built the example "hello" with (extract from makefile)
> hello: hello.o
> $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o hello.elf
> $(ECOS_COMMAND_PREFIX)objcopy -O binary hello.elf hello.bin
> $(ECOS_COMMAND_PREFIX)size hello.elf
> -> hello.bin has a size of 46 kb
>
> Now RedBoot is running, I can communicate via UART1.
> My question is: How must I program the example into the flash to allow a
> call from RedBoot or even automatic startup?
If you want to execute your eCos application out of ROM by jumping to it
from RedBoot, I suggest you configure with:
CYG_HAL_STARTUP == ROM
CYGSEM_HAL_ROM_MONITOR disabled
CYGSEM_HAL_USE_ROM_MONITOR disabled
Your application will then be entirely self-contained.
> Programming it simply somewhere and typing "go 0x..." did not work - as
> expected.
eCos applications are not relocatable. eCos applications built for ROM
startup are typically configured to execute from the start of Flash by
default. You will therefore need to configure
CYGNUM_HAL_ARM_AT91_IMAGE_ADDRESS appropriately before building your
application code.
I hope this helps.
John Dallaway
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss