Use flash routines in example-cdc-gnu-linux.

This commit is contained in:
NIIBE Yutaka
2017-09-27 19:24:08 +09:00
parent bc39f0e582
commit 5b7c5a9996
6 changed files with 639 additions and 43 deletions

View File

@@ -6,12 +6,12 @@ PROJECT = sample
CHOPSTX = ..
LDSCRIPT=
CSRC = sample.c usb-cdc.c
CSRC = sample.c usb-cdc.c command.c
CHIP=gnu-linux
# USE_SYS = yes
USE_SYS =
USE_SYS = yes
USE_USB = yes
USE_ADC = yes
EMULATION=yes
###################################
@@ -22,7 +22,7 @@ OBJCOPY = $(CROSS)objcopy
MCU = none
CWARN = -Wall -Wextra -Wstrict-prototypes
DEFS = -DGNU_LINUX_EMULATION
DEFS = -DGNU_LINUX_EMULATION -DUSE_SYS_BOARD_ID
OPT = -g # -O3 -Os
LIBS = -lpthread
@@ -34,3 +34,10 @@ board.h:
@exit 1
distclean: clean
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 1023); do /bin/echo -n -e '\xff\xff\xff\xff\xff\xff\xff\xff' >>$@; done