Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
WolfgangZ
PostPosted: Feb 29, 2012 - 02:50 PM
Newbie


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
 
 View user's profile Send private message  
Reply with quote Back to top
danicampora
PostPosted: Feb 29, 2012 - 04:02 PM
Hangaround


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
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
sambrown
PostPosted: Feb 29, 2012 - 07:06 PM
Hangaround


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.
 
 View user's profile Send private message  
Reply with quote Back to top
WolfgangZ
PostPosted: Mar 01, 2012 - 09:04 AM
Newbie


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.
 
 View user's profile Send private message  
Reply with quote Back to top
sambrown
PostPosted: Mar 01, 2012 - 11:53 AM
Hangaround


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
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits