summaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
authorAdrian <elagil@users.noreply.github.com>2020-10-22 12:05:01 +0200
committerGitHub <noreply@github.com>2020-10-22 21:05:01 +1100
commit120c42255baecb664ae813d58aa3010760f97795 (patch)
treebfa044740e946d05ee1d1017c7a7b65a93830d99 /common_features.mk
parentf9853433c140700ce6bfbfba7517e1e0620789d4 (diff)
downloadqmk_firmware-120c42255baecb664ae813d58aa3010760f97795.tar.gz
qmk_firmware-120c42255baecb664ae813d58aa3010760f97795.zip
Added EEPROM emulation for STM32F042x6 series processors (#10685)
* Added STM32F042x6 support for EEPROM emulation * Default to lower stack size on STM32F042 * Moved stack setting * Re-moved stack definition * Removed unnecessary check
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/common_features.mk b/common_features.mk
index ed6908f4b8..e0ae1d74c1 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -114,6 +114,17 @@ else
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
OPT_DEFS += -DSTM32_EEPROM_ENABLE
+ else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6)
+
+ # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
+ # This ensures that the EEPROM page buffer fits into RAM
+ USE_PROCESS_STACKSIZE = 0x600
+ USE_EXCEPTIONS_STACKSIZE = 0x300
+
+ SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
+ SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
+ OPT_DEFS += -DEEPROM_EMU_STM32F042x6
+ OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom