Skip to content

Commit 5c87586

Browse files
authored
Merge pull request #1976 from gautierg-st/add_debug_openocd
Add debug openocd
2 parents ce7b53e + 2072d87 commit 5c87586

File tree

20 files changed

+313
-1
lines changed

20 files changed

+313
-1
lines changed

CI/update/stm32variant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ def aggregate_dir():
20632063
# Get all mcu_dir
20642064
mcu_dirs = sorted(mcu_family.glob("*/"))
20652065
# Get original directory list of current serie STM32YYxx
2066-
mcu_out_dirs_ori = sorted(out_family_path.glob("*/"))
2066+
mcu_out_dirs_ori = sorted(out_family_path.glob("*/**"))
20672067
mcu_out_dirs_up = []
20682068
# Group mcu directories when only expressions and xml file name are different
20692069
while mcu_dirs:

platform.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ extras.path={build.system.path}/extras
119119
# Create {build.opt} if not exists in the output sketch dir and force include of SrcWrapper library
120120
recipe.hooks.prebuild.1.pattern="{extras.path}/prebuild.sh" "{build.path}" "{build.source.path}" "{runtime.platform.path}"
121121
recipe.hooks.prebuild.1.pattern.windows="{runtime.tools.STM32Tools.path}/win/busybox.exe" sh "{extras.path}/prebuild.sh" "{build.path}" "{build.source.path}" "{runtime.platform.path}"
122+
recipe.hooks.postbuild.1.pattern="{extras.path}/postbuild.sh" "{build.path}" "{build.series}" "{runtime.platform.path}"
123+
recipe.hooks.postbuild.1.pattern.windows="{runtime.tools.STM32Tools.path}/win/busybox.exe" sh "{extras.path}/postbuild.sh" "{build.path}" "{build.series}" "{runtime.platform.path}"
122124

123125
# compile patterns
124126
# ---------------------
@@ -215,3 +217,16 @@ tools.remoteproc_gen.script=run_arduino_gen.sh
215217
tools.remoteproc_gen.upload.params.verbose=
216218
tools.remoteproc_gen.upload.params.quiet=
217219
tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino_{build.project_name}.sh"
220+
221+
# Debugger configuration (general options)
222+
# ----------------------------------------
223+
# EXPERIMENTAL feature:
224+
# - this is alpha and may be subject to change without notice
225+
debug.executable={build.path}/{build.project_name}.elf
226+
debug.toolchain=gcc
227+
debug.toolchain.path={compiler.path}
228+
debug.toolchain.prefix=arm-none-eabi-
229+
debug.server=openocd
230+
debug.server.openocd.path={runtime.tools.xpack-openocd-0.12.0-1.path}/bin/openocd
231+
debug.server.openocd.scripts_dir={runtime.tools.xpack-openocd-0.12.0-1.path}/openocd/scripts
232+
debug.server.openocd.script={build.path}/openocd.cfg

system/extras/postbuild.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
BUILD_PATH="$1"
4+
BUILD_SERIE="$2"
5+
BOARD_PLATFORM_PATH="$3"
6+
7+
# Copy the correct openocd.cfg
8+
cp -f "$BOARD_PLATFORM_PATH/variants/$BUILD_SERIE/openocd.cfg" "$BUILD_PATH"

variants/STM32F0xx/openocd.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2023, STMicroelectronics
3+
# All rights reserved.
4+
#
5+
# This software component is licensed by ST under BSD 3-Clause license,
6+
# the "License"; You may not use this file except in compliance with the
7+
# License. You may obtain a copy of the License at:
8+
# opensource.org/licenses/BSD-3-Clause
9+
#
10+
11+
source [find interface/stlink.cfg]
12+
13+
transport select hla_swd
14+
15+
source [find target/stm32f0x.cfg]
16+
17+
reset_config srst_only

variants/STM32F1xx/openocd.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2023, STMicroelectronics
3+
# All rights reserved.
4+
#
5+
# This software component is licensed by ST under BSD 3-Clause license,
6+
# the "License"; You may not use this file except in compliance with the
7+
# License. You may obtain a copy of the License at:
8+
# opensource.org/licenses/BSD-3-Clause
9+
#
10+
11+
source [find interface/stlink.cfg]
12+
13+
transport select hla_swd
14+
15+
source [find target/stm32f1x.cfg]
16+
17+
reset_config srst_only

variants/STM32F2xx/openocd.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2023, STMicroelectronics
3+
# All rights reserved.
4+
#
5+
# This software component is licensed by ST under BSD 3-Clause license,
6+
# the "License"; You may not use this file except in compliance with the
7+
# License. You may obtain a copy of the License at:
8+
# opensource.org/licenses/BSD-3-Clause
9+
#
10+
11+
source [find interface/stlink.cfg]
12+
13+
transport select hla_swd
14+
15+
source [find target/stm32f2x.cfg]
16+
17+
reset_config srst_only

variants/STM32F3xx/openocd.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2023, STMicroelectronics
3+
# All rights reserved.
4+
#
5+
# This software component is licensed by ST under BSD 3-Clause license,
6+
# the "License"; You may not use this file except in compliance with the
7+
# License. You may obtain a copy of the License at:
8+
# opensource.org/licenses/BSD-3-Clause
9+
#
10+
11+
source [find interface/stlink.cfg]
12+
13+
transport select hla_swd
14+
15+
source [find target/stm32f3x.cfg]
16+
17+
reset_config srst_only

variants/STM32F4xx/openocd.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2023, STMicroelectronics
3+
# All rights reserved.
4+
#
5+
# This software component is licensed by ST under BSD 3-Clause license,
6+
# the "License"; You may not use this file except in compliance with the
7+
# License. You may obtain a copy of the License at:
8+
# opensource.org/licenses/BSD-3-Clause
9+
#
10+
11+
source [find interface/stlink.cfg]
12+
13+
transport select hla_swd
14+
15+
source [find target/stm32f4x.cfg]
16+
17+
reset_config srst_only

variants/STM32F7xx/openocd.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2023, STMicroelectronics
3+
# All rights reserved.
4+
#
5+
# This software component is licensed by ST under BSD 3-Clause license,
6+
# the "License"; You may not use this file except in compliance with the
7+
# License. You may obtain a copy of the License at:
8+
# opensource.org/licenses/BSD-3-Clause
9+
#
10+
11+
source [find interface/stlink.cfg]
12+
13+
transport select hla_swd
14+
15+
source [find target/stm32f7x.cfg]
16+
17+
reset_config srst_only

variants/STM32G0xx/openocd.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2023, STMicroelectronics
3+
# All rights reserved.
4+
#
5+
# This software component is licensed by ST under BSD 3-Clause license,
6+
# the "License"; You may not use this file except in compliance with the
7+
# License. You may obtain a copy of the License at:
8+
# opensource.org/licenses/BSD-3-Clause
9+
#
10+
11+
source [find interface/stlink.cfg]
12+
13+
transport select hla_swd
14+
15+
source [find target/stm32g0x.cfg]
16+
17+
reset_config srst_only

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy