| *** tpb has joined #tomu | 00:00 | |
| *** deltab has quit IRC | 00:31 | |
| *** deltab has joined #tomu | 00:39 | |
| *** guan has quit IRC | 00:48 | |
| *** guan has joined #tomu | 00:48 | |
| *** emeb has quit IRC | 01:00 | |
| CarlFK | xobs: 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 | 
|---|---|---|
| CarlFK | if that's all that is at risk, pfft .. lets do it. | 02:26 | 
| *** rohitksingh has joined #tomu | 02:28 | |
| *** rohitksingh has quit IRC | 02:44 | |
| *** rohitksingh has joined #tomu | 02:45 | |
| *** andi- has quit IRC | 02:54 | |
| *** andi- has joined #tomu | 03:11 | |
| turq | oh, look at that, there is a .kicad_pcb file (and it's apparently a lisp) | 04:33 | 
| turq | is there anything different about what is in fomu-hardware/archive/dvt/pcb/tomu-fpga.kicad_pcb and fomu-hardware/hacker ? | 04:35 | 
| turq | there is a schematic.pdf and a tomu-fpga-dvt2a.pdf. guess I can answer this myself | 04:36 | 
| *** turq has quit IRC | 04:39 | |
| *** alon has quit IRC | 06:33 | |
| *** alon has joined #tomu | 07:22 | |
| *** alon has quit IRC | 07:31 | |
| *** alon has joined #tomu | 07:31 | |
| *** rohitksingh has quit IRC | 07:41 | |
| *** alon has quit IRC | 07:44 | |
| *** alon has joined #tomu | 07:44 | |
| *** rohitksingh has joined #tomu | 07:56 | |
| *** alon has quit IRC | 08:17 | |
| *** alon has joined #tomu | 08:18 | |
| *** alon has quit IRC | 08:23 | |
| *** CarlFK has quit IRC | 09:14 | |
| *** alon has joined #tomu | 09:44 | |
| *** alon has quit IRC | 09:49 | |
| Yatekii | hey 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 | 
| xobs | Yatekii: there are two ways you could do it. | 14:57 | 
| xobs | 1. Pass a `memory-map` and define your area as "rom" or "flash". | 14:58 | 
| xobs | You 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 #tomu | 14:59 | |
| *** im-tomu has joined #tomu | 14:59 | |
| xobs | The other approach is to just ignore it when it requests a software breakpoint. | 15:01 | 
| xobs | I seem to recall I take both approaches in https://github.com/xobs/wishbone-utils/blob/master/wishbone-tool/src/gdb.rs | 15:02 | 
| tpb | Title: wishbone-utils/gdb.rs at master · xobs/wishbone-utils · GitHub (at github.com) | 15:02 | 
| Yatekii | xobs: 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 ask | 15:07 | 
| Yatekii | ) | 15:07 | 
| Yatekii | also, 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 donezo | 15:08 | 
| xobs | It 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 | 
| Yatekii | it needs to track how many there are left | 15:08 | 
| xobs | Approach 2 seems to be what openocd does. The number of times I've tried "stepi" and gotten "Cannot insert breakpoint" is... many. | 15:09 | 
| Yatekii | btw, 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 | 
| Yatekii | haha | 15:10 | 
| Yatekii | well i mean you could track the used breakpoints yourself, but still | 15:10 | 
| xobs | There's no way to inform it how many breakpoints there are, that I know of. It's gdb, so it assumes "infinite". | 15:10 | 
| Yatekii | also we are trying to get away from gdb and use vscode directly :) | 15:10 | 
| xobs | I do keep track of breakpoints, and throw an error when it exceeds it. | 15:10 | 
| Yatekii | hmm ok then hwbreak doesnt help either way :/ | 15:11 | 
| Yatekii | ah kk | 15:11 | 
| Yatekii | i'll try and track and then i'll remove, insert and add again if i really have to | 15:11 | 
| Yatekii | but i thought gdb could do that for me | 15:11 | 
| xobs | I think it'll only request hwbreak when it's in ROM or flash, as determined by the memory-map. | 15:11 | 
| Yatekii | yep | 15:11 | 
| Yatekii | kk thx! | 15:12 | 
| Yatekii | ill play some more =) | 15:12 | 
| Yatekii | lets see if we can also include dfu & wishbone support in probe-rs | 15:12 | 
| Yatekii | dominik is already happily hacking away :P | 15:12 | 
| xobs | That'd be cool! | 15:13 | 
| xobs | What's probe-rs? | 15:13 | 
| Yatekii | https://github.com/probe-rs/probe-rs | 15:14 | 
| tpb | Title: 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 #tomu | 15:29 | |
| Yatekii | xobs: hmm well if openocd does softbreaks, do you think they reprogram entire pages ? oO | 15:41 | 
| Yatekii | (I mean they have to, but it diesn't seem like that's feasible lol) | 15:41 | 
| xobs | Yatekii: no, they only modify one instruction. | 15:47 | 
| *** pollo has quit IRC | 15:47 | |
| *** emeb has joined #tomu | 15:48 | |
| *** pollo has joined #tomu | 15:48 | |
| xobs | In 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.html | 15:48 | 
| tpb | Title: 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 | 
| xobs | Ah, 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 | 
| xobs | You 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-L574 | 15:51 | 
| tpb | Title: wishbone-utils/gdb.rs at master · xobs/wishbone-utils · GitHub (at github.com) | 15:51 | 
| Yatekii | xobs: well it's not possible to manipulate flash tho ;) | 15:53 | 
| Yatekii | so you'd always have to rewrite the entire flash :) | 15:53 | 
| xobs | Not if you insert a hardware breakpoint. | 15:54 | 
| xobs | I suspect openocd advertises a correct memory map, and gdb requests soft- or hard-breakpoints based on that. | 15:54 | 
| Yatekii | xobs: yes, I know, but I have only 2 HW BPs. that's depleeted quite quickly | 15:55 | 
| Yatekii | sometimes you even need 4 BPs for single stepping | 15:55 | 
| Yatekii | so the question is: how do other tools do that. because erasing a sector and writing all it's pages sounds riddiculous | 15:56 | 
| Yatekii | I know that segger has such trickery, but I think only RAM based | 15:56 | 
| *** rohitksingh has quit IRC | 16:26 | |
| *** rohitksingh has joined #tomu | 16:28 | |
| Yatekii | xobs: ok i got it to force hwbreaks :) thx for the nice code reference! i forgot to pad the xml til the end ... | 17:29 | 
| Yatekii | the docs are so bad ... nobody documented this on the command or the page describing the xml | 17:30 | 
| *** CarlFK has joined #tomu | 18:16 | |
| *** buZz has quit IRC | 19:13 | |
| *** rohitksingh has quit IRC | 19:18 | |
| *** alon has joined #tomu | 19:26 | |
| *** buZz has joined #tomu | 19:30 | |
| *** buZz is now known as Guest18444 | 19:30 | |
| *** Guest18444 has quit IRC | 19:35 | |
| *** buZz has joined #tomu | 19:35 | |
| *** buZz is now known as Guest9989 | 19:36 | |
| *** earthnative has quit IRC | 19:38 | |
| *** andi- has quit IRC | 19:44 | |
| vesim | Is there fast 256 multiplication implementation for risc-v? without that u2f on fomu is impossible :( | 19:49 | 
| tnt | huh ? | 19:50 | 
| tnt | like ... x << 8 ? | 19:50 | 
| vesim | sorry, i mean 256 bit numbers | 19:51 | 
| tnt | Ah. 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 | 
| vesim | https://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 5s | 19:54 | 
| tpb | Title: u2f-token/bn.c at master · gl-sergei/u2f-token · GitHub (at github.com) | 19:54 | 
| *** andi- has joined #tomu | 19:56 | |
| *** Guest9989 has quit IRC | 19:57 | |
| *** buZz has joined #tomu | 20:04 | |
| *** buZz is now known as Guest1687 | 20:04 | |
| *** Guest1687 has quit IRC | 20:17 | |
| *** buZz_ has joined #tomu | 20:18 | |
| *** buZz_ is now known as Guest15249 | 20:18 | |
| *** Guest15249 has quit IRC | 20:25 | |
| *** buZz__ has joined #tomu | 20:27 | |
| *** Vercas has quit IRC | 20:27 | |
| *** Vercas has joined #tomu | 20:28 | |
| *** earthnative has joined #tomu | 23:18 | |
| *** emeb has quit IRC | 23:59 | |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!