Commit 8304171d authored by Martin Horauer's avatar Martin Horauer
Browse files

modified several Makefiles in MBED APPs

parent 01046ab6
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)-DEBUG/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)-DEBUG/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING ...@@ -41,6 +41,7 @@ TRACE = -D SEMI_HOSTING
SRC = $(wildcard *.cpp) SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM TOOLCHAIN = GCC_ARM
TOOLCHAINDBG = GCC_ARM-DEBUG
BOARD = XMC_4500_RELAX_KIT BOARD = XMC_4500_RELAX_KIT
BUILDDIR = BUILD BUILDDIR = BUILD
DOCDIR = DOC DOCDIR = DOC
...@@ -93,19 +94,19 @@ release: $(SRC) ...@@ -93,19 +94,19 @@ release: $(SRC)
################################################################################ ################################################################################
# DEBUG RULES # DEBUG RULES
debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf debug: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf
ifdef SystemRoot ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD @call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" & $(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" & sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif endif
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS) $(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).elf $(GDB_ARGS)
################################################################################ ################################################################################
# FLASH RULES # FLASH RULES
flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex flash: build $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex
echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD echo -e 'speed 4000\nconnect\nh\nloadbin $(BUILDDIR)/$(BOARD)/$(TOOLCHAINDBG)/$(TARGET).hex,0xC000000\nr\ng\nq' | JLinkExe -Device XMC4500-1024 -if SWD
################################################################################ ################################################################################
# ERASE DEVICE # ERASE DEVICE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment