Bootloader self-program - Juno AVR109 Rewrite Part 1 - Advanced AVR 3.0 Core

Channel:
Subscribers:
580
Published on ● Video Link: https://www.youtube.com/watch?v=l0yBbLboWV0



Duration: 2:20
2 views
0


This is not a rearrange and clone, but a completely rewrite, including the SPM and LPM code and the programming software. Most of the code are done, just need to combine them together and test it out. So Juno AVR109 is just a guinea pig for testing the Advanced AVR 3.0 Core - bootloader doctrines.

Original code Test:
1Mbps At:
4441 bytes/second write (7111-8648 b/s Technically maximum speed)
7772 bytes/second Read

Compiled size: 1288 bytes ( 1288/64= 21 pages )

Objectives:
Flexible, powerful and small:
Basic version: 256 bytes compiled and 7kb/s;
Full version: 512-1024 bytes compiled and 7kb/s;
Switch-less:
The original code uses an I/O pin's status to either enter normal Application section or enter Bootloader section. This is reasonable, but it's a dumb way to solve a simple dilemma. During power-on/plug-in, the MCU can either pick to start from APP or BOOT section, but not both, using a switch solves this problem. To enter bootloader section, so the MCU can be reprogrammed, simply put the switch on the correct position, then reset the MCU. To enter application section, do the same thing; Normally this is not a big problem, but if the board is used as development board, and the board is being programmed many times in a row, switching and resetting are very annoying.

Better solution:
During start up, the MCU goes to bootloader section by default; a 100ms-1s timer is started, if no serial signal is received in the delay period, then MCU switches to APP section automatically. Some serial chips can output a signal to reset the MCU, and the MCU is resetted automatically for the next programming event, or the MCU can be reset with a reset button manually during re-programming; or a micro-code is inserted in all Application code to detect a Serial re-programming request, and jump to the bootloader by itself or the MCU can reset itself using watchdog, and then enter bootloader by default. The option and solution are plentiful, using a jumper is very dumb.




Other Videos By Flyandance


2023-04-03NFS-Most-Wanted Gameplay (no sound): Screen az recorder test 2
2023-04-02Final Fantasy Tactics Gameplay: AzScreenRecorder screen capture test
2023-04-01Full kit Assembly Video Uncut (no sound): Juno Binary retro 2.0 - soldering SMT SMD
2023-03-31Mr.F's Straight Razor Hair Hanging Test HHT - FD Honing Service
2023-03-26New FDxBOOT 1.0.RC - 476 bytes - 4770 B/s @1Mpbs - Bootloader self-program - AVR109/AVR911/butterfly
2023-03-25Spoofing AVR109/AVR911/butterfly - Fixing its retarded protocol and Bootloader AVRdude AVROSP
2023-03-24Bootloader self-program - Juno AVR109 Beta/draft Part 2 - Advanced AVR 3.0 Core
2023-03-23AVR109 Deeper look
2023-03-22Cutting board is over-rated: Cut half onion by hand w/o one
2023-03-21Bare Minimal 2 | .init0 | naked | .ctors | signal | -nostartfiles - Advanced AVR 3.0 Core
2023-03-20Bootloader self-program - Juno AVR109 Rewrite Part 1 - Advanced AVR 3.0 Core
2023-03-19Bootloader self-program - AVR109 speed test avrdude - Advanced AVR 3.0 Core - 1Mbps with 8MHz CPU
2023-03-18Bootloader self-program - AVR109 w/ AVROSP and avrdude - Advanced AVR 3.0 Core
2023-03-17SPM 3.0 writes to self - Advanced AVR 3.0 Core Bootloader
2023-03-16SPM 2.0 writes to self - Advanced AVR 3.0 Core Bootloader
2023-03-14You jump, ijmp - Inline asm Indirect Jump - Advanced AVR 3.0 Core Bootloader
2023-03-05yt-dlp - A ultimate guide (The result of 2 weeks of hard work)
2023-03-03True bare Minimal code - Advanced AVR 3.0 Core Bootloader Pro Part 4 Size does matters getting naked
2023-02-28Bootloader-less Pro - Advanced AVR 3.0 Core - Part 3 - SPM - App Writes to App section - programmer
2023-02-27Bootloader-less Pro - Advanced AVR 3.0 Core - Part 2 - SPM erase self destruction code
2023-02-26Inline ASM - Advanced AVR 3.0 Core - LMP read from flash Load Program Memory