Skip to content

Commit

Permalink
[slc] add a copy of the ot_crash_handler component that uses the ve…
Browse files Browse the repository at this point in the history
…ndor extension to print crash info instead of using the `internal_app_init` event

This also adds a ot-efr32 copy of `diagnostic.c` which fixes an `include` error.
```bash
/Users/matran/repos/ot-efr32/src/legacy_hal/diagnostic.c:31:10: fatal error: logging.h: No such file or directory
   31 | #include <logging.h>
      |          ^~~~~~~~~~~
```
  • Loading branch information
lmnotran committed Mar 8, 2024
1 parent 6ac78f7 commit 54a264c
Show file tree
Hide file tree
Showing 8 changed files with 1,491 additions and 0 deletions.
63 changes: 63 additions & 0 deletions slc/component/ot_crash_handler.slcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
id: ot_crash_handler
label: Crash Handler
package: OpenThread
category: OpenThread
quality: production
description: |-
This component provides a set of APIs for printing crash info.
In the case of a crash, this component captures the details.
The provided `efr32PrintResetInfo()` API prints the crash details.
provides:
- name: ot_crash_handler
conflicts:
- name: legacy_hal_soc
requires:
- name: component_catalog
- name: device
- name: emlib_rmu
- name: event_handler
include:
- path: third_party/silabs/gecko_sdk/protocol/openthread/src/legacy_hal/include
file_list:
- path: crash_handler.h
- path: third_party/silabs/gecko_sdk/platform/service/legacy_hal/inc
file_list:
- path: asm.h
- path: efm32_micro.h
condition:
- device_cortexm
- path: micro-common.h
- path: micro-types.h
- path: micro.h
- path: reset-def.h
- path: platform-header.h
- path: cortexm3/diagnostic.h
condition:
- device_cortexm
source:
- path: third_party/silabs/gecko_sdk/platform/service/legacy_hal/src/faults.s
- path: third_party/silabs/gecko_sdk/protocol/openthread/src/legacy_hal/crash_handler.c
- path: third_party/silabs/src/legacy_hal/diagnostic.c
define:
- name: "PLATFORM_HEADER"
value: "\"platform-header.h\""
- name: CORTEXM3_EFM32_MICRO
condition:
- device_cortexm
- name: CORTEXM3
condition:
- device_cortexm
- name: CORTEXM3_EFR32
condition:
- device_cortexm
- name: PHY_RAIL
condition:
- device_cortexm
template_contribution:
- name: component_catalog
value: ot_crash_handler
- name: event_handler
value:
event: platform_init
include: crash_handler.h
handler: sl_ot_crash_handler_init
1 change: 1 addition & 0 deletions slc/platform_projects/openthread-efr32-rcp-spi.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ quality: production

component:
- id: ot_crash_handler
from: ot-efr32
- id: ot_platform_abstraction_core
- id: ot_mbedtls
- id: ot_stack_features_config
Expand Down
1 change: 1 addition & 0 deletions slc/platform_projects/openthread-efr32-rcp-uart.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ quality: production

component:
- id: ot_crash_handler
from: ot-efr32
- id: ot_platform_abstraction_core
- id: ot_mbedtls
- id: ot_stack_features_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ quality: production

component:
- id: ot_crash_handler
from: ot-efr32
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ quality: production

component:
- id: ot_crash_handler
from: ot-efr32
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ quality: production

component:
- id: ot_crash_handler
from: ot-efr32
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
Expand Down
1 change: 1 addition & 0 deletions slc/platform_projects/openthread-efr32-soc.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ quality: production

component:
- id: ot_crash_handler
from: ot-efr32
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
Expand Down

0 comments on commit 54a264c

Please sign in to comment.