This is an automated email from Gerrit. Icenowy Zheng ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/5246
-- gerrit commit 3d7534da147dbd61c5b9d04e90e173f520ee6f12 Author: Icenowy Zheng <[email protected]> Date: Sat Jun 22 22:52:06 2019 +0800 flash/nor/stm32f1x: add basic GD32E23x support GigaDevice GD32E23x is a series of Cortex-M23 MCUs, which follows similar flash interface w/ STM32F1x. As they contain Cortex-M23 core, it's easy to distinguish them w/ other STM32 MCUs. Add support for flashing GD32E23x series MCUs in stm32f1x driver. Change-Id: Ia615ebde0ddca2d8063461f28cb5fdc03dfed05f Signed-off-by: Icenowy Zheng <[email protected]> diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c index cf10e37..740b94c 100644 --- a/src/flash/nor/stm32f1x.c +++ b/src/flash/nor/stm32f1x.c @@ -659,6 +659,9 @@ static int stm32x_get_device_id(struct flash_bank *bank, uint32_t *device_id) } else if (((cpuid >> 4) & 0xFFF) == 0xC24) { /* 0xC24 is M4 devices */ device_id_register = 0xE0042000; + } else if (((cpuid >> 4) & 0xFFF) == 0xD20) { + /* 0xD20 is M23 devices, which is the GD32E23x line */ + device_id_register = 0x40015800; } else { LOG_ERROR("Cannot identify target as a stm32x"); return ERROR_FAIL; @@ -690,6 +693,9 @@ static int stm32x_get_flash_size(struct flash_bank *bank, uint16_t *flash_size_i } else if (((cpuid >> 4) & 0xFFF) == 0xC24) { /* 0xC24 is M4 devices */ flash_size_reg = 0x1FFFF7CC; + } else if (((cpuid >> 4) & 0xFFF) == 0xD20) { + /* 0xD20 is M23 devices, which is the GD32E23x line */ + flash_size_reg = 0x1FFFF7E0; } else { LOG_ERROR("Cannot identify target as a stm32x"); return ERROR_FAIL; -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
