Commit 0c03bd8e authored by Martin Horauer's avatar Martin Horauer
Browse files

modified Makefiles

parent 71ba1d0b
......@@ -38,6 +38,7 @@ TRACE = -D SEMI_HOSTING
################################################################################
# TOOLS & ARGS
#
SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM
BOARD = XMC_4500_RELAX_KIT
......@@ -70,10 +71,9 @@ GDB_ARGS += -ex "monitor SWO EnableTarget 16000000 0 1 0"
################################################################################
# BUILD RULES
all: $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
all: $(SRC)
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf: $(wildcard *.cpp)
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex: $(SRC)
@echo "----------------------------------------------------------------------"
@echo "Building"
@echo ""
......@@ -82,13 +82,18 @@ $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf: $(wildcard *.cpp)
################################################################################
# DEBUG RULES
debug: $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
debug: $(SRC)
ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif
@echo "----------------------------------------------------------------------"
@echo "Building with DEBUG Symbols"
@echo ""
$(MBED) compile -m $(BOARD) -t $(TOOLCHAIN) -N main --profile mbed-os/tools/profiles/debug.json
@echo ""
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS)
################################################################################
......@@ -103,7 +108,7 @@ erase:
################################################################################
# DOCUMENTATION RULES
doc: $(wildcard *.cpp)
doc: $(SRC)
doxygen
################################################################################
......
......@@ -38,6 +38,7 @@ TRACE = -D SEMI_HOSTING
################################################################################
# TOOLS & ARGS
#
SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM
BOARD = XMC_4500_RELAX_KIT
......@@ -70,10 +71,9 @@ GDB_ARGS += -ex "monitor SWO EnableTarget 16000000 0 1 0"
################################################################################
# BUILD RULES
all: $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
all: $(SRC)
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf: $(wildcard *.cpp)
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex: $(SRC)
@echo "----------------------------------------------------------------------"
@echo "Building"
@echo ""
......@@ -82,13 +82,18 @@ $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf: $(wildcard *.cpp)
################################################################################
# DEBUG RULES
debug: $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
debug: $(SRC)
ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif
@echo "----------------------------------------------------------------------"
@echo "Building with DEBUG Symbols"
@echo ""
$(MBED) compile -m $(BOARD) -t $(TOOLCHAIN) -N main --profile mbed-os/tools/profiles/debug.json
@echo ""
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS)
################################################################################
......@@ -103,7 +108,7 @@ erase:
################################################################################
# DOCUMENTATION RULES
doc: $(wildcard *.cpp)
doc: $(SRC)
doxygen
################################################################################
......
......@@ -38,6 +38,7 @@ TRACE = -D SEMI_HOSTING
################################################################################
# TOOLS & ARGS
#
SRC = $(wildcard *.cpp)
TERMINAL = gnome-terminal
TOOLCHAIN = GCC_ARM
BOARD = XMC_4500_RELAX_KIT
......@@ -70,10 +71,9 @@ GDB_ARGS += -ex "monitor SWO EnableTarget 16000000 0 1 0"
################################################################################
# BUILD RULES
all: $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
all: $(SRC)
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf: $(wildcard *.cpp)
$(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).hex: $(SRC)
@echo "----------------------------------------------------------------------"
@echo "Building"
@echo ""
......@@ -82,13 +82,18 @@ $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf: $(wildcard *.cpp)
################################################################################
# DEBUG RULES
debug: $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf
debug: $(SRC)
ifdef SystemRoot
@call start JLinkGDBServer -Device XMC4500-1024 -if SWD
else
$(TERMINAL) -e "JLinkGDBServer -Device XMC4500-1024 -if SWD" &
sleep 1 && $(TERMINAL) -e "telnet 127.0.0.1 2333" &
endif
@echo "----------------------------------------------------------------------"
@echo "Building with DEBUG Symbols"
@echo ""
$(MBED) compile -m $(BOARD) -t $(TOOLCHAIN) -N main --profile mbed-os/tools/profiles/debug.json
@echo ""
$(GDB) -q $(BUILDDIR)/$(BOARD)/$(TOOLCHAIN)/$(TARGET).elf $(GDB_ARGS)
################################################################################
......@@ -103,7 +108,7 @@ erase:
################################################################################
# DOCUMENTATION RULES
doc: $(wildcard *.cpp)
doc: $(SRC)
doxygen
################################################################################
......
......@@ -10,8 +10,8 @@
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* See the License for the specific language governing permissions limitations
* and under the License.
*/
/******************************************************************* Includes */
......
Markdown is supported
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