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]

RE: Hello world on AEB rev.C


Well I'm running windows NT on that machine so I use a Hyperterminal with
baud rate 38400. But I have done it with the prompt too:

arm-elf-gdb  nw 

(gdb) set remotebaud 38400    

(gdb) target remote COM1



When using Hyperterminal I do it like this.

download c000 

(then I go to the location of the image
"eCos/loaders/arm-aeb/gdb_module-revC.img)

When the download is completed and a message tells you how many bytes that
was downloaded.

flashwrite 4018000 c000 8000

plugin eCos

NOTE: The command (gdb) set mips-force-32bit-saved-gpregs should not be
used.



Then I invoke insight, arm-elf-gdb my_prog&, in which I use 'run->download'
target=Remote/serial and baudrate=38400.



> My question is:

> 

> - After the plugin command, is there some other things to be 

> done before connecting to the target?

No, just close the connection and download your program.



> - Is there a way to unsterstand wheter or not the gdb-module I use is

> correctly initialized and working?

Don't think so. I have been trying building new modules for 3 weeks and my
only test was if I could connect or not...



> I think the problem is that the gdb-stub is not correctly writed in to

> the flash memory, because I don't see

> the output ++$T01.. that Johnatan Larmour mentioned in his reply to my

> previous mail.

I have never seen any such output.



> 

> Has your board the efi0053c.bin or the at29c020.bin rom image? I think

> it could be a problem related to

> the efi0053c image version.

No idea.

> Any ideas?

I actually wrote some notes how to get the hello world example running, here
it is:

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

After installing the stub eCos has to be built matching your processor
(AEB-1). This is done in the Configuration Tool (Program->Red Hat eCos->
Configuration Tool). The procedure is given in  Configuring and Building
eCos from Source 64 . Don't forget to select revC.



Your first program is compiled using this command e.g. 

bash.exe-2.04$ arm-elf-gcc -g -I/d/ecos-work/myeCos_install/include hello.c
-L/

d/ecos-work/myeCos_install/lib -Ttarget.ld -nostdlib

The executable program will be called a.out. If you prefer some other name
add the option  o my_own_name.

The commands to run the program look like this.



Alternative 1   prompt



bash.exe-2.04$ arm-elf-gdb -nw a.out

GNU gdb 5.0

Copyright 2000 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain
conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf"...

(gdb) set remotebaud 38400

(gdb) target remote COM1

Remote debugging using COM1

0x401a604 in ?? ()

(gdb) load

Loading section .rom_vectors, size 0x60 lma 0xc000

Loading section .text, size 0xe7d0 lma 0xc060

Loading section .rodata, size 0x3e8 lma 0x1a830

Loading section .data, size 0x2fc lma 0x1ac18

Start address 0xc060 , load size 61204

Transfer rate: 28801 bits/sec, 302 bytes/write.

(gdb) continue

Continuing.

Hello, eCos world!



NOTE: Make sure the paths don t contain any spaces.



Alternative 2   graphical



bash.exe-2.04$ arm-elf-gdb a.out &



This command invokes the graphical Insight-debugger. To run your program
through this interface just select  Run . First you will be prompted to
select which target you want to connect to, select  Remote/Serial  and
press ok, then you can see when your code being downloaded to the board.



Good luck

/Andreas

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