I want to write a code in boot loader section in atmel studio
How we can set staring address of the code in atmel studio?
Is there any thing else to set?
Are you trying to write a bootloader or use part of that space for your application?
What device are you targeting?
Where is the base of your devices bootloader section located?
Are you using C or assembly?
If C, are you using:
The simple (i.e incomplete and overly simplistic) answer is to set the start address for the linker in
Project Properties / Toolchain / Linker / Miscellaneous as required
More details on what you are trying to achieve will help us help you.
David (aka frog_jr)
Thank you frog_jr
what is the other menus?
like memory , Optimization and else?
Just build it like a "normal" program with that one exception of -Ttext=0xnnnn
Isn't there a guide or sample code for demoing how to write and build bootloaders in gcc?
I did it but atmega8 micro will be restart periodic about every 67ms it will be watchdog reset.
You also asked this in another thread, please keep to posting a question only 1 time.....
* other tread locked. *
restart periodic about every 67ms it will be watchdog reset.
Because that is exactly what a watchdog is designed to do!
You need to reset the Watchdog within the 67ms to prevent it from timing-out and causing a reset.
Time to read-up on the watchdog.
No IT is not watchdog!
The program start from beginning of the main ...
and It is not restarting and watch dog is diabled!
it will be watchdog reset.
OK - so now I'm confused!
I see more and found interrupt is the problem
by disable timer interrupt or USART receive interrupt problem will be solved completely
but Why? and How we can solve this issue?
For any interrupts that are active, you must provide an interrupt handler (or disable the interrupts).
If this is a bootloader how much do you know already about "IVSEL"? if not a lot then I suggest you change that situation.
However there is a more fundamental question here - why on earth would you need ANY interrupt in a bootloader? There are at least two fairly strong reasons to not have them:
1) if you don't use any interrupts you don't need an IVT and in some micros that can be a considerable saving in the BLS you have available. If the bootloader is smaller because of no vector table then the app section can be bigger.
2) when you use a bootloader then everything in the app can be easily replaced - so bugs can be fixed. But the one thing you can't change is the bootloader itself - so it must be exactly right, 100% error free on day one. To achieve that you keep it as small and simple as possible. One way to reduce complexity is to avoid interrupts.
thank you claswon
I need to interrupt in the bootloader!
but I suggest your solution is move interrupt vector to start of the boor section am I right?
why interrupt in application not will be work?
what is the problem that we have interrupt vectors at the start of the application section?
boot loader lock bits can be usefull? or what is the BLB ?
Do you? Why?
because RX serial is receiving data by interrupt , timers and else....
None of those requires interrupts!
EDIT: Or, conversely, all of those can be done without interrupts!
© 2020 Microchip Technology Inc.