Skip to content
Snippets Groups Projects
Commit 922501f0 authored by bbartels's avatar bbartels Committed by dawehr
Browse files

wip: automate creation of BOOT.bin

parent 11dcd820
No related branches found
No related tags found
No related merge requests found
......@@ -5,4 +5,5 @@ inc/
obj/
lib/
lib-zybo/
TAGS
\ No newline at end of file
TAGS
out/
\ No newline at end of file
INCDIR = inc
LIBDIR = lib
OUTDIR = out
WS = $(CURDIR)/xsdk_workspace
.PHONY: default test clean deep-clean
BOOT = $(OUTDIR)/BOOT.bin
.PHONY: default zybo boot test clean deep-clean
default:
$(MAKE) -C src/test
......@@ -9,6 +13,11 @@ default:
$(MAKE) -C src/computation_graph
$(MAKE) -C src/quad_app
zybo:
cd xsdk_workspace/modular_quad_pid && ./build.sh
boot: $(BOOT)
test:
$(MAKE) -C src/queue test
$(MAKE) -C src/computation_graph test
......@@ -22,3 +31,16 @@ deep-clean:
$(MAKE) -C src/queue clean
$(MAKE) -C src/computation_graph clean
$(MAKE) -C src/quad_app clean
$(OUTDIR):
mkdir $(OUTDIR)
$(BOOT): zybo | $(OUTDIR)
echo "the_ROM_image:" > zybo_fsbl.bif
echo "{" >> zybo_fsbl.bif
echo $(WS)/zybo_fsbl/Release/zybo_fsbl.elf >> zybo_fsbl.bif
echo $(WS)/system_hw_platform/system.bit >> zybo_fsbl.bif
echo $(WS)/modular_quad_pid/Release/modular_quad_pid.elf >> zybo_fsbl.bif
echo "}" >> zybo_fsbl.bif
/remote/Xilinx/2015.4/SDK/2015.4/bin/bootgen -arch zynq -image zybo_fsbl.bif -o $(BOOT)
rm zybo_fsbl.bif
cd ..
sdk set_workspace .
sdk set_build_config -app modular_quad_pid -type release
sdk build_project -type app -name modular_quad_pid
cd ..
sdk set_workspace .
sdk set_build_config -app zybo_fsbl -type release
sdk build_project -type app -name zybo_fsbl
cd ..
sdk set_workspace .
sdk create_app_project -name zybo_fsbl -app {Zynq FSBL} -hwproject system_hw_platform -proc ps7_cortexa9_0 -os standalone -lang C
#!/bin/bash
set -e
source /remote/Xilinx/2015.4/SDK/2015.4/settings64.sh
echo "Building modular_quad_pid"
......@@ -10,31 +12,40 @@ if [ ! -d ../.metadata ]; then
ECLIPSE=/remote/Xilinx/2015.4/SDK/2015.4/eclipse/lnx64.o/eclipse
VM=/remote/Xilinx/2015.4/SDK/2015.4/tps/lnx64/jre/bin
WSPACE=$(dirname $0)/..
HW=$WSPACE/system_hw_platform
BSP=$WSPACE/system_bsp
FSBL=$WSPACE/zybo_fsbl
FSBL_BSP=$WSPACE/zybo_fsbl_bsp
HW=$WSPACE/system_hw_platform
APP=$WSPACE/modular_quad_pid
echo "Setting up dependencies for modular_quad_pid"
# Import the system_hw_platform into the workspace
# Import the system_hw_platform and app into the workspace
$ECLIPSE -vm $VM -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild \
-import $HW \
-import $APP \
-data $WSPACE \
-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole || exit 1
-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole
# Create the BSP
xsct .create_bsp.tcl || exit 1
xsct .create_bsp.tcl
# Create the FSBL project
xsct .create_fsbl.tcl
# Import the system_bsp and modular_quad_pid into workspace
$ECLIPSE -vm $VM -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild \
-import $BSP \
-import $APP \
-import $FSBL \
-import $FSBL_BSP \
-data $WSPACE \
-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole || exit 1
-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole
# Build the BSP
xsct .build_bsp.tcl || exit 1
# Build everything
$ECLIPSE -vm $VM -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild \
-build all \
-data $WSPACE \
-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole
fi
xsct .build_app.tcl || exit 1
xsct .build_app.tcl
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment