- Notifications
You must be signed in to change notification settings - Fork1k
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
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
fpistm37dc7cd
feat: set a default programmer
fpistm88dab2b
fix(debug): wrong toolchain path
fpistmeeb4237
ci(stm32variant): remove duplicate function
fpistm28ac456
refactor(ci): common configuration file for update scripts
fpistm2f2f041
ci(stm32svd): script to manage svd files from STM32CubeCLT
fpistmd0a345b
chore: update variants against CubeMX DB release 6.0.110
fpistmf94faaf
ci(stm32variant): add debug.svd_file to boards_entry.txt
fpistm03ea4e5
chore: update variants with debug.svd_file
fpistmca48d69
feat(debug): implement latest arduino-cli specifications
fpistm68fb911
fix(cmake): ignore svd_file
fpistm7bfa64c
chore(cmake): update database
fpistmFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
The table of contents is too big for display.
Diff view
Diff view
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
1 change: 0 additions & 1 deletion.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,7 +5,6 @@ boards.local.txt | ||
platform.local.txt | ||
path_config.json | ||
update_config.json | ||
# Backup | ||
*.bak | ||
28 changes: 9 additions & 19 deletionsCI/update/stm32cube.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletionsCI/update/stm32svd.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff 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() |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.