*** tpb has joined #timvideos | 00:00 | |
*** tangrs has quit IRC | 00:20 | |
*** tangrs has joined #timvideos | 00:32 | |
*** CarlFK has joined #timvideos | 00:57 | |
*** ChanServ sets mode: +v CarlFK | 00:57 | |
mithro | Ishan_Bansal: sorry, I got home last night and feel asleep on the couch | 01:10 |
---|---|---|
mithro | Let's try again today? | 01:10 |
*** jea has joined #timvideos | 01:22 | |
jea | tumbleweed: what is tallylight? | 01:23 |
cr1901_modern | mithro: 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_modern | I am cheating for the time being by specifying a custom section for the firmware image buffers, but it's a hack :/ | 01:50 |
mithro | cr1901_modern: I'm okay with that | 01:52 |
mithro | jea: Tallylight tells you which camera is currently in use | 01:52 |
mithro | jea: IE Which camera a person should be looking at | 01:52 |
jea | mithro: oh ok. I haven’t seen that used before | 01:53 |
cr1901_modern | mithro: Naturally, as soon as I try using my nifty custom section, the firmware crashes. EDONTCARE | 01:53 |
cr1901_modern | mithro: Going to swap to .bss now. | 01:53 |
mithro | jea: Going to hack on the firmware? | 01:58 |
jea | probably | 01:58 |
jea | i should work out the priorities of the issues | 01:59 |
cr1901_modern | mithro: .bss works fine; my custom section didn't. Go figure :P. | 02:01 |
* cr1901_modern ... doesn't care for the nuances of elf | 02:02 | |
cr1901_modern | mithro: 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 |
mithro | Dunno, http://hash.online-convert.com/crc32-generator maybe? :-P | 02:35 |
tpb | Title: Calculate a CRC-32 checksum (at hash.online-convert.com) | 02:35 |
mithro | Or http://www.zorc.breitbandkatze.de/crc.html or http://crccalc.com/ ? | 02:35 |
tpb | Title: CRC calculation (at www.zorc.breitbandkatze.de) | 02:35 |
cr1901_modern | I suppose we should calculate it in the firmware, tbh. XMODEM already provides a CRC check | 02: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 |
mithro | cr1901_modern: It idea is that you can calculate the crc on the host to make sure that it was transferred correctly.... | 02:36 |
mithro | cr1901_modern: Oh - maybe like this... https://github.com/timvideos/HDMI2USB-mode-switch/blob/master/hdmi2usb/modeswitch/files.py#L16-L63 | 02:37 |
tpb | Title: HDMI2USB-mode-switch/files.py at master · timvideos/HDMI2USB-mode-switch · GitHub (at github.com) | 02:37 |
cr1901_modern | mithro: That's my point; an XMODEM transmitter will calculate a CRC for each 128 byte or 1024 byte block | 02:38 |
mithro | cr1901_modern: But that assumes your XMODEM code is correct :-P | 02:39 |
* cr1901_modern grumbles | 02:39 | |
cr1901_modern | My code is perfect, there's never any mistakes :D | 02:40 |
* cr1901_modern coughs | 02:40 | |
cr1901_modern | mithro: (That's a fair point) | 02:40 |
mithro | binascii.crc32(fdata) <-- that is probably what I would use | 02:41 |
cr1901_modern | mithro: Come to think of it, the firmware.fbi format file provides the length and checksum | 02:46 |
cr1901_modern | pre calculated* | 02:46 |
mithro | cr1901_modern: Yes, the bios doesn't.... | 02:46 |
cr1901_modern | mithro: Okay, then I don't understand... what file are you expecting a user to upload over the serial link? | 02:48 |
cr1901_modern | HDMI2USB.bin, HDMI2USB.fbi, concatenation of bios and HDMI2USB.fbi, or the output of mkimage.py? | 02:48 |
mithro | cr1901_modern: Anything, things like bios/firmware/gateware, things like a config file, pictures etc | 02:49 |
cr1901_modern | mithro: Okay, so the CRC I generate is for the _entire_ uploaded file | 02:50 |
cr1901_modern | Even if the file to be uploaded already has a CRC embedded | 02:50 |
mithro | cr1901_modern: Yes | 02:50 |
cr1901_modern | mithro: So prob an explanation's in order: https://github.com/cr1901/HDMI2USB-litex-firmware/blob/master/firmware/flash.c#L149-L150 | 02:50 |
tpb | Title: HDMI2USB-litex-firmware/flash.c at master · cr1901/HDMI2USB-litex-firmware · GitHub (at github.com) | 02:50 |
cr1901_modern | I 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 booting | 02:52 |
mithro | cr1901_modern: There are two ways to do this | 02:52 |
mithro | cr1901_modern: Upload the file to memory somewhere, calculate/check the crc, *then* write to the flash | 02:53 |
cr1901_modern | I assume that's what you want? | 02:55 |
mithro | cr1901_modern: The other way is to write & calculate while uploading and then just report the failure after the case | 02:55 |
mithro | cr1901_modern: Which is what you need to do on devices which don't have enough memory to buffer the whole thing in memory | 02:56 |
cr1901_modern | Well, that's what the data_in_fcn callback to xmodem_rx/tx is for | 02:57 |
cr1901_modern | mithro: I think perhaps I should just calculate on the fly in all cases (though I'm implementing that later) | 03:00 |
Ishan_Bansal | mithro : ping | 03:41 |
mithro | Ishan_Bansal: Pong | 03:41 |
Ishan_Bansal | mithro: mithro, I am free today so anything from my side regarding the pull request. | 03:44 |
mithro | Ishan_Bansal: Okay -- I will go look right now | 03:45 |
mithro | Ishan_Bansal: So - looking at the current pull request | 03:45 |
mithro | Ishan_Bansal: Can you do the following | 03:45 |
mithro | Ishan_Bansal: Update the comment to explain what features / functionality this pull request adds | 03:46 |
mithro | Ishan_Bansal: You don't need to tell me which files are edited / added -- I can see that in the "Files changed" tab automatically | 03:46 |
mithro | Ishan_Bansal: What I need is *why* you have added changed the files | 03:47 |
cr1901_modern | mithro: Fun quiz (when you have a free moment)... what is wrong with this line :D? https://github.com/cr1901/HDMI2USB-litex-firmware/blob/master/firmware/flash.c#L139 | 03:47 |
tpb | Title: HDMI2USB-litex-firmware/flash.c at master · cr1901/HDMI2USB-litex-firmware · GitHub (at github.com) | 03:47 |
Ishan_Bansal | mithro : sure. | 03:47 |
mithro | cr1901_modern: void *memcpy(void *dest, const void *src, size_t n); -- The memory areas must not overlap. | 03:48 |
mithro | cr1901_modern: Something described there? | 03:48 |
mithro | Ishan_Bansal: Can you do that while I take a quick look over the code? | 03:48 |
cr1901_modern | actually 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_modern | I just lost 20 minutes to this T_T | 03:49 |
Ishan_Bansal | mithro :ya I am working on that only. | 03:49 |
mithro | Ishan_Bansal: The new comments / documentation in this code is looking good! | 03:50 |
mithro | Ishan_Bansal: So, if I understand correctly, once we merge this pull request, you have another one you want to send? | 03:50 |
Ishan_Bansal | yup, I have RLE branch in my github which I want to send next. | 03:52 |
mithro | Ishan_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 request | 03:52 |
mithro | Wow, OSDC's video's are terrible..... - https://www.youtube.com/watch?v=LkEtBVLfygE&html5=1 :-( | 03:55 |
Ishan_Bansal | mithro : working on that. | 03:56 |
mithro | Ishan_Bansal: poke me again when done... | 03:56 |
cr1901_modern | mithro: 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 |
mithro | cr1901_modern: Why? | 03:59 |
cr1901_modern | mithro: Because xmodem_rx is expected to wait 10 seconds before retransmitting the start char; | 04:00 |
mithro | cr1901_modern: So? | 04:01 |
cr1901_modern | default period of the timer is 2 seconds; it's not possible to measure an interval of 10 seconds | 04:01 |
cr1901_modern | Well, at least it's not possible to measure it using the provided elapsed() function by <time.h>* | 04:01 |
mithro | cr1901_modern: Ummm... if the timer has a period of 2 seconds -- 10 / 2 == 5 -- you just need to fire your thing every 5 timers | 04:01 |
cr1901_modern | That's a workaround I haven't impl'ed yet. But let me just get things working period | 04:02 |
mithro | Ishan_Bansal: how goes that? | 04:24 |
Ishan_Bansal | mithro: I am almost done with that, just 5 more minutes. | 04:33 |
cr1901_modern | mithro: Arbitrary addresses to flash should be supported, correct? | 04:39 |
mithro | cr1901_modern: That would be preferred... | 04:41 |
cr1901_modern | I 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 |
mithro | cr1901_modern: Starting with something that only works on sector size would be a good start | 04:43 |
mithro | be back in 10 | 04:43 |
Ishan_Bansal | mithro : ping | 04:47 |
Ishan_Bansal | I uploaded the new comments for the pull request. | 04:47 |
mithro | Ishan_Bansal: Okay, that looks pretty good! | 05:04 |
mithro | Ishan_Bansal: I'm going to merge this | 05:04 |
mithro | Ishan_Bansal: Actually - can you update the title before I do? | 05:04 |
Ishan_Bansal | The one "additional additional files" ? | 05:09 |
mithro | Ishan_Bansal: Yes, the title of the pull request | 05:10 |
mithro | Ishan_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_Bansal | How about "Adding frontend for JPEG encoder" ? | 05:12 |
mithro | Ishan_Bansal: Perfect! | 05:13 |
Ishan_Bansal | Done. | 05:13 |
Ishan_Bansal | mithro : In btw, here is the link to the final GSOC report I am working on : https://docs.google.com/document/d/1hXhApH3lDt4gT7ULloFavc0kUgBTPp0yphXEUjW9RKo/edit?usp=sharing | 05:15 |
tpb | Title: GSOC Final Project Report - Google Docs (at docs.google.com) | 05:16 |
mithro | Ishan_Bansal: I'll take a look at that in a moment | 05:16 |
mithro | Ishan_Bansal: Merged! | 05:16 |
mithro | Ishan_Bansal: Please get the next pull request up ASAP... | 05:17 |
Ishan_Bansal | mithro : Till now I just added the heading which I want to write in the final GSOC report. :P | 05:17 |
Ishan_Bansal | \O/ f | 05:17 |
Ishan_Bansal | ya, I will do that. | 05:18 |
mithro | Ishan_Bansal: If you get the pull request in soon I'll be able to review it now | 05:18 |
Ishan_Bansal | mithro : I will do that within 1 hour, does that work ? | 05:20 |
mithro | Ishan_Bansal: Unless something comes up I should be around then | 05:20 |
cr1901_modern | mithro: 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 |
mithro | cr1901_modern: Why didn't you work on the firmware uploading working instead of the erase routine? | 05:34 |
cr1901_modern | mithro: Because I (mistakenly) though to even upload new firmware in the first place, I'd need the erase routine. Oops ._. | 05:36 |
mithro | cr1901_modern: Do you have getting the firmware into DDR ram using xmodem working already? | 05:37 |
cr1901_modern | No. | 05:37 |
cr1901_modern | I'm close however. 2 more compile-upload cycles? | 05:37 |
mithro | cr1901_modern: That doesn't require any flash stuff to work, right? | 05:37 |
cr1901_modern | mithro: Oh I misunderstood. Uploading via xmodem into RAM works | 05:38 |
mithro | cr1901_modern: Writing from RAM into SPI flash doesn't work? | 05:38 |
cr1901_modern | mithro: Correct, and that's because I forgot to erase the SPI flash before writing it | 05:39 |
cr1901_modern | mithro: hold on a sec... | 05:43 |
cr1901_modern | mithro: The two words you've been waiting for: It works. | 05:49 |
cr1901_modern | Pic incoming | 05:49 |
cr1901_modern | mithro: http://imgur.com/a/vtXVp | 05:50 |
tpb | Title: Imgur: The most awesome images on the Internet (at imgur.com) | 05:50 |
cr1901_modern | Err, http://imgur.com/e9saRHd | 05:51 |
tpb | Title: Imgur: The most awesome images on the Internet (at imgur.com) | 05:51 |
mithro | cr1901_modern: I'm actually awaiting the words "Can you review my pull request" | 05:51 |
cr1901_modern | mithro: Fair enough | 05:51 |
mithro | cr1901_modern: But it is great to hear that you have gotten progress! | 06:29 |
Ishan_Bansal | mithro : I have made the pull request. | 06:34 |
mithro | Ishan_Bansal: Just saw your pull request | 06:34 |
mithro | Ishan_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 it | 06:35 |
*** CarlFK has quit IRC | 06:35 | |
mithro | Ishan_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_Bansal | sure. | 06:36 |
Ishan_Bansal | mithro : I will get to that. | 06:36 |
mithro | Ishan_Bansal: How many pull requests after this one do you have? | 06:39 |
cr1901_modern | mithro: I consider xmodem support okay for other people to test now (if you wish): https://github.com/cr1901/HDMI2USB-litex-firmware | 07:34 |
tpb | Title: GitHub - cr1901/HDMI2USB-litex-firmware: A version of the HDMI2USB firmware based around the misoc+migen tools produced by m-labs. (at github.com) | 07:34 |
cr1901_modern | Let me know if there's any issues | 07:34 |
cr1901_modern | (assuming you wish to test it) | 07:34 |
* cr1901_modern retires for the night | 07:35 | |
mithro | Ishan_Bansal: I'm back now | 07:48 |
mithro | Ishan_Bansal: Your new pull request has comments | 08:05 |
Ishan_Bansal | mithro : apart from this I have huffman, bytestuffer and wrapper. So total 3 pull request apart from this. | 08:25 |
mithro | Ishan_Bansal: Okay | 08:25 |
mithro | Ishan_Bansal: Lets try and get atleast 2 more of your pull requests merged tonight? | 08:30 |
Ishan_Bansal | mithro : I made the changes | 09:31 |
mithro | Ishan_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_Bansal | mithro : I will take care of that from now onwards. | 09:46 |
mithro | Ishan_Bansal: No worries, writing good comments is something that takes a lot of coding practice to get good at | 09:47 |
mithro | Ishan_Bansal: Even many people who have been programming for years can struggle with it | 09:49 |
Ishan_Bansal | mithro: So you are saying writing comments is even harder than writing the code itself. :P | 09:52 |
mithro | Ishan_Bansal: Frequently, yeah | 09:52 |
mithro | Ishan_Bansal: Writing code is in some ways easier because at least you have the "well it actually does the right thing" | 09:52 |
mithro | Ishan_Bansal: But comments don't really have that property | 09:52 |
mithro | Ishan_Bansal: What do you use as your text editor? | 09:55 |
mithro | Ishan_Bansal: BTW Do you know about PEP8? | 09:57 |
Ishan_Bansal | mithro : For python I use atom, but it general I like to use sublime. | 09:58 |
mithro | Ishan_Bansal: Okay, I'd recommend seeing if there is a way to turn on spell checking in Python comments | 09:58 |
mithro | Ishan_Bansal: Looks like there might be something at https://github.com/atom/spell-check | 09:59 |
tpb | Title: GitHub - atom/spell-check: Spell check Atom package (at github.com) | 09:59 |
mithro | Ishan_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 :-P | 10:01 |
mithro | Ishan_Bansal: Take a look at "Naming Conventions" section of https://www.python.org/dev/peps/pep-0008/#prescriptive-naming-conventions | 10:03 |
tpb | Title: PEP 8 -- Style Guide for Python Code | Python.org (at www.python.org) | 10:03 |
mithro | Ishan_Bansal: Generally we want to follow PEP8's recommendations as much as possible | 10:04 |
mithro | Ishan_Bansal: More comments added to your pull request | 10:07 |
mithro | Ishan_Bansal: I'm going to go find some dinner, will be back in about 1-1.5 hours probably | 10:07 |
Ishan_Bansal | mithro : 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 |
mithro | Ishan_Bansal: Okay, your spelling is pretty good (probably better than mine :-) -- I'm only seeing them thanks to the spell checker here | 10:10 |
mithro | Ishan_Bansal: You might want to get yourself a copy of http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html too | 10:14 |
tpb | Title: Example Google Style Python Docstrings napoleon 0.6.0 documentation (at sphinxcontrib-napoleon.readthedocs.io) | 10:14 |
mithro | Ishan_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 request | 10:20 |
*** twoolie has joined #timvideos | 10:55 | |
*** seaLne has quit IRC | 11:02 | |
*** seaLne has joined #timvideos | 11:02 | |
*** twoolie has quit IRC | 11:33 | |
*** twoolie has joined #timvideos | 11:37 | |
mithro | Ishan_Bansal: I'm thinking of heading home / to bed | 11:58 |
Ishan_Bansal | mithro : 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 IRC | 12:15 | |
*** twoolie has joined #timvideos | 12:54 | |
Ishan_Bansal | mithro : ignore the previous message. | 13:20 |
*** twoolie has quit IRC | 13:20 | |
Ishan_Bansal | mithro : I have made changes to the pull request. kindly review it whenever you got time. | 13:21 |
*** sb0 has joined #timvideos | 15:11 | |
*** CarlFK has joined #timvideos | 15:47 | |
*** ChanServ sets mode: +v CarlFK | 15:47 | |
*** sb0 has quit IRC | 16:06 | |
*** sb0 has joined #timvideos | 16:06 | |
*** sb0 has quit IRC | 16:16 | |
*** sb0 has joined #timvideos | 16:16 | |
*** kflux has joined #timvideos | 16:42 | |
*** sb0 has quit IRC | 20:23 | |
*** sb0 has joined #timvideos | 21:13 | |
*** techman83 has quit IRC | 22:01 | |
*** techman83 has joined #timvideos | 22:01 | |
*** ChanServ sets mode: +v techman83 | 22:01 | |
*** SamSagaZ has quit IRC | 22:22 | |
mithro | paddatrapper: ping? | 22:40 |
*** twoolie has joined #timvideos | 23:11 | |
*** twoolie has quit IRC | 23:42 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!