generate flash.data.

This commit is contained in:
NIIBE Yutaka
2017-10-03 13:50:51 +09:00
parent 7c5eb7efd2
commit 289d3db8c4
2 changed files with 13 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
2017-10-03 NIIBE Yutaka <gniibe@fsij.org>
* src/Makefile (build/flash.data): Generate.
* src/main.c (flash_addr_key_storage_start)
(flash_addr_data_storage_start): New.
(main): Determine flash address.

View File

@@ -75,3 +75,14 @@ build/bignum.o: OPT = -O3 -g
distclean: clean
-rm -f gnuk.ld config.h board.h config.mk \
usb-strings.c.inc usb-vid-pid-ver.c.inc
ifneq ($(EMULATION),)
build/flash.data: Makefile
@echo 'Generating 8192-byte flash.data'
@/bin/echo -n -e '\xff\xff\xff\xff\xff\xff\xff\xff' >$@
@for i in $(shell seq 511); \
do /bin/echo -n -e '\xff\xff\xff\xff\xff\xff\xff\xff' >>$@; done
@/bin/echo -n -e '\x00\x00\xff\xff\xff\xff\xff\xff' >>$@
@for i in $(shell seq 511); \
do /bin/echo -n -e '\xff\xff\xff\xff\xff\xff\xff\xff' >>$@; done
endif