*** tpb has joined #timvideos | 00:00 | |
*** sb0 has joined #timvideos | 02:41 | |
*** rohitksingh_work has joined #timvideos | 03:50 | |
*** thaytan_ has joined #timvideos | 04:09 | |
*** thaytan has quit IRC | 04:13 | |
paddatrapper | mithro: are you available in about 2 hours or so to help debug that Opsis audio issue? | 04:20 |
---|---|---|
mithro | paddatrapper: should be | 04:25 |
*** cr1901_modern1 has joined #timvideos | 05:31 | |
*** cr1901_modern has quit IRC | 05:34 | |
*** thaytan_ is now known as thaytan | 06:07 | |
*** ChanServ sets mode: +v thaytan | 06:07 | |
paddatrapper | mithro: ping? | 06:16 |
paddatrapper | mithro: wireshark's output is interesting. Looks like the SET_INTERFACE response is only being sent much later (around 5ms I think, could be 5s) | 06:33 |
mithro | paddatrapper: pong | 06:34 |
mithro | paddatrapper: Lets get me exactly what you have first? | 06:34 |
paddatrapper | mithro: loading the audio-data branch of the audio firmware to the Opsis: dmesg returns, after enumerating the device: | 06:36 |
paddatrapper | [54530.562008] usb 2-3: 1:1: usb_set_interface failed (-110) | 06:36 |
mithro | paddatrapper: Okay - what am I checking out and what am I building? | 06:36 |
paddatrapper | mithro: checkout audio-data branch from my repo, cd audio && make | 06:37 |
mithro | paddatrapper: Which version of sdcc are you using? | 06:38 |
paddatrapper | mithro: SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.5.0 #9253 (Mar 19 2016) (Linux) | 06:38 |
mithro | paddatrapper: How did you get that? | 06:38 |
paddatrapper | mithro: Debian repos | 06:38 |
paddatrapper | for unstable | 06:39 |
mithro | The version I get is "SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.3.0 #8604 (Dec 30 2013) (Linux)" | 06:39 |
mithro | paddatrapper: So, we should probably both use the sdcc version in conda | 06:39 |
paddatrapper | mithro: but would that be the issue when the Atlys and FX2 both work fine? | 06:40 |
paddatrapper | how do I get the version you are running? | 06:40 |
mithro | paddatrapper: I'm not going to try and debug an issue unless we have an identical setup first | 06:40 |
paddatrapper | ok | 06:40 |
mithro | paddatrapper: I guess we should have a script to setup the conda env? | 06:41 |
paddatrapper | mithro: what is the conda env? | 06:41 |
mithro | paddatrapper: Like a Python virtualenv but with binaries | 06:42 |
paddatrapper | mithro: ah cool. there are no scripts like that in the FX2 firmware repo | 06:42 |
mithro | paddatrapper: I'm adding one now - hold on a second | 06:42 |
mithro | paddatrapper: https://github.com/timvideos/HDMI2USB-fx2-firmware/pull/39 | 06:53 |
tpb | Title: Adding conda environment. by mithro · Pull Request #39 · timvideos/HDMI2USB-fx2-firmware · GitHub (at github.com) | 06:53 |
mithro | paddatrapper: How does that look? | 06:55 |
paddatrapper | mithro: running it at the moment | 06:55 |
paddatrapper | downloading SDCC version 3.6.0.961 | 06:56 |
Ishan_Bansal | mithro : ping | 06:57 |
paddatrapper | SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.6.0 #9615 (Linux) | 06:58 |
paddatrapper | mithro: though it probably should be in the common Makefile | 06:59 |
mithro | Hi Ishan_Bansal | 07:13 |
mithro | I'm just helping paddatrapper at the moment | 07:13 |
Ishan_Bansal | mithro : NP | 07:13 |
Ishan_Bansal | I am free till 2:00 PM | 07:13 |
mithro | Ishan_Bansal: I will look at your pull request again soon. | 07:13 |
mithro | paddatrapper: Take a look at the pull request now? | 07:14 |
Ishan_Bansal | mithro : thanks :) | 07:14 |
mithro | paddatrapper: It that looks good we can go onto trying to fix your bug :-P | 07:17 |
paddatrapper | mithro: looks good to me | 07:17 |
paddatrapper | \o/ | 07:17 |
mithro | paddatrapper: You should also be able to do a "make clean; make" now and get everything built.... | 07:18 |
mithro | paddatrapper: Can you push the latest version of audio-data with the stuff merged? | 07:18 |
paddatrapper | mithro: yeah I saw that, very handy | 07:18 |
paddatrapper | mithro: rebased | 07:19 |
paddatrapper | mithro: so I'm now building using sdcc v3.6.0 | 07:23 |
mithro | paddatrapper: Hopefully, if we have things working correctly... | 07:23 |
mithro | paddatrapper: It comes from -> https://github.com/timvideos/conda-hdmi2usb-packages | 07:23 |
tpb | Title: GitHub - timvideos/conda-hdmi2usb-packages: Conda build recipes for the toolchains needed by LiteX / MiSoC firmware (at github.com) | 07:23 |
paddatrapper | mithro: I had the Makefile print the version out for each file compiled | 07:24 |
mithro | paddatrapper: Okay, so what next? I'm at commit f7419256579e9940ba7cca1fc6f51fab4b411a2f | 07:26 |
mithro | paddatrapper: make firmware-audio-fx2 ? | 07:26 |
paddatrapper | mithro: cd audio && make load | 07:26 |
paddatrapper | or that works too | 07:26 |
paddatrapper | by default it builds for Opsis | 07:26 |
mithro | paddatrapper: So what should be happening? http://pastebin.ubuntu.com/25368012/ | 07:34 |
tpb | Title: Ubuntu Pastebin (at pastebin.ubuntu.com) | 07:34 |
paddatrapper | mithro: that is more promising than what I get: http://paste.debian.net/982476/ | 07:39 |
tpb | Title: debian Pastezone (at paste.debian.net) | 07:39 |
paddatrapper | and I'm working off the same commit, with a clean working tree | 07:40 |
mithro | paddatrapper: Still seems to be working for me? | 07:44 |
paddatrapper | mithro: any idea why we would get different results? | 07:45 |
mithro | paddatrapper: I can think of plenty of reasons | 07:45 |
mithro | Linux tansell.syd.corp.google.com 4.4.0-83-generic #106~14.04.1-Ubuntu SMP Mon Jun 26 18:10:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux | 07:45 |
mithro | But kernel version differences are the most likely | 07:46 |
mithro | paddatrapper: How do you capture the wireshark output? | 07:46 |
mithro | paddatrapper: Should we compare them? | 07:46 |
paddatrapper | Linux kyle-laptop 4.12.0-1-amd64 #1 SMP Debian 4.12.6-1 (2017-08-12) x86_64 GNU/Linux | 07:46 |
mithro | paddatrapper: Could also be that I'm using a hub | 07:46 |
paddatrapper | mithro: wireshark I do using usbmon as the interface | 07:47 |
mithro | paddatrapper: Sure, I just want to make sure that I'm doing the same thing you are... | 07:47 |
paddatrapper | mithro: cool. yeah I do that and add filters as necessary (generally USB.address) | 07:47 |
mithro | paddatrapper: Assume I know nothing and tell me what to do | 07:48 |
paddatrapper | mithro: sudo modprobe usbmon | 07:48 |
paddatrapper | sudo wireshark | 07:48 |
paddatrapper | Once open, start capture on usbmonX, where X is the bus number that the Opsis is on | 07:49 |
paddatrapper | With capture running: make load from the audio directory | 07:49 |
paddatrapper | once loaded and a little time has passed, stop capture and examine | 07:49 |
mithro | paddatrapper: Should I restart my opsis in some way? | 07:49 |
paddatrapper | mithro: before capture, yes | 07:50 |
mithro | paddatrapper: Oh - my Opsis doesn't have working firmware on it at the moment, the device just comes up as the failsafe device - 5440 | 07:50 |
paddatrapper | mithro: ah ok. I'm currently working off one flashed with debconf17 firmware | 07:51 |
*** Joelw has quit IRC | 07:52 | |
mithro | paddatrapper: Well, maybe you should get me to flash the debconf17 firmware first? | 07:52 |
paddatrapper | So I wait for it to come up as an HDMI2USB video device fully before loading | 07:52 |
*** Joelw has joined #timvideos | 07:52 | |
paddatrapper | mithro: that is probably a good idea. debconf17 branch: https://github.com/timvideos/HDMI2USB-litex-firmware/tree/debconf17 | 07:53 |
tpb | Title: GitHub - timvideos/HDMI2USB-litex-firmware at debconf17 (at github.com) | 07:53 |
mithro | paddatrapper: I assume I want the prebuilt version? | 07:53 |
paddatrapper | mithro: I wasn't aware there was one | 07:54 |
mithro | paddatrapper: https://github.com/timvideos/HDMI2USB-firmware-prebuilt/tree/master/archive/debconf17 | 07:54 |
tpb | Title: HDMI2USB-firmware-prebuilt/archive/debconf17 at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at github.com) | 07:55 |
mithro | paddatrapper: I assume your using one of them? | 07:55 |
paddatrapper | mithro: v0.0.3-742-g9eb83b4 | 07:55 |
mithro | https://github.com/timvideos/HDMI2USB-firmware-prebuilt/tree/master/archive/debconf17/v0.0.3-742-g9eb83b4/opsis/hdmi2usb/lm32 ? | 07:56 |
tpb | Title: HDMI2USB-firmware-prebuilt/archive/debconf17/v0.0.3-742-g9eb83b4/opsis/hdmi2usb/lm32 at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at github.com) | 07:56 |
paddatrapper | mithro: version run off Opsis: http://paste.debian.net/982477/ | 07:56 |
tpb | Title: debian Pastezone (at paste.debian.net) | 07:56 |
paddatrapper | mithro: I'm not sure... tumbleweed built and managed the version we ran | 07:57 |
paddatrapper | mithro: I would guess it would be https://github.com/timvideos/HDMI2USB-firmware-prebuilt/tree/master/archive/debconf17/v0.0.3-742-g9eb83b4/opsis/hdmi2usb/lm32/software/firmware | 07:58 |
tpb | Title: HDMI2USB-firmware-prebuilt/archive/debconf17/v0.0.3-742-g9eb83b4/opsis/hdmi2usb/lm32/software/firmware at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at github.com) | 07:58 |
mithro | Okay, reflashing with that firmware | 08:00 |
mithro | paddatrapper: Now I need to find a jumper, apparently I have my FX2 disconnected from the reset... | 08:09 |
paddatrapper | mithro: if it worked with your unflashed opsis, then it must be something that the video firmware sets that I don't unset or reset properly. That explains why the dev board and atlys worked - they start up by default unflashed | 08:10 |
mithro | paddatrapper: http://pastebin.ubuntu.com/25368180/ | 08:11 |
tpb | Title: Ubuntu Pastebin (at pastebin.ubuntu.com) | 08:11 |
mithro | paddatrapper: That look right? | 08:11 |
paddatrapper | mithro: nope, both gateware and firmware have different hashes | 08:13 |
paddatrapper | looking again at the pre-built repo, none of those versions correspond with the one flashed on this Opsis | 08:13 |
mithro | paddatrapper: Well, that is unfortunate. Maybe you should flash this version too? | 08:14 |
paddatrapper | mithro: yeah. will do | 08:14 |
paddatrapper | mithro: how do I flash using the mode-switch? | 08:14 |
mithro | hdmi2usb-mode-switch --flash-image flash.bin | 08:15 |
mithro | you'll need openocd | 08:15 |
paddatrapper | mithro: ok cool. yeah I have openocd | 08:16 |
paddatrapper | mithro: --flash-image isn't a valid option | 08:18 |
paddatrapper | mithro: never mind, conda version has it | 08:19 |
paddatrapper | mithro: OpenOCD - Error: Can't find board/numato_opsis.cfg | 08:24 |
mithro | paddatrapper: "conda install openocd" | 08:24 |
mithro | paddatrapper: still seems to work? | 08:26 |
mithro | oh wait, no it doesn't.... | 08:26 |
mithro | paddatrapper: http://pastebin.ubuntu.com/25368236/ | 08:27 |
tpb | Title: Ubuntu Pastebin (at pastebin.ubuntu.com) | 08:27 |
mithro | paddatrapper: So today you learn that initial conditions matter :-P | 08:27 |
mithro | paddatrapper: When I plug in the opsis, my audio goes away :-) | 08:28 |
mithro | paddatrapper: I'm going to head to dinner | 08:29 |
mithro | paddatrapper: I'll be back in an hour | 08:30 |
paddatrapper | mithro: ok cool | 08:30 |
paddatrapper | mithro: seems my flash was unsuccessful | 08:31 |
mithro | paddatrapper: Oh? did you power cycle after flashing? | 08:31 |
paddatrapper | mithro: yup, trying again | 08:31 |
mithro | paddatrapper: https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/getting-started.md#common-errors | 08:32 |
tpb | Title: HDMI2USB-litex-firmware/getting-started.md at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 08:32 |
paddatrapper | mithro: Flash still failing, tried the jtag/serial suggestion | 08:40 |
paddatrapper | http://paste.debian.net/982486/ | 08:40 |
tpb | Title: debian Pastezone (at paste.debian.net) | 08:40 |
*** aeroaks has joined #timvideos | 08:58 | |
*** aeroaks has quit IRC | 08:59 | |
*** rohitksingh_work has quit IRC | 09:13 | |
mithro | paddatrapper: Back now | 09:18 |
paddatrapper | mithro: cool | 09:19 |
mithro | paddatrapper: https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/getting-started.md#warn-bypassing-jtag-setup-events-due-to-errors | 09:19 |
tpb | Title: HDMI2USB-litex-firmware/getting-started.md at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 09:19 |
paddatrapper | mithro: did that, didn't help | 09:20 |
mithro | paddatrapper: How many times did you try? | 09:20 |
paddatrapper | mithro: 2 or 3 | 09:20 |
mithro | paddatrapper: Did you try power cycling the board? | 09:23 |
paddatrapper | mithro: yup | 09:23 |
mithro | paddatrapper: Are you working inside a VM? | 09:23 |
paddatrapper | mithro: no, bare metal | 09:24 |
mithro | paddatrapper: Can you give me a log of exactly what you did? | 09:24 |
mithro | And make sure you are not using the debian packaged version | 09:24 |
mithro | please uninstall that | 09:24 |
paddatrapper | uninstalled, just waiting for flash-image to finish running | 09:28 |
mithro | paddatrapper: You can tell if it is working by the DNA it prints | 09:28 |
paddatrapper | mithro: it hasn't got that far yet | 09:28 |
paddatrapper | mithro: currently the only output is WARNING:root:unbind-helper not found, will have to run as root! | 09:29 |
mithro | paddatrapper: Did you run with --verbose? | 09:29 |
*** rohitksingh_work has joined #timvideos | 09:32 | |
paddatrapper | mithro: http://paste.debian.net/982495/ | 09:34 |
tpb | Title: debian Pastezone (at paste.debian.net) | 09:34 |
mithro | paddatrapper: Can you run each step with --verbose and also you should try doing the flash, then switch to serial, then try the flash again | 09:35 |
paddatrapper | mithro: yay, that seems to be working (switching to serial and then flashing) | 09:40 |
paddatrapper | mithro: ok. flashed | 09:43 |
paddatrapper | version matches yours | 09:43 |
mithro | paddatrapper: Okay | 09:46 |
mithro | paddatrapper: You might also want to try moving jumper JFX2-RST from Pins 2-3 to Pins 1-2 and then loading your audio | 09:46 |
paddatrapper | mithro: just pushed an update to how the enpoint config is writen. Doesn't fix the issue, but the TRM recommends not changing the config when invalidating an endpoint | 09:47 |
paddatrapper | mithro: ok will try that | 09:47 |
paddatrapper | mithro: and it is working! | 09:48 |
paddatrapper | what does that reset jumper do? | 09:48 |
mithro | paddatrapper: That jumper prevents the gateware from loading firmware onto the FX2 | 09:48 |
paddatrapper | mithro: ok. So there is still something that the video firmware is configuring that I am not resetting | 09:49 |
mithro | paddatrapper: Sounds like it | 09:49 |
mithro | paddatrapper: You could try loading the video firmware onto the FX2 board and then loading your audio firmware and see if you get the same behaviour... | 09:50 |
paddatrapper | mithro: good idea. Will try that | 09:50 |
paddatrapper | mithro: it fails to set the interface | 09:52 |
mithro | paddatrapper: Well that is good I guess? | 09:52 |
paddatrapper | mithro: yup, means I don't have to go insane while debugging this :) | 09:52 |
mithro | paddatrapper: What do you mean go? ;-) | 09:53 |
paddatrapper | mithro: good point... | 09:53 |
*** rohitksingh_wor1 has joined #timvideos | 09:57 | |
mithro | paddatrapper: So where are we at with everything? | 09:57 |
paddatrapper | mithro: I need to start working on the final report. audio firmware - works on everything as long as there is no previous firmware on the chip. loopback device - need to figure out how to write to the slave FIFO, my code for reading from it _should_ work | 09:59 |
*** rohitksingh_work has quit IRC | 09:59 | |
paddatrapper | audio firmware works meaning that it generates a tone | 09:59 |
mithro | paddatrapper: So you haven't gotten the master fifo stuff working? | 10:24 |
*** Kripton has quit IRC | 11:01 | |
*** nikivi has quit IRC | 11:02 | |
*** shenki has quit IRC | 11:02 | |
*** jea has quit IRC | 11:03 | |
*** jea has joined #timvideos | 11:04 | |
*** Kripton has joined #timvideos | 11:05 | |
*** nikivi has joined #timvideos | 11:06 | |
*** shenki has joined #timvideos | 11:10 | |
*** ChanServ sets mode: +v shenki | 11:10 | |
paddatrapper | mithro: sorry got pulled into a meeting. No I haven't | 11:21 |
mithro | paddatrapper: And you haven't worked on any of the other ideas? | 11:25 |
paddatrapper | mithro: haven't had a chance. DebConf has set me back a lot... | 11:34 |
mithro | okay, you didn't get much done project wise at DebConf? | 11:35 |
*** twoolie has joined #timvideos | 11:41 | |
paddatrapper | mithro: I got to test on various pieces of hardware and then equipment arrived, setup happened and I had to fight fires | 11:44 |
mithro | paddatrapper: What fires did you guys end up with? | 11:44 |
paddatrapper | mithro: We had the venue providing audio in the main talk room, so battled with levels in there a lot. general lack of volunteers and the usual dead batteries and people forgetting to turn things on | 11:46 |
paddatrapper | mithro: could you explain this #define to me? | 11:49 |
paddatrapper | https://github.com/timvideos/HDMI2USB-fx2-firmware/blob/master/hdmi2usb/cdc-config.h#L8 | 11:49 |
tpb | Title: HDMI2USB-fx2-firmware/cdc-config.h at master · timvideos/HDMI2USB-fx2-firmware · GitHub (at github.com) | 11:49 |
paddatrapper | used with https://github.com/timvideos/HDMI2USB-fx2-firmware/blob/master/hdmi2usb/to-uart.c#L59 | 11:50 |
tpb | Title: HDMI2USB-fx2-firmware/to-uart.c at master · timvideos/HDMI2USB-fx2-firmware · GitHub (at github.com) | 11:50 |
mithro | paddatrapper: https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html | 11:50 |
tpb | Title: The C Preprocessor: Concatenation (at gcc.gnu.org) | 11:50 |
paddatrapper | ah thanks | 11:51 |
*** twoolie has quit IRC | 11:51 | |
*** sb0 has quit IRC | 11:55 | |
*** twoolie has joined #timvideos | 12:18 | |
paddatrapper | mithro: fixed the firmware - switched to endpoint 8, as that is what will be used in the final firmware anyway and found a off by one error in the set_interface handler | 12:21 |
*** twoolie has quit IRC | 12:22 | |
*** tsglove has quit IRC | 12:38 | |
*** rohitksingh_wor1 has quit IRC | 12:43 | |
mithro | paddatrapper: When building on travis, which boards do you build for? | 12:50 |
paddatrapper | mithro: Opsis | 13:10 |
paddatrapper | mithro: can be changed using BORD={atlys,fx2miniboard} | 13:11 |
paddatrapper | I've got to head out for a site visit. I'll be back later | 13:11 |
mithro | We should build for all 3 | 13:12 |
cr1901_modern1 | mithro: API is fully documented (phew) https://www.wdj-consulting.com/libmodem/ | 13:26 |
tpb | Title: libmodem: Main Page (at www.wdj-consulting.com) | 13:26 |
*** cr1901_modern1 is now known as cr1901_modern | 13:26 | |
cr1901_modern | mithro: So the reason for doing this is so whenever we get to this point, it's "simple" to add PIC and FX2 support | 13:29 |
cr1901_modern | Now to work on SFL receiver | 13:30 |
*** tsglove has joined #timvideos | 14:12 | |
*** rohitksingh has joined #timvideos | 14:21 | |
paddatrapper | mithro: working on the final report here: https://docs.google.com/document/d/16eDShtKzo70vBi_XYxIYivrKqvq-xRCOFcRqp2E75Yc/edit?usp=sharing | 14:38 |
tpb | Title: GSoC Project Report - Google Docs (at docs.google.com) | 14:38 |
*** sb0 has joined #timvideos | 15:43 | |
*** CarlFK has quit IRC | 16:24 | |
tumbleweed | paddatrapper: that version should have been the one that was flashed | 16:52 |
paddatrapper | tumbleweed: git hashes didn't match. Maybe commits that didn't make it upstream or something was upstreamed after it was flashed | 17:13 |
tumbleweed | it could have been an earlier build of that branch | 17:13 |
tumbleweed | but then that should have made the prebuilt repo... | 17:14 |
*** sb0 has quit IRC | 17:37 | |
*** rohitksingh has quit IRC | 18:22 | |
*** sb0 has joined #timvideos | 19:39 | |
*** CarlFK has joined #timvideos | 21:21 | |
*** ChanServ sets mode: +v CarlFK | 21:21 | |
mithro | cr1901_modern: so where is the xmodem functionality at? | 22:22 |
mithro | cr1901_modern: did you get distracted by build systems? | 22:23 |
cr1901_modern | mithro: It's functional on mimasv2 | 22:23 |
cr1901_modern | The plan was to write the SFL loader tonight | 22:23 |
cr1901_modern | mithro: I spent the last day writing documentation lol | 22:23 |
cr1901_modern | mithro: https://www.wdj-consulting.com/libmodem/ | 22:24 |
tpb | Title: libmodem: Main Page (at www.wdj-consulting.com) | 22:24 |
mithro | paddatrapper: btw if you write up a specification for how the FPGA side of the FIFO should work, I'll write you FPGA gateware that follows it | 22:24 |
mithro | paddatrapper: I basically need "these pins should toggle in this order and have this data" (I think it should be as simple as, provide data on the port X, toggle clock, check if FIFO full flag is set, otherwise repeat - where the data is some type of PCM audio?) | 22:26 |
cr1901_modern | mithro: The last things to work on are SFL, and quad SPI flash, and QEMU timer (I get xmodem support for free if the latter two work.) | 22:30 |
mithro | cr1901_modern: so, with your libmodem - I wanted to mention that on the PIC / FX2 you don't really have any RAM so you have to do the decoding "in place" basically reading from the data store in the USB buffer RAM and use it right away | 22:32 |
mithro | (you also don't want to be dynamically allocating ram either - IE no malloc) | 22:33 |
mithro | cr1901_modern: dunno if that fits with what your lib can do? | 22:33 |
cr1901_modern | mithro: The library doesn't malloc | 22:34 |
mithro | cr1901_modern: oh, you also need to compile with sdcc.. | 22:34 |
cr1901_modern | mithro: Define in-place. For instance, if I use xmodem, I need to accept 128 (+4) bytes at once before writing them. There's no way around that w/ xmodem, since only 128 byte packets are verified | 22:35 |
cr1901_modern | mithro: I don't need _more_ than 128+4 bytes for buffers, but if I can't buffer at least that much data, then we need a new, smaller protocol. | 22:36 |
cr1901_modern | (one that only buffers, say, 16 bytes or something before writing them) | 22:36 |
mithro | Why do you need to buffer 128 bytes? | 22:37 |
cr1901_modern | mithro: Oh wait... I don't, you're right. | 22:37 |
cr1901_modern | mithro: Give me a minute to think please | 22:38 |
mithro | cr1901_modern: no worries - I think you need 128 bytes if you want to do something like check the packet before writing it - but if you are happy to write it and then just report the error and start again you should only need a couple of bytes, right? | 22:39 |
cr1901_modern | mithro: Yes, and that's fine as long as I'm not writing to flash I imagine. Nothing in principle prevents supporting this, but right now the xmodem impl doesn't support what you're asking for. The impl expects to receive a full buffer of data and verify it before writing. | 22:41 |
cr1901_modern | I figured 128 bytes would be small enough for this not to be a concern. Guess not lol | 22:41 |
mithro | I think the pic only has order of 256 bytes of data memory IIRC | 22:43 |
cr1901_modern | How much of it is used? | 22:44 |
mithro | Dunno, but I'm pretty sure that we don't want to use 128 of 256 on an xmodem buffer.. | 22:45 |
mithro | The FX2 has 16k of ram but all the code has to fit in that too | 22:46 |
mithro | Stupid low memory devices :-P | 22:46 |
cr1901_modern | Well, prob the easiest method to do this is to add a "size hint" parameter to xmodem_rx (only do rx for now) | 22:47 |
cr1901_modern | and each time the data_out callback is called, it receives a "buf_size" of "size_hint" | 22:48 |
cr1901_modern | Only problem is I don't know how to calculate CRC16 "n" bytes at a time | 22:49 |
cr1901_modern | mithro: Again I need to think about this. It would be potentially very ugly to attempt to graft these features into the current working implementation. | 22:53 |
mithro | cr1901_modern: the crc16 function just loops over the bytes updating a couple of values | 22:55 |
mithro | You just hoist the values into globals and call the crc calc as you get the bytes | 22:56 |
mithro | paddatrapper: is your report mostly empty at the moment? | 22:56 |
mithro | cr1901_modern: so, how do I test the mimasv2 stuff? | 23:01 |
*** sb0 has quit IRC | 23:05 | |
mithro | Bblr | 23:06 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!