From 37efcb3d4f4e67d3456c3f13116d49febed6d0e6 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Mon, 13 May 2019 21:59:32 +0800 Subject: [PATCH 1/3] add STM32F10X_Lib --- .gitmodules | 3 +++ Config.h | 6 +++--- Makefile.CMSIS | 2 +- STM32F10X_Lib | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) create mode 160000 STM32F10X_Lib diff --git a/.gitmodules b/.gitmodules index 78686ee6..6e7071ec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "STM32F7XX_Lib"] path = STM32F7XX_Lib url = https://github.com/juribeparada/STM32F7XX_Lib.git +[submodule "STM32F10X_Lib"] + path = STM32F10X_Lib + url = https://github.com/shawnchain/STM32F10X_Lib.git diff --git a/Config.h b/Config.h index c738e21c..40317abd 100644 --- a/Config.h +++ b/Config.h @@ -45,10 +45,10 @@ // #define ARDUINO_DUE_PAPA // For the ZUM V1.0 and V1.0.1 boards pin layout -#define ARDUINO_DUE_ZUM_V10 +// #define ARDUINO_DUE_ZUM_V10 // For the SQ6POG board -// #define STM32F1_POG +#define STM32F1_POG // For the SP8NTH board // #define ARDUINO_DUE_NTH @@ -64,7 +64,7 @@ // #define VK6MST_TEENSY_PI3_SHIELD_I2C // Pass RSSI information to the host -// #define SEND_RSSI_DATA +#define SEND_RSSI_DATA // Use the modem as a serial repeater for Nextion displays // #define SERIAL_REPEATER diff --git a/Makefile.CMSIS b/Makefile.CMSIS index 3573d6fe..69e7a3e8 100644 --- a/Makefile.CMSIS +++ b/Makefile.CMSIS @@ -25,7 +25,7 @@ STARTUP:=$(SYSDIR)/startup_stm32f105xc.S STARTUP_DEFS= # Include directory for CMSIS -CMSISDIR:=/opt/STM32Cube_FW_F1_V1.4.0/Drivers/CMSIS +CMSISDIR:=STM32F10X_Lib/CMSIS # Libraries LIBDIR:= diff --git a/STM32F10X_Lib b/STM32F10X_Lib new file mode 160000 index 00000000..417e0c2f --- /dev/null +++ b/STM32F10X_Lib @@ -0,0 +1 @@ +Subproject commit 417e0c2f4a4571ff836d2705d7551bd07ebbf777 From c8a345a30192bab0db13090ac80437e5cce412a3 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Tue, 14 May 2019 11:43:29 +0800 Subject: [PATCH 2/3] rollback changes on Config.h --- Config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config.h b/Config.h index 40317abd..c738e21c 100644 --- a/Config.h +++ b/Config.h @@ -45,10 +45,10 @@ // #define ARDUINO_DUE_PAPA // For the ZUM V1.0 and V1.0.1 boards pin layout -// #define ARDUINO_DUE_ZUM_V10 +#define ARDUINO_DUE_ZUM_V10 // For the SQ6POG board -#define STM32F1_POG +// #define STM32F1_POG // For the SP8NTH board // #define ARDUINO_DUE_NTH @@ -64,7 +64,7 @@ // #define VK6MST_TEENSY_PI3_SHIELD_I2C // Pass RSSI information to the host -#define SEND_RSSI_DATA +// #define SEND_RSSI_DATA // Use the modem as a serial repeater for Nextion displays // #define SERIAL_REPEATER From 2a6db2ab524c935fe7ec82aa6b5c7e63229e0f7d Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Tue, 14 May 2019 11:53:21 +0800 Subject: [PATCH 3/3] Make STM32F1_POG as default type when Makefile.CMSIS is used --- Config.h | 8 +++++--- Makefile.CMSIS | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Config.h b/Config.h index c738e21c..9d626041 100644 --- a/Config.h +++ b/Config.h @@ -44,11 +44,13 @@ // For the original Arduino Due pin layout // #define ARDUINO_DUE_PAPA +#if defined(STM32F1) +// For the SQ6POG board +#define STM32F1_POG +#else // For the ZUM V1.0 and V1.0.1 boards pin layout #define ARDUINO_DUE_ZUM_V10 - -// For the SQ6POG board -// #define STM32F1_POG +#endif // For the SP8NTH board // #define ARDUINO_DUE_NTH diff --git a/Makefile.CMSIS b/Makefile.CMSIS index 69e7a3e8..2bce2ab6 100644 --- a/Makefile.CMSIS +++ b/Makefile.CMSIS @@ -65,7 +65,7 @@ COMMON_FLAGS =-mthumb -mlittle-endian -mcpu=$(MCPU) COMMON_FLAGS+= -Wall COMMON_FLAGS+= -I. -I$(CMSISDIR)/Include -I$(CMSISDIR)/Device/ST/STM32F1xx/Include -I$(SYSDIR) COMMON_FLAGS+= $(addprefix -I,$(INCDIR)) -COMMON_FLAGS+= -D$(MCU) -DMADEBYMAKEFILE +COMMON_FLAGS+= -D$(MCU) -DMADEBYMAKEFILE -DSTM32F1 COMMON_FLAGS+= -Os -flto -ffunction-sections -fdata-sections COMMON_FLAGS+= -g # Assembler flags