Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPC1768: Update linker script, support split heap #430

Merged
merged 8 commits into from
Jan 25, 2025

Conversation

multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Jan 23, 2025

Summary of changes

I ran into an issue when running the new network tests where the LPC1768 was running out of heap space. This MCU has two 32k banks of RAM, where one bank is used as heap, bss, and stack, half of the other bank is used for Ethernet buffers, and the second half of the third bank is unused.

This PR activates split heap support on the device, enabling all unused space to be used as heap. This nearly triples the amount of available heap on this target (if Ethernet is not used at least)! And it can now run the nanostack TCP test without crashing from running out of memory (though it still doesn't pass...).

Impact of changes

  • LPC1678 heap space increased to ~48k if Ethernet unused, or ~32k if Ethernet used
  • LPC1768 linker script now supports memory bank configuration

Migration actions required

Documentation

None


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Test run in progress...

@multiplemonomials multiplemonomials merged commit de95a07 into master Jan 25, 2025
52 checks passed
@multiplemonomials multiplemonomials deleted the feature/lpc1768-enable-split-heap-support branch January 25, 2025 14:41
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