mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
OP-439: Simplify further. Abstract most of the OOCD flags into the common
firmware include and delete all the extra foss-jtag config files. There is now a legacy file for the revA board a second for AHRS that changes the port
This commit is contained in:
parent
ee7179bd53
commit
69d03ca101
@ -304,43 +304,16 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OPENOCDEXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.ahrs.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.ahrs.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.ahrs.win.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
# reset target
|
# reset target
|
||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# # terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -291,35 +291,8 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OPENOCDEXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.ahrs.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.ahrs.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.ahrs.win.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
@ -327,8 +300,6 @@ OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
|||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -330,45 +330,15 @@ else
|
|||||||
quote =
|
quote =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OOCD_EXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.win.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
# reset target
|
# reset target
|
||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
CC = $(TCHAIN_PREFIX)gcc
|
CC = $(TCHAIN_PREFIX)gcc
|
||||||
|
@ -370,44 +370,15 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OOCD_EXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.win.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
# reset target
|
# reset target
|
||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -371,44 +371,15 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OOCD_EXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.win.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
# reset target
|
# reset target
|
||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -370,44 +370,15 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_stm32f10x_$(MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OOCD_EXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../../Project/OpenOCD/floss-jtag.openpilot.win.cfg -f ../../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
# reset target
|
# reset target
|
||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -477,35 +477,8 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OOCD_EXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.win.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
@ -513,7 +486,6 @@ OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
|||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -313,43 +313,15 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OPENOCDEXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.win.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
# reset target
|
# reset target
|
||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# # terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -459,35 +459,8 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OOCD_EXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.win.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
@ -495,7 +468,7 @@ OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
|||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -349,44 +349,15 @@ LDFLAGS += -lc -lgcc
|
|||||||
# Set linker-script name depending on selected submodel name
|
# Set linker-script name depending on selected submodel name
|
||||||
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
LDFLAGS +=-T$(LINKERSCRIPTPATH)/link_$(BOARD)_$(BOOT_MODEL).ld
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
# Options for OpenOCD flash-programming
|
# Program
|
||||||
# see openocd.pdf/openocd.texi for further information
|
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
||||||
#
|
|
||||||
OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
|
||||||
# if OpenOCD is in the $PATH just set OPENOCDEXE=openocd
|
|
||||||
OOCD_EXE=openocd
|
|
||||||
# debug level
|
|
||||||
OOCD_CL=-d0
|
|
||||||
# interface and board/target settings (using the OOCD target-library here)
|
|
||||||
UNAME := $(shell uname)
|
|
||||||
ifeq ($(UNAME), Darwin)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.pipxtreme.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
ifeq ($(UNAME), Linux)
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.pipxtreme.posix.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
else
|
|
||||||
OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.pipxtreme.win.cfg -f ../Project/OpenOCD/stm32.cfg
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# initialize
|
|
||||||
OOCD_CL+=-c init
|
|
||||||
# show the targets
|
|
||||||
OOCD_CL+=-c targets
|
|
||||||
# commands to prepare flash-write
|
|
||||||
OOCD_CL+= -c "reset halt"
|
|
||||||
# flash erase
|
|
||||||
OOCD_CL+=-c "stm32x mass_erase 0"
|
|
||||||
# flash-write
|
|
||||||
OOCD_CL+=-c "flash write_image $(OOCD_LOADFILE)"
|
|
||||||
# Verify
|
# Verify
|
||||||
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
OOCD_CL+=-c "verify_image $(OOCD_LOADFILE)"
|
||||||
# reset target
|
# reset target
|
||||||
OOCD_CL+=-c "reset run"
|
OOCD_CL+=-c "reset run"
|
||||||
# terminate OOCD after programming
|
# terminate OOCD after programming
|
||||||
OOCD_CL+=-c shutdown
|
OOCD_CL+=-c shutdown
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
REMOVE = $(REMOVE_CMD) -f
|
REMOVE = $(REMOVE_CMD) -f
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Floss JTAG for AHRS
|
|
||||||
#
|
|
||||||
|
|
||||||
interface ft2232
|
|
||||||
ft2232_vid_pid 0x0403 0x6010
|
|
||||||
ft2232_device_desc "Dual RS232-HS"
|
|
||||||
#ft2232_bus_addr "002:103"
|
|
||||||
#ft2232_serial "1234567890"
|
|
||||||
ft2232_layout "usbjtag"
|
|
||||||
ft2232_latency 2
|
|
||||||
|
|
||||||
gdb_port 3334
|
|
||||||
tcl_port 6667
|
|
||||||
telnet_port 4445
|
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Floss JTAG OpenPilot
|
|
||||||
#
|
|
||||||
|
|
||||||
interface ft2232
|
|
||||||
ft2232_vid_pid 0x0403 0x6010
|
|
||||||
#ft2232_device_desc "Dual RS232-HS"
|
|
||||||
#ft2232_bus_addr "002:088"
|
|
||||||
#ft2232_serial "1234567890"
|
|
||||||
ft2232_layout "usbjtag"
|
|
||||||
ft2232_latency 2
|
|
||||||
|
|
||||||
gdb_port 3333
|
|
||||||
tcl_port 6666
|
|
||||||
telnet_port 4444
|
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Floss JTAG OpenPilot
|
|
||||||
#
|
|
||||||
|
|
||||||
interface ft2232
|
|
||||||
ft2232_vid_pid 0x0403 0x6010
|
|
||||||
ft2232_device_desc "Dual RS232-HS"
|
|
||||||
#ft2232_bus_addr "002:088"
|
|
||||||
#ft2232_serial "1234567890"
|
|
||||||
ft2232_layout "usbjtag"
|
|
||||||
ft2232_latency 2
|
|
||||||
|
|
||||||
gdb_port 3333
|
|
||||||
tcl_port 6666
|
|
||||||
telnet_port 4444
|
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Floss JTAG OpenPilot
|
|
||||||
#
|
|
||||||
|
|
||||||
interface ft2232
|
|
||||||
ft2232_vid_pid 0x0403 0x6010
|
|
||||||
#ft2232_device_desc "Dual RS232-HS"
|
|
||||||
#ft2232_bus_addr "002:088"
|
|
||||||
#ft2232_serial "1234567890"
|
|
||||||
ft2232_layout "usbjtag"
|
|
||||||
ft2232_latency 2
|
|
||||||
|
|
||||||
gdb_port 3334
|
|
||||||
tcl_port 6666
|
|
||||||
telnet_port 4444
|
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Floss JTAG for AHRS
|
|
||||||
#
|
|
||||||
|
|
||||||
interface ft2232
|
|
||||||
ft2232_vid_pid 0x0403 0x6010
|
|
||||||
ft2232_device_desc "Dual RS232-HS"
|
|
||||||
#ft2232_bus_addr "002:103"
|
|
||||||
#ft2232_serial "1234567890"
|
|
||||||
ft2232_layout "usbjtag"
|
|
||||||
ft2232_latency 2
|
|
||||||
|
|
||||||
gdb_port 3334
|
|
||||||
tcl_port 6667
|
|
||||||
telnet_port 4445
|
|
@ -1,5 +1,5 @@
|
|||||||
define connect
|
define connect
|
||||||
target remote localhost:3334
|
target remote localhost:3333
|
||||||
monitor cortex_m3 vector_catch all
|
monitor cortex_m3 vector_catch all
|
||||||
file ./Build/PipXtreme.elf
|
file ./Build/PipXtreme.elf
|
||||||
end
|
end
|
||||||
|
@ -143,3 +143,25 @@ $($(1):.c=.s) : %.s : %.c
|
|||||||
$(V1) $(CC) -S $$(CFLAGS) $$(CONLYFLAGS) $$< -o $$@
|
$(V1) $(CC) -S $$(CFLAGS) $$(CONLYFLAGS) $$< -o $$@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# # Options for OpenOCD flash-programming
|
||||||
|
# see openocd.pdf/openocd.texi for further information
|
||||||
|
# #
|
||||||
|
# OOCD_LOADFILE+=$(OUTDIR)/$(TARGET).elf
|
||||||
|
# if OpenOCD is in the $PATH just set OPENOCDEXE=openocd
|
||||||
|
OOCD_EXE=openocd
|
||||||
|
# debug level
|
||||||
|
OOCD_CL=-d0
|
||||||
|
# interface and board/target settings (using the OOCD target-library here)
|
||||||
|
OOCD_CL+=-s $(TOP)/flight/Project/OpenOCD
|
||||||
|
OOCD_CL+=-f foss-jtag.revb.cfg -f stm32.cfg
|
||||||
|
|
||||||
|
# initialize
|
||||||
|
OOCD_CL+=-c init
|
||||||
|
# show the targets
|
||||||
|
OOCD_CL+=-c targets
|
||||||
|
# commands to prepare flash-write
|
||||||
|
OOCD_CL+= -c "reset halt"
|
||||||
|
# flash erase
|
||||||
|
OOCD_CL+=-c "stm32x mass_erase 0"
|
||||||
|
# flash-write
|
||||||
|
Loading…
Reference in New Issue
Block a user