**** BEGIN LOGGING AT Thu Jul 14 02:59:59 2016 Jul 14 10:47:21 Wormo, there? Jul 14 14:02:47 hi! anyone active? Jul 14 14:03:01 bradfa: there? Jul 14 14:03:19 Wormo: there? Jul 14 14:41:28 hey bradfa ! Jul 14 14:41:56 There? Jul 14 14:46:14 hi chanakya_vc Jul 14 14:48:21 I saw your message on Github so I came here bradfa! Anything you wanted to tell me? Jul 14 14:48:35 chanakya_vc: are you goign to merge that pull request? Jul 14 14:50:22 Ohh sorry bradfa , I corrected them locally on my machine and then forgot all about the request. I will do so immediately Jul 14 14:50:50 chanakya_vc: you don't need to use my commits, just wanted to check on the status Jul 14 14:53:11 bradfa, I changed that locally. It was not compiling otherwise. Jul 14 14:55:25 bradfa, I tried very hard to the get waveforms yesterday. But apparantly the logic analyzer is not able to catch them. I checked the analyzer by writing a custom PWM code and it seems to be working fine Jul 14 14:55:58 I am unable to reproduce the results that alexhiam got too. I think I am doing some mistake with the settings Jul 14 14:56:56 chanakya_vc: I suspect your code is not doing the right thing if you can't see the proper output on your logic analyzer Jul 14 14:57:31 chanakya_vc: if your logic analyzer can see other signals correctly, but cannot see your SPI signals correctly, I'd suggest investigating your PRU firmware as it likely has bugs and/or the pinmux is wrong Jul 14 14:58:16 No bradfa the earlier code which was tested by alexhiam is also not showing any waveforms Jul 14 14:58:30 chanakya_vc: I suspect you are doing something wrong and it is not the logic analyzer Jul 14 14:59:15 Okay bradfa , I will see it again. m_w also promised to test out my latest code. Jul 14 15:02:20 But bradfa , the firmware which was simply printing 0x6 should work. I am straightaway loading it without the char driver. It should produce a waveform because even I have seen the waveform in my lab Jul 14 15:02:58 Just clear up one doubt of mine bradfa , I am using pulseview GUI. Jul 14 15:03:40 So there it gives the option of selecting number of smaples and frequency. Jul 14 15:04:45 So I have selected 1 T samples. Jul 14 15:05:30 Now bradfa , I if I understand correctly , this frequency thing does it refer to the sampling frequency? Jul 14 15:05:49 So at minimum must be twice right? Jul 14 15:05:56 of 10 Mhz? Jul 14 15:13:05 chanakya_vc: just set the capture frequency to 24 MHz and capture 1 M samples, trigger on an edge on a line you know is going to change state Jul 14 15:25:12 bradfa, Might be a mistake with configuring the pins correctly. I am using the config-pin to configure a pin to be GPIO output. Jul 14 15:25:41 bradfa, But nowhere do I see an option to set the pins in mode 6 Jul 14 15:25:55 chanakya_vc: iirc, mode 7 is GPIO mode Jul 14 15:25:56 no? Jul 14 15:26:04 Yes Jul 14 15:26:16 bradfa, I think that is the mistake Jul 14 15:26:20 https://github.com/bradfa/beaglebone_pinmux_tables Jul 14 15:26:56 chanakya_vc: mode 6 is usually PRU mode Jul 14 15:27:08 How do I get a pin to mode 6 bradfa Jul 14 15:27:22 chanakya_vc: the same way you get it to any other mode Jul 14 15:27:47 * bradfa would do it in device tree Jul 14 15:27:55 I thought config-pin set it in mode 6. I think I am wrong with that. Jul 14 15:30:02 bradfa, Look at this: http://stackoverflow.com/questions/16872763/configuring-pins-mode-beaglebone Jul 14 15:30:50 There is an answer that talks about loading cape-universal Jul 14 15:30:54 whatever that is Jul 14 15:32:41 chanakya_vc: you change mux modes in device tree, I'm not sure what the way to do it is from a running system unless you load another dt overlay Jul 14 15:48:48 Okay bradfa , I think I got the problem. Jul 14 15:49:35 When I am setting the frequency at 16 Mhz, I do get a waveform although it is not complete. Jul 14 15:50:16 However when I increase to 24 Mhz, I don't get anything. Jul 14 15:50:32 I am not able to understand why that is happening Jul 14 15:52:49 chanakya_vc: if 16 MHz works, just use that Jul 14 15:52:58 chanakya_vc: some of the knockoff saleae analyzers aren't made that well Jul 14 16:24:17 bradfa, m_w:hi I made a few tests, it's a result: https://github.com/pmezydlo/SPI_slave_driver_implementation/wiki#photos-from-tests there is no error for these clocks Jul 14 16:27:58 cool Jul 14 16:30:18 pmezydlo: you may want to add the GND wire on the diagram at the bottom of the page Jul 14 16:30:23 :) Jul 14 16:30:49 yes sure Jul 14 17:29:47 pmezydlo: nice pictures :) Jul 14 17:30:11 thanks Jul 14 19:06:16 m_w, There? Jul 14 19:07:16 bradfa, I have tried a lot. It is not working. I will go to my lab tomorrow and test it out with the equipment there.Perhaps you could test it out if you are free? Jul 14 19:09:17 I am in the background Jul 14 19:09:40 what? m_w Jul 14 19:09:45 here Jul 14 19:10:07 Okay. Are you free? Could you test out the code for me? Jul 14 19:10:12 m_w, ? Jul 14 19:10:20 here? Jul 14 19:10:49 I am sorry, I didn't get the background thing Jul 14 19:10:57 I was joking Jul 14 19:11:03 Ohh :P Jul 14 19:11:37 do you need me to run it locally on my BBB? Jul 14 19:12:09 Yup. More than that I was wondering if you'd have access to a logic analyzer? Jul 14 19:13:08 I have been sitting for the past 4 hours trying to get waveforms on mine without any success. I am even unable to reproduce the results that alexhiam had with my firmware code Jul 14 19:13:10 m_w, Jul 14 19:14:36 well I have not used the one that you have but I can try and help Jul 14 19:14:53 can you send a picture of how you have it plugged in? Jul 14 19:15:09 Any logic analyzer would m_w . I just want to know whether my code is working or not Jul 14 19:16:05 chanakya_vc: sorry, I'm not able to spend much time on this today :( Jul 14 19:16:17 I can maybe tell the steps in terminal to download and compile the code m_w ? Jul 14 19:16:27 sure Jul 14 19:16:43 #exactsteps Jul 14 19:16:45 bradfa, Np, but please do check it out whenever you get a chance : ) Jul 14 19:17:00 Yup m_w Just give me 5 minutes. Jul 14 19:17:37 I only have a two channel oscilloscope but I can check the waveform with it Jul 14 19:19:40 Haan, a two channel oscilloscope will do the trick. I only have a clk signal along with data m_w . Just give me some time, I am just pushing some changes to the code Jul 14 19:19:51 thinking of making some verilog code to put a signal analyser in my new FPGA Jul 14 19:31:32 Okay m_w Jul 14 19:31:45 sudo apt-get update Jul 14 19:31:48 sudo apt-get install ti-pru-cgt-installer Jul 14 19:41:36 Okay m_w I think with the previous command, an older version ofpru-cgt will be installed. Jul 14 19:41:53 So try this wget http://software-dl.ti.com/codegen/non-esd/downloads/download.htm#PRU Jul 14 19:49:37 m_w, Okay fresh start, sorry for the previous mess. Jul 14 19:49:38 wget http://downloads.ti.com/codegen/esd/cgt_public_sw/PRU/2.1.2/ti_cgt_pru_2.1.2_linux_installer_x86.bin Jul 14 19:49:59 is this on the target of my PC? Jul 14 19:50:09 Yup Jul 14 19:50:16 Cross compiling Jul 14 19:50:18 okay Jul 14 19:50:32 chmod +x ti_cgt... Jul 14 19:51:35 ./ti_cgt_pru... Jul 14 19:51:45 running Jul 14 19:52:09 This will open up a gui, just install it in any convenient place Jul 14 19:53:44 then clone my repo git clone -b wip_on_spi https://github.com/chanakya-vc/PRU-I2C_SPI_master.git Jul 14 19:54:31 okay Jul 14 19:55:34 export PRU_CGT=/path/to/ti_pru/cgt/folder Jul 14 19:56:06 Ah this after you navigate to PRU_I2C Jul 14 19:56:08 FOLDER Jul 14 19:56:15 done Jul 14 19:56:21 make Jul 14 19:56:29 Hopefully shall compile Jul 14 19:57:04 "pru0_spi.c", line 39: error #29: expected an expression Jul 14 19:57:18 "pru0_spi.c", line 39: error #20: identifier "j" is undefined Jul 14 19:57:53 Ah This is such a mess. I am so sorry m_w . Just one sec Jul 14 19:59:19 m_w, Can you comment out the line no 39 from there. It shouldn't be there. Jul 14 20:00:15 okay it compiled Jul 14 20:00:29 cd gen Jul 14 20:01:37 scp Firmware.out @192.168.7.2 : /path/in/BBB Jul 14 20:02:01 lemme boot the target Jul 14 20:04:24 m_w, Right now I am only telling you the steps to check if my firmware is working or not. After this I would tell you to comment in a line and comment in one in the firmware to make it compatible with the driver. Jul 14 20:04:50 That would be the final test. If that works, that would be excellent Jul 14 20:05:13 okay Jul 14 20:05:34 I have the PRU-I2C_SPI_master.out on the target Jul 14 20:05:38 now what? Jul 14 20:06:10 So when you are done with scp ing it, then cp Firmware.out /lib/firmware/am335x-pru0-fw Jul 14 20:06:35 I think it appears by the name Firmware.out Jul 14 20:06:38 though Jul 14 20:06:59 config-pin overlay cape-universal Jul 14 20:07:09 config-pin P8.11 pruout Jul 14 20:07:15 config-pin P8.12 pruout Jul 14 20:07:17 that is not what I got in my gen directory Jul 14 20:07:47 -bash: config-pin: command not found Jul 14 20:08:04 Ahh whicj kernel do you have m_w ? Jul 14 20:09:20 Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux Jul 14 20:09:58 do it need to install some utility? Jul 14 20:11:58 m_w, Here it is :https://github.com/cdsteinkuehler/beaglebone-universal-io Jul 14 20:12:10 Can be done manually also. Jul 14 20:12:38 echo pruout > /sys/devices/ocp.*/P8_11_pinmux.*/state Jul 14 20:12:42 echo pruout > /sys/devices/ocp.*/P8_12_pinmux.*/state Jul 14 20:14:48 Should work m_w Jul 14 20:15:36 Can check also cat /sys/devices/ocp.*/P8_11_pinmux.*/state Jul 14 20:16:02 After that m_w , sudo rmmod -f pru_rproc Jul 14 20:16:13 sudo modprobe pru_rproc. Jul 14 20:16:31 the echoes are failing Jul 14 20:16:47 -bash: /sys/devices/ocp.*/P8_11_pinmux.*/state: No such file or directory Jul 14 20:17:05 installed the utlity and it is failing Jul 14 20:17:19 root@beaglebone:~/beaglebone-universal-io# config-pin overlay cape-universal Jul 14 20:17:25 Loading cape-universal overlay Jul 14 20:17:32 bash: line 0: echo: write error: Invalid argument Jul 14 20:18:52 Hmmn ....m_w I have the same kernel as yours. I wonder why this is happening. Jul 14 20:22:31 lemme reboot and try again Jul 14 20:22:40 NO wait m_w Jul 14 20:22:43 I got it Jul 14 20:22:54 RCN has got it wrong over there Jul 14 20:23:23 it should be echo pruout > /sys/devices/ptatform/ocp.*/P8_11_pinmux.*/state Jul 14 20:23:56 -bash: /sys/devices/ptatform/ocp.*/P8_11_pinmux.*/state: No such file or directory Jul 14 20:24:09 cd /sys/devices/ptatform/ocp Jul 14 20:24:44 -bash: cd: /sys/devices/ptatform/ocp: No such file or directory Jul 14 20:25:03 cd /sys/devices/platform/ocp/ocp:P8_11_pinmux Jul 14 20:25:12 Sorry for the earlier one Jul 14 20:25:27 here echo pruout>state Jul 14 20:25:58 -bash: cd: /sys/devices/platform/ocp/ocp:P8_11_pinmux: No such file or directory Jul 14 20:26:21 :( Jul 14 20:26:27 It is there on my BBB Jul 14 20:27:12 m_w, when you cd /sys/devices/platform Jul 14 20:27:18 there on ls, Jul 14 20:27:24 no ocp folder? Jul 14 20:28:05 there is Jul 14 20:28:19 cd ocp Jul 14 20:28:28 ls Jul 14 20:28:39 when I try to load cape-universaln Jul 14 20:28:49 root@beaglebone:~# echo cape-universaln > /sys/devices/platform/bone_capemgr/slots Jul 14 20:28:52 root@beaglebone:~# echo cape-universaln > /sys/devices/platform/bone_capemgr/slots Jul 14 20:28:59 [ 1469.973247] of_resolve_phandles: Could not find symbol 'gpio4' Jul 14 20:29:08 [ 1469.979293] bone_capemgr bone_capemgr: slot #9: Failed to resolve tree Jul 14 20:30:10 hmmn... Jul 14 20:31:27 Ah Let me check on that. This is weird. m_w Where did you install your OS from? I got mine from the BeagleBoard site, it had this config-pin already installed. Jul 14 20:32:15 BeagleBoard.org Debian Image 2016-05-13 Jul 14 20:33:29 Intresting, I have the exact same image m_w Jul 14 20:33:55 the os doesn't like your BBB too much I guess :P Jul 14 20:37:32 I am running from SD card perhaps I have to load a different dtbo Jul 14 20:40:38 what are we trying to accomplish with these commands? Jul 14 20:41:22 m_w, We are trying to mux P8_11 and P8_12 as PRUout. that is set them as outputs in mode 6 Jul 14 20:41:58 Earlier we had to write an entire DT for it, the new kernels had this sorted Jul 14 20:42:54 with the config-pin utility , which in the background runs the manual commands that we have been trying so far Jul 14 20:43:35 Hmmn Google is not at all helpful with this. Jul 14 20:47:34 I think you are right, the problem is with you booting from SD card. Jul 14 20:47:49 m_w, Can't seem to find anything else on that. Jul 14 20:52:37 lemme program the emmc Jul 14 20:53:01 got instructions for that? Jul 14 20:53:11 yep, Jul 14 20:53:50 Do you have the image that you used to burn the sd card? Jul 14 20:54:20 not sure Jul 14 20:54:25 just start from scratch Jul 14 20:55:48 Give me a minute a m_w . I am just finding the link Jul 14 21:07:43 m_w, Okay wget https://rcn-ee.com/rootfs/bb.org/testing/2016-06-19/lxqt-4gb/BBB-blank-debian-8.5-lxqt-4gb-armhf-2016-06-19-4gb.img.xz Jul 14 21:08:47 okay Jul 14 21:09:21 Do you have etcher.io?(I use it, because I find it very safe) Jul 14 21:09:50 m_w, ^^ Jul 14 21:10:07 just using xzcat Jul 14 21:11:08 so this is the exact same debian version that you are using? Jul 14 21:11:16 Yes.. Jul 14 21:11:36 writing to sd card... Jul 14 21:12:21 m_w, Your net speed is very fast Jul 14 21:12:23 :P Jul 14 21:12:46 It took me 10 minutes to get a 700 Mb download Jul 14 21:12:54 faster than wrinting to the sd card it appears Jul 14 21:13:03 writing Jul 14 21:14:45 Hmmn m_w , There seems to be a problem wait. Jul 14 21:15:26 how so? Jul 14 21:15:28 Don't flash the emmmc just yet Jul 14 21:15:55 ahh there will be a problem with r25 thing when I compile the driver Jul 14 21:16:08 It is the same thing but r29 Jul 14 21:16:21 I am tired of these revison numbers Jul 14 21:16:36 now problem now that you know how to deal with it Jul 14 21:16:41 no problem Jul 14 21:17:24 Yeah but you would be using r29 Jul 14 21:19:22 I thought you said they were the same version Jul 14 21:22:07 Yes they were. m_w But rev number is not written. Jul 14 21:24:08 This is the same version as mine -r25:https://beagleboard.org/latest-images. It's the first link. But it is a sd card image. We would have to convert it into flasher. Jul 14 21:24:09 m_w, Jul 14 21:24:51 The other option is that you flash using current image and later when you compile the kernel source you would have to compile with it the extraversion Jul 14 21:25:33 What would you want to do m_w ? Jul 14 21:25:33 looks like it is too late now, the emmc is being written Jul 14 21:25:53 Okay Jul 14 21:25:57 I will try with this Jul 14 21:26:17 I am so sorry. I should have been more careful Jul 14 21:26:43 it happens Jul 14 21:27:18 Okay do tell me when the flashing finishes? Jul 14 21:27:23 m_w, ^ Jul 14 21:27:36 okay Jul 14 21:34:29 i think it is done programming Jul 14 21:35:23 does this new image allow me to connector USB ethernet? Jul 14 21:35:40 I guess so. Jul 14 21:36:09 You mean using the host as the default gateway m_w ? Jul 14 21:36:18 yeah Jul 14 21:36:34 Mine does atleast. Jul 14 21:36:36 :p Jul 14 21:37:07 Anyway try out config-pin overlay cape-universal Jul 14 21:37:21 m_w, I think it would work Jul 14 21:37:40 if I had a way to get a console it would be possible Jul 14 21:37:50 I have not serial adapter or HDMI cable Jul 14 21:38:14 Ohh m_w Jul 14 21:38:46 Hmmnn..this happens to be a gui image Jul 14 21:39:27 Should have asked you before :( My fault Jul 14 21:40:31 So I guess the only option is to download a non-gui one then m_w ? Jul 14 21:47:26 I guess so Jul 14 21:47:38 which image exactly do you have? Jul 14 21:48:58 m_w, the first link here: https://beagleboard.org/latest-images, I can't seem to wget it Jul 14 21:50:06 okay Jul 14 21:50:11 But this is a sd card image, we would have to modify uenv text Jul 14 21:50:18 to make it flasher Jul 14 21:52:09 yes I noticed Jul 14 22:01:10 chanakya_vc: sorry my SD card reader is very slow it appears Jul 14 22:02:13 chanakya_vc: getting tired? Jul 14 22:02:21 No problem m_w Jul 14 22:02:23 Naah Jul 14 22:02:40 Nothing more exciting than testing code. Jul 14 22:02:48 m_w, :P Jul 14 22:02:54 Unless you are? Jul 14 22:02:56 m_w, ? Jul 14 22:04:23 nope it is only 5pm here Jul 14 22:04:58 Ohh. I have become a night owl myself m_w :P Jul 14 22:07:14 I sleep everyday by 5 am and wake up by 12 or 1 .I get scolded by my parents almost everyday :P Jul 14 22:09:20 But seriously m_w ,If you want, You can test the code in your own time. Maybe tell me by tomorrow night or saturday? Jul 14 22:11:44 I am burning the eMMC now Jul 14 22:12:12 Have you modified the uenv text? m_w ? Jul 14 22:14:31 yup Jul 14 22:15:03 Okay let's hope this one works Jul 14 22:15:33 I hope so Jul 14 22:28:10 no console Jul 14 22:32:06 Has BeagleBoard.org upgraded all to gui based stuff? Jul 14 22:33:04 I am at a loss m_w . Jul 14 22:33:39 I have the exact same image with the same name and everything and it runs perfectly. Jul 14 22:33:43 :( Jul 14 22:34:42 I have a ACM console on the SD Jul 14 22:34:52 lets try it again Jul 14 22:35:53 Okay m_w Jul 14 22:36:10 config-pin works now Jul 14 22:36:55 there are console images and lxqt images and iot images Jul 14 22:37:18 iirc, console versions of the latter two even Jul 14 22:37:36 and there are still 2G and 4G versions Jul 14 22:37:59 Hmmn I thought nerdboy that IOT images only existed for GUI Jul 14 22:38:04 m_w, That's great! Jul 14 22:38:08 the beagleboard page only lists a few Jul 14 22:38:28 chanakya_vc: nothing says you need the gui Jul 14 22:39:12 okay I have the firmware loaded and the pins config'd Jul 14 22:39:16 what is next? Jul 14 22:39:19 you could try the green version, but really all you need to do is disable x and load the overlay without hdmi Jul 14 22:39:41 * nerdboy uses mostly ssh anyway Jul 14 22:39:47 Yeah m_w so when you would load the firmware then it would produce the waveforms Jul 14 22:39:54 oh Jul 14 22:40:06 does it only do it once? Jul 14 22:40:33 No right now I have only configured to do it once. I just want to check Jul 14 22:40:45 okay Jul 14 22:40:50 whether the firmware is working correctly or not. Jul 14 22:41:10 Right now it is set to send 6 in cpol=0,cpha=0 Jul 14 22:41:12 m_w, Jul 14 22:42:04 I had thought that after this we could have tested the driver+firmware and whether that works or not m_w Jul 14 22:43:13 http://elinux.org/BeagleBoardDebian <= the latest are listed here Jul 14 22:43:41 * nerdboy still thinks there is yet-another-page with list of images Jul 14 22:51:32 I have a waveform Jul 14 22:52:06 Does it look like a 6? Jul 14 22:52:08 m_w, ? Jul 14 22:52:35 I mean the information transmitted by it? Jul 14 22:53:51 https://drive.google.com/file/d/0B71fXOiSxXI3c20tSE9sYWtXSXhfNWJIN2lLWXRqZFhNVExJ/view?usp=sharing Jul 14 22:54:36 Looks okay m_w Jul 14 22:54:42 : ) Jul 14 22:55:13 So Firmware is working and my logic analyzer is not definitely. Jul 14 22:56:07 m_w, The next step would be to cross compile the driver. Jul 14 22:56:24 For that you would require the kernel source Jul 14 22:56:28 Do you have it? Jul 14 22:57:05 nope Jul 14 22:57:37 Okay m_w . Will you be free tomorrow? Jul 14 22:57:42 sure Jul 14 22:58:25 Perhaps you could download the kernel source by tomorrow night. I am not sure about the kernel version that you are using m_w Jul 14 22:59:06 Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux Jul 14 22:59:19 Oh wow Jul 14 22:59:47 You did compile the source remember for me m_w ? Jul 14 23:00:12 I was using /tmp and deleted it afterwards Jul 14 23:00:37 You know this is the exact same version you were using earlier. I wonder why you were not getting the config-pin utility earlier Jul 14 23:00:45 Wait I still have the commands fromit Jul 14 23:00:46 m_w, Jul 14 23:00:53 for making it Jul 14 23:01:01 not really Jul 14 23:01:12 did you post them to you wiki? Jul 14 23:01:40 I saved them:P Jul 14 23:03:14 First you got to get the latest cross compiler m_w The commands for it are: Jul 14 23:03:26 I have the compiler still Jul 14 23:03:41 maybe not Jul 14 23:03:51 send me the instructions anyways Jul 14 23:04:23 and please document this on you github repo somewhere Jul 14 23:04:27 wget -c https://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz Jul 14 23:04:28 your Jul 14 23:04:28 $ tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz Jul 14 23:04:28 $ export CC=`pwd`/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- Jul 14 23:04:33 Yes I will. Jul 14 23:05:35 done Jul 14 23:05:39 next? Jul 14 23:07:01 wget https://github.com/RobertCNelson/linux-stable-rcn-ee/archive/4.4.9-ti-r25.tar.gz Jul 14 23:07:11 tar xzvf 4.4.9-ti-r25.tar.gz Jul 14 23:07:22 cd linux-stable-rcn-ee-4.4.9-ti-r25/ Jul 14 23:07:30 wget http://pastebin.com/raw/bUANvttd Jul 14 23:07:37 mv bUANvttd .config Jul 14 23:07:42 dos2unix .config Jul 14 23:08:34 you should store the configuration file somewhere that does not need to be fixed Jul 14 23:08:39 make -j8 ARCH=arm LOCALVERSION=-ti-r25 CROSS_COMPILE=path/to/the/cross/compile/toolchain zimage dtbs Jul 14 23:08:45 or explain how to get it from the board Jul 14 23:09:08 Yes m_w I will write an entire post on this explaining gunzipping it Jul 14 23:10:07 And the path to the cross compiler will be to the bin folder inside the folder Jul 14 23:10:08 m_w, Jul 14 23:10:25 scp root@192.168.0.19:/boot/config-4.4.9-ti-r25 .config Jul 14 23:10:56 192.168.0.19? Jul 14 23:11:09 that is the IP of my target Jul 14 23:11:29 the configuration is stored in /boot on the target Jul 14 23:11:32 Ohh I thought it was only 192.168.7.1 Jul 14 23:11:40 I took from .proc Jul 14 23:11:47 I have an ethernet connection Jul 14 23:11:51 Ohh Jul 14 23:12:10 config.gz file exists in /proc Jul 14 23:12:47 m_w, Jul 14 23:13:17 I am not sure if this is the same in boot Jul 14 23:13:18 yeah that works too Jul 14 23:13:48 I am sure they are the same Jul 14 23:14:23 I don't get it. Why store the same file at two different places? Jul 14 23:15:12 one is an actual file, one is a virtual file provided by the kernel Jul 14 23:16:26 the proc version only appears on systems with the CONFIG_IKCONFIG_PROC option config'd in Jul 14 23:17:10 okay the kernel is compiled Jul 14 23:17:13 next? Jul 14 23:18:44 Just a sec I am pushing the modified code. Jul 14 23:18:47 m_w, Jul 14 23:27:48 yes? Jul 14 23:31:58 m_w, I am so sorry. My machine is hanging up a lot Jul 14 23:32:08 It is taking some time Jul 14 23:32:24 * chanakya_vc needs to buy a new machine urgently Jul 14 23:34:39 https://github.com/chanakya-vc/PRU-I2C_SPI_master/tree/wip_on_spi/Driver Jul 14 23:35:34 why are all of these dwo file in the repository? why is there a .ko in the repository? Jul 14 23:36:07 https://github.com/chanakya-vc/PRU-I2C_SPI_master/blob/wip_on_spi/Driver/pru-spi.c#L47 Jul 14 23:36:30 why is there a merge conflict committed to your repo?!?!?! Jul 14 23:36:56 Yes there seems to be a problem m_w Jul 14 23:37:14 Ahh.. Jul 14 23:37:49 First I have got to remove those files, I have no idea how they got added or comitted Jul 14 23:38:03 Any ideas m_w ? Jul 14 23:39:00 https://github.com/chanakya-vc/PRU-I2C_SPI_master/commit/1d6207adac96d373f1322f90d0df9caeec1d9c12 Jul 14 23:39:25 on this commit Jul 14 23:40:28 Okay so what do I do now m_w ? Jul 14 23:42:14 git rm *.dwo .*dwo Jul 14 23:42:44 So there is no way of restoring stuff to a previous commit? Jul 14 23:42:47 m_w, ? Jul 14 23:44:48 that is called reverting a commit, please look it up Jul 14 23:45:57 I would just git rm the files that should have not been commited Jul 14 23:46:38 then git commit Jul 14 23:57:36 Fixed m_w Jul 14 23:58:01 Please clone it Jul 14 23:58:16 And then proceed to compile the firmware Jul 14 23:58:49 export PRU_CGT=/path/to/ti_pru/cgt/folder Jul 14 23:58:54 make Jul 15 00:00:41 Same process to scp it to the /lib/firmware/am335x-pru0-fw Jul 15 00:01:00 config-pin P8_11 pruout Jul 15 00:01:10 config-pin P8_12 pruout Jul 15 00:01:49 But this time don't load the firmware i.e don't unload and reload pru_rproc Jul 15 00:02:09 Then we would have to cross compile the driver Jul 15 00:02:50 cd Driver Jul 15 00:03:33 make ARCH=arm CROSS_COMPILE=/path/to/cross/compiler -C '/parth/to/kernel/source' M=$PWD Jul 15 00:04:50 scp this to any location on the bbb and then sudo insmod pru-spi.c Jul 15 00:05:55 ah pru-spi.ko Jul 15 00:07:27 then sudo su root Jul 15 00:07:42 echo 6>spi_pru_device Jul 15 00:07:53 then sudo rmmod -f pru_rproc Jul 15 00:08:07 sudo modprobe pru_rproc Jul 15 00:08:29 If everything goes as planned, a waveform should come up m_w Jul 15 00:10:26 okay Jul 15 00:13:04 m_w It is echo 6?/dev/spi_pru_device Jul 15 00:13:36 echo 6> /dev/spi_pru_device Jul 15 00:21:23 root@beaglebone:~# echo 6 > /dev/spi_pru_device Jul 15 00:21:32 -bash: echo: write error: Success Jul 15 00:22:19 no output on the scope Jul 15 00:22:46 :( Jul 15 00:23:23 m_w, I am not getting the bash error. Jul 15 00:23:36 Okay I will need to work upon this. Jul 15 00:24:12 you have to put a space after the 6 Jul 15 00:24:43 Okay I got it Jul 15 00:25:18 also your read function is causing a segfault Jul 15 00:25:31 Ah m_w Please don't delete the kernel source. Perhaps you could help test it sometime later? Jul 15 00:25:37 sure Jul 15 00:25:38 Okay I will work on it. Jul 15 00:25:53 Atleast the firmware is working fine Jul 15 00:26:27 m_w, I will work on it today and perhaps get back to you by night(my time)? Jul 15 00:26:36 sure Jul 15 00:27:00 Thank you so much m_w . I would be totally lost without you. Jul 15 00:27:03 you need to return a value from the write/read functions Jul 15 00:27:15 return 0? Jul 15 00:27:48 Okay I will check Jul 15 00:28:04 no the len Jul 15 00:28:35 I didn't get that, len of what I am reading and writing? Jul 15 00:29:04 Okay. Jul 15 00:29:38 m_w, ^^ Jul 15 00:31:17 yes Jul 15 00:31:21 the count Jul 15 00:33:26 Okay got that m_w . If you notice anything more, please do tell, or mail me if you get the time. Jul 15 00:33:33 I will work on it meanwhile Jul 15 00:34:12 got to sleep a bit now m_w . Jul 15 00:38:09 Thanks once again for your help and your infinite patience with my careless errors :P Jul 15 00:38:11 mw Jul 15 00:38:14 m_w, Jul 15 00:38:28 yes Jul 15 00:38:35 you are welcome **** ENDING LOGGING AT Fri Jul 15 02:59:58 2016