Skip to content

sim: support IVSEL, interrupt vectors in the boot section - #604

Open
teknoman117 wants to merge 1 commit into
buserror:masterfrom
teknoman117:boot-ivsel
Open

teknoman117 wants to merge 1 commit into
buserror:masterfrom
teknoman117:boot-ivsel

Conversation

@teknoman117

Copy link
Copy Markdown

Bootloaders that use interrupts (Caterina, LUFA CDC/DFU, ...) set MCUCR.IVSEL (GICR.IVSEL on the older megas) to move the vector table to the start of the boot section, and clear it before starting the application. simavr always used the vectors at 0, so such a bootloader ended up in the application's handlers.

The bit is declared by DEFAULT_CORE for every core whose avr-libc header defines IVSEL. While it is set, vectors are taken relative to reset_pc, which is where a bootloader is started from (BOOTRST). The IVCE timed sequence is not modeled.

Bootloaders that use interrupts (Caterina, LUFA CDC/DFU, ...) set
MCUCR.IVSEL (GICR.IVSEL on the older megas) to move the vector table to
the start of the boot section, and clear it before starting the
application. simavr always used the vectors at 0, so such a bootloader
ended up in the application's handlers.

The bit is declared by DEFAULT_CORE for every core whose avr-libc header
defines IVSEL. While it is set, vectors are taken relative to reset_pc,
which is where a bootloader is started from (BOOTRST). The IVCE timed
sequence is not modelled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant