Skip to content

Commit

Permalink
STM32 EEPROM Emulation (#3741)
Browse files Browse the repository at this point in the history
* STM32 EEPROM Emulation

- Added EEPROM emulation libaries from libmaple and Arduino_STM32. https://github.com/rogerclarkmelbourne/Arduino_STM32 and https://github.com/leaflabs/libmaple.
- Renamed teensy EEPROM library and added conditional selection of library.
- Remapped EEPROM memory map for 16 byte blocks (as is with STM32f3xx MCUs).
- Added EEPROM initialization in main.c of Chibios.
- Added EEPROM format to clear the emulated pages when EEPROM is marked as invalid.

* Fixed ifdef
  • Loading branch information
yiancar authored and jackhumbert committed Aug 29, 2018
1 parent 30680c6 commit 621ce29
Show file tree
Hide file tree
Showing 9 changed files with 1,035 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tmk_core/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ endif

ifeq ($(PLATFORM),CHIBIOS)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
ifeq ($(MCU_SERIES), STM32F3xx)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
else
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
endif
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c
endif
Expand Down
Loading

0 comments on commit 621ce29

Please sign in to comment.