Tuesday, 2019-12-31

*** tpb has joined #tomu00:00
*** deltab has quit IRC00:31
*** deltab has joined #tomu00:39
*** guan has quit IRC00:48
*** guan has joined #tomu00:48
*** emeb has quit IRC01:00
CarlFKxobs: idea about updating fomu with cp so we have persistent storage - if I get mine stuck, I just have to reflash it using the pins to pads, right ?02:25
CarlFKif that's all that is at risk, pfft .. lets do it.02:26
*** rohitksingh has joined #tomu02:28
*** rohitksingh has quit IRC02:44
*** rohitksingh has joined #tomu02:45
*** andi- has quit IRC02:54
*** andi- has joined #tomu03:11
turqoh, look at that, there is a .kicad_pcb file (and it's apparently a lisp)04:33
turqis there anything different about what is in fomu-hardware/archive/dvt/pcb/tomu-fpga.kicad_pcb and fomu-hardware/hacker ?04:35
turqthere is a schematic.pdf and a tomu-fpga-dvt2a.pdf. guess I can answer this myself04:36
*** turq has quit IRC04:39
*** alon has quit IRC06:33
*** alon has joined #tomu07:22
*** alon has quit IRC07:31
*** alon has joined #tomu07:31
*** rohitksingh has quit IRC07:41
*** alon has quit IRC07:44
*** alon has joined #tomu07:44
*** rohitksingh has joined #tomu07:56
*** alon has quit IRC08:17
*** alon has joined #tomu08:18
*** alon has quit IRC08:23
*** CarlFK has quit IRC09:14
*** alon has joined #tomu09:44
*** alon has quit IRC09:49
Yatekiihey xobs, I am looking to implement a gdb server in rust for probe-rs. and tiwalun hinted me that you did this for fishbone as well. I am struggling on getting gdb to request a hbreak on "continue" instead of a softbreak. how did you solve this? I am not really fond of the idea of patching the flash everytime I wanna step ....14:51
xobsYatekii: there are two ways you could do it.14:57
xobs1. Pass a `memory-map` and define your area as "rom" or "flash".14:58
xobsYou add `qXfer:memory-map:read+;` to your query list, then you pass back a memory map whenever it sends `qXfer:memory-map:read::`14:59
*** im-tomu has left #tomu14:59
*** im-tomu has joined #tomu14:59
xobsThe other approach is to just ignore it when it requests a software breakpoint.15:01
xobsI seem to recall I take both approaches in https://github.com/xobs/wishbone-utils/blob/master/wishbone-tool/src/gdb.rs15:02
tpbTitle: wishbone-utils/gdb.rs at master · xobs/wishbone-utils · GitHub (at github.com)15:02
Yatekiixobs: i tried the first and it always tells me that it has no memory map after the seemingly successful transfer of the memory map svg. in your code i dont see any real difference to mine :/ also you have it commented out.15:07
Yatekii(i had a look at your code before asking but couldnt make 100% sense because its uncommented etc so i wanted to ask15:07
Yatekiialso, approach 2 ofc works for quick and dirty, but imagine you have 2 breakpoints active and it tries to set a third for stepping ... then you're donezo15:08
xobsIt does help.  I commented it out because I didn't want to end up hardcoding the memory map -- it doesn't make much sense in an fpga.15:08
Yatekiiit needs to track how many there are left15:08
xobsApproach 2 seems to be what openocd does.  The number of times I've tried "stepi" and gotten "Cannot insert breakpoint" is... many.15:09
Yatekiibtw, do you know how to tell it how many hwbps i have? yeah i dont wanna hardcode it either but for now it suffices :)15:09
Yatekiiwell i mean you could track the used breakpoints yourself, but still15:10
xobsThere's no way to inform it how many breakpoints there are, that I know of.  It's gdb, so it assumes "infinite".15:10
Yatekiialso we are trying to get away from gdb and use vscode directly :)15:10
xobsI do keep track of breakpoints, and throw an error when it exceeds it.15:10
Yatekiihmm ok then hwbreak doesnt help either way :/15:11
Yatekiiah kk15:11
Yatekiii'll try and track and then i'll remove, insert and add again if i really have to15:11
Yatekiibut i thought gdb could do that for me15:11
xobsI think it'll only request hwbreak when it's in ROM or flash, as determined by the memory-map.15:11
Yatekiikk thx!15:12
Yatekiiill play some more =)15:12
Yatekiilets see if we can also include dfu & wishbone support in probe-rs15:12
Yatekiidominik is already happily hacking away :P15:12
xobsThat'd be cool!15:13
xobsWhat's probe-rs?15:13
tpbTitle: GitHub - probe-rs/probe-rs: A debugging toolset and library for debugging ARM cores on a separate host (at github.com)15:14
*** siklsten has joined #tomu15:29
Yatekiixobs: hmm well if openocd does softbreaks, do you think they reprogram entire pages ? oO15:41
Yatekii(I mean they have to, but it diesn't seem like that's feasible lol)15:41
xobsYatekii: no, they only modify one instruction.15:47
*** pollo has quit IRC15:47
*** emeb has joined #tomu15:48
*** pollo has joined #tomu15:48
xobsIn fact, this is a bit of an issue because it was writing compressed instructions for non-compressed processors: https://sourceware.org/ml/gdb-patches/2019-07/msg00450.html15:48
tpbTitle: Andrew Burgess - [PATCH] gdb/riscv: Write 4-byte nop to dummy code region before inferior (at sourceware.org)15:48
xobs(Though this was for `call`, not breakpoints).15:49
xobsAh, that's right.  Now I remember.  You can fake the breakpoint in your own code by swapping out a hard breakpoint for a soft one.  But you can't fix gdb writing incorrect code.15:49
xobsYou can see in `gdb.rs` how we always ignore the breakpoint type and just insert a hardware breakpoint.  We could insert a software one if we wanted, though: https://github.com/xobs/wishbone-utils/blob/master/wishbone-tool/src/gdb.rs#L573-L57415:51
tpbTitle: wishbone-utils/gdb.rs at master · xobs/wishbone-utils · GitHub (at github.com)15:51
Yatekiixobs: well it's not possible to manipulate flash tho ;)15:53
Yatekiiso you'd always have to rewrite the entire flash :)15:53
xobsNot if you insert a hardware breakpoint.15:54
xobsI suspect openocd advertises a correct memory map, and gdb requests soft- or hard-breakpoints based on that.15:54
Yatekiixobs: yes, I know, but I have only 2 HW BPs. that's depleeted quite quickly15:55
Yatekiisometimes you even need 4 BPs for single stepping15:55
Yatekiiso the question is: how do other tools do that. because erasing a sector and writing all it's pages sounds riddiculous15:56
YatekiiI know that segger has such trickery, but I think only RAM based15:56
*** rohitksingh has quit IRC16:26
*** rohitksingh has joined #tomu16:28
Yatekiixobs: ok i got it to force hwbreaks :) thx for the nice code reference! i forgot to pad the xml til the end ...17:29
Yatekiithe docs are so bad ... nobody documented this on the command or the page describing the xml17:30
*** CarlFK has joined #tomu18:16
*** buZz has quit IRC19:13
*** rohitksingh has quit IRC19:18
*** alon has joined #tomu19:26
*** buZz has joined #tomu19:30
*** buZz is now known as Guest1844419:30
*** Guest18444 has quit IRC19:35
*** buZz has joined #tomu19:35
*** buZz is now known as Guest998919:36
*** earthnative has quit IRC19:38
*** andi- has quit IRC19:44
vesimIs there fast 256 multiplication implementation for risc-v? without that u2f on fomu is impossible :(19:49
tnthuh ?19:50
tntlike ... x << 8 ?19:50
vesimsorry, i mean 256 bit numbers19:51
tntAh. There is no specific support for that in the risc-v hardware. However ... it's a fpga, you can just ass a specialized block for it if you want.19:52
vesimhttps://github.com/gl-sergei/u2f-token/blob/master/src/bn.c#L143 this implementation is too slow, computing p256r1 public key with this is taking around 5s19:54
tpbTitle: u2f-token/bn.c at master · gl-sergei/u2f-token · GitHub (at github.com)19:54
*** andi- has joined #tomu19:56
*** Guest9989 has quit IRC19:57
*** buZz has joined #tomu20:04
*** buZz is now known as Guest168720:04
*** Guest1687 has quit IRC20:17
*** buZz_ has joined #tomu20:18
*** buZz_ is now known as Guest1524920:18
*** Guest15249 has quit IRC20:25
*** buZz__ has joined #tomu20:27
*** Vercas has quit IRC20:27
*** Vercas has joined #tomu20:28
*** earthnative has joined #tomu23:18
*** emeb has quit IRC23:59

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!