This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Creating eCos flash application image for AT91 EB40a Redboot


>>     .data 0x4000 : AT ((LOADADDR (.gcc_except_table) + SIZEOF
>            ^^^^^^
>Its easy to miss. I know i missed it the first time as well.

Especially with my extremely low confidence level currently.

Your reply implies to me that I guessed correctly that
I should add another startup type to the repository. :-)

I still get this error.


$ make
arm-elf-gcc -nostartfiles -L/home/oharboe/ecos2/romapp/install/lib
-Ttarget.ld -
mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections -Wl,-static -g
-nostdlib -
o blink blink.o
/home/oharboe/ecos-install/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-
elf/3.2.
1/../../../../arm-elf/bin/ld: address 0x160 of blink section
.fixed_vectors is n
ot within region ram
collect2: ld returned 1 exit status
make: *** [blink] Error 1


So I also changed .ldi file to be:

SECTION_fixed_vectors (ram, 0x10020, LMA_EQ_VMA)


Programming flash didn't work so well:

-----------

RedBoot> version

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 12:51:51, May 22 2003

Platform: Atmel AT91/EB40A (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x00040000, 0x0000a748-0x0003f000 available
FLASH: 0x01010000 - 0x01200000, 31 blocks of 0x00010000 bytes
each.RedBoot> load -r -b 0x20000 -m ymodem
CRaw file loaded 0x00020000-0x000272f3, assumed entry at 0x00020000
xyzModem - CRC mode, 2(SOH)/29(STX)/0(CAN) packets, 4 retries
RedBoot> fis write -f 0x1080000 -b 0x20000 -l 0x72f3
* CAUTION * about to program FLASH
            at 0x01080000..0x0108ffff from 0x00020000 - continue (y/n)?
y
... Erase from 0x01080000-0x01090000: .
... Program from 0x00020000-0x00030000 at 0x01080000: V
Can't program region at 0x01080000: Unknown error
RedBoot>
RedBoot>


------------------

I have not had much luck with the Redboot [ROM], so I thought
I'd try the Redboot [RAM] version. I compiled it and uploaded
it via GDB, which worked better. 

The program didn't run as expected though(my RAM version of my
app flashed the lights and printed to the serial port).

-----------------------
RedBoot> version

RedBoot(tm) bootstrap and debug environment [RAM]
Non-certified release, version UNKNOWN - built 14:41:48, May 23 2003

Platform: Atmel AT91/EB40A (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x00040000, 0x0001f808-0x0003f000 available
FLASH: 0x01010000 - 0x01200000, 31 blocks of 0x00010000 bytes each.
RedBoot>
RedBoot> load -b 0x20000 -r -m ymodem
CRaw file loaded 0x00020000-0x000272f3, assumed entry at 0x00020000
xyzModem - CRC mode, 2(SOH)/29(STX)/0(CAN) packets, 4 retries
RedBoot> fis write -f 0x1080000 -l 0x72f3 -b 0x20000
* CAUTION * about to program FLASH
            at 0x01080000..0x0108ffff from 0x00020000 - continue (y/n)?
y
... Erase from 0x01080000-0x01090000: .
... Program from 0x00020000-0x00030000 at 0x01080000: .
RedBoot>
RedBoot> mcmp -s 0x20000 -d 0x1080000 -l 0x72f3
RedBoot> mcmp -s 0x10000 -d 0x1080000 -l 0x10000
Buffers don't match - 0x00010000=0x00000048, 0x01080000=0xe59ff018
RedBoot> go 0x1080000
------------------ the board has apparently frozen at this point ----

I tried, on an inkling, to modify the .ldi file to the below, but
that didn't work either.

--------------
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
    ram  : ORIGIN = 0x00010000, LENGTH = 0x30000
    baseram  : ORIGIN = 0x00000000, LENGTH = 0x40000
    rom  : ORIGIN = 0x01080000, LENGTH = 0x80000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_rom_vectors (rom, 0x01080000, LMA_EQ_VMA)
    SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
    SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (baseram, 0x20, LMA_EQ_VMA)
    SECTION_data (ram, 0x14000, FOLLOWING (.gcc_except_table))
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}
--------------





-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]