Skip to content

Program does not persist after reset on Raspberry Pi Pico (rpi-pico-blink example) #155

Open
@asielcabrera

Description

@asielcabrera

Hi team,

I'm testing the rpi-pico-blink example using the latest Swift 6.1.2 toolchain on macOS. The compilation works and the .uf2 gets flashed correctly to the Pico, and the program runs as expected after copying the .uf2.

However, once I press the RESET button, the program is no longer running. I have to re-copy the .uf2 file to run it again. It seems like the program is not being stored or executed properly from flash after a reset.

Reproduction steps:

  1. Build rpi-pico-blink using the provided Makefile and toolset.
  2. Copy the generated .uf2 file to the Pico's storage.
  3. Observe the program running correctly.
  4. Press RESET on the board.
  5. Observe that the program does not run anymore.

Expected behavior:

After RESET, the program should persist and run from flash, like typical firmware does.

Environment:

  • Swift: 6.1.2 snapshot toolchain
  • Platform: macOS 13.x
  • Target: Raspberry Pi Pico (RP2040)
  • Toolset: pico.json from the official repo

Notes:

  • The issue might be related to how the vector table or entry point is defined.
  • vmaddr values seem to point to RAM regions (e.g., 0x10000000) instead of flash (0x20000000).
  • This could be a misconfiguration in the linker or a section mapping issue.

Let me know if you need logs or a reproducible test case. Thanks for this amazing project!

Best,
Asiel Cabrera

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions