Skip to content

Commit

Permalink
[EFR32] Add documentation and enable release build (#16524)
Browse files Browse the repository at this point in the history
* Add documentation and enable release build
  • Loading branch information
jepenven-silabs authored and pull[bot] committed May 11, 2022
1 parent f25b475 commit 3429237
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ showDocumentation
shubhamdp
SIGINT
SiLabs
Silabs's
SiliconLabs
SimpleFileExFlags
SimpleLink
Expand Down
24 changes: 24 additions & 0 deletions examples/light-switch-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,27 @@ tracking code inside the `trackAlloc` and `trackFree` function
For the description of Software Update process with EFR32 example applications
see
[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md)
## Building options
All of Silabs's examples within the Matter repo have all the features enabled by
default, as to provide the best end user experience. However some of those
features can easily be toggled on or off. Here is a short list of options :
### Disabling logging
chip_progress_logging, chip_detail_logging, chip_automation_logging
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"
### Debug build / release build
is_debug
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false"
### Disabling LCD
show_qr_code
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false"
25 changes: 25 additions & 0 deletions examples/lighting-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,28 @@ commands to multiples devices at once. Please refer to the
[chip-tool documentation](../../chip-tool/README.md) _Configuring the server
side for Group Commands_ and _Using the Client to Send Group (Multicast) Matter
Commands_
## Building options
All of Silabs's examples within the Matter repo have all the features enabled by
default, as to provide the best end user experience. However some of those
features can easily be toggled on or off. Here is a short list of options to be
passed to the build scripts.
### Disabling logging
chip_progress_logging, chip_detail_logging, chip_automation_logging
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"
### Debug build / release build
is_debug
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false"
### Disabling LCD
show_qr_code
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false"
24 changes: 24 additions & 0 deletions examples/lock-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,27 @@ tracking code inside the `trackAlloc` and `trackFree` function
For the description of Software Update process with EFR32 example applications
see
[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md)
## Building options
All of Silabs's examples within the Matter repo have all the features enabled by
default, as to provide the best end user experience. However some of those
features can easily be toggled on or off. Here is a short list of options :
### Disabling logging
chip_progress_logging, chip_detail_logging, chip_automation_logging
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"
### Debug build / release build
is_debug
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false"
### Disabling LCD
show_qr_code
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false"
24 changes: 24 additions & 0 deletions examples/window-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,27 @@ combination with JLinkRTTClient as follows:
For the description of Software Update process with EFR32 example applications
see
[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md)
## Building options
All of Silabs's examples within the Matter repo have all the features enabled by
default, as to provide the best end user experience. However some of those
features can easily be toggled on or off. Here is a short list of options :
### Disabling logging
chip_progress_logging, chip_detail_logging, chip_automation_logging
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"
### Debug build / release build
is_debug
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false"
### Disabling LCD
show_qr_code
$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false"
5 changes: 1 addition & 4 deletions src/platform/EFR32/CHIPMem-Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,22 @@ static void VerifyInitialized(const char * func)

CHIP_ERROR MemoryAllocatorInit(void * buf, size_t bufSize)
{
#ifndef NDEBUG
if (memoryInitialized++ > 0)
{
fprintf(stderr, "ABORT: chip::Platform::MemoryInit() called twice.\n");
abort();
}
#endif

return CHIP_NO_ERROR;
}

void MemoryAllocatorShutdown()
{
#ifndef NDEBUG
if (--memoryInitialized < 0)
{
fprintf(stderr, "ABORT: chip::Platform::MemoryShutdown() called twice.\n");
abort();
}
#endif
}

void * MemoryAlloc(size_t size)
Expand Down

0 comments on commit 3429237

Please sign in to comment.