Skip to content

Commit 35919e9

Browse files
authored
settings: restore zero_init attribute for config_ram (#901)
1 parent ca591a4 commit 35919e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/daplink/settings/settings.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ typedef struct __attribute__((__packed__)) cfg_ram {
6666
COMPILER_ASSERT((offsetof(cfg_ram_t, hexdump) % sizeof(uint32_t)) == 0);
6767

6868
// Configuration RAM
69+
#if defined(__ARMCC)
70+
static cfg_ram_t config_ram __attribute__((section("cfgram"), zero_init));
71+
#else
6972
static cfg_ram_t config_ram __attribute__((section("cfgram")));
73+
#endif
74+
7075
// Ram copy of RAM config
7176
static cfg_ram_t config_ram_copy;
7277

0 commit comments

Comments
 (0)