Sunday, 2017-08-20

*** tpb has joined #timvideos00:00
*** tangrs has quit IRC00:20
*** tangrs has joined #timvideos00:32
*** CarlFK has joined #timvideos00:57
*** ChanServ sets mode: +v CarlFK00:57
mithroIshan_Bansal: sorry, I got home last night and feel asleep on the couch01:10
mithroLet's try again today?01:10
*** jea has joined #timvideos01:22
jeatumbleweed: what is tallylight?01:23
cr1901_modernmithro: We need to move .bss to the main_ram region; if we don't I end up with the paradox where the buffers that store the firmware image to be written to flash are stored in the flash image itself. >>01:50
cr1901_modernI am cheating for the time being by specifying a custom section for the firmware image buffers, but it's a hack :/01:50
mithrocr1901_modern: I'm okay with that01:52
mithrojea: Tallylight tells you which camera is currently in use01:52
mithrojea: IE Which camera a person should be looking at01:52
jeamithro: oh ok. I haven’t seen that used before01:53
cr1901_modernmithro: Naturally, as soon as I try using my nifty custom section, the firmware crashes. EDONTCARE01:53
cr1901_modernmithro: Going to swap to .bss now.01:53
mithrojea: Going to hack on the firmware?01:58
jeai should work out the priorities of the issues01:59
cr1901_modernmithro: .bss works fine; my custom section didn't. Go figure :P.02:01
* cr1901_modern ... doesn't care for the nuances of elf02:02
cr1901_modernmithro: We're supposed to specify the CRC the firmware has. How do you calculate it apriori to input to "write spi xmodem [addr] [len] [crc]"?02:34
mithroDunno, maybe? :-P02:35
tpbTitle: Calculate a CRC-32 checksum (at
mithroOr or ?02:35
tpbTitle: CRC calculation (at
cr1901_modernI suppose we should calculate it in the firmware, tbh. XMODEM already provides a CRC check02:35
cr1901_modern(but right now I'm close to actually getting it xfers to work period, so I'll just focus on that)02:36
mithrocr1901_modern: It idea is that you can calculate the crc on the host to make sure that it was transferred correctly....02:36
mithrocr1901_modern: Oh - maybe like this...
tpbTitle: HDMI2USB-mode-switch/ at master · timvideos/HDMI2USB-mode-switch · GitHub (at
cr1901_modernmithro: That's my point; an XMODEM transmitter will calculate a CRC for each 128 byte or 1024 byte block02:38
mithrocr1901_modern: But that assumes your XMODEM code is correct :-P02:39
* cr1901_modern grumbles02:39
cr1901_modernMy code is perfect, there's never any mistakes :D02:40
* cr1901_modern coughs02:40
cr1901_modernmithro: (That's a fair point)02:40
mithrobinascii.crc32(fdata) <-- that is probably what I would use02:41
cr1901_modernmithro: Come to think of it, the firmware.fbi format file provides the length and checksum02:46
cr1901_modernpre calculated*02:46
mithrocr1901_modern: Yes, the bios doesn't....02:46
cr1901_modernmithro: Okay, then I don't understand... what file are you expecting a user to upload over the serial link?02:48
cr1901_modernHDMI2USB.bin, HDMI2USB.fbi, concatenation of bios and HDMI2USB.fbi, or the output of
mithrocr1901_modern: Anything, things like bios/firmware/gateware, things like a config file, pictures etc02:49
cr1901_modernmithro: Okay, so the CRC I generate is for the _entire_ uploaded file02:50
cr1901_modernEven if the file to be uploaded already has a CRC embedded02:50
mithrocr1901_modern: Yes02:50
cr1901_modernmithro: So prob an explanation's in order:
tpbTitle: HDMI2USB-litex-firmware/flash.c at master · cr1901/HDMI2USB-litex-firmware · GitHub (at
cr1901_modernI was under the impression I was supposed to upload "firmware.bin" without the CRC. Then it was my responsibility to add the CRC/len that the Litex BIOS expects when booting02:52
mithrocr1901_modern: There are two ways to do this02:52
mithrocr1901_modern: Upload the file to memory somewhere, calculate/check the crc, *then* write to the flash02:53
cr1901_modernI assume that's what you want?02:55
mithrocr1901_modern: The other way is to write & calculate while uploading and then just report the failure after the case02:55
mithrocr1901_modern: Which is what you need to do on devices which don't have enough memory to buffer the whole thing in memory02:56
cr1901_modernWell, that's what the data_in_fcn callback to xmodem_rx/tx is for02:57
cr1901_modernmithro: I think perhaps I should just calculate on the fly in all cases (though I'm implementing that later)03:00
Ishan_Bansalmithro : ping03:41
mithroIshan_Bansal: Pong03:41
Ishan_Bansalmithro: mithro, I am free today so anything from my side regarding the pull request.03:44
mithroIshan_Bansal: Okay -- I will go look right now03:45
mithroIshan_Bansal: So - looking at the current pull request03:45
mithroIshan_Bansal: Can you do the following03:45
mithroIshan_Bansal: Update the comment to explain what features / functionality this pull request adds03:46
mithroIshan_Bansal: You don't need to tell me which files are edited / added -- I can see that in the "Files changed" tab automatically03:46
mithroIshan_Bansal: What I need is *why* you have added changed the files03:47
cr1901_modernmithro: Fun quiz (when you have a free moment)... what is wrong with this line :D?
tpbTitle: HDMI2USB-litex-firmware/flash.c at master · cr1901/HDMI2USB-litex-firmware · GitHub (at
Ishan_Bansalmithro : sure.03:47
mithrocr1901_modern:        void *memcpy(void *dest, const void *src, size_t n); -- The memory areas must not overlap.03:48
mithrocr1901_modern: Something described there?03:48
mithroIshan_Bansal: Can you do that while I take a quick look over the code?03:48
cr1901_modernactually no, not a problem in this case (buffers are guaranteed to be discontiguous here). But aren't I forgetting to update something in the destination :D?03:49
cr1901_modernI just lost 20 minutes to this T_T03:49
Ishan_Bansalmithro :ya I am working on that only.03:49
mithroIshan_Bansal: The new comments / documentation in this code is looking good!03:50
mithroIshan_Bansal: So, if I understand correctly, once we merge this pull request, you have another one you want to send?03:50
Ishan_Bansalyup, I have RLE branch in my github which I want to send next.03:52
mithroIshan_Bansal: Okay cool. If you fix those description/title right now I'll merge it and we can take a look at your next pull request03:52
mithroWow, OSDC's video's are terrible..... - :-(03:55
Ishan_Bansalmithro : working on that.03:56
mithroIshan_Bansal: poke me again when done...03:56
cr1901_modernmithro: Small problem w/ firmware as-is... for the duration of the xmodem xfer, I have to increase the period of the timer; this slows down the up-time. I have a (possible) workaround tho.03:59
cr1901_modern(I'll describe later)03:59
mithrocr1901_modern: Why?03:59
cr1901_modernmithro: Because xmodem_rx is expected to wait 10 seconds before retransmitting the start char;04:00
mithrocr1901_modern: So?04:01
cr1901_moderndefault period of the timer is 2 seconds; it's not possible to measure an interval of 10 seconds04:01
cr1901_modernWell, at least it's not possible to measure it using the provided elapsed() function by <time.h>*04:01
mithrocr1901_modern: Ummm... if the timer has a period of 2 seconds -- 10 / 2 == 5 -- you just need to fire your thing every 5 timers04:01
cr1901_modernThat's a workaround I haven't impl'ed yet. But let me just get things working period04:02
mithroIshan_Bansal: how goes that?04:24
Ishan_Bansalmithro: I am almost done with that, just 5 more minutes.04:33
cr1901_modernmithro: Arbitrary addresses to flash should be supported, correct?04:39
mithrocr1901_modern: That would be preferred...04:41
cr1901_modernI can only erase SPIFLASH_SECTOR_SIZE at a time, so I have to write a function that preserves before and after the region I want to erase.04:42
mithrocr1901_modern: Starting with something that only works on sector size would be a good start04:43
mithrobe back in 1004:43
Ishan_Bansalmithro : ping04:47
Ishan_BansalI uploaded the new comments for the pull request.04:47
mithroIshan_Bansal: Okay, that looks pretty  good!05:04
mithroIshan_Bansal: I'm going to merge this05:04
mithroIshan_Bansal: Actually - can you update the title before I do?05:04
Ishan_BansalThe one "additional additional files" ?05:09
mithroIshan_Bansal: Yes, the title of the pull request05:10
mithroIshan_Bansal: It should be something like "Adding XYZ functionality" or "First step towards getting XYZ to work" (replace XYZ with the appropriate description...)05:11
Ishan_BansalHow about "Adding frontend for JPEG encoder" ?05:12
mithroIshan_Bansal: Perfect!05:13
Ishan_Bansalmithro : In btw, here is the link to the final GSOC report I am working on :
tpbTitle: GSOC Final Project Report - Google Docs (at
mithroIshan_Bansal: I'll take a look at that in a moment05:16
mithroIshan_Bansal: Merged!05:16
mithroIshan_Bansal: Please get the next pull request up ASAP...05:17
Ishan_Bansalmithro : Till now I just added the heading which I want to write in the final GSOC report. :P05:17
Ishan_Bansal\O/ f05:17
Ishan_Bansalya, I will do that.05:18
mithroIshan_Bansal: If you get the pull request in soon I'll be able to review it now05:18
Ishan_Bansalmithro : I will do that within 1 hour, does that work ?05:20
mithroIshan_Bansal: Unless something comes up I should be around then05:20
cr1901_modernmithro: I went ahead and wrote an arbitrary-start/end erase routine. Am testing it now. I was hoping to get firmware upload working before bed, but idk if it'll happen tonight :/05:34
mithrocr1901_modern: Why didn't you work on the firmware uploading working instead of the erase routine?05:34
cr1901_modernmithro: Because I (mistakenly) though to even upload new firmware in the first place, I'd need the erase routine. Oops ._.05:36
mithrocr1901_modern: Do you have getting the firmware into DDR ram using xmodem working already?05:37
cr1901_modernI'm close however. 2 more compile-upload cycles?05:37
mithrocr1901_modern: That doesn't require any flash stuff to work, right?05:37
cr1901_modernmithro: Oh I misunderstood. Uploading via xmodem into RAM works05:38
mithrocr1901_modern: Writing from RAM into SPI flash doesn't work?05:38
cr1901_modernmithro: Correct, and that's because I forgot to erase the SPI flash before writing it05:39
cr1901_modernmithro: hold on a sec...05:43
cr1901_modernmithro: The two words you've been waiting for: It works.05:49
cr1901_modernPic incoming05:49
tpbTitle: Imgur: The most awesome images on the Internet (at
tpbTitle: Imgur: The most awesome images on the Internet (at
mithrocr1901_modern: I'm actually awaiting the words "Can you review my pull request"05:51
cr1901_modernmithro: Fair enough05:51
mithrocr1901_modern: But it is great to hear that you have gotten progress!06:29
Ishan_Bansalmithro : I have made the pull request.06:34
mithroIshan_Bansal: Just saw your pull request06:34
mithroIshan_Bansal: I'm going to run away for 30-45 minutes to get some afternoon tea and get some more sun before it all disappears, when I get back I'll review it06:35
*** CarlFK has quit IRC06:35
mithroIshan_Bansal: Can you take a look at what codeclimate is complaining about for your CL and see if anything there makes sense to fix?06:35
Ishan_Bansalmithro : I will get to that.06:36
mithroIshan_Bansal: How many pull requests after this one do you have?06:39
cr1901_modernmithro: I consider xmodem support okay for other people to test now (if you wish):
tpbTitle: GitHub - cr1901/HDMI2USB-litex-firmware: A version of the HDMI2USB firmware based around the misoc+migen tools produced by m-labs. (at
cr1901_modernLet me know if there's any issues07:34
cr1901_modern(assuming you wish to test it)07:34
* cr1901_modern retires for the night07:35
mithroIshan_Bansal: I'm back now07:48
mithroIshan_Bansal: Your new pull request has comments08:05
Ishan_Bansalmithro : apart from this I have huffman, bytestuffer and wrapper. So total 3 pull request apart from this.08:25
mithroIshan_Bansal: Okay08:25
mithroIshan_Bansal: Lets try and get atleast 2 more of your pull requests merged tonight?08:30
Ishan_Bansalmithro : I made the changes09:31
mithroIshan_Bansal: Just generally -- comments should explain *why* you are doing things, the code itself explains *what* is actually happening. Unless your code is doing something particularly unusual (For example if you where using using signed number shifting on something that is suppose to be an unsigned number) you shouldn't need to explain explicitly what is going on...09:35
Ishan_Bansalmithro : I will take care of that from now onwards.09:46
mithroIshan_Bansal: No worries, writing good comments is something that takes a lot of coding practice to get good at09:47
mithroIshan_Bansal: Even many people who have been programming for years can struggle with it09:49
Ishan_Bansalmithro: So you are saying writing comments is even harder than writing the code itself. :P09:52
mithroIshan_Bansal: Frequently, yeah09:52
mithroIshan_Bansal: Writing code is in some ways easier because at least you have the "well it actually does the right thing"09:52
mithroIshan_Bansal: But comments don't really have that property09:52
mithroIshan_Bansal: What do you use as your text editor?09:55
mithroIshan_Bansal: BTW Do you know about PEP8?09:57
Ishan_Bansalmithro : For python I use atom, but it general I like to use sublime.09:58
mithroIshan_Bansal: Okay, I'd recommend seeing if there is a way to turn on spell checking in Python comments09:58
mithroIshan_Bansal: Looks like there might be something at
tpbTitle: GitHub - atom/spell-check: Spell check Atom package (at
mithroIshan_Bansal: I'm a terrible speller, if it wasn't for spell checking in computers I you would think I'm like a grade schooler or something :-P10:01
mithroIshan_Bansal: Take a look at "Naming Conventions" section of
tpbTitle: PEP 8 -- Style Guide for Python Code | (at
mithroIshan_Bansal: Generally we want to follow PEP8's recommendations as much as possible10:04
mithroIshan_Bansal: More comments added to your pull request10:07
mithroIshan_Bansal: I'm going to go find some dinner, will be back in about 1-1.5 hours probably10:07
Ishan_Bansalmithro : My internet is not working properly today as the college is changing some of their connections, even their is no internet in the hostel, I have to come to library for access of internet.  :(  and the web surfing is to slow so once the internet service is normal, I will have a look on the spell checker.10:07
mithroIshan_Bansal: Okay, your spelling is pretty good (probably better than mine :-) -- I'm only seeing them thanks to the spell checker here10:10
mithroIshan_Bansal: You might want to get yourself a copy of too10:14
tpbTitle: Example Google Style Python Docstrings napoleon 0.6.0 documentation (at
mithroIshan_Bansal: I'm going to go find some dinner, will be back in about 1-1.5 hours probably -- looking forward to seeing more updates on your pull request10:20
*** twoolie has joined #timvideos10:55
*** seaLne has quit IRC11:02
*** seaLne has joined #timvideos11:02
*** twoolie has quit IRC11:33
*** twoolie has joined #timvideos11:37
mithroIshan_Bansal: I'm thinking of heading home / to bed11:58
Ishan_Bansalmithro : I will do the changes within some time. Also does you add only a single comment? just want to confirm.12:01
*** twoolie has quit IRC12:15
*** twoolie has joined #timvideos12:54
Ishan_Bansalmithro : ignore the previous message.13:20
*** twoolie has quit IRC13:20
Ishan_Bansalmithro : I have made changes to the pull request. kindly review it whenever you got time.13:21
*** sb0 has joined #timvideos15:11
*** CarlFK has joined #timvideos15:47
*** ChanServ sets mode: +v CarlFK15:47
*** sb0 has quit IRC16:06
*** sb0 has joined #timvideos16:06
*** sb0 has quit IRC16:16
*** sb0 has joined #timvideos16:16
*** kflux has joined #timvideos16:42
*** sb0 has quit IRC20:23
*** sb0 has joined #timvideos21:13
*** techman83 has quit IRC22:01
*** techman83 has joined #timvideos22:01
*** ChanServ sets mode: +v techman8322:01
*** SamSagaZ has quit IRC22:22
mithropaddatrapper: ping?22:40
*** twoolie has joined #timvideos23:11
*** twoolie has quit IRC23:42

Generated by 2.13.1 by Marius Gedminas - find it at!