Created
February 18, 2015 23:57
-
-
Save jadonk/a6432fde48408e72fdd7 to your computer and use it in GitHub Desktop.
How to build a PRU binary using libstarterware.a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"/usr/share/ti/cgt-pru/lib/lnk.cmd" | |
MEMORY | |
{ | |
PAGE 2: | |
MEM : org = 0x00026000 len = 0x00002000 CREGISTER=4 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC := clpru | |
LD := lnkpru | |
HEXBIN := hexpru | |
SWDIR = /usr/share/pru_am335x_starterware | |
CGTDIR = /usr/share/ti/cgt-pru | |
INCLUDEDIR = -I$(SWDIR)/include -I$(SWDIR)/include/hw -I$(SWDIR)/include/pru -I$(CGTDIR)/include | |
LIBDIR = -i$(SWDIR)/lib -i$(CGTDIR)/lib | |
CMD = lnk.cmd | |
OBJECTS = blinkled.o | |
TARGET = blinkled.out | |
CFLAGS := -O3 -Dam335x $(INCLUDEDIR) | |
$(TARGET): $(OBJECTS) | |
$(LD) $(CMD) -o $@ $(OBJECTS) $(LIBDIR) -llibstarterware.a | |
%.o: %.c | |
$(CC) -c --output_file=$@ $< $(CFLAGS) | |
.PHONY: clean | |
clean: | |
rm -f $(OBJECTS) $(TARGET) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To build the library, use https://gist.github.com/jadonk/d3e761ade54df23f04a6