Skip to content

Conversation

@lboue
Copy link
Contributor

@lboue lboue commented Nov 1, 2025

Description:

This PR reorganizes the flashing instructions for nRF52 boards by reordering sections and improving documentation clarity.

  • Moved Adafruit nRF52 Bootloader section before MCUboot section
  • Enhanced board compatibility information for Adafruit bootloader method

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

  • esphome/esphome#

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/index.rst when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing COMPONENT_NAME with your component name in UPPER_CASE format with underscores (e.g., BME280, SHT3X, DALLAS_TEMP):

    @esphomebot generate image COMPONENT_NAME
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the images/ folder of this repository.

  4. Use the image in your component's index table entry in /components/index.rst.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image DHT22

@esphome esphome bot added the current label Nov 1, 2025
@lboue lboue changed the title Put the most common case first (Adafruit bootloader) [nRF52] Put the most common case first (Adafruit bootloader) Nov 1, 2025
@lboue lboue marked this pull request as ready for review November 1, 2025 18:43
Copilot AI review requested due to automatic review settings November 1, 2025 18:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reorganizes the flashing instructions for nRF52 boards by reordering sections and improving documentation clarity.

  • Moved Adafruit nRF52 Bootloader section before MCUboot section
  • Enhanced board compatibility information for Adafruit bootloader method

@netlify
Copy link

netlify bot commented Nov 1, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit c81a19c
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6906543daac58900085dcd35
😎 Deploy Preview https://deploy-preview-5549--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 1, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Reorders and updates the nRF52 documentation: reintroduces MCUboot SWD flashing steps with example device config, moves that section after the Adafruit bootloader content, and expands the Adafruit bootloader flashing steps to cover additional boards, UF2 copy instructions, and USB CDC update notes.

Changes

Cohort / File(s) Summary
Documentation restructuring and content updates
content/components/nrf52.md
Moves the "Flashing with MCUboot" section after the "Adafruit nRF52 Bootloader" section; reintroduces SWD-based MCUboot flashing steps with example device configuration; expands Adafruit bootloader instructions to include additional boards (Adafruit, ProMicro nRF52840, Seeed XIAO BLE), explicit UF2 copy step, and USB CDC update note; minor wording and ordering adjustments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review focus: verify step ordering, board list accuracy, and clarity of UF2/USB CDC steps.
  • Check example device configuration for correctness and consistency with surrounding docs.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "[nRF52] Put the most common case first (Adafruit bootloader)" directly and clearly describes the main objective of the changeset. The title identifies both the component affected (nRF52) and the primary change (reordering sections to prioritize the Adafruit bootloader method as the most common case). This aligns precisely with the file changes in nrf52.md, which moves the Adafruit nRF52 Bootloader section before the MCUboot section. The title is concise, specific, and would allow a teammate scanning the commit history to immediately understand the nature of this documentation reorganization.
Description Check ✅ Passed The PR description is meaningfully related to the changeset. It provides a clear summary stating that the PR reorganizes flashing instructions for nRF52 boards by reordering sections and improving documentation clarity, and it explicitly mentions the two key changes: moving the Adafruit nRF52 Bootloader section before MCUboot and enhancing board compatibility information. This description directly corresponds to the actual changes in nrf52.md. While the description includes standard template content about new component images, the relevant portion appropriately describes the documentation changes being made.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
content/components/nrf52.md (2)

34-34: Inconsistent list formatting in board specification.

Line 34 mixes board names with inconsistent structure: "Adafruit, Promicro nRF52840, Seeed Studio XIAO BLE" creates ambiguity about which items are brands vs. model numbers.

-For Adafruit, Promicro nRF52840, Seeed Studio XIAO BLE boards via a flash drive.
+For Adafruit, Promicro nRF52840, and Seeed Studio XIAO BLE boards, flashing is done via a USB flash drive:

This addition clarifies that all three boards use the USB flash drive method and improves readability.


32-50: Add clarity to distinguish initial flashing from update procedures.

The section combines two distinct operational phases (initial flashing via USB drive; subsequent updates via USB CDC) in a way that could confuse readers about their relationship and usage flow.

Consider adding subheadings or clearer introductory text to separate these methods:

-This bootloader supports updates over USB CDC.
-
-1. Connect the board to the PC via USB.
-1. Quickly short the reset pin to ground twice.
-1. Run `esphome upload yourfile.yaml`.
+### Updating Firmware (After Initial Flash)
+
+This bootloader supports updates over USB CDC without needing the flash drive:
+
+1. Connect the board to the PC via USB.
+1. Quickly short the reset pin to ground twice.
+1. Run `esphome upload yourfile.yaml`.

This helps readers understand that the USB CDC method applies to subsequent updates, not the initial flash.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be0d040 and abca49b.

📒 Files selected for processing (1)
  • content/components/nrf52.md (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/components/nrf52.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: jesserockz
Repo: esphome/esphome-docs PR: 4865
File: .github/workflows/needs-docs.yml:0-0
Timestamp: 2025-05-01T03:29:47.922Z
Learning: In the esphome-docs repository, the "current" label is automatically added by a bot to pull requests, making it a reliable indicator for the target branch.
Learnt from: CR
Repo: esphome/esphome-docs PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-24T00:13:13.459Z
Learning: Open pull requests against the correct base branch: use `current` for documentation-only revisions and `next` for changes tied to new features in esphome/esphome
🔇 Additional comments (1)
content/components/nrf52.md (1)

52-63: MCUboot section is well-structured and complete.

The reintroduced MCUboot section clearly explains the SWD flashing requirement, provides practical guidance (ST-Link V2 reference), and includes appropriate example configuration. The placement after Adafruit bootloader successfully prioritizes the more common case, aligning with the PR objective.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
content/components/nrf52.md (2)

34-34: Clarify board enumeration in the introductory line.

Line 34 could be misleading: "Adafruit" without qualification is vague—it should reference specific board variants from the configuration variables (line 23: adafruit_feather_nrf52840, adafruit_itsybitsy_nrf52840). Consider rephrasing to explicitly name the boards or reference the configuration section.

Current phrasing:

For Adafruit, ProMicro nRF52840, Seeed Studio XIAO BLE boards via a flash drive.

Suggested revision:

For Adafruit Feather, Adafruit ItsyBitsy, ProMicro nRF52840, and Seeed Studio XIAO BLE boards (flashing via USB mass storage).

36-44: Clarify the two-step Adafruit flashing workflow.

The instructions present two separate procedures (lines 36–38 for initial flashing, lines 42–44 for USB CDC updates), but the distinction between them is not explicit. This can confuse users about whether both steps are needed for the first flash.

Consider restructuring as:

### Initial Flashing

1. Connect the board to the PC via USB.
1. Quickly short the reset pin to ground twice.
1. Copy the UF2 package to the flash drive.

### Updating via USB CDC

This bootloader supports updates over USB CDC for subsequent firmware updates.

1. Connect the board to the PC via USB.
1. Quickly short the reset pin to ground twice.
1. Run `esphome upload yourfile.yaml`.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between abca49b and b9e4d86.

📒 Files selected for processing (1)
  • content/components/nrf52.md (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • content/components/nrf52.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: jesserockz
Repo: esphome/esphome-docs PR: 4865
File: .github/workflows/needs-docs.yml:0-0
Timestamp: 2025-05-01T03:29:47.922Z
Learning: In the esphome-docs repository, the "current" label is automatically added by a bot to pull requests, making it a reliable indicator for the target branch.
Learnt from: CR
Repo: esphome/esphome-docs PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-24T00:13:13.459Z
Learning: Open pull requests against the correct base branch: use `current` for documentation-only revisions and `next` for changes tied to new features in esphome/esphome
🔇 Additional comments (1)
content/components/nrf52.md (1)

52-63: LGTM!

The MCUboot section is properly structured with clear instructions for SWD-based flashing, hardware requirements (ST-Link V2 reference), and a complementary example configuration. Placement after the Adafruit bootloader section aligns with the PR objective to put the most common case first.

@netlify
Copy link

netlify bot commented Nov 1, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit abca49b
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/690654a9c9056a00085af2d2
😎 Deploy Preview https://deploy-preview-5549--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 1, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit b9e4d86
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6906554bbb66cb00070c9735
😎 Deploy Preview https://deploy-preview-5549--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant