Greg: Thanks for looking into the Makefile magic. I was just happy I had something working, without really trying to understand it.
--Mark On Monday, July 11, 2016 at 10:37:49 PM UTC-4, Greg wrote: > > I see what he did differently compared to the TI example's Makefiles. It > is a matter of using the -z option with clpru or a distinct command using > lnkpru. > > How TI does it: > *$(PRU_CGT)/bin/clpru $(CFLAGS) -z* -i$(PRU_CGT)/lib -i$(PRU_CGT)/include > $(LFLAGS) -o $(TARGET) $(OBJECTS) -m$(MAP) $(LINKER_COMMAND_FILE) > --library=libc.a $(LIBS) > > How the BeagleScope Makefile does it: > *$(PRU_CGT)/bin/lnkpru* -i$(PRU_CGT)/lib -i$(PRU_CGT)/include $(LFLAGS) > -o $@ $^ $(LINKER_COMMAND_FILE) --library=libc.a $(LIBS) > > So what BeagleScope is doing is "clpru -z" which is equivalent to the > lnkpru command. > > So to be able to handle this when it appears in a Makefile, it is indeed > good to have the lnkpru link to /usr/bin/lnkpru. > Makes sense now! > > Regards, > Greg > > On Monday, July 11, 2016 at 9:14:48 PM UTC-4, Mark A. Yoder wrote: >> >> Greg: >> I tried removing the symbolic links and I get the following error when >> running make on a BeagleScope example. >> >> Invoking: PRU Compiler >> /usr/share/ti/cgt-pru/bin/clpru >> --include_path=/usr/share/ti/cgt-pru/include >> --include_path=../../../include --include_path=../../../include/am335x -v3 >> -O2 --display_error_number --endian=little --hardware_mac=on >> --obj_directory=gen --pp_directory=gen -ppd -ppa -fe >> gen/PRU_gpioToggle.object PRU_gpioToggle.c >> make: /usr/share/ti/cgt-pru/bin/clpru: Command not found >> Makefile:63: recipe for target 'gen/PRU_gpioToggle.object' failed >> >> The error goes away when I put the link back. Maybe the BeagleScope >> makefiles aren't set up right. >> >> --Mark >> >> On Monday, July 11, 2016 at 8:08:40 PM UTC-4, Greg wrote: >>> >>> One note on the compiler set-up: >>> >>> *ln -s `which lnkpru` .* >>> >>> I haven't found a reason to use the lnkpru command. The linking is done >>> with clpru with the -z option. >>> >>> Compile and link processes all done with a single command. The PRU >>> compiler manual explains the options reasonably thoroughly. >>> >>> Regards, >>> Greg >>> >> -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/8302bfc9-a6aa-4562-b8c4-08a5834463a2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.