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

Building an "unlocked" (no flash write protection) bootloader? #200

Closed
vkottler opened this issue May 18, 2023 · 1 comment
Closed

Building an "unlocked" (no flash write protection) bootloader? #200

vkottler opened this issue May 18, 2023 · 1 comment

Comments

@vkottler
Copy link

Hello, from what I can gather from the "Fuses" section of the README: https://github.com/adafruit/uf2-samdx1#fuses

It requires some off-roading for a SWD programmer/debugger to directly write flash (especially/specifically the beginning of flash, where exception vectors and startup code lives by default).

The one-liner solution suggestion for modifying register(s) while in GDB is handy, but it does make some assumptions about certain symbols being loaded (e.g. a Nvmctrl struct definition).

I'm probably going to do this for my own needs, but a #define-able feature flag to not write protect flash, just to eliminate a step in the SWD-debug + gdb load program.elf workflow would be handy.

@vkottler
Copy link
Author

After looking at the implementation, specifically check_start_application (https://github.com/adafruit/uf2-samdx1/blob/master/src/main.c#L98), I tried just moving my application base to 0x4000 in my build and that worked just fine.

Going to close this issue - it's straight-forward enough to create an arbitrary application that can be co-located with the bootloader.. if you just put it in the correct location!

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

No branches or pull requests

1 participant