| Author |
Message |
|
|
Posted: Feb 29, 2012 - 02:50 PM |
|

Joined: Feb 29, 2012
Posts: 3
|
|
I have a bootloader at address 0x8000.0000 and my application starts at 0x8000.2000.
My problem is that AVRStudio 5.1 always erases my bootloader when I start debugging of the application. So the program counter never reaches my start point.
Is there a posiblity to disable the erasing at address 8000.0000 ?
Thanks for any suggestion,
Wolfgang |
|
|
| |
|
|
|
|
|
Posted: Feb 29, 2012 - 04:02 PM |
|

Joined: Oct 10, 2007
Posts: 395
Location: Valls, Spain
|
|
| Write the BOOT PROTECT (I don't remember the exact name right now) fuse bits. These bits lock defined memory regions of 8K,16K or 32K. |
_________________ Daniel Campora
http://www.lear.com
|
| |
|
|
|
|
|
Posted: Feb 29, 2012 - 07:06 PM |
|

Joined: May 24, 2011
Posts: 263
Location: Berlin
|
|
You may also use flash region locks (granularity 32kB).
You can do that during runtime with:
Code:
void flashc_lock_region(unsigned int region, bool lock);
or by setting the corresponding lock bits in user flash with avr32program
-sb
PS: avr32studio is not so stupid but sometimes this happens there, too. |
|
|
| |
|
|
|
|
|
Posted: Mar 01, 2012 - 09:04 AM |
|

Joined: Feb 29, 2012
Posts: 3
|
|
Thanks for your suggestions. But it's a temporary workaround.
I would prefer to tell AVRStudio 5.1 not to erase FLASH regions which will not be programmed. I hope there is such a resolution possible. |
|
|
| |
|
|
|
|
|
Posted: Mar 01, 2012 - 11:53 AM |
|

Joined: May 24, 2011
Posts: 263
Location: Berlin
|
|
ask Atmel or ask in the correct forum:
http://www.avrfreaks.net/index.php?name ... m&f=23
avr32studio works really good for debugging. you can there explicitly enable "no erase" and "suppress programming" in the debug configurations settings.
I have no idea if this is possible in AVRStudio x.y ∀ x,y ∈ N, 4 ≤ x < ∞
a more general way for debugging is to use gdb/avr32gdbproxy on the commandline (and with another frontend like insight or ddd)
-sb |
|
|
| |
|
|
|
|
|