**** BEGIN LOGGING AT Mon Mar 10 02:59:58 2014 Mar 10 04:08:22 ds2, could I talk to you regarding the documentation project? Mar 10 06:28:59 wiznerd: Hi... I am about to hit the sack...catch me tomorrow and we can talk Mar 10 12:41:52 hi Mar 10 12:42:05 morning Mar 10 12:42:25 _av500_: mdp back? Mar 10 12:42:49 i wanted to ask somethings about the bonescript webpages project, i have been speaking to jkridner about it, are you there jkridner? Mar 10 12:43:03 not yet Mar 10 12:47:47 Apart from mdp, who among the mentors were at the conf in Macao? Mar 10 12:48:17 just mdp Mar 10 13:36:09 t27 left? Mar 10 13:37:00 hi jkridner Mar 10 13:38:15 hi Mar 10 14:59:38 hi Mar 10 15:14:28 mdp : Hello! Mar 10 15:31:30 mdp: piiing Mar 10 15:31:35 mdp : hello! Mar 10 15:39:00 karki: it seems a lot of people want to talk with mdp about the gsoc Mar 10 15:39:13 what are you insterested in ? Mar 10 15:41:30 mines not the PRU loader, but related to the PRU. Its basically developing a firmware for the PRU so that high level languages can talk to the PRU Mar 10 15:42:09 using RPC/shared memory/some-other-method : not sure as yet Mar 10 15:42:52 karki, pong Mar 10 15:42:54 chocko, pong Mar 10 15:43:01 PRU time? Mar 10 15:43:06 oh yes Mar 10 15:44:08 glad to meet you, i hope you enjoyed your conf and the fligths Mar 10 15:44:26 chocko, conf was pretty good...but all work..less fun ;) Mar 10 15:44:51 so, first, so I get these straight... Mar 10 15:45:35 basically, i am interested in the firmware loader project as described in the wiki. I will file a proper application on the ml, but at first i have a few questions Mar 10 15:45:52 karki, I read your email..about the f/w to support high-level languages...but which Alexander did you talk to? Mar 10 15:46:20 mdp : Alexander Hiam, I'm working with him for PyBBIO Mar 10 15:46:48 ahh, ok..I've heard of that project but didn't know of alexander Mar 10 15:47:26 chocko, ok, one thing I need to understand is how far panto got with his PRU remoteproc work. Mar 10 15:48:34 afaik panto had a working pru remoteproc loader...if so, I'm unclear of the state and what work this project would be Mar 10 15:49:14 why is it needed to have the firmware to be loaded with a request_firmware seeing that it already possible to dit it with mmap ? Mar 10 15:49:52 because it would be cleaner, faster ? Mar 10 15:49:54 it's about using standard kernel interfaces Mar 10 15:50:01 ok cleaner Mar 10 15:50:25 it then allows you to make use of the virtio framework for abstraction if desired Mar 10 15:50:54 because it should still have to be loaded from userspace (sort of) after a UEVENT is sent Mar 10 15:50:59 and that's something panto was working on last year in conjunction with the failed GSoC project for the JTAG PRU implementation Mar 10 15:51:36 The idea is to support basic communication between ARM and PRU via a high level language. Then there will a custom protocol exchanged between the language library and the PRU firmware. Mar 10 15:51:48 well, you can request the load itself via a sysfs exposed "trigger" Mar 10 15:52:23 I did a simple implementation of this for the 6502 remoteproc project..but didn't upstream for unrelated reasons Mar 10 15:53:19 Based on what values the ARM processor sends to the PRU, the firmware will branch to a particular function and execute what is requested to it. Mar 10 15:53:28 karki, so are going to focus on just PyBBIO support to start? or are you planning to also implement that javascript front-end to it? Mar 10 15:54:07 in the end, is this project still available ? did someone file an application for it last year ? Mar 10 15:54:46 There has to be a front-end library to access the firmware, and I'm comfortable with PyBBIO as of now (I'm already a contributor there) Mar 10 15:54:53 chocko, well, here's the thing..we're going to have to do some digging on this. I'm trying to get responses from panto and ka6sox that had some involvement with that student last year. Mar 10 15:55:17 Jason told he will be developing a Node.js based test bench Mar 10 15:55:22 chocko, I'd hate to see you recreate some out-of-tree stuff...but, I can say that nothing like this was completed and made it upstream in the kernel. Mar 10 15:56:01 karki, ok, so jkridner will handle the bonescript side, alexander mentoring on pybbio side, and you need somebody to help mentor on the PRU end, right? Mar 10 15:56:22 ok i understand. should I do something OR only wait for an update of the project on the wiki ? Mar 10 15:56:53 mdp: yes, that's the status as of now. Mar 10 15:57:25 chocko, hang on a sec Mar 10 15:57:28 hey Mar 10 15:57:28 ahh, here he is ;) Mar 10 15:57:34 thanks for joining , panto Mar 10 15:57:45 I aim to please... Mar 10 15:57:48 Mar 10 15:57:58 or shall we say Mar 10 15:58:00 Mar 10 15:58:01 panto, chocko here was interested in the project for a loader for the pru that uses request_firmware() Mar 10 15:58:11 that's essentially part of the project from last year Mar 10 15:58:14 that's already done Mar 10 15:58:17 absolutely Mar 10 15:58:18 yeah Mar 10 15:58:27 on 3.8 Mar 10 15:58:37 things have changed/b0rked for 3.13 Mar 10 15:58:41 panto: that kernel will never die Mar 10 15:58:44 so there is work to do Mar 10 15:58:47 to be done Mar 10 15:58:47 yes Mar 10 15:58:53 yes, ok, cool Mar 10 15:58:54 good :) Mar 10 15:58:57 also the PRU compiler isn't open :) Mar 10 15:59:00 I wasn't sure how much worked or didn't work Mar 10 15:59:08 mranostay, why do you need the PRU compiler? Mar 10 15:59:10 and the new versions broke my code Mar 10 15:59:24 ELF binaries? Mar 10 15:59:25 cause it's so much easier doing stuff with it Mar 10 15:59:32 pasm doesn't do that Mar 10 15:59:39 mranostay, um, ELF binaries are not needed for remoteproc Mar 10 15:59:41 you can still use assembly for the time critical parts Mar 10 16:00:07 well, I'm not going to help with a closed compiler, that's for sure Mar 10 16:00:13 ;) Mar 10 16:00:35 so, there's a few things I'm aware of Mar 10 16:00:46 hehe Mar 10 16:00:47 1) I believe PRU still doesn't work upstream due to the hwmod reset issue Mar 10 16:00:58 and other issues Mar 10 16:01:12 lots of changes in rproc Mar 10 16:01:18 2) PRU remoteproc exists for 3.8 but not anything later...and depends on the closed C compiler due to using ELF binary loading(?) Mar 10 16:01:29 mdp, no Mar 10 16:01:37 you can use a blob just fine Mar 10 16:01:42 great Mar 10 16:01:50 however I have an idea Mar 10 16:01:53 a cunning plan Mar 10 16:02:04 panto: nonsense! Mar 10 16:02:14 the PRU is stupid simple as an instruction set Mar 10 16:02:19 yes Mar 10 16:02:20 we have a free assembler Mar 10 16:02:23 yes Mar 10 16:02:49 why don't we put someone to enable it in a modern compiler Mar 10 16:02:58 mdp: The functionalities I mentioned is the most simplistic ones, there is also certain scripting functionalities we plan to introduce where the high level language shoots a few lines code (similar to bot speak - chris rodgers) to the firmware and it interprets it. Mar 10 16:03:00 it is 32 bit Mar 10 16:03:20 llvm for instance Mar 10 16:03:32 so there is no work needed for the request_firmware ? Mar 10 16:03:33 (not gcc since the internals are way too weird for someone to grok them fast) Mar 10 16:03:36 chocko, no Mar 10 16:03:43 MDP: welcome back. mranostay: hi Mar 10 16:03:52 hi Abhishek_ Mar 10 16:04:05 is there still work needed for the PRU or the kernel ? Mar 10 16:04:23 yes Mar 10 16:04:37 someone has to port it to mainline Mar 10 16:04:44 panto, is there something concrete we could help chocko define as a useful project? Mar 10 16:04:45 and then push the patches Mar 10 16:04:51 ahh, mainline, baby! Mar 10 16:05:16 there is also this heterogenous stuff I did a long long time ago Mar 10 16:05:19 panto, so, the basic remoteproc, fix the hwmod issue, add the sysfs load interface Mar 10 16:05:19 mdp remembers Mar 10 16:05:40 those pieces seems to be the absolute minimum to me Mar 10 16:05:45 ok Mar 10 16:05:51 unified ARM userspace+PRU Mar 10 16:05:53 panto, would you agree? Mar 10 16:05:58 yes Mar 10 16:06:04 I know there's the whole communication part after that Mar 10 16:06:27 but the sysfs load interface is nothing without the whole pinmux reconfiguration required Mar 10 16:06:47 if you're changing pinmux that is Mar 10 16:07:01 well, for mainline, you are stuck with having to modify and boot with the appropriate dts Mar 10 16:07:14 I've been there before...suboptimal...but mainline Mar 10 16:07:24 my DT overlay patches will be posted this week Mar 10 16:07:35 work fine on x86 too :) Mar 10 16:07:49 panto: feel dirty? Mar 10 16:08:14 oh they might fire you if they think you're helping me out :) Mar 10 16:08:24 panto, finally another round...it's been so long I figured they were dead again :-/ Mar 10 16:09:05 meh Mar 10 16:09:14 panto: btw CC me on the patchsets Mar 10 16:09:21 not my intel address of course :) Mar 10 16:09:29 coward Mar 10 16:10:30 reminds me to ping jic21 on the iio patches Mar 10 16:10:35 mranostay: Please let. me know your thoughts on the logic analyser idea. Mar 10 16:10:49 karki, so back to yours..yes, that's sane. basically you are talking about a run to completion type firmware per command. one thing that will need to be considered is if some commands are non-blocking and notify on completion. the real question is what is the goal of offloading thing to the PRU? Mar 10 16:11:08 Abhishek_: totally doable just how complex and what mhz we can really run at Mar 10 16:11:30 also the inputs Mar 10 16:11:35 karki, if it's to leverage the low-latency i/o and determinism, then that needs to be considered in designing the RPC mechanism Mar 10 16:11:38 mdp, I had some high priority interrupts Mar 10 16:12:03 there's already an RPC mechanism Mar 10 16:12:13 in the zombie 3.8 kernel Mar 10 16:12:32 blocking ARM -> PRU call Mar 10 16:13:55 I would like to run at max MHz possible. Also requesting MDP for sup port in writing. PRU code Mar 10 16:14:31 mdp : and another problem is that all the logic is to be done in PRU assembly, it'll be awfully big and hard to maintain! Mar 10 16:14:34 Abhishek_, we've got several people with PRU experience here so not a problem Mar 10 16:14:59 mdp: can i put PRU assembly on the resume? :P Mar 10 16:15:11 sure Mar 10 16:15:25 panto, yeah, I was thinking that a non-blocking call with a notifier interrupt on completion would be preferred for certain cases. Mar 10 16:15:41 for the core. How can libsigrox help us? Mar 10 16:15:48 panto, but could be worked around Mar 10 16:16:15 Abhishek_, I saw some discussion about UIs etc. on scrollback..you should use sigrok and not reinvent things that exist there Mar 10 16:16:23 mdp, non-blocking requires buffering Mar 10 16:16:30 panto, yes Mar 10 16:16:32 and makes things more complex Mar 10 16:16:38 yes Mar 10 16:16:54 let's just say we KISS and do blocking RPCs Mar 10 16:17:05 in that case we have that already Mar 10 16:17:07 now, let's say you are calling to the PRU from javascript/python.. Mar 10 16:17:10 but it's kernel mode only Mar 10 16:17:13 low level latency and ARM acting as the bottle neck was my doubt initially, but then I looked up chris's scripting technique for bot speak. So even if I have to repeat something, one write will do. Mar 10 16:17:14 yes Mar 10 16:17:21 what's the value of blinking an led via pru pins? Mar 10 16:17:40 mdp that's not the value Mar 10 16:17:40 faster blink Mar 10 16:17:46 hehe Mar 10 16:17:58 the value is making a call like generate_waveform() Mar 10 16:18:00 there's some truthiness under the snarkiness of that Mar 10 16:18:04 and having it go on it's way Mar 10 16:18:05 yes, that's true Mar 10 16:18:08 mdp: always Mar 10 16:18:27 #troll-gsoc at play? Mar 10 16:18:44 blink is a simple example. Mar 10 16:18:59 Abhishek_: yes use sigrok :) Mar 10 16:19:02 more like "bitbang this complex thing in real time" Mar 10 16:19:12 so i can kang your code for a ELC talk in the future :P Mar 10 16:19:29 there is a lot more you could do with such function calls. Mar 10 16:19:34 we know Mar 10 16:20:01 here's the thing..you get no serious gain by mapping arduino type calls on top of RPCs Mar 10 16:20:04 and you can easily use threads on the arm side Mar 10 16:20:05 and then trace this in real time :P Mar 10 16:20:16 mdp, +1 Mar 10 16:20:19 you get a gain by doing high level calls like panto suggests Mar 10 16:20:23 forget the arduino model Mar 10 16:20:27 it's BS Mar 10 16:20:36 arduino is a toy anyway Mar 10 16:20:42 like a pru.pwm() Mar 10 16:20:50 right Mar 10 16:20:57 have high-order interfaces Mar 10 16:21:07 for instance generate_sine() Mar 10 16:21:31 maybe a pru.serialWrite(val)? such kind of calls? Mar 10 16:21:35 not try to shoehorn lowlevel stuff like 'set_dac_value()' Mar 10 16:21:46 even higher level Mar 10 16:22:52 karki, for instance Mar 10 16:23:11 pru.setLEDpattern Mar 10 16:23:14 let's say that you have a PRU program that generates a uart stream Mar 10 16:23:24 okay..... Mar 10 16:23:26 by bitbanging Mar 10 16:23:37 for some 7.5bit UART Mar 10 16:23:40 there are various level of where you can put the interface to arm Mar 10 16:23:54 you could put it at set_tx_level() Mar 10 16:24:03 that's what arduino would do Mar 10 16:24:15 and have arm generate the UART character Mar 10 16:24:22 but that's a bad thing to do with linux Mar 10 16:24:35 why? Mar 10 16:24:46 timing Mar 10 16:24:48 because the timing requirements Mar 10 16:24:49 or the lack thereof Mar 10 16:25:00 you could have a middle layer interface Mar 10 16:25:09 like transmit_uart_char() Mar 10 16:25:17 this is better Mar 10 16:25:31 because you guarantee the bit timing via the PRU Mar 10 16:25:46 pru.minebitcoin() Mar 10 16:25:49 but it's far from optimal because you will leave lots of gaps between characters Mar 10 16:26:23 I see! Mar 10 16:26:28 now, a better interface would be Mar 10 16:26:35 transmit_uart_block() Mar 10 16:26:58 cause you will make sure that even the inter-char delay is handled by the PRU Mar 10 16:27:15 Ah! yes. Mar 10 16:27:33 you can go even higher level Mar 10 16:27:47 you can submit descriptors of blocks to transmit Mar 10 16:27:47 ftp Mar 10 16:27:55 making sure that there are no gaps in the stream Mar 10 16:28:02 never gap the streams! Mar 10 16:28:14 mind the stream gaps Mar 10 16:28:47 if you take a high level view Mar 10 16:28:55 this is your standard DMA capable peripheral Mar 10 16:30:01 Basically put most of the logic in the PRU so it minimizes the number of times the kernel has to write via RPC; implying lesser delay and the PRU can carry out doing it's thing happily! Mar 10 16:30:17 Yes, like a DMA. Mar 10 16:30:17 yes Mar 10 16:30:32 the PRU is then like a very intelligent DMA peripheral Mar 10 16:31:30 smartDMA(tm) Mar 10 16:31:37 * av500 runs off to patent office Mar 10 16:31:51 av500, I'm pretty sure it has been done before Mar 10 16:32:09 this was the idea at the high level - the scripting part I was talking about earlier; yes the same thing. The only thing different was that we thought we'd start from simple blink functions. Mar 10 16:32:11 all the old freescale designs with a communication processor are like this Mar 10 16:32:23 karki, nothing stops you from starting there Mar 10 16:32:33 The scripting ensured that there is minimal write from the kernel side Mar 10 16:32:36 it's just not an efficient thing to do Mar 10 16:33:28 so once a command is issued; it could keep looping over to generate patterns. Mar 10 16:33:42 right Mar 10 16:33:44 or instance Mar 10 16:33:49 let's take the led example Mar 10 16:33:50 atleast this was what me and Alexander talked a while ago! Mar 10 16:34:19 like av500 said Mar 10 16:34:26 have something like pru.setLEDpattern() Mar 10 16:34:47 Yeah thats exactly the scripting part I had in mind :D Mar 10 16:34:50 which takes as an argument a series led pattern structs Mar 10 16:35:14 mranostay: I now divide the logic analyser into PRU capture, libsigrok based back end and a web based frontend. What do you think? Who would be able to assist us with the webapp side? Mar 10 16:35:14 Bot Speak does something similar. Mar 10 16:35:45 I am not familiar with that Mar 10 16:35:55 btw, do not do a python only interface Mar 10 16:36:06 me? Mar 10 16:36:12 anyone Mar 10 16:36:21 use something like libpru() Mar 10 16:36:34 a standard autotools based library Mar 10 16:36:37 written in C Mar 10 16:36:41 like libsoc does Mar 10 16:36:51 or even try to get your stuff in libsoc Mar 10 16:37:33 what is libpru? haven't looked at it as yet. Mar 10 16:38:03 there is none :) Mar 10 16:38:06 I wonder if jackmitchell would want pru stuff in libsoc Mar 10 16:38:08 maybe you should write it Mar 10 16:38:14 panto : how do you suggest I go about the client side? Mar 10 16:38:31 declare your RPC interfaces first Mar 10 16:38:44 and make thunk calls Mar 10 16:39:17 so the idea is that the ARM userspace program just calls a function in libpru with the same name as the function to execute at the PRU side Mar 10 16:40:41 but each one should be carefully considered as to how it can be optimally implemented on the pru side..to be better performing (in some way) than the equivalent running on the ARM Mar 10 16:40:51 otherwise it should not be offloaded to the PRU Mar 10 16:43:25 So the user space call gets translated to some value and internally is sent to the PRU, where the PRU reads the value, branches to the appropriate handler and starts execution! Mar 10 16:45:12 yes Mar 10 16:45:34 All the code on the PRU has to be handled using Assembly only? or is there a better option? Mar 10 16:46:02 assembly is the only "fully supported" option IMHO Mar 10 16:46:04 the drop in 3.8 angstrom has C Mar 10 16:46:42 yes, as we found out the compiler broke my code with the new updates Mar 10 16:48:04 Has anyone had a look at CorePy (http://corepy.org) ? Mar 10 16:48:32 It would be great if the PRU had some support like that ;) Mar 10 16:48:53 I would settle with a working free compiler Mar 10 16:49:05 generate assembly using higher level language code :) Mar 10 16:49:41 isn't that what a compiler does? Mar 10 16:49:52 It was my first idea when I thought about using PRU with a high level language. Mar 10 16:50:14 True, but this is much different, and easier to implement! Mar 10 16:50:34 panto, a free C compiler isn't a doable GSoC for most people Mar 10 16:51:36 CorePY is a python library which you can use to output assembly code! Mar 10 16:52:06 If only I had the skill to implement a complete C compiler in 3 month ;) Mar 10 16:53:33 it's not that hard really Mar 10 16:53:49 and the PRU is easy to write a compiler for Mar 10 16:54:05 all instructions are a single cycle Mar 10 16:54:38 I've worked a decent bit with compilers. but I don't know whether a full working C compiler is something I can do in three months! Mar 10 16:55:23 I've worked with parsers and code optimizers, but never built a full compiler :/ Mar 10 16:55:37 well, we're not talking about writting one from scrach Mar 10 16:55:39 *scratch Mar 10 16:56:57 but the chances of it being accepted as a GSoC project tends to nill! Most people will think it's too big. Mar 10 16:57:54 ok then :) Mar 10 17:00:46 Ok! coming back to the previous topic, is there any special way I can make use of the fact that I have 2 PRU's? With the firmware and RPC interface. Mar 10 17:02:34 panto? Mar 10 17:02:45 yes Mar 10 17:02:55 it's how I use it on the 3.8 kernel Mar 10 17:03:06 one PRU handles comms and soft-ish real-time stuff Mar 10 17:03:16 the other is doing the hard real-time loop Mar 10 17:03:34 https://github.com/pantoniou/testpru Mar 10 17:03:37 you seen this? Mar 10 17:03:47 and mranostay's led work? Mar 10 17:05:17 No, I hadn't. I'll have a look at it now. Mar 10 17:08:06 It looks like it'll be very helpful :) Thanks! which C compiler did you use? Mar 10 17:08:38 clpru? Mar 10 17:09:31 yes Mar 10 17:09:40 careful with the version Mar 10 17:09:45 sidbh can tell you all about it Mar 10 17:10:40 the newer versions are broken? is it a free software? Mar 10 17:11:09 no, it isn't Mar 10 17:11:14 they are not broken Mar 10 17:11:30 they modified the interface to the constant registers breaking my code Mar 10 17:12:49 I see. is it a free software? opensource? Mar 10 17:13:46 the compiler? Mar 10 17:13:55 or the testpru sources Mar 10 17:14:26 the compiler Mar 10 17:15:13 it's not open source Mar 10 17:15:15 it's TIs stuff Mar 10 17:16:18 So I can't use it for the GSoC? Mar 10 17:16:56 I don't know Mar 10 17:17:05 you should ask jkridner Mar 10 17:17:09 mdp seemed to not like the fact that a non open source tool was being used for GSoC Mar 10 17:17:10 but I don't see why not? Mar 10 17:17:31 jkridner : what do you say? Mar 10 17:18:37 I don't see a problem as far as the end work is open-source. Mar 10 17:18:49 well it isn't helpful if you can't build it :) Mar 10 17:19:55 I have no idea why TI is stalling on releasing it Mar 10 17:20:10 true. but it's free and also much simpler to maintain! Mar 10 17:20:19 perhaps they're waiting to have code composer working with it Mar 10 17:20:48 as in the firmware will be simpler to maintain. Mar 10 17:21:21 * sidbh thinks panto hit the mark :) Mar 10 17:21:40 stupid TI Mar 10 17:21:44 + once a opensource C compiler does come out, all the code can be ported with minimal effort. Mar 10 17:23:05 and if the firmware is written in PRU assembly, it will become redundant after a CC comes out. No one will want to maintain a assembly project when there is a C compiler staring at you :p Mar 10 17:23:20 not really Mar 10 17:23:33 you need to use assembly in parts Mar 10 17:24:15 but thats minimal as compared to having the whole project in PRU assembly! Mar 10 17:24:23 It's going to be huge! Mar 10 17:26:21 mranostay: i don't see any reason to use assembly if you can access all the requisite registers using C Mar 10 17:27:27 sometimes you need to be assured how many clock cycles you are using Mar 10 17:27:39 mranostay, +1 Mar 10 17:27:44 not depend on the C compiler version Mar 10 17:27:46 please be aware of this Mar 10 17:27:54 you can do loops with C Mar 10 17:28:04 but you can't be as accurate as with assembly Mar 10 17:28:09 however Mar 10 17:28:17 you can be pretty damn accurate even with C Mar 10 17:28:35 for reference https://github.com/mranostay/ws28xx-lighting-pru Mar 10 17:28:36 the pwm example is accurate to the microsecond with 10 pwm software channels Mar 10 17:28:55 if you need higher accuracy you have to use assembly Mar 10 17:30:16 for the WS281x LEDs you have to use assembly Mar 10 17:33:30 jkridner: accept my gsoc connection Mar 10 17:33:41 i wonder what if we control the ecap connected to main core with PRU to generate PWM Mar 10 17:35:14 obviously we have to disconnect the peripheral totally from the linux interference to do that Mar 10 17:36:35 sidbh: check the datasheet.. not sure if that is correct offhand Mar 10 17:37:55 panto : I found a lot of documentation of TI that shows ARM and PRU interactions using UIO; have they any updated documentation with remoteProc put up? Mar 10 17:38:13 not as far as I know Mar 10 17:39:13 which libraries do you suggest I use for the project? to handle interaction between the PRU and linux? Mar 10 17:39:42 mranostay: we can access the peripheral external to it i guess, all the peripherals are mapped to its memory, just don't know how much latency will be induced Mar 10 17:43:20 panto : should I go for UIO or remoteProc ? Mar 10 17:44:45 karki: remotedproc! Mar 10 17:45:38 remoteproc Mar 10 17:46:04 UIO is not going to be nice when you find out you have to handle the cache coherency by yourself Mar 10 17:47:36 what exactly is remoteProc. I don't know much about it, couldn't find the right documentation! Mar 10 17:49:18 https://www.kernel.org/doc/Documentation/remoteproc.txt Mar 10 17:58:12 thanks! Mar 10 17:59:17 does firmware loading work reliably on ARM? Mar 10 18:00:23 ? Mar 10 18:00:37 ds2: why wouldn't it? Mar 10 18:00:44 maybe I have a broken userland Mar 10 18:00:48 it rarely works for me Mar 10 18:01:07 ds2, there's a trick/bug Mar 10 18:01:13 panto: eh? Mar 10 18:01:14 the firmware is cached Mar 10 18:01:36 I see requests but can't seem to consistantly see udev or the older equiv being called reliably Mar 10 18:01:36 so if you try to load a firmware file Mar 10 18:01:48 udev firmware loading is deprecated Mar 10 18:02:04 the kernel now directly loads from the fs Mar 10 18:02:04 what's the firmware loading method dejour? Mar 10 18:02:20 direct load from filesystem Mar 10 18:02:24 oh.. so it would need the real absolute path? Mar 10 18:02:30 panto: also the annoying BBB needing it builtin Mar 10 18:02:35 in /lib/firmware/`uname -r`, /lib/firmware Mar 10 18:02:37 i.e. it would fall flat if it is dealing with chroot? Mar 10 18:02:43 yes Mar 10 18:02:50 that explains that Mar 10 18:02:54 cause the kernel is outside the chroot jail Mar 10 18:03:13 yes, I understand that and the kernel has no way of knowing which chroot it should use anyways Mar 10 18:03:38 I miss the days of nice simple .h files being compiled in Mar 10 18:03:46 you can still do that Mar 10 18:03:52 BUILTIN_FIRMWARE Mar 10 18:03:57 panto : I read up the link you gave, understood the basic remoteproc framework! are there any concrete examples for the PRU specifically? Mar 10 18:04:07 3.8 kernel sources are your friend Mar 10 18:04:08 I know about BUILTIN_FIRMWARE...that's my work around Mar 10 18:04:09 enjoy Mar 10 18:04:19 I am talking about the pre firmware loader days Mar 10 18:04:24 it's the same thing as your .h file basically Mar 10 18:04:28 where the drivers themeselves have a private .h file Mar 10 18:04:40 blame the license nazis Mar 10 18:04:48 functionally, yes, I agree. debugging wise... private .h's have less layers to trace through Mar 10 18:05:05 the firmware loader is no fun to trace through... pesky userland Mar 10 18:05:16 it's not used anymore Mar 10 18:05:22 direct kernel load :) Mar 10 18:05:27 which version did the switch? Mar 10 18:05:49 I deal with late 2.6's all the way to 3.12's on an almost weekly basis Mar 10 18:06:09 can't remember Mar 10 18:08:27 did we (am335x or OMAP) ever get a working slave driver for I2C and SPI? Mar 10 18:08:58 let me qualify that - get a working publically available one... Mar 10 18:09:34 you mean where the process is a slave instead of a master? Mar 10 18:09:39 not as far as I know Mar 10 18:09:41 yes Mar 10 18:09:48 'k... let me respond to that email Mar 10 18:10:02 there are multiple gotchas' with slave drivers and the linux device model Mar 10 18:10:12 *nod* Mar 10 18:10:16 I might be wrong though Mar 10 18:10:20 google is your friend Mar 10 18:10:36 *processor a few lines back Mar 10 18:10:53 panto: they exists in various hacks in nonpublic setups Mar 10 18:12:20 hacks is the operative word Mar 10 18:12:40 that's another gsoc project Mar 10 18:12:58 spi slave driver Mar 10 18:13:17 hehehe Mar 10 18:13:18 using it for instance for a high speed low pin count link between bb's Mar 10 18:13:32 I am sure it has been done before :) Mar 10 18:13:37 but as a hack Mar 10 18:13:55 good for a auto-fail-over setup Mar 10 18:14:01 you are assuming the hw works well enough in slave mode Mar 10 18:14:50 panto : remoteProc is a general framework on the linux side to initiate other processors, right? Where can I find PRU specific code? Mar 10 18:14:50 well... it should... Mar 10 18:14:57 3.8 kernel Mar 10 18:15:01 panto: that was more or less what was being proposed on the list Mar 10 18:15:03 drivers/rproc/pru_rproc.c Mar 10 18:15:05 mdp, the last time we were talking about sampling R31 using the PRU and moving the samples to RAM, you mentioned about having one PRU, say PRU0 read the GPI R31 and then quickly moves it to PRU1 which then moves it into the DRAM. What possible errors and latencies can occur as this takes place? Mar 10 18:15:26 the move from PRU to PRU? Mar 10 18:15:31 or the move from PRU to DRAM? Mar 10 18:15:46 move to DRAM is a perilous operation Mar 10 18:16:05 most of the times is fast Mar 10 18:16:08 sometimes, not Mar 10 18:16:20 can the DRAM issues be addressed by moving to SRAM instead? Mar 10 18:16:30 donno how busy the bus is Mar 10 18:16:39 yes, but IIRC SRAM is slower Mar 10 18:16:43 I agree, but I would like to know your opinions on the approach, how to go about doing it. Mar 10 18:16:48 but there is 64K of it Mar 10 18:17:07 Is there a possibility to use EDMA transfers? Mar 10 18:17:10 PRU -> SRAM --(via Cortex) --> DDR Mar 10 18:17:21 you trade general slowness, small size and predictable latencies for general fastness, large size and unpredictable latencies Mar 10 18:17:33 Abhishek_, yes Mar 10 18:17:44 will that need kernel patches? Mar 10 18:17:47 however, setting up the DMA transfer and tearing it down is not free Mar 10 18:17:54 probably Mar 10 18:18:03 panto: I looked at the TRM on that... it doesn't look that bad Mar 10 18:18:18 EDMA can respond to an "event" from the PRU Mar 10 18:18:27 so it isn't a full setup needed Mar 10 18:18:31 yes Mar 10 18:18:47 however figuring out how to do that is not easy Mar 10 18:18:56 no public examples of how to do it Mar 10 18:19:02 and very cryptic docs Mar 10 18:19:23 probably all the people than know how to do it are laid off as well Mar 10 18:19:51 yes! Mar 10 18:19:57 hence, GSoC project ;) heheh Mar 10 18:20:20 I wasn't very happy dealing with event config and the PRU Mar 10 18:20:25 panto: is the EDMA in the AM335x same as the EDMA in the OMAP3/4/....? Mar 10 18:20:28 very time consuming Mar 10 18:20:33 yes Mar 10 18:20:35 same driver Mar 10 18:20:41 but same IP block? Mar 10 18:20:45 Since it's a logic analyser, data transfer will be practically continuous, so will tearing down EDMA will be required once transfer is set up? Mar 10 18:20:48 should be the same Mar 10 18:20:50 mdp knows more Mar 10 18:21:00 Abhishek_, no Mar 10 18:21:12 you should set up the DMA transfers in ping pong mode Mar 10 18:21:17 EDMA can be configured to loop among descriptors Mar 10 18:21:19 and let it rip Mar 10 18:21:29 yeah, "Circular Mode" from my STM32 Experience Mar 10 18:21:36 the trick is to figure out the correct incantations Mar 10 18:21:43 you have to move the data though out of the circular buffer to some place else for processing Mar 10 18:22:01 Abhishek_: I have my project that has similar requirements Mar 10 18:22:20 yeah, right, so the buffer has to be adequately sized so that I have sufficient time to process the bitstream using the A8 Mar 10 18:24:08 panto : I couldn't find drivers/rproc/pru_rproc.c on the beagleboard's linux tree Mar 10 18:24:16 so the circular buffer would be set up in SRAM or DRAM? Mar 10 18:24:31 DRAM Mar 10 18:24:45 there is like 64K of SRAM on the chip total and some of it gets used by PM Mar 10 18:24:49 drivers/remoteproc/pru_rproc.c Mar 10 18:25:06 I was toying with SRAM to see if I can get out of figuring out the spell book for EDMA Mar 10 18:25:31 DRAM as pointed out by panto before requires this nasty thing called refresh Mar 10 18:26:01 Abhishek_: for a LA, you could try to do compression on the other PRU before shipping things over Mar 10 18:26:04 yep, so RAS/CAS latencies would come into play? Mar 10 18:26:10 that would put you on par with the USB dongles Mar 10 18:26:17 hmm, something like RLE Mar 10 18:26:36 Abhishek_: sort of...except we are on DDR3 and sitting behind a smart controller Mar 10 18:26:57 and the bus to the "DRAM" is shared with the A8 Mar 10 18:27:19 Abhishek_, yes, we talked about this Mar 10 18:27:19 ds2: The goal is similar; I expect to squeeze every bit of bandwidth. Mar 10 18:27:26 definitely use RLE on PRU Mar 10 18:27:40 you are going to be bandwidth limited Mar 10 18:27:54 for my use, I can't do RLE.. I need both PRUs doing stuff Mar 10 18:27:57 panto: I can't recall Mar 10 18:28:15 ds2, even something rudimentary will work Mar 10 18:28:22 panto : the linux repo of beagleboard on github? Mar 10 18:28:45 karki, probably Mar 10 18:28:47 panto: this? "you trade general slowness, small size and predictable latencies for general fastness, large size and unpredictable latencies" Mar 10 18:29:02 it is even simplier with a LA Mar 10 18:29:10 Abhishek_, that's SRAM vs DRAM Mar 10 18:29:12 a lot of USB dongle style LAs only have 2K of RAM Mar 10 18:29:22 and they stop acquiring when it is full Mar 10 18:29:34 I do not want that to happen actually Mar 10 18:29:38 stopping is an option here... Mar 10 18:29:41 panto : it's not there...... Mar 10 18:29:52 okay, I need to go...will check in later Mar 10 18:30:24 ds2: That's what my goal is, and I bet that's going to need the max amount of bandwidth in this project Mar 10 18:30:36 perhaps this is the 3.13 version? Mar 10 18:31:08 yup, where can I find the 3.8? Mar 10 18:31:10 use koen tree: git://github.com/koenkooi/linux.git Mar 10 18:32:22 okay, I was on the wrong branch! Mar 10 18:35:49 dinner time Mar 10 18:36:38 Had a look :) So remote proc defines an interface only on the linux side? or does it also call for a protocol to be handled on the PRU side ? Mar 10 18:49:14 mranostay: did you have a look at my thread in the Google Groups: https://groups.google.com/forum/#!topic/beagleboard-gsoc/ELcK0RK7Cp0 Mar 10 19:25:38 the student applications are open! where can I find the template for BB.org? Mar 10 19:47:23 mranostay : ping Mar 10 19:48:01 karki: pong Mar 10 19:49:22 ds2/panto, edma on am335x is the same as davinci...omap3/4 have "SDMA" or "OMAP DMA" in the driver source Mar 10 19:49:57 I was looking at your source code ; led pru one Mar 10 19:50:28 is EDMA implemented in the kernel drivers that access PRU? Mar 10 19:50:57 I quite didn't understand how remote proc comes in there! ( It's more like my problem understanding remote proc itself) Mar 10 19:51:45 Abhishek_, no, you have to write EDMA support yourself for the PRU Mar 10 19:52:30 there's an edma driver that's for linux on the arm...and the only thing you do for PRU from the Linux side is reserve channels for use by the PRU in the dts..so Linux doesn't touch them Mar 10 19:53:04 where would this be documented? Mar 10 19:53:38 the driver stuff is undocumented except in the source code Mar 10 19:53:40 mranostay: which parts of your code goes into the PRU as firmware? which parts run on the linux side? Mar 10 19:54:11 I mean, the DTS stuff that has to be modified? Mar 10 19:54:33 (device tree modifications) Mar 10 19:54:53 karki: all of it is firmware Mar 10 19:54:58 I was about to show you the DT binding for EDMA and remembered that joel dropped the reservation property to upstream that driver Mar 10 19:55:17 karki: some kernel patchs in koen's evil vendor tree Mar 10 19:55:25 to enable spidev Mar 10 19:56:14 Abhishek_, so it's not critical anyway, you just look at the TRM EDMA channel map and choose an unused channel or two that the PRU will use Mar 10 19:56:52 but isn't the remote proc for the linux side? Mar 10 19:57:30 Why would you need it if it were all firmware that goes on the PRU? Mar 10 19:58:14 I meant all your code is PRU code. Mar 10 19:58:21 karki: you need a interface back Mar 10 19:58:25 mdp: Okay, and then on the PRU side, the GPI R31 would be mapped onto a memory location like you have suggested and then the EDMA will read from there and place the data on a DRAM ring buffer for processing, correct? Mar 10 19:59:45 so the remote proc framework defines interface for both linux side and PRU side? Mar 10 19:59:57 both have to adhere to it? Mar 10 20:00:58 Abhishek_, you would to incrementing stores to sram to buffer those samples..and then have the edma programmed to transfer those to a DRAM buffer Mar 10 20:01:18 s/to/use/ Mar 10 20:02:34 mdp, mranostay : do you have an idea how large would that DRAM buffer have to be so that the required processing by libsigrok could complete before it takes in the next batch of samples? Mar 10 20:03:51 not sure ,I think this is an area where optimal size would be determined by experimentation Mar 10 20:04:13 yeah continous samples isn't really supported entirely in sigrok yet Mar 10 20:04:15 also, not sure how this arrived at edma being necessary... Mar 10 20:04:26 dma isn't going to help here Mar 10 20:04:32 why? Mar 10 20:04:37 I wonder...why not keep it simple and just read to sram ping pong Mar 10 20:04:58 and let userspace map that with a shim driver and siggrok will be happy Mar 10 20:05:08 sigrok even Mar 10 20:05:29 you already have to read to sram...and the sram can be exposed directly to userspace Mar 10 20:05:46 so what's the point of dma? Mar 10 20:06:35 mranostay : did the PRU have to have had a interface beck even with the UIO. because I remember using normal assembly without bothering about the UIO interface. Mar 10 20:07:09 I wonder though, how to avoid arbitration issues..not sure of the behavior of pru srams with a master accessing from the crossbar..and a pru0/1 accessing from within the PRUSS Mar 10 20:07:24 mdp: I see, but I was just exploring different approaches to the problem Mar 10 20:07:31 ok Mar 10 20:07:49 I'm back for a bit Mar 10 20:07:52 I know it is going to be very very tricky and would take up nearly 2/3rd of the coding time Mar 10 20:08:36 mdp, shared ram arbitration is screwed when both arm + PRU try to access at the same time Mar 10 20:08:48 it could be a problem with sram as well Mar 10 20:08:49 Abhishek_, appears to be no gain..the key to all of this is designing something that allows max sampling rate on r31..without stalling Mar 10 20:08:59 exactly Mar 10 20:09:20 panto : I was discussing with mranostay about writing firmware with remote proc for the PRU. I had a couple of doubts Mar 10 20:09:25 shoving samples through the scratch registers is a starting point at least Mar 10 20:09:41 then you let that second pru deal with arbitration issues Mar 10 20:10:00 panto, so in your experience...you get stalls? or boundedly undefined behavior? Mar 10 20:10:01 doesthe remote proc framework enforce an interface for both linux side and PRU side? Mar 10 20:10:37 but then how to sync the two PRUs together so that PRU1 triggers only when it detects data being pushed to it through PRU0? Mar 10 20:11:31 panto : did the UIO require something like this? I remember seeing normal assembly on the PRU side and only linux side had to bither with UIO! Mar 10 20:11:35 *bother Mar 10 20:12:00 Does there exist a disassembler for PRU executable .bin's ? Mar 10 20:12:44 praveendath92: ping Mar 10 20:13:06 Hello Mar 10 20:13:17 Did you see my mail ? Mar 10 20:13:20 saw the post, that is the demo from startware right ? Mar 10 20:13:25 or how that thingie is called Mar 10 20:13:36 Yeah Mar 10 20:13:45 nice that it works Mar 10 20:13:57 BB and BBB use the same kernel as i know, right / Mar 10 20:14:13 Yeah. Now i should try modifications to the code. Mar 10 20:14:22 karki: yes the pru_remoteproc.c (sp?) does Mar 10 20:14:25 because i had many issues with the usb system on the BBB Mar 10 20:15:20 So, what do you think can be done next ? Mar 10 20:15:36 I have all the source code. Mar 10 20:15:53 Android part was pretty clear to me. Mar 10 20:15:59 av500: on the BBB side for the communication still libusb is going to be used right ? Mar 10 20:16:09 mranostay : what about UIO? did it enforce any such thing? Mar 10 20:16:39 android is not that hard, java is plain easy there Mar 10 20:16:41 mdp, no, I don't get any stalls Mar 10 20:16:49 just be sure to do all the checks for the pid/vid right Mar 10 20:17:02 after you setup everything and avoid DRAM the whole thing is smooth Mar 10 20:17:12 pid/vid ? Mar 10 20:17:13 my suggestion is to put libusb on the BBB and try communicating over ADK with it Mar 10 20:17:23 karki: no uio you read raw memory addresses Mar 10 20:17:24 even with C code and the uncertainty of using cycle count registers Mar 10 20:17:34 usb devices are identified via a pair of integers, vid = vendorID; pid = productID Mar 10 20:17:43 they will be the same for al BBB Mar 10 20:17:49 cuz they have the same SoC Mar 10 20:17:56 the pwm waveforms were steady even when sampled in a scope's persistence mode Mar 10 20:18:34 panto, I'm left confused as usual ;) Mar 10 20:18:44 what I mean is this Mar 10 20:18:44 I thought the binaries included libusb for BBB Mar 10 20:18:49 Let me check. Mar 10 20:18:58 using the testpru example Mar 10 20:19:06 mranostay : so even to send an interrupt between two PRU's or from PRU to ARM we need the remote proc functions, right? And from ARM to PRU you obviously need them. Mar 10 20:19:24 where a bunch of pwm channels are created by bitbanging using C Mar 10 20:19:38 karki: checkout out my beagle-nixie project Mar 10 20:19:44 using a scope to sample any output Mar 10 20:20:10 that is how the remoteproc prutest app from panto is doing as well Mar 10 20:20:15 and putting the scope display in persistence mode 'aka eye pattern for digital periodic waveform' Mar 10 20:20:28 panto, but you aren't streaming data into share ram Mar 10 20:20:33 no Mar 10 20:20:39 panto, you setup and let the pru do something? Mar 10 20:20:44 yes Mar 10 20:20:45 panto, do this waveform Mar 10 20:20:47 I didn't use streaming Mar 10 20:20:47 right Mar 10 20:21:14 so in my tests I've seen that the shared data ram in the PRUs is not arbitrated properly Mar 10 20:21:20 mranostay : thanks :) Mar 10 20:21:49 so when both the ARM + PRUs try to access it, it is not doing it properly Mar 10 20:21:51 well, the easy way out here is to support an 8KiB buffer max and forget about it Mar 10 20:22:09 KISS LA Mar 10 20:22:11 praveendath92: no, as i remember that code does not use libusb Mar 10 20:22:15 nixie is UIO based, right? Mar 10 20:22:45 I haven't use the 64K sram Mar 10 20:22:45 karki: yeah Mar 10 20:22:54 *used Mar 10 20:22:55 that is old way of doing it Mar 10 20:23:10 UIO is tempting because it's easier Mar 10 20:23:14 but it's a deadend Mar 10 20:23:16 but don't do it Mar 10 20:23:18 the SRAM requires coordination with the PM code Mar 10 20:23:38 ds2, ? Mar 10 20:23:38 maybe i should rewrite my nixie code into remoteproc Mar 10 20:23:45 but have to rebuild the clock Mar 10 20:23:52 mdp: the SRAM in the 335x is used by the PM firmware for wakeups, IIRC Mar 10 20:23:53 ds2, I'm talking about the PRUSS sram Mar 10 20:23:55 no no Mar 10 20:24:06 It doesn't i guess. But isn't it fine to work with the starterware kit ? Mar 10 20:24:09 but why is the PRU code so complicated when it comes to remote proc? Mar 10 20:24:17 got it Mar 10 20:24:24 Thats what I don't get! Mar 10 20:24:28 but the non PRUSS SRAM is bigger Mar 10 20:24:39 don't know if u can adapt it from debian to work, have no clue here maybe someone can share some light/info :) Mar 10 20:24:45 8KiB share ram is plenty big for a simple LA Mar 10 20:25:08 if there is proper triggering, yes Mar 10 20:25:37 mdp, don't use the shared sram in data Mar 10 20:25:37 and for triggering we would have to set up events? Mar 10 20:25:44 *data sram Mar 10 20:25:51 in the PRU, arbitration problems Mar 10 20:25:52 I didn't install any OS to BB Mar 10 20:25:53 ds2: any idea if the starterware kit can be used from debian? the usb functions mainly Mar 10 20:26:14 praveendath92: yes, but the final project will have an OS on the BBB that speaks with the Android device. Mar 10 20:26:15 vvu|Log: no idea... I haven't used any official supported stuff in ages Mar 10 20:27:00 panto: so the Data RAM in the PRU should not be accessed from the ARM if the PRU is running? does that comment apply to the Shared RAM in the PRUSS? Mar 10 20:27:08 Okiee. I get it now. So the starterware can't go with OS ? Mar 10 20:27:12 panto, no arbitration problems if you aren't accessing simultaneously Mar 10 20:27:23 you run to complete, then arm accesses when it's idle Mar 10 20:27:26 Or we need to find out if it does. Right ? Mar 10 20:27:34 for a non-continuous sampling implementation Mar 10 20:27:37 vvu|Log: why the interest in starterware? Mar 10 20:27:45 ds2, yes, shared SRAM in PRUSS Mar 10 20:27:55 OH Mar 10 20:27:58 blah Mar 10 20:28:02 Is StarterWare akin to bare metal development in ARM A8? Mar 10 20:28:04 mdp, I don't know if you're safe Mar 10 20:28:14 how could I not be safe? Mar 10 20:28:19 ds2: the have ADK support in starterware Mar 10 20:28:22 I wonder if that arbitration issue applies to EDMA? Mar 10 20:28:25 cause if ARM/PRU get out of sync and you try to access you're scramble it Mar 10 20:28:29 for the Android remote display project Mar 10 20:28:30 it's only the PRU touching the internal sram Mar 10 20:28:43 panto, is the PRUSS a big POS or what? Mar 10 20:28:57 vvu|Log: you can probally hack it out of there... it is Linux...the main thing is any library dependencies Mar 10 20:28:59 no, when PRUs do it it's OK Mar 10 20:29:07 it's when ARM+PRU does that there's a problem Mar 10 20:29:14 panto, well, I want to know how ethercat etc. are managed then Mar 10 20:29:23 panto: What about just stopping the PRU entirely and then reading it out that way? Mar 10 20:29:28 ds2: yep that worries me not to be really crappy to adapt it, was thinking about still going libusb road cuz it went really of for me last year Mar 10 20:29:29 yes that works Mar 10 20:29:29 sounds like something is being done wrong Mar 10 20:29:48 in fact that's how the RPC is done from ARM to the PRU Mar 10 20:29:56 vvu|Log: I'd try both..spend maybe a day hacking it out and if that doesn't look good, change strategies Mar 10 20:30:08 panto, that would work for the LA case, as well Mar 10 20:30:15 ah.. .good old fashion 6502 multiprocessor design Mar 10 20:30:16 praveendath92: ^^ Mar 10 20:30:18 PRU is halted, register contents are altered Mar 10 20:30:42 the smell of Antic and 6502 permeates the air Mar 10 20:30:55 c64 for evah Mar 10 20:31:06 and on that retro note, I'll going to bed Mar 10 20:31:08 cya tomorrow Mar 10 20:31:15 praveendath92: for this project the android part don't think will be the problem or won't be that big on an issue. Mar 10 20:31:16 Got it Mar 10 20:31:23 There has been some previous work on LA with a BBB here <= http://linux.thaj.net63.net/2014/01/logic-analyzer-with-your-beaglebone.htm Mar 10 20:31:26 cuz u do not need any special kernel modules for ADK or something Mar 10 20:31:48 try an see if anybody used starterware in normal OS Mar 10 20:31:57 did the c64 do DMAs? Mar 10 20:31:58 Okiee. So for next, should I try with libusb or.. Mar 10 20:32:10 Okiee. I will try if I can get some info on that. Mar 10 20:32:27 On ataris, the Antic processor halts the 6502, gets memory, resumes and that repeats (Antic does video) Mar 10 20:32:27 i have no insight about starterware, maybe if u can find somebody that knows more Mar 10 20:32:38 try and ask on #beagle maybe there are some TI people over there to share some info Mar 10 20:32:51 for libusb Google is your friend, have all the info u need there Mar 10 20:32:51 That's a good idea. Mar 10 20:33:09 also if you want me to take a look over your proposal just ping me Mar 10 20:33:20 Yeah sure. Mar 10 20:34:03 mranostay : Do you have an example with remote proc but using only assembly on PRU? Mar 10 20:34:03 One more thing, to clarify, did someone work on libusb and starterware Android app ? Mar 10 20:34:26 i don't get ur question Mar 10 20:34:42 I mean any past work on libusb with Android ? Mar 10 20:34:49 karki: yeah my LED code :) Mar 10 20:34:54 on core 2 Mar 10 20:34:58 me :) Mar 10 20:35:02 well 1 Mar 10 20:35:06 I was initially looking at linusb Mar 10 20:35:11 libusb* Mar 10 20:35:17 That's great ! Mar 10 20:35:23 last year i did libusb on the BBB and USB Host on the Android side Mar 10 20:35:33 Could you tell me a bit on what you did ? Mar 10 20:35:50 mranostay : Also how come stdio functions work on pru? isn't there a sys call supposed to be happening internally? Mar 10 20:36:41 Are you referring to this ? - https://github.com/praveendath92/libusb-android Mar 10 20:36:49 after custom kernel+ramdisk loaded from u-boot i was needde to send the image which was to be flashed Mar 10 20:36:52 no no Mar 10 20:36:57 no libusb on the android side Mar 10 20:37:05 android does only USB via ADK Mar 10 20:37:10 no extra libs or smth there Mar 10 20:37:16 Okiee. Mar 10 20:37:38 i was running libusb on the BBB side, to receive stuff from android which was doing USB Host Mar 10 20:38:00 on my GitHub BBBlfs Mar 10 20:38:01 So you were successful at communicating with Android from BBB ? Mar 10 20:38:06 yes Mar 10 20:38:11 mranostay : so it's not necessary to use remoteproc.h on the PRU side? Mar 10 20:38:12 <_av500_> praveendath92_: hi Mar 10 20:38:16 <_av500_> I missed you yesterday Mar 10 20:38:56 <_av500_> praveendath92_: please have a look how ADK works Mar 10 20:39:10 <_av500_> praveendath92_: oh btw, do you have an android device to develop on? Mar 10 20:40:26 Sorry. Having issue with my conection. Mar 10 20:40:37 <_av500_> np Mar 10 20:40:40 <_av500_> praveendath92_: oh btw, do you have an android device to develop on? Mar 10 20:40:47 Yeah. I do. Mar 10 20:40:57 A Galaxy S2 and a Nexus 10 Mar 10 20:41:11 I borrowed a BB from a friend Mar 10 20:41:30 <_av500_> good Mar 10 20:41:36 @vvu I will take a look at your repo Mar 10 20:41:38 mranostay : how different is the printf implementation for the PRU? Mar 10 20:41:49 <_av500_> praveendath92_: did you ever look at linux kernel programming? Mar 10 20:42:17 No. I'm familiar with Android and C programming. Mar 10 20:42:20 * vvu|Log started his OS course at university right now and already crashed his kernel a couple of times :) Mar 10 20:42:23 And hardware too. Mar 10 20:43:16 I can go over the course content if it needs me to. Mar 10 20:43:32 @vvu, what do you think ? Mar 10 20:43:44 wtf is "Android" programming? Mar 10 20:44:04 is that yelling out to Lt. Cmdr Data? Mar 10 20:44:08 <_av500_> java :) Mar 10 20:44:12 ds2: messing up with some java classes last time i heard Mar 10 20:44:37 @Am I missing some connection :| Mar 10 20:44:59 then say java programming Mar 10 20:45:26 hence forth I shall call it java programming. Mar 10 20:45:29 :) Mar 10 20:46:02 <_av500_> so we have 2 or 3 basic steps Mar 10 20:46:10 <_av500_> 1) get ADK host running on BBB Mar 10 20:46:21 <_av500_> and thus establish a connection to android phone Mar 10 20:46:24 * vvu|Log so wanted to do this project last year :( Mar 10 20:46:36 <_av500_> 2) write a virtual/dummy framebuffer Mar 10 20:46:45 <_av500_> 3) move framebuffer data to phone Mar 10 20:46:53 <_av500_> and keypresses in the other direction Mar 10 20:47:14 That is clear. Thanks @av500 Mar 10 20:47:18 <_av500_> vvu|Log: you cant have all the fun! :) Mar 10 20:47:28 @vvu https://github.com/ungureanuvladvictor/BBBlfs is this the repo you were referring to ? Mar 10 20:47:39 _av500_: are you favoring creating a /dev/fb0 and a corresponding /dev/input/eventN on the Beagle side? Mar 10 20:47:40 <_av500_> praveendath92: so, mostly ADK is used on microcontrollers Mar 10 20:47:50 yep, just look at how i was doing communication Mar 10 20:47:53 <_av500_> for "accessories" Mar 10 20:48:09 <_av500_> not aware there is a stock linux implementation Mar 10 20:48:12 <_av500_> but then, that should not be too hard Mar 10 20:48:45 <_av500_> ds2: similar to the USB framebuffers Mar 10 20:49:07 <_av500_> I forgot the chipset name Mar 10 20:50:39 I will get started with the ADK kit Mar 10 20:50:58 on BBB Mar 10 20:51:34 _av500_: i still have one question how can you from a linux module do communication over usb ? *have in mind i just started Kernel programming one week ago* Mar 10 20:51:51 _av500_: I mean what will be seen on the Beagle userland side Mar 10 20:53:24 <_av500_> ds2: some /dev/fb Mar 10 20:53:27 <_av500_> I guess Mar 10 20:53:37 <_av500_> whatever X needs to draw pixels into Mar 10 20:54:14 <_av500_> displaylink Mar 10 20:54:17 <_av500_> thats the name Mar 10 20:54:24 <_av500_> praveendath92_: please look at DisplayLink Mar 10 20:55:02 <_av500_> http://www.displaylink.com/for-business/common_questions.php Mar 10 20:55:13 <_av500_> basically we would make something similar Mar 10 20:55:20 <_av500_> with an android evice being the "monitor" Mar 10 20:55:28 <_av500_> maybe we can even reuse the protocol Mar 10 20:56:19 Taking a look. Mar 10 20:57:33 so definite kernel screwing around Mar 10 20:57:56 <_av500_> yes Mar 10 20:59:31 I was looking at https://github.com/ungureanuvladvictor/BeagleDroid does this need Kernel modifications ? Mar 10 20:59:56 this was the Android app, in the end the Android Kernel needed to have RNDIS Module in it Mar 10 21:00:06 <_av500_> praveendath92: this is different Mar 10 21:00:10 <_av500_> different use case Mar 10 21:00:14 nothing wrong with kernel mods Mar 10 21:00:26 so it did not work on stock Android devices, but we are talking about different kernels Mar 10 21:00:29 <_av500_> in last years project the phone was host and the BBB was device Mar 10 21:00:42 <_av500_> praveendath92: dont look to much into last years ghsoc Mar 10 21:00:43 <_av500_> gsoc Mar 10 21:00:55 <_av500_> look into ADK and displaylink Mar 10 21:01:04 I guess I'm running around too much. Mar 10 21:01:05 <_av500_> thats relevant Mar 10 21:01:25 Thanks. I will just look at ADK now and then displaylink. Mar 10 21:01:26 _av500_: how will the communication be done from the BBBs point of view? Mar 10 21:01:42 i'm still wandering at that question Mar 10 21:05:28 <_av500_> via adk Mar 10 21:05:30 <_av500_> no? Mar 10 21:05:42 <_av500_> I assume one can use ADK to send and receive data Mar 10 21:06:51 yes but from the kernelspace i was wondering Mar 10 21:07:11 what will be used more concrete, libusb or code from starterware Mar 10 21:08:00 to do a vfb, you'll need to be in the kernel anyways Mar 10 21:08:18 <_av500_> vvu|Log: neither Mar 10 21:08:37 <_av500_> vvu|Log: usb host drivers in the kernel can "talk" over USB Mar 10 21:08:45 <_av500_> thats the whole purpose Mar 10 21:08:52 okok i got the idea :) Mar 10 21:08:54 <_av500_> libusb is to give userpcase usb access Mar 10 21:09:01 <_av500_> krnel already has it Mar 10 21:09:03 <_av500_> kernel Mar 10 21:09:08 Small clarification, libusb, ADK and starterware are all different right ? Mar 10 21:09:24 ok now i got how the full thingie should work Mar 10 21:09:38 <_av500_> praveendath92: libusb is a library Mar 10 21:09:45 <_av500_> ADK is a protocol Mar 10 21:09:52 <_av500_> startware is a TI thing Mar 10 21:09:58 <_av500_> ignore it for now Mar 10 21:11:16 So, if we were to use the TI thing then we don't have to worry much about the protocol and other modifications. However, the drawback is that doesn't on top of an OS on BB. Right ? Mar 10 21:12:31 <_av500_> praveendath92: to be honest, I have no idea what "the TI thing" does Mar 10 21:12:31 <_av500_> :) Mar 10 21:12:34 We would want to run a OS on BB and do the communication with Android too. So, we shall be using libusb with ADK. Mar 10 21:12:42 <_av500_> no Mar 10 21:12:51 <_av500_> we would have a kernel ADK driver Mar 10 21:13:03 <_av500_> as a first step Mar 10 21:13:15 Okiee. Mar 10 21:13:20 <_av500_> libusb makes the communication pipe end up in userspace Mar 10 21:13:22 forget these stupid terms Mar 10 21:13:27 <_av500_> we want it in kernel space Mar 10 21:13:35 ADK is just another USB protocol where the normal senses are swapped around. Mar 10 21:13:53 <_av500_> depends on what "normal" is Mar 10 21:14:01 <_av500_> its the stupidity of USB to have host and device Mar 10 21:14:03 you can call it a DDK - Dumb Developers Kit if you want... it makes no difference Mar 10 21:14:10 <_av500_> intel had npo longterm vision Mar 10 21:14:15 _av500_: what about I2C? SPI? ;) Mar 10 21:14:21 'night Mar 10 21:14:24 <_av500_> :) Mar 10 21:14:25 <_av500_> night Mar 10 21:14:32 <_av500_> ds2: yeah well Mar 10 21:14:52 It was confusing but I think I got it now. Mar 11 02:56:41 * mranostay wanders in **** ENDING LOGGING AT Tue Mar 11 02:59:59 2014