Skip to content

Commit

Permalink
Add GD32F103CB
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelLeeImg committed Apr 22, 2021
1 parent 1ff589c commit a4aec36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/stlink-lib/chipid.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,16 @@ static const struct stlink_chipid_params devices[] = {
.option_size = 44,
.flags = CHIP_F_HAS_SWO_TRACING,
},
{
.chip_id = STLINK_CHIPID_GD32_GD32F103CB,
.description = "GD32F103CB",
.flash_type = STLINK_FLASH_TYPE_F0,
.flash_size_reg = 0x1ffff7e0,
.flash_pagesize = 0x400,
.sram_size = 0x5000,
.bootrom_base = 0x1ffff000,
.bootrom_size = 0x800
},

{
// unknown
Expand Down
2 changes: 2 additions & 0 deletions src/stlink-lib/chipid.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ extern "C" {
enum stlink_stm32_chipids {
STLINK_CHIPID_UNKNOWN = 0x000,

STLINK_CHIPID_GD32_GD32F103CB = 0x5fa0004,

This comment has been minimized.

Copy link
@Nightwalker-87

Nightwalker-87 May 2, 2021

@RafaelLeeImg Can you provide a PR for this topic? I consider this to be useful to the project (stlink-org#724).

This comment has been minimized.

Copy link
@RafaelLeeImg

RafaelLeeImg May 4, 2021

Author Owner

I try to write this because I believe that original stlink cannot flash GD32 directly. But later I found that original stlink can flash GD32, that makes this commit useless.

This comment has been minimized.

Copy link
@Nightwalker-87

Nightwalker-87 May 5, 2021

Hm, I am not right sure if there is general and intended support for GD32 regardless of the exact MCU model. Because of this I'd like to ask you to contribute a reference to this and your findings to the above ticket which would help to lead the discussion there to a solution.

STLINK_CHIPID_STM32_F1_MEDIUM = 0x410,
STLINK_CHIPID_STM32_F2 = 0x411,
STLINK_CHIPID_STM32_F1_LOW = 0x412,
Expand Down

0 comments on commit a4aec36

Please sign in to comment.