Ok, Mark has authorized the distribution of the .lbx.
Here is the package, Visual Basic 6sp6 CRC16 app included.
The output screen changed at v2.2 from the above post. Improved output.
The debug code output is as follows and is contained in XmegaBootloader.bas module.
'==============================================================================
' Output of bootloader on RS232
' Vx.xx .. Version of Xmega Bootlaoder
' + ...... Pin Check PASSED
' * ...... Pin Check FAILED
' Fx=$ ... Fuse Byte x, displayed in hex
' LR=$ ... Lockbits READ, displayed in hex
' LW=$ ... Lockbits WRITE, displayed in hex
' B ...... Boot loader started
' C ...... Check Card
' D ...... Init DOS File System
' N ...... No boot file found
' I ...... DOS-Error during file-opening
' S ...... Size-Error of Flash-File
' CF=$ ... Computed CRC16 of target FLASH file, displayed in hex
' CE=$ ... CRC16 of last FLASH/programming sequence, displayed in hex
' P ...... Program Flash
' E ...... Encrypted File Mode
' M ...... Start of Main program
' Err=$ .. Error occured, displayed in hex
'==============================================================================
uggh, looks better in the source with fixed width font format.....
The screen shot shows two boot cycles. The first, programming occurs due to the mismatch of the CRCs. The second, is invoked by pressing reset and watching the boot cycle. Since the CRCs match, no programming occurs.
At this version release, v2.20, there is 694 bytes left over in the bootloader section.
This was tested on the Xplained Xmega128a1 board. The library should work on the ATmega platform, I have a test case just haven't tried it. The XmegaBootloader.bas program would have to turn off encryption as at this point I haven't added an encryption / decryption method....not that hard to add that in.
Remember....This version of the .lbx will not allow ANY writes to occur to the SD. Any effort to add functions to do this will result in errors from the compiler. In effort to try in resolve will result in the code over running the 8K bootloader area.
Enjoy,
Mark
↧