I would like to revive this post, which didn't seem to reach a conclusion: https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=123120&start=0&postdays=0&postorder=asc&highlight=
I've made a simple battery powered device with a tiny861A, which is supposed to run for months "“ maybe even years. Now, I was hoping that I could make a firmware upgrade without losing the contents of certain variables. These variables are defined in a struct, which is placed in the .noinit section. To make room for future "ordinary" variables, I told the linker to place the .noinit section on fixed address somewhat higher than the common memory area.
LDFLAGS += -Wl,--section-start=.noinit=0x8000E0
Now, this (almost) works nicely. I can make a hard reset, and the .noinit variable contents are intact. But after serial programming with an AVRISPmkII (hex file only), the SRAM seems to be cleared. All zeros, that is.
I tried different base addresses for .noinit, and also tried removing the mentioned LDFLAGS line, but none of it made any difference.
Neither the datasheet, nor the application notes I've searched through, mention anything about what happens to SRAM during serial programming.
Is what I'm trying to do just plain impossible? Anybody?