[ECOS] How to handle it???

zheng wujun wj_zheng10@hotmail.com
Wed Dec 3 06:10:00 GMT 2003


Hi, Gary
Thanks for your so fast reply.

I'll show you my target redboot_ROM.bin detailed startup screen messages 
bellow:

                 MAC address 08:88:12:34:56:78
                 ks5000_ether: installInterrupts()
                 Ethernet eth0: MAC address 08:88:12:34:56:78
                 IP: 192.168.20.173/255.255.255.0, Gateway: 192.168.20.254
                 Default server: 0.0.0.0, DNS server IP: 0.0.0.0

                RedBoot(tm) bootstrap and debug environment [ROM]
                Non-certified release, version v2_0 - built 10:42:58, Dec  3 
2003

                Platform: Samsung SNDS (ARM 7TDMI)
                Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

               RAM: 0x00000000-0x01000000, 0x0002ff88-0x01000000 available
               RedBoot>
I make my application Hello output as elf file, and then by using the 
command "arm-elf-objcopy" to translate my elf formated hello into binary.

Well, I begin to download my application  Hello with command bellow,and the 
redboot display messages on screeen like this:
               RedBoot> load -v -r -h 192.168.20.172 -m tftp -b 0x300000 
/tftpdboot/hello.bin(or hello)
               ---
               Raw file loaded 0x00300000-0x003100ff, assumed entry at 
0x00300000
OK, I think every thing is very good so far.

But when I execute application hello by doing "GO 0x300000",  the 
application did not say "HELLO!" , instead, the redboot say:

RedBoot>go   0x300000                  
$T0a0f:86000000;0d:80060200;#17$T0a0f:86000000;0d:80060200;#17$T0a0f:86000000;0d:8

note:when I use hello elf format,the same will happen.

That's all happened to my  situation.

By the way, my ROM version Hello.bin burned into flash can work very well 
without the redboot environment, this maybe show that my compilation of 
hello with ecos kernal is allright.

Why hello doesn't run on redboot correctly?

Best Regards

----zheng

>From: Gary Thomas <gary@mlbassoc.com>
>To: zheng wujun <wj_zheng10@hotmail.com>
>CC: ecos-discuss@sources.redhat.com, RandyLin@mxic.com.tw
>Subject: Re: [ECOS] How to handle it???
>Date: 02 Dec 2003 19:23:44 -0700
>
>On Tue, 2003-12-02 at 18:25, zheng wujun wrote:
> > Thanks RandyLin:
> >        Now my redboot can work,and I can use redboot command "load 
>......-m
> > tftp....."to download app to snds board.
> >        Howerer, if not using -r option,the error as displayed "***Abort!
> > Attempt to load ELF data to address: 0x00020000 which is not in RAM".
> >        If using  -r option,app looks like to be downloaded correctly,but 
>the
> > display is "Raw file loaded 0x00300000-0x003c6116, assumed entry at
> > 0x00300000",and then if  using redboot command "go 0x00300000" to 
>execute
> > the app,the redboot will display some strange strings as
> > "
> > 
>$T0a0f:86000000;0d:80060200;#17$T0a0f:86000000;0d:80060200;#17$T0a0f:8600"on
> > console.
>
>When you startup RedBoot, what does it tell you the available RAM
>regions are?  For example, on this board:
>   RAM: 0x00000000-0x00800000, [0x00038de8-0x007ec000] available
>The board has 8MB of RAM, starting at 0x00000000, but RedBoot uses all of
>the memory up to 0x00038de8.  So, for this board, eCos programs are linked
>to start at 0x40000.
>
>Note: eCos programs are typically *not* position independent.  If the 
>program
>is linked to load & run at 0x20000, that's the only location in RAM where
>you can put it.  Your example above where you overrode this and put the
>code at 0x30000 will never work.
>
>Loading a file with the "-r" option tells RedBoot not to interpret the 
>contents
>in any way.  For an ELF file, this is deadly, as you'll be trying to 
>execute
>the ELF binary file header which is just a set of illegal ARM instructions!
>
> >
> > to above,the config is SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)   
>and
> > SECTION_rom_vectors (ram, 0x20000, LMA_EQ_VMA) in file 
>mlt_arm_snds_ram.ldi
> > and  SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)  and  SECTION_data 
>(ram,
> > 0x20000, FOLLOWING (.gcc_except_table)) in mlt_arm_snds_rom.ldi
> >
> > If using arm-elf-gdb to download app,the steps is as following:
> > 1 [root@zheng root]#arm-elf-gdb
> > 2(gdb) target remote /dev/ttyS0
> > Remote debugging using /dev/ttyS0
> > 0x01804b30 in ?? ()
> > (gdb) load /tftpboot/hello
> > Loading section .rom_vectors, size 0x40 lma 0x20000
> > Loading section .text, size 0xfe00 lma 0x20040
> > Ignoring packet error, continuing...
> > Ignoring packet error, continuing...
> > Ignoring packet error, continuing...
> >
> > and gdb use the same serial line as the hyperspatial,the baudrate is 
>38400.
> >
> >
> > Why did these error happen?Can some one have good idea to handle it?
> >
> > Thanks a lot!
> >
> > _________________________________________________________________
> > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
>--
>Gary Thomas <gary@mlbassoc.com>
>MLB Associates
>

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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



More information about the Ecos-discuss mailing list