aboutsummaryrefslogtreecommitdiffstats
path: root/testex
diff options
context:
space:
mode:
Diffstat (limited to 'testex')
-rw-r--r--testex/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile122
-rw-r--r--testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/chconf.h (renamed from testex/STM32/STM32F4xx/I2C-LSM303DLHC/chconf.h)0
-rw-r--r--testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/halconf.h (renamed from testex/STM32/STM32F4xx/I2C-LSM303DLHC/halconf.h)0
-rw-r--r--testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/mcuconf.h (renamed from testex/STM32/STM32F4xx/I2C-LSM303DLHC/mcuconf.h)0
-rw-r--r--testex/STM32/STM32F4xx/I2C-LSM303DLHC/source/usbcfg.c (renamed from testex/STM32/STM32F4xx/I2C-LSM303DLHC/usbcfg.c)0
-rw-r--r--testex/STM32/STM32F4xx/I2C-LSM303DLHC/source/usbcfg.h (renamed from testex/STM32/STM32F4xx/I2C-LSM303DLHC/usbcfg.h)0
-rw-r--r--testex/STM32/STM32F4xx/SPI-L3GD20/Makefile122
-rw-r--r--testex/STM32/STM32F4xx/SPI-L3GD20/cfg/chconf.h (renamed from testex/STM32/STM32F4xx/SPI-L3GD20/chconf.h)0
-rw-r--r--testex/STM32/STM32F4xx/SPI-L3GD20/cfg/halconf.h (renamed from testex/STM32/STM32F4xx/SPI-L3GD20/halconf.h)0
-rw-r--r--testex/STM32/STM32F4xx/SPI-L3GD20/cfg/mcuconf.h (renamed from testex/STM32/STM32F4xx/SPI-L3GD20/mcuconf.h)36
-rw-r--r--testex/STM32/STM32F4xx/SPI-L3GD20/source/usbcfg.c (renamed from testex/STM32/STM32F4xx/SPI-L3GD20/usbcfg.c)0
-rw-r--r--testex/STM32/STM32F4xx/SPI-L3GD20/source/usbcfg.h (renamed from testex/STM32/STM32F4xx/SPI-L3GD20/usbcfg.h)0
12 files changed, 113 insertions, 167 deletions
diff --git a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile
index 84e7f983c..3e492d255 100644
--- a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile
+++ b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/Makefile
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# Enable this if you want link time optimizations (LTO).
ifeq ($(USE_LTO),)
USE_LTO = yes
endif
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = hard
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../../..
+# Target settings.
+MCU = cortex-m4
+
+# Imported source files and paths.
+CHIBIOS := ../../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -102,6 +108,8 @@ include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# EX files (optional).
include $(CHIBIOS)/os/ex/ST/lsm303dlhc.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
@@ -112,79 +120,29 @@ LDSCRIPT= $(STARTUPLD)/STM32F401xC.ld
# setting.
CSRC = $(ALLCSRC) \
$(TESTSRC) \
- usbcfg.c main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
+# List ASM source files here.
+ASMSRC = $(ALLASMSRC)
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC =
-ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-
-INCDIR = $(ALLINC) $(TESTINC)
-
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m4
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-AR = $(TRGT)ar
-OD = $(TRGT)objdump
-SZ = $(TRGT)size
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -192,9 +150,8 @@ CPPWARN = -Wall -Wextra -Wundef
#
# List all user C define here, like -D_DEBUG=1
-UDEFS = -DCHPRINTF_USE_FLOAT=1 \
- -DLSM303DLHC_ACC_USE_ADVANCED=0 -DLSM303DLHC_COMP_USE_ADVANCED=0 \
- -DLSM303DLHC_SHARED_I2C=0
+UDEFS = -DCHPRINTF_USE_FLOAT=1
+
# Define ASM defines here
UADEFS =
@@ -208,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
+##############################################################################
+
##############################################################################
+# Common rules
+#
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/chconf.h b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/chconf.h
index e50f15cce..e50f15cce 100644
--- a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/chconf.h
+++ b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/chconf.h
diff --git a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/halconf.h b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/halconf.h
index ec567694e..ec567694e 100644
--- a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/halconf.h
+++ b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/halconf.h
diff --git a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/mcuconf.h b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/mcuconf.h
index 02f1bca9d..02f1bca9d 100644
--- a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/mcuconf.h
+++ b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/cfg/mcuconf.h
diff --git a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/usbcfg.c b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/source/usbcfg.c
index f3e69c237..f3e69c237 100644
--- a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/usbcfg.c
+++ b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/source/usbcfg.c
diff --git a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/usbcfg.h b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/source/usbcfg.h
index 886cd0222..886cd0222 100644
--- a/testex/STM32/STM32F4xx/I2C-LSM303DLHC/usbcfg.h
+++ b/testex/STM32/STM32F4xx/I2C-LSM303DLHC/source/usbcfg.h
diff --git a/testex/STM32/STM32F4xx/SPI-L3GD20/Makefile b/testex/STM32/STM32F4xx/SPI-L3GD20/Makefile
index 3bbae44af..3670dbaeb 100644
--- a/testex/STM32/STM32F4xx/SPI-L3GD20/Makefile
+++ b/testex/STM32/STM32F4xx/SPI-L3GD20/Makefile
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# Enable this if you want link time optimizations (LTO).
ifeq ($(USE_LTO),)
USE_LTO = yes
endif
-# If enabled, this option allows to compile the application in THUMB mode.
-ifeq ($(USE_THUMB),)
- USE_THUMB = yes
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = hard
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../../..
+# Target settings.
+MCU = cortex-m4
+
+# Imported source files and paths.
+CHIBIOS := ../../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -102,6 +108,8 @@ include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# EX files (optional).
include $(CHIBIOS)/os/ex/ST/l3gd20.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
@@ -112,83 +120,29 @@ LDSCRIPT= $(STARTUPLD)/STM32F401xC.ld
# setting.
CSRC = $(ALLCSRC) \
$(TESTSRC) \
- usbcfg.c main.c
+ main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
-ASMSRC =
-ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-
-#
-# Project, sources and paths
-##############################################################################
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m4
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-CP = $(TRGT)objcopy
-AS = $(TRGT)gcc -x assembler-with-cpp
-AR = $(TRGT)ar
-OD = $(TRGT)objdump
-SZ = $(TRGT)size
-HEX = $(CP) -O ihex
-BIN = $(CP) -O binary
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -196,8 +150,7 @@ CPPWARN = -Wall -Wextra -Wundef
#
# List all user C define here, like -D_DEBUG=1
-UDEFS = -DCHPRINTF_USE_FLOAT=1 \
- -DL3GD20_GYRO_USE_ADVANCED=0 -DL3GD20_SHARED_SPI=0
+UDEFS = -DCHPRINTF_USE_FLOAT=1
# Define ASM defines here
UADEFS =
@@ -212,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
##############################################################################
+##############################################################################
+# Common rules
+#
+
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/testex/STM32/STM32F4xx/SPI-L3GD20/chconf.h b/testex/STM32/STM32F4xx/SPI-L3GD20/cfg/chconf.h
index e50f15cce..e50f15cce 100644
--- a/testex/STM32/STM32F4xx/SPI-L3GD20/chconf.h
+++ b/testex/STM32/STM32F4xx/SPI-L3GD20/cfg/chconf.h
diff --git a/testex/STM32/STM32F4xx/SPI-L3GD20/halconf.h b/testex/STM32/STM32F4xx/SPI-L3GD20/cfg/halconf.h
index c3d125ac0..c3d125ac0 100644
--- a/testex/STM32/STM32F4xx/SPI-L3GD20/halconf.h
+++ b/testex/STM32/STM32F4xx/SPI-L3GD20/cfg/halconf.h
diff --git a/testex/STM32/STM32F4xx/SPI-L3GD20/mcuconf.h b/testex/STM32/STM32F4xx/SPI-L3GD20/cfg/mcuconf.h
index c12d434fe..4651107c0 100644
--- a/testex/STM32/STM32F4xx/SPI-L3GD20/mcuconf.h
+++ b/testex/STM32/STM32F4xx/SPI-L3GD20/cfg/mcuconf.h
@@ -65,9 +65,27 @@
#define STM32_BKPRAM_ENABLE FALSE
/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 6
+#define STM32_IRQ_EXTI20_PRIORITY 6
+#define STM32_IRQ_EXTI21_PRIORITY 15
+#define STM32_IRQ_EXTI22_PRIORITY 15
+
+/*
* ADC driver system settings.
*/
-#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
+#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
#define STM32_ADC_USE_ADC1 FALSE
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
#define STM32_ADC_ADC1_DMA_PRIORITY 2
@@ -75,22 +93,6 @@
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI22_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
diff --git a/testex/STM32/STM32F4xx/SPI-L3GD20/usbcfg.c b/testex/STM32/STM32F4xx/SPI-L3GD20/source/usbcfg.c
index f3e69c237..f3e69c237 100644
--- a/testex/STM32/STM32F4xx/SPI-L3GD20/usbcfg.c
+++ b/testex/STM32/STM32F4xx/SPI-L3GD20/source/usbcfg.c
diff --git a/testex/STM32/STM32F4xx/SPI-L3GD20/usbcfg.h b/testex/STM32/STM32F4xx/SPI-L3GD20/source/usbcfg.h
index 886cd0222..886cd0222 100644
--- a/testex/STM32/STM32F4xx/SPI-L3GD20/usbcfg.h
+++ b/testex/STM32/STM32F4xx/SPI-L3GD20/source/usbcfg.h