diff --git a/.vscode/launch.json b/.vscode/launch.json index 608126d79..d1184a3ee 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,19 +4,46 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + // STLink configuration + { + "name": "AM32 STLink", + "cwd": "${workspaceFolder}", + "executable": "${workspaceFolder}/obj/debug.elf", + "liveWatch": { + "enabled": true, + "samplesPerSecond": 4, + }, + "request": "launch", + "type": "cortex-debug", + "servertype": "openocd", + "configFiles": [ + "${workspaceFolder}/tools/openocd-at32f421.cfg", + ], + "showDevDebugOutput": "none", + + "serverpath": "${workspaceFolder}${/}tools${/}${config:OS}${/}openocd${/}bin${/}openocd", + "armToolchainPath": "${workspaceRoot}/tools/${config:OS}/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin", + }, + + // JLink configuration { "type": "cortex-debug", "request": "launch", - "name": "AM32 Build/Debug", + "name": "AM32 JLink", "cwd": "${workspaceRoot}", - "executable": "${workspaceRoot}/obj/AM32_FOXEER_F421_2.12.elf", - "gdbTarget": ":3333", - "showDevDebugOutput": "none", - "servertype" : "external", + "device" : "-AT32F421K8U7", + "gdbPath": "${workspaceRoot}/tools/${config:OS}/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin/arm-none-eabi-gdb", + "executable": "${workspaceRoot}/obj/debug.elf", + "showDevDebugOutput": "raw", + "servertype" : "jlink", "swoConfig": { "enabled": false, }, "serialNumber": "", + "liveWatch": { + "enabled": true, + "samplesPerSecond": 4 + } } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 385a1fabb..3e80d59c0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,17 +1,17 @@ { - "makefile.makePath": "/usr/bin/make", - "makefile.launchConfigurations": [ + "OS": "windows", + "makefile.makePath": "tools/windows/make/bin/make.exe", + + //"OS": "linux", + //"makefile.makePath": "/usr/bin/make", + + "makefile.configurations": [ { - "cwd": "/home/tridge/project/UAV/AM32/AM32", - "name": "Make Clean", - "request": "launch", - "type": "cppdbg", - "program": "${workspaceFolder}/Makefile", - "args": [ - "clean" - ], - "stopAtEntry": false, - "externalConsole": false + "name": "MakeParallel", + "makeArgs": [ + "-j8" + ] } ] } +} diff --git a/Makefile b/Makefile index 3e00154a4..767d16d3b 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ + QUIET = @ # update version numbers here @@ -48,19 +49,18 @@ ROOT := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) # Search source files SRC_COMMON := $(foreach dir,$(SRC_DIRS_COMMON),$(wildcard $(dir)/*.[cs])) -VERSION_MAJOR := $(shell grep "#define VERSION_MAJOR" $(MAIN_SRC_DIR)/main.c | awk '{print $$3}' ) -VERSION_MINOR := $(shell grep "#define VERSION_MINOR" $(MAIN_SRC_DIR)/main.c | awk '{print $$3}' ) - FIRMWARE_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR) -TARGET_BASENAME = $(BIN_DIR)/$(IDENTIFIER)_$(TARGET)_$(FIRMWARE_VERSION) +TARGET_FNAME = $(IDENTIFIER)_$(TARGET)_$(FIRMWARE_VERSION) +TARGET_BASENAME = $(BIN_DIR)/$(TARGET_FNAME) # Build tools, so we all share the same versions # import macros common to all supported build systems -include $(ROOT)/make/system-id.mk +# include $(ROOT)/make/system-id.mk # configure some directories that are relative to wherever ROOT_DIR is located -BIN_DIR := $(ROOT)/obj +OBJ := obj +BIN_DIR := $(ROOT)/$(OBJ) TOOLS_DIR ?= $(ROOT)/tools DL_DIR := $(ROOT)/downloads @@ -74,10 +74,17 @@ e230 : $(TARGETS_E230) f421 : $(TARGETS_F421) f415 : $(TARGETS_F415) +$(OBJ): + @$(MKDIR) $(OBJ) > $(NUL) + clean : - rm -rf $(BIN_DIR)/* + @echo "Removing $(OBJ) directory" + @$(RMDIR) $(OBJ) binary : $(TARGET_BASENAME).bin +# we copy debug.elf to give us a constant debug target for vscode +# this means the debug button will always debug the last target built + @$(COPY) $(OBJ)$(DSEP)$(TARGET_FNAME).elf $(OBJ)$(DSEP)debug.elf > $(NUL) @$(ECHO) done $(TARGET) $(TARGETS_F051) : @@ -99,13 +106,11 @@ $(TARGETS_F415) : @$(MAKE) -s MCU_TYPE=F415 TARGET=$@ binary # Compile target -$(TARGET_BASENAME).elf: SRC := $(SRC_COMMON) $(SRC_$(MCU_TYPE)) $(TARGET_BASENAME).elf: CFLAGS := $(MCU_$(MCU_TYPE)) $(CFLAGS_$(MCU_TYPE)) $(CFLAGS_COMMON) $(TARGET_BASENAME).elf: LDFLAGS := $(LDFLAGS_COMMON) $(LDFLAGS_$(MCU_TYPE)) -T$(LDSCRIPT_$(MCU_TYPE)) -$(TARGET_BASENAME).elf: $(SRC) +$(TARGET_BASENAME).elf: $(SRC_COMMON) $(SRC_$(MCU_TYPE)) $(OBJ) @$(ECHO) Compiling $(notdir $@) - $(QUIET)mkdir -p $(dir $@) - $(QUIET)$(CC) $(CFLAGS) $(LDFLAGS) -MMD -MP -MF $(@:.elf=.d) -o $(@) $(SRC) + $(QUIET)$(CC) $(CFLAGS) $(LDFLAGS) -MMD -MP -MF $(@:.elf=.d) -o $(@) $(SRC_COMMON) $(SRC_$(MCU_TYPE)) # Generate bin and hex files $(TARGET_BASENAME).bin: $(TARGET_BASENAME).elf @@ -115,10 +120,10 @@ $(TARGET_BASENAME).bin: $(TARGET_BASENAME).elf # mkdirs $(DL_DIR): - $(QUIET)mkdir -p $@ + $(QUIET)$(MKDIR) $@ $(TOOLS_DIR): - $(QUIET)mkdir -p $@ + $(QUIET)$(MKDIR) $@ # include the tools makefile include $(ROOT)/make/tools.mk diff --git a/Src/main.c b/Src/main.c index 806352795..43aff5f7d 100644 --- a/Src/main.c +++ b/Src/main.c @@ -2263,4 +2263,4 @@ void assert_failed(uint8_t* file, uint32_t line) line) */ /* USER CODE END 6 */ } -#endif /* USE_FULL_ASSERT */ \ No newline at end of file +#endif /* USE_FULL_ASSERT */ diff --git a/make/tools.mk b/make/tools.mk index 23fa8772c..d3f14d36a 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -2,318 +2,41 @@ # # Installers for tools # -# NOTE: These are not tied to the default goals -# and must be invoked manually -# ############################################################### -############################## -# -# Check that environmental variables are sane -# -############################## - -# Set up ARM (STM32) SDK -ARM_SDK_DIR ?= $(TOOLS_DIR)/gcc-arm-none-eabi-10.3-2021.10 -# Checked below, Should match the output of $(shell arm-none-eabi-gcc -dumpversion) -GCC_REQUIRED_VERSION ?= 10.3 - -.PHONY: arm_sdk_version - -arm_sdk_version: - $(V1) $(ARM_SDK_PREFIX)gcc --version - -## arm_sdk_install : Install Arm SDK -.PHONY: arm_sdk_install - - -ARM_SDK_URL_BASE :=https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10 -# source: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads -ifeq ($(OSFAMILY), linux) - ARM_SDK_URL := $(ARM_SDK_URL_BASE)-x86_64-linux.tar.bz2 -endif - -ifeq ($(OSFAMILY), macosx) - ARM_SDK_URL := $(ARM_SDK_URL_BASE)-mac.tar.bz2 -endif - -ifeq ($(OSFAMILY), windows) - ARM_SDK_URL := $(ARM_SDK_URL_BASE)-win32.zip -endif -ARM_SDK_FILE := $(notdir $(ARM_SDK_URL)) +# download location for tools +WINDOWS_TOOLS=http://uav.tridgell.net/AM32/tools/windows-tools.zip +LINUX_TOOLS=http://uav.tridgell.net/AM32/tools/linux-tools.tar.gz -SDK_INSTALL_MARKER := $(ARM_SDK_DIR)/bin/arm-none-eabi-gcc-$(GCC_REQUIRED_VERSION) +ifeq ($(OS),Windows_NT) +ARM_SDK_PREFIX:=tools/windows/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin/arm-none-eabi- +SHELL:=cmd.exe +COPY:=copy /Y +DSEP:=\\ +NUL:=NUL +MKDIR:=mkdir +RMDIR:=del /s /q -# order-only prereq on directory existance: -arm_sdk_install: | $(TOOLS_DIR) +arm_sdk_install: + @echo "Installing windows tools" + @$(RMDIR) tools\\windows + @powershell -Command "& { (New-Object System.Net.WebClient).DownloadFile('$(WINDOWS_TOOLS)', 'windows-tools.zip') }" + @powershell -Command "Expand-Archive -Path windows-tools.zip -Force -DestinationPath ." + @echo "windows tools install done" -arm_sdk_install: arm_sdk_download $(SDK_INSTALL_MARKER) - -$(SDK_INSTALL_MARKER): -ifneq ($(OSFAMILY), windows) - # binary only release so just extract it - $(V1) tar -C $(TOOLS_DIR) -xjf "$(DL_DIR)/$(ARM_SDK_FILE)" else - $(V1) unzip -q -d $(ARM_SDK_DIR) "$(DL_DIR)/$(ARM_SDK_FILE)" -endif - -.PHONY: arm_sdk_download -arm_sdk_download: | $(DL_DIR) -arm_sdk_download: $(DL_DIR)/$(ARM_SDK_FILE) -$(DL_DIR)/$(ARM_SDK_FILE): - # download the source only if it's newer than what we already have - $(V1) curl -L -k -o "$(DL_DIR)/$(ARM_SDK_FILE)" -z "$(DL_DIR)/$(ARM_SDK_FILE)" "$(ARM_SDK_URL)" - +ARM_SDK_PREFIX:=tools/linux/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin/arm-none-eabi- +COPY:=cp +DSEP:=/ +NUL:=/dev/null +MKDIR:=mkdir -p +RMDIR:=rm -rf -## arm_sdk_clean : Uninstall Arm SDK -.PHONY: arm_sdk_clean -arm_sdk_clean: - $(V1) [ ! -d "$(ARM_SDK_DIR)" ] || $(RM) -r $(ARM_SDK_DIR) - $(V1) [ ! -d "$(DL_DIR)" ] || $(RM) -r $(DL_DIR) +arm_sdk_install: + @echo "Installing linux tools" + @wget $(LINUX_TOOLS) + @tar xzf linux-tools.tar.gz + @echo "linux tools install done" -.PHONY: openocd_win_install - -openocd_win_install: | $(DL_DIR) $(TOOLS_DIR) -openocd_win_install: OPENOCD_URL := git://git.code.sf.net/p/openocd/code -openocd_win_install: OPENOCD_REV := cf1418e9a85013bbf8dbcc2d2e9985695993d9f4 -openocd_win_install: OPENOCD_OPTIONS := - -ifeq ($(OPENOCD_FTDI), yes) -openocd_win_install: OPENOCD_OPTIONS := $(OPENOCD_OPTIONS) --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=$(FTD2XX_DIR) -endif - -openocd_win_install: openocd_win_clean libusb_win_install ftd2xx_install - # download the source - @echo " DOWNLOAD $(OPENOCD_URL) @ $(OPENOCD_REV)" - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - $(V1) mkdir -p "$(OPENOCD_BUILD_DIR)" - $(V1) git clone --no-checkout $(OPENOCD_URL) "$(DL_DIR)/openocd-build" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - git checkout -q $(OPENOCD_REV) ; \ - ) - - # apply patches - @echo " PATCH $(OPENOCD_BUILD_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - git apply < $(ROOT_DIR)/flight/Project/OpenOCD/0003-freertos-cm4f-fpu-support.patch ; \ - git apply < $(ROOT_DIR)/flight/Project/OpenOCD/0004-st-icdi-disable.patch ; \ - ) - - # build and install - @echo " BUILD $(OPENOCD_WIN_DIR)" - $(V1) mkdir -p "$(OPENOCD_WIN_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - ./bootstrap ; \ - ./configure --enable-maintainer-mode --prefix="$(OPENOCD_WIN_DIR)" \ - --build=i686-pc-linux-gnu --host=i586-mingw32msvc \ - CPPFLAGS=-I$(LIBUSB_WIN_DIR)/include \ - LDFLAGS=-L$(LIBUSB_WIN_DIR)/lib/gcc \ - $(OPENOCD_OPTIONS) \ - --disable-werror \ - --enable-stlink ; \ - $(MAKE) ; \ - $(MAKE) install ; \ - ) - - # delete the extracted source when we're done - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - -.PHONY: openocd_win_clean -openocd_win_clean: - @echo " CLEAN $(OPENOCD_WIN_DIR)" - $(V1) [ ! -d "$(OPENOCD_WIN_DIR)" ] || $(RM) -r "$(OPENOCD_WIN_DIR)" - -# Set up openocd tools -OPENOCD_DIR := $(TOOLS_DIR)/openocd -OPENOCD_WIN_DIR := $(TOOLS_DIR)/openocd_win -OPENOCD_BUILD_DIR := $(DL_DIR)/openocd-build - -.PHONY: openocd_install - -openocd_install: | $(DL_DIR) $(TOOLS_DIR) -openocd_install: OPENOCD_URL := git://git.code.sf.net/p/openocd/code -openocd_install: OPENOCD_TAG := v0.9.0 -openocd_install: OPENOCD_OPTIONS := --enable-maintainer-mode --prefix="$(OPENOCD_DIR)" --enable-buspirate --enable-stlink - -ifeq ($(OPENOCD_FTDI), yes) -openocd_install: OPENOCD_OPTIONS := $(OPENOCD_OPTIONS) --enable-ftdi -endif - -ifeq ($(UNAME), Darwin) -openocd_install: OPENOCD_OPTIONS := $(OPENOCD_OPTIONS) --disable-option-checking endif - -openocd_install: openocd_clean - # download the source - @echo " DOWNLOAD $(OPENOCD_URL) @ $(OPENOCD_TAG)" - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - $(V1) mkdir -p "$(OPENOCD_BUILD_DIR)" - $(V1) git clone --no-checkout $(OPENOCD_URL) "$(OPENOCD_BUILD_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - git checkout -q tags/$(OPENOCD_TAG) ; \ - ) - - # build and install - @echo " BUILD $(OPENOCD_DIR)" - $(V1) mkdir -p "$(OPENOCD_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - ./bootstrap ; \ - ./configure $(OPENOCD_OPTIONS) ; \ - $(MAKE) ; \ - $(MAKE) install ; \ - ) - - # delete the extracted source when we're done - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - -.PHONY: openocd_clean -openocd_clean: - @echo " CLEAN $(OPENOCD_DIR)" - $(V1) [ ! -d "$(OPENOCD_DIR)" ] || $(RM) -r "$(OPENOCD_DIR)" - -STM32FLASH_DIR := $(TOOLS_DIR)/stm32flash - -.PHONY: stm32flash_install -stm32flash_install: STM32FLASH_URL := http://stm32flash.googlecode.com/svn/trunk -stm32flash_install: STM32FLASH_REV := 61 -stm32flash_install: stm32flash_clean - # download the source - @echo " DOWNLOAD $(STM32FLASH_URL) @ r$(STM32FLASH_REV)" - $(V1) svn export -q -r "$(STM32FLASH_REV)" "$(STM32FLASH_URL)" "$(STM32FLASH_DIR)" - - # build - @echo " BUILD $(STM32FLASH_DIR)" - $(V1) $(MAKE) --silent -C $(STM32FLASH_DIR) all - -.PHONY: stm32flash_clean -stm32flash_clean: - @echo " CLEAN $(STM32FLASH_DIR)" - $(V1) [ ! -d "$(STM32FLASH_DIR)" ] || $(RM) -r "$(STM32FLASH_DIR)" - -# Set up uncrustify tools -UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.61 -UNCRUSTIFY_BUILD_DIR := $(DL_DIR)/uncrustify - -.PHONY: uncrustify_install -uncrustify_install: | $(DL_DIR) $(TOOLS_DIR) -uncrustify_install: UNCRUSTIFY_URL := http://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.61/uncrustify-0.61.tar.gz -uncrustify_install: UNCRUSTIFY_FILE := uncrustify-0.61.tar.gz -uncrustify_install: UNCRUSTIFY_OPTIONS := prefix=$(UNCRUSTIFY_DIR) -uncrustify_install: uncrustify_clean -ifneq ($(OSFAMILY), windows) - @echo " DOWNLOAD $(UNCRUSTIFY_URL)" - $(V1) curl -L -k -o "$(DL_DIR)/$(UNCRUSTIFY_FILE)" "$(UNCRUSTIFY_URL)" -endif - # extract the src - @echo " EXTRACT $(UNCRUSTIFY_FILE)" - $(V1) tar -C $(TOOLS_DIR) -xf "$(DL_DIR)/$(UNCRUSTIFY_FILE)" - - @echo " BUILD $(UNCRUSTIFY_DIR)" - $(V1) ( \ - cd $(UNCRUSTIFY_DIR) ; \ - ./configure --prefix="$(UNCRUSTIFY_DIR)" ; \ - $(MAKE) ; \ - $(MAKE) install ; \ - ) - # delete the extracted source when we're done - $(V1) [ ! -d "$(UNCRUSTIFY_BUILD_DIR)" ] || $(RM) -r "$(UNCRUSTIFY_BUILD_DIR)" - -.PHONY: uncrustify_clean -uncrustify_clean: - @echo " CLEAN $(UNCRUSTIFY_DIR)" - $(V1) [ ! -d "$(UNCRUSTIFY_DIR)" ] || $(RM) -r "$(UNCRUSTIFY_DIR)" - @echo " CLEAN $(UNCRUSTIFY_BUILD_DIR)" - $(V1) [ ! -d "$(UNCRUSTIFY_BUILD_DIR)" ] || $(RM) -r "$(UNCRUSTIFY_BUILD_DIR)" - -# ZIP download URL -zip_install: ZIP_URL := http://pkgs.fedoraproject.org/repo/pkgs/zip/zip30.tar.gz/7b74551e63f8ee6aab6fbc86676c0d37/zip30.tar.gz - -zip_install: ZIP_FILE := $(notdir $(ZIP_URL)) - -ZIP_DIR = $(TOOLS_DIR)/zip30 - -# order-only prereq on directory existance: -zip_install : | $(DL_DIR) $(TOOLS_DIR) -zip_install: zip_clean - $(V1) curl -L -k -o "$(DL_DIR)/$(ZIP_FILE)" "$(ZIP_URL)" - $(V1) tar --force-local -C $(TOOLS_DIR) -xzf "$(DL_DIR)/$(ZIP_FILE)" -ifneq ($(OSFAMILY), windows) - $(V1) cd "$(ZIP_DIR)" && $(MAKE) -f unix/Makefile generic_gcc -else - $(V1) cd "$(ZIP_DIR)" && $(MAKE) -f win32/makefile.gcc -endif - -.PHONY: zip_clean -zip_clean: - $(V1) [ ! -d "$(ZIP_DIR)" ] || $(RM) -rf $(ZIP_DIR) - -############################## -# -# Set up paths to tools -# -############################## - -ifeq ($(shell [ -d "$(ARM_SDK_DIR)" ] && echo "exists"), exists) - ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi- -else ifeq (,$(findstring _install,$(MAKECMDGOALS))) - GCC_VERSION = $(shell arm-none-eabi-gcc -dumpversion) - ifeq ($(GCC_VERSION),) - $(error **ERROR** arm-none-eabi-gcc not in the PATH. Run 'make arm_sdk_install' to install automatically in the tools folder of this repo) - else ifneq ($(GCC_VERSION), $(GCC_REQUIRED_VERSION)) - $(error **ERROR** your arm-none-eabi-gcc is '$(GCC_VERSION)', but '$(GCC_REQUIRED_VERSION)' is expected. Override with 'GCC_REQUIRED_VERSION' in make/local.mk or run 'make arm_sdk_install' to install the right version automatically in the tools folder of this repo) - endif - - # ARM tookchain is in the path, and the version is what's required. - ARM_SDK_PREFIX ?= arm-none-eabi- -endif - -ifeq ($(shell [ -d "$(ZIP_DIR)" ] && echo "exists"), exists) - export ZIPBIN := $(ZIP_DIR)/zip -else - export ZIPBIN := zip -endif - -ifeq ($(shell [ -d "$(OPENOCD_DIR)" ] && echo "exists"), exists) - OPENOCD := $(OPENOCD_DIR)/bin/openocd -else - # not installed, hope it's in the path... - OPENOCD ?= openocd -endif - -ifeq ($(shell [ -d "$(UNCRUSTIFY_DIR)" ] && echo "exists"), exists) - UNCRUSTIFY := $(UNCRUSTIFY_DIR)/bin/uncrustify -else - # not installed, hope it's in the path... - UNCRUSTIFY ?= uncrustify -endif - -# Google Breakpad -DUMP_SYMBOLS_TOOL := $(TOOLS_DIR)/breakpad/$(OSFAMILY)-$(ARCHFAMILY)/dump_syms -BREAKPAD_URL := http://dronin.tracer.nz/tools/breakpad.zip -BREAKPAD_DL_FILE := $(DL_DIR)/$(notdir $(BREAKPAD_URL)) -BREAKPAD_DIR := $(TOOLS_DIR)/breakpad - -.PHONY: breakpad_install -breakpad_install: | $(DL_DIR) $(TOOLS_DIR) -breakpad_install: breakpad_clean - @echo " DOWNLOAD $(BREAKPAD_URL)" - $(V1) $(V1) curl -L -k -z "$(BREAKPAD_DL_FILE)" -o "$(BREAKPAD_DL_FILE)" "$(BREAKPAD_URL)" - @echo " EXTRACT $(notdir $(BREAKPAD_DL_FILE))" - $(V1) mkdir -p "$(BREAKPAD_DIR)" - $(V1) unzip -q -d $(BREAKPAD_DIR) "$(BREAKPAD_DL_FILE)" -ifeq ($(OSFAMILY), windows) - $(V1) ln -s "$(TOOLS_DIR)/breakpad/$(OSFAMILY)-i686" "$(TOOLS_DIR)/breakpad/$(OSFAMILY)-x86_64" -endif - -.PHONY: breakpad_clean -breakpad_clean: - @echo " CLEAN $(BREAKPAD_DIR)" - $(V1) [ ! -d "$(BREAKPAD_DIR)" ] || $(RM) -rf $(BREAKPAD_DIR) - @echo " CLEAN $(BREAKPAD_DL_FILE)" - $(V1) $(RM) -f $(BREAKPAD_DL_FILE) diff --git a/tools/openocd-at32f421.cfg b/tools/openocd-at32f421.cfg new file mode 100644 index 000000000..eba041dfa --- /dev/null +++ b/tools/openocd-at32f421.cfg @@ -0,0 +1,4 @@ +source [find interface/stlink.cfg] +source [find target/at32f421xx.cfg] +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 -gdb-max-connections 4 +init