Skip to content

Adding M5Stack StickS3 board package#435

Merged
Ellerbach merged 11 commits into
mainfrom
add-stickS3
Jul 12, 2026
Merged

Adding M5Stack StickS3 board package#435
Ellerbach merged 11 commits into
mainfrom
add-stickS3

Conversation

@Ellerbach

Copy link
Copy Markdown
Member

Description

Adding M5Stack StickS3 board package

Motivation and Context

  • Adding M5Stack StickS3 board package

How Has This Been Tested?

On a real device!

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

@nfbot nfbot added Type: enhancement New feature or request Area: Config-and-Build Type: documentation Improvements or additions to documentation labels Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Ellerbach, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository: nanoframework/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 179177c5-bd64-461c-8fed-d3a56f3ad23c

📥 Commits

Reviewing files that changed from the base of the PR and between 4acbd26 and e89ccbc.

📒 Files selected for processing (6)
  • Tests/M5StickS3TestApp/M5StickS3TestApp.nfproj
  • Tests/M5StickS3TestApp/Program.cs
  • Tests/M5StickS3TestApp/packages.lock.json
  • nanoFramework.M5StickS3.nuspec
  • nanoFramework.M5StickS3/M5StickS3.cs
  • nanoFramework.M5StickS3/Screen.cs
📝 Walkthrough

Walkthrough

Adds M5StickS3 board support with PMIC, sensor, GPIO, I2C, and ST7789 display APIs; introduces a telemetry test application; wires projects and packaging into the solution and pipeline; and documents NuGet usage and device flashing.

Changes

M5StickS3 board support

Layer / File(s) Summary
Board hardware and display support
nanoFramework.M5StickS3/M5StickS3.cs, nanoFramework.M5StickS3/Screen.cs, nanoFramework.M5StickS3/StickS3St7789.cs, nanoFramework.M5StickS3/Properties/AssemblyInfo.cs
Adds M5StickS3 PMIC, GPIO, button, sensor, I2C, LCD power, screen, and ST7789 driver support with assembly metadata.
Project and dependency wiring
nanoFramework.M5StickS3/nanoFramework.M5StickS3.nfproj, nanoFramework.M5StickS3/packages.config, nanoFramework.M5StickS3/packages.lock.json, nanoFramework.M5StickS3.nuspec
Defines the library project, pinned dependencies, package metadata, and build imports.
M5StickS3 test application
Tests/M5StickS3TestApp/*, Tests/M5CoreS3TestApp/Properties/AssemblyInfo.cs
Adds an executable test app that initializes the device, renders telemetry and graphics, handles buttons, estimates battery percentage, and removes explicit assembly version attributes from the existing CoreS3 test app.
Solution, CI, and usage integration
nanoFramework.M5Stack.sln, azure-pipelines.yml, README.md
Registers the projects, packages the new NuGet library, adds release notes, and documents package usage and flashing.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: josesimoes

Sequence Diagram(s)

sequenceDiagram
  participant TestApp
  participant M5StickS3
  participant Power
  participant Screen
  participant Display
  TestApp->>M5StickS3: initialize board
  M5StickS3->>Power: configure PMIC and read telemetry
  TestApp->>Screen: initialize and draw content
  Screen->>Display: initialize ST7789 and write framebuffer
  TestApp->>M5StickS3: read sensors and button state
  M5StickS3->>Power: read battery and charging values
  TestApp->>Screen: render telemetry lines
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely describes the main change: adding the M5Stack StickS3 board package.
Description check ✅ Passed The description is directly related to the StickS3 board package and its build/documentation updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@nanoFramework.M5StickS3.nuspec`:
- Line 21: Update the nanoFramework.CoreLibrary dependency version in the nuspec
to 1.17.12, matching the versions pinned in packages.config and
packages.lock.json.

In `@nanoFramework.M5StickS3/M5StickS3.cs`:
- Around line 195-200: Update GetI2cDevice to construct I2cConnectionSettings
with I2cBusSpeed.StandardMode explicitly, avoiding the 2-argument overload’s
FastMode default; also pass the same explicit speed in GetGrove for consistent
API behavior.

In `@nanoFramework.M5StickS3/nanoFramework.M5StickS3.nfproj`:
- Around line 8-20: Add
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> to the main
PropertyGroup in the project file, alongside the existing project configuration
properties, so the checked-in packages.lock.json is enforced during NuGet
restore.

In `@nanoFramework.M5StickS3/Screen.cs`:
- Line 32: Rename the constant ScreenMiso to ScreenMosi in Screen.cs and update
every reference, including the SPI1_MOSI pin configuration, so the identifier
matches the pin’s actual MOSI function.

In `@Tests/M5StickS3TestApp/Program.cs`:
- Around line 210-258: GetGlyph creates a new byte array for every character,
causing repeated allocations during telemetry rendering. Replace the
switch-based allocations in GetGlyph with cached static glyph data, such as a
Dictionary<char, byte[]> or lookup table, and return the existing arrays for
supported characters while preserving the current fallback glyph.
- Around line 154-208: Reuse the telemetry buffer in DrawTelemetryLine instead
of allocating a new ushort array on every call. Add a static buffer sized for
the maximum supported line height, clear only the active width × height region
each frame, and keep rendering and Screen.Write limited to that active region;
accommodate any runtime variation in scale.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: nanoframework/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2277236f-a336-4aaa-8135-41b9f0e23b26

📥 Commits

Reviewing files that changed from the base of the PR and between 51a6c3a and 14449a4.

📒 Files selected for processing (15)
  • README.md
  • Tests/M5StickS3TestApp/M5StickS3TestApp.nfproj
  • Tests/M5StickS3TestApp/Program.cs
  • Tests/M5StickS3TestApp/Properties/AssemblyInfo.cs
  • Tests/M5StickS3TestApp/packages.config
  • azure-pipelines.yml
  • nanoFramework.M5Stack.sln
  • nanoFramework.M5StickS3.nuspec
  • nanoFramework.M5StickS3/M5StickS3.cs
  • nanoFramework.M5StickS3/Properties/AssemblyInfo.cs
  • nanoFramework.M5StickS3/Screen.cs
  • nanoFramework.M5StickS3/StickS3St7789.cs
  • nanoFramework.M5StickS3/nanoFramework.M5StickS3.nfproj
  • nanoFramework.M5StickS3/packages.config
  • nanoFramework.M5StickS3/packages.lock.json

Comment thread nanoFramework.M5StickS3.nuspec Outdated
Comment thread nanoFramework.M5StickS3/M5StickS3.cs Outdated
Comment thread nanoFramework.M5StickS3/nanoFramework.M5StickS3.nfproj
Comment thread nanoFramework.M5StickS3/Screen.cs Outdated
Comment thread Tests/M5StickS3TestApp/Program.cs Outdated
Comment thread Tests/M5StickS3TestApp/Program.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new board support package for the M5Stack StickS3 to the nanoFramework.M5Stack repo, including a dedicated test application and build/release wiring so the package can be produced and published like the existing board BSPs.

Changes:

  • Added new nanoFramework.M5StickS3 library project (board init, PMIC, screen driver glue).
  • Added Tests/M5StickS3TestApp sample/test app to exercise power, screen, buttons, IMU telemetry.
  • Updated solution/README/Azure Pipelines to include/build/publish the new nanoFramework.M5StickS3 NuGet.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Tests/M5StickS3TestApp/Properties/AssemblyInfo.cs New test app assembly metadata.
Tests/M5StickS3TestApp/Program.cs New StickS3 device exercise/telemetry app.
Tests/M5StickS3TestApp/packages.config Test app NuGet dependencies.
Tests/M5StickS3TestApp/M5StickS3TestApp.nfproj Test app project wiring + references.
README.md Documents StickS3 support + flashing target.
nanoFramework.M5StickS3/StickS3St7789.cs StickS3-specific managed ST7789 driver configuration.
nanoFramework.M5StickS3/Screen.cs StickS3 screen bring-up and backlight control.
nanoFramework.M5StickS3/Properties/AssemblyInfo.cs New library assembly metadata.
nanoFramework.M5StickS3/packages.lock.json Locked dependency graph for the new library.
nanoFramework.M5StickS3/packages.config Library NuGet dependencies.
nanoFramework.M5StickS3/nanoFramework.M5StickS3.nfproj New library project definition + references.
nanoFramework.M5StickS3/M5StickS3.cs StickS3 board support (I2C, PMIC, IMU, screen power).
nanoFramework.M5StickS3.nuspec NuGet packaging metadata for the new library.
nanoFramework.M5Stack.sln Adds the new library + test app projects to the solution.
azure-pipelines.yml Builds/packages StickS3 and includes it in release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nanoFramework.M5StickS3/Screen.cs Outdated
Comment thread nanoFramework.M5StickS3.nuspec Outdated
Comment thread Tests/M5StickS3TestApp/Program.cs
Comment thread Tests/M5StickS3TestApp/Program.cs Outdated
@Ellerbach

Copy link
Copy Markdown
Member Author

@nfbot updatedependencies

@josesimoes

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@sonarqubecloud

Copy link
Copy Markdown

@Ellerbach Ellerbach merged commit 43b0684 into main Jul 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Config-and-Build Type: documentation Improvements or additions to documentation Type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants