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

Update RP2040 target to use flash memory bank #392

Merged
merged 5 commits into from
Nov 24, 2024

Conversation

multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Nov 21, 2024

Summary of changes

I noticed that RPi Pico got broken a while back due to the upload method changes, because it does not have a flash bank defined, so the upload methods don't have a location to upload to. Funnily enough I actually did write such a flash bank definition in the memory banks example on the page, but never actually put it into the code X_X.

This PR updates the RP2040 target to:

  • Have a defined QSPI flash bank, whose size can be configured via memory_banks and memory_bank_config
    • Generally custom target creators should set the physical size of the flash in memory_banks and the configured area for the Mbed application in memory_bank_config, because the memory_banks definition is now used for the flash programming HAL
  • Use the configured flash and RAM sizes in the linker script, opening the way for building images for core 1 using the same linker script
  • Use either SCRATCH_X or SCRATCH_Y for the stack, depending on which core the RAM is configured for

Impact of changes

Fix CMake configuration failing for RP2040 if an upload method is enabled

Migration actions required

Documentation


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 changed the title Define flash memory bank for RPi Pico [draft] Define flash memory bank for RPi Pico Nov 21, 2024
@multiplemonomials multiplemonomials removed the request for review from JohnK1987 November 21, 2024 17:35
@multiplemonomials multiplemonomials changed the title [draft] Define flash memory bank for RPi Pico Update RP2040 target to use flash memory bank Nov 23, 2024
@multiplemonomials
Copy link
Collaborator Author

Test run complete, results uploaded to https://mbed-ce.github.io/mbed-ce-test-tools/tests/

@multiplemonomials multiplemonomials merged commit f3da3a1 into master Nov 24, 2024
52 checks passed
@multiplemonomials multiplemonomials deleted the bugfix/rpi-pico-flash-bank branch November 24, 2024 17:00
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.

3 participants