public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] How to use the simulators
@ 2007-11-06 12:18 badiu raz
  2007-11-06 12:27 ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: badiu raz @ 2007-11-06 12:18 UTC (permalink / raw)
  To: ecos-discuss

Hi,
I am trying to use the simulators for the hello world program but I
can not make it work, it just freezes with no result. I am using the
arm simulator but i also tried  the others(powerpc, mimps32 etc).
$ arm-elf-gdb
GNU gdb 5.3 (eCosCentric)
Copyright 2002 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) file hello
Reading symbols from hello...done.
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .rom_vectors, size 0x40 vma 0x4000000
Loading section .text, size 0xbca0 vma 0x4000040
Loading section .rodata, size 0x3c4 vma 0x400bce0
Loading section .data, size 0x35c vma 0x800
Start address 0x4000040
Transfer rate: 401408 bits in <1 sec.
(gdb) run
Starting program: /opt/ecos/ecos-2.0/examples/hello

after waiting 10 minutes i`ve closed the application. I have a p4 at
3Ghz  so i dont see how a simple program need more time to execute.
I`ve compiled the example using the makefile that was in that folder.
Please give some advice to make this work.

Razone

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
  2007-11-06 12:18 [ECOS] How to use the simulators badiu raz
@ 2007-11-06 12:27 ` Andrew Lunn
  2007-11-06 12:40   ` badiu raz
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2007-11-06 12:27 UTC (permalink / raw)
  To: badiu raz; +Cc: ecos-discuss

On Tue, Nov 06, 2007 at 02:18:12PM +0200, badiu raz wrote:
> Hi,
> I am trying to use the simulators for the hello world program but I
> can not make it work, it just freezes with no result. I am using the
> arm simulator but i also tried  the others(powerpc, mimps32 etc).
> $ arm-elf-gdb
> GNU gdb 5.3 (eCosCentric)
> Copyright 2002 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) file hello
> Reading symbols from hello...done.
> (gdb) target sim
> Connected to the simulator.
> (gdb) load
> Loading section .rom_vectors, size 0x40 vma 0x4000000
> Loading section .text, size 0xbca0 vma 0x4000040
> Loading section .rodata, size 0x3c4 vma 0x400bce0
> Loading section .data, size 0x35c vma 0x800
> Start address 0x4000040
> Transfer rate: 401408 bits in <1 sec.
> (gdb) run
> Starting program: /opt/ecos/ecos-2.0/examples/hello
> 
> after waiting 10 minutes i`ve closed the application. I have a p4 at
> 3Ghz  so i dont see how a simple program need more time to execute.
> I`ve compiled the example using the makefile that was in that folder.
> Please give some advice to make this work.

Have you checked the simulators simulate a serial port? Have you
checked you have a driver for the serial port?

Since you appear to be on Linux i would suggest you use the synthetic
target. I also suggest you don't use verison 2.0 which is very
old. See the anonymous CVS page.

     Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
  2007-11-06 12:27 ` Andrew Lunn
@ 2007-11-06 12:40   ` badiu raz
  2007-11-06 13:01     ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: badiu raz @ 2007-11-06 12:40 UTC (permalink / raw)
  To: badiu raz, ecos-discuss

I am using windows xp and the latest version of cygwin. About the
serial port I dont understand. The application must only show messages
on the screen

Razone

On 11/6/07, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Nov 06, 2007 at 02:18:12PM +0200, badiu raz wrote:
> > Hi,
> > I am trying to use the simulators for the hello world program but I
> > can not make it work, it just freezes with no result. I am using the
> > arm simulator but i also tried  the others(powerpc, mimps32 etc).
> > $ arm-elf-gdb
> > GNU gdb 5.3 (eCosCentric)
> > Copyright 2002 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) file hello
> > Reading symbols from hello...done.
> > (gdb) target sim
> > Connected to the simulator.
> > (gdb) load
> > Loading section .rom_vectors, size 0x40 vma 0x4000000
> > Loading section .text, size 0xbca0 vma 0x4000040
> > Loading section .rodata, size 0x3c4 vma 0x400bce0
> > Loading section .data, size 0x35c vma 0x800
> > Start address 0x4000040
> > Transfer rate: 401408 bits in <1 sec.
> > (gdb) run
> > Starting program: /opt/ecos/ecos-2.0/examples/hello
> >
> > after waiting 10 minutes i`ve closed the application. I have a p4 at
> > 3Ghz  so i dont see how a simple program need more time to execute.
> > I`ve compiled the example using the makefile that was in that folder.
> > Please give some advice to make this work.
>
> Have you checked the simulators simulate a serial port? Have you
> checked you have a driver for the serial port?
>
> Since you appear to be on Linux i would suggest you use the synthetic
> target. I also suggest you don't use verison 2.0 which is very
> old. See the anonymous CVS page.
>
>      Andrew
>

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
  2007-11-06 12:40   ` badiu raz
@ 2007-11-06 13:01     ` Andrew Lunn
  2007-11-06 13:20       ` badiu raz
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2007-11-06 13:01 UTC (permalink / raw)
  To: badiu raz; +Cc: ecos-discuss

On Tue, Nov 06, 2007 at 02:33:10PM +0200, badiu raz wrote:
> I am using windows xp and the latest version of cygwin. About the
> serial port I dont understand. The application must only show messages
> on the screen

You are not thinking embedded....

How does the simulated hardware get access to the screen? 

On real hardware you have a serial port which you write debug messages
out. eCos has a device driver for the serial port and your hello world
will be using the serial port. But does the simulator have a simulated
serial port? Or is the serial drive just accessing memory addresses
that do nothing?

       Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
  2007-11-06 13:01     ` Andrew Lunn
@ 2007-11-06 13:20       ` badiu raz
  2007-11-06 14:36         ` badiu raz
  2007-11-06 14:39         ` Andrew Lunn
  0 siblings, 2 replies; 11+ messages in thread
From: badiu raz @ 2007-11-06 13:20 UTC (permalink / raw)
  To: badiu raz, ecos-discuss

I am a newbie to ecos so i dont really understand how the simulator
works. I`ve got your point but still dont know what to do. I`ve
compiled the samples and run them in the simulator like previously
shown. And all the instruction i`ve seen on the web do not mention any
extra steeps. So if you could be so kind to tell me what I am doing
(or not doing) wrong I will be most than grateful.(I just need to run
the hello world program)

Thanks,
Razone

On 11/6/07, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Nov 06, 2007 at 02:33:10PM +0200, badiu raz wrote:
> > I am using windows xp and the latest version of cygwin. About the
> > serial port I dont understand. The application must only show messages
> > on the screen
>
> You are not thinking embedded....
>
> How does the simulated hardware get access to the screen?
>
> On real hardware you have a serial port which you write debug messages
> out. eCos has a device driver for the serial port and your hello world
> will be using the serial port. But does the simulator have a simulated
> serial port? Or is the serial drive just accessing memory addresses
> that do nothing?
>
>        Andrew
>

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
  2007-11-06 13:20       ` badiu raz
@ 2007-11-06 14:36         ` badiu raz
  2007-11-06 14:39         ` Andrew Lunn
  1 sibling, 0 replies; 11+ messages in thread
From: badiu raz @ 2007-11-06 14:36 UTC (permalink / raw)
  To: badiu raz, ecos-discuss

After searching a bit more through the mailing list I`ve found this
http://sourceware.org/ml/ecos-discuss/2005-09/msg00249.html and this
http://ecos.sourceware.org/docs-latest/ref/hal-synth-arch.html . I
have the same problem like Rutger Hofman could not get the simulator
working. My problem is that i can not use linux i can only use
windows. so i gues there is no solution for me:(
If you can tell me a solution or a workaround please do

sorry for the noobie questions hope i havent stressed you to much:D

On 11/6/07, badiu raz <razone@gmail.com> wrote:
> I am a newbie to ecos so i dont really understand how the simulator
> works. I`ve got your point but still dont know what to do. I`ve
> compiled the samples and run them in the simulator like previously
> shown. And all the instruction i`ve seen on the web do not mention any
> extra steeps. So if you could be so kind to tell me what I am doing
> (or not doing) wrong I will be most than grateful.(I just need to run
> the hello world program)
>
> Thanks,
> Razone
>
> On 11/6/07, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Tue, Nov 06, 2007 at 02:33:10PM +0200, badiu raz wrote:
> > > I am using windows xp and the latest version of cygwin. About the
> > > serial port I dont understand. The application must only show messages
> > > on the screen
> >
> > You are not thinking embedded....
> >
> > How does the simulated hardware get access to the screen?
> >
> > On real hardware you have a serial port which you write debug messages
> > out. eCos has a device driver for the serial port and your hello world
> > will be using the serial port. But does the simulator have a simulated
> > serial port? Or is the serial drive just accessing memory addresses
> > that do nothing?
> >
> >        Andrew
> >
>

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
  2007-11-06 13:20       ` badiu raz
  2007-11-06 14:36         ` badiu raz
@ 2007-11-06 14:39         ` Andrew Lunn
  2007-11-06 15:54           ` Nick Garnett
  1 sibling, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2007-11-06 14:39 UTC (permalink / raw)
  To: badiu raz; +Cc: ecos-discuss

On Tue, Nov 06, 2007 at 03:20:11PM +0200, badiu raz wrote:
> I am a newbie to ecos so i dont really understand how the simulator
> works. I`ve got your point but still dont know what to do. I`ve
> compiled the samples and run them in the simulator like previously
> shown. And all the instruction i`ve seen on the web do not mention any
> extra steeps. So if you could be so kind to tell me what I am doing
> (or not doing) wrong I will be most than grateful.(I just need to run
> the hello world program)

Please don't top post.

Try looking at this:

http://ecos.sourceware.org/docs-latest/user-guide/setup-tx39-sim.html

the tx39 simulator does have a simulated serial port as far as i
remember, but its about 7 years since i used it, so maybe im wrong.

        Andrew

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
  2007-11-06 14:39         ` Andrew Lunn
@ 2007-11-06 15:54           ` Nick Garnett
       [not found]             ` <53603a8c0711070601u13d59296m94021930dfaa1d1c@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Nick Garnett @ 2007-11-06 15:54 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: badiu raz, ecos-discuss

Andrew Lunn <andrew@lunn.ch> writes:

> On Tue, Nov 06, 2007 at 03:20:11PM +0200, badiu raz wrote:
> > I am a newbie to ecos so i dont really understand how the simulator
> > works. I`ve got your point but still dont know what to do. I`ve
> > compiled the samples and run them in the simulator like previously
> > shown. And all the instruction i`ve seen on the web do not mention any
> > extra steeps. So if you could be so kind to tell me what I am doing
> > (or not doing) wrong I will be most than grateful.(I just need to run
> > the hello world program)
> 
> Please don't top post.
> 
> Try looking at this:
> 
> http://ecos.sourceware.org/docs-latest/user-guide/setup-tx39-sim.html
> 
> the tx39 simulator does have a simulated serial port as far as i
> remember, but its about 7 years since i used it, so maybe im wrong.

The simulators in GDB were mostly designed to allow the compiler
writers to test their code. Therefore most simulators don't implement
all of the instruction set, and don't have any device support.

Some simulators are more complete. As Andrew says, the TX39 simulator
is fully functional, as is the PowerPC simulator, although you have to
configure it correctly.

If you cannot use the Linux synthetic target, then an alternative is
to use a PC emulator like Bochs or Qemu. Just treat it like a PC and
build eCos to boot from floppy.


-- 
Nick Garnett                                     eCos Kernel Architect
eCosCentric Limited     http://www.eCosCentric.com/   The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] How to use the simulators
       [not found]             ` <53603a8c0711070601u13d59296m94021930dfaa1d1c@mail.gmail.com>
@ 2007-11-07 14:39               ` Nick Garnett
  2007-11-07 15:29                 ` [ECOS] Starting point for a new port for a MIPS 4KEc core Domegan, Patrick
  0 siblings, 1 reply; 11+ messages in thread
From: Nick Garnett @ 2007-11-07 14:39 UTC (permalink / raw)
  To: ecos-discuss; +Cc: badiu raz



Please keep messages on the mailing list so that others may follow the
conversation and it is archived for future reference.


"badiu raz" <razone@gmail.com> writes:

> On 06 Nov 2007 15:54:37 +0000, Nick Garnett <nickg@ecoscentric.com> wrote:

> >
> > The simulators in GDB were mostly designed to allow the compiler
> > writers to test their code. Therefore most simulators don't implement
> > all of the instruction set, and don't have any device support.
> >
> > Some simulators are more complete. As Andrew says, the TX39 simulator
> > is fully functional, as is the PowerPC simulator, although you have to
> > configure it correctly.
> >
> > If you cannot use the Linux synthetic target, then an alternative is
> > to use a PC emulator like Bochs or Qemu. Just treat it like a PC and
> > build eCos to boot from floppy.
> 
> I`ve tried that macro but still it doesnt work:( I`ve also used Bochs
> and qemu but something strange is happening: i`ve built the imagine
> using the redboot packages and imported redboot_FLOPPY.ecm from the
> latest version and from the version 2.0  and the redboot image cannot
> be read by either programs not even when i try mounting it with Daemon
> Tools. Do I need to convert it to img file format or the bin format is
> the same thing?

You need to install the binary (.bin file) onto a floppy disk image
and get the emulator to boot from that. It should just behave like a
standard PC. Make sure that the emulator's config file is set up
correctly for floppy boot, no hard disk. You may need to enable
logging to see what the emulator is doing.

It may be worth writing the binary it to a real floppy and trying it
out on a real PC to check that it works first, and give you some idea
of what to expect.

I would avoid using 2.0, work only from the current CVS sources.

-- 
Nick Garnett                                     eCos Kernel Architect
eCosCentric Limited     http://www.eCosCentric.com/   The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.    Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [ECOS] Starting point for a new port for a MIPS 4KEc core
  2007-11-07 14:39               ` Nick Garnett
@ 2007-11-07 15:29                 ` Domegan, Patrick
  2007-11-07 17:49                   ` Stefan Sommerfeld
  0 siblings, 1 reply; 11+ messages in thread
From: Domegan, Patrick @ 2007-11-07 15:29 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I am starting a new project creating a new eCOS port for a system with a
MIPS 4KEc core.  Would you recommend a platform HAL as a starting point?


Thanks
Patrick



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ECOS] Starting point for a new port for a MIPS 4KEc core
  2007-11-07 15:29                 ` [ECOS] Starting point for a new port for a MIPS 4KEc core Domegan, Patrick
@ 2007-11-07 17:49                   ` Stefan Sommerfeld
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Sommerfeld @ 2007-11-07 17:49 UTC (permalink / raw)
  Cc: ecos-discuss

Hi Patrick,
> Hi,
> 
> I am starting a new project creating a new eCOS port for a system with a
> MIPS 4KEc core.  Would you recommend a platform HAL as a starting point?
> 
I use eCos on a PMC-Sierra MSP8510 (MIPS 5K core) and I used the MIPS64 
or MIPS32 variant and started with Atlas or Malta platform.

Bye...


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-11-07 17:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-06 12:18 [ECOS] How to use the simulators badiu raz
2007-11-06 12:27 ` Andrew Lunn
2007-11-06 12:40   ` badiu raz
2007-11-06 13:01     ` Andrew Lunn
2007-11-06 13:20       ` badiu raz
2007-11-06 14:36         ` badiu raz
2007-11-06 14:39         ` Andrew Lunn
2007-11-06 15:54           ` Nick Garnett
     [not found]             ` <53603a8c0711070601u13d59296m94021930dfaa1d1c@mail.gmail.com>
2007-11-07 14:39               ` Nick Garnett
2007-11-07 15:29                 ` [ECOS] Starting point for a new port for a MIPS 4KEc core Domegan, Patrick
2007-11-07 17:49                   ` Stefan Sommerfeld

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).