Thursday, 2019-11-21

*** tpb has joined #tomu00:00
*** rohitksingh has quit IRC00:10
*** emeb has quit IRC00:26
*** mneasi has quit IRC01:14
*** rohitksingh has joined #tomu01:45
*** cedric has quit IRC01:47
*** cedric has joined #tomu01:48
*** cedric has joined #tomu01:48
*** asante has quit IRC02:31
*** asante has joined #tomu02:37
*** asante has joined #tomu02:37
*** nrossi has joined #tomu03:49
*** siddacious has quit IRC04:34
*** pollo has quit IRC04:43
*** siddacious has joined #tomu05:01
*** mneasi has joined #tomu05:08
*** pollo has joined #tomu05:11
*** mneasi has quit IRC05:13
*** mneasi has joined #tomu05:25
*** mneasi has quit IRC05:33
*** CarlFK has quit IRC07:09
*** cdmatter has quit IRC08:03
*** cdmatter has joined #tomu08:03
*** cedric has quit IRC08:33
*** cedric has joined #tomu08:34
*** cedric has joined #tomu08:34
*** im-tomu has left #tomu08:42
*** im-tomu has joined #tomu08:42
*** im-tomu has left #tomu08:44
*** im-tomu has joined #tomu08:44
*** cedric has quit IRC09:21
*** cedric has joined #tomu09:24
*** cedric has joined #tomu09:24
VercasMy Fomu finally arrived.10:00
Vercas'Tis a day to celebrate.10:00
VercasSooooooooo small question.10:00
Vercashttps://github.com/im-tomu/fomu-toolchain/releases10:00
tpbTitle: Releases · im-tomu/fomu-toolchain · GitHub (at github.com)10:01
VercasWhere does the source for these come from?10:01
VercasI'd like to build the toolchain for ARM.10:01
xobsVercas: Hooray!10:01
Vercas:D10:01
xobsIt comes from a variety of sources.  https://github.com/xobs/toolchain-nextpnr-ice40 and https://github.com/xobs/toolchain-nextpnr-ice40 being the two big ones.  The riscv stuff comes straight from sifive.10:02
tpbTitle: GitHub - xobs/toolchain-nextpnr-ice40: Prebuilt nextpnr-ice40 toolchain (at github.com)10:02
VercasThat's the same link, heh.10:02
xobsOops.  The last one should be toolchain-icestorm10:03
xobsI also have information on how to make Raspbian packages at https://github.com/im-tomu/fomu-pi-gen#making-packages10:03
tpbTitle: GitHub - im-tomu/fomu-pi-gen: A fork of pi-gen for creating Fomu images (at github.com)10:03
VercasAha. :)10:03
xobsAnd there's a repo at https://github.com/im-tomu/fomu-raspbian-packages -- but I suspect the deps there are wrong or incorrect :-/10:03
tpbTitle: GitHub - im-tomu/fomu-raspbian-packages: Repository for Raspberry Pi packages (at github.com)10:03
VercasMy goal is to run the toolchain on my Pinebook Pro.10:04
VercasOw, you have ARM packages in the repo. :o10:05
VercasWill try those tonight.10:05
*** siddacious has quit IRC10:06
xobsYou may need to manually install the correct version of Python.  But see how it goes!10:06
VercasCan't be that hard, eh?10:06
xobsYeah.  How hard could it be!10:07
VercasDo you happen to have a tutorial like... Fomu programming for dummies?10:08
VercasThe bits I'm especially interested in are bitfile loading.10:08
xobsHave you seen the workshop at https://workshop.fomu.im/?10:08
tpbTitle: fomu-workshop | Support files for participating in a Fomu workshop (at workshop.fomu.im)10:08
VercasAnd how to make sure I don't brick the Fomu forever.10:09
VercasI have not seen that. Checking it out.10:09
xobsGenerally, unplugging it and plugging it back in resets it.  The only exception to that rule is a firmware update.10:09
VercasSo the bitfile isn't uploaded straight into flash?10:10
xobsIt is, but it's uploaded at an offset 262144 bytes from the start.  Offset 0 is never touched.10:10
VercasI see.10:12
VercasI suppose there is a way to make it autoload a bitfile on boot?10:12
VercasAnd a way to reset it without having to unplug it and plug it back in? :o10:13
VercasI suppose cutting off power from the USB port is an option.10:13
xobsNot yet on the autoboot.  That's a tricky question, and I'm taking suggestions.  There's no good way to pass information from the program back to the bootloader.10:14
xobsThere's a line mentioned in passing in https://workshop.fomu.im/ -- look for the magic "0xac".  But of course if you load your own bitstream then you might not even have USB support, so you won't be able to access it from the host machine.10:14
tpbTitle: fomu-workshop | Support files for participating in a Fomu workshop (at workshop.fomu.im)10:14
VercasHmmmm.10:15
VercasI cannot think of a pertinent way to autoload bitfiles while also allowing a fallback to the bootloader.10:17
xobsI had the silly idea of checking the "WE" bit in the SPI flash -- if foboot starts up and WE is 1, then don't auto-boot.  That just seems like a bad idea though.10:18
*** rohitksingh has quit IRC10:19
*** rohitksingh has joined #tomu10:21
VercasHere is another silly idea. Put a photoresistor and check if it's picking up the RGB LED or something like that. :)10:22
VercasBut that requires hardware modification so it's not a real solution.10:22
VercasThe idea being that we can obstruct the LED or the resistor to cause it to run the bootloader instead.10:23
xobsThat's a clever idea!10:23
xobsThe PCB is super full right now, though.  I'm happy I managed to fit ESD diodes on there at least.10:24
VercasI can imagine. I really want to go to our hardware team and show off the Fomu but I don't have the balls.10:24
VercasIn all fairness, though, our boards are also packed full. On two sides.10:26
*** rohitksingh_ has joined #tomu10:26
*** rohitksingh has quit IRC10:27
MadHackerWant a slight tweak on that idea?10:33
MadHackerLEDs are photoresistors.10:33
MadHacker(Well, weird crappy photodiodes)10:33
MadHackerYou can use the same sort of code that'd normally run for cap touch to measure light falling on an LED.10:33
MadHacker10:13 < xobs> Not yet on the autoboot.  That's a tricky question, and I'm taking suggestions.  There's no good way to pass information from the program back to the bootloader. <-- the flash?10:34
VercasWell, to the best of my knowledge, that will not work with an RGB LED very well.10:35
MadHackerVercas: It works but the colours don't separate well.10:35
VercasUnless it's literally three LEDs with their own separate wiring.10:35
MadHackerThey are.10:35
VercasOh?10:35
MadHacker(in general; not talking about fomu, will check)10:35
MadHackerYep, they are.10:36
VercasOh, neat.10:36
MadHackerI forgot, they're run off the FPGA LED driver pins.10:36
MadHackerice40UP has some dedicated LED drive hardware.10:36
VercasThen we can just shine a laser onto it or something?10:36
MadHackerSure.10:36
VercasOw, *that* hardware though might not be ideal for running the LEDs in reverse.10:37
MadHackerI mean, have to try it out to see if the signal level is adequate, but in principle something ought to be feasible.10:37
MadHackerDon't know if the pins are THAT dedicated - think they still have the normal input structures?10:37
VercasI have a green laser powerful enough to blind my eyeballs from a kilometer away...10:38
MadHackerJoin the club. :D10:38
VercasIt's one of those flashlight-like lasers that have a variac inside that you can use to pimp up the diode.10:39
MadHackerSeriously though, a 1s delay on insert before autoboot while it looks for a particular trigger on USB might be viable. Double-reset on USB isn't such a huge problem.10:39
MadHackerLots of devices have startup sequences like that anyway, where they pull their firmware from the OS driver and then reset themselves.10:39
VercasDouble reset can happen outside of user control, though.10:39
VercasNot USB devices, please don't do that with USB...10:40
MadHackerNo, I mean device boots to bootloader, waits a second listening for a reprogramming tool, if it doesn't get it, resets USB and autoboots your bitfile.10:40
MadHackerAnd yes, that absolutely happens with USB. It's even common.10:40
VercasSeriously please don't. I've lost nights of sleep due to devices that try to do clever shit like this. e.g. iPhones, Android phones...10:40
* MadHacker shrugs. If you want autoboot and unbrickability without extra hardware, you need some compromise somewhere.10:41
VercasIt's all nice and dandy until you need to pass through the device to a VM or something like that.10:41
VercasOr you need to write a userland driver.10:41
VercasBricked my iPhone because of this nonsense.10:42
VercasiTunes doesn't run on Linux.10:43
VercasSo naturally I tried a Windows VM. And failed.10:43
VercasEnded up digging through my piles of electronics to find a Windows laptop.10:43
VercasQemu USB passthrough doesn't do hotplug shenanigans so I had to race against the timeouts in iTunes when updating iOS.10:44
VercasThey're too short, though.10:45
xobsAww.10:52
xobsThe first version of foboot didn't handle USB reset correctly, so it doesn't play well with vms. That got fixed.10:53
*** xkapastel has joined #tomu12:13
*** mifune has quit IRC13:30
*** mifune has joined #tomu13:31
ovfwould shorting the cap touch pads together work as a makeshift button? i.e. i recall on espruino pico the official way to boot into the bootloader (opposite of what one would want on a fomu) is to draw with a pencil over two nearby pads13:35
MadHackerYep. TBH could do cap touch properly. One of the basic problems is though that you're going to be touching them when you plug it in *anyway*.13:39
MadHackerI guess you could tell the difference between a finger and a dead short though.13:40
MadHackerA counter and a delay could work. Make the bootloader wait a second and decrement a counter each time it power cycles. If the counter hits zero, don't autoboot. The application would reset the counter to, say, 5, on each run.13:41
MadHackerSo if you want to go into bootloader, plug+unplug 5 times quickly, but the "normal" behaviour is just a slightly slow-to-start autoboot.13:42
MadHackerHeck, reset on hitting the 1 second timeout not in the app, save the app needing flash code.13:43
MadHackerSo it'd be decrement and check, wait 1s, reset counter, autoboot.13:43
MadHackerBit hard on the flash maybe.13:46
ovfalso, fomu doesn't support sram programming, correct? so the shortest fpga test cycle is to unplug,replug,flash,run the payload?13:47
MadHackerYou could soft-reset the port potentially, but that sounds right.13:47
ovfany dibs on whether (a) host usb port, (b) fomu usb connector, (c) fomu flash gives in first? :-)13:49
MadHackerMaybe the gold plating on the fomu.13:49
MadHackerThe springs in the host port are fairly thick. I imagine they can take a good number of insert cycles.13:49
MadHackerFlash endurance on the part used is apparently 100,000.13:50
MadHackerHm. USB-A is 1500 cycles just.13:51
MadHackerMini-, Micro-, and -C are all higher.13:51
ovfmaybe i should start simulating my designs... :-)13:56
MadHackerFind how to power-off the port in your hub.13:57
MadHackerOr else use a cheap hub as a wearout-proofing device. :)13:57
*** rohitksingh_ has quit IRC14:00
*** mneasi has joined #tomu15:01
*** mneasi has quit IRC15:05
*** mneasi has joined #tomu15:13
*** mneasi has quit IRC15:18
*** CarlFK has joined #tomu15:28
*** cdmatter has quit IRC15:31
*** cdmatter has joined #tomu15:31
*** xkapastel has quit IRC16:02
*** rohitksingh has joined #tomu16:06
*** rohitksingh has quit IRC16:14
*** emeb has joined #tomu16:17
*** cedric has quit IRC16:50
*** cedric has joined #tomu16:53
*** cedric has joined #tomu16:53
*** mneasi has joined #tomu16:59
*** CarlFK has quit IRC16:59
TomKeddieovf: my usb isolator has a disconnect button, I'll send you a pcb free if you'd like.  BOM is about $US10.  https://github.com/TomKeddie/prj-usb-isolator/tree/master/v217:18
tpbTitle: prj-usb-isolator/v2 at master · TomKeddie/prj-usb-isolator · GitHub (at github.com)17:18
TomKeddieIt's an old design so the files are eagle unfortunately.17:19
*** sadfasdfsafdsafd has joined #tomu18:11
sadfasdfsafdsafdanyway to list all importable modules?18:11
sadfasdfsafdsafdpeople talk about help('modules') but there is no module help18:11
sadfasdfsafdsafdNameError: name 'help' isn't defined18:12
*** sadfasdfsafdsafd has quit IRC18:25
*** CarlFK has joined #tomu18:45
mithroovf: FPGA config SRAM you mean?18:53
*** CarlFK has quit IRC19:14
*** CarlFK has joined #tomu19:15
*** CarlFK has left #tomu19:17
*** CarlFK has joined #tomu19:19
ovfTomKeddie: thanks! so far it looks like i can ask linux to power cycle the (internal) usb hub, which works well (or too well -- laptop's internal keyboard is apparently on the same hub as everything else), so i'll try sticking to this for now19:53
ovfmithro: i meant that, but then i realised i have no idea how that's going to work on fomu.19:54
*** jimt[m] has quit IRC20:27
*** nrossi has quit IRC20:44
*** mneasi has quit IRC20:45
*** mneasi has joined #tomu20:46
*** mneasi has quit IRC20:50
*** mneasi has joined #tomu21:00
*** mneasi has quit IRC21:04
*** mneasi has joined #tomu21:04
*** ppisati_ has joined #tomu21:10
*** buZz_ has joined #tomu21:10
*** buZz_ has quit IRC21:10
*** buZz_ has joined #tomu21:10
*** techman83 has quit IRC21:12
*** ppisati has quit IRC21:12
*** buZz has quit IRC21:12
*** turq has quit IRC21:12
*** techman83 has joined #tomu21:13
*** turq has joined #tomu21:17
*** xkapastel has joined #tomu21:19
*** mneasi has quit IRC21:19
*** mneasi has joined #tomu21:48
*** ChanServ sets mode: +o mithro21:50
*** ChanServ has joined #tomu21:50
*** services. sets mode: +o ChanServ21:50
*** daveshah has joined #tomu21:56
*** testing has joined #tomu21:56
*** testing has quit IRC21:56
mithro#fomu, ##tomu and ##fomu redirect to this channel now21:57
*** ssb has quit IRC22:22
*** ssb has joined #tomu22:22
*** rohitksingh has joined #tomu22:23
*** CarlFK has quit IRC22:29
*** AnimaInvicta has joined #tomu22:49
*** buZz_ is now known as buZz23:13
*** AnimaInvicta has left #tomu23:16
*** mneasi has quit IRC23:28
*** Toba has joined #tomu23:33

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