From e43017d0a62e941e75bb47856d7bd3ac54907813 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Wed, 8 Feb 2017 13:57:17 +0100 Subject: [PATCH] src/target/stm32f4.c: Add STM32F412 and F413. F413 needs its own clause, as there is memory > 1 MB but no second bank. --- src/target/stm32f4.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/target/stm32f4.c b/src/target/stm32f4.c index 1dcb5c9..e9a3c84 100644 --- a/src/target/stm32f4.c +++ b/src/target/stm32f4.c @@ -170,15 +170,24 @@ bool stm32f4_probe(target *t) case 0x421: /* F446 */ case 0x423: /* F401 B/C RM0368 Rev.3 */ case 0x431: /* F411 RM0383 Rev.4 */ + case 0x441: /* F412 RM0402 Rev.4, 256 kB Ram */ case 0x433: /* F401 D/E RM0368 Rev.3 */ t->driver = f2 ? stm32f2_driver_str : stm32f4_driver_str; - target_add_ram(t, 0x20000000, 0x30000); + target_add_ram(t, 0x20000000, 0x40000); stm32f4_add_flash(t, 0x8000000, 0x10000, 0x4000, 0); stm32f4_add_flash(t, 0x8010000, 0x10000, 0x10000, 4); stm32f4_add_flash(t, 0x8020000, 0xE0000, 0x20000, 5); target_add_commands(t, stm32f4_cmd_list, f2 ? "STM32F2" : "STM32F4"); break; + case 0x463: /* F413 RM0430 Rev.2, 320 kB Ram, 1.5 MB flash. */ + t->driver = stm32f4_driver_str; + target_add_ram(t, 0x20000000, 0x50000); + stm32f4_add_flash(t, 0x8000000, 0x10000, 0x4000, 0); + stm32f4_add_flash(t, 0x8010000, 0x10000, 0x10000, 4); + stm32f4_add_flash(t, 0x8020000, 0x160000, 0x20000, 5); + target_add_commands(t, stm32f4_cmd_list, "STM32F413"); + break; case 0x449: /* F7x6 RM0385 Rev.2 */ t->driver = stm32f7_driver_str; target_add_ram(t, 0x00000000, 0x4000);