add used attribute to two functions (#32545)
diff --git a/examples/platform/silabs/SoftwareFaultReports.cpp b/examples/platform/silabs/SoftwareFaultReports.cpp
index 0b73057..fd9be7f 100644
--- a/examples/platform/silabs/SoftwareFaultReports.cpp
+++ b/examples/platform/silabs/SoftwareFaultReports.cpp
@@ -82,7 +82,7 @@
/**
* Log register contents to UART when a hard fault occurs.
*/
-extern "C" void debugHardfault(uint32_t * sp)
+extern "C" __attribute__((used)) void debugHardfault(uint32_t * sp)
{
#if SILABS_LOG_ENABLED
uint32_t cfsr = SCB->CFSR;
diff --git a/examples/platform/silabs/heap_4_silabs.c b/examples/platform/silabs/heap_4_silabs.c
index a19bff0..8abb295 100644
--- a/examples/platform/silabs/heap_4_silabs.c
+++ b/examples/platform/silabs/heap_4_silabs.c
@@ -647,7 +647,7 @@
return pvPortRealloc(ptr, new_size);
}
-void * __wrap_calloc(size_t num, size_t size)
+__attribute__((used)) void * __wrap_calloc(size_t num, size_t size)
{
return pvPortCalloc(num, size);
}