diff options
Diffstat (limited to 'tmk_core')
-rw-r--r-- | tmk_core/common.mk | 5 | ||||
-rwxr-xr-x | tmk_core/common/chibios/eeprom_stm32.h | 6 | ||||
-rwxr-xr-x | tmk_core/common/chibios/flash_stm32.c | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 063115acb1..94f3c2380d 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -41,6 +41,11 @@ ifeq ($(PLATFORM),CHIBIOS) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F103xB TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE + else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F072xB + TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE else TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c endif diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 892e417b7e..083eb16ee6 100755 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h @@ -34,6 +34,8 @@ #define MCU_STM32F303CC #elif defined(EEPROM_EMU_STM32F103xB) #define MCU_STM32F103RB +#elif defined(EEPROM_EMU_STM32F072xB) + #define MCU_STM32F072CB #else #error "not implemented." #endif @@ -42,7 +44,7 @@ #if defined (MCU_STM32F103RB) #define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte #define FEE_DENSITY_PAGES 2 // How many pages are used - #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) + #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) || defined(MCU_STM32F072CB) #define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte #define FEE_DENSITY_PAGES 4 // How many pages are used #else @@ -51,7 +53,7 @@ #endif #ifndef EEPROM_START_ADDRESS - #if defined (MCU_STM32F103RB) + #if defined (MCU_STM32F103RB) || defined(MCU_STM32F072CB) #define FEE_MCU_FLASH_SIZE 128 // Size in Kb #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) #define FEE_MCU_FLASH_SIZE 512 // Size in Kb diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index 164654a15e..832bf3908f 100755 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c @@ -22,6 +22,9 @@ #elif defined(EEPROM_EMU_STM32F103xB) #define STM32F103xB #include "stm32f1xx.h" +#elif defined(EEPROM_EMU_STM32F072xB) + #define STM32F072xB + #include "stm32f0xx.h" #else #error "not implemented." #endif @@ -193,7 +196,7 @@ void FLASH_Lock(void) * This parameter can be any combination of the following values: * @arg FLASH_FLAG_PGERR: FLASH Programming error flag flag * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag - * @arg FLASH_FLAG_EOP: FLASH End of Programming flag + * @arg FLASH_FLAG_EOP: FLASH End of Programming flag * @retval None */ void FLASH_ClearFlag(uint32_t FLASH_FLAG) |