Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Georg-Johann Lay
Parthasaradhi Nayani schrieb: From: Georg-Johann Lay With int x __attribute__((section (".bootdata"))); you can use x in the known way, it's only about locating .bootdata to whatever location you deem appropriate. Read the linker manual. This appears to be the only best way!!! This mean

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Parthasaradhi Nayani
From: Bob Paddock Subject: Re: [avr-gcc-list] Parm to application > Calling main from boot does not sound sane. >BootLoaders end by jumping (using a call would not be sane) to >absolute address zero. >The vector table from address zero takes care of getting to the the >first .i

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Parthasaradhi Nayani
From: Georg-Johann Lay >With  > int x __attribute__((section (".bootdata"))); >you can use x in the known way, it's only about locating .bootdata >to whatever location you deem appropriate.  Read the linker manual. This appears to be the only best way!!! This means I create a section, say .boo

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Bob Paddock
> Calling main from boot does not sound sane. BootLoaders end by jumping (using a call would not be sane) to absolute address zero. The vector table from address zero takes care of getting to the the first .init section and in turn main(). ___ AVR-GCC-l

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Georg-Johann Lay
Parthasaradhi Nayani schrieb: From: Georg-Johann Lay Reserve a piece of RAM that does not depend on how the application is compiled, for example at the start of .data (bump .data to a later location) or at the top of the stack (initialize SP to RAMEND-offset). In the boot loader, write the d

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Parthasaradhi Nayani
From: Wim Lewis To: avr-gcc-list@nongnu.org >The problem I see is that the boot loader doesn't necessarily run every >time the mcu is started (unless BOOTRST is set). In my case BOOTRST is set, so every time there is a reset, boot loader is invoked. >You could define a static variable in SR

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Parthasaradhi Nayani
From: Georg-Johann Lay >Reserve a piece of RAM that does not depend on how the application >is compiled, for example at the start of .data (bump .data to a later >location) or at the top of the stack (initialize SP to RAMEND-offset). >In the boot loader, write the data to that reserved space.

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Georg-Johann Lay
Parthasaradhi Nayani schrieb: Hello all, I have a boot loader and an application on a Mega168. As boot loader and application are two different entities, is there any way the boot loader can pass a parameter to application code? Would like something like main (int argc, char *argv[]) Reserve a

Re: [avr-gcc-list] Parm to application

2012-08-26 Thread Wim Lewis
On 8/25/12 10:35 PM, Parthasaradhi Nayani wrote: > Hello all, > I have a boot loader and an application on a Mega168. As boot loader and > application are two different entities, is there any way the boot loader > can pass a parameter to application code? Would like something like main > (int argc,

[avr-gcc-list] Parm to application

2012-08-25 Thread Parthasaradhi Nayani
Hello all, I have a boot loader and an application on a Mega168. As boot loader and application are two different entities, is there any way the boot loader can pass a parameter to application code? Would like something like main (int argc, char *argv[]). Any suggestions please? Thank you.   Reg