From d27c50c6019d190c8bfc44d76ab5fee67b5164fa Mon Sep 17 00:00:00 2001 From: "bon@elektron.ikp.physik.tu-darmstadt.de" Date: Thu, 23 Jan 2014 15:51:13 +0100 Subject: [PATCH] Add STM32F03X and STM32F07X handling. --- src/stm32f1.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/stm32f1.c b/src/stm32f1.c index 670c5bd..d3cb234 100644 --- a/src/stm32f1.c +++ b/src/stm32f1.c @@ -58,7 +58,9 @@ static int stm32f1_flash_write(struct target_s *target, uint32_t dest, static const char stm32f1_driver_str[] = "STM32, Medium density."; static const char stm32hd_driver_str[] = "STM32, High density."; static const char stm32f3_driver_str[] = "STM32F3xx"; -static const char stm32f0_driver_str[] = "STM32F0xx"; +static const char stm32f03_driver_str[] = "STM32F03x"; +static const char stm32f05_driver_str[] = "STM32F05x"; +static const char stm32f07_driver_str[] = "STM32F07x"; static const char stm32f1_xml_memory_map[] = "" /* "idcode = adiv5_ap_mem_read(adiv5_target_ap(target), DBGMCU_IDCODE_F0) & 0xfff; switch(target->idcode) { - case 0x440: /* STM32F0 */ - target->driver = stm32f0_driver_str; + case 0x444: /* STM32F03 */ + case 0x440: /* STM32F05 */ + case 0x448: /* STM32F07 */ + switch(target->idcode) { + case 0x444: /* STM32F03 */ + target->driver = stm32f03_driver_str; + break; + case 0x440: /* STM32F05 */ + target->driver = stm32f05_driver_str; + break; + case 0x448: /* STM32F07 */ + target->driver = stm32f07_driver_str; + break; + } target->xml_mem_map = stm32f1_xml_memory_map; target->flash_erase = stm32md_flash_erase; target->flash_write = stm32f1_flash_write;