From 397966fa3c9a3b4794d0fa88440d6b74a79465c3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 11 Nov 2019 19:13:07 +0100 Subject: [PATCH] include board (target) in filename, files are now called like bootloader-sysmooctsim-0.1.1-5554-dirty.elf Change-Id: Ibdde1c02d5dd3bcd714bae1d374397d9596fede0 --- README.md | 4 ++-- gcc/Makefile | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dd61824..e63565e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ make The board name can be set in 'gcc/Makefile' *BOARD* variable, or provided while compiling (e.g. `make BOARD=SAME54_XPLAINED_PRO`). *SAME54_XPLAINED_PRO* is the default value. -The resulting firmware binary is `bootloader.bin`. +The resulting firmware binary is `bootloader-$(BOARD)-$(GIT_VERSION).bin`. Flashing ======== @@ -66,7 +66,7 @@ To flash the bootloader using the [edbg tool](https://github.com/ataradov/edbg) To flash the USB DFU bootloader, perform the following actions: * remove reserved bootloader space so we can erase it: `edbg --target atmel_cm4v2 --fuse wv,29:26,15` * erase the whole flash: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --erase` -* program the bootloader: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --program --verify --file bootloader.bin` +* program the bootloader: `edbg --target atmel_cm4v2 --fuse v,29:26,15 --program --verify --file bootloader-BOARD-XXXX.bin` * reserve bootloader space: `edbg --target atmel_cm4v2 --fuse wv,29:26,13` SWJ diff --git a/gcc/Makefile b/gcc/Makefile index 41779c3..86d199c 100644 --- a/gcc/Makefile +++ b/gcc/Makefile @@ -169,7 +169,8 @@ DEPS_AS_ARGS += \ "gcc/system_same54.d" \ "atmel_start.d" -OUTPUT_FILE_NAME := bootloader-$(GIT_VERSION) +BOARD_LC := $(shell echo $(BOARD) | tr A-Z a-z) +OUTPUT_FILE_NAME := bootloader-$(BOARD_LC)-$(GIT_VERSION) QUOTE := " OUTPUT_FILE_PATH +=$(OUTPUT_FILE_NAME).elf OUTPUT_FILE_PATH_AS_ARGS +=$(OUTPUT_FILE_NAME).elf