Sunday, 2017-03-12

*** tpb has joined #upy-fpga00:00
*** Guest4564 has joined #upy-fpga01:55
*** Guest4564 has quit IRC02:05
*** Guest4566 has joined #upy-fpga04:00
*** Guest4566 has quit IRC04:06
*** jimmo has joined #upy-fpga05:46
jimmoso apparently learning PIC development is a useful life skill05:59
jimmobut programming LM32 firmware at 19200 baud is really awful05:59
tpbTitle: GitHub - jimmo/numato-mimasv2-pic-firmware (at
jimmoalso, the mode selector switch isn't great06:00
jimmoif you have a Mimas v2, then follow the instructions to make the FPGA UART run at 115200 baud, and show up as two serial ports - first one for the SPI flash, second one for the FPGA/LM32 UART06:01
mithrojimmo: \o/06:02
jimmoyou'll have to edit target/mimasv2/Makefile to set the port for firmware to /dev/ttyACM1, and target/mimasv2/ to change the baud rate06:06
mithrojimmo: I'll fix up the FPGA side shortly06:07
mithros/FPGA/gateware repo06:08
jimmoyou know how the saying goes... friends don't let friends use <microcontrollers without gcc/llvm support>06:10
mithroFind me a IC to replace the FX2 :-P06:11
shenkiwhat's the latest and greatest repo for gateware?07:19
shenkiive just flashed jimmo's shiny new firmware on my mimasv207:19
jimmoi'm using [email protected]:mithro/HDMI2USB-litex-firmware.git07:22
shenkiok, me to07:23
shenki  File "/home/joel/dev/timvideos/mimasv2/build/conda/bin/opsis-mode-switch", line 11, in <module>07:25
shenki    load_entry_point('hdmi2usb.modeswitch==0.0.0.post145', 'console_scripts', 'opsis-mode-switch')()07:25
shenki  File "/home/joel/dev/timvideos/mimasv2/build/conda/lib/python3.5/site-packages/hdmi2usb/modeswitch/", line 204, in main07:25
shenki    assert len(found_boards) == 1, found_boards07:25
shenkiAssertionError: []07:25
shenkitargets/opsis/ recipe for target 'gateware-load-opsis' failed07:25
shenkijimmo: does it ignore the state of SW7 now?07:28
jimmosuggestions welcome!07:28
shenkimakes sense to me07:28
jimmomaybe enable/disable xmodem mode for spi flash?07:28
shenkithat's a good idea. use it for backwards incompatible stuff07:29
mithroI need to take another look at the schematic07:30
mithrojimmo: We should add some of the functionality from the TOFE board, like allowing to read the analog pins via the serial and stuff07:32
jimmoso the current protocol already allows that in some ways07:33
jimmobut could be extended to support analog07:33
mithroThe SPI flash lines because GPIO after the FPGA boots, so we could actually have one UART for serial console and a second UART for the wishbone bridge and stuff07:33
shenkihow do i flash now that i have gateware?07:34
jimmomake gateware-load07:34
shenki$ make image-flash-mimasv2 PORT=/dev/ttyACM107:36
shenkibut it's looking for flash.bin, and i don't have one of those07:36
jimmoi ran:07:36
jimmomake gateware07:36
jimmomake gateware-load07:36
shenki$ make gateware-load07:37
shenkiMimasV2 doesn't support loading, use the flash target instead.07:37
shenkimake gateware-flash-mimasv207:37
shenki$ git describe07:37
mithromake image07:37
shenkithat fixed it07:37
mithroThat just flashes the gateware07:38
mithroThat flashes the gateware+bios+firmware07:38
jimmomithro: has that changed since january?07:38
mithroGuess image-flash-mimasv2 should deps on image07:38
mithrojimmo: Yes, possibly07:39
shenkiit's hung07:40
shenki...Set value of IOs that are needed for configuration process07:40
shenkiSend a command to Mimas V2: b'~\t\x01\x02\x01'07:40
shenki...Set value of IOs that are needed for configuration process07:40
shenkiSend a command to Mimas V2: b'~\t\x01\x02\x00'07:40
shenki...Send a command to Mimas V2: b'~\x07\x01\x02'07:40
mithrobrb - just in the middle of drilling into my desk07:40
shenkiMicron M25P16 SPI Flash detected07:46
shenkiLoading file build/mimasv2_base_lm32//flash.bin...07:46
shenkiErasing flash sectors...07:46
shenkiWriting to flash 13% complete...07:46
shenkistuck there (i went back to the stock flashing python file)07:46
jimmowhat changed? :)07:46
shenkidunno.... some crazy PIC hacker rocked up and i flashed his binary from the internet. what could possibly go wrong?07:47
jimmoi don't understand what you mean by stock flashing python file07:47
shenkiOh. I'd hacked up MimasV2Config.py07:48
shenkifrom back in jan, to debug something07:48
shenkipower cycled. appears to be getting further now07:49
shenkiit worked!07:52
shenki$ flterm --port=/dev/ttyACM2 --speed=115200 --kernel=$HOME/dev/micropython/lm32/build/firmware.bin07:53
shenki[FLTERM] Starting...07:53
shenkithat looks less worky07:53
mithroshenki: Did you build the gateware with a different UART baud rate?07:53
shenkii didn't change anything07:53
jimmotargets/mimasv2/  s/19200/11520007:54
*** ewen has joined #upy-fpga07:59
ewenmithro: Thanks for advice via email/GitHub on getting MicroPython to run on Mimas v2.08:00
mithroHi ewen!08:00
mithroewen: It's cool to have you working on this too08:00
ewenI've managed to make option 2 (actually flashing micropython) work.08:00
ewenBut no luck with 1 or 3.08:00
ewenI'm beginning to suspect my flterm doesn't actually work correctly...08:00
shenkijimmo: it hung at 22% this time. appears to be a bit flaky?08:00
mithroshenki has just been trying to replicate jimmo's replacement PIC firmware to make flashing/reloading faster08:01
mithroewen: are you remembering to change the switch after flashing? Are you seeing anything on the flterm console?08:01
ewenWith approach one (flash in the default firmware), yes I do see H2U> prompt, and help/reboot/etc are accepted.08:02
ewenBut nothing after that.08:02
ewen(Even after disconnecting flterm and reconnecting with screen)08:02
shenkijimmo: i power cycled. it got 40%, then hung08:03
ewenflterm only every reports "Starting...".  But it seems like there should be more when it's doing a kernel upload.08:03
ewen(at least from looking at
mithroewen: flterm is a terminal emulator program which also includes the ability to upload firmware08:03
mithroewen: So you should be connected with flterm and then type reboot08:04
ewenYes, that's what I did.08:04
ewenNo further output.08:04
ewenIs it the micropython firmware.bin that I upload?  Or one of the others?  .fbi?  .elf?08:04
shenki41%, then died. bbl08:04
mithroewen: When you type reboot, what happens? You should see the bios come up08:05
ewenNope.  No further output.08:05
mithroI bet reboot is jumping to address 008:08
mithrowhich isn't the correct address on the MimasV208:08
mithroewen: can you try hitting the push buttons while flterm is connected08:08
* ewen goes tries that08:09
ewenNothing obvious happens when pressing buttons on Mimas V2.  Ie SW1 to SW608:10
ewenIe, nothing in flterm; nothing in the way of LED status changes.08:10
mithroewen: Let me check which button we connected the reset too08:12
mithroI think I broke that :-P08:14
mithroewen: I think the reboot is actually connected to SW6 at the moment08:14
ewenOkay.  I'll go try sw6 again.08:15
mithrothe little DIP switches08:15
mithrothe things labeled SW6 are actually "push buttons"08:15
ewenAh.  That'd explain the confusion.  I was using the push buttons, which are labelled SWN.08:16
ewenNot DIP switch 6.08:17
ewenBut DIP switch 3 seems to have started something looking like a kernel upload.08:17
ewenUploaded, MicroPython banner.08:19
mithroI was sure that katharos and myself fixed the order of the switches but maybe we only did the buttons and leds08:19
ewenIt no longer responds, but I guess that the flterm/MicroPython dislike; will reconnect with screen.08:19
jimmoshenki: you're probably right that it's flakey but in about 15 attempts over the past few hours i haven't had a single issue so not sure how to debug :D08:20
ewenmithro: Yes, reconnecting with screen gives working MicroPython.08:20
mithrojimmo: Did you accidently give shenki one with your accelerated buffered thing08:20
mithroewen: Yay!08:20
ewenSo toggling dip switch 3 seems to be the other thing I was missing.08:20
mithroewen: Does look like the dip switches are around the wrong way08:21
jimmomithro: that required modifications to the python, so it wouldn't get this far08:22
ewenmithro: No worries.  At least I now know how to do it.08:23
ewenWill turn these notes into a blog post.08:23
mithroewen: I'm fixing that now08:23
ewenYes, I'm going to add a note that it's *supposed* to be dip switch 6...08:27
mithroewen: Well, its actually *supposed* to be SW608:27
ewenAh.  That'd be a lot more convenient :-)08:27
ewenmithro: BTW, it'd be handy if somehow linked to this channel.08:29
ewenThe "Chat Channel" link there is empty.08:29
mithroewen: Looks like you are right - Want to fix that up?08:31
ewenI'm not sure how one links to FreeNode.  But yes, I can submit a pull request if I know what to put in it.08:32
mithroI would say "irc:// [WebChat](" - maybe?08:33
tpbTitle: freenode Web IRC (qwebirc) (at
mithroewen: Actually - it looks like I put a lot more info in the wiki ->
tpbTitle: Home · upy-fpga/issues-wiki Wiki · GitHub (at
mithroewen: Maybe the upy-fpga website should just be a redirect to that wiki page....08:35
*** upy-fpga-bot has joined #upy-fpga08:36
upy-fpga-bot[upy-fpga-litex-gateware] mithro deleted adv_debug_sys at 7760d79:
*** upy-fpga-bot has left #upy-fpga08:36
mithrojimmo: That reminds me - you got a copy of that stuff we ended up doing for that other FPGA board?08:36
jimmoyesssssss...on my other computer08:36
jimmoi'll take a look after dinner, just cooking at the moment08:37
*** upy-fpga-bot has joined #upy-fpga08:38
upy-fpga-bot[upy-fpga-litex-gateware] mithro deleted minispartan6 at 112044b:
*** upy-fpga-bot has left #upy-fpga08:38
mithroewen: Okay, I've fixed that up now08:39
ewenThe website?  Or the button issue?08:39
mithroewen: The button issue08:40
ewenmithro: Cool.  Am working on update for web page.08:40
*** upy-fpga-bot has joined #upy-fpga08:40
upy-fpga-bot[upy-fpga-litex-gateware] mithro pushed 909 new commits to nextgen:
upy-fpga-botupy-fpga-litex-gateware/nextgen 951ab9c Florent Kermarrec: init repo08:40
upy-fpga-botupy-fpga-litex-gateware/nextgen 3b3881b Florent Kermarrec: import platform from Matt O'Gorman's work08:40
upy-fpga-botupy-fpga-litex-gateware/nextgen cc70df9 Florent Kermarrec: platform: do not mix spaces and tabs08:40
*** upy-fpga-bot has left #upy-fpga08:40
mithroewen: Can you give that a go?08:41
ewenmithro: where is the fix?  (I've got about half an hour left tonight.)08:41
tpbTitle: GitHub - upy-fpga/upy-fpga-litex-gateware: SoC based on LiteX for running MicroPython on FPGAs (based on the HDMI2USB SoC) (at
ewenDo I need to do a make clean/make full rebuild?  Or will dependencies work?08:44
mithroewen: You'll need to rebuild gateware08:46
mithroewen: But everything else should work with dependencies08:47
ewenOkay, I'll give it a try.08:47
ewenmithro: 390 files changed (!)08:48
ewenI suspect a bunch got merged since I did my first checkout earlier today...08:49
mithroewen: Yeah, I've been working on merging the timvideos/HDMI2USB-misoc-firmware and mithro/HDMI2USB-litex-firmware together08:49
mithro(and importing the enjoy-digital/netv2-soc)08:49
mithroewen: Merged your wiki update08:50
mithroewen: These notes I wrote for katharos might be interesting to you ->
tpbTitle: upy-fpga-litex-gateware/ at nextgen · upy-fpga/upy-fpga-litex-gateware · GitHub (at
ewenmithro: Yes, that would haev been very useful a few hours ago :-)08:56
mithroewen: There is also
tpbTitle: HDMI2USB-misoc-firmware/ at nextgen · timvideos/HDMI2USB-misoc-firmware · GitHub (at
ewenwhich I notice has been merged into the upy-fpga-litex-gateware repository as of today.08:57
*** upy-fpga-bot has joined #upy-fpga08:57
upy-fpga-bot[upy-fpga-litex-gateware] mithro pushed 1 new commit to nextgen:
upy-fpga-botupy-fpga-litex-gateware/nextgen 3bee9b7 Tim 'mithro' Ansell: Makefile: Cleanup the targets a little....08:57
*** upy-fpga-bot has left #upy-fpga08:57
mithroewen: Yeah, you are on the cutting edge :-P08:58
mithroHow does the weekend disappear so quickly :-(09:01
mithroewen: You were at LCA, right?09:02
ewenmithro: :-)09:02
ewenmithro: rebuilt, uploaded.  SW6 now appears to prompt reset, which then causes firmware upload.09:03
mithroewen: I've also confirmed that reboot is failing because it's jumping to the wrong address :-P09:03
ewenWell at least we know the root cause...09:04
mithro#define REBOOT __asm__("call r0")09:04
mithror0 == the constant zero09:05
mithroInteresting, the reset location doesn't appear to be available to the firmware at the moment09:06
jimmomithro: how do i run firmware-load-mimasv2 ?09:11
mithrojimmo: "make firmware-load" ?09:12
jimmoi.e. how do i put the LM32 bios into upload mode?09:12
jimmoi ran reboot from the prompt but it hung09:12
mithrojimmo: hit the reset button, or flash an empty firmware and the bios will complain09:13
mithrojimmo: Yeah see above comments09:13
jimmowhat's an empty firmware?09:13
tpbTitle: soc_core: Add CPU_RESET_ADDR as a constant. by mithro · Pull Request #22 · enjoy-digital/litex · GitHub (at
jimmoyou mean empty gateware? i.e. gateware-flash ?09:13
jimmoalso what's the reset button?09:14
mithrojimmo: Depends if you have updated in the last 30 minutes or not?09:14
jimmoah pressed buttons until i got it09:14
mithrojimmo: should be SW609:15
jimmoit's faster!09:15
ewenmithro: Blog post:
tpbTitle: MicroPython on the Numato Mimas v2 (at
jimmoshenki: managed to repro SPI flash programming crash... :(09:24
mithroewen: Awesome! Next job is to get shenki's LED module working09:26
mithroewen: BTW It's perfectly fine to change TARGET/PLATFORM after entering the environment09:27
ewenIs there some where that links to these various bits are being kept?09:27
mithroewen: Not really, just kind of people's github repo s09:28
ewenMaybe there could be a wiki page with links to WIP?09:28
ewenOtherwise it's just rumours that only some people know...09:29
mithroewen: People tend to say stuff on this channel when they do stuff09:29
mithroewen: I'm not sure the current state of the LED flashing stuff, katharos was working on it the other day and I don't know where the micropython side of stuff ended up09:30
ewenOkay.  It may be a while before I get more time to play.  (It took several weeks just to get the Mimas out of the box!)09:32
mithroewen: Thanks for your pull requests and being a guinea pig09:32
ewenFTR, I've added breadcrumps to mailing list and ticket pointing at that blog post.  In case others are looking.09:32
ewenAnyway, now it's time for bed (nearly 22:30 here in NZ)09:32
mithroewen: We are still recovering from LCA :-P09:33
ewenGoodnight.  Thanks for your help.09:34
*** ewen has quit IRC09:36
mithroI replied to ewen's email with some extra info10:00
shenkijimmo: yay :) at least it's not just me10:34
jimmoshenki: it's actually a miracle this thing works at all... the MimasV2Config python script does no error checking10:34
shenkii wonder if we've discovered why they were running it at such a low bit rate10:38
jimmoshenki: i've pushed an updated firmware & prebuilt10:40
jimmowere you able to get it to work at all, or just intermittent?10:41
shenkijimmo: i tried about 10 times, and it only got to 100% once10:43
jimmooh well, let me know how you go with the update10:45
shenkijimmo: made it to 62% before it hung10:48
shenkii wonder what it is about my setup that makes it fail more often10:49
jimmohanging is weird... when you ctrl-c what's the stacktrace?10:49
jimmoi guess it'll be the sleep loop10:49
jimmoline 49210:51
shenkisecond go worked. now verifying10:53
jimmoit hung before it had finished the erase phase?10:53
shenkinope, that was at 62% iirc10:54
jimmoyour script is different to mine10:54
jimmois yours identical to ?  (seems like the line numbers match)10:56
tpbTitle: samplecode/ at master · numato/samplecode · GitHub (at
mithrojimmo: Where did your script come from then?! :-P10:57
shenkiyep, same checksum10:57
shenkijimmo wrote his own after looking at the signal traces on his scope10:58
jimmoohh i added some debugging earlier to the top of mine...duhh11:01
shenkimithro: how do i get from the hdmi2usb firmware back to the bios?11:01
jimmoreset button SW611:01
shenkiSW6 doesn't seem to reset the cpu anymore11:02
mithroshenki: When did you last update?11:02
shenkimithro: about three hours ago?11:02
jimmoshenki: can you get another stack trace if it hangs again plz11:02
mithroshenki: Try updating again11:02
shenkijimmo: yep will do11:02
shenkilooks like i will need to reprogram11:03
shenkimithro: did the change to not build in the firmware get merged?11:06
shenkii just want the bios11:06
mithroshenki: Then you need to use with --override-firmware=none11:07
tpbTitle: $ make image-flash-mimasv2 PORT=/dev/ttyACM1 python $(which / - (at
shenkimithro: thanks11:09
shenkijimmo: hung while programming11:10
jimmoso in both cases it's hung on the serial write11:10
mithroshenki: That looks like it's hung on the Erasing flash sectors?11:11
shenkino, the erase completes11:11
shenkithat was at 19%11:11
jimmomithro: it's confusing because the carriage returns break the output11:11
jimmoso this has nothing to do with the programming algorithm, and it looks more like the serial port stopped accepting writes11:11
jimmoanything in dmesg?11:11
jimmoi defer to my kernel hacker11:12
mithroI need a multimeter at my desk11:13
jimmoshenki: mithro: i think tim should flash his mimas and see if it's flakey for him11:29
mithroMaybe we should dump the existing PIC firmware before doing that? :-P11:29
jimmomithro: i wasn't sure how to do that -- in 5 seconds of looking couldn't see the option on mphidflash11:30
mithrojimmo: I wonder if I can do it with the pickit311:31
mithroI'm going to pop-down to the maker space and solder some headers onto the ICSP and FW up headers11:32
jimmomphidflash can verify, so i assume that means it can read, but it'd be a hassle to make it dump out as hex etc11:32
mithroheaders soldered11:40
mithrojimmo: were did you get the mphidflash from?11:45
jimmogoogle code, then compiled it11:46
mithromd5sum prebuilt/numato-mimasv2-pic-firmware.production.hex11:48
mithro9a83bc9687683e09db7d396a0fce5015  prebuilt/numato-mimasv2-pic-firmware.production.hex11:48
mithrojimmo: Well, I have two serial ports now :-P11:50
mithrojimmo: which way around are the PROG/COMM poarts?11:52
jimmoSPI is first, UART is second11:52
mithroflashing away....12:00
mithroworked okay the first time...12:04
mithroShall I try a few more times?12:04
mithroNot having to change the switch is magic! :-P12:05
mithroanyone know lm32 asm? :-P12:10
jimmoyeah plz try a few times12:11
jimmoso it worked for gateware and firmware?12:11
mithro"make image-flash"12:11
mithroAnyone able to figure out the correct way to do a "goto <address>" in lm32 assemble from ?12:13
tpbTitle: opcodes/lm32-asm.c - native_client/nacl-binutils - Git at Google (at
mithroActually seems more useful12:15
tpbTitle: opcodes/lm32-desc.c - native_client/nacl-binutils - Git at Google (at
jimmo"b r0"12:15
mithrob r0 is to branch to the value of r0 ?12:15
mithrobi <value>12:16
jimmooh <address> is an immediate, yeah, "bi"12:17
mithrojimmo: It seems to have worked every time so far12:26
jimmoloooooooooooooool i'm pretty sure i figured it out12:29
jimmoalso fixing this will make spi programming about 2x faster12:30
mithroshenki / jimmo: Is there a better way to do this?12:31
jimmodo what?12:35
tpbTitle: debian Pastezone (at
jimmoi thought there was a sprintf-style thing for __asm12:40
jimmomaybe like the clobber syntax12:41
mithroit's "bi $call" where as other things which take imm seem to be "addi $r1,$r0,$imm" ...12:41
mithro(dnop call      "call offset"           () h-iaddr      f-call)12:43
mithro(dni bi "branch immediate" ()12:44
mithro        "bi $call"12:44
mithro        (+ OP_BI call)12:44
mithro        (set pc (ext SI call))12:44
mithro        ()12:44
jimmomaybe you should clarify what your question is? the STRINGIFY macro?12:44
jimmoor just whether it will work at all?12:44
mithrojimmo: Two different problems, STRINGIFY maco + actually making the ASM work :-P12:45
jimmofyi, the thing i'm thinking of is something like __asm("bi %0" : "=i"(CONFIG_CPU_RESET_ADDR)) maybe12:46
mithroI think I might want something like "mvi r0, <value>; b r0" ?12:47
jimmoif you want to do the register version (not sure why), then __asm("b %0" : "=r"(CONFIG_CPU_RESET_ADDR))12:48
mithrojimmo: bi seems to take an offset and I have an absolute value12:49
jimmo(set pc (ext SI call))12:50
jimmodoesn't look like an offset in the docs?12:50
mithroHrm, maybe you are right - it doesn't work however :-P12:51
jimmo__asm("bi %[addr]" : : [addr]"i"(CONFIG_CPU_RESET_ADDR));12:58
jimmowhen i compile that I get "bi 0"12:59
jimmocan be simplieifed to __asm("bi %0" : : "i"(CONFIG_CPU_RESET_ADDR));12:59
jimmomithro: i declare the script a miracle that it works at all13:01
shenkijimmo: oh oh what did you figure out?13:01
jimmoshenki: on your next try, please try changing IN_BUFFER_FLUSH_DELAY13:01
jimmoor more generally marvel at the incredible hack that that constant represents13:02
mithrojimmo: Do you have a thermal gun?13:02
jimmohot air gun?13:02
jimmoi.e. reflow13:02
jimmoshenki: if i set that to zero, then i flash a lot faster but a lot less reliable. so maybe if you try increasing it13:03
mithrojimmo: I mean like a thermal camera type thingy13:03
jimmonot a camera, just a point-temperature, yes13:03
shenkijimmo: ok13:04
jimmoshenki: the problem is that unless you keep reading from the port, the PIC stops being able to TX. and unless it can TX, it doesn't try and read more13:04
shenkimithro: re: doing your jump, take a look at this commit:
tpbTitle: firmware: Create simplified firmware · shenki/[email protected] · GitHub (at
jimmoshenki: but becaues this code doesn't actually ever look at the replies, it has to rely on Flush to unblock the buffer13:04
shenkimithro: the boot_helper macros13:05
shenkijimmo: ohh. oops. so it's all the host's fault?13:05
jimmomithro: did that syntax work?13:05
jimmoshenki: it's just a crap protocol - one dropped packet and the whole thing fails13:06
shenkijimmo: ok13:06
jimmoi'll write something better now i know how it works13:06
jimmobut in hte meantime, i'd be curious to know if messing with that delay improves anything13:07
shenkiso we have things like openocd on the host. could we implement something that it already knows how to talk to on the pic side?13:07
mithroshenki: We can't as the FPGA's jtag lines aren't connected to the PIC13:08
mithroshenki: I think we should make the PIC know how to program the SPI flash and then just xmodem the firmware to it13:08
shenkiok. but xmodem doesn't have a "reset the FPGA" command13:08
mithroI was suggesting we steal xobs' stuff
tpbTitle: chibios-netvcr/src at netvcr · xobs/chibios-netvcr · GitHub (at
mithroshenki: I think the PIC could provide a cmd line interface like the TOFE LSIO board does13:09
shenkiok. more custom stuff13:09
shenkii was suggesting we implement something that the tools already know how to speak13:09
mithroonce we are happy with it, I'm going to convince numato to put it on a stock one13:09
mithroshenki: Well, we could use flterm...13:10
shenkithat's an argument against it :P13:10
mithroshenki: ?13:10
shenkiflterm is annoying to use with micropython dev as it doesn't implement proper line endings13:11
shenkibecause of that i dislike it13:11
mithroshenki: More micropython doesn't accept unix line endings13:11
shenkiok. i've not looked into why it doesn't work13:12
mithroshenki: I'm pretty sure that is what is going on13:13
jimmosurely there are other spi-flash-over-serial programmers out there?13:14
jimmoi don't really understand why we can't use openocd?13:15
shenkii think we should. what we'd need is a stub that runs on the PIC to take whatever openocd is speaking and do stuff with it13:15
shenkijimmo: changing the delay from 0.05 to 0.10 got it to 97%13:16
mithroI need to head home13:16
jimmomaybe try changing FlushInBuffer to do it twice or something?13:16
*** upy-fpga-bot has joined #upy-fpga13:16
upy-fpga-bot[upy-fpga-litex-gateware] mithro pushed 1 new commit to nextgen:
upy-fpga-botupy-fpga-litex-gateware/nextgen ab27f57 Tim 'mithro' Ansell: Temporary hack for Jimmo's MimasV2 change.13:16
*** upy-fpga-bot has left #upy-fpga13:16
mithroshenki: Oh - actually that could work if openocd programs the SPI flash directory (rather then using the normal flash_proxy method)13:17
shenkijimmo: changing it to 0.01 made it go really fast, but failed at 62%13:17
mithroshenki: But I actually think the xmodem method is viable because I plan to make the normal firmware support replacing it self using that too13:17
shenkii will look at FlushInBuffer13:18
mithroIf you set "export JIMMO=1" you should get make targets which work with Jim's stuff13:18
shenkihaha, hax. nice.13:18
mithrohorrible horrible hack but I need to run home and put stuff in the drier13:18
mithroshenki: Could you make your reboot-helper change just work in the normal firmware without deleting everything? :-P13:19
mithrobe back in 3013:19
mithroshenki: BTW "export CPU=or1k" :-P13:20
shenkii was thinking you could use the macro to put the jump location into a register, so you can use it to jump to whatever function you want13:21
shenkiit's kinda hacky. i assume the lm32 ABI says which args go in which regs, but it might not gaurntee13:21
jimmomithro: did the inline asm syntax i gave you work?13:21
shenkiyou should use jimmo's inline asm13:21
shenkithat's the not-noob way of doing it13:22
shenkijimmo: changing my FlushInBuffer to look like this worked with a 0.01 delay:13:22
shenki                time.sleep(IN_BUFFER_FLUSH_DELAY)13:22
shenki                self.PortObj.flushInput()13:22
shenki                time.sleep(IN_BUFFER_FLUSH_DELAY)13:22
shenki                self.PortObj.flushInput()13:22
jimmoworked first time?13:22
jimmoso that's both faster and more reliable :D13:23
shenkiyeah, it worked the one time i tried it13:23
shenkishit it!13:23
shenkiship it!13:23
shenkiwoot, my python still works13:24
shenki>>> one = litex.LED(1)13:24
shenki>>> one.on()13:24
shenkimakes leds flash13:24
shenkiyay for no bitrott13:24
mithroshenki: I believe they might even be the right way around now?13:25
* mithro is walking home13:25
shenkii'm pretty sure they were the right way around when i last tested?13:25
shenkimaybe not13:25
mithroYay mobile phones13:25
shenkimithro: i have your mimasv2: Fixing the reset button. commit but the reset button still does not work13:29
mithroIt does for me...13:29
mithroYou pressing the push button labelled sw6?13:30
mithroAnd how are you testing?13:30
shenkiyes, i am13:31
shenkiim looking at the uart and pressing SW613:31
mithroDo you have any prompt already?13:31
shenkidid you fix the makefile rules so programming generates the programming file?13:31
shenkiif not, i might have had old gateware13:31
mithroBut gateware building is always manual13:32
shenkirebuilding my gateware to be sure13:32
mithroThen 'make image-flash'13:33 is pretty verbose13:34
shenkithat's an understatement13:34
shenkijimmo: doh, died on 10%13:35
shenkiworked on second go13:37
mithroReset working?13:38
mithroshenki: Yay!13:43
* mithro is at home now13:43
shenkimithro: so you think the sd card would be a good thing to look at next?13:48
mithroshenki: Yeah13:57
mithroshenki: Did I link you florent's stuff?13:58
tpbTitle: GitHub - enjoy-digital/sdcard_test: SDCard core test with LiteX (at
mithroFirst step would be reading bytes of an sdcard :-)13:58
mithrosdcard will be useful for both the HDMI2USB stuff and the micropython stuff14:00
mithrowell, bed time for me14:20
*** _florent_ has joined #upy-fpga20:10
*** tsukasa_au has joined #upy-fpga22:31

Generated by 2.13.1 by Marius Gedminas - find it at!