linguini1 commented on issue #16444: URL: https://github.com/apache/nuttx/issues/16444#issuecomment-2914913102
If I change the linker script such that: ```ld .data : { _sdata = ABSOLUTE(.); *(.rodata .rodata.*) *(.data .data.*) *(.gnu.linkonce.d.*) CONSTRUCTORS _edata = ABSOLUTE(.); } > sram AT > flash _eronly = LOADADDR(.data); ``` ```diff diff --git a/boards/avr/atmega/arduino-mega2560/scripts/flash.ld b/boards/avr/atmega/arduino-mega2560/scripts/flash.ld index f365646dfa..73a62017ed 100644 --- a/boards/avr/atmega/arduino-mega2560/scripts/flash.ld +++ b/boards/avr/atmega/arduino-mega2560/scripts/flash.ld @@ -122,7 +122,6 @@ SECTIONS _etext = . ; } > flash - _eronly = ABSOLUTE(.); .data : { @@ -134,6 +133,8 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash + _eronly = LOADADDR(.data); + .bss : { _sbss = ABSOLUTE(.); ``` I am able to boot into NSH. It appears the initializer data for the variables loaded to SRAM from FLASH is not actually getting stored in flash in the image. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org