[gentlenav] r3661 committed - MatrixPilot_trunk: move the makefile support modules into a new home u...

3 views
Skip to first unread message

gent...@googlecode.com

unread,
Jun 15, 2015, 10:50:04 AM6/15/15
to uavdevboa...@googlegroups.com
Revision: 3661
Author: robert.d...@gmail.com
Date: Mon Jun 15 14:49:11 2015 UTC
Log: MatrixPilot_trunk: move the makefile support modules into a new
home under ./Tools

https://code.google.com/p/gentlenav/source/detail?r=3661

Added:
/trunk/Tools/makefiles
/trunk/Tools/makefiles/device-AUAV3.mk
/trunk/Tools/makefiles/device-PX4.mk
/trunk/Tools/makefiles/device-SIL.mk
/trunk/Tools/makefiles/device-SILSIM.mk
/trunk/Tools/makefiles/device-UDB4.mk
/trunk/Tools/makefiles/device-UDB5.mk
/trunk/Tools/makefiles/target-LedTest.mk
/trunk/Tools/makefiles/target-MatrixPilot.mk
/trunk/Tools/makefiles/target-RollPitchYaw.mk
/trunk/Tools/makefiles/toolchain-ARM.mk
/trunk/Tools/makefiles/toolchain-C30.mk
/trunk/Tools/makefiles/toolchain-GCC.mk
/trunk/Tools/makefiles/toolchain-XC16.mk
Deleted:
/trunk/device-AUAV3.mk
/trunk/device-PX4.mk
/trunk/device-SIL.mk
/trunk/device-SILSIM.mk
/trunk/device-UDB4.mk
/trunk/device-UDB5.mk
/trunk/target-LedTest.mk
/trunk/target-MatrixPilot.mk
/trunk/target-RollPitchYaw.mk
/trunk/toolchain-ARM.mk
/trunk/toolchain-C30.mk
/trunk/toolchain-GCC.mk
/trunk/toolchain-XC16.mk
Modified:
/trunk/Tools/Build/pyProjectCreator.py
/trunk/build-all.bat
/trunk/makefile

=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/device-AUAV3.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,12 @@
+# this file is included from makefile
+
+#TOOLCHAIN ?= C30
+TOOLCHAIN ?= XC16
+TARGET_TYPE := hex
+CPU := 33EP512MU810
+
+modules += libUDB libVectorMatrix libFlashFS Microchip
+incpath += Microchip Microchip/Include libVectorMatrix
+#cfgpath := Config
+
+#defines += USE_USB USE_CDC USE_MSD USE_FILESYS
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/device-PX4.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,18 @@
+# this file is included from makefile
+
+TOOLCHAIN ?= ARM
+TARGET_TYPE := px4
+ARCH := armv7e-m
+CPU := cortex-m4
+FPU := fpv4-sp-d16
+TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb -mlong-calls
+#TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb-interwork -mlong-calls
+
+modules += libSTM
+
+#incpath := Config FreeRTOS\include libUDB libSTM libSTM\inc libSTM\src
libSTM\cmsis libSTM\Drivers
libSTM\Drivers\CMSIS\Device\ST\STM32F4xx\Include
libSTM\Drivers\CMSIS\Include libSTM\Drivers\STM32F4xx_HAL_Driver\Inc
libSTM\Middlewares libSTM\Middlewares\Third_Party\FreeRTOS\Source\include
libSTM\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS
libSTM\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F
+#incpath := Config FreeRTOS/include libUDB libSTM
+incpath += libSTM
+#cfgpath := Config
+
+defines += ARM_MATH_CM4 __FPU_USED STM32F401RE STM32F4XX
USE_STDPERIPH_DRIVER STM32F401xE
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/device-SIL.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,13 @@
+# this file is included from makefile
+
+TOOLCHAIN := GCC
+ifeq ($(OS),Windows_NT)
+TARGET_TYPE := exe
+else
+TARGET_TYPE := out
+endif
+CPU :=
+
+modules += Tools/MatrixPilot-SIL
+incpath +=
+#cfgpath := Config
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/device-SILSIM.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,13 @@
+# this file is included from makefile
+
+TOOLCHAIN := GCC
+ifeq ($(OS),Windows_NT)
+TARGET_TYPE := exe
+else
+TARGET_TYPE := out
+endif
+CPU :=
+
+modules += Tools/MatrixPilot-SIL
+incpath +=
+#cfgpath := Config
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/device-UDB4.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,13 @@
+# this file is included from makefile
+
+TOOLCHAIN ?= XC16
+TARGET_TYPE := hex
+CPU := 33FJ256GP710A
+
+modules += libUDB libVectorMatrix libFlashFS Microchip
+incpath += Microchip Microchip/Include libVectorMatrix
+#cfgpath := Config
+
+# mod_list
+# inc_list
+# def_list
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/device-UDB5.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,11 @@
+# this file is included from makefile and the project generator python
script
+# note: the project generator is not make, and hence does not obey make
syntax
+# lines are matched as tokens once only, so do not use repeated +=
+#
+TOOLCHAIN ?= XC16
+TARGET_TYPE := hex
+CPU := 33FJ256GP710A
+
+modules += libUDB libVectorMatrix libFlashFS Microchip
+incpath += Microchip Microchip/Include libVectorMatrix
+#cfgpath := Config
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/target-LedTest.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,5 @@
+# this file is included from makefile
+
+modules := Tools/LedTest
+incpath :=
+cfgpath := Tools/LedTest/Config
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/target-MatrixPilot.mk Mon Jun 15 14:49:11 2015
UTC
@@ -0,0 +1,5 @@
+# this file is included from makefile
+
+modules := MatrixPilot MAVLink libDCM
+incpath := MAVLink/include
+cfgpath := Config
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/target-RollPitchYaw.mk Mon Jun 15 14:49:11 2015
UTC
@@ -0,0 +1,5 @@
+# this file is included from makefile
+
+modules := RollPitchYaw libDCM
+incpath :=
+cfgpath := RollPitchYaw/Config
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/toolchain-ARM.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,21 @@
+# this file is included from makefile
+
+CC := arm-none-eabi-gcc
+ASM := arm-none-eabi-as
+LINK := arm-none-eabi-gcc
+OBJCOPY := arm-none-eabi-objcopy
+MKFW := $(SOURCE_DIR)/libSTM/px_mkfw.py
+LSCRIPT := $(SOURCE_DIR)/libSTM/stm32f401xe.ld
+#LFLAGS := -T .\gcc.ld -Wl,-Map,$(BINDIR)\$(TARGET_NAME).map
+LFLAGS := -T $(LSCRIPT) -Wl,-Map,$(TARGET_MAP)
+LIBS := -lgcc -lc -lm -lrdimon
+#QT := "
+#LINKFLAGS = -T .\$(APP_NAME).ld -o $(BINDIR)\$(APP_NAME).elf
-Wl,-Map,$(BINDIR)\$(APP_NAME).map,--cref -lm
+
+# Define optimisation level here
+OPT = -O0
+#OPT = -O2 -falign-functions=16 -fno-inline -fomit-frame-pointer
+
+CFLAGS := $(OPT) -gdwarf-2 -Wall -Wstrict-prototypes
+CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
+#CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
-Wa,-ahlms=$(<:.c=.lst)
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/toolchain-C30.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,11 @@
+# this file is included from makefile
+
+CC := pic30-gcc.exe
+AR := pic30-ar.exe
+BIN2HEX := pic30-bin2hex.exe
+LIBS := -legacy-libc
+TARGET_ARCH := -mcpu=$(CPU)
+AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
+CFLAGS += -x c -g -Wall -mlarge-code -mlarge-data -legacy-libc
+#LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)",--report-mem
+LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)"
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/toolchain-GCC.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,12 @@
+# this file is included from makefile
+
+CC := gcc
+ifeq ($(OS),Windows_NT)
+LIBS := -lws2_32
+TARGET_ARCH :=
+CFLAGS += -DWIN=1
+else
+LIBS := -lm
+TARGET_ARCH :=
+CFLAGS += -DNIX=1
+endif
=======================================
--- /dev/null
+++ /trunk/Tools/makefiles/toolchain-XC16.mk Mon Jun 15 14:49:11 2015 UTC
@@ -0,0 +1,10 @@
+# this file is included from makefile
+
+CC := xc16-gcc
+AR := xc16-ar
+BIN2HEX := xc16-bin2hex
+LIBS := -legacy-libc
+TARGET_ARCH := -mcpu=$(CPU)
+AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
+CFLAGS += -g -omf=elf -legacy-libc -msmart-io=1 -Wall -msfr-warn=off
-mlarge-code -mlarge-data
+LFLAGS += -omf=elf
-Wl,-script=p$(CPU).gld,--heap=256,--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,-Map="$(TARGET_MAP)"
=======================================
--- /trunk/device-AUAV3.mk Thu May 7 07:37:50 2015 UTC
+++ /dev/null
@@ -1,12 +0,0 @@
-# this file is included from makefile
-
-#TOOLCHAIN ?= C30
-TOOLCHAIN ?= XC16
-TARGET_TYPE := hex
-CPU := 33EP512MU810
-
-modules += libUDB libVectorMatrix libFlashFS Microchip
-incpath += Microchip Microchip/Include libVectorMatrix
-#cfgpath := Config
-
-#defines += USE_USB USE_CDC USE_MSD USE_FILESYS
=======================================
--- /trunk/device-PX4.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,18 +0,0 @@
-# this file is included from makefile
-
-TOOLCHAIN ?= ARM
-TARGET_TYPE := px4
-ARCH := armv7e-m
-CPU := cortex-m4
-FPU := fpv4-sp-d16
-TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb -mlong-calls
-#TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb-interwork -mlong-calls
-
-modules += libSTM
-
-#incpath := Config FreeRTOS\include libUDB libSTM libSTM\inc libSTM\src
libSTM\cmsis libSTM\Drivers
libSTM\Drivers\CMSIS\Device\ST\STM32F4xx\Include
libSTM\Drivers\CMSIS\Include libSTM\Drivers\STM32F4xx_HAL_Driver\Inc
libSTM\Middlewares libSTM\Middlewares\Third_Party\FreeRTOS\Source\include
libSTM\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS
libSTM\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F
-#incpath := Config FreeRTOS/include libUDB libSTM
-incpath += libSTM
-#cfgpath := Config
-
-defines += ARM_MATH_CM4 __FPU_USED STM32F401RE STM32F4XX
USE_STDPERIPH_DRIVER STM32F401xE
=======================================
--- /trunk/device-SIL.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,13 +0,0 @@
-# this file is included from makefile
-
-TOOLCHAIN := GCC
-ifeq ($(OS),Windows_NT)
-TARGET_TYPE := exe
-else
-TARGET_TYPE := out
-endif
-CPU :=
-
-modules += Tools/MatrixPilot-SIL
-incpath +=
-#cfgpath := Config
=======================================
--- /trunk/device-SILSIM.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,13 +0,0 @@
-# this file is included from makefile
-
-TOOLCHAIN := GCC
-ifeq ($(OS),Windows_NT)
-TARGET_TYPE := exe
-else
-TARGET_TYPE := out
-endif
-CPU :=
-
-modules += Tools/MatrixPilot-SIL
-incpath +=
-#cfgpath := Config
=======================================
--- /trunk/device-UDB4.mk Mon Mar 30 11:00:36 2015 UTC
+++ /dev/null
@@ -1,13 +0,0 @@
-# this file is included from makefile
-
-TOOLCHAIN ?= XC16
-TARGET_TYPE := hex
-CPU := 33FJ256GP710A
-
-modules += libUDB libVectorMatrix libFlashFS Microchip
-incpath += Microchip Microchip/Include libVectorMatrix
-#cfgpath := Config
-
-# mod_list
-# inc_list
-# def_list
=======================================
--- /trunk/device-UDB5.mk Sat May 16 13:41:36 2015 UTC
+++ /dev/null
@@ -1,11 +0,0 @@
-# this file is included from makefile and the project generator python
script
-# note: the project generator is not make, and hence does not obey make
syntax
-# lines are matched as tokens once only, so do not use repeated +=
-#
-TOOLCHAIN ?= XC16
-TARGET_TYPE := hex
-CPU := 33FJ256GP710A
-
-modules += libUDB libVectorMatrix libFlashFS Microchip
-incpath += Microchip Microchip/Include libVectorMatrix
-#cfgpath := Config
=======================================
--- /trunk/target-LedTest.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-# this file is included from makefile
-
-modules := Tools/LedTest
-incpath :=
-cfgpath := Tools/LedTest/Config
=======================================
--- /trunk/target-MatrixPilot.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-# this file is included from makefile
-
-modules := MatrixPilot MAVLink libDCM
-incpath := MAVLink/include
-cfgpath := Config
=======================================
--- /trunk/target-RollPitchYaw.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-# this file is included from makefile
-
-modules := RollPitchYaw libDCM
-incpath :=
-cfgpath := RollPitchYaw/Config
=======================================
--- /trunk/toolchain-ARM.mk Wed May 6 15:02:33 2015 UTC
+++ /dev/null
@@ -1,21 +0,0 @@
-# this file is included from makefile
-
-CC := arm-none-eabi-gcc
-ASM := arm-none-eabi-as
-LINK := arm-none-eabi-gcc
-OBJCOPY := arm-none-eabi-objcopy
-MKFW := $(SOURCE_DIR)/libSTM/px_mkfw.py
-LSCRIPT := $(SOURCE_DIR)/libSTM/stm32f401xe.ld
-#LFLAGS := -T .\gcc.ld -Wl,-Map,$(BINDIR)\$(TARGET_NAME).map
-LFLAGS := -T $(LSCRIPT) -Wl,-Map,$(TARGET_MAP)
-LIBS := -lgcc -lc -lm -lrdimon
-#QT := "
-#LINKFLAGS = -T .\$(APP_NAME).ld -o $(BINDIR)\$(APP_NAME).elf
-Wl,-Map,$(BINDIR)\$(APP_NAME).map,--cref -lm
-
-# Define optimisation level here
-OPT = -O0
-#OPT = -O2 -falign-functions=16 -fno-inline -fomit-frame-pointer
-
-CFLAGS := $(OPT) -gdwarf-2 -Wall -Wstrict-prototypes
-CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
-#CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
-Wa,-ahlms=$(<:.c=.lst)
=======================================
--- /trunk/toolchain-C30.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,11 +0,0 @@
-# this file is included from makefile
-
-CC := pic30-gcc.exe
-AR := pic30-ar.exe
-BIN2HEX := pic30-bin2hex.exe
-LIBS := -legacy-libc
-TARGET_ARCH := -mcpu=$(CPU)
-AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
-CFLAGS += -x c -g -Wall -mlarge-code -mlarge-data -legacy-libc
-#LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)",--report-mem
-LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)"
=======================================
--- /trunk/toolchain-GCC.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,12 +0,0 @@
-# this file is included from makefile
-
-CC := gcc
-ifeq ($(OS),Windows_NT)
-LIBS := -lws2_32
-TARGET_ARCH :=
-CFLAGS += -DWIN=1
-else
-LIBS := -lm
-TARGET_ARCH :=
-CFLAGS += -DNIX=1
-endif
=======================================
--- /trunk/toolchain-XC16.mk Tue Mar 3 04:47:08 2015 UTC
+++ /dev/null
@@ -1,10 +0,0 @@
-# this file is included from makefile
-
-CC := xc16-gcc
-AR := xc16-ar
-BIN2HEX := xc16-bin2hex
-LIBS := -legacy-libc
-TARGET_ARCH := -mcpu=$(CPU)
-AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
-CFLAGS += -g -omf=elf -legacy-libc -msmart-io=1 -Wall -msfr-warn=off
-mlarge-code -mlarge-data
-LFLAGS += -omf=elf
-Wl,-script=p$(CPU).gld,--heap=256,--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,-Map="$(TARGET_MAP)"
=======================================
--- /trunk/Tools/Build/pyProjectCreator.py Sun Jun 7 16:01:09 2015 UTC
+++ /trunk/Tools/Build/pyProjectCreator.py Mon Jun 15 14:49:11 2015 UTC
@@ -345,6 +345,7 @@
parser.add_option("-c", "--cfg", dest="config", help="specify
configuration files directory", default=[], action='append')
parser.add_option("-o", "--out", dest="out", help="project files
output path", default="_build")
parser.add_option("-f", "--file", dest="file", help="configuration
file", default="")
+ parser.add_option("-k", "--make", dest="mkdir", help="path to
makefile includes", default="/Tools/makefiles")
(opts, args) = parser.parse_args()

rootdir = opts.root
@@ -366,7 +367,7 @@

#
# Parse options from the 'target-*.mk' specific makefile
- target_mk_path = opts.root + "/target-" + opts.name + ".mk"
+ target_mk_path = opts.root + opts.mkdir + "/target-" + opts.name + ".mk"
opts.modules = parse_mk_file(target_mk_path, "modules", opts.modules)
opts.defines = parse_mk_file(target_mk_path, "defines", opts.defines)
opts.includes = parse_mk_file(target_mk_path, "incpath", opts.includes)
@@ -374,7 +375,7 @@

#
# Parse extra options from the 'device-*.mk' specific makefile
- opts.file = opts.root + "/device-" + opts.target + ".mk"
+ opts.file = opts.root + opts.mkdir + "/device-" + opts.target + ".mk"
if opts.file != "":
opts.modules = parse_mk_file(opts.file, "modules", opts.modules)
opts.includes = parse_mk_file(opts.file, "incpath", opts.includes)
=======================================
--- /trunk/build-all.bat Mon Jun 15 09:42:26 2015 UTC
+++ /trunk/build-all.bat Mon Jun 15 14:49:11 2015 UTC
@@ -41,7 +41,7 @@

popd

-@rem dir build\*.hex build\*.exe build\*.map /B /S
-dir build\*.hex build\*.exe /B /S
+@rem dir _build\*.hex _build\*.exe _build\*.map /B /S
+dir _build\*.hex _build\*.exe /B /S

pause
=======================================
--- /trunk/makefile Wed May 6 15:02:33 2015 UTC
+++ /trunk/makefile Mon Jun 15 14:49:11 2015 UTC
@@ -99,6 +99,7 @@
$(foreach l,$(subst /, ,$(subst $(ROOT_DIR),,$(CURDIR))),$(eval $(call
source-path-rel-dir,$l)))
SOURCE_DIR ?= $(subst $(space),/,$(TMP_SRC_DIR))
#$(warning SOURCE_DIR: $(SOURCE_DIR))
+MKFILES_DIR = $(SOURCE_DIR)/Tools/makefiles


################################################################################
# Collect information from each module in the following variables.
@@ -114,8 +115,8 @@

################################################################################
# Include the target and device specific makefile to load our variables as
above

-include $(SOURCE_DIR)/target-$(TARGET_NAME).mk
-include $(SOURCE_DIR)/device-$(DEVICE).mk
+include $(MKFILES_DIR)/target-$(TARGET_NAME).mk
+include $(MKFILES_DIR)/device-$(DEVICE).mk
modules := $(addprefix $(SOURCE_DIR)/,$(modules))
#INCPATH := $(addprefix $(SOURCE_DIR)/,$(cfgpath)) $(addprefix
$(SOURCE_DIR)/,$(incpath))

@@ -134,7 +135,7 @@
TARGET_MAP := $(TARGET_NAME).map
TARGET := $(TARGET_NAME).$(TARGET_TYPE)

-include $(SOURCE_DIR)/toolchain-$(TOOLCHAIN).mk
+include $(MKFILES_DIR)/toolchain-$(TOOLCHAIN).mk


################################################################################
# Support routines/macros
Reply all
Reply to author
Forward
0 new messages