Adding M5Stack StickS3 board package#435
Conversation
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Repository: nanoframework/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds 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. ChangesM5StickS3 board support
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: 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
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (15)
README.mdTests/M5StickS3TestApp/M5StickS3TestApp.nfprojTests/M5StickS3TestApp/Program.csTests/M5StickS3TestApp/Properties/AssemblyInfo.csTests/M5StickS3TestApp/packages.configazure-pipelines.ymlnanoFramework.M5Stack.slnnanoFramework.M5StickS3.nuspecnanoFramework.M5StickS3/M5StickS3.csnanoFramework.M5StickS3/Properties/AssemblyInfo.csnanoFramework.M5StickS3/Screen.csnanoFramework.M5StickS3/StickS3St7789.csnanoFramework.M5StickS3/nanoFramework.M5StickS3.nfprojnanoFramework.M5StickS3/packages.confignanoFramework.M5StickS3/packages.lock.json
There was a problem hiding this comment.
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.M5StickS3library project (board init, PMIC, screen driver glue). - Added
Tests/M5StickS3TestAppsample/test app to exercise power, screen, buttons, IMU telemetry. - Updated solution/README/Azure Pipelines to include/build/publish the new
nanoFramework.M5StickS3NuGet.
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.
|
@nfbot updatedependencies |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|



Description
Adding M5Stack StickS3 board package
Motivation and Context
How Has This Been Tested?
On a real device!
Screenshots
Types of changes
Checklist: