You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,6 @@ int main(void)
44
44
while (1)
45
45
{
46
46
PORTB ^= (1 << PB5); // Toggle the LED
47
-
48
47
_delay_ms(100); // Wait for 100 ms
49
48
}
50
49
@@ -306,23 +305,23 @@ Data: 162 bytes (7.9% Full)
306
305
307
306
This means that the total size of the `bootloader` program is 664 bytes. As you may noted that 162 bytes is exactly the size of `blinky` program stored in an array inside the `bootloader` program.
308
307
309
-
By setting the boot section size of flash memory to 512 words (1024 bytes) we can fit our bootloader program (664 bytes) in it. With this configuration the start address of the boot section becomes `0x3E00` (in words). By knowing that each word is equal to 2 bytes, the start address becomes `0x3E00 * 2 = 0x7C00`.
308
+
By setting the boot section size of flash memory to 1024 words (2048 bytes) we can fit our bootloader program (664 bytes) in it. With this configuration the start address of the boot section becomes `0x3C00` (in words). By knowing that each word is equal to 2 bytes, the start address becomes `0x3C00 * 2 = 0x7800`.
[Bootloader fuse bits setting in AVR® Fuse Calculator](https://www.engbedded.com/fusecalc/?P=ATmega328P&V_LOW=0xFF&V_HIGH=0xDC&V_EXTENDED=0xFD&O_HEX=Apply+values)
318
+
[Bootloader fuse bits setting in AVR® Fuse Calculator](https://www.engbedded.com/fusecalc/?P=ATmega328P&V_LOW=0xFF&V_HIGH=0xDA&V_EXTENDED=0xFD&O_HEX=Apply+values)
320
319
321
-
Adding `-Wl,-section-start=.text=0x7C00` flags to linker options of AVR-GCC makes start address of the bootloader program to be set on the start address of boot section.
320
+
Adding `-Wl,-section-start=.text=0x7800` flags to linker options of AVR-GCC makes start address of the bootloader program to be set on the start address of boot section.
0 commit comments