diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index 1596316e8d2099..2732127491fa16 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -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 } diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index e38d406952f8c7..79abd39e092270 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -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 } diff --git a/examples/platform/efr32/ldscripts/efr32mg12.ld b/examples/platform/efr32/ldscripts/efr32mg12.ld index 549fb8752efd83..a2a81ed9ccc683 100644 --- a/examples/platform/efr32/ldscripts/efr32mg12.ld +++ b/examples/platform/efr32/ldscripts/efr32mg12.ld @@ -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 */ @@ -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.") -} \ No newline at end of file +} diff --git a/examples/platform/efr32/ldscripts/efr32mg24.ld b/examples/platform/efr32/ldscripts/efr32mg24.ld index 0eafccd8af3340..8778f772235876 100644 --- a/examples/platform/efr32/ldscripts/efr32mg24.ld +++ b/examples/platform/efr32/ldscripts/efr32mg24.ld @@ -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 */ @@ -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.") -} \ No newline at end of file +} diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index 1ab9f0ddce3376..50cba8f89afd9b 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -218,6 +218,12 @@ efr32_executable("window_app") { "-fstack-usage", ] } + if (use_rs911x || use_wf200) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } } group("efr32") {