Sunday, 2020-01-26

*** tpb has joined #tomu00:00
*** alexhw has quit IRC02:07
*** alexhw has joined #tomu02:19
*** whatnick_ has quit IRC04:14
* daurnimator waves06:52
daurnimatortrying to get the messible server working06:52
xobsNot working?06:53
daurnimatornope. but likely me being stupid.... trying to get gdb working now06:54
xobsBoth should work at the same time, but you might need the latest wishbone-tool to fix a contentio issue.06:57
daurnimatorDo I need the riscv32 specific gdb?06:58
xobsI imagine.  Or a multiarch gdb, such as the one in the Fomu toolchain package, or from sifive.06:58
daurnimatorI'm currently trying with the riscv64 gdb..... the description on it says works for riscv3207:01
daurnimatorWhen I try and use it I get: `localhost:1234: Connection timed out.`07:01
xobsTry `localhost:3333`07:02
daurnimator`INFO [wishbone_tool::server] accepting connections on` <-- so this port was a lie?07:03
xobsThat might be a bug.  Let me check07:03
daurnimatorthe backtrace just shows: 0x00000ddc in ?? ()07:05
xobsYes, that was a lie.  I'll submit a patch and release v0.6.4!07:05
daurnimatorIn addition, I "paused" in the debugger, but the light is still pulsing.07:06
xobsThe light is controlled by hardware, so even though the CPU is paused, the harware blink engine is still running.07:07
daurnimatorso I'm a little confused: the file I pass to gdb... that's just used for symbol lookup right?07:08
xobsOkay, I pushed v0.6.4 which should fix that issue.07:09
xobsThe file you pass to gdb tells gdb what kind of CPU it is (for example, riscv32i), in addition to providing symbol data.07:09
daurnimatorwhat does your debugging flow look like? is it: => 1. compile program as both .elf and .bin. 2. reboot via wishbone; 3. run dfu-util to upload. 4. (re)start wishbone -s gdb 5. start gdb07:10
xobsHmm... it's designed to let it continue to work across reboots.  I wonder.  Can you leave gdb running, and run another copy of "wishbone-tool" to reset it?07:15
daurnimatorno. it complains about connection reset and a protocol error07:15
xobsMaybe we neeed to add "load" support to wishbone-tool.07:17
xobsUp until now, most major stuff I've been working on has been with an EVT board.07:18
daurnimatoris red-pulsing some error condition?09:22
daurnimatorI'm now failing to even run my old demo program09:24
xobsYes, that's an error condition.09:38
xobsThe bootloader sets the LED to blink red before it jumps to your code.  If you don't change it to something else, then it will continue to blink red even if the CPU has crashed.09:39
daurnimatoroh interesting........... if I compile in "release" mode then it works09:46
daurnimatorhmmm... what does it do if the file size is too large?09:46
daurnimatorShould `wishbone-tool 0xe0008000 0x12` make things come out of `wishbone-tool -s messible` running in another terminal?09:55
daurnimatorxobs: ^09:57
xobsYou might try "0x40", since it's printable.09:59
xobsInstead of "0x0a".09:59
xobsAlso, you can try running "mon explain" inside gdb.10:00
daurnimatorI still haven't managed to get gdb working10:00
xobsIf it crashed due to a trap, that'll tell you where it crashed.10:00
xobsTry running `wishbone-tool -s gdb -s messible`10:00
daurnimatorand then?10:00
xobsThen you should be able to connect.  You can try omitting the elf file just to see if it works: `riscv64-unknown-elf-gdb -ex 'set architecture riscv:rv32' -ex 'tar rem :3333'`10:03
*** im-tomu has left #tomu10:03
daurnimatoroh cool; I have gdb working now I think :)10:03
*** im-tomu has joined #tomu10:03
daurnimatorbut not messible...10:04
daurnimator>>> bt10:04
daurnimator#0  main () at main.zig:8010:04
xobsIn gdb, try running: `set *((int *)0xe0008000)=0x41`10:04
daurnimator^ seems like a good first step in gdb. however _start is missing from the trace...10:05
xobsThat will manually write 0x41 to the Messible, which should get printed out in wishbone-tool.10:06
daurnimatornot that I can see10:06
xobsWhich version of wishbone-tool are you  running?10:07
xobsBecause 0.6.2 and earlier had some contention issues with Messible.10:08
xobsIt's all very new.10:09
daurnimatorit reports itself as 0.6.0. however it should be the 0.6.1 release...10:09
daurnimatorah okay. I'll update to 0.6.210:09
xobsUpdate to
daurnimatorah lol10:10
daurnimatorif you haven't already you should update the version reported in --help10:10
xobsYeah, I forgot to bump the version number with 0.6.1.  Sorry!10:11
xobsThough I see a bug where Ctrl-C doesn't work.  Oh well.  "killall wishbone-tool" should work.10:13
daurnimatorFYI: wishbone-utils W: Unused shared library '/usr/lib/' by file ('usr/bin/wishbone-tool')10:14
*** xkapastel has joined #tomu10:28
xobsThere must be some dependent crate that links it, I'm guessing...10:45

Generated by 2.13.1 by Marius Gedminas - find it at!