On Tue, Oct 8, 2013 at 11:04 PM, Charles Steinkuehler <char...@steinkuehler.net> wrote: > On 10/08/13 21:48, Przemek Klosowski wrote: >> On Tue, Oct 8, 2013 at 8:50 PM, Charles Steinkuehler >> <char...@steinkuehler.net> wrote: >> >>> Ah well...maybe someone will write a virtual AVR emulator for the PRU, >>> then you could have *THREE* Arduino's on a Tre!
I agree. We need still need to find if there is any way to give more PRU pins to the headers. With so many peripherals connected, many of the pins are already consumed. Of course, the PRUs can control the regular GPIOs, but much slower. >> >> Now this is crazy, but I think it would be useful to port GCC (or >> llvm) to PRU. It is well known that while top coders can write better >> assembly than best compilers, at least for short codes, the >> relentless nature of compiler optimizations gives them edge on longer >> pieces and less smart programmers. It'd be tricky to implement the >> bitfields, but I believe that all the infrastructure is there. Agreed. Now, how do you find someone to do it? Kickstarter campaign? > > It's not that crazy. The biggest problem is there's no real stack on > the PRU, and while you can emulate one for nested calls, it rapidly > becomes cumbersome and starts eating cycles. And I don't know much C > code that works well with one level of call depth. :( Well, obviously the TI compiler team has figured it out since they created a C compiler (currently in closed beta and soon to be in public beta). Stacks can be implemented with registers and conventions. > > ...but burning 4+ clocks or so on a function call/return probably isn't > the end of the world either. If I did more programming in C (I > generally code in VHDL for my day job, and use C only when I need to > shoot myself in the foot or crash the machine*), I would happily port > gcc to the PRU, but I'll leave that to others. :) Exactly---a little bit of software over head for a huge improvement in ease of use is probably worth it. Of course, the critical areas can/should still be written in assembly. Again, the trick is finding those "others". > > [*] This small C program is 100% equivalent in functionality to > approximately 90+ percent of the C code I've ever written (thanks to > http://llbit.se/?p=1744 for the size reduction!): > > main; > > -- > Charles Steinkuehler > charles@steinkuehler > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beagleboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.