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: Problem with simulator


>>>>> " " == Cristoforo Abbattista <cristoforo dot abbattista at planetek dot it> writes:

     > I'm trying to load code into the simulator.
     <snip>

     > v850-elf-gcc -c -o hello.o -g -O2 -Wall -I../install/include
     > -ffunction-sections -fdata-sections hello.c

     <snip>
     > --------------------------------------------
     > v850-elf-gdb hello
     > 	GNU gdb 5.2
     > 	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=i586-pc-linux-gnu --target=v850-elf"...

     > target sim
     > 	Connected to the simulator.
     > load
     > 	Loading section .text, size 0x98ac vma 0x205000
     > 	Loading section .rodata, size 0x490 vma 0x20e8ac
     > 	Loading section .data, size 0x1ef4 vma 0x20ed3c
     > 	Start address 0x205000
     > 	Transfer rate: 385408 bits in <1 sec.
     > run
     > 	Starting program: /root/ecos/ecos-work-cris/hello
     > 	core: 2 byte read to unmapped address 0x205000 at 0x205000
	
     > 	Program received signal SIGSEGV, Segmentation fault.
     > 	0x00205000 in start ()
     > 	Current language:  auto; currently c++
     > --------------------------------------------

Most of the simulators provided with gdb are instruction set
simulators only, intended for running the compiler testsuite and not
much else. They don't implement system facilities like interrupts
which are needed to run an OS like eCos, and hence cannot be used to
run eCos applications. Those need an architectural simulator.

For some architectures like the PowerPC the simulator does provide
enough support to run eCos applications. There are corresponding
eCos targets, for example you can configure eCos for target psim and
then run applications in the simulator rather than on real hardware.

Currently the only supported V850 target is ceb_v850, which requires a
Cosmo CEB-v850 board. If you configure eCos for that target then the
resulting applications will only run on such a board, not in a
simulator. There is no v850sim target, so there is no way of running
v850 eCos applications in a simulator. Check the documentation and
http://sources.redhat.com/ecos/hardware.html for details of exactly
which targets are supported.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
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]