Hello,
there is quite nasty bug in linker script - load address of .data is not properly aligned, when source is modified, it gets unaligned a then hard fault is triggered (mainly because Title and Meter are wrongly initialized and used to address string to print). Also some of stm library data was not initialized properly (.data* fixes this)
this should fix this problem:
[code]— a/src/app/main.lds
+++ b/src/app/main.lds
@@ -28,27 +28,32 @@ SECTIONS
BIOS.o
}
- .text : {
- .isr_vector : {
_vectors = .;
(.isr_vectors) / Vector table */ - } >rom
- .text : {
(.text) /* Program code /
(.rodata) / Read only data */ -
} >rom. = ALIGN(4); _etext = .; _sidata = _etext;
- . = 0x20000000; /* From 0x20000000 */
- .data : {
- .data : AT ( _sidata ) {
_sdata = . ;
-
*(.data) /* Data memory */
-
*(.data*) /* Data memory */
-
. = ALIGN(4); _edata = .;
- } >ram AT > rom
- } >ram
- .bss : {
- .bss (NOLOAD) : {
_sbss = .;
(.bss) / Zero-filled run time allocate data memory */ -
_ebss = .;. = ALIGN(4);
} >ram AT > rom
}
/========== end of file ==========/
[/code]