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

Conversation

fpistm
Copy link
Member

@fpistmfpistm commentedJun 27, 2024
edited
Loading

Include:

Note

All series can used debug feature thanks STLink interface and openocd.
Except:

  • STM32H5xx: current openocd version do not support it
  • STM32MP1xx required other transport layer

image

  • One shot script to update all boards.txt entries with debug options
    importfileinputimportrefrompathlibimportPathscript_path=Path(__file__).parent.resolve()# Base pathcore_path=script_pathvariant_path=core_path/"variants"boards_entry_filename="boards_entry.txt"config_series= {"STM32MP1xx":"stm32mp15x.cfg","STM32C0xx":"stm32c0x.cfg","STM32F0xx":"stm32f0x.cfg","STM32F1xx":"stm32f1x.cfg","STM32F2xx":"stm32f2x.cfg","STM32F3xx":"stm32f3x.cfg","STM32F4xx":"stm32f4x.cfg","STM32F7xx":"stm32f7x.cfg","STM32G0xx":"stm32g0x.cfg","STM32G4xx":"stm32g4x.cfg","STM32H5xx":"stm32h5x.cfg","STM32H7xx":"stm32h7x.cfg","STM32L0xx":"stm32l0x.cfg","STM32L1xx":"stm32l1x.cfg","STM32L4xx":"stm32l4x.cfg","STM32L5xx":"stm32l5x.cfg","STM32U5xx":"stm32u5x.cfg","STM32WBxx":"stm32wbx.cfg","STM32WBAxx":"stm32wbax.cfg","STM32WLxx":"stm32wlx.cfg",}defmain():# Parse boards.txtregexmd_newline=re.compile(r"^$")board_serie=""base_line=""found_series=Falsegeneric=False# Not for generic# <menu name>.menu.pnum.<BoardName>.debug.server.openocd.scripts.2=target/<openocd serie>.cfgforlineinfileinput.input(core_path/"boards.txt",inplace=True):m=regexmd_newline.match(line)ifmandfound_series:ifnotboard_serieornotbase_line:exit(1)ifnotgeneric:# Add target lineprint(f"{base_line}debug.server.openocd.scripts.2=target/{config_series[board_serie]}",                )found_series=Falseif"build.series="inline:if".menu."inline:generic=Falseelse:generic=Trueiffound_series:exit(2)found_series=Trueboard_serie=line.partition("=")[-1].strip()base_line=line.partition("build.series")[0].strip()print(line,end="")# For all with variant path# <menu name>.menu.pnum.<BoardName>.debug.svd_file={runtime.platform.path}/svd/{build.series}/<svdfile>variant_path=Path()product_line=""found_svd=Falsefound_variant=Falsesvd_file=""forlineinfileinput.input(core_path/"boards.txt",inplace=True):m=regexmd_newline.match(line)ifmandfound_variantandproduct_line:# Add svd file# Opend boards_entry.txt and extract build.boardwithopen(core_path/"variants"/variant_path/"boards_entry.txt"            )asmyfile:forline2inmyfile:if"product_line="inline2:ifproduct_line==line2.partition("=")[-1].strip():found_svd=Trueiffound_svdand"debug.svd_file"inline2:svd_file=line2.partition("=")[-1].strip()breakifsvd_file:print(f"{base_line}debug.svd_file={svd_file}",                )svd_file=""product_line=""found_svd=Falsefound_variant=Falseif"build.variant="inline:variant_path=Path(line.partition("=")[-1].strip())found_variant=Trueif"build.product_line="inline:product_line=line.partition("=")[-1].strip()base_line=line.partition("build.product_line")[0].strip()print(line,end="")exit(0)if__name__=="__main__":main()

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
avoid multiple json files.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
This script will update the stm32_svd repository:https://github.com/stm32duino/stm32_svdSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistmfpistm merged commit1296dfa intostm32duino:mainJun 27, 2024
23 checks passed
@fpistmfpistm deleted the debug_enhancement branchJune 27, 2024 14:11
@fpistmfpistm added enhancementNew feature or request and removed New feature labelsJul 16, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
arduino compatibilityenhancementNew feature or requestfix 🩹Bug fix
Projects
Milestone
2.8.0
Development

Successfully merging this pull request may close these issues.

1 participant
@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp