From e40d56920452544015ca56915d7e3d9386951751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Fri, 8 Feb 2019 18:29:31 +0100 Subject: [PATCH] kinetis: save 'wdog-disable.bin' binary in the repository Keep the compiled '.bin' file to remove the need to compile it when flashing. This remove the need to have the toolchain when flashing so allow compiling and flashing with `BUILD_IN_DOCKER=1` without a local toolchain. Even if it ends up storing a binary, the file is only 34 bytes. --- boards/common/frdm/Makefile.include | 3 --- boards/mulle/Makefile.include | 2 -- boards/pba-d-01-kw2x/Makefile.include | 2 -- cpu/kinetis/Makefile.include | 4 ---- cpu/kinetis/dist/README.md | 7 ++++++- cpu/kinetis/dist/wdog-disable.bin | Bin 0 -> 34 bytes 6 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 cpu/kinetis/dist/wdog-disable.bin diff --git a/boards/common/frdm/Makefile.include b/boards/common/frdm/Makefile.include index 873e931acf..81a98274f1 100644 --- a/boards/common/frdm/Makefile.include +++ b/boards/common/frdm/Makefile.include @@ -22,9 +22,6 @@ export OPENOCD_PRE_VERIFY_CMDS += \ -c 'load_image $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin 0x20000000 bin' \ -c 'resume 0x20000000' export OPENOCD_EXTRA_INIT - -FLASHDEPS += $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin - export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/old-openocd-$(CPU_FAMILY).cfg endif diff --git a/boards/mulle/Makefile.include b/boards/mulle/Makefile.include index 276f2fc3c8..d580e79236 100644 --- a/boards/mulle/Makefile.include +++ b/boards/mulle/Makefile.include @@ -58,8 +58,6 @@ export OPENOCD_PRE_VERIFY_CMDS += \ -c 'resume 0x20000000' export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh -FLASHDEPS += $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin - # this board uses openocd include $(RIOTMAKE)/tools/openocd.inc.mk diff --git a/boards/pba-d-01-kw2x/Makefile.include b/boards/pba-d-01-kw2x/Makefile.include index 99cfb993fa..d3bc0c6695 100644 --- a/boards/pba-d-01-kw2x/Makefile.include +++ b/boards/pba-d-01-kw2x/Makefile.include @@ -10,8 +10,6 @@ export CPU_MODEL ?= mkw21d256vha5 PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) -FLASHDEPS += $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin - # We need special handling of the watchdog if we want to speed up the flash # verification by using the MCU to compute the image checksum after flashing. # wdog-disable.bin is a precompiled binary which will disable the watchdog and diff --git a/cpu/kinetis/Makefile.include b/cpu/kinetis/Makefile.include index c2b50b817d..2fe0fee188 100644 --- a/cpu/kinetis/Makefile.include +++ b/cpu/kinetis/Makefile.include @@ -47,8 +47,4 @@ USEMODULE += periph_mcg endif USEMODULE += periph_wdog -# Define a recipe to build the watchdog disable binary, used when flashing -$(RIOTCPU)/$(CPU)/dist/wdog-disable.bin: $(RIOTCPU)/$(CPU)/dist/wdog-disable.s - $(Q)$(MAKE) -C $(RIOTCPU)/$(CPU)/dist/ $(notdir $@) - include $(RIOTMAKE)/arch/cortexm.inc.mk diff --git a/cpu/kinetis/dist/README.md b/cpu/kinetis/dist/README.md index 6490f1097f..478ee3c236 100644 --- a/cpu/kinetis/dist/README.md +++ b/cpu/kinetis/dist/README.md @@ -6,10 +6,15 @@ This directory contains tools for working with K60 CPUs. Watchdog disable ---------------- -wdog-disable.bin is a location-independent watchdog disable function with a breakpoint instruction at the end. Useful for disabling the watchdog directly from OpenOCD. +wdog-disable.bin is a location-independent watchdog disable function with a +breakpoint instruction at the end. Useful for disabling the watchdog directly +from OpenOCD. Usage: openocd -c 'reset halt' \ -c 'load_image wdog-disable.bin 0x20000000 bin' \ -c 'resume 0x20000000' # watchdog is disabled and core halted + +The file is saved generated in the repository to remove the need to have a +compiler when flashing. It is only 34 bytes binary. diff --git a/cpu/kinetis/dist/wdog-disable.bin b/cpu/kinetis/dist/wdog-disable.bin new file mode 100644 index 0000000000000000000000000000000000000000..a04ce5004e75dc9b492882562348b53d311332b4 GIT binary patch literal 34 mcmZ?z#K++CNg?paCsqc=2H$TQf{YDLpBNY}DMCaT_5lFg^$bh^ literal 0 HcmV?d00001