diff --git a/Makefile b/Makefile index 0413d39a6..438f697a4 100644 --- a/Makefile +++ b/Makefile @@ -202,8 +202,8 @@ arm_sdk_clean: OPENOCD_DIR := $(TOOLS_DIR)/openocd .PHONY: openocd_install -openocd_install: OPENOCD_URL := http://sourceforge.net/projects/openocd/files/openocd/0.4.0/openocd-0.4.0.tar.bz2/download -openocd_install: OPENOCD_FILE := openocd-0.4.0.tar.bz2 +openocd_install: OPENOCD_URL := http://sourceforge.net/projects/openocd/files/openocd/0.5.0/openocd-0.5.0.tar.bz2/download +openocd_install: OPENOCD_FILE := openocd-0.5.0.tar.bz2 # order-only prereq on directory existance: openocd_install: | $(DL_DIR) $(TOOLS_DIR) openocd_install: openocd_clean @@ -218,8 +218,8 @@ openocd_install: openocd_clean # build and install $(V1) mkdir -p "$(OPENOCD_DIR)" $(V1) ( \ - cd $(DL_DIR)/openocd-build/openocd-0.4.0 ; \ - ./configure --prefix="$(OPENOCD_DIR)" --enable-ft2232_libftdi ; \ + cd $(DL_DIR)/openocd-build/openocd-0.5.0 ; \ + ./configure --prefix="$(OPENOCD_DIR)" --enable-ft2232_libftdi --enable-buspirate; \ $(MAKE) ; \ $(MAKE) install ; \ ) diff --git a/flight/AHRS/Makefile b/flight/AHRS/Makefile index 932c07c89..53ccec8cf 100644 --- a/flight/AHRS/Makefile +++ b/flight/AHRS/Makefile @@ -355,7 +355,7 @@ $(OUTDIR)/$(TARGET).bin.o: $(OUTDIR)/$(TARGET).bin $(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) # Add jtag targets (program and wipe) -$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE))) +$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE),$(OPENOCD_CONFIG))) .PHONY: elf lss sym hex bin bino opfw elf: $(OUTDIR)/$(TARGET).elf diff --git a/flight/Bootloaders/BootloaderUpdater/Makefile b/flight/Bootloaders/BootloaderUpdater/Makefile index 81aa163ec..aabfc88bf 100644 --- a/flight/Bootloaders/BootloaderUpdater/Makefile +++ b/flight/Bootloaders/BootloaderUpdater/Makefile @@ -258,7 +258,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/Bootloaders/CopterControl/Makefile b/flight/Bootloaders/CopterControl/Makefile index 1adf33918..d71098835 100644 --- a/flight/Bootloaders/CopterControl/Makefile +++ b/flight/Bootloaders/CopterControl/Makefile @@ -300,7 +300,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/Bootloaders/OpenPilot/Makefile b/flight/Bootloaders/OpenPilot/Makefile index 5f41e8056..8f2fc7d09 100644 --- a/flight/Bootloaders/OpenPilot/Makefile +++ b/flight/Bootloaders/OpenPilot/Makefile @@ -306,7 +306,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/Bootloaders/PipXtreme/Makefile b/flight/Bootloaders/PipXtreme/Makefile index 18ef15a27..1b290e340 100644 --- a/flight/Bootloaders/PipXtreme/Makefile +++ b/flight/Bootloaders/PipXtreme/Makefile @@ -301,7 +301,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/CopterControl/Makefile b/flight/CopterControl/Makefile index 687ecafc6..69459f809 100644 --- a/flight/CopterControl/Makefile +++ b/flight/CopterControl/Makefile @@ -443,7 +443,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror @@ -553,7 +555,7 @@ $(OUTDIR)/$(TARGET).bin.o: $(OUTDIR)/$(TARGET).bin $(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) # Add jtag targets (program and wipe) -$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE))) +$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE),$(OPENOCD_CONFIG))) .PHONY: elf lss sym hex bin bino opfw elf: $(OUTDIR)/$(TARGET).elf diff --git a/flight/INS/Makefile b/flight/INS/Makefile index 26c86981f..4650ffb96 100644 --- a/flight/INS/Makefile +++ b/flight/INS/Makefile @@ -364,7 +364,7 @@ $(OUTDIR)/$(TARGET).bin.o: $(OUTDIR)/$(TARGET).bin $(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) # Add jtag targets (program and wipe) -$(eval $(call JTAG_TEMPLATE_F2X,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE))) +$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE),$(OPENOCD_CONFIG))) .PHONY: elf lss sym hex bin bino opfw elf: $(OUTDIR)/$(TARGET).elf diff --git a/flight/OpenPilot/Makefile b/flight/OpenPilot/Makefile index 0da393848..646084424 100644 --- a/flight/OpenPilot/Makefile +++ b/flight/OpenPilot/Makefile @@ -514,7 +514,7 @@ $(OUTDIR)/$(TARGET).bin.o: $(OUTDIR)/$(TARGET).bin $(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) # Add jtag targets (program and wipe) -$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE))) +$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE),$(OPENOCD_CONFIG))) .PHONY: elf lss sym hex bin bino opfw elf: $(OUTDIR)/$(TARGET).elf diff --git a/flight/PipXtreme/Makefile b/flight/PipXtreme/Makefile index 9a70ac417..8a939d411 100644 --- a/flight/PipXtreme/Makefile +++ b/flight/PipXtreme/Makefile @@ -394,7 +394,7 @@ $(OUTDIR)/$(TARGET).bin.o: $(OUTDIR)/$(TARGET).bin $(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) # Add jtag targets (program and wipe) -$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE))) +$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE),$(OPENOCD_CONFIG))) .PHONY: elf lss sym hex bin bino opfw elf: $(OUTDIR)/$(TARGET).elf diff --git a/flight/Project/OpenOCD/stm32f1x.cfg b/flight/Project/OpenOCD/stm32f1x.cfg index 8007ff57a..9047b5aff 100644 --- a/flight/Project/OpenOCD/stm32f1x.cfg +++ b/flight/Project/OpenOCD/stm32f1x.cfg @@ -62,7 +62,7 @@ jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \ -expected-id $_BSTAPID6 -expected-id $_BSTAPID7 set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME +target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -rtos auto $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 diff --git a/flight/Project/OpenOCD/stm32f2x.cfg b/flight/Project/OpenOCD/stm32f2x.cfg index b8de38437..b5cea55e5 100644 --- a/flight/Project/OpenOCD/stm32f2x.cfg +++ b/flight/Project/OpenOCD/stm32f2x.cfg @@ -52,7 +52,7 @@ if { [info exists BSTAPID ] } { jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME +target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -rtos auto $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 diff --git a/flight/Project/versionblob.py b/flight/Project/versionblob.py deleted file mode 100755 index 82440a746..000000000 --- a/flight/Project/versionblob.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python - -# Generate a version blob for -# the OpenPilot firmware. -# -# By E. Lafargue (c) 2011 E. Lafargue & the OpenPilot team -# Licence: GPLv3 -# -### -# Usage: -# versionblob.py --append --firmware= --boardid= -# -# append: if present, then append blob to firmware file directly, otherwise create "blob.bin" -# firmware: the filename of the firmware binary -# boardid: as a string, the board code, for example "0401" for CC board version 1. -# should match the codes in firmware description files. -# -# We have 100 bytes for the whole description. -# -# Only the first 40 are visible on the FirmwareIAP uavobject, the remaining -# 60 are ok to use for packaging and will be saved in the flash -# -# Structure is: -# 4 bytes: header: "OpFw" -# 4 bytes: GIT commit tag (short version of SHA1) -# 4 bytes: Unix timestamp of compile time -# 2 bytes: target platform. Should follow same rule as BOARD_TYPE and BOARD_REVISION in board define files. -# 26 bytes: commit tag if it is there, otherwise branch name. Zero-padded -# ---- 40 bytes limit --- -# 20 bytes: SHA1 sum of the firmware. -# 40 bytes: free for now. - -import binascii -import os -from time import time -import argparse - -# Do the argument parsing: -parser = argparse.ArgumentParser(description='Generate firmware desciption blob') -parser.add_argument('--append', action='store_true') -parser.add_argument('--firmware', help='name of firmware binary file' , required=True) -parser.add_argument('--boardid', help='ID of board model, for example 0401 for CopterControl', required=True) -args = parser.parse_args() -print args - -if args.append == True: - print 'Appending description blob directly to ' + args.firmware - filename = args.firmware - file = open(filename,"ab") -else: - filename = 'blob.bin' - file = open(filename,"wb") - - -# Write the magic value: -file.write("OpFw") -# Get the short commit tag of the current git repository. -# Strip it to 8 characters for a 4 byte (int32) value. -# We have no full guarantee of unicity, but it is good enough -# with the rest of the information in the structure. -hs= os.popen('git rev-parse --short=8 HEAD').read().strip() -print "Version: " + hs -hb=binascii.a2b_hex(hs) -file.write(hb) -# Then the Unix time into a 32 bit integer: -print "Date: " + hex(int(time())).lstrip('0x') -hb = binascii.a2b_hex(hex(int(time())).lstrip('0x')) -file.write(hb) - -# Then write board type and board revision -hb = binascii.a2b_hex(args.boardid) -file.write(hb) - -# Last: a user-friendly description if it exists in GIT, otherwise -# just "unreleased" -hs = os.popen('git describe --exact-match').read() -if len(hs) == 0 : - print "Unreleased: get branch name instead" - hs = os.popen('git branch --contains HEAD').read() - -file.write(hs[0:26]) -file.write("\0"*(26-len(hs))) - -## Now we are at the 40 bytes mark. - -## Add the 20 byte SHA1 hash of the firmware: -import hashlib -sha1 = hashlib.sha1() -with open('build/coptercontrol/CopterControl.bin','rb') as f: - for chunk in iter(lambda: f.read(8192), ''): - sha1.update(chunk) -file.write(sha1.digest()) - -# Pad will null bytes: -file.write('\0'*40) - - -file.close() - diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index 9c1fdacca..b7855221f 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -949,6 +949,27 @@ p, li { white-space: pre-wrap; } + + + + Min + + + + + + + Neutral (slowest for motor) + + + + + + + Max + + + diff --git a/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp b/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp index e094a9a68..51fd6cce7 100644 --- a/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp +++ b/ground/openpilotgcs/src/plugins/rawhid/usbmonitor_mac.cpp @@ -117,7 +117,7 @@ void USBMonitor::removeDevice(IOHIDDeviceRef dev) { */ void USBMonitor::detach_callback(void *context, IOReturn r, void *hid_mgr, IOHIDDeviceRef dev) { - + qDebug() << "USBMonitor: Device detached event"; instance()->removeDevice(dev); } @@ -136,6 +136,8 @@ void USBMonitor::attach_callback(void *context, IOReturn r, void *hid_mgr, IOHID deviceInfo.dev_handle = dev; + qDebug() << "USBMonitor: Device attached event"; + // Populate the device info structure got_properties &= HID_GetIntProperty(dev, CFSTR( kIOHIDVendorIDKey ), &deviceInfo.vendorID); got_properties &= HID_GetIntProperty(dev, CFSTR( kIOHIDProductIDKey ), &deviceInfo.productID); @@ -149,6 +151,7 @@ void USBMonitor::attach_callback(void *context, IOReturn r, void *hid_mgr, IOHID // Currently only enumerating objects that have the complete list of properties if(got_properties) { + qDebug() << "USBMonitor: Adding device"; instance()->addDevice(deviceInfo); } } diff --git a/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp b/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp index b1e215f91..db2c60782 100644 --- a/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp @@ -80,29 +80,26 @@ DFUObject::DFUObject(bool _debug,bool _use_serial,QString portname): } else { - send_delay=10; - use_delay=true; -// int numDevices=0; QList devices; - int count=0; - while((devices.length()==0) && count < 10) - { - if (debug) - qDebug() << "."; - delay::msleep(500); - // processEvents enables XP to process the system - // plug/unplug events, otherwise it will not process - // those events before the end of the call! - QApplication::processEvents(); - devices = USBMonitor::instance()->availableDevices(0x20a0,-1,-1,USBMonitor::Bootloader); - count++; - } - if (devices.length()==1) { + devices = USBMonitor::instance()->availableDevices(0x20a0,-1,-1,USBMonitor::Bootloader); + if (devices.length()==1) { hidHandle.open(1,devices.first().vendorID,devices.first().productID,0,0); } else { - qDebug() << devices.length() << " device(s) detected, don't know what to do!"; - mready = false; - } + // Wait for the board to appear on the USB bus: + QEventLoop m_eventloop; + connect(USBMonitor::instance(), SIGNAL(deviceDiscovered(USBPortInfo)),&m_eventloop, SLOT(quit())); + QTimer::singleShot(5000,&m_eventloop, SLOT(quit())); + m_eventloop.exec(); + devices = USBMonitor::instance()->availableDevices(0x20a0,-1,-1,USBMonitor::Bootloader); + if (devices.length()==1) { + delay::msleep(2000); // Let the USB Subsystem settle (especially important on Mac!) + hidHandle.open(1,devices.first().vendorID,devices.first().productID,0,0); + } + else { + qDebug() << devices.length() << " device(s) detected, don't know what to do!"; + mready = false; + } + } } } diff --git a/ground/openpilotgcs/src/plugins/uploader/op_dfu.h b/ground/openpilotgcs/src/plugins/uploader/op_dfu.h index 420e0a3ea..1fc92637c 100644 --- a/ground/openpilotgcs/src/plugins/uploader/op_dfu.h +++ b/ground/openpilotgcs/src/plugins/uploader/op_dfu.h @@ -17,6 +17,7 @@ #include "delay.h" #include #include +#include #include "SSP/qssp.h" #include "SSP/port.h" #include "SSP/qsspt.h" diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 397533c2b..883955a5b 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -235,9 +235,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success) currentStep = IAP_STATE_BOOTLOADER; // Tell the mainboard to get into bootloader state: - log("Detecting devices, please wait 5 seconds..."); - this->repaint(); - delay::msleep(5100); // Required to let the board(s) settle + log("Detecting devices, please wait a few seconds..."); if (!dfu) { if (dlj.startsWith("USB")) dfu = new DFUObject(DFU_DEBUG, false, QString()); diff --git a/make/boards/ahrs/board-info.mk b/make/boards/ahrs/board-info.mk index 2103357ba..85135ea25 100644 --- a/make/boards/ahrs/board-info.mk +++ b/make/boards/ahrs/board-info.mk @@ -9,6 +9,8 @@ BOARD := STM32103CB_AHRS MODEL := MD MODEL_SUFFIX := +OPENOCD_CONFIG := stm32f1x.cfg + # Note: These must match the values in link_$(BOARD)_memory.ld BL_BANK_BASE := 0x08000000 # Start of bootloader flash BL_BANK_SIZE := 0x00002000 # Should include BD_INFO region diff --git a/make/boards/coptercontrol/board-info.mk b/make/boards/coptercontrol/board-info.mk index 012c6ef16..547692212 100644 --- a/make/boards/coptercontrol/board-info.mk +++ b/make/boards/coptercontrol/board-info.mk @@ -9,6 +9,8 @@ BOARD := STM32103CB_CC_Rev1 MODEL := MD MODEL_SUFFIX := _CC +OPENOCD_CONFIG := stm32f1x.cfg + # Note: These must match the values in link_$(BOARD)_memory.ld BL_BANK_BASE := 0x08000000 # Start of bootloader flash BL_BANK_SIZE := 0x00003000 # Should include BD_INFO region diff --git a/make/boards/ins/board-info.mk b/make/boards/ins/board-info.mk index 1bd623d48..b093af6f2 100644 --- a/make/boards/ins/board-info.mk +++ b/make/boards/ins/board-info.mk @@ -9,6 +9,8 @@ BOARD := STM32F2xx_INS MODEL := HD MODEL_SUFFIX := +OPENOCD_CONFIG := stm32f1x.cfg + # Note: These must match the values in link_$(BOARD)_memory.ld BL_BANK_BASE := 0x08000000 # Start of bootloader flash BL_BANK_SIZE := 0x00008000 # Should include BD_INFO region diff --git a/make/boards/openpilot/board-info.mk b/make/boards/openpilot/board-info.mk index f1e35505c..d9cff166d 100644 --- a/make/boards/openpilot/board-info.mk +++ b/make/boards/openpilot/board-info.mk @@ -9,6 +9,8 @@ BOARD := STM3210E_OP MODEL := HD MODEL_SUFFIX := _OP +OPENOCD_CONFIG := stm32f1x.cfg + # Note: These must match the values in link_$(BOARD)_memory.ld BL_BANK_BASE := 0x08000000 # Start of bootloader flash BL_BANK_SIZE := 0x00005000 # Should include BD_INFO region diff --git a/make/firmware-defs.mk b/make/firmware-defs.mk index 0bbbb54b8..b22a66639 100644 --- a/make/firmware-defs.mk +++ b/make/firmware-defs.mk @@ -201,6 +201,7 @@ endef # $(1) = Name of binary image to write # $(2) = Base of flash region to write/wipe # $(3) = Size of flash region to write/wipe +# $(4) = OpenOCD configuration file to use define JTAG_TEMPLATE # --------------------------------------------------------------------------- # Options for OpenOCD flash-programming @@ -213,7 +214,7 @@ OOCD_EXE ?= openocd OOCD_JTAG_SETUP = -d0 # interface and board/target settings (using the OOCD target-library here) OOCD_JTAG_SETUP += -s $(TOP)/flight/Project/OpenOCD -OOCD_JTAG_SETUP += -f foss-jtag.revb.cfg -f stm32f1x.cfg +OOCD_JTAG_SETUP += -f foss-jtag.revb.cfg -f $(4) # initialize OOCD_BOARD_RESET = -c init @@ -244,48 +245,3 @@ wipe: -c "shutdown" endef -# $(1) = Name of binary image to write -# $(2) = Base of flash region to write/wipe -# $(3) = Size of flash region to write/wipe -define JTAG_TEMPLATE_F2X -# --------------------------------------------------------------------------- -# Options for OpenOCD flash-programming -# see openocd.pdf/openocd.texi for further information - -# if OpenOCD is in the $PATH just set OPENOCDEXE=openocd -OOCD_EXE ?= openocd - -# debug level -OOCD_JTAG_SETUP = -d0 -# interface and board/target settings (using the OOCD target-library here) -OOCD_JTAG_SETUP += -s $(TOP)/flight/Project/OpenOCD -OOCD_JTAG_SETUP += -f foss-jtag.revb.cfg -f stm32f2x.cfg - -# initialize -OOCD_BOARD_RESET = -c init -# show the targets -#OOCD_BOARD_RESET += -c targets -# commands to prepare flash-write -OOCD_BOARD_RESET += -c "reset halt" - -.PHONY: program -program: $(1) - @echo $(MSG_JTAG_PROGRAM) $$(call toprel, $$<) - $(V1) $(OOCD_EXE) \ - $$(OOCD_JTAG_SETUP) \ - $$(OOCD_BOARD_RESET) \ - -c "flash write_image erase $$< $(2) bin" \ - -c "verify_image $$< $(2) bin" \ - -c "reset run" \ - -c "shutdown" - -.PHONY: wipe -wipe: - @echo $(MSG_JTAG_WIPE) wiping $(3) bytes starting from $(2) - $(V1) $(OOCD_EXE) \ - $$(OOCD_JTAG_SETUP) \ - $$(OOCD_BOARD_RESET) \ - -c "flash erase_address pad $(2) $(3)" \ - -c "reset run" \ - -c "shutdown" -endef