Friday, 2019-12-13

*** tpb has joined #tomu00:00
futarisIRCcloud - it's xobs on the far right00:20
*** rohitksingh has quit IRC00:30
*** rohitksingh has joined #tomu00:47
*** rohitksingh has quit IRC00:57
*** Dan_au has quit IRC01:00
CarlFKyay xobs!01:15
TomKeddieSheesh the solder is probably not yet cooled on those fomus, nice work!01:55
xobsYeah, I just visited the factory last week.01:56
xobsThe good news is that there is now a box on its way to crowd supply!01:56
CarlFKxobs:  what are the challenges? getting  circuitpython  to run on boot?02:02
xobsCarlFK: challenges?02:07
CarlFKxobs: it seems like an odd thing that is open to suggestions02:08
CarlFKbut I don't know what the 'boot' process is.. if this level is even booting yet02:09
CarlFKI understand how a CPU gets started and runs code in rom.  I don't get what happens when there is no cpu02:10
xobsCarlFK: the lack of a button is a big one. If someone loads a program that crashes immediately, and it's set to auto boot, how do they get back into foboot?02:16
xobsOr, for example, the current circuitpython has an issue where sometimes it won't enumerate. That'd be an issue.02:18
CarlFKhmm.. how about shorting the 2 usb data pins?02:19
*** Dan_au has joined #tomu02:33
xobsHow would that work?02:39
CarlFKI'm hoping that ...foboot? could figure out they were shorted and do some fail safe thing02:41
*** futarisIRCcloud has quit IRC02:41
CarlFKoh, the cpx button is not a gpio kinda thing, its .. um.. out of band to all that?02:41
CarlFKor hey, if someone bricks a fomu, they are engaged enough that they probably have 2, or will buy another, or make a jig02:43
CarlFKor hey, how about shorting some of the pads?02:43
*** rohitksingh has joined #tomu04:01
*** rohitksingh has quit IRC04:20
*** rohitksingh has joined #tomu04:20
*** xkapastel has joined #tomu04:28
TomKeddiefoboot used to allow boot override by shorting the two pads, I'm guessing it was removed for a reason.04:37
xobsFoboot still ought to have a nerve pinch type thing.04:38
TomKeddiemithro: Hey Tim, I heard you mention you were running low on hacker boards at supercon, are you intending another run?04:38
xobsBut I had enough trouble activating it that I haven't used it.04:38
xobsMaybe that was a different problem, though.04:38
TomKeddieI think I saw it was removed from the code, perhaps I was skimming too fast.04:39
mithroTomKeddie: not planning to, why? Production boards are the future now the spice is flowing04:39
TomKeddiemithro: cool, if you were doing a run I was going to put in for a small batch to run workshops myself.   It's no biggie, I have 8 x evt1 working as a class set anyway.04:41
mithroHacker or evt boards?04:41
mithroI plan to give out the production boards as freely as the Hacker boards04:42
CarlFKTomKeddie: why the hacker ver for the class?04:42
xobsI believe they're EVT1 boards left over from teardown.04:43
TomKeddieCarlFK: I'd prefer to spend a few $ per person and have boards for people to keep.  prod is too expensive though.  No biggie, yes I've recovered the evt1 boards from teardown.04:53
CarlFKwhy were hacker cheaper?04:54
*** futarisIRCcloud has joined #tomu05:21
TomKeddieCarlFK: some info at
tpbTitle: fomu-hardware/hacker at master · im-tomu/fomu-hardware · GitHub (at
TomKeddiexobs: do you publish the build script you use to release foboot?  I'm trying to build an evt version with the same options as the published versions.  Thanks.05:27
CarlFKah thanks - didn't realize it had different components05:29
xobsTomKeddie: the script is in
tpbTitle: foboot/ at master · im-tomu/foboot · GitHub (at
xobsAs for actually building it, usually it's --revision [rev] --with-debug usb --seed 105:32
xobsAnd I need to adjust the seed as necessary to get it to meet timing. The j05:32
xobsThe evt boards have a spi debug now as well, which is built with debug=spi instead of debug=usb05:32
TomKeddieThanks, I was confused by the --boot-source  option, there are a few defaults in there ;-) but bios makes sense.05:43
TomKeddieoh, spi debug is for the pi connector, nice!05:43
*** xkapastel has quit IRC06:34
*** coderobe672 has joined #tomu06:45
*** coderobe672 has quit IRC06:55
*** coderobe672 has joined #tomu06:57
*** hop has quit IRC06:59
*** coderobe672 has quit IRC07:13
*** coderobe672 has joined #tomu07:13
*** coderobe672 is now known as coderobe07:14
*** coderobe has quit IRC07:16
*** coderobe has joined #tomu07:18
*** hop has joined #tomu07:21
mithroM-Labs (@M_Labs_Ltd) Tweeted:13:25
mithroBuilding a 6800 CPU on an FPGA with nMigen
mithro@TomKeddie: pvt is about the same price as hacker in the quantities I buy13:26
mithroIn theory it /could/ be cheaper thanks to the multiple part options, but we need to keep xobs being able to eat :-)13:28
*** evelyn has joined #tomu16:51
evelynso... I'm playing with micropython. However, it's not clear to me what the easiest way to put a script onto its filesystem are - some micropython people recommend either rshell or adafruit-ampy, but both these fail when tryin17:43
evelynsorry, fail when attempting to communicate with the fomu.17:43
evelynAs I understand it, there should be a small filesystem that one can poke at, but it's not clear if that's true on the fomu.17:44
evelynDoes anyone know of any documentation that would be helpful?17:44
CarlFKmicro or adafruit's circuit python?17:44
evelynmicro - rshell (and I believe ampy) should still be able to communicate with it, but I am not sure.17:45
CarlFKyou should try circuit - it's a very nice experience17:46
evelynI confess I've never heard of it up until now17:47
evelynhmm... the micropython documentation suggests that a module called 'os' should let one manipulate the filesystem, but it's not in the fomu's micropython seemingly..17:53
evelynmaybe not possible then.17:53
tpbTitle: Releases · xobs/circuitpython · GitHub (at
CarlFKyou get a usb mas storage device that you can mount and do file things17:59
xobsCreate a file called "" and it will get executed every time you save the file.18:00
CarlFKxobs: is the need for a way to unbrick the thing in the way of autoboot?18:09
xobsCarlFK: correct.18:26
CarlFKah.  neat.18:26
evelyngosh, thanks! This is working nicely.18:28
CarlFKevelyn: right?18:28
xobsevelyn: yay!18:28
xobsCan I ask everyone here to try updating to 2.0.3? I'm going to send out a backer update recommending the same, and if there aren't any problems I'm going to update the factory test jigs to install 2.0.3 out of the box.18:29
CarlFKxobs:  is adifrut's reset button code still in your code base?18:29
evelynI've got 2.0.3 running just now18:30
xobsCarlFK: I'm not sure what that is. I thought I hooked up bios reset.18:31
xobsBut of course, if you auto boot a bitstream, then there's no way of passing information back to foboot. So foboot can't tell the difference between a reboot and initial poweron.18:32
xobsIn tomu, we could use uninitialized memory to pass tokens between the user program and the bootloader. In the fpga, all* memory is erased.18:33
CarlFKxobs: im hoping to find something that can be physically shorted, like with a sharp paperclip18:34
CarlFKand by me, I mean con one of my friends into it :p18:35
xobsShould make a "reset shoe" that cups all the pads.18:35
xobsThough that'd only work on pvt...18:36
xobsTo permanently update to 2.0.3, install the appropriate "updater" program from
tpbTitle: Release v2.0.3: Fix USB Reset IRQ · im-tomu/foboot · GitHub (at
CarlFKsomething funky: Found DFU: [1209:5bf0] ver=0101, devnum=31, cfg=1, intf=0, path="3-2", alt=0, name="UNKNOWN", serial="UNKNOWN"18:42
xobsCarlFK: That looks like it had some trouble when requesting the product name.  Weird that it specifies a serial number -- that's unspecified.19:03
xobsIs it loose in the slot?19:03
CarlFKxobs: maybe.  that seems to be a thing on my laptop.  I haven't wiggled it yet.  dmesg
tpbTitle: Ubuntu Pastebin (at
xobsOne solution to that problem would be to glue a piece of paper to the bottom of the case.  Just need to add 0.3mm thickness to bring it up to spec.19:05
evelyn    Actually, I find that the 2.0.3 bootloader does not like loading the micropython from the fomu-workshop :/20:23
tpbTitle: Ubuntu Pastebin (at
evelynI've just been able to reproduce this with a friend's PC too, so it's not a problem with my laptop. With the old bootloader (1.8.0 or something), the device would present /dev/ttyACM020:39
evelynI tried dfu-util -e for good measure, but it's already booted into the application and is no longer in DFU mode20:40
evelynit can load circuitpython fine so not sure what changed. Perhaps not a big issue.20:40
CarlFKill give mp a shot...20:42
CarlFKxobs: yeah, wigging the fomu: [206387.234804] usb 3-2: USB disconnect, device number 3120:42
CarlFKcut up a medium thickness credit card, makes a nice shim21:08
CarlFKFound DFU: [1209:5bf0] ver=0101, devnum=33, cfg=1, intf=0, path="3-2", alt=0, name="Fomu Hacker running DFU Bootloader v2.0.3", serial="UNKNOWN"21:08
evelynYeah, that's what I get from `dfu-util -l`21:16
xobsevelyn: Good point.  I should rebuild the micropython from the workshop so that it works with 2.0.321:16
evelynI wasn't really sure how to rebuild it locally, unfortunately21:17
xobsIt's from -- go into ports/fomu and type "make".21:19
tpbTitle: GitHub - xobs/micropython: The Micro Python project (at
evelynThanks! I'll give that a shot.21:23
evelynOK so - after running make, dfu-util does not like the generated firmware.dfu21:31
evelynbut it's happy flashing firmware.bin - not sure what's up there21:32
evelyndfu-util: Could not read name, sscanf returned 021:32
evelyndfu-util: Failed to parse memory layout21:33
evelynbut the generated firmware.bin is fine and I get the cute micropython repl21:33
CarlFKxobs, could you stuff a little fomo.deps.txt file somewhere so we don't have to dig out what is needed from
tpbTitle: GitHub - xobs/micropython: The Micro Python project (at
xobsI'm honestly not sure what the micropython dfu file is.  It seems weird.21:38
xobsNormally a .dfu file is the .bin file plus a 16-byte DFU suffix.  According to the DFU standard:21:40
* xobs uploaded an image: image.png (285KB) < >21:40
xobsCarlFK: what would that look like?21:40
CarlFKxobs: for building fomu on debian: apt install build-essential libffi-dev pkg-config21:43
CarlFKand whatever other distro package names people are using21:44
CarlFKor get tumbleweed to package something, then it would be something like apt build-dep fomu-circuitpython21:45
mobius__xobs: I know you support Linux/Windows/Mac, but I also made a Vagrant image that compiles the FPGA tools from source and sets up USB devices. Right now it just grabs the same RISC-V toolset though.
tpbTitle: GitHub - VLSIDA/fpga-vagrant-image: Vagrant configuration files for Ubuntu w/ most recent Yosys + Nextpnr + Icestorm (at
mobius__I previously used this for the iCEBreaker as well22:03
*** John_K has quit IRC22:03
xobsmobius__: cool! This is why you needed to update to 2.0.3, so you could pass it through to virtualbox?22:04
mobius__xobs: exactly22:05
xobsYou're making a very compelling argument to tell people to move to
xobsWhere do you think these Vagrant instructions should go?22:07
mobius__I'm not sure about that. :)22:13
mobius__I am always switching laptops so I've gone to a VM-based model for most development, so I just switched to this.22:15
CarlFKxobs: ah, you have the file I was asking for, just need more stuff in it
tpbTitle: micropython/ports/fomu at fomu · xobs/micropython · GitHub (at
CarlFK  stdint.h: No such file or directory22:34
tpbTitle: Ubuntu Pastebin (at
xobsSomething strange is going on with your riscv compiler.22:36
CarlFKxobs:  # include_next <stdint.h>  where should that file be?23:13
tpbTitle: Ubuntu Pastebin (at
CarlFKand what does _next mean?23:13
xobsCarlFK: Your toolchain looks like it was installed really strangely.23:17
xobsThe file it's complaining about is `/lib/gcc/riscv64-unknown-elf/8.3.0/include/stdint.h`23:18
xobsRather, `${FOMU_TOOLCHAIN_ROOT}//lib/gcc/riscv64-unknown-elf/8.3.0/include/stdint.h`23:18
CarlFKxobs:  ubuntu 19.04 -  apt-get install a few things23:18
xobsThat file should then be including `${FOMU_TOOLCHAIN_ROOT}/riscv64-unknown-elf/include/stdint.h`23:18
xobsBut it looks like your toolchain is installed into the root.23:19
xobsAnd is missing the second `stdint.h`.23:19
CarlFKah, I need to install the toolchain from.. git something.. moment, I think I have that23:24
ovfxobs: yes for "reboot shoe"!23:27
tpbTitle: fomu-workshop | Support files for participating in a Fomu workshop (at
xobsCarlFK: your package manager may have a riscv binutils or libc or glibc or something like that...23:34
xobsCarlFK: If you're going to use your own toolchain instead of the fomu one, you may need to install `libnewlib-dev`.23:40
xobsIt includes stdint.h and I suspect that's what they want you to install:
tpbTitle: Ubuntu – File list of package libnewlib-dev/disco/all (at
xobsThe arm toolchains depend on it, but not the riscv one.23:41
CarlFKxobs:  installed  libnewlib-dev , same error23:44
ovfCarlFK: where from did this toolchain come in ubuntu 19.04? it's only in repos starting with 19.1023:57

Generated by 2.13.1 by Marius Gedminas - find it at!