Repository navigation
Conversation
matpala
force-pushed
the
regz/atdf-inlined-offsets
branch
from
October 15, 2026 16:32
c1f2f2c to
730a9a0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1072
Cuando un modulo tiene un solo grupo de registros con su mismo nombre, regz lo inlinea, y la instancia quedaba en offset 0 con los registros en direcciones absolutas.
Por eso perifericos como el SPI del ATmega328P salian en la direccion 0. Ahora, si todas las instancias del modulo estan en offset 0, el registro mas bajo pasa a ser la base (SPI en 0x4C, SPCR en 0). Si alguna instancia esta en otra direccion, los offsets quedan como estaban (SYSCFG del ATtiny1616).
Los HAL de SPI e interrupciones del ATmega328P ahora usan chip.peripherals.SPI y chip.peripherals.CPU en vez del workaround con @offsetof.
Lo probe con los tests de regz, los de los ports, los ejemplos de atmega y attiny dan .hex identicos. La salida de regz para ATSAMD51J19A y ATtiny1616 no cambia.