Skip to content

Add RAMFUNC linker section#39

Open
phatpaul wants to merge 1 commit into
FastLED:mainfrom
phatpaul:feat/RAMFUNC
Open

Add RAMFUNC linker section#39
phatpaul wants to merge 1 commit into
FastLED:mainfrom
phatpaul:feat/RAMFUNC

Conversation

@phatpaul

@phatpaul phatpaul commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

RAMFUNC made a big difference on LPC845 bitbang driver, because the LPC845 flash access is slower than the CPU. By running from RAM, the NOP timing better matches what is expected.

Anyway, the bitbang driver still can't run fast enough on this arch, but RAMFUNC might be useful elsewhere. It is purely opt-in, this section does nothing if nothing is assigned to it.

Summary by CodeRabbit

  • New Features
    • Improved support for running time-critical code from RAM on supported devices.
    • Enabled smoother startup handling for RAM-resident routines so they are loaded and copied correctly at boot.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b757745-a9d0-4a20-93e7-3bb7250b45d5

📥 Commits

Reviewing files that changed from the base of the PR and between 9e8be02 and 436402b.

📒 Files selected for processing (1)
  • linker_scripts/gcc/lpc8xx_common.ld

📝 Walkthrough

Walkthrough

This change modifies the lpc8xx linker script to add a wildcard input pattern *(.ramfunc*) into the .data output section, along with comments explaining that functions marked for RAM execution are relocated from FLASH to SRAM via the existing startup copy loop.

Changes

Linker Script Update

Layer / File(s) Summary
RAM function placement in .data section
linker_scripts/gcc/lpc8xx_common.ld
Adds documentation comments and a *(.ramfunc*) wildcard input pattern to the .data output section, enabling functions marked for RAM execution to be given a FLASH load address and RAM run address for relocation.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 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 matches the main change: adding linker support for RAM-executed functions via the RAMFUNC section.
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.

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.

1 participant