Skip to content

Fixed overlay bug. Addded .idea to gitignore (CLion).#32

Merged
lindestad merged 1 commit into
mainfrom
fix-overlay-bug
May 28, 2026
Merged

Fixed overlay bug. Addded .idea to gitignore (CLion).#32
lindestad merged 1 commit into
mainfrom
fix-overlay-bug

Conversation

@tomasaas
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 15:47
@Gutteerz Gutteerz self-requested a review May 27, 2026 15:47
Copy link
Copy Markdown

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 updates the Zephyr board overlays/ignore rules to address a device-tree overlay issue on the Nucleo H755 (M7) configuration and to avoid committing CLion/JetBrains project metadata.

Changes:

  • Add #address-cells / #size-cells to the &flash0 node in the H755 partitions overlay.
  • Ignore JetBrains .idea project directory in .gitignore.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
boards/nucleo_h755zi_q_stm32h755xx_m7_partitions.overlay Adds address/size cell properties to the flash0 node to correct DT overlay structure for ranges/partitioning.
.gitignore Adds .idea to prevent committing CLion/JetBrains project metadata.

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

@lindestad
Copy link
Copy Markdown
Collaborator

@copilot can you explain the overlay changes more in depth, what was previous behavior (no definition)?

Copy link
Copy Markdown

Copilot AI commented May 28, 2026

@copilot can you explain the overlay changes more in depth, what was previous behavior (no definition)?

The &flash0 node uses a ranges property and contains child nodes (partitions) whose sub-nodes each have a reg property. According to the Device Tree specification, any node that acts as a "bus" (i.e. has children with reg addresses) must declare #address-cells and #size-cells so the DT compiler knows how many cells to use when interpreting those reg and ranges values.

Previous behavior (missing definitions):
Without #address-cells and #size-cells on &flash0 itself, the Zephyr DTS/overlay compiler either:

  • Raised a build error because the ranges property tuple <0 0x08000000 DT_SIZE_K(2048)> could not be validated (the compiler doesn't know if the child-address part is 1 cell or 2, etc.), or
  • Used a default/inherited value that didn't match what was intended, causing the flash partition map to be built incorrectly.

After the fix:
Adding #address-cells = <1> and #size-cells = <1> on &flash0 explicitly tells the compiler that child addresses and sizes are each 1 cell (32-bit). This makes the ranges mapping and every partition@<addr> / reg inside partitions well-defined and unambiguous, matching what the inner partitions node also declares for its own children.

In short: the partitions node already had these properties for its own children, but the parent &flash0 node was missing them for its children (the partitions node itself and the ranges translation), which is what this fix corrects.

Copilot AI requested a review from lindestad May 28, 2026 12:38
@lindestad lindestad merged commit 15a8ca9 into main May 28, 2026
2 checks passed
@lindestad lindestad deleted the fix-overlay-bug branch May 28, 2026 12:42
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.

5 participants