RP2040 changing flash size

Sysprogs forums Forums VisualGDB RP2040 changing flash size

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33247
    tm123
    Participant

    Hello,

    Is this a supported feature somewhere? Maybe a local file I can modify? I can’t find anything to change it from the default 2MB to 16MB. The memory explorer always shows 2MB. I tried other boards in the project setup like the SparkFun versions which ship with 16MB external flash but still defaults to 2MB.

    #33252
    support
    Keymaster

    Thanks for renewing your license.

    For RP2040 projects there are 2 different FLASH sizes:

    • The FLASH size displayed in the Memory Explorer is taken from %VISUALGDB_DIR%\rules\PicoSDK.xml (search for MemoryMap). It is only used to calculate the utilization percentage and can be changed by editing the rule file.
    • The actual memory layout is managed by the PicoSDK build system. VisualGDB does not control it directly and lets the PicoSDK manage it.

    If you would like to change the actual memory size used for linking, a good starting point would be the default linker script (try adding “-v” to Ninja arguments, re-link the project and search the build log for “.ld” or “-T”). Once you locate the default linker script, you can patch it to have the memory size you prefer, or fork it and patch the PicoSDK CMake files to use the modified version of the script.

    #33253
    tm123
    Participant

    Point one is what I was looking for, just wanted to see a proper utilization calculation. Thanks

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.