Skip to content

Add nice!nano v2 board support - #100

Open
RandoSY wants to merge 3 commits into
h2zero:masterfrom
RandoSY:agent/add-nice-nano-v2
Open

Add nice!nano v2 board support#100
RandoSY wants to merge 3 commits into
h2zero:masterfrom
RandoSY:agent/add-nice-nano-v2

Conversation

@RandoSY

@RandoSY RandoSY commented Jul 10, 2026

Copy link
Copy Markdown
  • Added nicenano_v2 board entry in boards.txt
  • Added variants/nice_nano_v2
  • Mapped Pro Micro-style Nice!Nano pins, LED, VBAT, VCC cutoff, UART, I2C, SPI
  • Added UF2 generation for Nice!Nano using family 0xADA52840
  • Added README docs for Nice!Nano and UF2 drag/drop

Validation passed:

  • Blink-style sketch compiles
  • BLE_Advertiser NimBLE example compiles with NimBLE-Arduino 2.5.0
  • UF2 output starts at 0x26000
  • UF2 family is 0xADA52840
  • Generated UF2 matched Adafruit uf2conv.py byte-for-byte for the same HEX

Summary by CodeRabbit

  • New Features

    • Added support for the nice!nano v2 board, including pin mappings, LED initialization, USB settings, and configurable communication interfaces.
    • Added UF2 firmware export for compatible boards, including command-line conversion from Intel HEX files.
    • Added board options for bootloader type, wireless roles, and debug logging.
  • Documentation

    • Added nice!nano v2 to the supported boards list.
    • Documented uploading firmware through UF2 bootloader mode, including the Python 3 requirement.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 59 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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 within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f6f643fd-1e8f-4b43-a4d7-9afe6dd3a5fb

📥 Commits

Reviewing files that changed from the base of the PR and between 1f082f7 and bb3bd5f.

📒 Files selected for processing (2)
  • README.md
  • tools/uf2conv.py
📝 Walkthrough

Walkthrough

Changes

Arrr, this adds complete nice!nano v2 support: board and variant definitions, UF2 conversion from Intel HEX, upload configuration, bootloader options, and documentation for UF2 programming.

nice!nano v2 hardware variant

Layer / File(s) Summary
Board hardware contract and pin interfaces
variants/nice_nano_v2/variant.h, variants/nice_nano_v2/variant.cpp
Defines clocks, pin constants, analog/serial/SPI/I2C mappings, digital pin translation, and LED startup initialization.

UF2 export and board integration

Layer / File(s) Summary
Intel HEX to UF2 conversion
tools/uf2conv.py, platform.txt
Validates Intel HEX records, builds aligned UF2 blocks, writes family-tagged images, and configures Python commands by platform.
Board build and upload configuration
boards.txt, platform.txt
Adds the nice!nano v2 board definition, upload settings, build metadata, UF2 recipe, bootloader variants, and nRF utility configuration.
UF2 usage documentation
README.md
Lists nice!nano v2 as supported and documents bootloader reset, UF2 copying, and the Python 3 requirement.

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

Sequence Diagram(s)

sequenceDiagram
  participant ArduinoBuild
  participant uf2conv.py
  participant UF2Bootloader
  participant nice_nano_v2
  ArduinoBuild->>uf2conv.py: Convert Intel HEX with family ID
  uf2conv.py-->>ArduinoBuild: Produce UF2 image
  ArduinoBuild->>UF2Bootloader: Copy UF2 image
  UF2Bootloader->>nice_nano_v2: Program firmware
Loading

Poem

Arrr, new pins be charted in neat array,
UF2 treasures sail the buildin’ way.
HEX lines parse, blocks march in a row,
Bootloader doors swing open below.
nice!nano v2 joins the crew—
Compile, copy, and set sail true!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely matches the main change: adding nice!nano v2 board support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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: 2

🤖 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 `@README.md`:
- Around line 127-131: Expand the “Uploading via UF2” section with the exact IDE
action used to export the .uf2 file, then document how to reset the board into
its UF2 bootloader, including the required reset-button or reset-sequence steps
before copying the file to the mounted drive.

In `@tools/uf2conv.py`:
- Around line 31-44: The HEX parser must reject type-specific structural errors
and trailing data after EOF. Update the record parser function containing the
length/checksum validation to enforce required payload lengths and addresses for
each supported record type, including a valid zero-length EOF record; then
update the main record-processing loop to require exactly one EOF, reject any
non-empty records after it, and fail when EOF is missing instead of silently
stopping.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 25c5a43d-dd9f-43bc-9d38-7c74a46489f6

📥 Commits

Reviewing files that changed from the base of the PR and between 470a97a and 1f082f7.

📒 Files selected for processing (6)
  • README.md
  • boards.txt
  • platform.txt
  • tools/uf2conv.py
  • variants/nice_nano_v2/variant.cpp
  • variants/nice_nano_v2/variant.h

Comment thread README.md Outdated
Comment thread tools/uf2conv.py
@RandoSY

RandoSY commented Jul 11, 2026

Copy link
Copy Markdown
Author

I test on Arm(Nim)BLE Boards 4.0. Work well on BLE Scan example.

@h2zero

h2zero commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Thanks! Sorry I didn't see this sooner, will review later today.

@RandoSY

RandoSY commented Aug 3, 2026

Copy link
Copy Markdown
Author

Kk, love this lib!

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.

2 participants