-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hello:
Thank you for the effort to port OptiBoot to the Tiny85 ... in assembler, no less.
I am a little unclear as to the actual operation of the "virtual boot partition" and why is the WDT IRQ vector used to pass control to the application?
It looks as though OptiBoot85 remaps IRQ vectors on-the-fly when transferring blocks into RAM before executing the SPM command. Because of this, OptiBoot85 must be the only code written to FLASH and then should be the only application to load code into a Tiny85, yes?
I can deal with that but there seems to be no bounds checking on the uploaded code because the bootloader overwrites itself when loading application code that runs into its own code. Seems this coule be simple enough to do and just refuse to write the code while letting the AVR109 programmer think all went well.
I am using OptiBoot85 with AttoBASIC and thus able to extract routine entry points and make AttoBASIC aware of OptiBoot85. In the "appstart" routine, I have set YH:L to 0xAAAA and then allowed the IJMP to 0x0000. On a RESET or power-up, within a few instructions of the RESET, I check for YH:L = 0xAAAA. If not, I pass control to 0x1F00 (16-bit at 0x0F00). OptiBoot will time out and IJMP to the RESET vector with 0xAAAA held in YH:L and thus AttoBASIC continues its initialization.
I have yet to trouble-shoot the OptiBoot85 code for if I set BLINK=0 then the "flasher" code is disabled but OptiBoot85 does not operate correctly. Disabling the LED flasher code frees up about 32 bytes of code.
It would have been nice if ATMEL had provided a bootloader region on this part. 8KB of FLASH in an 8 pin device is handy. :)
Are there any plans for any future modifications on OptiBoot85?
Once again, thank you for your effort.
Peace and blessings,
Scott