profile
viewpoint
Aram Hăvărneanu 4ad Vienna, Austria

acln0/perf 19

tentative golang.org/x/sys/unix/linux/perf package

4ad/go.arm64 18

Go development tree for the arm64 port (historical).

4ad/go 12

Go development tree for the sparc64 port

4ad/dotfiles 11

My collection of dotfiles

4ad/7i 3

Old style Plan 9 arm64 emulator (semi-functional).

4ad/mgk.ro 3

Nothing to see here, move along

4ad/7e 2

New style Plan9 arm64 emulator (incomplete).

4ad/golang-org-x-tools.arm64 1

golang.org/x/tools fork with support for arm64 (historical).

4ad/housefinder 1

Finds houses in Vienna.

4ad/ktap-arm64 1

Ktap fork with arm64 support (historical)

startedTortugaLabs/lec

started time in 21 hours

pull request commentchurchers/vm-bhyve

Add support for cloud-init

Does this work with anything other than Ubuntu at the moment?

The Centos and Fedora cloud images are stuck at the bootloader.

mateuszkwiatkowski

comment created time in 3 days

issue closed9fans/plan9port

fontsrv(4): Can't Find Fonts on Linux

In the manpage it says:

Fontsrv has no support for X11 fonts; on X11 systems, it will serve an empty top-level directory.

But there's some FreeType code in plan9/src/cmd/fontsrv/x11.c, and I remember that I used fontsrv(4) on Linux, but perhaps I misremember.

In any case, it doesn't work for me:

ubuntu:aram$ fc-list | sed 5q
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/home/aram/.local/share/fonts/Lucida Grande Italic.ttf: Lucida Grande:style=Italic
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/home/aram/.local/share/fonts/Lucida Grande Nrw Light.ttf: Lucida Grande Nrw,Lucida Grande Nrw Light:style=Light,Regular
/home/aram/.local/share/fonts/Lucida Grande Mono Nrw Italic.ttf: Lucida Grande Mono Nrw:style=Italic
ubuntu:aram$ 
ubuntu:aram$ 
ubuntu:aram$ 
ubuntu:aram$ fontsrv -p .
ubuntu:aram$ 
ubuntu:aram$ 
ubuntu:aram$ 

Is this a bug or is it my fault?

closed time in 3 days

4ad

issue comment9fans/plan9port

fontsrv(4): Can't Find Fonts on Linux

Ok, so I installed xorg-dev and recompiled fontsrv (important), and now it seems to work.

Not sure why fontsrv compiled in this confusing non-functional state in the first place...

Closing issue.

4ad

comment created time in 3 days

issue comment9fans/plan9port

fontsrv(4): status on Linux

Ok, it works on FreeBSD, I wasn't imagining things.

So this is some problem with Ubuntu.

4ad

comment created time in 3 days

issue opened9fans/plan9port

fontsrv(4): status on Linux

In the manpage it says:

Fontsrv has no support for X11 fonts; on X11 systems, it will serve an empty top-level directory.

But there's some FreeType code in plan9/src/cmd/fontsrv/x11.c, and I remember that I used fontsrv(4) on Linux, but perhaps I misremember.

In any case, it doesn't work for me:

ubuntu:aram$ fc-list | sed 5q
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/home/aram/.local/share/fonts/Lucida Grande Italic.ttf: Lucida Grande:style=Italic
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/home/aram/.local/share/fonts/Lucida Grande Nrw Light.ttf: Lucida Grande Nrw,Lucida Grande Nrw Light:style=Light,Regular
/home/aram/.local/share/fonts/Lucida Grande Mono Nrw Italic.ttf: Lucida Grande Mono Nrw:style=Italic
ubuntu:aram$ 
ubuntu:aram$ 
ubuntu:aram$ 
ubuntu:aram$ fontsrv -p .
ubuntu:aram$ 
ubuntu:aram$ 
ubuntu:aram$ 

Is this a bug or is it my fault?

created time in 3 days

issue openedmattrubin/Authenticator

Keys are saved as part of iCloud backup

What did you do?

  1. Install Authenticator on iOS
  2. Set-up keys
  3. Reset iOS device and restore from iCloud backup

What did you expect to see?

  1. No keys, per the documentation:

and your secret keys never leave your device

What did you see instead?

  1. Keys are set-up in Authenticator

System configuration

Default iOS configuration with iCloud backup and iCloud Keychain enabled.

created time in a month

startedmatslina/awib

started time in 2 months

startedaiju/fpga-blit

started time in 2 months

GollumEvent

push event4ad/mgk.ro

Aram Hăvărneanu

commit sha 513cb0d0c7d9706f7313ab0c05a72c5878daf4e3

fovgen: add CAMERADACTYL Brancopan

view details

push time in 2 months

push event4ad/dotfiles

Aram Hăvărneanu

commit sha f1e051c6726382087fc16c8d0145b4a354ad90f5

profile: add SML/NJ and MacTex to PATH

view details

Aram Hăvărneanu

commit sha 3dc94e0c7b36c5fbbc0db7f8a47d4c355ef9e095

profile: add rust to PATH

view details

push time in 3 months

PublicEvent
PublicEvent

create barnch4ad/gofosdem2014

branch : master

created branch time in 3 months

created repository4ad/gofosdem2014

created time in 3 months

create barnch4ad/arm64-dec-gen

branch : master

created branch time in 3 months

created repository4ad/arm64-dec-gen

Generates arm64 instruction decoding for 7i, the Plan 9 arm64 emulator.

created time in 3 months

issue commentriscv/riscv-tests

Tests fail when ran in spike with "--dm-progsize 0" set by testlib.py

Many thanks!

4ad

comment created time in 3 months

IssuesEvent

issue commentgolang/go

cmd/go: go cmd performance degradation on Plan 9 between Go 1.9 and 1.11

As this is actively worked on, I am going to reopen this.

driusan

comment created time in 3 months

issue commentriscv/riscv-tests

Tests fail when ran in spike with "--dm-progsize 0" set by testlib.py

I confirm that it works with that commit.

4ad

comment created time in 3 months

issue commentriscv/riscv-tests

Tests fail when ran in spike with "--dm-progsize 0" set by testlib.py

Unfortunately, the failure seems to be the same either at openocd HEAD, or just before that commit. I have uploaded the log. spike64-DebugFunctionCall.log.log

4ad

comment created time in 3 months

issue openedchurchers/vm-bhyve

Need a way to set autostart at the command line instead of rc.conf

There should be a way to set autostart on the command line. Similarly, there should be a way to globally set autostart.

created time in 3 months

issue openedchurchers/vm-bhyve

Document all the flags in the man page

For example, -C, is missing, also -c, and -m are completely undocumented.

created time in 3 months

issue openedchurchers/vm-bhyve

Need a way to inject more cloud-init configuration

There has to be some way to inject more cloud-init configuration than what vm-bhyve generates.

created time in 3 months

issue openedpr1ntf/iohyve

iohyve is abandonware

Any good replacements? Or plans to restart maintenance?

created time in 3 months

issue commentchipsalliance/rocket-chip

gdb debugger

I have isolated the failure to the --dm-progsize 0 argument passed to spike, and have filed riscv/riscv-tests#217.

sharinoz

comment created time in 3 months

issue openedriscv/riscv-tests

Tests fail when ran in spike with "--dm-progsize 0" set by testlib.py

Attempting to run the tests via make debug-check fails.

To reproduce, inside riscv-tests/debug run:

: emerald:debug; gdbserver.py targets/RISC-V/spike64.py DebugFunctionCall
[ExamineTarget] Starting > logs/20191119-121525-spike64-ExamineTarget.log
[ExamineTarget] pass in 1.21s
[DebugFunctionCall] Starting > logs/20191119-121526-spike64-DebugFunctionCall.log
[DebugFunctionCall] exception in 3.90s
::::::::::::::::::::::::::::[ ran 2 tests in 5s ]:::::::::::::::::::::::::::::
1 tests returned exception
   DebugFunctionCall > logs/20191119-121526-spike64-DebugFunctionCall.log
1 tests returned pass
: emerald:debug; 

This test is just an arbitrary example, chosen at random, (almost) all tests fail.

Snip from the log:

Traceback (most recent call last):
  File "/Users/aram/riscv-tests/debug/testlib.py", line 886, in run
    self.setup()
  File "./gdbserver.py", line 453, in setup
    self.gdb.load()
  File "/Users/aram/riscv-tests/debug/testlib.py", line 625, in load
    assert "failed" not in  output
AssertionError

Further in the log we see:

(gdb) load
load
Loading section .text, size 0x97c lma 0x1212340000
Loading section .rodata, size 0x2b lma 0x1212340980
Load failed

After further investigation, I have isolated the failure to the --dm-progsize 0 parameter passed to spike.

What follows below is a way to reproduce the failure using a single test (any test, this one is chosen at random) without gdbserver.py:

In one terminal run spike -p1 --isa RV64IMAFC --dm-auth --dm-progsize 0 --dm-sba 32 --dm-abstract-rti 30 -m0x1212340000:0x10000000 --rbb-port 9824 spike64_debug-64,

In another, REMOTE_BITBANG_HOST=localhost REMOTE_BITBANG_PORT=9824 WORK_AREA=0x1212340000 openocd --command 'gdb_port 52643' --command 'tcl_port disabled' --command 'telnet_port disabled' -f targets/RISC-V/spike-1.cfg

In yet another run riscv64-unknown-elf-gdb spike64_debug-64

: emerald:debug; riscv64-unknown-elf-gdb spike64_debug-64
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin18.7.0 --target=riscv64-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from spike64_debug-64...
(gdb) 
(gdb) target extended-remote localhost:52643
Remote debugging using localhost:52643
0x000000121234095e in _exit (status=-932948524) at programs/init.c:37
37	    while (i)
(gdb) 
(gdb) load
Loading section .text, size 0x97c lma 0x1212340000
Loading section .rodata, size 0x2b lma 0x1212340980
Load failed
(gdb) 

We see the same error as seen in the log.

Now try doing the same, but this time with --dm-progsize 2 (spike default), instead of `--dm-progsize 0'.

In one terminal spike -p1 --isa RV64IMAFC --dm-auth --dm-progsize 2 --dm-sba 32 --dm-abstract-rti 30 -m0x1212340000:0x10000000 --rbb-port 9824 spike64_debug-64.

In another, REMOTE_BITBANG_HOST=localhost REMOTE_BITBANG_PORT=9824 WORK_AREA=0x1212340000 openocd --command 'gdb_port 52643' --command 'tcl_port disabled' --command 'telnet_port disabled' -f targets/RISC-V/spike-1.cfg

And gdb one more time, riscv64-unknown-elf-gdb spike64_debug-64

riscv64-unknown-elf-gdb spike64_debug-64
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin18.7.0 --target=riscv64-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from spike64_debug-64...
(gdb) target extended-remote localhost:52643
Remote debugging using localhost:52643
0x000000121234095e in _exit (status=-932948524) at programs/init.c:37
37	    while (i)
(gdb) 
(gdb) load
Loading section .text, size 0x97c lma 0x1212340000
Loading section .rodata, size 0x2b lma 0x1212340980
Loading section .data, size 0x2d4 lma 0x12123409b0
Loading section .sdata, size 0x8 lma 0x1212340c88
Start address 0x1212340000, load size 3203
Transfer rate: 2 KB/sec, 800 bytes/write.
(gdb) 
(gdb) 

This time we see the load command in gdb succededing.

This patch makes the tests succeed when ran by make debug-check

diff --git a/debug/testlib.py b/debug/testlib.py
index 60cb897..e2b95a4 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -123,7 +123,6 @@ class Spike(object):
         cmd += ["--dm-auth"]
 
         if not self.progbufsize is None:
-            cmd += ["--dm-progsize", str(self.progbufsize)]
             cmd += ["--dm-sba", "32"]
 
         if not self.dmi_rti is None:

But I do not know if this patch is correct or not.

created time in 3 months

push event4ad/mgk.ro

Aram Hăvărneanu

commit sha 17b8afd78de6c24a36b65efc87bbf8782457d37a

fovgen: add more 35mm lenses

view details

push time in 3 months

push event4ad/mgk.ro

Aram Hăvărneanu

commit sha 39121773b46146389e71594af63e5e4fc26673f6

fovgen: add medium film medium formats

view details

Aram Hăvărneanu

commit sha 7b6c199a4ef7cbd3596400d4591239b16af0bc9e

fovgen: remove some rare columns from tables

view details

Aram Hăvărneanu

commit sha 8d19020f661fe3330366d670f6f13b640f929b4a

fovgen: add medium format film cameras

view details

Aram Hăvărneanu

commit sha 1cf4f0883eb275fc9496a0a5854bb6a2d0361566

fovgen: add 6x9 MF camera and lenses

view details

Aram Hăvărneanu

commit sha 9b2917a9046324519152a2afc63048a4320bd10f

fovgen: reorder columns in table

view details

push time in 3 months

issue commentchipsalliance/rocket-chip

gdb debugger

Ok, the previous tests were all done on macOS, and all the tools (with the exception of spike) were built manually.

I redid the same tests on FreeBSD, making sure to build the exact same version of the tools, and this seems to work fine.

So some part of the toolchain seems to be broken when running on macOS.

sharinoz

comment created time in 3 months

issue commentchipsalliance/rocket-chip

gdb debugger

Ok, so we don't confuse ourselves. At the moment I am trying to run the tests in riscv/riscv-tests using spike and openocd.

Let's pick a random test, like DebugFunctionCall. We can execute it manually with either gdbserver.py targets/RISC-V/spike64.py DebugFunctionCall, or if we want more debugging information gdbserver.py --server_cmd "openocd -d" targets/RISC-V/spike64.py DebugFunctionCall.

An excerpt from the log says:

--------------------------------[ Traceback ]---------------------------------
Traceback (most recent call last):
  File "/Users/aram/riscv-tests/debug/testlib.py", line 886, in run
    self.setup()
  File "./gdbserver.py", line 453, in setup
    self.gdb.load()
  File "/Users/aram/riscv-tests/debug/testlib.py", line 625, in load
    assert "failed" not in  output
AssertionError

And indeed, gdb fails to parse the file:

(gdb) load
load
Loading section .text, size 0x97c lma 0x1212340000
Loading section .rodata, size 0x2b lma 0x1212340980
Load failed

(This happens for every file, not just this particular test.)

We can run all of this manually instead of relying on gdbserver.py. In one terminal:

spike -p1 --isa RV64IMAFC --dm-auth --dm-progsize 0 --dm-sba 32 --dm-abstract-rti 30 -m0x1212340000:0x10000000 --rbb-port 9824 spike64_debug-64

In another:

REMOTE_BITBANG_HOST=localhost REMOTE_BITBANG_PORT=9824 WORK_AREA=0x1212340000 openocd -d --command 'gdb_port 52643' --command 'tcl_port disabled' --command 'telnet_port disabled' -f targets/RISC-V/spike-1.cfg

And in yet another terminal we can run gdb. All commands should be ran in the riscv-tests/debug directory.

Spike already complains about something, not sure if that matters or not:

warning: tohost and fromhost symbols not in ELF; can't communicate with target

The we can reproduce the problem in gdb:

riscv64-unknown-elf-gdb
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin18.7.0 --target=riscv64-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) set remotetimeout 30
(gdb) target extended-remote localhost:52643
Remote debugging using localhost:52643
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x000000121234095e in ?? ()
(gdb) file spike64_debug-64
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from spike64_debug-64...
(gdb) load
Loading section .text, size 0x97c lma 0x1212340000
Loading section .rodata, size 0x2b lma 0x1212340980
Load failed
(gdb) 
(gdb) 

I have attached the log from gdbserver.py, which contains the log from openocd, running with full debug info. 20191113-155428-spike64-DebugFunctionCall.log

sharinoz

comment created time in 3 months

issue commentchipsalliance/rocket-chip

gdb debugger

Same.

sharinoz

comment created time in 3 months

issue openedriscv/homebrew-riscv

riscv-openocd is missing

Homebrew already has an openocd package, but it's no good to us, since it doesn't have RISC-V support. This tap should provide riscv/riscv-openocd.

created time in 3 months

issue closedriscv/riscv-tools

Can't run the tests with custom toolchain prefix

This is not really a bug, I don't think, but I can't run the tests with the environment described below.

I have a RISC-V cross toolchain (custom-built) and openocd installed. My environment is:

emerald:aram$ 
emerald:aram$ riscv64-unknown-elf-gcc -v
Using built-in specs.
COLLECT_GCC=riscv64-unknown-elf-gcc
COLLECT_LTO_WRAPPER=/Users/aram/xgcc/libexec/gcc/riscv64-unknown-elf/9.2.0/lto-wrapper
Target: riscv64-unknown-elf
Configured with: ../../src/gcc-9.2.0/configure --prefix /Users/aram/xgcc --bindir /Users/aram/bin --target riscv64-unknown-elf --enable-multilib --enable-languages=c --with-gnu-as --with-gnu-ld --with-newlib
Thread model: single
gcc version 9.2.0 (GCC) 
emerald:aram$ 
emerald:aram$ python -V
Python 2.7.16
emerald:aram$ 
emerald:aram$ which riscv64-unknown-elf-gcc
/Users/aram/bin/riscv64-unknown-elf-gcc
emerald:aram$ which riscv64-unknown-elf-gdb
/Users/aram/bin/riscv64-unknown-elf-gdb
emerald:aram$ 
emerald:aram$ which openocd
/usr/local/bin/openocd
emerald:aram$ 
emerald:aram$ which python
/usr/bin/python
emerald:aram$ 
emerald:aram$ uname -a
Darwin emerald.local 18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64
emerald:aram$ 

The tests compile fine, but when I run make debug-check I get errors such as these:

Test: CustomRegisterTest
Target: spike64
---------------------------------[ Compile ]----------------------------------
+ riscv64-unknown-elf-gcc -g programs/checksum.c programs/tiny-malloc.c programs/infinite_loop.S -DDEFINE_MALLOC -DDEFINE_FREE programs/entry.S programs/init.c -DNHARTS=1 -I ../env -T targets/RISC-V/spike64.lds -nostartfiles -mcmodel=medany -DXLEN=64 -o /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike64_checksum-64_4tWBHX -march=rv64ima -mabi=lp64
----[ /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/openocduVRYMs.log ]----
+ REMOTE_BITBANG_HOST=localhost REMOTE_BITBANG_PORT=59882 WORK_AREA=0x1212340000 /usr/local/bin/openocd --command 'gdb_port 0' --command 'tcl_port disabled' --command 'telnet_port disabled' -f targets/RISC-V/spike-1.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 10000 kHz
Warn : Adapter driver 'remote_bitbang' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
embedded:startup.tcl:21: Error: Unknown target type riscv, try one of arm7tdmi, arm9tdmi, arm920t, arm720t, arm966e, arm946e, arm926ejs, fa526, feroceon, dragonite, xscale, cortex_m, cortex_a, cortex_r4, arm11, ls1_sap, mips_m4k, avr, dsp563xx, dsp5680xx, testee, avr32_ap7k, hla_target, nds32_v2, nds32_v3, nds32_v3m, or1k, quark_x10xx,  or quark_d20xx
in procedure 'script' 
at file "embedded:startup.tcl", line 60
in procedure 'target' called at file "targets/RISC-V/spike-1.cfg", line 11
in procedure 'ocd_bouncer' 
at file "embedded:startup.tcl", line 21

----[ /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike-yVxSGr.log ]-----
+ /usr/local/bin/spike -p1 --isa RV64IMAFC --dm-auth --dm-progsize 0 --dm-sba 32 --dm-abstract-rti 30 -m0x1212340000:0x10000000 --rbb-port 0 /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike64_checksum-64_4tWBHX
Listening for remote bitbang connection on port 59882.
warning: tohost and fromhost symbols not in ELF; can't communicate with target

--------------------------------[ Traceback ]---------------------------------
Traceback (most recent call last):
  File "/Users/aram/riscv-tests/debug/testlib.py", line 885, in run
    self.classSetup()
  File "/Users/aram/riscv-tests/debug/testlib.py", line 930, in classSetup
    BaseTest.classSetup(self)
  File "/Users/aram/riscv-tests/debug/testlib.py", line 853, in classSetup
    self.server = self.target.server()
  File "/Users/aram/riscv-tests/debug/targets.py", line 126, in server
    timeout=self.server_timeout_sec)
  File "/Users/aram/riscv-tests/debug/testlib.py", line 277, in __init__
    self.process = self.start(cmd, logfile)
  File "/Users/aram/riscv-tests/debug/testlib.py", line 295, in start
    raise Exception("OpenOCD exited early.")
Exception: OpenOCD exited early.
----[ /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike-yVxSGr.log ]-----
+ /usr/local/bin/spike -p1 --isa RV64IMAFC --dm-auth --dm-progsize 0 --dm-sba 32 --dm-abstract-rti 30 -m0x1212340000:0x10000000 --rbb-port 0 /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike64_checksum-64_4tWBHX
Listening for remote bitbang connection on port 59882.
warning: tohost and fromhost symbols not in ELF; can't communicate with target

-------------------------------[ End of logs ]--------------------------------
Result: exception
Logfile: logs/20191112-165130-spike64-CustomRegisterTest.log
Reproduce: /Users/aram/riscv-tests/debug/gdbserver.py /Users/aram/riscv-tests/debug/targets/RISC-V/spike64.py CustomRegisterTest
Time elapsed: 0.31s

No doubt this is my fault, since I have built my own toolchain (in some prefix), and I am using openocd from homebrew (installed in another prefix). However, not sure what to do next. Probably I don't set RISCV properly. I have set it to /usr/local, since the makefile is trying to run $RISCV/bin/openocd and my openocd is in /usr/local/bin/openocd, but perhaps that is not right.

closed time in 3 months

4ad

issue commentriscv/riscv-tools

Can't run the tests with custom toolchain prefix

Ok, the problem was the the openocd shipped by homebrew didn't have RISC-V support, and riscv/homebrew-riscv doesn't install a proper openocd. I manually built riscv/riscv-openocd and I can run tests now.

4ad

comment created time in 3 months

issue openedriscv/riscv-tools

Can't run the tests with custom toolchain prefix

This is not really a bug, I don't think, but I can't run the tests with the environment described below.

I have a RISC-V cross toolchain (custom-built) and openocd installed. My environment is:

emerald:aram$ 
emerald:aram$ riscv64-unknown-elf-gcc -v
Using built-in specs.
COLLECT_GCC=riscv64-unknown-elf-gcc
COLLECT_LTO_WRAPPER=/Users/aram/xgcc/libexec/gcc/riscv64-unknown-elf/9.2.0/lto-wrapper
Target: riscv64-unknown-elf
Configured with: ../../src/gcc-9.2.0/configure --prefix /Users/aram/xgcc --bindir /Users/aram/bin --target riscv64-unknown-elf --enable-multilib --enable-languages=c --with-gnu-as --with-gnu-ld --with-new
Thread model: single
gcc version 9.2.0 (GCC) 
emerald:aram$ 
emerald:aram$ python -V
Python 2.7.16
emerald:aram$ 
emerald:aram$ which riscv64-unknown-elf-gcc
/Users/aram/bin/riscv64-unknown-elf-gcc
emerald:aram$ which riscv64-unknown-elf-gdb
/Users/aram/bin/riscv64-unknown-elf-gdb
emerald:aram$ 
emerald:aram$ which openocd
/usr/local/bin/openocd
emerald:aram$ 
emerald:aram$ which python
/usr/bin/python
emerald:aram$ 
emerald:aram$ uname -a
Darwin emerald.local 18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64
emerald:aram$ 

When I run make debug-check I get errors such as these:

Test: CustomRegisterTest
Target: spike64
---------------------------------[ Compile ]----------------------------------
+ riscv64-unknown-elf-gcc -g programs/checksum.c programs/tiny-malloc.c programs/infinite_loop.S -DDEFINE_MALLOC -DDEFINE_FREE programs/entry.S programs/init.c -DNHARTS=1 -I ../env -T targets/RISC-V/spike64.lds -nostartfiles -mcmodel=medany -DXLEN=64 -o /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike64_checksum-64_4tWBHX -march=rv64ima -mabi=lp64
----[ /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/openocduVRYMs.log ]----
+ REMOTE_BITBANG_HOST=localhost REMOTE_BITBANG_PORT=59882 WORK_AREA=0x1212340000 /usr/local/bin/openocd --command 'gdb_port 0' --command 'tcl_port disabled' --command 'telnet_port disabled' -f targets/RISC-V/spike-1.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 10000 kHz
Warn : Adapter driver 'remote_bitbang' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
embedded:startup.tcl:21: Error: Unknown target type riscv, try one of arm7tdmi, arm9tdmi, arm920t, arm720t, arm966e, arm946e, arm926ejs, fa526, feroceon, dragonite, xscale, cortex_m, cortex_a, cortex_r4, arm11, ls1_sap, mips_m4k, avr, dsp563xx, dsp5680xx, testee, avr32_ap7k, hla_target, nds32_v2, nds32_v3, nds32_v3m, or1k, quark_x10xx,  or quark_d20xx
in procedure 'script' 
at file "embedded:startup.tcl", line 60
in procedure 'target' called at file "targets/RISC-V/spike-1.cfg", line 11
in procedure 'ocd_bouncer' 
at file "embedded:startup.tcl", line 21

----[ /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike-yVxSGr.log ]-----
+ /usr/local/bin/spike -p1 --isa RV64IMAFC --dm-auth --dm-progsize 0 --dm-sba 32 --dm-abstract-rti 30 -m0x1212340000:0x10000000 --rbb-port 0 /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike64_checksum-64_4tWBHX
Listening for remote bitbang connection on port 59882.
warning: tohost and fromhost symbols not in ELF; can't communicate with target

--------------------------------[ Traceback ]---------------------------------
Traceback (most recent call last):
  File "/Users/aram/riscv-tests/debug/testlib.py", line 885, in run
    self.classSetup()
  File "/Users/aram/riscv-tests/debug/testlib.py", line 930, in classSetup
    BaseTest.classSetup(self)
  File "/Users/aram/riscv-tests/debug/testlib.py", line 853, in classSetup
    self.server = self.target.server()
  File "/Users/aram/riscv-tests/debug/targets.py", line 126, in server
    timeout=self.server_timeout_sec)
  File "/Users/aram/riscv-tests/debug/testlib.py", line 277, in __init__
    self.process = self.start(cmd, logfile)
  File "/Users/aram/riscv-tests/debug/testlib.py", line 295, in start
    raise Exception("OpenOCD exited early.")
Exception: OpenOCD exited early.
----[ /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike-yVxSGr.log ]-----
+ /usr/local/bin/spike -p1 --isa RV64IMAFC --dm-auth --dm-progsize 0 --dm-sba 32 --dm-abstract-rti 30 -m0x1212340000:0x10000000 --rbb-port 0 /var/folders/y0/y5fwvgfs6pvb7l8vt2xvjc7m0000gn/T/spike64_checksum-64_4tWBHX
Listening for remote bitbang connection on port 59882.
warning: tohost and fromhost symbols not in ELF; can't communicate with target

-------------------------------[ End of logs ]--------------------------------
Result: exception
Logfile: logs/20191112-165130-spike64-CustomRegisterTest.log
Reproduce: /Users/aram/riscv-tests/debug/gdbserver.py /Users/aram/riscv-tests/debug/targets/RISC-V/spike64.py CustomRegisterTest
Time elapsed: 0.31s

No doubt this is my fault, since I have built my own toolchain (in some prefix), and I am using openocd from homebrew (installed in another prefix). However, not sure what to do next.

created time in 3 months

push event4ad/mgk.ro

Aram Hăvărneanu

commit sha f05da09dc49d23616d928ecfbbbe58a495df08ee

fovgen: add even more 4x5 lenses

view details

push time in 4 months

push event4ad/mgk.ro

Aram Hăvărneanu

commit sha b9367155b0a30937ea19b3c4e437cecb90de3b6b

fovgen: set category for page

view details

Aram Hăvărneanu

commit sha 790f696b0387c3f25f5c27b42f46e443c3d1bf0e

fovgen: add more 4x5 lenses

view details

push time in 4 months

more