This is an automated email from Gerrit.

"Ahmed Haoues <ahmed.hao...@st.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/8618

-- gerrit

commit 8b2ac09bbdf054fd67558911eb1ab34e0c4f63a3
Author: HAOUES Ahmed <ahmed.hao...@st.com>
Date:   Tue Mar 25 14:29:30 2025 +0100

    flash/stm32l4x: support STM32C05/09x devices
    
    STM32C05/09x devices are similar to STM32C03/07x devices
    
    Change-Id: I77c803356c32f06699c14622828585609c90a136
    Signed-off-by: HAOUES Ahmed <ahmed.hao...@st.com>

diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c
index fa57db8bbf..3c84b2bb4d 100644
--- a/src/flash/nor/stm32l4x.c
+++ b/src/flash/nor/stm32l4x.c
@@ -303,10 +303,18 @@ static const struct stm32l4_rev stm32c03xx_revs[] = {
        { 0x1000, "A" }, { 0x1001, "Z" },
 };
 
+static const struct stm32l4_rev stm32c05xx_revs[] = {
+       { 0x1000, "A" },
+};
+
 static const struct stm32l4_rev stm32c071xx_revs[] = {
        { 0x1001, "Z" },
 };
 
+static const struct stm32l4_rev stm32c09xx_revs[] = {
+       { 0x1000, "A" },
+};
+
 static const struct stm32l4_rev stm32g05_g06xx_revs[] = {
        { 0x1000, "A" },
 };
@@ -450,6 +458,18 @@ static const struct stm32l4_part_info stm32l4_parts[] = {
          .otp_base              = 0x1FFF7000,
          .otp_size              = 1024,
        },
+       {
+         .id                    = DEVID_STM32C05XX,
+         .revs                  = stm32c05xx_revs,
+         .num_revs              = ARRAY_SIZE(stm32c05xx_revs),
+         .device_str            = "STM32C05xx",
+         .max_flash_size_kb     = 64,
+         .flags                 = F_NONE,
+         .flash_regs_base       = 0x40022000,
+         .fsize_addr            = 0x1FFF75A0,
+         .otp_base              = 0x1FFF7000,
+         .otp_size              = 1024,
+       },
        {
          .id                    = DEVID_STM32C071XX,
          .revs                  = stm32c071xx_revs,
@@ -461,6 +481,18 @@ static const struct stm32l4_part_info stm32l4_parts[] = {
          .fsize_addr            = 0x1FFF75A0,
          .otp_base              = 0x1FFF7000,
          .otp_size              = 1024,
+       },
+               {
+         .id                    = DEVID_STM32C09XX,
+         .revs                  = stm32c09xx_revs,
+         .num_revs              = ARRAY_SIZE(stm32c09xx_revs),
+         .device_str            = "STM32C09xx",
+         .max_flash_size_kb     = 256,
+         .flags                 = F_NONE,
+         .flash_regs_base       = 0x40022000,
+         .fsize_addr            = 0x1FFF75A0,
+         .otp_base              = 0x1FFF7000,
+         .otp_size              = 1024,
        },
        {
          .id                    = DEVID_STM32U53_U54XX,
@@ -2021,7 +2053,9 @@ static int stm32l4_probe(struct flash_bank *bank)
        case DEVID_STM32L43_L44XX:
        case DEVID_STM32C01XX:
        case DEVID_STM32C03XX:
+       case DEVID_STM32C05XX:
        case DEVID_STM32C071XX:
+       case DEVID_STM32C09XX:
        case DEVID_STM32G05_G06XX:
        case DEVID_STM32G07_G08XX:
        case DEVID_STM32U031XX:
diff --git a/src/flash/nor/stm32l4x.h b/src/flash/nor/stm32l4x.h
index 3199d4f6dc..07b3615a24 100644
--- a/src/flash/nor/stm32l4x.h
+++ b/src/flash/nor/stm32l4x.h
@@ -88,6 +88,8 @@
 #define DEVID_STM32L47_L48XX   0x415
 #define DEVID_STM32L43_L44XX   0x435
 #define DEVID_STM32C01XX               0x443
+#define DEVID_STM32C05XX        0x44C
+#define DEVID_STM32C09XX        0x44D
 #define DEVID_STM32C03XX               0x453
 #define DEVID_STM32U53_U54XX   0x455
 #define DEVID_STM32G05_G06XX   0x456

-- 

Reply via email to