**** BEGIN LOGGING AT Wed Jun 17 02:59:57 2020 Jun 17 06:42:31 jkridner ds2 Abhishek_ pdp7 overlay problem is solved with help from zmatt. Jun 17 06:43:35 he's against overlays until we get default pinmuxing in u-boot, what should you guys recommend? Jun 17 06:51:02 * he's against overlays until we get default pinmuxing in u-boot, what do you guys recommend? Jun 17 08:04:36 what is "default pinmuxing in u-boot"? Jun 17 08:11:29 It's the values assigned for the BBAI board in this file https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2019.07-rc4/am57xx_evm/0001/board/ti/am57xx/mux_data.h Jun 17 08:12:27 Somehow this will eliminate the use of cape_pins_default inclusion in all overlay and custom dts files Jun 17 08:28:21 hmmm... is that the version of bootloader that ships with the image? Jun 17 08:32:27 That's the file from one of the patches for BBAI included in the tool for Bootloader Builder tool, I think rcn-ee included that in the bootloader that ships with image but I'd go to him to ask this. Jun 17 08:33:22 he has patches for dozens of versions of the bootloader. Just wondering if that version is the one he ships. Jun 17 08:34:07 lorforlinux: I can send you an invite to Slack if you want to ping him. He's there a lot more often than here. Be gentle as he's the most overworked person in all of BeagleWorld. Jun 17 08:36:08 yes he's very hardworking, I am on slack channel but didn't ask him any questions because he's already very busy. Jun 17 08:51:22 a simple, pointed question/suggestion (that you can't do quickly on your own) is welcome. Jun 17 08:55:09 okay thanks Jun 17 09:44:32 jkridner: sakethr98 Abhishek_ ds2 pdp7_ Here is a milestone video https://www.youtube.com/watch?v=R-aSw67c1D4 Jun 17 16:28:11 Hello everyone Jun 17 16:28:20 Hello everyone Jun 17 16:28:47 Hello All! Jun 17 16:28:57 hello everyone Jun 17 16:30:17 hi all. I'm exhausted. hope it is all good news today. Jun 17 16:30:33 hi cwicks Jun 17 16:30:38 hello jason! Jun 17 16:31:04 Hello everyone :) Jun 17 16:31:06 * hello jkridner! Jun 17 16:31:16 jkridner: working currently on BBB overlay. So no bad news from my side thus far ;) Jun 17 16:32:20 Hi all Jun 17 16:33:22 Hi Mentors and Students! Happy GSoC Wednesday Jun 17 16:34:18 hi cwicks . Jun 17 16:35:10 sakethr98: HI saketh Jun 17 16:35:15 I'll start by expressing concern and hope that everyone and their families and colleagues are doing well through the pandemic Jun 17 16:35:33 Please each student check in and tell me which of your mentors are on the chat right now Jun 17 16:35:37 so far so good but no international flights Jun 17 16:35:45 :( Jun 17 16:35:45 jkridner: Hi, got all 4 UART overlays working on BBAI using virtual cape overlays. Jun 17 16:36:13 Hey Abhishek_ hendersa you there ? Jun 17 16:36:15 Hi @prat Jun 17 16:36:21 * Hi pratimugale Jun 17 16:36:22 Abhishek_: ds2 are you there? Jun 17 16:36:26 @rma31 henrix indu pdp7 some of you guys around? Jun 17 16:36:48 cwicks: Hi, everything is fine here thanks for asking, I hope you are doing good too :) Jun 17 16:36:50 all good, thanks :) Jun 17 16:36:54 yes Jun 17 16:36:57 vedant16[m]: I'm here. Jun 17 16:37:16 not sure if i am here :D Jun 17 16:37:17 hendersa: Hi, did you lookup my progress ? Jun 17 16:37:49 thanks! hope everybody else here is doing fine. Jun 17 16:37:49 vedant16[m]: I've been so tied up at work for the past two weeks that I've lost track of where you are at. Jun 17 16:38:13 cwicks: I am here. pdp7 is also around. Dont know if henrix , indu or @rma31 is around. But we are tightly synced regarding progress Jun 17 16:38:21 pratimugale: and hendersa are there. Jun 17 16:38:26 Hey pdp7 🙂 Jun 17 16:38:50 I decided to implement front end for the language, and a backend using llvm. Jun 17 16:38:53 hi! Jun 17 16:39:03 hi Jun 17 16:39:13 Only Abhishek is missing Jun 17 16:39:47 jkridner: what's the final decision with pinmux-helper and config-pin for BBAI? Jun 17 16:39:48 hendersa: pratimugale Abhishek_ https://github.com/VedantParanjape/simpPRU check frontend/test.sim, that much of language front end is done. Jun 17 16:39:53 vedant16[m]: Do you think your LLVM skills are up to the task? Jun 17 16:41:00 Nope, I am a total beginner, and I don't think PRU has a good backend other than this: https://github.com/bryant/llvm-pru ( * It was very tough to compile this, and then compiled clang gave stack trace) Jun 17 16:41:30 pdp7: Dont know how you are informed about my progress, but I allready implemented BBAI Ctag Face Drivers and Overlay for BBAI. I am currently working on Overlay for BBB because I am way ahead of schedule. Here is the current working tree: https://github.com/NiklasWan/linux/tree/dev_gsoc_face_4.19-rt And here is the Overlay tree: https://github.com/NiklasWan/bb.org-overlays/tree/dev_gsoc_face Jun 17 16:41:34 lorforlinux: well, I still think we try it. Nishanth mentioned some chip damage could occur, but I'm waiting on documentation to explain why. Jun 17 16:42:40 ds2: I found out that we have i2c{n} as i2c-{n-1} just to make it 0 indexed in kernel ;) Jun 17 16:42:59 sakethr98: Looking through the TRM for shared memory . Hey ds2 can you point me to some resourse or some pointers on how my driver write to a shared memory space from where the PRU can read Jun 17 16:43:14 vedant16[m]: I suspect those LLVM issues come from your not using a version of the LLVM libraries of the appropriate age. You should see if you can find an LLVM release from about the same time as the last backend commit. Jun 17 16:43:22 nwan[m]: great to hear! Jun 17 16:43:22 btw, 5.4 now boots on the BBAI. Robert bisected it down to an irq issue and fixed it Jun 17 16:44:03 CMakeLists is downloads a appropriate llvm version. Jun 17 16:44:07 deepankarmaithani: beagle logic source is a good starting point. May be @Abh Jun 17 16:44:44 * deepankarmaithani: beagle logic source is a good starting point. May be @Abhishek_ might be able to point to exactly which part does read/write from the shared space Jun 17 16:44:45 I plan to implement my own backend, is it feasible to do so ? or i just emit code in C. Jun 17 16:44:46 > <@freenode_hendersa:matrix.org> vedant16: I suspect those LLVM issues come from your not using a version of the LLVM libraries of the appropriate age. You should see if you can find an LLVM release from about the same time as the last backend commit. Jun 17 16:44:47 * I plan to implement my own backend in llvm , is it feasible to do so ? or i just emit code in C. Jun 17 16:45:12 lorforlinux[m]1: yes, that is very annoying as it makes reading schematics and TRMs extra troubleshome :( Jun 17 16:45:13 pdp7: Cool. I will try on friday to get my driver running on 5.4-rt Jun 17 16:45:30 great, it would be good to see if any problems Jun 17 16:46:19 deepankarmaithan: look up the ioremap... if you need the PRU to read DDR - there is a global access bit that needs enabling. Note, DDR access can be very time expesnive on the PRU end Jun 17 16:46:26 jkridner ds2 pdp7 Abhishek Is it bad to have overlays for BBAI now? zmatt seems very against them for time being! BTW i saw no problems with UART overlays Jun 17 16:46:48 IMO - it is bad to have overlays period. :D Jun 17 16:47:08 vedant16[m]: Well, LLVM deals with it's own "intrinsics", which then get translated into the final asm from the backend. I suspect any bac you do would mirror what you already have in the existing PRU backend project. Jun 17 16:47:10 Isnt the issue about pinmux being 'dangerous' on am5279 ? Jun 17 16:47:39 vedant16[m]: Plus, enough LLVM to create your own backend is too much to learn in the time that you have for GSoC. Jun 17 16:47:51 It is fine to make overlays. We may have to eventually figure out how to apply them in SPL ahead of DDR enable if it really is such a problem, but we'd still want the information in the overlay to be constructed in a BBB-compatible way to help anyone make an overlay for capes. Jun 17 16:47:52 an out of the blue question, who else has their hardware hanging with DHL/Customs? Jun 17 16:48:14 Me Jun 17 16:48:20 From frontend i can generate a AST or emit code in SSA, after than can llvm convert to PRU Asm ? Jun 17 16:48:48 pdp7: My overlay is working fine on am5729 till now. Eperienced no problems thus far. What do you mean by pinmuxing being dangerous? Like destroying pin outs? Jun 17 16:49:40 everybody saying it but yet to see some glitches occurring from this fabric of silicon and wires. Jun 17 16:49:43 vedant16[m]: That LLVM backend project converts the LLVM-generated SSA into the PRU asm. What I'd try to do is use that existing backend, but just troubleshoot the crash you are seeing. Jun 17 16:50:01 okay I will push my overlays then, let's see how it goes. Jun 17 16:50:25 vedant16[m]: Like, say, generate the intermediate intrinsic file as an intermediary file and then stop compilation there. Examine the output step-by-step until you reach the crash in clang. Jun 17 16:50:35 ohh, why is that? Jun 17 16:50:43 Not configuring cape pins twice probably does make sense, however, there are some cases where the Driver-off state has different pull-up directions for the tied-together pins and that is an issue to leave them that way. At least I think there are some pins like that. Jun 17 16:50:54 Ohh, if it fails, what should be my plan B ? I looked up libfirm something similar to llvm, it has good docs . Jun 17 16:50:55 deepankarmaithani: found some questions on the TI forum regarding using DDR http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/index.html https://e2e.ti.com/support/processors/f/791/t/642081 Jun 17 16:51:50 Ok going through it. Let me update you on what i am trying to do i have written a code to read everybit of variable and push the data to the shift register. Now when i will have a gpio chip driver it will get the value from the userspace and will write it in a memory space from where PRU can read. Any suggestions or improvements yu would like to suggest to my Jun 17 16:51:50 approach. https://github.com/deebot/Beaglebone-BidirectionBus/blob/master/74HC595_prugcc/pru/main0.c here is the code Jun 17 16:52:35 deepankarmaithan: just used the DRAM as the shared space. ioremap on the cortex side. Jun 17 16:52:44 vedant16[m]: Well, if LLVM is too difficult to work with, there might be some other compiler frameworks that you could use. You aren't using a fraction of the LLVM functionality for what you need to do, so that might be a bit overkill for this project. Jun 17 16:53:15 okay Jun 17 16:53:23 lorforlinux[m]1: makes it a pita to trace down crashes. you no longer have a single dtb to figure how drivers are configured Jun 17 16:53:59 LLVM is quite tough, I tried reading docs, I couldn't progress. Could you name some other compiler frameworks? Jun 17 16:54:42 hendersa: I had a doubt, I generate a AST from my front end, after that backend will handle code generation, or do i need to emit code in somethin like SSA ? Jun 17 16:55:36 vedant16[m]: SSA is the best way to go, since it is unambiguous. The backend is really the difficult part. Jun 17 16:56:10 vedant16[m]: Is there a way to use that existing PRU backend project by feeding an LLVM intrinsic file into it? Jun 17 16:56:16 Students - this week's meeting in addition to a great opportunity for touching base with your mentors - can you please check in with: 1) all good with hardware? 2) all good with mentors coming to your weekly tech meeting? 3) main accomplishment from the last week? 4) any blockers ? Jun 17 16:57:06 Not sure about this. Jun 17 16:57:39 Okay, I can generate code in SSA, after that i don't know how to proceed Jun 17 16:57:53 cwicks: 1.) all good 2.) all good 3.) Getting Overlay for BBAI working on 4.19-rt including drivers 4.) no Jun 17 16:58:06 vedant16[m]: My suggestion would be to focus on getting that backend project up and running as best as you can. Jun 17 16:58:28 vedant16[m]: Try to figure out what step in the compilation process the crash is occurring. Jun 17 16:58:40 1) tech lab cape yet to come 2) Yes 3) Almost completed front end 4) none Jun 17 16:59:06 thanks nwan Please advise your main objective for upcoming week? Jun 17 16:59:11 Oh, it compiled correctly, the binary generated fails to compile code Jun 17 16:59:33 thanks vedant16 Please expand on almost completed front end? Jun 17 17:01:03 I have implemented all the language features except for functions and register access (milestone 1,2 complete and 3 is half complete), and symbol table is done too. Jun 17 17:02:19 cwicks: 1. Techlab cape in customs 2. Not everyone is available in the meeting 3. Yes 4. No Jun 17 17:02:42 cwicks: My main objectives for the week are documenting drivers, testing and implementing Overlay for BBB Jun 17 17:03:10 vedant16 Do you want to discuss the title with cwicks today Jun 17 17:03:21 pratimugale: Yes Jun 17 17:03:32 vedant16[m]: When you compile a test program, try to add compile flags to clang that make the generated binary as simple as possible. Things like "-nostdlib", "-nopie", etc. Jun 17 17:03:56 vedant16[m]: These are features that you don't need and that may be confusing clang into a segfault. Jun 17 17:04:11 Alright, I will try this. Jun 17 17:04:22 vedant16[m]: Basically, just try compiling an empty main() that doesn't have anything else. Jun 17 17:04:33 vedant16[m]: See how far you get. Jun 17 17:05:37 vedant16[m]: There is that whole directory of test programs in the backend, too. Try building those with the arguments as they are listed in each test's header comments. Jun 17 17:07:21 usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000004000f0 Jun 17 17:07:42 It compiled with empty main surprisingly Jun 17 17:08:26 vedant16[m]: You'll need to build it as a single .o and then examine that to see what it contains. Jun 17 17:09:14 vedant16[m]: If you build a full program, you'll need that start symbol in there so that the program knows where to start execution. Normally, libc has the start symbol so your usual C program doesn't worry about it. Jun 17 17:09:24 I will post here Jun 17 17:10:28 vedant16[m]: Try something like "clang -O3 -S -o - -target pru -fverbose-asm -mllvm -bbo-combiner2 file.c" Jun 17 17:10:44 vedant16[m]: That will show you the PRU asm being generated. Jun 17 17:11:02 * lorforlinux[m]1 sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/peJygkvwnhGldKVlAksMTjeT > Jun 17 17:14:52 https://pastebin.com/KAAqwrF3 Jun 17 17:15:08 int main() is there for that, right ? Jun 17 17:16:06 vedant16[m]: Yes. What command line argument did you use to build this? Jun 17 17:16:28 this Jun 17 17:17:43 vedant16[m]: So, have you fed this generated file into pasm? Jun 17 17:18:14 Nope, not yet. Jun 17 17:18:27 But asm seems correct. Jun 17 17:18:53 vedant16[m]: I think you're on the right track, then. Jun 17 17:19:08 vedant16[m]: You may just have to build this in multiple stages. Jun 17 17:19:14 Okay, did you see this ? https://github.com/bryant/llvm-pru/blob/master/TODO.md Jun 17 17:19:51 Ohh, can i build asm using gcc / Jun 17 17:19:53 > <@freenode_hendersa:matrix.org> vedant16: You may just have to build this in multiple stages. Jun 17 17:19:53 * Ohh, can i build asm using gcc ? Jun 17 17:20:13 vedant16[m]: The final generated asm from the backend gets fed into pasm as the assembler. Jun 17 17:20:31 I mean gcc-10 has support for PRU, and is it possible that i use backend used by GCC PRU C ? Jun 17 17:20:55 Isn't pasm obselete ? Jun 17 17:21:22 vedant16[m]: That (gcc) would work, if you can get that PRU target built and tested. Jun 17 17:21:52 vedant16[m]: Then, you could turn your pseudo programming language into C and feed the C into gcc. Jun 17 17:22:18 oh great, so AST to C ? Jun 17 17:22:22 deepankarmaithani: sorry didn't see your response to main accomplishment from the last week? Jun 17 17:22:36 and then just use gcc ? Jun 17 17:23:20 vedant16[m]: Yes. It should be pretty straightforward to feed the output of lex/yacc into GCC. Jun 17 17:24:51 Maybe i could do with macros ? Jun 17 17:25:43 This seems doable given my lack of knowledge of llvm. Is it possible i use backend used by gcc ? Jun 17 17:26:07 vedant16[m]: Well, experiment a bit with simple C code, first. Create a small main()-only program, compile it with the GCC PRU backend, and have it dump out the intermediary files. Examine those files to see if the generated PRU asm looks correct. Jun 17 17:26:44 vedant16[m]: I highly recommend using gcc as a one-stop solution, rather than pulling in a (potentially obsolete) LLVM backend and trying to stitch it all together. Jun 17 17:26:59 alright, i will try this. Jun 17 17:27:54 vedant16[m]: I have to get back to my work, but it sounds like you have a path forward. Experiment with it a little and see how far you get. Jun 17 17:28:06 Agreed, llvm is tough to start with. Jun 17 17:28:30 Sure, thanks for the help :)) Jun 17 17:28:46 vedant16[m]: Yeah, I've worked with LLVM internals in the past, and it has a bit of a learning curve. Jun 17 17:28:55 vedant16[m]: Take care, and good luck! Jun 17 17:29:13 Will you be availabe next monday? or could you tell me when you will be free ? Jun 17 17:30:37 vedant16[m]: The Monday timeslot has been tough for me, but I will try to block out my work calendar to make it for the technical meeting. Jun 17 17:30:53 It was interfacing the PRU with the shift register Jun 17 17:32:13 We can have a separate meeting apart from monday when you have a free time, if monday is tough. Jun 17 17:50:19 Abhishek_: pratimugale After today's discussion with hendersa, I want to use GCC as backend, alright ? Jun 17 19:05:49 jkridner: i tried all 4 UART overlays individually and all at once, everything works fine and I am able to use same user space code on both BBB and BBAI :) Jun 17 19:06:21 will work on other buses now Jun 18 01:51:23 Nice. I guess that is because of the /dev/bone/uart/X symlinks? Jun 18 01:53:00 next step is making the overlays the same? I think you can do it with symbol names, though it might be confusing. I'm thinking bone-uart-X: uartY { } or something along those lines. Not sure if it is possible or if you found another strategy. **** ENDING LOGGING AT Thu Jun 18 02:59:57 2020