Created
November 5, 2013 17:35
-
-
Save omerk/7322909 to your computer and use it in GitHub Desktop.
Generic Makefile for the Parallella board.
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
ESDK=${EPIPHANY_HOME} | |
ELIBS=${ESDK}/tools/host/lib | |
EINCS=${ESDK}/tools/host/include | |
ELDF=${ESDK}/bsps/current/fast.ldf # Modify this for different linker options | |
EHDF=${EPIPHANY_HDF} | |
# Modify this to suit the name of your application. | |
# Host app should be: $APP.c and device app: e_$APP.c | |
APP=hello_world | |
all: host device convert | |
host: | |
gcc ${APP}.c -o ${APP}.elf -I ${EINCS} -L ${ELIBS} -le-hal -g | |
device: | |
e-gcc -T ${ELDF} e_${APP}.c -o e_${APP}.elf -le-lib -g | |
convert: | |
e-objcopy --srec-forceS3 --output-target srec e_${APP}.elf e_${APP}.srec | |
run: | |
sudo -E LD_LIBRARY_PATH=${ELIBS}:${LD_LIBRARY_PATH} EPIPHANY_HDF=${EHDF} ./${APP}.elf | |
debug: | |
sudo -E LD_LIBRARY_PATH=${ELIBS}:${LD_LIBRARY_PATH} EPIPHANY_HDF=${EHDF} gdb ./${APP}.elf | |
clean: | |
rm -f *.elf *.srec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also useful (and related to the Makefile):
Save the following as
/opt/adapteva/env.sh
and source it in your.bashrc
: