You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SAMD microcontrollers can protect the bootloader flash using
at91samd bootloader [size] command
In processors with big flash like SAMD21G18A the minimum flash partition is
256kB / 16 = 16kB, which is way bigger than minimum bootloader size.
When a "load" is executed during gdb debugging session, if the .text section
starts before 0x4000 (16kB), the entire first flash page gets erased.
This fails if the page is protected via the bootloader command.
This patch partitions the first flash page into logical smaller chunks, so
the "load" command only erases the relevant pages.
If the flash page is smaller/equal than the minimum bootloader size, do nothing.
0 commit comments