Skip to content

Commit a7a86e9

Browse files
committed
Move flashcode to shared gd32_fmc layer
Refactors flash read/erase/write logic out of lib-flashcode into a new shared `gd32::fmc` API in `lib-gd32` (`gd32_fmc.h` plus F/F4 implementations), and updates `FlashCode` to delegate to that API. Removes old family-specific flashcode/FMC files, adds FMC debug macros, and adjusts GD32 makefiles/rules to pull sources/includes from the new structure. Also adds GD32F10X softuart0 timer/IRQ mapping support.
1 parent 05d98a2 commit a7a86e9

14 files changed

Lines changed: 515 additions & 842 deletions

File tree

lib-flashcode/Makefile.GD32

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
DEFINES =NDEBUG
22

3-
ifneq ($(MAKE_FLAGS),)
4-
ifeq ($(findstring gd32f4xx,$(FAMILY)), gd32f4xx)
5-
EXTRA_SRCDIR=src/gd32/f4xx
6-
else
7-
ifeq ($(findstring gd32h7xx,$(FAMILY)), gd32h7xx)
8-
EXTRA_SRCDIR=src/gd32/h7xx
9-
else
10-
EXTRA_SRCDIR=src/gd32/fmc
11-
endif
12-
endif
13-
else
14-
EXTRA_SRCDIR=src/gd32/fmc
15-
endif
3+
EXTRA_INCLUDES=../lib-gd32/include ../lib-gd32/src
4+
5+
EXTRA_SRCDIR=src/spi/gd32
166

177
include Rules.mk
188
include ../firmware-template-gd32/lib/Rules.mk

lib-flashcode/src/gd32/f4xx/flashcode.cpp

Lines changed: 0 additions & 157 deletions
This file was deleted.

lib-flashcode/src/gd32/f4xx/fmc_operation.cpp

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)