Skip to content

Conversation

ABOSTM
Copy link
Contributor

@ABOSTM ABOSTM commented Feb 10, 2020

Summary
EEPROM hardfault: eeprom_buffer should be 8 bytes aligned

Due to some cast on (uint64_t *) of eeprom_buffer,
compiler may use asm instruction LDRD which required an alignment:
4 bytes on Armv7 architecture,
and 8 bytes (depending on SCTLR.U) on Armv6 architecture.
To fit to all cases, alignment is made on 8 bytes.

Fixes #930

@fpistm fpistm added the fix 🩹 Bug fix label Feb 10, 2020
@fpistm fpistm added this to the 1.9.0 milestone Feb 10, 2020
Due to some cast on (uint64_t *) of eeprom_buffer,
compiler may use asm instruction LDRD which required an alignment:
4 bytes on Armv7 architecture,
and 8 bytes (depending on SCTLR.U) on Armv6 architecture.
To fit to all cases, alignment is made on 8 bytes.

Fixes stm32duino#930
Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fpistm fpistm merged commit c29e234 into stm32duino:master Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EEPROM usage hangs sometimes
2 participants