From: Wim Lewis <w...@hhhh.org>
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 SRAM or EEPROM which the
>bootloader could write some information to, if you wanted a simple way
>to communicate from the bootloader to the main application, but you'd
>also have to detect the common case where the bootloader didn't run
>first and RAM has random or old data in it. (Similarly the bootloader
>could put some special values in registers; you'd have to modify the
>startup routine not to clobber them.)
Yes it is possible to use EEPROM, but I was looking for a more ideal solution.
The best will be to call application main with parameters this is not possible
in this
kinda situation (bare bones system) or is it?
>You might be better off stepping back and considering whether the
>problem you are trying to solve really requires communication between
>the bootloader and the main program at all.
Thanks for the suggestion. In fact I am actually trying to prune down boot code
and
change the application side. However I am still curious to know if there is a
method of calling
main with arguments!!
Thank you for your time.
Regards
Nayani
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list