**** BEGIN LOGGING AT Wed Jul 04 03:00:04 2018 Jul 04 09:09:38 muneeb17: Yeah for a first cut solution, it may not be required. Jul 04 14:19:10 That will be almost equal to simply using RPMsg Jul 04 14:24:12 zeekhuge: What do you think about reading the regs to get the function call arguments Jul 04 14:27:54 Regs are mostly reserved Jul 04 14:28:06 They are used internally by the compiler Jul 04 14:28:08 Some for return statements Jul 04 14:28:18 Others for stack etc Jul 04 14:30:03 muneeb17: https://github.com/ZeekHuge/BeagleScope/blob/port_to_4.4.12-ti-r31%2B/docs/clpru_and_C_usage.notes Jul 04 14:30:22 Like r14-r29 are reserved for arguments... this is what abhishek_ meant about using the PRU Calling convention, right? Jul 04 14:31:47 Yep Jul 04 14:32:17 There are also caller- and callee- saved registers Jul 04 14:37:48 abhishek_: About the strings part, A string label is used to reference it in the .rodata part. Not very sure how we can use that to get the string Jul 04 14:59:42 abhishek_: So, in our printf() function we'll copy the function arguments to the callee-saved registers, then pass and interrupt to the ARM and halt. An interrupt driver will read the regs , do the formatting and re-enable the PRU. Is this flow right? Jul 04 14:59:46 The strings part is still unclear, though Jul 04 15:01:35 zeekhuge: ^^ Jul 04 15:05:30 I was looking if we could use some custom resource to supply the strings Jul 04 15:05:51 And then they could be parsed in pru_rproc Jul 04 15:06:47 Yeah, a different section for the debug strings Jul 04 15:07:00 So the printf method would use pre-processors Jul 04 15:07:13 To add those strings to the resource structure Jul 04 15:08:02 So compiler will do it before generating the final ELF Jul 04 15:09:23 We can give a string an index and pass it during the call Jul 04 15:09:41 Although I am not sure. If it will end up in right place. Jul 04 15:10:32 Pass it to the MPU ? Jul 04 15:12:06 Just for the sake of speed (these messages are lagging) can we discuss it on the "normal" irc ? Jul 04 15:12:07 muneeb17: ^ Jul 04 15:12:39 zeekhuge: Ok Jul 04 15:16:12 muneeb17[m]: so .. do you want to pass the complete string to the MPU when the method is invoked ? Jul 04 15:16:52 zeekhuge_: I was saying that we could map strings to indexes in our custom resource and make the PRU pass the index during the function call Jul 04 15:17:22 Okay. Yeah ! That can be done. Jul 04 15:18:06 Just to check if what we are thinking will work, try to generate a ELF Jul 04 15:18:29 And maybe you could then use the hex to check if the strings are in the section we want them to be Jul 04 15:18:41 Using preprocessors from the code. Jul 04 15:19:09 Hex for ELF is pretty well defined. Jul 04 15:19:30 I mean .. the structure of ELF is pretty well defined Jul 04 15:19:37 zeekhuge_: yeah, I could use readelf/objdump Jul 04 15:20:06 Wow.. the messages to the matrix are seriously lagging... Jul 04 15:21:18 So .. also about the data part. Jul 04 15:21:33 The data mostly resides in the dataRam right ? Jul 04 15:21:48 yeah Jul 04 15:22:26 So do we want the function to copy data and keep it somewhere or directly just the give pointer to location ? Jul 04 15:22:42 The choice depends on how we want to structure it. Jul 04 15:22:52 If we want the MPU to read the data Jul 04 15:23:13 (and not the PRU to write send data to MPU) Jul 04 15:23:29 Then I think pointers/offsets are better Jul 04 15:23:52 I think reading from the regs is the best thing, if its possible Jul 04 15:24:13 Why so ? Jul 04 15:24:22 For MPU, it won't matter much Jul 04 15:24:43 If we do it from regs, then it will be copied from ram to regs. Jul 04 15:24:57 I am not sure how it's implemented by clpru Jul 04 15:25:23 Maybe try a small code and look into the asm generated Jul 04 15:26:10 ? Jul 04 15:26:19 yeah, sure Jul 04 15:27:50 from the c compiler ref, r14-r29 are argument regs but they are not saved during calls.. so we will have to copy the data to the save-on-entry regs, I guess Jul 04 15:28:43 It is kind of confusing.. maybe abhishek_[m] can help clarify it? Jul 04 16:11:10 The compiler will probably save it before calling Jul 04 16:11:27 Assuming you are writing stuff in C of course Jul 04 16:12:04 It will save it on the stack, right? Jul 04 16:12:11 muneeb17: Where's your weekly report? Jul 04 16:14:45 abhishek_[m]: Sorry, I didn't do anything meaningful to report. Mostly some testing stuff. Took me some time to grasp the idea itself. Wasn't sure about the implementation part. Jul 04 16:15:50 I did modify the RPMsg channel driver to get the data.. will put that in the report and send it now Jul 04 16:27:36 ... Jul 04 16:27:51 abhishek_[m], zeekhuge: To make up for the last week, I'll put in the maximum time I can and finish this printf() thing definitely before the evaluation start Jul 04 16:28:17 muneeb17: and also others: It's okay even if you haven't been able to make significant progress since last week, but make sure you send a report as scheduled Jul 04 16:28:46 forgot to warn folks today is a US Holiday. Jul 04 16:28:51 Hello all! Jul 04 16:28:58 hi anujdeshpande[m] Jul 04 16:29:18 I've got a commitment here away from my computer today. Jul 04 16:29:26 Hi all Jul 04 16:29:31 hi vaishnav98_! Jul 04 16:29:44 Hello everyone Jul 04 16:30:25 Hi everyone! Jul 04 16:30:56 Hi everyone! Jul 04 16:31:14 jkridner: does the commitment involve propane or charcoal? :D Jul 04 16:31:16 hi ravikp7, anirban1998[m]! Jul 04 16:31:25 hickory. Jul 04 16:32:29 jkridner: Hi! Jul 04 16:32:50 ds2: thoughts? try to convene tomorrow? think we can get a quorum either today or tomorrow? Jul 04 16:33:01 any mentors besides ds2 around? Jul 04 16:33:22 er, and anujdeshpande[m] Jul 04 16:33:31 jkridner: thought cwicks will be around..she sent out a mail yesterday Jul 04 16:33:56 abhishek_[m], av500, cwicks[m], nerdboy, Wormo, welsh[m], zeekhuge_? Jul 04 16:34:35 Hello everyone ! Jul 04 16:34:38 jkridner: I'm here Jul 04 16:34:49 I'll check back in 5 to see who shows, but I do indeed have a flame-based situation to attend. Jul 04 16:36:32 abhishek_[m], zeekhuge: can we decide on the implementation part, then? Jul 04 16:36:50 Hi all - I'm here Jul 04 16:37:23 muneeb17: Go ahead Jul 04 16:38:14 abhishek_[m]: So, the argument regs will not be saved during calls, right? Jul 04 16:38:22 It may be pushed on the stack Jul 04 16:39:33 To make sure that we get our data, we need to copy it to the r4-r13 regs and then read from those Jul 04 16:40:07 Hi jkridner we can run the meeting it you have to go. It's pouring rain in South Texas today so .... boring Independence Day so far. Jul 04 16:46:21 Hi vaishnav98_ would you like to check in first this week? Jul 04 16:46:51 cwicks[m]: hi, sure Jul 04 16:47:16 weekly report in? highlight accomplishment? Any blocks? Plan for this week? Jul 04 16:52:21 jkridner: cwicks[m] : anujdeshpande[m] : I did submit the weekly report Monday itself, I have made the recommended changes to the secure-rpc implementation(also pru support), also wrote some general tests last week and got an increased coverage , also fixed some bugs that were found while writing those tests. I was hoping to present the working bbui rewrite before today's meeting but I couldn't get everything Jul 04 16:52:21 together as it needs some more modifications and I hope to get it completed this week itself, also in the new ui I will be using svg mainly Jul 04 16:54:59 cwicks[m]: no blocks this week , next week plan : finish the pending work on ui , integrate all the ui work(bbui, pbui, baconbits-ui) to a single one. Jul 04 16:58:39 thanks cwicks[m] for moving things ahead. anirban1998[m], muneeb17, vaishnav98_ and ravikp7 all checked in, but haven't all given updates. Jul 04 16:59:27 thank you vaishnav98_ ! Jul 04 16:59:47 Hi welsh Jul 04 17:00:33 Hi anirban1998 would you like to go next ? Jul 04 17:00:34 Hi welsh ! Jul 04 17:00:34 sorry I'm late. We are having another "rain event" in Houston and we are a bit on edge. We have gotten around 7" of rain and the streets are flooded. Jul 04 17:02:26 cwicks jkridner Will I give my updates now? Jul 04 17:03:14 Yes please anirban1998 Jul 04 17:04:57 cwicks I have been working on the game GUI and the documentation this week...have finished working on 3 of the games...working on the final game...will upload the videos as soon as it is done...I have hosted my documentation on github... Jul 04 17:08:40 Didn't have any blocks on the software...worked on fixing the hardware issues...shorted the VBUS and VI , ID and GND as jkridner mentioned previous week...it worked for a brief moment...then dmesg logs showed babble output...and error -110...any suggestions here? Jul 04 17:13:27 Thank you anirban1998 Jul 04 17:13:48 While we are waiting for welsh to reconnect, muneeb17 will you also report in? Jul 04 17:15:12 cwicks: I have been working on an implementation of the LOG_printf() function for the PRUs. There was not much progress this week. The implementation of the function is still under discussion. Jul 04 17:15:39 Hopefully, we can finalise it soon and get working on it with full speed Jul 04 17:15:43 Hi muneeb17 would you like to report in? Jul 04 17:16:25 zeekhuge, abhishek_[m]: are you available after the meeting today? Jul 04 17:16:33 are you getting the attention of the mentors on the discussion? Jul 04 17:17:03 cwicks[m]: yes, we have been discussing it for some time Jul 04 17:17:15 sure . Jul 04 17:18:17 cwicks: We have been discussing it and think that we will finalize it today. Jul 04 17:18:57 anirban1998 I haven't seen that error before. I didn't see that error in the dmesg logs you posted. go ahead and send the error out to your mentor list. Jul 04 17:19:33 excellent muneeb17 zeekhuge wonderful to see the team work happening! Jul 04 17:20:04 welsh: I got that error today after configuring the ckt as jkridner mentioned Jul 04 17:21:02 ravikp7: can you go ahead with your check-in please? Jul 04 17:21:13 weekly report in? highlight accomplishment? Any blocks? Plan for this week? Jul 04 17:21:30 cwicks: sure Jul 04 17:23:55 anirban1998 understood. just wanted to see the exact message so we can look around to better understand what is causing the error. Jul 04 17:24:24 welsh Did you checkout the docs? Is there anything on which I can improve on? Jul 04 17:24:38 welsh: sure I will send the logs Jul 04 17:27:18 cwicks: Posted weekly report, this week I got past a major hurdle in the implementation of the tcp/ip server, the board in now responding to requests, earlier the usb eth link got down everytime usb interfaces were claimed, fixed that with the help of usb cdc spec document. Now, I'm working on local http proxy server to access the cloud9 server on board and also working on handling tcp requests from board directed to Jul 04 17:27:18 addresses other than itself. No, blocks currently Jul 04 17:29:09 anirban1998 thanks. unfortunately, I have not had a chance to look at it. I have some time later this afternoon and will send you some feedback. I apologize I haven't been able to get to it sooner. Jul 04 17:30:23 welsh: Sure.. Jul 04 17:31:01 thank you ravikp7 glad you were able to make it past your major hurdle Jul 04 17:31:37 anirban1998: I noted in your weekly report that you are still having challenges w/ the hardware? Jul 04 17:31:47 ravikp7: Good to know. Has it also fixed USB CDC/RNDIS thing or that still remains? Jul 04 17:34:32 abhishek_: I couldn't get the rndis interface up, but got the cdc interface working on linux and Windows, I hope it works on macOS too (havn't got chance to try there yet) , only cdc would be good enough, right? Jul 04 17:37:42 cwicks Yeah...almost solved it today...I made that connection as jkridner mentioned today...and inserted a USB stick into the USB port...it flashed indicating it was connected....later tried again after returning home with the USB audio card...but in vain...then again went back to the USB stick...but it has not worked since. Still some problems are there as to the usb cable being bad...babble errors and sometimes Jul 04 17:37:43 error -110 Jul 04 17:38:52 anirban1998[m]: check your wiring... something is loose Jul 04 17:39:10 I feel that the USB breakout board is working...just may be having some other issues...hope will be able to solve it soon Jul 04 17:39:51 ds2: Okay I will re-wire the circuit again to make sure the connections are correct...and check again Jul 04 17:40:40 anirban1998[m]: are you still using the plug in wires? Jul 04 17:41:03 i suspect one or more of them may not be making a good connection Jul 04 17:41:47 the DM/DP will be very sensitive Jul 04 17:42:22 I feel that wiring won't cut it - you'll need to solder something together Jul 04 17:42:43 *nod* Jul 04 17:42:59 yeah...but now connecting the wires directly from the pocketbeagle to the usb board...not via the breadboard...on the pocketbeagle I shorted VBUS and VI, ID and GND Jul 04 17:43:06 any idea if the USB audio is a USB 2.0HS or a FS device (480 vs 12Mbs) Jul 04 17:43:25 I think it's a full speed device Jul 04 17:43:49 anirban1998[m]: those are all low speed connections. Jul 04 17:44:01 anirban1998: You can get that by just plugging it in your system and looking at the dmesg output Jul 04 17:44:06 DM/DP are high speed connections... FS = 12Mbs; HS=480Mbs Jul 04 17:44:11 * anirban1998[m] uploaded an image: DpvZxMX_d.jpg (29KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/ZZxVnwitwTJwRWVZWWajYMBz > Jul 04 17:44:43 I did that like this Jul 04 17:44:51 oh nice...no wires :D Jul 04 17:45:09 in this case, have you tried power cycling the PocketBone? Jul 04 17:45:18 Yup ID=GND looks ok to me to put it into host mode Jul 04 17:45:21 MUSB's babble can be a bit touchy Jul 04 17:45:28 Abhishek_: yeah I did that and checked...it is giving babble output in the dmesg logs Jul 04 17:45:36 muneeb17: You wanna discuss? Jul 04 17:45:52 abhishek_[m]: sure Jul 04 17:45:56 anirban1998: I mean, plug it into your PC and see the dmesg Jul 04 17:46:07 ds2 Not exactly like the pic shown above...I used wires to connect from the pocketbeagle to the board...instead of directly connecting it Jul 04 17:46:16 zeekhuge: you here? Jul 04 17:46:38 anirban1998[m]: how are you getting 5V onto VBUS? Jul 04 17:47:26 Abhishek_: Do you mean the USB audio device? Yeah I plugged it into my PC and it is working fine. Jul 04 17:47:26 Hi anirban1998 is that a picture of your set-up? can you send a pic of your set-up please? Jul 04 17:47:49 Yup, just look at the dmesg logs, it says what kind of device is it Jul 04 17:48:00 (high speed or full speed) Jul 04 17:48:23 If your device is full speed, it shouldn't be too picky about the connectivity Jul 04 17:48:56 But if it's high speed, then signal integrity has to be ensured. Jul 04 17:49:05 Okay I will check Abhishek_ Jul 04 17:51:14 Abhishek_: It is full speed Jul 04 17:51:46 As expected. But wonder why it's still giving you trouble Jul 04 17:52:23 cwicks That's jkridner 's connection...I will upload my connection picture Jul 04 17:52:51 power down the whole thing...the MUSB block sometimes can get wedged after a babble Jul 04 17:53:08 and make sure there is a way of getting 5V into VBUS Jul 04 17:54:37 ds2: Yeah mentioned this error before...most of the time it is measuring 4.5 or 4.6 V between VBUS and GND Jul 04 17:56:16 anirban1998[m]: how is VBUS gettingt he 5V? 4.5 is on the lower edge Jul 04 18:03:12 muneeb17: I have to go now. Let me, zeekhuge and Wormo know what you're stuck on by posting it here, I'll get back as soon as I can. Jul 04 18:05:11 * anirban1998[m] uploaded an image: 20180704_232655.jpg (6373KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/mqaiumCdjsTyDOaHJPyoYKLb > Jul 04 18:05:12 Wait I am sending the pictures...the pictures are not uploading due to bad connection Jul 04 18:06:14 anirban1998: still here 🙂 Jul 04 18:07:00 welsh: ds2 can you take a look? Jul 04 18:10:49 * anirban1998[m] uploaded an image: 20180704_232730.jpg (1796KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/jOMxUrUHwAfEpzafLtSdpMiC > Jul 04 18:14:09 anirban1998[m]: which one are you using? the wire or the no wire one? Jul 04 18:28:35 zeekhuge: there? Jul 04 18:29:29 muneeb17: yeah Jul 04 18:30:49 zeekhuge: I was checking the regs using the debug commands and no register is storing the argument values. Also, I think clpru cobblers all the registers used in inline assembly, those aren't working as well Jul 04 18:33:41 *clobbers Jul 04 18:35:25 muneeb17: can you push the code you're using to test that? Jul 04 18:40:53 Wormo: Hi!, http://paste.debian.net/1032080/ Jul 04 18:41:11 anirban1998: Do you have access to a small male header ? Jul 04 18:42:19 cwicks yeah I have Jul 04 18:42:19 You can then get rid of the wires and connect your USB add-on board directly to the female header on the pocket beagle. this is like jkridner's photo and will reduce the wires as being a variable on the problem. Jul 04 18:43:53 cwicks: Okay so will I have to solder the male header on to the USB breakout? Jul 04 18:44:23 muneeb17: ok so what do you see when you do the load immediate? What gets clobbered besides R7? Jul 04 18:44:45 yes. do you already have the wires soldered onto the USB breakout board? I can't tell from the picture? Jul 04 18:46:08 muneeb17: func args are likely going onto the stack Jul 04 18:46:21 cwicks: No the 4 female header pins are soldered to the board...I just plugged in the wires into them Jul 04 18:46:34 but order would be preserved Jul 04 18:46:39 Wormo: All regs get clobbered, even r30, r31 Jul 04 18:47:28 muneeb17: do they get un-clobbered after executing the asm() ? Jul 04 18:47:54 It could be treated like a separate function, where state is being saved on the stack, then restored from stack Jul 04 18:48:43 kind of seems like it would need to, lacking the gcc capability of labeling which regs are being clobbered inside the asm Jul 04 18:50:03 Wormo: yeah... can other regs be accessed like the r30 and r31? Jul 04 18:50:35 in C? Jul 04 18:50:35 If it all goes in the stack, that's where you'll find it Jul 04 18:50:36 Hi anirban1998 I have to leave the meeting. Please ping the mentors via email and ask for some times when we can schedule another IRC time. Jul 04 18:50:46 oh in C Jul 04 18:51:16 muneeb17: uhm .. btw, is that asm instruction just a comment ? Jul 04 18:51:42 zeekhuge : no its the format Jul 04 18:51:59 it needs to start with a ; it seems Jul 04 18:52:41 muneeb17: nope. `;` is a comment Jul 04 18:53:08 I thought you just commented it while looking for the function args Jul 04 18:53:19 since they were all 0xf's Jul 04 18:53:38 Sorry, misread the manual Jul 04 18:54:30 do you know how to dump the compiled object to assembly? Jul 04 18:55:32 nope Jul 04 18:56:26 disassembler? Jul 04 18:56:42 muneeb17: add `--keep_asm` to the compiler command Jul 04 18:57:08 zeekhuge: Ok Jul 04 19:00:56 cwicks: Sure Jul 04 19:01:51 muneeb17: trying to do it right now ? Jul 04 19:02:04 yeah Jul 04 19:02:58 also .. dump the asm for us to see. Jul 04 19:03:19 (or else I will be asleep with nothing to do :P) Jul 04 19:03:42 muneeb17: ^ Jul 04 19:07:18 zeekhuge: pastebinit doesn't work for big files? Jul 04 19:09:31 a gist I guess? Jul 04 19:10:17 https://gist.github.com/MuneebMohammed/7cf46ec785b5d4e58d8e58f3d530315d Jul 04 19:12:01 zeekhuge, Wormo: Ok, its working now Jul 04 19:17:20 muneeb17: the generated asm is nice in that it has the debug symbols as markers Jul 04 19:19:26 Wormo: yeah, noticed that.. Jul 04 19:19:54 Wormo, zeekhuge: do you know about passing variables to inline assembly in clpru? Jul 04 19:20:06 cant find it in the compiler reference Jul 04 19:21:30 so far all I found was saying you can't get at local variables Jul 04 19:22:53 yeah.. just saw that :( Jul 04 19:23:39 muneeb17: it still seems like there should be a standard function prologue that is not being shown in this generated asm file Jul 04 19:24:02 a disassembly of the object file might show it Jul 04 19:24:43 should show it, actually Jul 04 19:27:17 Wormo: will there be any difference between this asm and the disassembled code? Jul 04 19:27:57 I expect there to be, it doesn't look complete like the disassembly I get from putting gcc .o into objdump Jul 04 19:28:23 the dissassembled have function prologue at the beginning of non-inlined functions Jul 04 19:28:44 push these stuff to stack, then pop it off before the return Jul 04 19:28:54 that kind of thing Jul 04 19:29:58 you mean before line 157? Jul 04 19:32:14 it could also be that the compiler is smart enough to not bother with args when you're not using them Jul 04 19:32:43 * zeekhuge sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/rNgRbbLGLqFRyHbtFudxjZcW > Jul 04 19:33:05 so maybe try doing a toggle for 'a' times so that param gets used Jul 04 19:33:41 off to bed now ! Jul 04 19:34:19 muneeb17: expected to see func prologue before your asm statement coming in line 99 Jul 04 19:34:41 gnight zeekhuge Jul 04 19:35:30 zeekhuge: I'll also try the custom resource thing and report it in the morning. Jul 04 19:36:00 I wonder which doc he found that in Jul 04 19:36:12 looks useful Jul 04 19:36:30 Wormo: yeah, quite detailed Jul 04 19:36:47 thanks zeekhuge Jul 04 19:39:17 Oh. its there in the compiler reference Jul 04 19:39:39 muneeb17: I was about to say that, my pdf viewer was having a searching fail Jul 04 19:40:08 I can see "called function" right there, but it fails to turn up as a search... Jul 04 19:40:29 this is exactly what I was looking for Jul 04 19:40:55 it will allow you to find the parameters from your asm Jul 04 19:43:25 muneeb17: btw what part of printf are you planning to implement in asm instead of C? Jul 04 19:44:46 Wormo: copying the arguments to the function to the save-on-entry regs Jul 04 19:45:03 ok that makes sense Jul 04 19:45:48 We'll need to set and interrupt after that and halt the PRU Jul 04 19:46:13 The kernel can then read the regs and re-enable it Jul 04 19:46:43 Maybe we can set the interrupt in assembly too Jul 04 19:48:55 Wormo: I think the whole function can be implemented in assembly Jul 04 19:49:44 It sounds like it Jul 04 19:54:42 Wormo: Any ideas on dealing with strings? Jul 04 19:56:39 We discussed about making a custom resource for them and then make the PRU pass some kind of index to the string Jul 04 20:01:16 The approach I was thinking of required a post-processing step where the strings would be collected and put into such a table, with the actual string replaced in the code by the index, but I'm not crazy about adding another source preprocessor Jul 04 20:01:37 sorry not post-processing, meant pre-processing before the compiler Jul 04 20:02:44 I guess that could still be something to fall back on if nobody comes up with better Jul 04 20:06:16 Yeah.. anything we can do with the pointers? Jul 04 20:06:19 On the earlier topic about halting the PRU to let the CPU get values, I prefer circular-buffer-in-shared-mem approach where there is an event number incrementing so you know if the CPU is getting so far behind that messages are lost Jul 04 20:06:58 events would be string index + copied in values Jul 04 20:09:30 Hmm.. so the kernel will have to alloc the buffer, send the address and PRU will write into it.. like a stripped down RPMsg Jul 04 20:14:27 Wormo: Yeah, that makes more sense to me now Jul 04 20:19:11 Wormo: will you be available in the morning (evening) at our meetup time? **** ENDING LOGGING AT Thu Jul 05 03:00:01 2018