Skip to content

Commit

Permalink
[EFR32]Remove Thread NVM section in the linker file for WiFi builds (#…
Browse files Browse the repository at this point in the history
…14787)

* Remove Thread NVM section in the linker file for WiFi builds

* Restyled by gn

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
jmartinez-silabs and restyled-commits authored Feb 4, 2022
1 parent 4b37bd5 commit c5437aa
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
6 changes: 6 additions & 0 deletions examples/lighting-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ efr32_executable("lighting_app") {
"-fstack-usage",
]
}
if (use_rs911x || use_wf200) {
ldflags += [
"-Wl,--defsym",
"-Wl,SILABS_WIFI=1",
]
}

output_dir = root_out_dir
}
Expand Down
6 changes: 6 additions & 0 deletions examples/lock-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ efr32_executable("lock_app") {
"-fstack-usage",
]
}
if (use_rs911x || use_wf200) {
ldflags += [
"-Wl,--defsym",
"-Wl,SILABS_WIFI=1",
]
}

output_dir = root_out_dir
}
Expand Down
6 changes: 3 additions & 3 deletions examples/platform/efr32/ldscripts/efr32mg12.ld
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ SECTIONS
__nvm3_dummy_chip = .;
KEEP(*(chipNvm3_section));
. = ALIGN (8192);
. += OPENTHREAD_NVM_SIZE;
. = ALIGN (8192);
. += DEFINED(SILABS_WIFI) ? 0 : OPENTHREAD_NVM_SIZE;
. = DEFINED(SILABS_WIFI) ? . : ALIGN (8192);
} > FLASH

/* Set NVM to end of FLASH */
Expand Down Expand Up @@ -286,4 +286,4 @@ SECTIONS
/* Check if FLASH usage exceeds FLASH size */
ASSERT( LENGTH(FLASH) >= (__etext + SIZEOF(.data)), "FLASH memory overflowed !")
ASSERT((__etext + SIZEOF(.data)) <= __nvm3Base, "FLASH memory overlapped with NVM section.")
}
}
6 changes: 3 additions & 3 deletions examples/platform/efr32/ldscripts/efr32mg24.ld
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ SECTIONS
__nvm3_dummy_chip = .;
KEEP(*(chipNvm3_section));
. = ALIGN (8192);
. += OPENTHREAD_NVM_SIZE;
. = ALIGN (8192);
. += DEFINED(SILABS_WIFI) ? 0 : OPENTHREAD_NVM_SIZE;
. = DEFINED(SILABS_WIFI) ? . : ALIGN (8192);
} > FLASH

/* Set NVM to end of FLASH */
Expand Down Expand Up @@ -286,4 +286,4 @@ SECTIONS
/* Check if FLASH usage exceeds FLASH size */
ASSERT( (ORIGIN(FLASH) + LENGTH(FLASH)) >= (__etext + SIZEOF(.data)), "FLASH memory overflowed !")
ASSERT((__etext + SIZEOF(.data)) <= __nvm3Base, "FLASH memory overlapped with NVM section.")
}
}
6 changes: 6 additions & 0 deletions examples/window-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ efr32_executable("window_app") {
"-fstack-usage",
]
}
if (use_rs911x || use_wf200) {
ldflags += [
"-Wl,--defsym",
"-Wl,SILABS_WIFI=1",
]
}
}

group("efr32") {
Expand Down

0 comments on commit c5437aa

Please sign in to comment.