changeset 259:2bb8b1c11afc

build system: produce flash-script for flashing with fc-loadtool
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 04 Aug 2017 07:34:37 +0000
parents 13bcc2ed7e44
children df0b531bb53d
files configure.sh makefile-frags/clean-always makefile-frags/first-part makefile-frags/flash-script-gen
diffstat 4 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure.sh	Fri Aug 04 07:14:16 2017 +0000
+++ b/configure.sh	Fri Aug 04 07:34:37 2017 +0000
@@ -218,6 +218,7 @@
 else
 	cat makefile-frags/m0-to-bin-c139 >> $BUILD_DIR/Makefile
 fi
+cat makefile-frags/flash-script-gen >> $BUILD_DIR/Makefile
 
 if [ -n "$RAM_LINK_SCRIPT_SRC" ]
 then
--- a/makefile-frags/clean-always	Fri Aug 04 07:14:16 2017 +0000
+++ b/makefile-frags/clean-always	Fri Aug 04 07:34:37 2017 +0000
@@ -1,4 +1,4 @@
 clean:	FRC
 	rm -f fwimage.* ramimage.* str2ind.obj link.cmd link_ram.cmd
-	rm -f build_date.*
+	rm -f build_date.* flash-script
 	for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
--- a/makefile-frags/first-part	Fri Aug 04 07:14:16 2017 +0000
+++ b/makefile-frags/first-part	Fri Aug 04 07:34:37 2017 +0000
@@ -1,4 +1,4 @@
-all:	fwimage.bin
+all:	fwimage.bin flash-script
 
 ${SUBDIR}: FRC
 	cd $@; ${MAKE} ${MFLAGS}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefile-frags/flash-script-gen	Fri Aug 04 07:34:37 2017 +0000
@@ -0,0 +1,4 @@
+flash-script:	fwimage.bin
+	../helpers/mk-flash-script $< ${FLASH_BASE_ADDR} ${FLASH_SECTOR_SIZE} \
+		> $@
+