0
\$\begingroup\$

I have an ARM-M0+ (SAMD21G18).

I have a project that has a bootloader and another with application.

When I try to go to debugging I suspect the following:

  • the ROM is erased
  • application flashed only
  • the program goes to fault mode.

I guess this is because of VTOR thing and SP in address 0x00000.

I've searched the internet, and people suggest to use application alone... but then how?

Is there another way to prevent debugger from erasing bootloader area?

enter image description here

enter image description here

enter image description here

\$\endgroup\$
1
\$\begingroup\$

There are two ways to fix this:

  1. Tell the programmer to erase sectors instead of the full chip.
  2. Try and link the binary of the bootloader in your debug image. This way when the programmer loads the image, the bootloader is included.
\$\endgroup\$
  • \$\begingroup\$ in both cases i dont know how to do it. the project (linker settings / script) is pre configured by atmel allready i dont know how to do it.. and i couldnt find programmer erase settings \$\endgroup\$ – Hasan alattar May 22 at 12:16
  • \$\begingroup\$ @Hasanalattar Perhaps the user manual of the atmel toolchain can help you with this. I can't help you with Atmel studio. \$\endgroup\$ – Jeroen3 May 22 at 13:56
  • 1
    \$\begingroup\$ This might be a good time to export your project from Atmel studio and start controlling the build yourself, potentially in a way compatible with the rest of your organization's software practices. \$\endgroup\$ – Chris Stratton May 22 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.