Sunday, 2019-10-27

*** tpb has joined #tomu00:00
*** coderobe has quit IRC00:27
*** coderobe has joined #tomu01:51
*** xkapastel has joined #tomu03:10
*** xkapastel has quit IRC05:29
*** GNUtoo has quit IRC14:27
*** GNUtoo has joined #tomu14:30
*** cedric has quit IRC15:09
*** cedric has joined #tomu15:10
*** cedric has joined #tomu15:10
gioHello, I'm playing a little bit with the fomu-workshop. The usb-cdcacm is supposed to be modified to implement some interactive thing via USB, but I don't understand where in the code the USB data is processed.15:34
gioIn particular, the README says that it returns every character it receives augmented by 1, and it works on my fomu. But I don't understand where this logic is implemented.15:35
xobsgio: it's not really logic so much as it is just an interrupt handler: https://github.com/im-tomu/fomu-workshop/blob/master/riscv-usb-cdcacm/src/usb-epfifo.c#L24016:26
tpbTitle: fomu-workshop/usb-epfifo.c at master · im-tomu/fomu-workshop · GitHub (at github.com)16:26
gioxobs: Nice, thanks, now I see it. BTW, is there already some similar USB driver for fomu that gives me a kind of serial port between the PC and the fomu without me having to care too much about USB details?16:33
CarlFKgio: I have seen a serial port connection to micropython on fomu, - is that close to what you are asking?16:41
CarlFKgio: hmm, is "driver" pc os side, or fomu side of the usb connection?16:42
gioCarlFK: I mean on the fomu side. You're right, I will investigate the micropython firmware and try to remove the micropython part. What remains should be what I want.16:47
CarlFKgio: yay, I helped :p.   more that may help: I wold look at the micropython c code for stdout things (printf?) and follow where those bytes go16:48
CarlFKeventually they go over usb, so somewhere along that path is what you want16:49
gioNow the problem becomes finding a micropython version that I can build from sources and make work.17:04
gioIf I upload the micropython binary that is in the fomu-workshop repository, it work. If I try to build it from the micropython repository, it builds, but it does not work.17:04
gio(kernel complains USB is misbehaving)17:04
xobshttps://github.com/xobs/micropython/tree/fomu/ports/fomu17:06
tpbTitle: micropython/ports/fomu at fomu · xobs/micropython · GitHub (at github.com)17:06
xobsOh.  Might be missing SET_ADDRESS functionality?17:06
gioxobs: I tried that repository, both "fomu" and "2019-something-fomu" branches, but same result.17:07
gioHow do I know about SET_ADDRESS?17:07
gioBTW, compiling the cdcacm example works, same toolchain and same fomu.17:08
xobsThis is the SET_ADDRESS patch: https://github.com/xobs/micropython/commit/573979203d20b42e468f95f4b6f1d9a63bb88d72#diff-597ddbd985b04dd62936e01274de3eae17:11
tpbTitle: fomu: support foboot 1.9+ · xobs/micropython@5739792 · GitHub (at github.com)17:11
gioxobs: Wonderful, it works now! Thanks! :-)17:17
*** kaeso[m] has joined #tomu21:34
*** techman83 has quit IRC22:00
*** techman83 has joined #tomu22:03

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