Blame view

RIOT/boards/frdm-common/Makefile.include 1.72 KB
a752c7ab   elopes   add first test an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  # set default port depending on operating system
  PORT_LINUX ?= /dev/ttyACM0
  PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
  
  # Use the shared OpenOCD configuration
  # Using dap or jlink depends on which firmware the OpenSDA debugger is running
  export FRDM_IFACE ?= dap
  #export FRDM_IFACE ?= jlink
  
  # OpenOCD v0.10.0 and newer have built-in support for disabling the Kinetis
  # watchdog automatically. However, current stable releases of Ubuntu and Debian
  # have only version 0.9.0 and older OpenOCD packages (Ubuntu 17.04, Debian Jessie)
  # Set this to 0 to avoid the extra manual step of disabling the watchdog.
  export USE_OLD_OPENOCD ?= 1
  
  ifeq (1,$(USE_OLD_OPENOCD))
  # 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
  # return control to the debugger (OpenOCD)
  export OPENOCD_PRE_VERIFY_CMDS += \
    -c 'load_image $(RIOTCPU)/kinetis_common/dist/wdog-disable.bin 0x20000000 bin' \
    -c 'resume 0x20000000'
  export OPENOCD_EXTRA_INIT
  
  .PHONY: flash
  flash: $(RIOTCPU)/kinetis_common/dist/wdog-disable.bin
  
  # Reset the default goal.
  .DEFAULT_GOAL :=
  
  export OPENOCD_CONFIG ?= $(RIOTBOARD)/frdm-common/dist/old-openocd-$(FRDM_IFACE)-$(CPU_FAMILY).cfg
  endif
  
  # Configuration for OpenOCD v0.10.0 and newer
  export OPENOCD_CONFIG ?= $(RIOTBOARD)/frdm-common/dist/openocd-$(FRDM_IFACE)-$(CPU_FAMILY).cfg
  
  # Check the flash configuration field before flashing
  export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/kinetis_common/dist/check-fcfield-elf.sh
  
  # setup serial terminal
  include $(RIOTMAKE)/tools/serial.inc.mk
  
  # this board uses openocd
  include $(RIOTMAKE)/tools/openocd.inc.mk