On 5/1/2019 5:27 PM, Jon Elson wrote: > So, I have some old test programs with compiled ARM and PRU binaries, and > they seem to work. Now, I need to create new programs on the > 4.19.32-bone-rt-r31 kernel. > I didn't know where to find the includes for the prussdrv, so I got them > off my old bone system. That might be a mistake, they seem to conflict > with the current docs and also the code which I did compile on a previous > system. > > Anyway, when compiling with this command : > g++ $1.c -o $1 -lpthread -lprussdrv > > I get these errors : > test.c: In function ‘int main()’: > test.c:74:50: error: too few arguments to function ‘int > prussdrv_exec_program(int, const char*, int)’ > prussdrv_exec_program (PRU_NUM, "./test.bin"); > ^ > In file included from test.c:13:0: > /usr/include/prussdrv.h:172:9: note: declared here > int prussdrv_exec_program(int prunum, const char *filename, int > disabled);
You're missing the disabled flag. > ^~~~~~~~~~~~~~~~~~~~~ > test.c:75:43: error: too few arguments to function ‘int > prussdrv_pru_wait_event(unsigned int, int*)’ > prussdrv_pru_wait_event (PRU_EVTOUT_0); > ^ > In file included from test.c:13:0: > /usr/include/prussdrv.h:160:9: note: declared here > int prussdrv_pru_wait_event(unsigned int host_interrupt, int > *event_count); > ^~~~~~~~~~~~~~~~~~~~~~~ You're missing *event_count > Both of these function calls SEEM to have the right number of arguments! > > How should I install the right include files for the pruss driver? There is no "pruss driver", the UIO driver used to talk to the PRU is part of the kernel source. The prussdrv library used to facilitate controlling the PRU was written by TI, and I think I initially got it from github somewhwere (likely in the old BeagleBone PRU support files repo). The version I use has been pulled into the Machinekit source tree, see the files with "prussdrv" in the name: https://github.com/machinekit/machinekit/tree/master/src/hal/support/pru -- Charles Steinkuehler char...@steinkuehler.net -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.