Well, the title says it all.
A debugger has no magic powers here - it would have to follow the normal requirements for erasing first, then programming.
I thought that is how breakpoints are implemented in some cases (debugWire?), no? If a debugger does that to set a breakpoint, then why cannot it do that if I ask it to? (Don't have Studio installed at the moment, so I cannot try. BTW, the debugger is Atmel-ICE. Well, and I want to do that on a SAMD; so I guess technically I'm in a wrong forum.)
I think that the debug module in the MCU includes breakpoint registers that generate a break when the PC matches.
Until Black Lives Matter, we do not have "All Lives Matter"!
And what a beautiful thing it is!
Field the chicken, ignore the ball.
This holds for at least some AVRs: The hardware debug module has 4 breakpoint registers. One is reserved for single stepping. When the three others are used for breakpoints then further breakpoints will be done by writing BREAK instructions to flash. Each hit of such a breakpoint results in one flash rewrite of the original instruction, a step over it and a rewrite of the BREAK instruction.
All this out of memory, but we have had threads here in the past where Atmel people have confirmed this scheme.
So, technically it is possible for an ICE debugger to write to flash while debugging.
Whether it is possible for a Studio user to use it (and an ICE debugger) to write to flash is dependent on if the Studio developers implemented this in the UI. I don't beleive they did.
As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here.
No guarantees, but if we don't report problems they won't get much of a chance to be fixed! Details/discussions at link given just above.
"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]
© 2021 Microchip Technology Inc.