Skip to content

Commit

Permalink
make: cleanup HEXFILE/ELFFILE/BINFILE
Browse files Browse the repository at this point in the history
* Use the existing variable when possible
* Remove duplicate definition
* Remove unused BINFILE variable
  • Loading branch information
cladmi committed Mar 27, 2018
1 parent 21a9958 commit 72ddc72
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion boards/bluepill/Makefile.include
Expand Up @@ -16,7 +16,6 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# (ground) GPIO B1.
ifeq ($(PROGRAMMER),dfu-util)
export ROM_OFFSET ?= 0x2000 # Skip the space needed by the embedded bootloader
export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))
export FLASHER = dfu-util
export DEBUGGER = # no debugger
export RESET = # dfu-util has no support for resetting the device
Expand Down
1 change: 0 additions & 1 deletion boards/calliope-mini/Makefile.include
Expand Up @@ -13,7 +13,6 @@ include $(RIOTMAKE)/tools/serial.inc.mk
PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER))
export OFLAGS = -O ihex
export HEXFILE = $(ELFFILE:.elf=.hex)
export FFLAGS =
export DEBUGGER_FLAGS =

Expand Down
2 changes: 1 addition & 1 deletion boards/common/arduino-atmega/Makefile.include
Expand Up @@ -18,4 +18,4 @@ export DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBU
export PROGRAMMER_FLAGS = -P $(PORT) -b $(PROGRAMMER_SPEED)

export OFLAGS += -j .text -j .data -O ihex
export FFLAGS += -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -D -U flash:w:bin/$(BOARD)/$(PROJECT)$(APPLICATION).hex
export FFLAGS += -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -D -U flash:w:$(HEXFILE)
4 changes: 2 additions & 2 deletions boards/f4vi1/Makefile.include
Expand Up @@ -16,5 +16,5 @@ export DEBUGSERVER = st-util

# define st-flash parameters
export OFLAGS = -O binary
export FFLAGS = write bin/$(BOARD)/$(APPLICATION).hex 0x8000000
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(BINDIR)/$(APPLICATION).elf
export FFLAGS = write $(HEXFILE) 0x8000000
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
2 changes: 1 addition & 1 deletion boards/mega-xplained/Makefile.include
Expand Up @@ -21,4 +21,4 @@ export PROGRAMMER ?= buspirate
export PROGRAMMER_FLAGS = -P /dev/ttyUSB0

export OFLAGS += -j .text -j .data -O ihex
export FFLAGS += -p m1284p -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:bin/$(BOARD)/$(PROJECT)$(APPLICATION).hex
export FFLAGS += -p m1284p -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:$(HEXFILE)
1 change: 0 additions & 1 deletion boards/microbit/Makefile.include
Expand Up @@ -13,7 +13,6 @@ include $(RIOTMAKE)/tools/serial.inc.mk
PROGRAMMER ?= fscopy
ifeq (fscopy,$(PROGRAMMER))
export OFLAGS = -O ihex
export HEXFILE = $(ELFFILE:.elf=.hex)
export FFLAGS =
export DEBUGGER_FLAGS =

Expand Down
2 changes: 0 additions & 2 deletions boards/nz32-sc151/Makefile.include
Expand Up @@ -9,8 +9,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
# set the default id
export ID ?= 0483:df11

export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))

export FLASHER = dfu-util
export DEBUGGER = # dfu-util has no debugger
export RESET = # dfu-util has no support for resetting the device
Expand Down
2 changes: 0 additions & 2 deletions boards/spark-core/Makefile.include
Expand Up @@ -7,8 +7,6 @@ PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
include $(RIOTMAKE)/tools/serial.inc.mk

export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))

export FLASHER = dfu-util
export DEBUGGER = # spark core has no debugger
export RESET = # dfu-util has no support for resetting the device
Expand Down
1 change: 0 additions & 1 deletion boards/teensy31/Makefile.include
Expand Up @@ -7,7 +7,6 @@ TEENSY_LOADER = $(RIOTBASE)/dist/tools/teensy-loader-cli/teensy_loader
FLASHER = $(TEENSY_LOADER)

OFLAGS = -O ihex
HEXFILE = $(ELFFILE:.elf=.hex)

FFLAGS ?= --mcu=mk20dx256 $(HEXFILE)

Expand Down
2 changes: 1 addition & 1 deletion boards/waspmote-pro/Makefile.include
Expand Up @@ -34,4 +34,4 @@ ifeq ($(PROGRAMMER), stk500v1)
endif

export OFLAGS += -j .text -j .data -O ihex
export FFLAGS += -p m1281 -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:bin/$(BOARD)/$(PROJECT)$(APPLICATION).hex
export FFLAGS += -p m1281 -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:$(HEXFILE)
2 changes: 1 addition & 1 deletion makefiles/info.inc.mk
Expand Up @@ -18,7 +18,7 @@ info-objsize:
sort -rnk$${SORTROW}

info-buildsize:
@$(SIZE) -d -B $(BINDIR)/$(APPLICATION).elf || echo ''
@$(SIZE) -d -B $(ELFFILE) || echo ''

info-build:
@echo 'APPLICATION: $(APPLICATION)'
Expand Down

0 comments on commit 72ddc72

Please sign in to comment.