diff --git a/boards/gd32h757z_start.json b/boards/gd32h757z_start.json index 7cc4646..43249fe 100644 --- a/boards/gd32h757z_start.json +++ b/boards/gd32h757z_start.json @@ -10,7 +10,7 @@ }, "debug": { "jlink_device": "GD32H737ZM", - "openocd_target": "stm32f1x", + "openocd_target": "gd32h7xx", "svd_path": "GD32H7XX.svd", "default_tools": [ "cmsis-dap" @@ -29,7 +29,7 @@ "maximum_ram_size": 327680, "maximum_size": 3932160, "ram_start": "0x24000000", - "protocol": "gdlinkcli", + "protocol": "cmsis-dap", "protocols": [ "jlink", "cmsis-dap", diff --git a/boards/genericGD32A503RD.json b/boards/genericGD32A503RD.json index 3c609aa..44bbfde 100644 --- a/boards/genericGD32A503RD.json +++ b/boards/genericGD32A503RD.json @@ -13,7 +13,7 @@ }, "debug": { "jlink_device": "GD32A503RD", - "openocd_target": "stm32f1x", + "openocd_target": "gd32a50x", "svd_path": "GD32A50X.svd", "default_tools": [ "stlink" diff --git a/examples/gd32-spl-blinky/platformio.ini b/examples/gd32-spl-blinky/platformio.ini index c6a4d71..e3147d4 100644 --- a/examples/gd32-spl-blinky/platformio.ini +++ b/examples/gd32-spl-blinky/platformio.ini @@ -235,8 +235,3 @@ framework = spl board = gd32h757z_start ; board_build.cm7_hardfloat = yes framework = spl -build_type = debug -debug_load_cmds = preload -debug_tool = custom -debug_port = :3333 -debug_init_break = b Reset_Handler diff --git a/examples/zephyr-blink/platformio.ini b/examples/zephyr-blink/platformio.ini index 6973ac3..b2bf00b 100644 --- a/examples/zephyr-blink/platformio.ini +++ b/examples/zephyr-blink/platformio.ini @@ -11,6 +11,5 @@ platform = gd32 framework = zephyr board = genericGD32A503RD -upload_protocol = gdlinkcli +upload_protocol = cmsis-dap debug_tool = cmsis-dap -debug_load_cmds = preload diff --git a/platform.py b/platform.py index 0ed4163..5ebee83 100644 --- a/platform.py +++ b/platform.py @@ -25,7 +25,7 @@ class Gd32Platform(PlatformBase): # provides fixes for GD32E50x. Mac packages are still t.b.d. openocd_gd32 = { - "windows_amd64": "https://github.com/CommunityGD32Cores/tool-openocd-gd32.git#windows_x64", + "windows_amd64": "https://github.com/CommunityGD32Cores/tool-openocd-gd32.git#windows_x64_gigadevice", "linux_x86_64": "https://github.com/CommunityGD32Cores/tool-openocd-gd32.git#linux_x64", } @@ -164,12 +164,11 @@ def _add_default_debug_tools(self, board): server_args.extend([ "-f", "target/%s.cfg" % debug.get("openocd_target") ]) - if str(debug.get("rtos", "no")) in ("true", "yes", "1"): - server_args.extend([ - "-c", "$_TARGETNAME configure -rtos auto" - ]) + # Always try and detect any RTOS + server_args.extend([ + "-c", "$_TARGETNAME configure -rtos auto" + ]) server_args.extend(debug.get("openocd_extra_args", [])) - debug["tools"][link] = { "server": { "package": "tool-openocd-gd32",