changeset 42:2b8d11ddf653

tms470/makefile-frags: pruned import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 17 Jul 2018 08:20:16 +0000
parents 17814dcf6965
children 68ffaa96dea3
files tms470/makefile-frags/clean-always tms470/makefile-frags/first-part tms470/makefile-frags/flash-script-gen tms470/makefile-frags/link-steps tms470/makefile-frags/m0-to-bin-c139 tms470/makefile-frags/m0-to-bin-std tms470/makefile-frags/ram-link-steps
diffstat 7 files changed, 59 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tms470/makefile-frags/clean-always	Tue Jul 17 08:20:16 2018 +0000
@@ -0,0 +1,4 @@
+clean:	FRC
+	rm -f fwimage.* ramimage.* str2ind.obj link.cmd link_ram.cmd
+	rm -f build_date.* flash-script
+	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tms470/makefile-frags/first-part	Tue Jul 17 08:20:16 2018 +0000
@@ -0,0 +1,8 @@
+all:	fwimage.bin flash-script
+
+${SUBDIR}: FRC
+	cd $@; ${MAKE} ${MFLAGS}
+
+${LIBS}:	${SUBDIR}
+	@true
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tms470/makefile-frags/flash-script-gen	Tue Jul 17 08:20:16 2018 +0000
@@ -0,0 +1,4 @@
+flash-script:	fwimage.bin
+	../helpers/mk-flash-script $< ${FLASH_BASE_ADDR} ${FLASH_SECTOR_SIZE} \
+		> $@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tms470/makefile-frags/link-steps	Tue Jul 17 08:20:16 2018 +0000
@@ -0,0 +1,19 @@
+build_date.c:	${LIBS}
+	../helpers/build-date ${CONFIG_NAME} > $@
+
+build_date.obj:	build_date.c
+	../toolwrap/cl470 -q -c -me -mt -o -pw2 -x -mw build_date.c
+
+str2ind.obj:	str2ind.c
+	../toolwrap/cl470 -q -c -me -mt -o -pw2 -x -mw str2ind.c
+
+link.cmd:	${LINK_SCRIPT_SRC} Makefile lcfgen
+	perl ../scripts/ti/make_cmd.pl lcfgen $@ 0 ${LINK_SCRIPT_SRC} \
+		${SPECIAL_LINK_LIBS}
+
+fwimage.out:	${LIBS} build_date.obj str2ind.obj link.cmd
+	../toolwrap/vlnk470 -farcall -x -o $@ -m fwimage.map $^
+
+fwimage.m0:	fwimage.out
+	../toolwrap/hex470 -m -memwidth 16 -romwidth 16 $<
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tms470/makefile-frags/m0-to-bin-c139	Tue Jul 17 08:20:16 2018 +0000
@@ -0,0 +1,6 @@
+fwimage.intbin:	fwimage.m0
+	mokosrec2bin $< $@ FF
+
+fwimage.bin:	fwimage.intbin
+	dd if=$< of=$@ bs=65536 skip=1
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tms470/makefile-frags/m0-to-bin-std	Tue Jul 17 08:20:16 2018 +0000
@@ -0,0 +1,3 @@
+fwimage.bin:	fwimage.m0
+	mokosrec2bin $< $@ FF
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tms470/makefile-frags/ram-link-steps	Tue Jul 17 08:20:16 2018 +0000
@@ -0,0 +1,15 @@
+ram:	ramimage.srec
+
+link_ram.cmd:	${RAM_LINK_SCRIPT_SRC} Makefile lcfgen
+	perl ../scripts/ti/make_cmd.pl lcfgen $@ 0 ${RAM_LINK_SCRIPT_SRC} \
+		${SPECIAL_LINK_LIBS}
+
+ramimage.out:	${LIBS} build_date.obj str2ind.obj link_ram.cmd
+	../toolwrap/vlnk470 -farcall -x -o $@ -m ramimage.map $^
+
+ramimage.m0:	ramimage.out
+	../toolwrap/hex470 -m -memwidth 16 -romwidth 16 $<
+
+ramimage.srec:	ramimage.m0
+	../helpers/srec4ram $< $@
+