**** BEGIN LOGGING AT Fri Mar 18 02:59:58 2016 **** BEGIN LOGGING AT Fri Mar 18 04:53:32 2016 Mar 18 05:23:36 http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs#LAB_5:_RPMsg_Communication_between_ARM_and_PRU Mar 18 05:23:48 kernel sample drivers even Mar 18 05:27:05 pretty sure there's a native cgt package to install on bbb Mar 18 05:27:31 otherwise the above has cross-compile examples using ti/linaro toolchains Mar 18 15:06:33 bradfa: what do you think about my application? Mar 18 15:08:16 pmezydlo: I did a quick read through this morning, overall I think it looks pretty good! Mar 18 15:08:27 pmezydlo: I think you should remove the hardware parts Mar 18 15:09:09 pmezydlo: I think you should expand upon the last bit where you point to some existing people asking about SPI slave implementation, to better cover actual Linux code proposals and what their shortcomings are Mar 18 15:10:41 bradfa: I think it's a good idea Mar 18 15:12:25 bradfa: well I will try to remove the things of hardware Mar 18 15:13:14 bradfa: In monday will send a second proposal Mar 18 15:20:31 pmezydlo: ok, good! :) Mar 18 15:21:06 pmezydlo: I believe students are being encouraged to start putting their draft proposals into the official google system, as students can continue to modify their proposals up until the submission date Mar 18 15:23:21 anyone seen carpediem in here recently? Mar 18 15:28:03 I was looking forward to their proposal, and now they seem to have completely disappeared :| Mar 18 16:06:29 Hi, I would like to apply for GSoC Mar 18 16:06:29 I'm interested in the idea "FlightGear remote Cockpit on BBB" Mar 18 16:07:56 While I don't have any UI experience, I'm an avid aviation fan, and have played a lot of flightgear (and other sims). Mar 18 16:07:56 I do have some general programming experience as well, mainly with android (firmware development) Mar 18 16:11:43 Hi Mar 18 16:33:04 alexhiam: I am little confused about the kernel part.. Mar 18 16:34:04 alexhiam: There is only mpu9250 kernel driver and pru servo kernel driver which have to be developed.. right?? Mar 18 16:34:17 alexhiam: every other driver is already present.. Mar 18 17:45:02 jkridner: ping :) Mar 18 18:02:43 kiran4399: I'm not sure. Have you looked for drivers for the other parts? Mar 18 18:03:10 alexhiam: yeah.. Mar 18 18:03:15 all of them seem to be inplace.. Mar 18 18:03:44 develop MPU9250 driver?! Mar 18 18:04:12 something wrong with the existing drivers? Mar 18 18:04:14 ds2: mpu9250 and pru servo drivers are the only things which need to be developed.. Mar 18 18:04:23 why? Mar 18 18:04:38 ds2: well, all the others are already present.. Mar 18 18:04:42 what kind of servos is the PRU hooking up to? Mar 18 18:04:56 kiran4399: there should be a driver for the mpu9250 already Mar 18 18:05:14 ds2: not in the kernel.. Mar 18 18:05:19 it is not yet present.. Mar 18 18:05:29 kiran4399: cool. Also be sure to look into the current state of the invensense driver, I saw some invensense code recently in android I think that looked like it might actually fully support the 9250 Mar 18 18:05:35 which version/branch? was that in linux-next queue? Mar 18 18:05:37 kiran4399: i see emails for fixes to it Mar 18 18:05:49 I think it might just be an older version that's currently in mainline Mar 18 18:05:52 so either it is fixing non existant drivers or.... Mar 18 18:06:07 kiran4399: are you looking for MPU 9250 explicitly? Mar 18 18:06:16 ds2: that's what's on the beaglebone blue Mar 18 18:06:35 https://github.com/beagleboard/linux/tree/4.1/drivers/iio/imu Mar 18 18:06:58 you should look at 4.4 Mar 18 18:07:00 alexhiam: the driver might not be under that explicit name Mar 18 18:07:01 we want to make sure it's fully supported in beagleboard/linux, which may just mean grabbing a patch from mainline or android Mar 18 18:07:06 let me look for the datasheet Mar 18 18:07:35 latest patches are in robert's queue i think Mar 18 18:07:43 ds2: yeah, I think there's a general invensense driver in android that supports all of them through some config values Mar 18 18:07:56 then they go to denys/ti-staging Mar 18 18:08:38 kiran4399, alexhiam: please read the product page and search for other names - http://www.invensense.com/products/motion-tracking/9-axis/mpu-9250/ Mar 18 18:08:40 sigh Mar 18 18:09:39 students looking at pru/kernel stuffs should really be going through the ti examples Mar 18 18:09:47 and as for the servos... Mar 18 18:09:51 http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs#LAB_5:_RPMsg_Communication_between_ARM_and_PRU Mar 18 18:10:38 ds2: lol, is that a sigh of it's right there on the product page? Mar 18 18:11:00 alexhiam: that page should have been the starting point that tells you what to look for Mar 18 18:11:11 if you think it's too easy try it with am33x-v4.5 (Stable) kernel Mar 18 18:11:17 a driver specifically for the MPU9250 makes no sense if that page has been seen Mar 18 18:12:02 and if you check mailing list archives, there have been drivers posted on various ML's for quite a while Mar 18 18:13:12 cool, well then kiran4399, that's just a matter of making sure the right patches get to beagleboard/linux Mar 18 18:13:12 maybe look at their sdk even Mar 18 18:14:20 meh, need to make an account just to see their developer stuff Mar 18 18:22:33 "Embedded MotionDriver 6.12 is our first ever 9-axis solution not locked to a specific MCU.Version 6.1.2 is an update to 6.1 that includes bug fixes and new libraries. This release is supported across all ARM Mx core architectures and supports the InvenSense MPU-6000, 6050, 6500, 9150, and 9250" Mar 18 18:23:24 what's the license on that? Mar 18 18:23:58 Hey alexhiam I have written the hello world driver.Please have a look https://github.com/chanakya-vc/BBB-Gsoctry/tree/master/Drivers Mar 18 18:24:54 chanakya_vc: cool, and you've compiled and loaded it? Mar 18 18:25:28 alexhiam: I think we need not even write the pru_servo driver.. Mar 18 18:25:31 Yes.I did Mar 18 18:25:37 alexhiam: it's already there.. Mar 18 18:25:41 alexhiam: did you see? Mar 18 18:25:54 kiran4399: in the ardupilot stuff? Mar 18 18:26:12 alexhiam: yeah... the other day m_w showed. Mar 18 18:26:12 In fact I have provided the instructions to compile and the makefile there. Mar 18 18:26:13 remember? Mar 18 18:26:27 isn't a pull require part of it? Mar 18 18:26:48 kiran4399: I remember there was some pru firmware. I didn't look to see if there was a kernel driver as well Mar 18 18:26:57 let me give you the link Mar 18 18:28:24 alexhiam: https://github.com/diydrones/ardupilot/tree/master/Tools/Linux_HAL_Essentials/pru/aiopru.. Mar 18 18:28:33 is'nt this a driver? Mar 18 18:28:47 yuck, mmap! Mar 18 18:29:08 nope, that's a userspace program Mar 18 18:29:10 unless you are doing file access or getting fresh memory.... Mar 18 18:29:21 a good example of what we don't want happening Mar 18 18:29:54 ds2: yeah, 'yuck mmap instead of kernel' driver is what I mean Mar 18 18:30:11 *nod* Mar 18 18:30:25 the intarweb is over-full of examples of how not to do it... Mar 18 18:30:57 some are pretty hilarious even Mar 18 18:31:18 * alexhiam has a detailed blog post about how to use it the wrong way on the beaglebone ;) Mar 18 18:31:35 it is hilarious til you get asked to fix it :D Mar 18 18:32:29 alexhiam, What should I so next regarding the driver? Mar 18 18:33:30 ¯\_(ツ)_/¯ Mar 18 18:33:31 UnicodeEncodeError: 'ascii' codec can't encode character u'\xaf' in position 0: ordinal not in range(128) (file "/home/ahiam/.sopel/modules/gitter_bridge.py", line 52, in ircToGitter) Mar 18 18:33:52 whoa... sorry there gcl-bot Mar 18 18:34:13 Hmmmm do I see an exploit somewhere? ;) Mar 18 18:34:16 I guess my gitter bridge doesn't like unicode... Mar 18 18:34:18 * nerdboy fixes that kind of crap almost every day... Mar 18 18:35:09 * alexhiam is blindly trusting some random python irc bot framework on one of his servers.... Mar 18 18:35:12 that bug crops up a lot of places Mar 18 18:37:11 trac git interface for example... Mar 18 18:37:16 lol, really python2.7? you don't support unicode in your string.format() method?! Mar 18 18:38:12 ds2: don't look at perl configure if you want to stay sane... Mar 18 18:39:01 it's even nice enough to silently fail and replace libc functions with broken crap and then try to build anyway Mar 18 18:39:43 I would kinda prefer my irc bot silently failing over directing stderr to the irc channel... Mar 18 18:40:27 ok, let's try that again... Mar 18 18:40:28 ¯\_(ツ)_/¯ Mar 18 18:40:36 much better Mar 18 18:40:49 gcl-bot: .weather Mar 18 18:40:49 Yahoo! Weather - Brattleboro, VT: Partly Cloudy, 7°C (44°F), Humidity: 57%, Gentle breeze 4.5m/s (↓) Mar 18 18:41:21 that is not a gentle breeze... Mar 18 18:41:59 it also looks perfectly still out... Mar 18 18:43:41 sort of maybe... Mar 18 18:44:29 miles per second? Mar 18 18:45:42 hopefully it's meters... Mar 18 18:46:01 I think I'd have noticed if it was miles Mar 18 18:47:22 you'd also be on saturn... Mar 18 18:47:49 if you got a decent basement... Mar 18 18:50:06 so, something tells me their not-so-open license on 6.x driver package is not what's in the kernel... Mar 18 18:51:06 * nerdboy fetches recent kernel commits Mar 18 18:51:08 there's this https://android.googlesource.com/kernel/msm/+/android-msm-hammerhead-3.4-kk-fr2/drivers/staging/iio/imu/inv_mpu/README Mar 18 18:52:06 i don't think you want a fork that old... Mar 18 18:52:34 nope, but clearly it's been around for a while Mar 18 18:52:54 I haven't looked to see if that's in mainline Mar 18 18:53:07 can't really infer that much from backported vendor fork Mar 18 18:53:44 brittle pieces of crap mostly... Mar 18 18:54:21 okay food time Mar 18 18:54:31 mostly they suck horribly at upstreaming Mar 18 18:54:58 so they patch until things explode if you make one tiny config change... Mar 18 18:55:18 chromeos Mar 18 18:56:42 * nerdboy waiting patiently for git kernel fetch Mar 18 18:58:05 alexhiam: when the kernel driver is enabled for let us say an imu device which is onboard... how does the processor know where the device is?? I mean the address of the onboard device.. Mar 18 18:58:15 will it be mentioned in the overlay file? Mar 18 18:58:16 remotes/origin/linux-4.5.y <= checkiing here first Mar 18 18:58:52 alexhiam: and will it be interfaced via some kind of protocol like i2c or uart or spi? Mar 18 18:59:01 probably depends on the driver/module parameters Mar 18 18:59:12 alexhiam: I am sorry for this naive question... :-P Mar 18 18:59:53 kiran4399: some drivers are both 12c/spi, sometimes they're separate Mar 18 19:00:14 that depends on the device of course Mar 18 19:00:28 the mpu-9250 has both i2c and spi I believe Mar 18 19:01:43 alexhiam, What would should I do regarding the device driver next?I have given the complete instructions for compiling it in the readme file for the hello world driver. Mar 18 19:01:52 *should Mar 18 19:02:46 I mean what should I try to code next? Mar 18 19:02:52 chanakya_vc: have you gotten feedback on your proposal yet? Have you got some pru code working and on github? Mar 18 19:03:26 ds2 asked me a couple of questions on the ml.I am still working on that. Mar 18 19:03:29 Your branch is behind 'origin/master' by 56623 commits, and can be fast-forwarded. Mar 18 19:04:00 alexhiam, No I haven't.Should I work on that next? Mar 18 19:04:54 chanakya_vc: I'd say any proposal updates are a higher priority, then some pru code would be good Mar 18 19:07:13 okay, in linux-4.5.y i got: Mar 18 19:07:19 drivers/iio/imu/inv_mpu6050 Mar 18 19:07:25 drivers/input/misc/mpu3050.c Mar 18 19:07:30 that's it Mar 18 19:07:48 sounds the same as 4.1 Mar 18 19:07:56 or beagleboard/linux 4.1 at least Mar 18 19:11:05 alexhiam,Just wanted to ask that when you were talking about implementing a circular buffer to give communication between the driver and shared mem,would data and parameters both be written to a such a circular buffer? Mar 18 19:11:39 they could be Mar 18 19:11:43 In case of SPI,where we require a shift register,wouldn't a linear buffer be better? Mar 18 19:11:44 i guess "we" should look at their new driver license Mar 18 19:12:10 it does say "distribute" but with weird restrictions Mar 18 19:12:40 chanakya_vc: getting the data from the arm to the pru is different than shifting out the bytes Mar 18 19:12:41 could be okay for bb stuff, but IANAL... Mar 18 19:13:18 it's not a coincidence that acronym has "anal" in it... Mar 18 19:13:50 you certainly wouldn't be shifting the data out of shared memory a bit at a time, so a 'shift register' type abstraction there doesn't really make sense Mar 18 19:14:10 lol Mar 18 19:14:30 streaming data would be a little better... Mar 18 19:18:01 the driver has chip name as parameter Mar 18 19:18:42 maybe it does take the new one Mar 18 19:19:47 alexhiam,Okay. So as I understand it I could write the parameters and data into two such buffers and then perhaps the PRU's would read from these buffers right? Mar 18 19:20:02 Would you prefer this or using rpmsg? Mar 18 19:20:42 no idea, that depends on which is better suited for the use case, which would require some looking into and testing Mar 18 19:20:58 but any config stuff could also just be sent in downcalls Mar 18 19:23:11 hang on a sec, lemme look at another kernel fork Mar 18 19:24:01 alexhiam,Okay. So if in my proposal if I were to write that I would be using circular buffers and at a later stage the me and mentors would feel that rpmsg would be better,you would not expect me to deviate from anything written in the proposal Mar 18 19:24:30 alexhiam, Given the time constraints for the proposal? Mar 18 19:25:43 not sure what you mean... obviously you can't predict everything, it would be fine to mention a couple possible ways to do it and how you might do some performance testing to see what's better Mar 18 19:25:55 and speculate as to why one might be better than the other Mar 18 19:26:23 could somebody tell me about PRU and access to main memory? is it possible to load off work to a PRU and have it operating on the main memory (a buffer between the A8 and PRU)? Mar 18 19:27:13 hpfmn: yeah, you can have shared memory between the arm and the pru Mar 18 19:27:44 hpfmn: seen the ti stuff? Mar 18 19:27:59 er, pru docs Mar 18 19:28:12 nerdboy: which document do you refer to? Mar 18 19:28:44 alexhiam, I was just asking whether I would have to make the choice between rpmsg or the circular buffer before I submit my proposal and will that choice be binding or not :) Mar 18 19:29:37 http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs#LAB_5:_RPMsg_Communication_between_ARM_and_PRU Mar 18 19:29:44 that stuff Mar 18 19:30:00 and the example kernel drivers Mar 18 19:30:00 ok, then the answer is no, but it would be good to see some pros and cons of each in your proposal Mar 18 19:30:02 thx nerdboy Mar 18 19:30:54 enable sample code under kernel hacking i think... Mar 18 19:31:28 *pru sample code Mar 18 19:33:38 chanakya_vc: if you haven't looked at pru sample driver code in the kernel yet, then you should do that now Mar 18 19:34:17 nerdboy,the link that you gave above? Mar 18 19:35:54 the actual source in the kernel Mar 18 19:36:10 but also the TI stuff if you haven't looked yet Mar 18 19:37:56 nerdboy,Could you please give me the links to it?I am unable to follow the sample driver you are referring to. Mar 18 19:38:16 it's in that ti doc Mar 18 19:38:37 but you can look at your local kernel source Mar 18 19:38:46 make menuconifg Mar 18 19:38:53 menuconfig even Mar 18 19:40:18 Kernel hacking ---> Sample kernel code ----> Build rpmsg client sample -- loadable modules only Mar 18 19:40:34 that's in 4.1? Mar 18 19:41:08 should be Mar 18 19:41:20 cool Mar 18 19:41:23 linux-4.4.x is what i'm looking at Mar 18 19:41:30 but it's in the TI docs Mar 18 19:42:11 other examples too Mar 18 19:43:03 hopefully that answers/forestalls repeated questions... Mar 18 19:43:54 nerdboy,this link? http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs Mar 18 19:44:16 All the examples seemed to mentioned here only. Mar 18 19:45:20 ti is kinda the best place to look for ti developer stuff Mar 18 19:45:54 best/first/obvious/whatever Mar 18 19:47:19 drivers/rpmsg/virtio_rpmsg_bus.c => Mar 18 19:47:22 * This structure stores the rpmsg state of a given virtio remote processor Mar 18 19:47:22 * device (there might be several virtio proc devices for each physical Mar 18 19:47:23 * remote processor). Mar 18 19:47:44 use the source, luke... Mar 18 19:48:55 Copyright (C) 2011, so yeah, probably been there for a while Mar 18 19:49:03 just well hidden... Mar 18 19:59:15 nerdboy,I think remoteproc is the driver in linux that supports the basic I/o operations for PRU along with the rpmsg Linux driver? Mar 18 19:59:43 You would be referring to both of these only right? Mar 18 20:00:08 s/only// Mar 18 20:00:42 i mainly hack stuff at the packaging/OS level Mar 18 20:01:23 nerdboy,Okay. Mar 18 20:01:27 the ti docs, beagle wiki, hands on labs should make things clear mostly Mar 18 20:02:02 you have an existing virtio rpmsg interface Mar 18 20:02:31 nerdboy, Yes.So you would suggest using that only? Mar 18 20:03:02 i would suggest following that same model Mar 18 20:03:03 For ARM to PRU communications? Mar 18 20:03:36 looks to me like you need to code an interface for that virtio driver Mar 18 20:04:11 so you can talk to the virtio_rpmsg_bus Mar 18 20:04:27 go back to the last lab Mar 18 20:04:52 didn't you build a pru/led blinky example? Mar 18 20:05:01 Yes will do that.I need to research a bit more about this rpmsg. Mar 18 20:05:13 I did that using PRUspeak Mar 18 20:05:20 just follow the lab, then research Mar 18 20:05:30 do the virtio one Mar 18 20:05:57 Okay.Will do that. Mar 18 20:06:09 And perhaps upload to github Mar 18 20:06:19 with certain modifiactions and changes Mar 18 20:07:08 modifications.If that's allowed?If TI allows that. Mar 18 20:10:26 alexhiam, Just wanted to ask you that after the data is written into the circular buffer in the shared mem,we would transfer it to data rams of the two PRU's right? Mar 18 20:10:57 for the bitbanging operation to take place right? Mar 18 20:11:05 yeah Mar 18 20:14:23 For that we would have to read the buffer element by element.So wouldn't that result in a bit by bit transfer?Like you said before that would be extremely slower right? Mar 18 20:14:23 the rpmsg sample driver is only in bb/ti/rcn kernels Mar 18 20:14:56 alexhiam, No other way of doing it I suppose. Mar 18 20:15:08 chanakya_vc: reads from the shared mem are not 1 bit Mar 18 20:15:59 Okay.I guess I need to read up on this. Mar 18 20:17:54 nerdboy, Thanks for the mail :) Mar 18 21:36:44 hopefully everyone is busy building firmware and kernel examples... Mar 19 00:08:30 so i guess drivers/input/misc/mpu3050.c is the "old" style mpu gyro interface Mar 19 00:08:53 based on a completely different chip driver Mar 19 00:09:19 bma023.c whatever that is... Mar 19 00:10:00 current drivers for bma180 and bma150 Mar 19 00:10:49 150 is also input/misc but 180 is iio interface Mar 19 00:11:07 so, examples abound... **** ENDING LOGGING AT Sat Mar 19 02:59:58 2016