Skip to content

trunner: add armv8m55-stm32n6-nucleo target#441

Open
wmlynik wants to merge 1 commit intomasterfrom
wmlynik/add_stm32n6
Open

trunner: add armv8m55-stm32n6-nucleo target#441
wmlynik wants to merge 1 commit intomasterfrom
wmlynik/add_stm32n6

Conversation

@wmlynik
Copy link

@wmlynik wmlynik commented Dec 31, 2025

JIRA: CI-598

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

@gemini-code-assist
Copy link

Summary of Changes

Hello @wmlynik, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates the armv8m55-stm32n6-nucleo target into the trunner test framework. It establishes the necessary infrastructure for flashing, debugging, and running tests on this new hardware platform by introducing a dedicated target definition, configuring test exclusions and timeouts, and incorporating specialized tools for interaction with STM32 microcontrollers. This expansion broadens the range of supported embedded systems for automated testing.

Highlights

  • New Target Support: Introduces the armv8m55-stm32n6-nucleo target, expanding the trunner framework's hardware compatibility.
  • Target-Specific Test Infrastructure: Adds a new Python module (trunner/target/armv8m55.py) defining custom reboot, flashing, and application loading mechanisms tailored for the STM32N6 Nucleo board.
  • Test Configuration Updates: Modifies various test.yaml files across coremark_pro, libc, mem, psh, and waitpid to correctly include or exclude the new target from specific test suites and define its timeouts.
  • Integration of Flashing and Debugging Tools: Incorporates STM32ProgrammerCLIProcess for flashing and STLinkGdbServer for debugging, enhancing the trunner's toolset for STM32 devices.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the armv8m55-stm32n6-nucleo target. The changes include updates to test configurations to exclude this target from certain tests, adding timeout configurations, and implementing the target-specific logic in new Python files.

The core implementation for the new target is in trunner/target/armv8m55.py and trunner/tools/gdb.py. My review focuses on these files and I've found several issues:

  • The implementation includes interactive prompts (input()) which are not suitable for CI/automation.
  • There are potential AttributeErrors due to unchecked None values when searching for tool paths.
  • There's a bug where the serial port might not be opened if flashing is skipped.
  • Some code is duplicated or redundant.
  • There are some misleading comments and docstrings that seem to be from a copy-paste.

I've provided specific comments with suggestions to address these points. Addressing these will improve the robustness and usability of the new target support, especially in automated environments.

Comment on lines +149 to +171
print("Set BOOT1 jumper to 1 and power cycle the board")
input("Press Enter to continue...")
extra_args = [
"-hardRst",
"-w",
self.image_file,
f"{self.image_addr}",
]

STM32ProgrammerCLIProcess(
port="SWD",
mode="HOTPLUG",
extra_args=extra_args,
host_log=host_log,
cwd=Path(self.boot_dir()),
).run()

except FileNotFoundError as e:
raise FlashError(msg=str(e)) from e
except STM32ProgrammerCLIError as e:
raise FlashError(msg=str(e)) from e
print("Set BOOT1 jumper to 0 WITHOUT power cycling the board")
input("Press Enter to continue...")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The use of print and input makes the test runner interactive, which is not suitable for automated environments like CI. This requires manual intervention to proceed. These should be removed. If manual steps are required, they should be documented, but ideally, the process should be fully automated, perhaps using GPIOs if the host supports it.

@wmlynik wmlynik force-pushed the wmlynik/add_stm32n6 branch 4 times, most recently from aea1f9b to aed41f3 Compare December 31, 2025 11:06
@github-actions
Copy link

github-actions bot commented Dec 31, 2025

Unit Test Results

9 525 tests   8 933 ✅  52m 9s ⏱️
  583 suites    592 💤
    1 files        0 ❌

Results for commit f62f592.

♻️ This comment has been updated with latest results.

@wmlynik wmlynik force-pushed the wmlynik/add_stm32n6 branch from aed41f3 to f62f592 Compare February 18, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant