1/1

|
Problems about OR1KSIM?
by MichaelLiao on Mar 9, 2005 |
MichaelLiao
Posts: 7 Joined: Aug 6, 2015 Last seen: Aug 7, 2015 |
||
|
Dear All:
Can anybody tell me that the or1ksim works? I follow the steps given by READM.or1k in rtems/ directory. No message is printed but the WARNING from OR1KSIM: ... WARNING: memory write to 0x107819e4, non-write memory area (value 0x00000008) WARNING: memory write to 0x107819ec, non-write memory area (value 0x00000000) WARNING: memory write to 0x107819e0, non-write memory area (value 0x107819f0) WARNING: memory write to 0x107819dc, non-write memory area (value 0x00003608) ... anybody can tell me why? michael |
|||
|
Problems about OR1KSIM?
by Unknown on Mar 9, 2005 |
Not available! | ||
|
Can anybody tell me that the or1ksim works? I follow the steps given by READM.or1k in rtems/ directory. No message is printed but the WARNING from OR1KSIM:
You are probably trying to use the load command in gdb which would load the
program to flash memory, which is non-writeable. I am working on a fix to this
problem, but it's unfortiounatly going to take a couple of weeks to get out the
door. In the meantime you can work around it by haveing or1ksim load the
program and then attach to it with gdb:
$ sim rtems (or whatever the rtems binary is called)
And then in another terminal:
$ or32-rtems-gdb rtems
...
(gdb) target jtag jtag://localhost:9999
(gdb) set $pc=0x100
nog.
... WARNING: memory write to 0x107819e4, non-write memory area (value 0x00000008) WARNING: memory write to 0x107819ec, non-write memory area (value 0x00000000) WARNING: memory write to 0x107819e0, non-write memory area (value 0x107819f0) WARNING: memory write to 0x107819dc, non-write memory area (value 0x00003608) ... anybody can tell me why? |
|||
|
Problems about OR1KSIM?
by Unknown on Mar 9, 2005 |
Not available! | ||
|
* Michael Liao (armdev@dtk.com.tw) wrote:
Dear All:
Can anybody tell me that the or1ksim works? I follow the steps given by READM.or1k in rtems/ directory. No message is printed but the WARNING from OR1KSIM: ... WARNING: memory write to 0x107819e4, non-write memory area (value 0x00000008) WARNING: memory write to 0x107819ec, non-write memory area (value 0x00000000) WARNING: memory write to 0x107819e0, non-write memory area (value 0x107819f0) WARNING: memory write to 0x107819dc, non-write memory area (value 0x00003608) ... anybody can tell me why? Hi, this message means, that the code you're simulating writes to addresses at which no memory or device resides. I suggest you look at the code (if the addresses are ok) and change the sim.cfg accordingly. best regards, p. |
|||
|
Problems about OR1KSIM?
by MichaelLiao on Mar 10, 2005 |
MichaelLiao
Posts: 7 Joined: Aug 6, 2015 Last seen: Aug 7, 2015 |
||
|
I follow your steps ,but not getting the right result.
1) mkfifo /tmp/uart0.rx
mkfifo /tmp/uart0.tx
1) running SIM
Just change sim.cfg to debugging mode and channel in uart section to /tmp/uart0.rx and /tmp/uart0.tx , respectively. The following is as follows:
[lsq@rh73 or1ksim]$ ~/testpool/target/b-sim/sim ~/testpool/target/b-rtems/bender/samples/hello.exe
Reading script file from 'sim.cfg'...
Verbose on, simdebug off, interactive prompt off
Machine initialization...
Clock cycle: 100ns
Data cache present.
Insn cache tag present.
BPB simulation off.
BTIC simulation off.
Building automata... done, num uncovered: 0/212.
Parsing operands data... done.
loadcode: filename /home/lsq/testpool/target/b-rtems/bender/samples/hello.exe startaddr=0 virtphy_transl=0
COFF magic: 0x017a
COFF flags: 0x0203
COFF symptr: 0x001591f6
Section: .text, paddr: 0x00000000, vaddr: 0x00000000, size: 0x0002fa70, scnptr: 0x000000f8
Section: .data, paddr: 0x0002fa70, vaddr: 0x10000000, size: 0x00001cc0, scnptr: 0x0002fb68
Section: .bss, paddr: 0x00031730, vaddr: 0x10001cc0, size: 0x00000010, scnptr: 0x00000000
Section: .stab, paddr: 0x00000000, vaddr: 0x00000000, size: 0x000c3738, scnptr: 0x00031828
Section: .stabstr, paddr: 0x000c3738, vaddr: 0x000c3738, size: 0x0006423c, scnptr: 0x000f4f60
Warning: one or more extra sections. These sections were handled as .data sections.
Finished loading COFF.
Finished loading symbols.
JTAG Proxy server started on port 9999
WARNING: dependstats stats must be enabled to do history analisis.
Resetting 1 UART(s).
UART0 at 0x80000000 uses 0
WARNING: Keyboard has problems with RX file stream.
NOTE : ata_device, using device type FILE.
file /tmp/sim_atadev0 already exists. Using existing file.
ata_device_debug: requested filesize was: 1 (MBytes).
ata_device_debug: actual filesize is: 1 (MBytes).
NOTE : ata_device, using type NO_CONNECT.
ata_device_debug: ata_devices_hw_reset.
setting status register BSY 0x80
Resetting Tick Timer.
Resetting Power Management.
Resetting PIC.
Resetting memory controller.
Starting at 0x00000000
Exception 0x100 (Reset) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x4, cycles 0, #0
3) In another terminal
[lsq@rh73 samples]$ /tmp/tools/or32-rtems/bin/or32-rtems-gdb hello.exe
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-linux-gnu --target=or32-rtems"...
(gdb) target jtag jtag://localhost:9999
Remote or1k debugging using jtag://localhost:9999
0x100 in __rst ()
(gdb) set $pc=0x100
(gdb) break exit
Breakpoint 1 at 0x2398c: file ../../../../../../or1k/gcc/newlib/libc/stdlib/exit.c, line 61.
(gdb) run
Starting program: /home/lsq/testpool/target/b-rtems/bender/samples/hello.exe
STOP HERE!!! (seems that it looping forever)
AND NO MESSAGES DISPLAY IN cat nog@sdf.lonestar.org>
To: "List about OpenRISC project" openrisc@opencores.org>
Sent: Wednesday, March 09, 2005 1:22 PM
Subject: Re: [openrisc] Problems about OR1KSIM?
Can anybody tell me that the or1ksim works? I follow the steps given by READM.or1k in rtems/ directory. No message is printed but the WARNING from OR1KSIM:
You are probably trying to use the load command in gdb which would load the
program to flash memory, which is non-writeable. I am working on a fix to this
problem, but it's unfortiounatly going to take a couple of weeks to get out the
door. In the meantime you can work around it by haveing or1ksim load the
program and then attach to it with gdb:
$ sim rtems (or whatever the rtems binary is called)
And then in another terminal:
$ or32-rtems-gdb rtems
...
(gdb) target jtag jtag://localhost:9999
(gdb) set $pc=0x100
nog.
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc
... WARNING: memory write to 0x107819e4, non-write memory area (value 0x00000008) WARNING: memory write to 0x107819ec, non-write memory area (value 0x00000000) WARNING: memory write to 0x107819e0, non-write memory area (value 0x107819f0) WARNING: memory write to 0x107819dc, non-write memory area (value 0x00003608) ... anybody can tell me why? |
|||
|
Problems about OR1KSIM?
by Unknown on Mar 10, 2005 |
Not available! | ||
|
[lsq@rh73 or1ksim]$ ~/testpool/target/b-sim/sim ~/testpool/target/b-rtems/bender/samples/hello.exe
Reading script file from 'sim.cfg'...
Verbose on, simdebug off, interactive prompt off
Machine initialization...
Clock cycle: 100ns
Data cache present.
Insn cache tag present.
BPB simulation off.
BTIC simulation off.
Building automata... done, num uncovered: 0/212.
Parsing operands data... done.
loadcode: filename /home/lsq/testpool/target/b-rtems/bender/samples/hello.exe startaddr=0 virtphy_transl=0
COFF magic: 0x017a
COFF flags: 0x0203
COFF symptr: 0x001591f6
Section: .text, paddr: 0x00000000, vaddr: 0x00000000, size: 0x0002fa70, scnptr: 0x000000f8
Section: .data, paddr: 0x0002fa70, vaddr: 0x10000000, size: 0x00001cc0, scnptr: 0x0002fb68
Section: .bss, paddr: 0x00031730, vaddr: 0x10001cc0, size: 0x00000010, scnptr: 0x00000000
Section: .stab, paddr: 0x00000000, vaddr: 0x00000000, size: 0x000c3738, scnptr: 0x00031828
Section: .stabstr, paddr: 0x000c3738, vaddr: 0x000c3738, size: 0x0006423c, scnptr: 0x000f4f60
^^^^^^^^^^^^^^ I would bet that this is the problem. The sim should never load the debugging symbols. I will have alook at this problem after I finish my long-outstanding work on or1ksim (in other words: don't expect it to happen soon). It would be great if you could have alook at the COFF loading code and fix it (it is in cpu/common/parse.c). If you don't want to do that then you have 2 options: 1) Don't build with debugging symbols (or strip the resulting binary). 2) Use an ELF binary. You should be able to convert your COFF file to an elf file with or32-rtems-objcopy. nog. |
|||
|
Problems about OR1KSIM?
by Unknown on Mar 10, 2005 |
Not available! | ||
|
Have you checked that that test program you are running (hello.exe) actually
does properly work (ie doesn't loop). I'd suggest you do
~/testpool/target/b-sim/sim -i
~/testpool/target/b-rtems/bender/samples/hello.exe
and then single step by doing the "t" command in the simulator (if you get
bored of doing many "t" you can do something like "run 1000" and that will
execute 1000 instructions).
Alternatively, you can also the way you were doing it, and check the
"executed.log". There are two modes for executed.log, HW mode and SW mode.
SW mode is much more readable. You set the mode for exectued.log in sim.cfg.
If your simulations don't produce executed.log, you have to enable it in
sim.cfg, I believe by default is disabled (because it makes simulations
slower).
regards,
Damjan
----- Original Message -----
From: "Michael Liao" armdev@dtk.com.tw>
To: "List about OpenRISC project" openrisc@opencores.org>
Sent: Thursday, March 10, 2005 4:49 AM
Subject: Re: [openrisc] Problems about OR1KSIM?
I follow your steps ,but not getting the right result.
1) mkfifo /tmp/uart0.rx
mkfifo /tmp/uart0.tx
1) running SIM
Just change sim.cfg to debugging mode and channel in uart section to
/tmp/uart0.rx and /tmp/uart0.tx , respectively. The following is as
follows:
[lsq@rh73 or1ksim]$ ~/testpool/target/b-sim/sim
~/testpool/target/b-rtems/bender/samples/hello.exe
Reading script file from 'sim.cfg'...
Verbose on, simdebug off, interactive prompt off
Machine initialization...
Clock cycle: 100ns
Data cache present.
Insn cache tag present.
BPB simulation off.
BTIC simulation off.
Building automata... done, num uncovered: 0/212.
Parsing operands data... done.
loadcode: filename
/home/lsq/testpool/target/b-rtems/bender/samples/hello.exe startaddr=0
virtphy_transl=0
COFF magic: 0x017a
COFF flags: 0x0203
COFF symptr: 0x001591f6
Section: .text, paddr: 0x00000000, vaddr: 0x00000000, size: 0x0002fa70,
scnptr: 0x000000f8
Section: .data, paddr: 0x0002fa70, vaddr: 0x10000000, size: 0x00001cc0,
scnptr: 0x0002fb68
Section: .bss, paddr: 0x00031730, vaddr: 0x10001cc0, size: 0x00000010,
scnptr: 0x00000000
Section: .stab, paddr: 0x00000000, vaddr: 0x00000000, size: 0x000c3738,
scnptr: 0x00031828
Section: .stabstr, paddr: 0x000c3738, vaddr: 0x000c3738, size: 0x0006423c,
scnptr: 0x000f4f60
Warning: one or more extra sections. These sections were handled as .data
sections.
Finished loading COFF.
Finished loading symbols.
JTAG Proxy server started on port 9999
WARNING: dependstats stats must be enabled to do history analisis.
Resetting 1 UART(s).
UART0 at 0x80000000 uses 0
WARNING: Keyboard has problems with RX file stream.
NOTE : ata_device, using device type FILE.
file /tmp/sim_atadev0 already exists. Using existing file.
ata_device_debug: requested filesize was: 1 (MBytes).
ata_device_debug: actual filesize is: 1 (MBytes).
NOTE : ata_device, using type NO_CONNECT.
ata_device_debug: ata_devices_hw_reset.
setting status register BSY 0x80
Resetting Tick Timer.
Resetting Power Management.
Resetting PIC.
Resetting memory controller.
Starting at 0x00000000
Exception 0x100 (Reset) at 0x0, EA: 0x0, ppc: 0x0, npc: 0x4, cycles 0, #0
3) In another terminal
[lsq@rh73 samples]$ /tmp/tools/or32-rtems/bin/or32-rtems-gdb hello.exe
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-linux-gnu --target=or32-rtems"...
(gdb) target jtag jtag://localhost:9999
Remote or1k debugging using jtag://localhost:9999
0x100 in __rst ()
(gdb) set $pc=0x100
(gdb) break exit
Breakpoint 1 at 0x2398c: file
../../../../../../or1k/gcc/newlib/libc/stdlib/exit.c, line 61.
(gdb) run
Starting program:
/home/lsq/testpool/target/b-rtems/bender/samples/hello.exe
STOP HERE!!! (seems that it looping forever)
AND NO MESSAGES DISPLAY IN cat nog@sdf.lonestar.org>
To: "List about OpenRISC project" openrisc@opencores.org>
Sent: Wednesday, March 09, 2005 1:22 PM
Subject: Re: [openrisc] Problems about OR1KSIM?
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc
Can anybody tell me that the or1ksim works? I follow the steps given by
You are probably trying to use the load command in gdb which would load
the
program to flash memory, which is non-writeable. I am working on a fix
to this
problem, but it's unfortiounatly going to take a couple of weeks to get
out the
door. In the meantime you can work around it by haveing or1ksim load the
program and then attach to it with gdb:
$ sim rtems (or whatever the rtems binary is called)
And then in another terminal:
$ or32-rtems-gdb rtems
...
(gdb) target jtag jtag://localhost:9999
(gdb) set $pc=0x100
nog.
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc
READM.or1k in rtems/ directory. No message is printed but the WARNING from OR1KSIM: ... WARNING: memory write to 0x107819e4, non-write memory area (value 0x00000008) WARNING: memory write to 0x107819ec, non-write memory area (value 0x00000000) WARNING: memory write to 0x107819e0, non-write memory area (value 0x107819f0) WARNING: memory write to 0x107819dc, non-write memory area (value 0x00003608) ... anybody can tell me why? |
|||
|
Problems about OR1KSIM?
by MichaelLiao on Mar 10, 2005 |
MichaelLiao
Posts: 7 Joined: Aug 6, 2015 Last seen: Aug 7, 2015 |
||
|
[lsq@rh73 or1ksim]$ ~/testpool/target/b-sim/sim ~/testpool/target/b-rtems/bender/samples/hello.exe
Reading script file from 'sim.cfg'...
Verbose on, simdebug off, interactive prompt off
Machine initialization...
Clock cycle: 100ns
Data cache present.
Insn cache tag present.
BPB simulation off.
BTIC simulation off.
Building automata... done, num uncovered: 0/212.
Parsing operands data... done.
loadcode: filename /home/lsq/testpool/target/b-rtems/bender/samples/hello.exe startaddr=0 virtphy_transl=0
COFF magic: 0x017a
COFF flags: 0x0203
COFF symptr: 0x001591f6
Section: .text, paddr: 0x00000000, vaddr: 0x00000000, size: 0x0002fa70, scnptr: 0x000000f8
Section: .data, paddr: 0x0002fa70, vaddr: 0x10000000, size: 0x00001cc0, scnptr: 0x0002fb68
Section: .bss, paddr: 0x00031730, vaddr: 0x10001cc0, size: 0x00000010, scnptr: 0x00000000
Section: .stab, paddr: 0x00000000, vaddr: 0x00000000, size: 0x000c3738, scnptr: 0x00031828
Section: .stabstr, paddr: 0x000c3738, vaddr: 0x000c3738, size: 0x0006423c, scnptr: 0x000f4f60
^^^^^^^^^^^^^^
I would bet that this is the problem. The sim should never load the debugging
symbols. I will have alook at this problem after I finish my long-outstanding
work on or1ksim (in other words: don't expect it to happen soon). It would be
great if you could have alook at the COFF loading code and fix it (it is in
cpu/common/parse.c). If you don't want to do that then you have 2 options:
1) Don't build with debugging symbols (or strip the resulting binary).
2) Use an ELF binary. You should be able to convert your COFF file to an elf
file with or32-rtems-objcopy.
nog.
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc
Yes ,section .stab overwrites section .text(ALL of their paddr begins at address 0x0). I just test it by loading 3 sections only(.text, .data & .bss). It runs happily and it means that the hello.exe works properly (Damjan suggests me to verify whether it works properly or not). michael |
|||
1/1

