Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EFR32] Add documentation and enable release build #16524

Merged
merged 2 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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