Browse files

o Make PRU package sub-module

  • Loading branch information...
hzeller committed Mar 29, 2015
1 parent d39ecef commit fbdc4be22056cb10540e6c46fea9aadb4f4491a7
Showing with 29 additions and 25 deletions.
  1. +3 −0 .gitmodules
  2. +11 −7 Makefile
  3. +14 −18
  4. +1 −0 am335x_pru_package
@@ -0,0 +1,3 @@
[submodule "am335x_pru_package"]
path = am335x_pru_package
url =
@@ -9,14 +9,15 @@
# and set the prefix
# Tuning options for ARM CPU.
ARM_OPTIONS?=-mtune=cortex-a8 -march=armv7-a
# Tuning options for ARM CPU. Unset this in an environment variable if compiled on
# a different system.
ARM_COMPILE_FLAGS?=-mtune=cortex-a8 -march=armv7-a
# Location of am335x package
LDFLAGS+=-lpthread -lm
@@ -44,9 +45,12 @@ BeagleG-00A0.dtbo: BeagleG.dts
%.o: %.c
$(CROSS_COMPILE)gcc $(CFLAGS) -c -o $@ $<
%_bin.h : %.p
%_bin.h : %.p $(PASM)
$(PASM) -V3 -c $<
make -C $(AM335_BASE)
pru-motion-queue.o : motor-interface-constants.h $(PRU_BIN)
motor-operations.o : motor-interface-constants.h
sim-firmware.o : motor-interface-constants.h
@@ -67,29 +67,25 @@ The interfaces are typically C-structs with function pointers which allows for
easy testing or simple translation into languages such as Go or C++.
## Build
The Makefile is assuming that you build this either on the Beaglebone Black
directly, or using a cross compiler (see Makefile).
To build, we need the BeagleG code and the PRU assembler with supporting library.
The BeagleG repository is set up in a way that the PRU assembler is checked out via
a sub-module to make these things simple.
You need to have checked out
which provides the pasm PRU assembler and the library to push this code to the
Clone the BeagleG repository with the `--recursive` flag to get this sub-module
# Check out and build am335 package
git clone
cd am335x_pru_package/
cd pru_sw/utils/pasm_source ; ./linuxbuild ; cd -
CROSS_COMPILE="" make -C pru_sw/app_loader/interface/
cd ..
# Check out BeagleG and build
git clone
cd beagleg
git clone --recursive
(If you are a github user, you might want to use the git protocol).
If you run into compile problems, make sure to have both, am335x_pru_package and
beagleg up-to-date from git.
Then just
cd beagleg
If you are looking at the code and developing on a non-Beaglebone machine, pass an empty
`ARM_COMPILE_FLAGS` environment variable:
## Getting started
Before you can use beagleg and get meaningful outputs on the GPIO pins,
Submodule am335x_pru_package added at 87f7a1

0 comments on commit fbdc4be

Please sign in to comment.