Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Enhancements #13

Open
wants to merge 372 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
372 commits
Select commit Hold shift + click to select a range
c17e2ca
include all dep files
Jan 1, 2000
85a3d4c
fix fire drawing on the entire image
osresearch Jan 1, 2000
8613f2b
48 outputs of ws281x using the same slicing technique as the matrix code
osresearch Jan 1, 2000
42bfc19
receiver code works with ws281x
osresearch Jan 1, 2000
0366179
add outputs 3 and 4. i2c is messing them up?
osresearch Jan 1, 2000
9c70a79
all pins mapped and almost all functional
osresearch Jan 1, 2000
85af728
output 1 works!
osresearch Jan 1, 2000
45e6aa5
output 2 works
osresearch Jan 1, 2000
7a414c1
started on a mta display program
Jan 1, 2000
6c8b62c
extend clock pulse slightly
Jan 1, 2000
b83e84b
remove old comment
osresearch Jan 1, 2000
16c62f4
send pre-formatted matrix to pru, rearrange based on config values
osresearch Jan 1, 2000
37ed6bb
a few chars
Jan 1, 2000
7686f42
MTA sign scrolling works
Jan 1, 2000
19b3dee
double buffer the display
osresearch Jan 1, 2000
8f42181
change scan order to fully draw one row at all brightnesses before mo…
osresearch Jan 1, 2000
1b8fd7a
more test to demonstate various ghosting bugs
osresearch Jan 1, 2000
e937a81
draw a identifying text on each panel
osresearch Jan 1, 2000
05cabfe
disable output during low-brightness stages
osresearch Jan 1, 2000
c85611e
fix bright rows 7 and 15. adjust brightness scaling
osresearch Jan 1, 2000
960ccad
OPC receiver
osresearch Jan 1, 2000
7749dde
dim mode
osresearch Jan 1, 2000
b6e5331
zig zag panels
osresearch Jan 1, 2000
f3961a7
fix for matrix
osresearch Jan 1, 2000
014b019
size for matrix
osresearch Jan 1, 2000
eecbf1b
two color first row
Jan 1, 2000
c066f5e
started conversion for new layout
osresearch Jan 1, 2000
0b5a615
Save a few registers and cycles by writing row with a shift
osresearch Sep 9, 2013
0e3ef3d
todo -- track four pointers to save v20ns per data clock
osresearch Sep 9, 2013
6e5225f
Track the four outputs individually, save a few ns per data cycle
osresearch Sep 11, 2013
2eaba01
tweak the pwm params
osresearch Sep 11, 2013
1f75767
v1 of the cape
osresearch Sep 11, 2013
34c0115
fix brightness error on rows 7 and 15 by adding a bogus dummy row
osresearch Sep 11, 2013
f01adda
matrix test with a few other color options
osresearch Sep 11, 2013
edba42c
need to update pin list
osresearch Sep 11, 2013
b93da2c
Merge branch 'master' of https://github.com/osresearch/LEDscape
osresearch Sep 11, 2013
f93c2f4
Send data using the python image library
osresearch Sep 15, 2013
0e1508e
Scrolling time display works.
osresearch Sep 15, 2013
7146293
Scrolling multi-color example; removed bitmap test since it is no lon…
osresearch Sep 15, 2013
88f9d1d
Remove bitmap test
osresearch Sep 19, 2013
ae5e6c2
octoscroller gets octo-outputs
Sep 29, 2013
b950580
octoscroller renamed outputs
Sep 29, 2013
16ae931
As ordered from OSH Park
osresearch Sep 29, 2013
c431388
port of the pyramid Fire to the octascroller
osresearch Sep 30, 2013
147c985
Merge https://github.com/osresearch/LEDscape
osresearch Sep 30, 2013
985a05e
slow it down, tweak pallete and avoid empty first line
osresearch Sep 30, 2013
35cc4c5
reset occasionally
osresearch Sep 30, 2013
4185a72
add sparkles
osresearch Jan 7, 2000
36297c4
Use ns parameter in WAITNS macro
vmpn Oct 18, 2013
932b7e7
Merge pull request #2 from vmpn/patch-1
osresearch Oct 18, 2013
d7a8157
adapt to work with LED strips again
osresearch Jan 1, 2000
5aba434
Move images around
osresearch Nov 22, 2013
93dcf97
Remove targets that curently don't build
osresearch Nov 22, 2013
56b93ef
use binary coded pwm to improve smooth colors
osresearch Dec 18, 2013
c5f0228
steeper steps to show more gradation
osresearch Dec 18, 2013
f9f334e
rename angstrom dtb
osresearch Dec 18, 2013
ba34cbb
reworked slightly to adjust position of connectors; ordered via oshpark
osresearch Jan 8, 2014
74126d4
ubuntu on bbb
Dec 18, 2013
22ee3ae
enable pru
osresearch Jan 12, 2014
09dad16
DTS files
osresearch Jan 12, 2014
bd20fbb
Fix brightness so that it is visible on the matrix
osresearch Jan 15, 2014
f61dabb
erge branch 'master' of https://github.com/osresearch/LEDscape
osresearch Dec 18, 2013
eac1795
C++ fixes
Jan 24, 2014
c6e5839
C++ fixes
Jan 24, 2014
72647e0
import of GPLed perlin noise code and wrapper for ledscape
Jan 24, 2014
30443cc
import of GPLed perlin noise code and wrapper for ledscape
Jan 24, 2014
60e4b7a
brighten it up
Jan 24, 2014
a9ed36b
build the perlin demo
Jan 24, 2014
c28d29d
do panel copy in one pass
Jan 24, 2014
3b5096b
fix matrix mode inits
Jan 24, 2014
be5f5c2
fix color space for 24-bit rgb
Jan 25, 2014
5df3e8e
bbb pru config finally works. device tree sucks
osresearch Feb 22, 2014
7acf010
support the 32x32 arrays
osresearch Feb 22, 2014
01bf6d4
brightness note
osresearch Feb 22, 2014
fa21965
started on MTA sign font
osresearch Feb 23, 2014
57ef1c6
updated a few chars
osresearch Feb 23, 2014
93546a4
more letters imported
osresearch Feb 26, 2014
00dd809
Fix capemgr for debian
Feb 26, 2014
a2d26ed
fix for cube
Feb 26, 2014
21a33b1
turn off the power management features for wifi
Feb 26, 2014
48d42ea
something is not right with the width; glitches at 128?
Feb 26, 2014
73e2215
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
osresearch Feb 26, 2014
d368cac
life on the cube scroller
Mar 2, 2014
78daee8
colorful fading
Mar 2, 2014
cd5cbfd
cube life almost works; edges not quite right yet
Mar 2, 2014
e0e27b8
identify is broken? something is wrong with the expected layout
Mar 3, 2014
cfae76f
draw six image faces
Mar 3, 2014
f7b955d
cube life works. frustratingly the mapping is backwards?
Mar 3, 2014
5bf5042
tweak identify routine
Mar 3, 2014
d14acb6
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
Mar 3, 2014
4ea24e9
tweak parameters
Mar 3, 2014
2bf8d00
rename image-cube to cube-image
Mar 3, 2014
a6dc6d6
avoid extra prints
Mar 3, 2014
ab4f235
fix r30/r31 overwrite bug
Mar 16, 2014
39810d5
Fix gpio lines, switch back to 32x16 matrices
Mar 16, 2014
1ca5a1a
test pwm hardware in dts; not used yet
Mar 16, 2014
fa61fcd
a few more characters
Jan 1, 2000
e131ef1
flat bracket to connect to 15mm extrusion
osresearch Mar 20, 2014
ccfff36
brackets for 15mm mitsum rail
osresearch Mar 21, 2014
90f2a20
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
osresearch Mar 21, 2014
5b9b6bf
started on bracket to use 20mm extrusion
osresearch Mar 22, 2014
8b03b5c
printed for flat
osresearch Mar 22, 2014
84cbe42
Identify based on the mta font
Mar 23, 2014
c30b86d
flipping works for vertical panels
Mar 23, 2014
539f380
add framebuffer flipping code to deal with zig-zag orientation
Mar 23, 2014
6edab9e
move brightness level to a top-level define
Mar 23, 2014
8e6ccd3
use framebuffer flipping code for16 matrix panel
Mar 23, 2014
d40d6d6
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
Mar 23, 2014
6b0e0b0
flip the framebuffer for the leds
Mar 24, 2014
98a904b
Add 'q', ':', ',' to MTA font JSON
gdickinson Mar 26, 2014
7581bcb
brackets for octoscroller, 8 or 16 sided
Mar 28, 2014
e6a7065
matrix config into a separate routine
Mar 28, 2014
3d818a9
wrapping sort of works
Mar 28, 2014
4559efe
8 panels of output; should be a config
Mar 28, 2014
748d5d5
config files
Mar 28, 2014
aad5d38
Merge branch 'master' of https://github.com/osresearch/LEDscape
Mar 28, 2014
15b730c
20mm brackets the other way
osresearch Mar 28, 2014
4683ac1
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
osresearch Mar 28, 2014
41666a8
matrix-udp-rx works with pyramid and mini-pyramid
Mar 29, 2014
2ec1727
fire rendering works on the mini-pyramid
Apr 4, 2014
d7b5cb6
full size octoscroller matrix
Apr 4, 2014
c49e2a8
full size mini-pyramid
Apr 4, 2014
a8c7093
receive and space the pixels for the mini pyramid
Apr 4, 2014
87e9f86
disable double buffering
Apr 7, 2014
a228f07
enable life on the full pyramid
Apr 7, 2014
75c6ad2
pre-compiled device tree cape
Apr 8, 2014
7d8f611
Merge pull request #7 from gdickinson/add_lowercase_q
osresearch Apr 13, 2014
e78f5a6
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
Apr 13, 2014
dc6c6de
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
osresearch Apr 13, 2014
c5d880b
move everything into subdirectories; makefile is broken for now
Apr 13, 2014
543ceda
makefiles that sort of work
Apr 13, 2014
66a5329
makefiles for each subdir, easier targets
Apr 13, 2014
3d5c5df
makefile tweaks; things mostly work again
Apr 13, 2014
868367f
split strip and matrix code
Apr 13, 2014
d427dc3
move matrix config into ledscape.h
Apr 13, 2014
c5d742d
move matrix remap into ledscape.c
Apr 13, 2014
ffb5814
import a fixed-width 8px font, cleanup unused bitslicing code
Apr 13, 2014
d57039b
make every binary depend on libledscape.a
Apr 13, 2014
191ef3d
rudimentary matrix config parser
Apr 13, 2014
ae21c3c
use config system
Apr 14, 2014
d4b5874
remove last deps on bitslice.h
Apr 14, 2014
87400e2
empty dir files
Apr 14, 2014
96dcad3
abort if a subdir fails
Apr 14, 2014
6493c58
Merge ../working
Apr 14, 2014
a1d732d
top half of single pass remapping works
Apr 14, 2014
db29360
removed dead code in matrix draw
Apr 14, 2014
eedcc3f
added default matrix config
Apr 14, 2014
64fb1e0
default matrix config
Apr 14, 2014
bc6fb5f
off-by-16 error
Apr 14, 2014
829bc6f
include all panel outputs
Apr 14, 2014
16131ad
everything builds again
Apr 14, 2014
0355dca
comment color alignment
Apr 14, 2014
756ad0f
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
Apr 14, 2014
9148a2d
add -g
Apr 15, 2014
1240d29
change colors, allow config
Apr 15, 2014
becec3d
fail cleanly
Apr 15, 2014
5270a49
ws2812 strips work again, although first pixel is noisy
Apr 15, 2014
a43d9f8
config cleanup
Apr 15, 2014
34b2d41
resize for strip test
Apr 15, 2014
7733677
Add init.d script for starting/stopping LEDscape
cibomahto Apr 19, 2014
bf2b191
32-sided plate layout
osresearch Apr 20, 2014
d435abc
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
osresearch Apr 20, 2014
7713c43
tall brackets
osresearch Apr 20, 2014
e7b1f17
tweak parameters a bit
Apr 20, 2014
b9dd54a
merged
Apr 20, 2014
646fda2
firmware loader
Apr 20, 2014
3e28bcd
remove timer code, move reading from stdin into a separate thread
Apr 20, 2014
1522fd6
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
Apr 20, 2014
21565bb
run at boot on angstrom
Jan 1, 2000
8d2975d
knob controller for the perlin noise box
osresearch Apr 20, 2014
db07a0d
smaller plate for vertical bracket
osresearch Apr 20, 2014
694c635
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
osresearch Apr 20, 2014
2c32df0
vertical attachment brackets, too
osresearch Apr 21, 2014
73572b4
Hacks and kludges to get the WS2812B working again.
cibomahto Apr 21, 2014
6fc884f
T-bracket for center section
osresearch Apr 21, 2014
d32c548
life works again
osresearch Apr 21, 2014
d891d44
read four arguments from serial port
osresearch Apr 21, 2014
75f3762
identify does panel/output numbers
Apr 22, 2014
2c061ab
mapped tall cylinder
Apr 22, 2014
d0e2c8f
update matrix test; this should be an option
Apr 22, 2014
dc35361
wrap on the cylinder
Apr 22, 2014
cb12d2c
matrix-udp-rx works with transmitter code (half the panels)
Apr 22, 2014
1da26cf
include dependency files
Apr 22, 2014
ddfc997
parameters for cylinder; need to make these runtime
Apr 22, 2014
5489677
dual frame reception (compatible with megaScrollerTransmitter)
Apr 25, 2014
53e56a4
fire works on the mega scroller
Apr 25, 2014
d8e4df6
v1.3 of boards (as ordered)
osresearch May 6, 2014
a76db63
make the fire rotate
May 7, 2014
24b98ba
brighter!
May 7, 2014
10a362c
getoptified stuff
May 7, 2014
f41fb40
timeout works
May 7, 2014
0174c23
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
May 7, 2014
af7505c
option to not call pru_exec() if things are already running
May 7, 2014
ee64ff7
fix newline handling in ledscape_printf
May 7, 2014
d94d5e9
silence ledscape_printf
May 7, 2014
ae2327d
Add missing receiver pcb design
cibomahto May 17, 2014
1b400af
increase startup delay
May 24, 2014
05e4d60
merged
May 24, 2014
04e7676
default to a 256x128 arrangement
May 24, 2014
990e1b2
install script for angstrom
May 24, 2014
24c92b0
do not fill up the log
May 24, 2014
cd89362
update the uEnv file, too
May 24, 2014
354e6e7
handle case of /media/BEAGLEBONE already being mounted
May 24, 2014
b21c5b1
TCP receiving code
osresearch May 31, 2014
6a68c77
Merge branch 'master' of ssh://github.com/osresearch/LEDscape
osresearch May 31, 2014
c8ef234
python test works agian
osresearch Jun 1, 2014
20e1b72
using hmason/botomatic to get twitter results
osresearch Jun 1, 2014
745e7b7
.beats time for @phooky
osresearch Jun 4, 2014
30a0b37
two player lightcycles game
osresearch Jun 6, 2014
4293d55
RevB LEDscape board design: slightly bigger, debug headers for all si…
cibomahto Aug 2, 2014
d97f537
New receiver design: 4x output instead of 8x output
cibomahto Aug 2, 2014
8ae532c
Merge branch 'master' of github.com:osresearch/LEDscape
cibomahto Aug 2, 2014
0fdaf24
Redesign transmitter PCB to use top and bottom ground planes, and one…
cibomahto Aug 2, 2014
d9011ed
Receiver 4x: Rev B design
cibomahto Aug 3, 2014
05a6a77
Updated BBB footprint, mounting holes in LEDscape baord, small cleanups
cibomahto Aug 3, 2014
902d4d1
Make consistant whitespace formatting in ws281x.p
cibomahto Aug 9, 2014
1f9402d
More cleanup and whitespace alignment in ws281x.p
cibomahto Aug 9, 2014
df0a162
Reassign GPIOs for WS281x mode
cibomahto Aug 9, 2014
b53494f
Merge branch 'master' of github.com:Blinkinlabs/LEDscape
cibomahto Aug 9, 2014
bd41ef7
Fix mapping for new LEDscape board, fix bug in matrix-udp-rx
cibomahto Aug 22, 2014
a3d8591
Move scripts to src/scripts, remove old udp receiver example
cibomahto Aug 22, 2014
5c45ead
Add makefile rule to copy scripts, extended setup instructions
cibomahto Aug 22, 2014
a3bb94d
Document upstart startup script
cibomahto Aug 22, 2014
10948d3
Add pin assignments chart for LEDscape trasnsmitter board
cibomahto Aug 22, 2014
a240d87
create empty bin directory
osresearch Sep 7, 2014
aea845d
Update Setup.md
cibomahto Sep 13, 2014
9f96f25
Fixes to allow configuration of 32x32 panels.
AwesomeDolphin Sep 18, 2014
3d43f24
Update the configuration to handle a 64x64 display made up of one cha…
AwesomeDolphin Feb 5, 2015
7564b72
Games in all the wrong directories
AwesomeDolphin Feb 5, 2015
7bc132a
Move ledgames stuff to it's own directory
AwesomeDolphin Feb 9, 2015
8603972
Draws some invaders
AwesomeDolphin Feb 16, 2015
a10ce30
Sprites move and animate.
AwesomeDolphin Feb 17, 2015
b81673b
Automatically build both required dtbo files
Mar 9, 2015
263a348
Merge branch 'LedGames' of github.com:KeithHenrickson/LEDscape into L…
Mar 9, 2015
d55a82f
Invaders game progress
AwesomeDolphin Mar 9, 2015
e570b29
Updated .gitignore to ignore DS_Store files
AwesomeDolphin Mar 15, 2015
2567cf2
Remove those files which aren't used for the LEDgames project
AwesomeDolphin Mar 15, 2015
326f162
Remove a duplicate
AwesomeDolphin Mar 20, 2015
93f2bdc
Invaders is now semi-playable
AwesomeDolphin Mar 22, 2015
ecac2d6
Invaders shoot and player takes damage. Animations. Multiplayer fixes
AwesomeDolphin Mar 23, 2015
32f86dd
Support blue/green software flip
AwesomeDolphin Mar 29, 2015
f2d66bf
Add resources for games
Mar 29, 2015
26f4edf
Automatically place resources
AwesomeDolphin Mar 29, 2015
635f00f
Animated ship and ship destruction
AwesomeDolphin Mar 29, 2015
c7700c0
Remove more code not used for the games
Mar 29, 2015
22c4391
Invaders have scores when shot.
AwesomeDolphin Mar 30, 2015
670a043
Menu doesn't exit.
AwesomeDolphin Apr 26, 2015
0c7c05c
Slow down invader firing.
AwesomeDolphin Apr 26, 2015
ce585c2
Flip controls for dual player
AwesomeDolphin Apr 26, 2015
04c8c0a
Add sounds to invaders mode!
AwesomeDolphin May 10, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.*.swp
.*.swo
*.i
*.o
*.a
*.bin
pcb/*.b[^r][^d]
pcb/*.p[^c][^b]
rgb-test
am335x/pasm/pasm
.*.d
*~
*~
bin/*
*.dtbo
.DS_Store
74 changes: 21 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,57 +1,25 @@
#CROSS_COMPILE?=arm-arago-linux-gnueabi-

LIBDIR_APP_LOADER?=../../app_loader/lib
INCDIR_APP_LOADER?=../../app_loader/include
BINDIR?=.

CFLAGS += \
-std=c99 \
-Wall \
-I$(INCDIR_APP_LOADER) \
-D__DEBUG \
-O2 \
-mtune=cortex-a8 \
-march=armv7-a \

LDFLAGS += \
-L$(LIBDIR_APP_LOADER) \
-lprussdrv \
-lpthread \

PASM := ../../utils/pasm_2
OBJDIR=obj
TARGET=$(BINDIR)/ws281x

_DEPS =
DEPS = $(patsubst %,$(INCDIR_APP_LOADER)/%,$(_DEPS))

_OBJ = ws281x.o
OBJ = $(patsubst %,$(OBJDIR)/%,$(_OBJ))

$(OBJDIR)/%.o: %.c $(DEPS)
@mkdir -p obj
$(CROSS_COMPILE)gcc $(CFLAGS) -c -o $@ $<

all: $(TARGET) ws281x.bin
$(TARGET): $(OBJ)
$(CROSS_COMPILE)gcc $(CFLAGS) -o $@ $^ $(LDFLAGS)

ws281x.bin: ws281x.p ws281x.hp
$(CPP) - < $< | grep -v '^#' | sed 's/;/\n/g' > $<.i
$(PASM) -V3 -b $<.i
#########
#
# Top level Makefile.
# Mostly just recurse into subdirectories.

SUBDIR-y += dts
SUBDIR-y += src/ledscape
SUBDIR-y += src/script
SUBDIR-y += src/ledgames
SUBDIR-y += src/ledgames/rsrc

all:
for dir in $(SUBDIR-y); do \
$(MAKE) -C $$dir || exit 1; \
done

clean:
for dir in $(SUBDIR-y); do \
$(MAKE) -C $$dir clean; \
done

.PHONY: clean

clean:
rm -rf $(OBJDIR)/ *~ $(INCDIR_APP_LOADER)/*~ $(TARGET) ../bin/ws281x.bin ws281x.bin
firmware:
echo CAPE-BONE-OCTO > /sys/devices/bone_capemgr.8/slots

SLOT_FILE=/sys/devices/bone_capemgr.8/slots
dts: LEDscape.dts
@SLOT="`grep LEDSCAPE $(SLOT_FILE) | cut -d: -f1`"; \
if [ ! -z "$$SLOT" ]; then \
echo "Removing slot $$SLOT"; \
echo -$$SLOT > $(SLOT_FILE); \
fi
dtc -O dtb -o /lib/firmware/BB-LEDSCAPE-00A0.dtbo -b 0 -@ LEDscape.dts
echo BB-LEDSCAPE > $(SLOT_FILE)
180 changes: 180 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
#########
#
# Common build targets
#
#

TOP ?= ../..
OBJDIR ?= $(TOP)/obj
LIBDIR ?= $(TOP)/lib
BINDIR ?= $(TOP)/bin

all: \
$(TARGETS-y) \
$(foreach O,$(BIN-y),$(BINDIR)/$O) \
$(foreach O,$(LIB-y),$(LIBDIR)/$O) \

ifeq ($(shell uname -m),armv7l)
# We are on the BeagleBone Black itself;
# do not cross compile.
export CROSS_COMPILE:=

else
# We are not on the BeagleBone and might be cross compiling.
# If the environment does not set CROSS_COMPILE, set our
# own. Install a cross compiler with something like:
#
# sudo apt-get install gcc-arm-linux-gnueabi
#
export CROSS_COMPILE?=arm-linux-gnueabi-
endif

GENERIC_CFLAGS += \
-g \
-W \
-Wall \
-D_BSD_SOURCE \
-Wp,-MMD,$(dir $@).$(notdir $@).d \
-Wp,-MT,$@ \
-I. \
-I$(TOP)/src/ledscape \
-O0 \
-mtune=cortex-a8 \
-march=armv7-a \

CFLAGS += \
-std=c99 \
$(GENERIC_CFLAGS) \

CPPFLAGS += \
$(GENERIC_CFLAGS) \
-std=c++11

LDFLAGS += \

LDLIBS += \
-L$(LIBDIR) \
-lledscape \
-lpthread \
-lm \
-lpng \
-lSDL \
-lSDL_mixer

COMPILE.c-o = $(CROSS_COMPILE)gcc $(CFLAGS) -c -o $@ $<
COMPILE.cc-o = $(CROSS_COMPILE)g++ $(CPPFLAGS) -c -o $@ $<
COMPILE.cpp-o = $(CROSS_COMPILE)g++ $(CPPFLAGS) -c -o $@ $<
COMPILE.a = $(CROSS_COMPILE)ar crv $@ $^
COMPILE.link = $(CROSS_COMPILE)g++ $(LDFLAGS) -o $@ $^ $(LDLIBS)

$(OBJDIR)/%.o: %.c
$(COMPILE.c-o)
$(OBJDIR)/%.o: %.cpp
$(COMPILE.cpp-o)
$(OBJDIR)/%.o: %.cc
$(COMPILE.cc-o)

$(LIBDIR)/%.a:
$(RM) $@
$(COMPILE.a)

$(BINDIR)/%:
$(COMPILE.link)


#####
#
# The TI "app_loader" is the userspace library for talking to
# the PRU and mapping memory between it and the ARM.
#
APP_LOADER_DIR ?= $(TOP)/am335x/app_loader
APP_LOADER_LIB := $(APP_LOADER_DIR)/lib/libprussdrv.a
CFLAGS += -I$(APP_LOADER_DIR)/include
LDLIBS += $(APP_LOADER_LIB)


#####
#
# The TI PRU assembler looks like it has macros and includes,
# but it really doesn't. So instead we use cpp to pre-process the
# file and then strip out all of the directives that it adds.
# PASM also doesn't handle multiple statements per line, so we
# insert hard newline characters for every ; in the file.
#
PASM_DIR ?= $(TOP)/am335x/pasm
PASM := $(PASM_DIR)/pasm

$(LIBDIR)/%.bin: %.p $(PASM)
$(CPP) - < $< | perl -p -e 's/^#.*//; s/;/\n/g; s/BYTE\((\d+)\)/t\1/g' > /tmp/$(basename $<).i
$(PASM) -V3 -b /tmp/$(basename $<).i $(basename $@)
$(RM) /tmp/$(basename $<).i

#
# Generate a target for each of the binaries, with dependencies on
# object files for that source.
#
$(foreach O,$(BIN-y),\
$(eval $(BINDIR)/$O: $(foreach s,$($O.srcs),$(OBJDIR)/$(basename $s).o) $(LIBDIR)/libledscape.a))

$(foreach O,$(LIB-y),\
$(eval $(LIBDIR)/$O: $(foreach s,$($(basename $O).srcs),$(OBJDIR)/$(basename $s).o) $(APP_LOADER_LIB)))

#$(TARGETS):
#$(COMPILE.link)


.PHONY: clean

# Include all of the generated dependency files
-include $(OBJDIR)/.*.o.d

clean:
rm -rf \
$(OBJDIR)/*.o \
$(LIBDIR)/*.a \
$(OBJDIR)/.*.o.d \
$(LIBDIR)/*.bin \


###########
#
# The correct way to reserve the GPIO pins on the BBB is with the
# capemgr and a Device Tree file. But it doesn't work.
#
SLOT_FILE=/sys/devices/bone_capemgr.9/slots
DTS=CAPE-BONE-OCTO
DTB=/lib/firmware/$(DTS)-00A0.dtbo
GPIODTS=GPIO
GPIODTB=/lib/firmware/$(GPIODTS)-00A0.dtbo

dts: LEDscape.dts
@SLOT="`grep LEDSCAPE $(SLOT_FILE) | cut -d: -f1`"; \
if [ ! -z "$$SLOT" ]; then \
echo "Removing slot $$SLOT"; \
echo -$$SLOT > $(SLOT_FILE); \
fi
dtc -O dtb -o /lib/firmware/BB-LEDSCAPE-00A0.dtbo -b 0 -@ LEDscape.dts
echo BB-LEDSCAPE > $(SLOT_FILE)



firmware: $(DTB) $(GPIODTB)

$(DTB): cape-bone-octo.dts FORCE
dtc -O dtb -o $@ -b 0 -@ $<

$(GPIODTB): gpio.dts FORCE
dtc -O dtb -o $@ -b 0 -@ $<

FORCE:

###########
#
# PRU Libraries and PRU assembler are build from their own trees.
#
$(APP_LOADER_LIB):
$(MAKE) -C $(APP_LOADER_DIR)/interface

$(PASM):
$(MAKE) -C $(PASM_DIR)

102 changes: 0 additions & 102 deletions README.md

This file was deleted.

Binary file added acrylic/LedBasePlate-X5.cdr
Binary file not shown.
Binary file added acrylic/LedBasePlate-X7.cdr
Binary file not shown.
Binary file added acrylic/LedMount-X5.cdr
Binary file not shown.
Binary file added acrylic/LedMount-X7.cdr
Binary file not shown.
Loading