mirror of
https://github.com/apache/nuttx.git
synced 2025-12-09 03:33:51 +08:00
boards/stm32f103-minimum: fix unaligned pointer to .data section in ld.script
This patch fix _eronly value which is used during boot process to initialize .data section to sram. Since .data section is 4 byte aligned in flash, also _eronly must follow this alignment to stay coherent with the start address of .data. If one of the sections preceeding .data has a size which is not 4 byte aligned, the _eronly value does not match with .data physical address resulting in wrong copy of data section to sram and thus an almost immediate hardfault. Signed-off-by: Federico Braghiroli <federico.braghiroli@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
9cd1c81149
commit
3d90079f50
@@ -88,7 +88,7 @@ SECTIONS
|
||||
_etbss = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
_eronly = LOADADDR(.data);
|
||||
|
||||
/* The STM32F103C8T6 has 20Kb of SRAM beginning at the following address */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user