Testing phase urboot 8.0 #36
Replies: 4 comments 1 reply
-
Note tests with other hardware here |
Beta Was this translation helpful? Give feedback.
-
ATtiny13A (AVR DIP-8 Dev Board R3)Smallest AVR8 flash with a bootloader...
... and don't forget to be delighted about the orange LED driven by the bootloader! 😄 ATmega32A (MightyCore dev board R3)
... and the bootloading LED sparkles here, too.
@mcuee Ahh: as soon as you get @MCUdude's hardware things run smoothly: impressive boards |
Beta Was this translation helpful? Give feedback.
-
174298.mp4The lightshow of the test: the orange LED is operated within the bootloader and evidences that the bootloader got the comms correct. |
Beta Was this translation helpful? Give feedback.
-
More tests ...ATtiny2313A (smallest urboot bootloader: 192 bytes)The USART registers are all in I/O space which is one reason why this bootloader can be so small. The other is that the part has a small page size, so it's easier to save full pages.
Note the bootloader was compiled for ATtiny2313 but used on ATtiny2313A. Although the latter has two interrupts more than the former, the used vector is the same, so this should be OK (and turns out it is). However, this requires avrdude run without Note also that the bootloader was compiled for FCPU=16.0000 MHz and 115,200 baud (default values); as the real board runs with 8 MHz, the host baud rate needed to be halved.
ATtiny2313A (smallest urboot with EEPROM support: 256 bytes)
Note the symbolic names for ATtiny2313 and ATtiny2313A's EEPROM Ready interrupt differ in avr-libc (READY vs Ready). It's not necessary to chose the interrupt vector as urboot's default values normally are normally pretty much unused vector slots.
ATtiny2313 (no A, the full monty)
ATtiny85 (AVR DIP-8 Dev Board R3)Plugged the ATtiny85 into this brilliant development board
ATmega16A (MightyCore development board R3)I modified the excellent DIP-40 Arduino compatible development board to house a ZIF socket. Below test all with the same setup.
ATmega8535 (MightyCore development board R3)
ATmega1284 (no P, MightyCore development board R3)
|
Beta Was this translation helpful? Give feedback.
-
PR #34 holds code for the urboot version 8.0: smaller bootloaders and one more feature:
UPDATE_FL=<0|1|2|3|4>
(skip unnecessary page erases or writes)UPDATE_FL=1
adds code to the write page routine that checks first whether flash would be changed by the new page contents and only writes to flash if necessaryUPDATE_FL=2
as above, and compiles code into the chip erase routine that skips erasing a flash page if it was already all 0xffUPDATE_FL=3
as above, and checks within the write page routine whether, once a flash page needs modifying, it needs erasing first; some content changes only transition selected bits from1
to0
for which a page erase is unnecessaryUPDATE_FL=4
as above, and adds checks for whether the new page is empty, as no further page write is necessary after a page eraseNote that the extra code for level
2
is only generated if there is a chip erase routine in the bootloader, ie,CHIP_ERASE=1
. The extra code in levels3
and4
is only generated when the bootloader write page routine normally erases a page before writing it; this is so if the bootloader provides a page erase function for the user, ie,PGMWRITEPAGE=1
, or if the bootloader has no other means of erasing a chip, ie,CHIP_ERASE=0
. Level1
costs roughly 20 bytes code, level2
another 20 bytes and level3
and4
add 10 bytes code each.The
UPDATE_FL
feature is useful for projects that use extensively the bootloader-providedpgm_write_page(sram, flash)
routine in application space. Generally,UPDATE_FL=1
is sufficient. However, if there is still space in the bootloaderUPDATE_FL=4
makes the bootloader the fastest it can be. This, again, is useful for projects usingpgm_write_page(sram, flash)
.Below tests the new feature for all
UPDATE_FL
levels for five selected small and large parts. Further tests for other parts are unlikely to need that level of scrutiny for theUPDATE_FL
feature.The tests mainly use a simple FTDI programmer.
Digispark: ATtiny85 (small and SWIO)
Digispark Pro: ATtiny167 (small and LINUART)
Mega R3: ATmega2560 (large and UART)
Pro Mini (Medium, UART and hardware-supported)
UrclockMega: ATmega1284P (similar to ATmega2560)
Beta Was this translation helpful? Give feedback.
All reactions