Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(debug): implement latest arduino-cli specifications#2409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 12 commits intostm32duino:mainfromfpistm:debug_enhancement
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
12 commits
Select commitHold shift + click to select a range
641cdf8
chore: update to xpack-openocd v0.12.0-3
fpistmJun 21, 2024
37dc7cd
feat: set a default programmer
fpistmFeb 9, 2024
88dab2b
fix(debug): wrong toolchain path
fpistmJun 24, 2024
eeb4237
ci(stm32variant): remove duplicate function
fpistmJun 25, 2024
28ac456
refactor(ci): common configuration file for update scripts
fpistmJun 25, 2024
2f2f041
ci(stm32svd): script to manage svd files from STM32CubeCLT
fpistmJun 25, 2024
d0a345b
chore: update variants against CubeMX DB release 6.0.110
fpistmJun 26, 2024
f94faaf
ci(stm32variant): add debug.svd_file to boards_entry.txt
fpistmJun 26, 2024
03ea4e5
chore: update variants with debug.svd_file
fpistmJun 27, 2024
ca48d69
feat(debug): implement latest arduino-cli specifications
fpistmJun 25, 2024
68fb911
fix(cmake): ignore svd_file
fpistmJun 27, 2024
7bfa64c
chore(cmake): update database
fpistmJun 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,6 @@ boards.local.txt
platform.local.txt
path_config.json
update_config.json
variant_config.json

# Backup
*.bak
Expand Down
28 changes: 9 additions & 19 deletionsCI/update/stm32cube.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,15 +15,14 @@
script_path = Path(__file__).parent.resolve()
sys.path.append(str(script_path.parent))
from utils import copyFile, copyFolder, createFolder, deleteFolder, genSTM32List
from utils import execute_cmd, getRepoBranchName
from utils importdefaultConfig,execute_cmd, getRepoBranchName

if sys.platform.startswith("win32"):
from colorama import init

init(autoreset=True)

home = Path.home()
path_config_filename = "update_config.json"

# GitHub
gh_st = "https://github.com/STMicroelectronics/"
Expand DownExpand Up@@ -85,19 +84,6 @@
out_separator = "-" * 70


def create_config(config_file_path):
global repo_local_path

# Create a Json file for a better path management
print(f"'{config_file_path}' file created. Please check the configuration.")
path_config_file = open(config_file_path, "w")
path_config_file.write(
json.dumps({"REPO_LOCAL_PATH": str(repo_local_path)}, indent=2)
)
path_config_file.close()
exit(1)


def checkConfig():
global repo_local_path
global hal_dest_path
Expand All@@ -107,14 +93,18 @@ def checkConfig():
global md_CMSIS_path
global stm32_def

config_file_path = script_path /path_config_filename
config_file_path = script_path /"update_config.json"
if config_file_path.is_file():
try:
config_file = open(config_file_path, "r")
path_config = json.load(config_file)
# Common path
repo_local_path = Path(path_config["REPO_LOCAL_PATH"])
config_file.close()
# Common path
if "REPO_LOCAL_PATH" not in path_config:
path_config["REPO_LOCAL_PATH"] = str(repo_local_path)
defaultConfig(config_file_path, path_config)
else:
repo_local_path = Path(path_config["REPO_LOCAL_PATH"])
hal_dest_path = repo_local_path / repo_core_name / hal_dest_path
md_HAL_path = hal_dest_path / md_HAL_path
cmsis_dest_path = repo_local_path / repo_core_name / cmsis_dest_path
Expand All@@ -130,7 +120,7 @@ def checkConfig():
except IOError:
print(f"Failed to open {config_file}!")
else:
create_config(config_file_path)
defaultConfig(config_file_path, {"REPO_LOCAL_PATH": str(repo_local_path)})
createFolder(repo_local_path)


Expand Down
97 changes: 97 additions & 0 deletionsCI/update/stm32svd.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
import json
import sys
from pathlib import Path

script_path = Path(__file__).parent.resolve()
sys.path.append(str(script_path.parent))
from utils import copyFile, copyFolder, createFolder, deleteFolder
from utils import defaultConfig, genSTM32List

stm32_list = [] # series
root_path = script_path.parent.parent.resolve()
hal_path = root_path / "system" / "Drivers"
cubeclt_path = Path("")
cubeclt_svd_path = Path("")
stm32_svd_repo = Path("")
stm32_svd_dir = Path("")


def checkConfig():
global cubeclt_path
global cubeclt_svd_path
global stm32_svd_repo
global stm32_svd_dir
config_file_path = script_path / "update_config.json"
if config_file_path.is_file():
try:
config_file = open(config_file_path, "r")
path_config = json.load(config_file)
config_file.close()

if "STM32CUBECLT_PATH" not in path_config:
path_config["STM32CUBECLT_PATH"] = str(
"Path to STM32CubeCLT installation directory"
)
defaultConfig(config_file_path, path_config)
else:
cubeclt_path = Path(path_config["STM32CUBECLT_PATH"])
if not cubeclt_path.is_dir():
print(f"{cubeclt_path} does not exist!")
exit(1)
else:
cubeclt_svd_path = cubeclt_path / "STMicroelectronics_CMSIS_SVD"
if not cubeclt_svd_path.is_dir():
print(f"{cubeclt_svd_path} does not exist!")
exit(1)
if "STM32_SVD_PATH" not in path_config:
path_config["STM32_SVD_PATH"] = str("Path to stm32_svd repository")
defaultConfig(config_file_path, path_config)
else:
stm32_svd_repo = Path(path_config["STM32_SVD_PATH"])
if not stm32_svd_repo.is_dir():
print(f"{stm32_svd_repo} does not exist!")
exit(1)
else:
stm32_svd_dir = stm32_svd_repo / "svd"
except IOError:
print(f"Failed to open {config_file}!")
else:
defaultConfig(
config_file_path,
{"STM32CUBECLT_PATH": "Path to STM32CubeCLT installation directory"},
)


def main():
global stm32_list
# check config have to be done first
checkConfig()
stm32_list = genSTM32List(hal_path, None)
# Reverse order to get WBA before WB to ease svd sorting
stm32_list.sort(reverse=True)
# Clean up core svd folder
deleteFolder(stm32_svd_dir)
createFolder(stm32_svd_dir)
# Update the Core folder
copyFolder(cubeclt_svd_path / "Core", stm32_svd_dir / "Core")
# Update the license
copyFile(cubeclt_svd_path / "about.html", stm32_svd_dir)
# Copy the version
copyFile(cubeclt_path / ".version", stm32_svd_dir / "STM32CubeCLT.version")
# Create all directories
for serie in stm32_list:
createFolder(stm32_svd_dir / f"STM32{serie}xx")
# Get all xml files
svd_list = sorted(cubeclt_svd_path.glob("STM32*.svd"))

# Copy all svd files per series
for svd_file in svd_list:
svd_name = svd_file.name
for serie in stm32_list:
if svd_name.find(f"STM32{serie}") != -1:
copyFile(svd_file, stm32_svd_dir / f"STM32{serie}xx")
break


if __name__ == "__main__":
main()
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp