Merge remote-tracking branch 'github/main' into HEAD

<fxrev.dev/678949> needs to land prior to this CL.

Upstream-Commit: 645fbcd400d2e6c2de641bccb0335e3eaaed1f36
Change-Id: I9e2c785bcae75f25d5ad57d30330bcf3132d0344
diff --git a/BUILD.gn b/BUILD.gn
index 1d2ff99..512bfc4 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -28,6 +28,13 @@
 import("etc/gn/openthread.gni")
 
 config("openthread_config") {
+  cflags = [
+    "-Wno-ambiguous-reversed-operator",
+    "-Wno-deprecated-copy",
+    "-Wno-implicit-fallthrough",
+    "-Wno-extra-semi",
+    "-Wno-unused-but-set-variable",
+  ]
   defines = []
   if (openthread_config_file != "") {
     defines += [ "OPENTHREAD_CONFIG_FILE=${openthread_config_file}" ]
@@ -41,6 +48,25 @@
   ]
 }
 
+# TODO(fxbug.dev/78118): Need to explore splitting with templates
+config("openthread_config_legacy_extensions") {
+  cflags = [
+    "-Wno-ambiguous-reversed-operator",
+    "-Wno-deprecated-copy",
+    "-Wno-implicit-fallthrough",
+    "-Wno-extra-semi",
+  ]
+  defines = []
+  defines += [ "OPENTHREAD_CONFIG_FILE=\"openthread-config-fuchsia-legacy-extensions.h\"" ]
+
+  include_dirs = openthread_project_include_dirs
+
+  include_dirs += [
+    "${root_gen_dir}/include",
+    "include",
+  ]
+}
+
 config("openthread_ftd_config") {
   defines = [
     "OPENTHREAD_FTD=1",
@@ -70,16 +96,32 @@
   deps = [ "src/core:libopenthread-ftd" ]
 }
 
+group("libopenthread-ftd-legacy-extensions") {
+  public_deps = [ "include/openthread:openthread_legacy_extensions" ]
+  deps = [ "src/core:libopenthread-ftd-legacy-extensions" ]
+}
+
+
 group("libopenthread-mtd") {
   public_deps = [ "include/openthread" ]
   deps = [ "src/core:libopenthread-mtd" ]
 }
 
+group("libopenthread-mtd-legacy-extensions") {
+  public_deps = [ "include/openthread:openthread_legacy_extensions" ]
+  deps = [ "src/core:libopenthread-mtd-legacy-extensions" ]
+}
+
 group("libopenthread-radio") {
   public_deps = [ "include/openthread" ]
   deps = [ "src/core:libopenthread-radio" ]
 }
 
+group("libopenthread-radio-legacy-extensions") {
+  public_deps = [ "include/openthread:openthread_legacy_extensions" ]
+  deps = [ "src/core:libopenthread-radio-legacy-extensions" ]
+}
+
 group("libopenthread-cli-ftd") {
   public_deps = [ "include/openthread" ]
   deps = [ "src/cli:libopenthread-cli-ftd" ]
@@ -90,22 +132,51 @@
   deps = [ "src/cli:libopenthread-cli-mtd" ]
 }
 
+group("libopenthread-cli-ftd-legacy-extensions") {
+  public_deps = [ "include/openthread:openthread_legacy_extensions" ]
+  deps = [ "src/cli:libopenthread-cli-ftd-legacy-extensions" ]
+}
+
+group("libopenthread-cli-mtd-legacy-extensions") {
+  public_deps = [ "include/openthread:openthread_legacy_extensions" ]
+  deps = [ "src/cli:libopenthread-cli-mtd-legacy-extensions" ]
+}
+
 group("libopenthread-spinel-ncp") {
   public_deps = [ "src/lib/spinel:spinel-api" ]
   deps = [ "src/lib/spinel:libopenthread-spinel-ncp" ]
 }
 
+group("libopenthread-spinel-ncp-legacy-extensions") {
+  public_deps = [ "src/lib/spinel:spinel-api" ]
+  deps = [ "src/lib/spinel:libopenthread-spinel-ncp-legacy-extensions" ]
+}
+
 group("libopenthread-spinel-rcp") {
   public_deps = [ "src/lib/spinel:spinel-api" ]
   deps = [ "src/lib/spinel:libopenthread-spinel-rcp" ]
 }
 
+group("libopenthread-spinel-rcp-legacy-extensions") {
+  public_deps = [ "src/lib/spinel:spinel-api" ]
+  deps = [ "src/lib/spinel:libopenthread-spinel-rcp-legacy-extensions" ]
+}
+
 if (current_os == "fuchsia") {
   group("lib-ot-core") {
     public_deps = [
-      ":libopenthread-ftd",
+      ":libopenthread-cli-ftd",
       "src/core:libopenthread-ftd",
+      "src/cli:libopenthread-cli-ftd",
       "src/ncp:libopenthread-ncp-ftd",
     ]
   }
+
+  group("lib-ot-core-legacy-extensions") {
+    public_deps = [
+      ":libopenthread-ftd-legacy-extensions",
+      "src/core:libopenthread-ftd-legacy-extensions",
+      "src/ncp:libopenthread-ncp-ftd-legacy-extensions",
+    ]
+  }
 }
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..4cad6b3
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,4 @@
+vaas@google.com
+jiamingw@google.com
+paragdixit@google.com
+rquattle@google.com
diff --git a/etc/gn/openthread.gni b/etc/gn/openthread.gni
index fe494b0..68e6ecb 100644
--- a/etc/gn/openthread.gni
+++ b/etc/gn/openthread.gni
@@ -26,6 +26,9 @@
 #
 
 _openthread_config_file = ""
+if (current_os == "fuchsia") {
+  _openthread_config_file = "<openthread-config-fuchsia.h>"
+}
 
 declare_args() {
   # OpenThread config header.
@@ -67,7 +70,7 @@
 if (openthread_enable_core_config_args) {
   declare_args() {
     # Thread version: 1.1, 1.2
-    openthread_config_thread_version = ""
+    openthread_config_thread_version = "1.2"
 
     # Log output: none, debug_uart, app, platform
     openthread_config_log_output = ""
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
deleted file mode 100644
index 928e58f..0000000
--- a/examples/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_subdirectory(platforms)
-
-if(OT_BUILD_EXECUTABLES)
-    add_subdirectory(apps)
-endif()
diff --git a/examples/Makefile-cc2538 b/examples/Makefile-cc2538
deleted file mode 100644
index 99d895a..0000000
--- a/examples/Makefile-cc2538
+++ /dev/null
@@ -1,309 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-.NOTPARALLEL:
-
-AR                              = arm-none-eabi-ar
-CCAS                            = arm-none-eabi-as
-CPP                             = arm-none-eabi-cpp
-CC                              = arm-none-eabi-gcc
-CXX                             = arm-none-eabi-g++
-LD                              = arm-none-eabi-ld
-STRIP                           = arm-none-eabi-strip
-NM                              = arm-none-eabi-nm
-RANLIB                          = arm-none-eabi-ranlib
-OBJCOPY                         = arm-none-eabi-objcopy
-
-BuildJobs                      ?= 10
-
-configure_OPTIONS               = \
-    --enable-cli                  \
-    --enable-ftd                  \
-    --enable-mtd                  \
-    --enable-ncp                  \
-    --enable-radio-only           \
-    --enable-linker-map           \
-    --with-examples=cc2538        \
-    $(NULL)
-
-TopSourceDir                    := $(dir $(shell readlink $(firstword $(MAKEFILE_LIST))))..
-AbsTopSourceDir                 := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))..
-
-CC2538_CONFIG_FILE_CPPFLAGS  = -DOPENTHREAD_PROJECT_CORE_CONFIG_FILE='\"openthread-core-cc2538-config.h\"'
-CC2538_CONFIG_FILE_CPPFLAGS += -DOPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE='\"openthread-core-cc2538-config-check.h\"'
-CC2538_CONFIG_FILE_CPPFLAGS += -I$(AbsTopSourceDir)/examples/platforms/cc2538/
-
-COMMONCFLAGS                    := \
-    -fdata-sections                \
-    -ffunction-sections            \
-    -Os                            \
-    -g                             \
-    $(CC2538_CONFIG_FILE_CPPFLAGS) \
-    $(NULL)
-
-include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/common-switches.mk
-
-# Optional CC2592 options, first and foremost, whether to enable support for it
-# at all.
-ifeq ($(CC2592),1)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2538_WITH_CC2592=1
-
-# If the PA_EN is on another port C pin, specify it with CC2592_PA_PIN.
-ifneq ($(CC2592_PA_EN),)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2592_PA_EN_PIN=$(CC2592_PA_EN)
-endif
-
-# If the LNA_EN is on another port C pin, specify it with CC2592_LNA_PIN.
-ifneq ($(CC2592_LNA_EN),)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2592_LNA_EN_PIN=$(CC2592_LNA_EN)
-endif
-
-# If we're not using HGM, set CC2538_USE_HGM to 0.
-ifeq ($(CC2592_USE_HGM),0)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2592_USE_HGM=0
-else # CC2592_USE_HGM=1
-
-# HGM in use, if not on port D, specify the port here (A, B or C) with CC2592_HGM_PORT.
-ifneq ($(CC2592_HGM_PORT),)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2592_HGM_PORT=GPIO_$(CC2592_HGM_PORT)_BASE
-endif
-
-# If HGM is not at pin 2, specify which pin here with CC2592_HGM_PIN.
-ifneq ($(CC2592_HGM_PIN),)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2592_HGM_PIN=$(CC2592_HGM_PIN)
-endif
-
-# If we want it off by default, specify CC2592_HGM_DEFAULT_STATE=0
-ifeq ($(CC2592_HGM_DEFAULT_STATE),0)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE=false
-endif
-
-endif # CC2592_USE_HGM
-
-endif # CC2592
-
-ifneq ($(CC2538_RECEIVE_SENSITIVITY),)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY=$(CC2538_RECEIVE_SENSITIVITY)
-endif
-
-ifneq ($(CC2538_RSSI_OFFSET),)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_CC2538_RSSI_OFFSET=$(CC2538_RSSI_OFFSET)
-endif
-
-CPPFLAGS                       += \
-    $(COMMONCFLAGS)               \
-    $(target_CPPFLAGS)            \
-    $(NULL)
-
-CFLAGS                         += \
-    $(COMMONCFLAGS)               \
-    $(target_CFLAGS)              \
-    $(NULL)
-
-CXXFLAGS                       += \
-    $(COMMONCFLAGS)               \
-    $(target_CXXFLAGS)            \
-    -fno-exceptions               \
-    -fno-rtti                     \
-    $(NULL)
-
-LDFLAGS                        += \
-    $(COMMONCFLAGS)               \
-    $(target_LDFLAGS)             \
-    -nostartfiles                 \
-    -specs=nano.specs             \
-    -specs=nosys.specs            \
-    -Wl,--gc-sections             \
-    $(NULL)
-
-ECHO                            := @echo
-MAKE                            := make
-MKDIR_P                         := mkdir -p
-LN_S                            := ln -s
-RM_F                            := rm -f
-
-INSTALL                         := /usr/bin/install
-INSTALLFLAGS                    := -p
-
-BuildPath                       = build
-TopBuildDir                     = $(BuildPath)
-AbsTopBuildDir                  = $(PWD)/$(TopBuildDir)
-
-ResultPath                      = output
-TopResultDir                    = $(ResultPath)
-AbsTopResultDir                 = $(PWD)/$(TopResultDir)
-
-TargetTuple                     = cc2538
-
-ARCHS                           = cortex-m3
-
-TopTargetLibDir                 = $(TopResultDir)/$(TargetTuple)/lib
-
-ifndef BuildJobs
-BuildJobs := $(shell getconf _NPROCESSORS_ONLN)
-endif
-JOBSFLAG := -j$(BuildJobs)
-
-#
-# configure-arch <arch>
-#
-# Configure OpenThread for the specified architecture.
-#
-#   arch - The architecture to configure.
-#
-define configure-arch
-$(ECHO) "  CONFIG   $(TargetTuple)..."
-(cd $(BuildPath)/$(TargetTuple) && $(AbsTopSourceDir)/configure \
-INSTALL="$(INSTALL) $(INSTALLFLAGS)" \
-CPP="$(CPP)" CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" OBJCXX="$(OBJCXX)" AR="$(AR)" RANLIB="$(RANLIB)" NM="$(NM)" STRIP="$(STRIP)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
---host=arm-none-eabi \
---prefix=/ \
---exec-prefix=/$(TargetTuple) \
-$(configure_OPTIONS))
-endef # configure-arch
-
-#
-# build-arch <arch>
-#
-# Build the OpenThread intermediate build products for the specified
-# architecture.
-#
-#   arch - The architecture to build.
-#
-define build-arch
-$(ECHO) "  BUILD    $(TargetTuple)"
-$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
-all
-endef # build-arch
-
-#
-# stage-arch <arch>
-#
-# Stage (install) the OpenThread final build products for the specified
-# architecture.
-#
-#   arch - The architecture to stage.
-#
-define stage-arch
-$(ECHO) "  STAGE    $(TargetTuple)"
-$(MAKE) $(JOBSFLAG) -C $(BuildPath)/$(TargetTuple) --no-print-directory \
-DESTDIR=$(AbsTopResultDir) \
-install
-endef # stage-arch
-
-#
-# ARCH_template <arch>
-#
-# Define macros, targets and rules to configure, build, and stage the
-# OpenThread for a single architecture.
-#
-#   arch - The architecture to instantiate the template for.
-#
-define ARCH_template
-CONFIGURE_TARGETS += configure-$(1)
-BUILD_TARGETS     += do-build-$(1)
-STAGE_TARGETS     += stage-$(1)
-BUILD_DIRS        += $(BuildPath)/$(TargetTuple)
-DIRECTORIES       += $(BuildPath)/$(TargetTuple)
-
-configure-$(1): target_CPPFLAGS=$($(1)_target_CPPFLAGS)
-configure-$(1): target_CFLAGS=$($(1)_target_CFLAGS)
-configure-$(1): target_CXXFLAGS=$($(1)_target_CXXFLAGS)
-configure-$(1): target_LDFLAGS=$($(1)_target_LDFLAGS)
-
-configure-$(1): $(BuildPath)/$(TargetTuple)/config.status
-
-$(BuildPath)/$(TargetTuple)/config.status: | $(BuildPath)/$(TargetTuple)
-	$$(call configure-arch,$(1))
-
-do-build-$(1): configure-$(1)
-
-do-build-$(1):
-	+$$(call build-arch,$(1))
-
-stage-$(1): do-build-$(1)
-
-stage-$(1): | $(TopResultDir)
-	$$(call stage-arch,$(1))
-
-$(1): stage-$(1)
-endef # ARCH_template
-
-.DEFAULT_GOAL := all
-
-all: stage
-
-#
-# cortex-m3
-#
-
-cortex-m3_target_ABI                  = cortex-m3
-cortex-m3_target_CPPFLAGS             = -mcpu=cortex-m3 -mfloat-abi=soft -mthumb
-cortex-m3_target_CFLAGS               = -mcpu=cortex-m3 -mfloat-abi=soft -mthumb
-cortex-m3_target_CXXFLAGS             = -mcpu=cortex-m3 -mfloat-abi=soft -mthumb
-cortex-m3_target_LDFLAGS              = -mcpu=cortex-m3 -mfloat-abi=soft -mthumb
-
-# Instantiate an architecture-specific build template for each target
-# architecture.
-
-$(foreach arch,$(ARCHS),$(eval $(call ARCH_template,$(arch))))
-
-#
-# Common / Finalization
-#
-
-configure: $(CONFIGURE_TARGETS)
-
-build: $(BUILD_TARGETS)
-
-stage: $(STAGE_TARGETS)
-
-DIRECTORIES     = $(TopResultDir) $(TopResultDir)/$(TargetTuple)/lib $(BUILD_DIRS)
-
-CLEAN_DIRS      = $(TopResultDir) $(BUILD_DIRS)
-
-all: stage
-
-$(DIRECTORIES):
-	$(ECHO) "  MKDIR    $@"
-	@$(MKDIR_P) "$@"
-
-clean:
-	$(ECHO) "  CLEAN"
-	@$(RM_F) -r $(CLEAN_DIRS)
-
-help:
-	$(ECHO) "Simply type 'make -f $(firstword $(MAKEFILE_LIST))' to build OpenThread for the following "
-	$(ECHO) "architectures: "
-	$(ECHO) ""
-	$(ECHO) "    $(ARCHS)"
-	$(ECHO) ""
-	$(ECHO) "To build only a particular architecture, specify: "
-	$(ECHO) ""
-	$(ECHO) "    make -f $(firstword $(MAKEFILE_LIST)) <architecture>"
-	$(ECHO) ""
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644
index 8d15e20..0000000
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-# Always package (e.g. for 'make dist') these subdirectories.
-
-DIST_SUBDIRS                            = \
-    platforms                             \
-    apps                                  \
-    $(NULL)
-
-# Always build (e.g. for 'make all') these subdirectories.
-
-SUBDIRS                                 = \
-    platforms                             \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_EXAMPLES
-SUBDIRS                                += \
-    apps                                  \
-    $(NULL)
-endif
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/README.md b/examples/README.md
deleted file mode 100644
index 2d0f5d5..0000000
--- a/examples/README.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# Common switches
-
-OpenThread allows you to [configure](https://openthread.io/guides/build#configuration) the stack for different functionality and behavior. This configuration is based on changing compile-time constants during the build process using common switches listed in `/examples/common-switches.mk`.
-
-This page lists the available common switches with description. Unless stated otherwise, the switches are set to 0 by default. For build command examples, see [build examples](https://openthread.io/guides/build#build_examples).
-
-| Makefile switch | CMake switch | Description |
-| --- | --- | --- |
-| ANYCAST_LOCATOR | OT_ANYCAST_LOCATOR | Enables anycast locator functionality. |
-| BACKBONE_ROUTER | OT_BACKBONE_ROUTER | Enables Backbone Router functionality for Thread 1.2. |
-| BIG_ENDIAN | OT_BIG_ENDIAN | Allows the host platform to use big-endian byte order. |
-| BORDER_AGENT | OT_BORDER_AGENT | Enables support for border agent. In most cases, enable this switch if you are building On-mesh Commissioner or Border Router with External Commissioning support. |
-| BORDER_ROUTER | OT_BORDER_ROUTER | Enables support for Border Router. This switch is usually combined with the BORDER_AGENT and UDP_FORWARD (or PLATFORM_UDP in case of RCP design) switches to build Border Router device. |
-| BORDER_ROUTING | OT_BORDER_ROUTING | Enables bi-directional border routing between Thread and Infrastructure networks for Border Router. |
-| BORDER_ROUTING_NAT64 | OT_BORDER_ROUTING_NAT64 | Enables NAT64 border routing support for Border Router. |
-| BUILTIN_MBEDTLS_MANAGEMENT | OT_BUILTIN_MBEDTLS_MANAGEMENT | Enables the built-in mbedTLS management. Enable this switch if the external mbedTLS is used, but mbedTLS memory allocation and debug config should be managed internally by OpenThread. |
-| CHANNEL_MANAGER | OT_CHANNEL_MANAGER | Enables support for channel manager. Enable this switch on devices that are supposed to request a Thread network channel change. This switch should be used only with an FTD build. |
-| CHANNEL_MONITOR | OT_CHANNEL_MONITOR | Enables support for channel monitor. Enable this switch on devices that are supposed to determine the cleaner channels. |
-| CHILD_SUPERVISION | OT_CHILD_SUPERVISION | Enables support for [child supervision](https://openthread.io/guides/build/features/child-supervision). Enable this switch on a parent or child node with custom OpenThread application that manages the supervision, checks timeout intervals, and verifies connectivity between parent and child. |
-| COAP | OT_COAP | Enables support for the CoAP API. Enable this switch if you want to control Constrained Application Protocol communication. |
-| COAP_OBSERVE | OT_COAP_OBSERVE | Enables support for CoAP Observe (RFC7641) API. |
-| COAPS | OT_COAPS | Enables support for the secure CoAP API. Enable this switch if you want to control Constrained Application Protocol Secure (CoAP over DTLS) communication. |
-| COMMISSIONER | OT_COMMISSIONER | Enables support for Commissioner. Enable this switch on device that is able to perform Commissioner role. |
-| COVERAGE | OT_COVERAGE | Enables the generation of code-coverage instances. |
-| CSL_RECEIVER | OT_CSL_RECEIVER | Enables CSL receiver feature for Thread 1.2. |
-| DEBUG | not implemented | Allows building debug instance. Code optimization is disabled. |
-| DHCP6_CLIENT | OT_DHCP6_CLIENT | Enables support for the DHCP6 client. The device is able to act as typical DHCP client. Enable this switch on a device that is supposed to request networking parameters from the DHCP server. |
-| DHCP6_SERVER | OT_DHCP6_SERVER | Enables support for the DHCP6 server. The device is able to act as typical DHCP server. Enable this switch on a device that is supposed to provide networking parameters to devices with DHCP_CLIENT switch enabled. |
-| DIAGNOSTIC | OT_DIAGNOSTIC | Enables diagnostic support. Enable this switch on a device that is tested in the factory production stage. |
-| DISABLE_BUILTIN_MBEDTLS | not implemented | Disables OpenThread's mbedTLS build. Enable this switch if you do not want to use the built-in mbedTLS and you do not want to manage mbedTLS internally. Enabling this switch will disable support for such features as memory allocation and debug. |
-| DISABLE_DOC | not implemented | Disables building of the documentation. |
-| DISABLE_EXECUTABLE | not implemented | Disables building of executables. |
-| DISABLE_TOOLS | not implemented | Disables building of tools. |
-| DEBUG_UART | not implemented | Enables the Debug UART platform feature. |
-| DEBUG_UART_LOG | not implemented | Enables the log output for the debug UART. Requires OPENTHREAD_CONFIG_ENABLE_DEBUG_UART to be enabled. |
-| DNS_CLIENT | OT_DNS_CLIENT | Enables support for DNS client. Enable this switch on a device that sends a DNS query for AAAA (IPv6) record. |
-| DNS_DSO | OT_DNS_DSO | Enables support for DNS Stateful Operations (DSO). |
-| DNSSD_SERVER | OT_DNSSD_SERVER | Enables support for DNS-SD server. DNS-SD server use service information from local SRP server to resolve DNS-SD query questions. |
-| DUA | OT_DUA | Enables the Domain Unicast Address feature for Thread 1.2. |
-| DYNAMIC_LOG_LEVEL | not implemented | Enables the dynamic log level feature. Enable this switch if OpenThread log level is required to be set at runtime. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
-| ECDSA | OT_ECDSA | Enables support for Elliptic Curve Digital Signature Algorithm. Enable this switch if ECDSA digital signature is used by application. |
-| EXCLUDE_TCPLP_LIB | OT_EXCLUDE_TCPLP_LIB | Exclude TCPlp library from the build. |
-| EXTERNAL_HEAP | OT_EXTERNAL_HEAP | Enables support for external heap. Enable this switch if the platform uses its own heap. Make sure to specify the external heap Calloc and Free functions to be used by the OpenThread stack. |
-| FULL_LOGS | OT_FULL_LOGS | Enables all log levels and regions. This switch sets the log level to OT_LOG_LEVEL_DEBG and turns on all region flags. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
-| HISTORY_TRACKER | OT_HISTORY_TRACKER | Enables support for History Tracker. |
-| IP6_FRAGM | OT_IP6_FRAGM | Enables support for IPv6 fragmentation. |
-| JAM_DETECTION | OT_JAM_DETECTION | Enables support for [Jam Detection](https://openthread.io/guides/build/features/jam-detection). Enable this switch if a device requires the ability to detect signal jamming on a specific channel. |
-| JOINER | OT_JOINER | Enables [support for Joiner](https://openthread.io/reference/group/api-joiner). Enable this switch on a device that has to be commissioned to join the network. |
-| LEGACY | OT_LEGACY | Enables support for legacy network. |
-| LINK_RAW | OT_LINK_RAW | Enables the Link Raw service. |
-| LOG_OUTPUT | not implemented | Defines if the LOG output is to be created and where it goes. There are several options available: `NONE`, `DEBUG_UART`, `APP`, `PLATFORM_DEFINED` (default). See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
-| MAC_FILTER | OT_MAC_FILTER | Enables support for the MAC filter. |
-| MLE_LONG_ROUTES | OT_MLE_LONG_ROUTES | Enables the MLE long routes extension. **Note: Enabling this feature breaks conformance to the Thread Specification.** |
-| MLR | OT_MLR | Enables Multicast Listener Registration feature for Thread 1.2. |
-| MTD_NETDIAG | OT_MTD_NETDIAG | Enables the TMF network diagnostics on MTDs. |
-| MULTIPLE_INSTANCE | OT_MULTIPLE_INSTANCE | Enables multiple OpenThread instances. |
-| NETDATA_PUBLISHER | OT_NETDATA_PUBLISHER | Enables support for Thread Network Data publisher. |
-| PING_SENDER | OT_PING_SENDER | Enables support for ping sender. |
-| OTNS | OT_OTNS | Enables support for [OpenThread Network Simulator](https://github.com/openthread/ot-ns). Enable this switch if you are building OpenThread for OpenThread Network Simulator. |
-| PLATFORM_UDP | OT_PLATFORM_UDP | Enables platform UDP support. |
-| REFERENCE_DEVICE | OT_REFERENCE_DEVICE | Enables support for Thread Test Harness reference device. Enable this switch on the reference device during certification. |
-| SERVICE | OT_SERVICE | Enables support for injecting Service entries into the Thread Network Data. |
-| SETTINGS_RAM | OT_SETTINGS_RAM | Enables volatile-only storage of settings. |
-| SLAAC | OT_SLAAC | Enables support for adding auto-configured SLAAC addresses by OpenThread. This feature is enabled by default. |
-| SNTP_CLIENT | OT_SNTP_CLIENT | Enables support for SNTP Client. |
-| SPINEL_ENCRYPTER_LIBS | not implemented | Specifies library files (absolute paths) for implementing the NCP Spinel Encrypter. |
-| SRP_CLIENT | OT_SRP_CLIENT | Enable support for SRP client. |
-| SRP_SERVER | OT_SRP_SERVER | Enable support for SRP server. |
-| THREAD_VERSION | OT_THREAD_VERSION | Enables the chosen Thread version (1.1 / 1.2 (default)). For example, set to `1.1` for Thread 1.1. |
-| TIME_SYNC | OT_TIME_SYNC | Enables the time synchronization service feature. **Note: Enabling this feature breaks conformance to the Thread Specification.** |  |
-| TREL | OT_TREL | Enables TREL radio link for Thread over Infrastructure feature. |
-| UDP_FORWARD | OT_UDP_FORWARD | Enables support for UDP forward. | Enable this switch on the Border Router device (running on the NCP design) with External Commissioning support to service Thread Commissioner packets on the NCP side. |
-| UPTIME | OT_UPTIME | Enables support for tracking OpenThread instance's uptime. |
diff --git a/examples/apps/CMakeLists.txt b/examples/apps/CMakeLists.txt
deleted file mode 100644
index 03da6f0..0000000
--- a/examples/apps/CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-if(OT_APP_CLI)
-    add_subdirectory(cli)
-endif()
-
-add_subdirectory(ncp)
diff --git a/examples/apps/Makefile.am b/examples/apps/Makefile.am
deleted file mode 100644
index 004a98f..0000000
--- a/examples/apps/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-# Always package (e.g. for 'make dist') these subdirectories.
-
-DIST_SUBDIRS                            = \
-    cli                                   \
-    ncp                                   \
-    $(NULL)
-
-# Always build (e.g. for 'make all') these subdirectories.
-
-SUBDIRS                                 = \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_EXECUTABLE
-if OPENTHREAD_ENABLE_CLI
-SUBDIRS                                += cli
-endif
-
-if OPENTHREAD_ENABLE_NCP
-SUBDIRS                                += ncp
-else
-if OPENTHREAD_ENABLE_RADIO_ONLY
-SUBDIRS                                += ncp
-endif
-endif
-endif
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/apps/cli/CMakeLists.txt b/examples/apps/cli/CMakeLists.txt
deleted file mode 100644
index d812512..0000000
--- a/examples/apps/cli/CMakeLists.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-set(COMMON_INCLUDES
-    ${OT_PUBLIC_INCLUDES}
-    ${PROJECT_SOURCE_DIR}/examples/platforms
-    ${PROJECT_SOURCE_DIR}/src/core
-)
-
-if(OT_FTD)
-    include(ftd.cmake)
-endif()
-
-if(OT_MTD)
-    include(mtd.cmake)
-endif()
-
-if(OT_RCP)
-    include(radio.cmake)
-endif()
diff --git a/examples/apps/cli/Makefile.am b/examples/apps/cli/Makefile.am
deleted file mode 100644
index 426afdb..0000000
--- a/examples/apps/cli/Makefile.am
+++ /dev/null
@@ -1,167 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-include $(top_srcdir)/examples/platforms/Makefile.platform.am
-
-bin_PROGRAMS                                                           = \
-    $(NULL)
-
-CPPFLAGS_COMMON                                                       += \
-    -I$(top_srcdir)/include                                              \
-    -I$(top_srcdir)/src                                                  \
-    -I$(top_srcdir)/src/core                                             \
-    -I$(top_srcdir)/examples/platforms                                   \
-    $(NULL)
-
-LDADD_COMMON                                                          += \
-    $(top_builddir)/third_party/tcplp/libtcplp.a                         \
-    $(NULL)
-
-LDFLAGS_COMMON                                                        += \
-    $(NULL)
-
-LIBTOOLFLAGS_COMMON                                                   += \
-    $(NULL)
-
-SOURCES_COMMON                                                        += \
-    cli_uart.cpp                                                         \
-    main.c                                                               \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
-LDADD_COMMON                                                          += \
-    $(top_builddir)/third_party/mbedtls/libmbedcrypto.a                  \
-    $(NULL)
-endif # OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
-
-if OPENTHREAD_ENABLE_FTD
-bin_PROGRAMS                                                          += \
-    ot-cli-ftd                                                           \
-    $(NULL)
-endif
-
-ot_cli_ftd_CPPFLAGS                                                    = \
-    $(CPPFLAGS_COMMON)                                                   \
-    $(NULL)
-
-ot_cli_ftd_LDADD                                                       = \
-    $(top_builddir)/src/cli/libopenthread-cli-ftd.a                      \
-    $(top_builddir)/src/core/libopenthread-ftd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(top_builddir)/src/core/libopenthread-ftd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(NULL)
-
-ot_cli_ftd_LDFLAGS                                                     = \
-    $(LDFLAGS_COMMON)                                                    \
-    $(NULL)
-
-ot_cli_ftd_LIBTOOLFLAGS                                                = \
-    $(LIBTOOLFLAGS_COMMON)                                               \
-    $(NULL)
-
-ot_cli_ftd_SOURCES                                                     = \
-    $(SOURCES_COMMON)                                                    \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_MTD
-bin_PROGRAMS                                                          += \
-    ot-cli-mtd                                                           \
-    $(NULL)
-endif
-
-ot_cli_mtd_CPPFLAGS                                                    = \
-    $(CPPFLAGS_COMMON)                                                   \
-    $(NULL)
-
-ot_cli_mtd_LDADD                                                       = \
-    $(top_builddir)/src/cli/libopenthread-cli-mtd.a                      \
-    $(top_builddir)/src/core/libopenthread-mtd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(top_builddir)/src/core/libopenthread-mtd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(NULL)
-
-ot_cli_mtd_LDFLAGS                                                     = \
-    $(LDFLAGS_COMMON)                                                    \
-    $(NULL)
-
-ot_cli_mtd_LIBTOOLFLAGS                                                = \
-    $(LIBTOOLFLAGS_COMMON)                                               \
-    $(NULL)
-
-ot_cli_mtd_SOURCES                                                     = \
-    $(SOURCES_COMMON)                                                    \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_RADIO_CLI
-bin_PROGRAMS                                                            += \
-    ot-cli-radio                                                           \
-    $(NULL)
-endif
-
-ot_cli_radio_CPPFLAGS                                                    = \
-    $(CPPFLAGS_COMMON)                                                     \
-    $(NULL)
-
-ot_cli_radio_LDADD                                                       = \
-    $(top_builddir)/src/cli/libopenthread-cli-radio.a                      \
-    $(top_builddir)/src/core/libopenthread-radio-cli.a                     \
-    $(LDADD_COMMON)                                                        \
-    $(top_builddir)/src/core/libopenthread-radio-cli.a                     \
-    $(LDADD_COMMON)                                                        \
-    $(NULL)
-
-ot_cli_radio_LDFLAGS                                                     = \
-    $(LDFLAGS_COMMON)                                                      \
-    $(NULL)
-
-ot_cli_radio_LIBTOOLFLAGS                                                = \
-    $(LIBTOOLFLAGS_COMMON)                                                 \
-    $(NULL)
-
-ot_cli_radio_SOURCES                                                     = \
-    $(SOURCES_COMMON)                                                      \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_LINKER_MAP
-ot_cli_ftd_LDFLAGS                                                    += -Wl,-Map=ot-cli-ftd.map
-ot_cli_mtd_LDFLAGS                                                    += -Wl,-Map=ot-cli-mtd.map
-ot_cli_radio_LDFLAGS                                                  += -Wl,-Map=ot-cli-radio.map
-endif
-
-if OPENTHREAD_BUILD_COVERAGE
-CPPFLAGS_COMMON                                                       += \
-    -DOPENTHREAD_ENABLE_COVERAGE                                         \
-    $(NULL)
-
-CLEANFILES                                                             = $(wildcard *.gcda *.gcno)
-endif # OPENTHREAD_BUILD_COVERAGE
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/apps/cli/README.md b/examples/apps/cli/README.md
deleted file mode 100644
index 42b096d..0000000
--- a/examples/apps/cli/README.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# OpenThread CLI Example
-
-This example application exposes OpenThread configuration and management APIs via a simple command-line interface. The steps below take you through the minimal steps required to ping one emulated Thread device from another emulated Thread device.
-
-## 1. Build
-
-```bash
-$ cd <path-to-openthread>
-$ ./bootstrap
-$ make -f examples/Makefile-simulation
-```
-
-## 2. Start node 1
-
-Spawn the process:
-
-```bash
-$ cd <path-to-openthread>/output/<platform>/bin
-$ ./ot-cli-ftd 1
-```
-
-Generate, view, and commit a new Active Operational Dataset:
-
-```bash
-> dataset init new
-Done
-> dataset
-Active Timestamp: 1
-Channel: 13
-Channel Mask: 0x07fff800
-Ext PAN ID: d63e8e3e495ebbc3
-Mesh Local Prefix: fd3d:b50b:f96d:722d::/64
-Network Key: dfd34f0f05cad978ec4e32b0413038ff
-Network Name: OpenThread-8f28
-PAN ID: 0x8f28
-PSKc: c23a76e98f1a6483639b1ac1271e2e27
-Security Policy: 0, onrc
-Done
-> dataset commit active
-Done
-```
-
-Bring up the IPv6 interface:
-
-```bash
-> ifconfig up
-Done
-```
-
-Start Thread protocol operation:
-
-```bash
-> thread start
-Done
-```
-
-Wait a few seconds and verify that the device has become a Thread Leader:
-
-```bash
-> state
-leader
-Done
-```
-
-View IPv6 addresses assigned to Node 1's Thread interface:
-
-```bash
-> ipaddr
-fd3d:b50b:f96d:722d:0:ff:fe00:fc00
-fd3d:b50b:f96d:722d:0:ff:fe00:c00
-fd3d:b50b:f96d:722d:7a73:bff6:9093:9117
-fe80:0:0:0:6c41:9001:f3d6:4148
-Done
-```
-
-## 2. Start node 2
-
-Spawn the process:
-
-```bash
-$ cd <path-to-openthread>/output/<platform>/bin
-$ ./ot-cli-ftd 2
-```
-
-Configure Thread Network Key from Node 1's Active Operational Dataset:
-
-```bash
-> dataset networkkey dfd34f0f05cad978ec4e32b0413038ff
-Done
-> dataset commit active
-Done
-```
-
-Bring up the IPv6 interface:
-
-```bash
-> ifconfig up
-Done
-```
-
-Start Thread protocol operation:
-
-```bash
-> thread start
-Done
-```
-
-Wait a few seconds and verify that the device has become a Thread Child or Router:
-
-```bash
-> state
-child
-Done
-```
-
-## 3. Ping Node 1 from Node 2
-
-```bash
-> ping fd3d:b50b:f96d:722d:7a73:bff6:9093:9117
-16 bytes from fd3d:b50b:f96d:722d:558:f56b:d688:799: icmp_seq=1 hlim=64 time=24ms
-```
-
-## 4. Explore More
-
-See the [OpenThread CLI Reference README.md](../../../src/cli/README.md) to explore more.
diff --git a/examples/apps/cli/cli_uart.cpp b/examples/apps/cli/cli_uart.cpp
deleted file mode 100644
index b7fa502..0000000
--- a/examples/apps/cli/cli_uart.cpp
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-#include "openthread-core-config.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <openthread-system.h>
-#include <openthread/cli.h>
-#include <openthread/logging.h>
-
-#include "cli/cli_config.h"
-#include "common/code_utils.hpp"
-#include "common/debug.hpp"
-#include "utils/uart.h"
-
-#if OPENTHREAD_POSIX
-#include <signal.h>
-#include <sys/types.h>
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
- *
- * The size of CLI UART RX buffer in bytes.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
-#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
-#define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 640
-#else
-#define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 512
-#endif
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CLI_TX_BUFFER_SIZE
- *
- * The size of CLI message buffer in bytes.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE
-#define OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE 1024
-#endif
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-#if OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE > OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE
-#error "diag output buffer should be smaller than CLI UART tx buffer"
-#endif
-#if OPENTHREAD_CONFIG_DIAG_CMD_LINE_BUFFER_SIZE > OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
-#error "diag command line should be smaller than CLI UART rx buffer"
-#endif
-#endif
-
-#if OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH > OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
-#error "command line should be should be smaller than CLI rx buffer"
-#endif
-
-enum
-{
-    kRxBufferSize = OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE,
-    kTxBufferSize = OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE,
-};
-
-char     sRxBuffer[kRxBufferSize];
-uint16_t sRxLength;
-
-char     sTxBuffer[kTxBufferSize];
-uint16_t sTxHead;
-uint16_t sTxLength;
-
-uint16_t sSendLength;
-
-#ifdef OT_CLI_UART_LOCK_HDR_FILE
-
-#include OT_CLI_UART_LOCK_HDR_FILE
-
-#else
-
-/**
- * Macro to acquire an exclusive lock of uart cli output
- * Default implementation does nothing
- *
- */
-#ifndef OT_CLI_UART_OUTPUT_LOCK
-#define OT_CLI_UART_OUTPUT_LOCK() \
-    do                            \
-    {                             \
-    } while (0)
-#endif
-
-/**
- * Macro to release the exclusive lock of uart cli output
- * Default implementation does nothing
- *
- */
-#ifndef OT_CLI_UART_OUTPUT_UNLOCK
-#define OT_CLI_UART_OUTPUT_UNLOCK() \
-    do                              \
-    {                               \
-    } while (0)
-#endif
-
-#endif // OT_CLI_UART_LOCK_HDR_FILE
-
-static int     Output(const char *aBuf, uint16_t aBufLength);
-static otError ProcessCommand(void);
-
-static void ReceiveTask(const uint8_t *aBuf, uint16_t aBufLength)
-{
-    static const char sEraseString[] = {'\b', ' ', '\b'};
-    static const char CRNL[]         = {'\r', '\n'};
-    static uint8_t    sLastChar      = '\0';
-    const uint8_t *   end;
-
-    end = aBuf + aBufLength;
-
-    for (; aBuf < end; aBuf++)
-    {
-        switch (*aBuf)
-        {
-        case '\n':
-            if (sLastChar == '\r')
-            {
-                break;
-            }
-
-            OT_FALL_THROUGH;
-
-        case '\r':
-            Output(CRNL, sizeof(CRNL));
-            sRxBuffer[sRxLength] = '\0';
-            IgnoreError(ProcessCommand());
-            break;
-
-#if OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
-        case 0x03: // ASCII for Ctrl-C
-            kill(0, SIGINT);
-            break;
-
-        case 0x04: // ASCII for Ctrl-D
-            exit(EXIT_SUCCESS);
-            break;
-#endif
-
-        case '\b':
-        case 127:
-            if (sRxLength > 0)
-            {
-                Output(sEraseString, sizeof(sEraseString));
-                sRxBuffer[--sRxLength] = '\0';
-            }
-
-            break;
-
-        default:
-            if (sRxLength < kRxBufferSize - 1)
-            {
-                Output(reinterpret_cast<const char *>(aBuf), 1);
-                sRxBuffer[sRxLength++] = static_cast<char>(*aBuf);
-            }
-
-            break;
-        }
-
-        sLastChar = *aBuf;
-    }
-}
-
-static otError ProcessCommand(void)
-{
-    otError error = OT_ERROR_NONE;
-
-    while (sRxLength > 0 && (sRxBuffer[sRxLength - 1] == '\n' || sRxBuffer[sRxLength - 1] == '\r'))
-    {
-        sRxBuffer[--sRxLength] = '\0';
-    }
-
-    otCliInputLine(sRxBuffer);
-    sRxLength = 0;
-
-    return error;
-}
-
-static void Send(void)
-{
-    VerifyOrExit(sSendLength == 0);
-
-    if (sTxLength > kTxBufferSize - sTxHead)
-    {
-        sSendLength = kTxBufferSize - sTxHead;
-    }
-    else
-    {
-        sSendLength = sTxLength;
-    }
-
-    if (sSendLength > 0)
-    {
-#if OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
-        /* duplicate the output to the debug uart */
-        otSysDebugUart_write_bytes(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength);
-#endif
-        IgnoreError(otPlatUartSend(reinterpret_cast<uint8_t *>(sTxBuffer + sTxHead), sSendLength));
-    }
-
-exit:
-    return;
-}
-
-static void SendDoneTask(void)
-{
-    sTxHead = (sTxHead + sSendLength) % kTxBufferSize;
-    sTxLength -= sSendLength;
-    sSendLength = 0;
-
-    Send();
-}
-
-static int Output(const char *aBuf, uint16_t aBufLength)
-{
-    OT_CLI_UART_OUTPUT_LOCK();
-    uint16_t sent = 0;
-
-    while (aBufLength > 0)
-    {
-        uint16_t remaining = kTxBufferSize - sTxLength;
-        uint16_t tail;
-        uint16_t sendLength = aBufLength;
-
-        if (sendLength > remaining)
-        {
-            sendLength = remaining;
-        }
-
-        for (uint16_t i = 0; i < sendLength; i++)
-        {
-            tail            = (sTxHead + sTxLength) % kTxBufferSize;
-            sTxBuffer[tail] = *aBuf++;
-            aBufLength--;
-            sTxLength++;
-        }
-
-        Send();
-
-        sent += sendLength;
-
-        if (aBufLength > 0)
-        {
-            // More to send, so flush what's waiting now
-            otError err = otPlatUartFlush();
-
-            if (err == OT_ERROR_NONE)
-            {
-                // Flush successful, reset the pointers
-                SendDoneTask();
-            }
-            else
-            {
-                // Flush did not succeed, so abort here.
-                break;
-            }
-        }
-    }
-
-    OT_CLI_UART_OUTPUT_UNLOCK();
-
-    return sent;
-}
-
-static int CliUartOutput(void *aContext, const char *aFormat, va_list aArguments)
-{
-    OT_UNUSED_VARIABLE(aContext);
-
-    int rval;
-
-    if (sTxLength == 0)
-    {
-        rval = vsnprintf(sTxBuffer, kTxBufferSize, aFormat, aArguments);
-        VerifyOrExit(rval >= 0 && rval < kTxBufferSize, otLogWarnPlat("Failed to format CLI output `%s`", aFormat));
-        sTxHead     = 0;
-        sTxLength   = static_cast<uint16_t>(rval);
-        sSendLength = 0;
-    }
-    else
-    {
-        va_list  retryArguments;
-        uint16_t tail      = (sTxHead + sTxLength) % kTxBufferSize;
-        uint16_t remaining = (sTxHead > tail ? (sTxHead - tail) : (kTxBufferSize - tail));
-
-        va_copy(retryArguments, aArguments);
-
-        rval = vsnprintf(&sTxBuffer[tail], remaining, aFormat, aArguments);
-
-        if (rval < 0)
-        {
-            otLogWarnPlat("Failed to format CLI output `%s`", aFormat);
-        }
-        else if (rval < remaining)
-        {
-            sTxLength += rval;
-        }
-        else if (rval < kTxBufferSize)
-        {
-            while (sTxLength != 0)
-            {
-                otError error;
-
-                Send();
-
-                error = otPlatUartFlush();
-
-                if (error == OT_ERROR_NONE)
-                {
-                    // Flush successful, reset the pointers
-                    SendDoneTask();
-                }
-                else
-                {
-                    // Flush did not succeed, so abandon buffered output.
-                    otLogWarnPlat("Failed to output CLI: %s", otThreadErrorToString(error));
-                    break;
-                }
-            }
-            rval = vsnprintf(sTxBuffer, kTxBufferSize, aFormat, retryArguments);
-            OT_ASSERT(rval > 0);
-            sTxLength   = static_cast<uint16_t>(rval);
-            sTxHead     = 0;
-            sSendLength = 0;
-        }
-        else
-        {
-            otLogWarnPlat("CLI output `%s` truncated", aFormat);
-        }
-
-        va_end(retryArguments);
-    }
-
-    Send();
-
-exit:
-    return rval;
-}
-
-void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength)
-{
-    ReceiveTask(aBuf, aBufLength);
-}
-
-void otPlatUartSendDone(void)
-{
-    SendDoneTask();
-}
-
-extern "C" void otAppCliInit(otInstance *aInstance)
-{
-    sRxLength   = 0;
-    sTxHead     = 0;
-    sTxLength   = 0;
-    sSendLength = 0;
-
-    IgnoreError(otPlatUartEnable());
-
-    otCliInit(aInstance, CliUartOutput, aInstance);
-}
diff --git a/examples/apps/cli/ftd.cmake b/examples/apps/cli/ftd.cmake
deleted file mode 100644
index f5a2870..0000000
--- a/examples/apps/cli/ftd.cmake
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-#  Copyright (c) 2020, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_executable(ot-cli-ftd
-    cli_uart.cpp
-    main.c
-)
-
-target_include_directories(ot-cli-ftd PRIVATE ${COMMON_INCLUDES})
-
-if(NOT DEFINED OT_PLATFORM_LIB_FTD)
-    set(OT_PLATFORM_LIB_FTD ${OT_PLATFORM_LIB})
-endif()
-
-target_link_libraries(ot-cli-ftd PRIVATE
-    openthread-cli-ftd
-    ${OT_PLATFORM_LIB_FTD}
-    openthread-ftd
-    ${OT_PLATFORM_LIB_FTD}
-    openthread-cli-ftd
-    ${OT_MBEDTLS}
-    ot-config
-)
-
-install(TARGETS ot-cli-ftd
-    DESTINATION bin)
diff --git a/examples/apps/cli/main.c b/examples/apps/cli/main.c
deleted file mode 100644
index 165f32f..0000000
--- a/examples/apps/cli/main.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <assert.h>
-#include <openthread-core-config.h>
-#include <openthread/config.h>
-
-#include <openthread/cli.h>
-#include <openthread/diag.h>
-#include <openthread/tasklet.h>
-#include <openthread/platform/logging.h>
-
-#include "openthread-system.h"
-#include "cli/cli_config.h"
-#include "common/code_utils.hpp"
-
-#include "lib/platform/reset_util.h"
-
-/**
- * This function initializes the CLI app.
- *
- * @param[in]  aInstance  The OpenThread instance structure.
- *
- */
-extern void otAppCliInit(otInstance *aInstance);
-
-#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
-void *otPlatCAlloc(size_t aNum, size_t aSize)
-{
-    return calloc(aNum, aSize);
-}
-
-void otPlatFree(void *aPtr)
-{
-    free(aPtr);
-}
-#endif
-
-void otTaskletsSignalPending(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-}
-
-#if OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
-static void ProcessExit(void *aContext, uint8_t aArgsLength, char *aArgs[])
-{
-    OT_UNUSED_VARIABLE(aContext);
-    OT_UNUSED_VARIABLE(aArgsLength);
-    OT_UNUSED_VARIABLE(aArgs);
-
-    exit(EXIT_SUCCESS);
-}
-static const otCliCommand kCommands[] = {{"exit", ProcessExit}};
-#endif
-
-int main(int argc, char *argv[])
-{
-    otInstance *instance;
-
-    OT_SETUP_RESET_JUMP(argv);
-
-#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
-    size_t   otInstanceBufferLength = 0;
-    uint8_t *otInstanceBuffer       = NULL;
-#endif
-
-pseudo_reset:
-
-    otSysInit(argc, argv);
-
-#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
-    // Call to query the buffer size
-    (void)otInstanceInit(NULL, &otInstanceBufferLength);
-
-    // Call to allocate the buffer
-    otInstanceBuffer = (uint8_t *)malloc(otInstanceBufferLength);
-    assert(otInstanceBuffer);
-
-    // Initialize OpenThread with the buffer
-    instance = otInstanceInit(otInstanceBuffer, &otInstanceBufferLength);
-#else
-    instance = otInstanceInitSingle();
-#endif
-    assert(instance);
-
-    otAppCliInit(instance);
-
-#if OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
-    otCliSetUserCommands(kCommands, OT_ARRAY_LENGTH(kCommands), instance);
-#endif
-
-    while (!otSysPseudoResetWasRequested())
-    {
-        otTaskletsProcess(instance);
-        otSysProcessDrivers(instance);
-    }
-
-    otInstanceFinalize(instance);
-#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
-    free(otInstanceBuffer);
-#endif
-
-    goto pseudo_reset;
-
-    return 0;
-}
-
-#if OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_APP
-void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
-{
-    va_list ap;
-
-    va_start(ap, aFormat);
-    otCliPlatLogv(aLogLevel, aLogRegion, aFormat, ap);
-    va_end(ap);
-}
-#endif
diff --git a/examples/apps/cli/mtd.cmake b/examples/apps/cli/mtd.cmake
deleted file mode 100644
index 7b71883..0000000
--- a/examples/apps/cli/mtd.cmake
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-#  Copyright (c) 2020, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_executable(ot-cli-mtd
-    cli_uart.cpp
-    main.c
-)
-
-target_include_directories(ot-cli-mtd PRIVATE ${COMMON_INCLUDES})
-
-if(NOT DEFINED OT_PLATFORM_LIB_MTD)
-    set(OT_PLATFORM_LIB_MTD ${OT_PLATFORM_LIB})
-endif()
-
-target_link_libraries(ot-cli-mtd PRIVATE
-    openthread-cli-mtd
-    ${OT_PLATFORM_LIB_MTD}
-    openthread-mtd
-    ${OT_PLATFORM_LIB_MTD}
-    openthread-cli-mtd
-    ${OT_MBEDTLS}
-    ot-config
-)
-
-install(TARGETS ot-cli-mtd
-    DESTINATION bin)
diff --git a/examples/apps/cli/radio.cmake b/examples/apps/cli/radio.cmake
deleted file mode 100644
index dc3e4e9..0000000
--- a/examples/apps/cli/radio.cmake
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#  Copyright (c) 2021, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_executable(ot-cli-radio
-    cli_uart.cpp
-    main.c
-)
-
-target_include_directories(ot-cli-radio PRIVATE ${COMMON_INCLUDES})
-
-if(NOT DEFINED OT_PLATFORM_LIB_RCP)
-    set(OT_PLATFORM_LIB_RCP ${OT_PLATFORM_LIB})
-endif()
-
-target_link_libraries(ot-cli-radio PRIVATE
-    openthread-cli-radio
-    ${OT_PLATFORM_LIB_RCP}
-    openthread-radio-cli
-    ${OT_PLATFORM_LIB_RCP}
-    openthread-cli-radio
-    ${OT_MBEDTLS}
-    ot-config
-)
-
-install(TARGETS ot-cli-radio
-    DESTINATION bin
-)
diff --git a/examples/apps/ncp/CMakeLists.txt b/examples/apps/ncp/CMakeLists.txt
deleted file mode 100644
index 5fce737..0000000
--- a/examples/apps/ncp/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-set(COMMON_INCLUDES
-    ${OT_PUBLIC_INCLUDES}
-    ${PROJECT_SOURCE_DIR}/examples/platforms
-    ${PROJECT_SOURCE_DIR}/src/core
-)
-
-if(OT_APP_NCP)
-    if(OT_FTD)
-        include(ftd.cmake)
-    endif()
-    if(OT_MTD)
-        include(mtd.cmake)
-    endif()
-endif()
-
-if(OT_APP_RCP)
-    if(OT_RCP)
-        include(rcp.cmake)
-    else()
-        message(FATAL_ERROR "OT_RCP is not enabled")
-    endif()
-endif()
diff --git a/examples/apps/ncp/Makefile.am b/examples/apps/ncp/Makefile.am
deleted file mode 100644
index 3763eef..0000000
--- a/examples/apps/ncp/Makefile.am
+++ /dev/null
@@ -1,200 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-include $(top_srcdir)/examples/platforms/Makefile.platform.am
-
-bin_PROGRAMS                                                           = \
-    $(NULL)
-
-CPPFLAGS_COMMON                                                       += \
-    -I$(top_srcdir)/include                                              \
-    -I$(top_srcdir)/src                                                  \
-    -I$(top_srcdir)/src/core                                             \
-    -I$(top_srcdir)/examples/platforms                                   \
-    $(NULL)
-
-LDADD_COMMON                                                          += \
-    $(top_builddir)/third_party/tcplp/libtcplp.a                         \
-    $(NULL)
-
-LDFLAGS_COMMON                                                        += \
-    $(NULL)
-
-LIBTOOLFLAGS_COMMON                                                   += \
-    $(NULL)
-
-SOURCES_COMMON                                                        += \
-    main.c                                                               \
-    ncp.c                                                                \
-    $(NULL)
-
-LDADD_MBEDTLS                                                          = \
-    $(NULL)
-
-LDADD_MBEDTLS_RADIO                                                    = \
-    $(NULL)
-
-LDADD_DIAG                                                             = \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
-LDADD_MBEDTLS                                                         += \
-    $(top_builddir)/third_party/mbedtls/libmbedcrypto.a                  \
-    $(NULL)
-
-LDADD_MBEDTLS_RADIO                                                   += \
-    $(top_builddir)/third_party/mbedtls/libmbedcrypto-radio.a            \
-    $(NULL)
-endif # OPENTHREAD_ENABLE_BUILTIN_MBEDTLS
-
-if OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER
-LDADD_COMMON                                                          += \
-    $(OPENTHREAD_NCP_SPINEL_ENCRYPTER_LIBS)                              \
-    $(NULL)
-endif # OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER
-
-if OPENTHREAD_ENABLE_NCP
-if OPENTHREAD_ENABLE_FTD
-bin_PROGRAMS                                                          += \
-    ot-ncp-ftd                                                           \
-    $(NULL)
-endif
-endif
-
-ot_ncp_ftd_CPPFLAGS                                                    = \
-    $(CPPFLAGS_COMMON)                                                   \
-    $(NULL)
-
-ot_ncp_ftd_LDADD                                                       = \
-    $(top_builddir)/src/ncp/libopenthread-ncp-ftd.a                      \
-    $(top_builddir)/src/core/libopenthread-ftd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(LDADD_MBEDTLS)                                                     \
-    $(LDADD_DIAG)                                                        \
-    $(top_builddir)/src/core/libopenthread-ftd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(LDADD_MBEDTLS)                                                     \
-    $(LDADD_DIAG)                                                        \
-    $(NULL)
-
-ot_ncp_ftd_LDFLAGS                                                     = \
-    $(LDFLAGS_COMMON)                                                    \
-    $(NULL)
-
-ot_ncp_ftd_LIBTOOLFLAGS                                                = \
-    $(LIBTOOLFLAGS_COMMON)                                               \
-    $(NULL)
-
-ot_ncp_ftd_SOURCES                                                     = \
-    $(SOURCES_COMMON)                                                    \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_NCP
-if OPENTHREAD_ENABLE_MTD
-bin_PROGRAMS                                                          += \
-    ot-ncp-mtd                                                           \
-    $(NULL)
-endif
-endif
-
-ot_ncp_mtd_CPPFLAGS                                                    = \
-    $(CPPFLAGS_COMMON)                                                   \
-    $(NULL)
-
-ot_ncp_mtd_LDADD                                                       = \
-    $(top_builddir)/src/ncp/libopenthread-ncp-mtd.a                      \
-    $(top_builddir)/src/core/libopenthread-mtd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(LDADD_MBEDTLS)                                                     \
-    $(LDADD_DIAG)                                                        \
-    $(top_builddir)/src/core/libopenthread-mtd.a                         \
-    $(LDADD_COMMON)                                                      \
-    $(LDADD_MBEDTLS)                                                     \
-    $(LDADD_DIAG)                                                        \
-    $(NULL)
-
-ot_ncp_mtd_LDFLAGS                                                     = \
-    $(LDFLAGS_COMMON)                                                    \
-    $(NULL)
-
-ot_ncp_mtd_LIBTOOLFLAGS                                                = \
-    $(LIBTOOLFLAGS_COMMON)                                               \
-    $(NULL)
-
-ot_ncp_mtd_SOURCES                                                     = \
-    $(SOURCES_COMMON)                                                    \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_RADIO_ONLY
-bin_PROGRAMS                                                          += \
-    ot-rcp                                                               \
-    $(NULL)
-endif
-
-ot_rcp_CPPFLAGS                                                        = \
-    $(CPPFLAGS_COMMON)                                                   \
-    $(NULL)
-
-ot_rcp_LDADD                                                           = \
-    $(top_builddir)/src/ncp/libopenthread-rcp.a                          \
-    $(top_builddir)/src/core/libopenthread-radio.a                       \
-    $(LDADD_COMMON)                                                      \
-    $(LDADD_MBEDTLS_RADIO)                                               \
-    $(top_builddir)/src/core/libopenthread-radio.a                       \
-    $(LDADD_COMMON)                                                      \
-    $(LDADD_MBEDTLS_RADIO)                                               \
-    $(NULL)
-
-ot_rcp_LDFLAGS                                                         = \
-    $(LDFLAGS_COMMON)                                                    \
-    $(NULL)
-
-ot_rcp_LIBTOOLFLAGS                                                    = \
-    $(LIBTOOLFLAGS_COMMON)                                               \
-    $(NULL)
-
-ot_rcp_SOURCES                                                         = \
-    $(SOURCES_COMMON)                                                    \
-    $(NULL)
-
-if OPENTHREAD_ENABLE_LINKER_MAP
-ot_ncp_ftd_LDFLAGS                                                    += -Wl,-Map=ot-ncp-ftd.map
-ot_ncp_mtd_LDFLAGS                                                    += -Wl,-Map=ot-ncp-mtd.map
-ot_rcp_LDFLAGS                                                        += -Wl,-Map=ot-rcp.map
-endif
-
-if OPENTHREAD_BUILD_COVERAGE
-CPPFLAGS_COMMON                                                       += \
-    -DOPENTHREAD_ENABLE_COVERAGE                                         \
-    $(NULL)
-
-CLEANFILES                                                             = $(wildcard *.gcda *.gcno)
-endif # OPENTHREAD_BUILD_COVERAGE
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/apps/ncp/ftd.cmake b/examples/apps/ncp/ftd.cmake
deleted file mode 100644
index c7d0bbf..0000000
--- a/examples/apps/ncp/ftd.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-#  Copyright (c) 2020, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_executable(ot-ncp-ftd
-    main.c
-    ncp.c
-)
-
-target_include_directories(ot-ncp-ftd PRIVATE ${COMMON_INCLUDES})
-
-if(NOT DEFINED OT_PLATFORM_LIB_FTD)
-    set(OT_PLATFORM_LIB_FTD ${OT_PLATFORM_LIB})
-endif()
-
-target_link_libraries(ot-ncp-ftd PRIVATE
-    openthread-ncp-ftd
-    ${OT_PLATFORM_LIB_FTD}
-    openthread-ftd
-    ${OT_PLATFORM_LIB_FTD}
-    openthread-ncp-ftd
-    ${OT_MBEDTLS}
-    ot-config
-)
-
-install(TARGETS ot-ncp-ftd DESTINATION bin)
diff --git a/examples/apps/ncp/main.c b/examples/apps/ncp/main.c
deleted file mode 100644
index af50d14..0000000
--- a/examples/apps/ncp/main.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <assert.h>
-#include <openthread-core-config.h>
-#include <openthread/config.h>
-
-#include <openthread/diag.h>
-#include <openthread/ncp.h>
-#include <openthread/tasklet.h>
-
-#include "openthread-system.h"
-
-#include "lib/platform/reset_util.h"
-/**
- * This function initializes the NCP app.
- *
- * @param[in]  aInstance  The OpenThread instance structure.
- *
- */
-extern void otAppNcpInit(otInstance *aInstance);
-
-#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
-void *otPlatCAlloc(size_t aNum, size_t aSize)
-{
-    return calloc(aNum, aSize);
-}
-
-void otPlatFree(void *aPtr)
-{
-    free(aPtr);
-}
-#endif
-
-void otTaskletsSignalPending(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-}
-
-int main(int argc, char *argv[])
-{
-    otInstance *instance;
-
-    OT_SETUP_RESET_JUMP(argv);
-
-#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
-    size_t   otInstanceBufferLength = 0;
-    uint8_t *otInstanceBuffer       = NULL;
-#endif
-
-pseudo_reset:
-
-    otSysInit(argc, argv);
-
-#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
-    // Call to query the buffer size
-    (void)otInstanceInit(NULL, &otInstanceBufferLength);
-
-    // Call to allocate the buffer
-    otInstanceBuffer = (uint8_t *)malloc(otInstanceBufferLength);
-    assert(otInstanceBuffer);
-
-    // Initialize OpenThread with the buffer
-    instance = otInstanceInit(otInstanceBuffer, &otInstanceBufferLength);
-#else
-    instance = otInstanceInitSingle();
-#endif
-    assert(instance);
-
-    otAppNcpInit(instance);
-
-    while (!otSysPseudoResetWasRequested())
-    {
-        otTaskletsProcess(instance);
-        otSysProcessDrivers(instance);
-    }
-
-    otInstanceFinalize(instance);
-#if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
-    free(otInstanceBuffer);
-#endif
-
-    goto pseudo_reset;
-
-    return 0;
-}
diff --git a/examples/apps/ncp/mtd.cmake b/examples/apps/ncp/mtd.cmake
deleted file mode 100644
index 61380c3..0000000
--- a/examples/apps/ncp/mtd.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-#  Copyright (c) 2020, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_executable(ot-ncp-mtd
-    main.c
-    ncp.c
-)
-
-target_include_directories(ot-ncp-mtd PRIVATE ${COMMON_INCLUDES})
-
-if(NOT DEFINED OT_PLATFORM_LIB_MTD)
-    set(OT_PLATFORM_LIB_MTD ${OT_PLATFORM_LIB})
-endif()
-
-target_link_libraries(ot-ncp-mtd PRIVATE
-    openthread-ncp-mtd
-    ${OT_PLATFORM_LIB_MTD}
-    openthread-mtd
-    ${OT_PLATFORM_LIB_MTD}
-    openthread-ncp-mtd
-    ${OT_MBEDTLS}
-    ot-config
-)
-
-install(TARGETS ot-ncp-mtd DESTINATION bin)
diff --git a/examples/apps/ncp/ncp.c b/examples/apps/ncp/ncp.c
deleted file mode 100644
index ee7ccf7..0000000
--- a/examples/apps/ncp/ncp.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  Copyright (c) 2021, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "openthread-core-config.h"
-
-#include <openthread/ncp.h>
-
-#include "common/code_utils.hpp"
-
-#include "ncp/ncp_config.h"
-
-#if !OPENTHREAD_CONFIG_NCP_SPI_ENABLE
-#include "utils/uart.h"
-
-void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength)
-{
-    otNcpHdlcReceive(aBuf, aBufLength);
-}
-
-void otPlatUartSendDone(void)
-{
-    otNcpHdlcSendDone();
-}
-#endif
-
-#if !OPENTHREAD_ENABLE_NCP_VENDOR_HOOK
-#if !OPENTHREAD_CONFIG_NCP_SPI_ENABLE
-static int NcpSend(const uint8_t *aBuf, uint16_t aBufLength)
-{
-    IgnoreError(otPlatUartSend(aBuf, aBufLength));
-    return aBufLength;
-}
-#endif
-
-void otAppNcpInit(otInstance *aInstance)
-{
-#if OPENTHREAD_CONFIG_NCP_SPI_ENABLE
-    otNcpSpiInit(aInstance);
-#else
-    IgnoreError(otPlatUartEnable());
-
-    otNcpHdlcInit(aInstance, NcpSend);
-#endif
-}
-#endif // !OPENTHREAD_ENABLE_NCP_VENDOR_HOOK
diff --git a/examples/apps/ncp/rcp.cmake b/examples/apps/ncp/rcp.cmake
deleted file mode 100644
index 7ba3b97..0000000
--- a/examples/apps/ncp/rcp.cmake
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-#  Copyright (c) 2020, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_executable(ot-rcp
-    main.c
-    ncp.c
-)
-
-target_include_directories(ot-rcp PRIVATE ${COMMON_INCLUDES})
-
-if(NOT DEFINED OT_PLATFORM_LIB_RCP)
-    set(OT_PLATFORM_LIB_RCP ${OT_PLATFORM_LIB})
-endif()
-
-target_link_libraries(ot-rcp PRIVATE
-    openthread-rcp
-    ${OT_PLATFORM_LIB_RCP}
-    openthread-radio
-    ${OT_PLATFORM_LIB_RCP}
-    openthread-rcp
-    ot-config
-)
-
-install(TARGETS ot-rcp DESTINATION bin)
diff --git a/examples/common-switches.mk b/examples/common-switches.mk
deleted file mode 100644
index 2e947b0..0000000
--- a/examples/common-switches.mk
+++ /dev/null
@@ -1,392 +0,0 @@
-#
-#  Copyright (c) 2016-2017, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-# OpenThread Features (Makefile default configuration).
-
-ANYCAST_LOCATOR           ?= 0
-BACKBONE_ROUTER           ?= 0
-BIG_ENDIAN                ?= 0
-BORDER_AGENT              ?= 0
-BORDER_ROUTER             ?= 0
-BORDER_ROUTING            ?= 0
-BORDER_ROUTING_NAT64	  ?= 0
-COAP                      ?= 0
-COAP_BLOCK                ?= 0
-COAP_OBSERVE              ?= 0
-COAPS                     ?= 0
-COMMISSIONER              ?= 0
-COVERAGE                  ?= 0
-CHANNEL_MANAGER           ?= 0
-CHANNEL_MONITOR           ?= 0
-CHILD_SUPERVISION         ?= 0
-DATASET_UPDATER           ?= 0
-DEBUG                     ?= 0
-DHCP6_CLIENT              ?= 0
-DHCP6_SERVER              ?= 0
-DIAGNOSTIC                ?= 0
-DISABLE_DOC               ?= 0
-DISABLE_TOOLS             ?= 0
-DNS_CLIENT                ?= 0
-DNS_DSO                   ?= 0
-DNSSD_SERVER              ?= 0
-DUA                       ?= 0
-DYNAMIC_LOG_LEVEL         ?= 0
-ECDSA                     ?= 0
-EXTERNAL_HEAP             ?= 0
-HISTORY_TRACKER           ?= 0
-IP6_FRAGM                 ?= 0
-JAM_DETECTION             ?= 0
-JOINER                    ?= 0
-LEGACY                    ?= 0
-ifeq ($(REFERENCE_DEVICE),1)
-LOG_OUTPUT                ?= APP
-endif
-LINK_RAW                  ?= 0
-MAC_FILTER                ?= 0
-MESSAGE_USE_HEAP          ?= 0
-MLE_LONG_ROUTES           ?= 0
-MLR                       ?= 0
-MTD_NETDIAG               ?= 0
-MULTIPLE_INSTANCE         ?= 0
-NEIGHBOR_DISCOVERY_AGENT  ?= 0
-NETDATA_PUBLISHER         ?= 0
-OTNS                      ?= 0
-PING_SENDER               ?= 1
-PLATFORM_UDP              ?= 0
-REFERENCE_DEVICE          ?= 0
-SERVICE                   ?= 0
-SETTINGS_RAM              ?= 0
-# SLAAC is enabled by default
-SLAAC                     ?= 1
-SNTP_CLIENT               ?= 0
-SRP_CLIENT                ?= 0
-SRP_SERVER                ?= 0
-THREAD_VERSION            ?= 1.2
-TIME_SYNC                 ?= 0
-TREL                      ?= 0
-UDP_FORWARD               ?= 0
-UPTIME                    ?= 0
-RCP_RESTORATION_MAX_COUNT ?= 0
-
-ifeq ($(ANYCAST_LOCATOR),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE=1
-endif
-
-ifeq ($(BACKBONE_ROUTER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1
-endif
-
-ifeq ($(BIG_ENDIAN),1)
-COMMONCFLAGS                   += -DBYTE_ORDER_BIG_ENDIAN=1
-endif
-
-ifeq ($(BORDER_AGENT),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1
-endif
-
-ifeq ($(BORDER_ROUTER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1
-endif
-
-ifeq ($(BORDER_ROUTING),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1
-endif
-
-ifeq ($(BORDER_ROUTING_NAT64),1)
-COMMONCFLAGS		       += -DOPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE=1
-endif
-
-ifeq ($(COAP),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_COAP_API_ENABLE=1
-endif
-
-ifeq ($(COAPS),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1
-endif
-
-ifeq ($(COAP_BLOCK),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=1
-endif
-
-ifeq ($(COAP_OBSERVE),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1
-endif
-
-ifeq ($(COMMISSIONER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
-endif
-
-ifeq ($(COVERAGE),1)
-configure_OPTIONS              += --enable-coverage
-endif
-
-ifeq ($(CHANNEL_MANAGER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1
-endif
-
-ifeq ($(CHANNEL_MONITOR),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1
-endif
-
-ifeq ($(CHILD_SUPERVISION),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
-endif
-
-ifeq ($(CSL_RECEIVER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1
-endif
-
-ifeq ($(CSL_AUTO_SYNC),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1
-else ifeq ($(CSL_AUTO_SYNC),0)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0
-endif
-
-ifeq ($(CSL_DEBUG),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=1
-endif
-
-ifeq ($(DATASET_UPDATER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=1
-endif
-
-ifeq ($(DEBUG),1)
-configure_OPTIONS              += --enable-debug --disable-optimization
-endif
-
-ifeq ($(DHCP6_CLIENT),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
-endif
-
-ifeq ($(DHCP6_SERVER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
-endif
-
-ifeq ($(DIAGNOSTIC),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DIAG_ENABLE=1
-endif
-
-ifeq ($(DISABLE_DOC),1)
-configure_OPTIONS              += --disable-docs
-endif
-
-ifeq ($(DISABLE_TOOLS),1)
-configure_OPTIONS              += --disable-tools
-endif
-
-ifeq ($(DNS_CLIENT),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
-endif
-
-ifeq ($(DNS_DSO),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DNS_DSO_ENABLE=1
-endif
-
-ifeq ($(DNSSD_SERVER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=1
-endif
-
-ifeq ($(DUA),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_DUA_ENABLE=1
-endif
-
-ifeq ($(DYNAMIC_LOG_LEVEL),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1
-endif
-
-ifeq ($(ECDSA),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_ECDSA_ENABLE=1
-endif
-
-ifeq ($(EXTERNAL_HEAP),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
-endif
-
-ifeq ($(HISTORY_TRACKER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=1
-endif
-
-ifeq ($(IP6_FRAGM),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
-endif
-
-ifeq ($(JAM_DETECTION),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1
-endif
-
-ifeq ($(JOINER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_JOINER_ENABLE=1
-endif
-
-ifeq ($(LEGACY),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_LEGACY_ENABLE=1
-endif
-
-ifeq ($(LINK_RAW),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
-endif
-
-ifeq ($(LINK_METRICS_INITIATOR),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1
-endif
-
-ifeq ($(LINK_METRICS_SUBJECT),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1
-endif
-
-ifneq ($(LOG_OUTPUT),)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_$(LOG_OUTPUT)
-endif
-
-ifeq ($(MAC_FILTER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
-endif
-
-ifeq ($(MESSAGE_USE_HEAP),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1
-endif
-
-# Enable MLE long routes extension (experimental, breaks Thread conformance)
-ifeq ($(MLE_LONG_ROUTES),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=1
-endif
-
-ifeq ($(MLR),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MLR_ENABLE=1
-endif
-
-ifeq ($(MTD_NETDIAG),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
-endif
-
-ifeq ($(MULTIPLE_INSTANCE),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1
-endif
-
-ifeq ($(NEIGHBOR_DISCOVERY_AGENT),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=1
-endif
-
-ifeq ($(NETDATA_PUBLISHER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=1
-endif
-
-ifeq ($(PING_SENDER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
-endif
-
-ifeq ($(PLATFORM_UDP),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1
-endif
-
-# Enable features only required for reference device during certification.
-ifeq ($(REFERENCE_DEVICE),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=1
-endif
-
-ifeq ($(SERVICE),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
-endif
-
-ifeq ($(SLAAC),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
-endif
-
-ifeq ($(SNTP_CLIENT),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
-endif
-
-ifeq ($(SRP_CLIENT),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
-endif
-
-ifeq ($(SRP_SERVER),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_SRP_SERVER_ENABLE=1
-endif
-
-ifeq ($(THREAD_VERSION),1.1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_THREAD_VERSION=2
-else ifeq ($(THREAD_VERSION),1.2)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_THREAD_VERSION=3
-endif
-
-ifeq ($(TIME_SYNC),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_TIME_SYNC_ENABLE=1 -DOPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT=1
-endif
-
-ifeq ($(TREL),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1
-endif
-
-ifeq ($(UDP_FORWARD),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
-endif
-
-ifeq ($(UPTIME),1)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_UPTIME_ENABLE=1
-endif
-
-ifeq ($(DISABLE_BUILTIN_MBEDTLS),1)
-configure_OPTIONS              += --disable-builtin-mbedtls
-endif
-
-ifneq ($(BUILTIN_MBEDTLS_MANAGEMENT),)
-COMMONCFLAGS                   += -DOPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=$(BUILTIN_MBEDTLS_MANAGEMENT)
-endif
-
-ifeq ($(DISABLE_EXECUTABLE),1)
-configure_OPTIONS              += --enable-executable=no
-endif
-
-ifeq ($(DEBUG_UART),1)
-CFLAGS   += -DOPENTHREAD_CONFIG_ENABLE_DEBUG_UART=1
-CXXFLAGS += -DOPENTHREAD_CONFIG_ENABLE_DEBUG_UART=1
-endif
-
-ifeq ($(DEBUG_UART_LOG),1)
-CFLAGS   += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART
-CXXFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART
-endif
-
-ifeq ($(SETTINGS_RAM),1)
-COMMONCFLAGS += -DOPENTHREAD_SETTINGS_RAM=1
-endif
-
-ifeq ($(OTNS),1)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_OTNS_ENABLE=1
-endif
-
-ifneq ($(SPINEL_ENCRYPTER_LIBS),)
-configure_OPTIONS              += --with-ncp-spinel-encrypter-libs=$(SPINEL_ENCRYPTER_LIBS)
-endif
-
-COMMONCFLAGS += -DOPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=${RCP_RESTORATION_MAX_COUNT}
-
-ifeq ($(FULL_LOGS),1)
-COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_DEBG -DOPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1
-endif
diff --git a/examples/platforms/CMakeLists.txt b/examples/platforms/CMakeLists.txt
deleted file mode 100644
index c384bb1..0000000
--- a/examples/platforms/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_subdirectory(utils)
diff --git a/examples/platforms/Makefile.am b/examples/platforms/Makefile.am
deleted file mode 100644
index e7bd3ed..0000000
--- a/examples/platforms/Makefile.am
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-#  Copyright (c) 2017, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-EXTRA_DIST                              = \
-    cc1352                                \
-    cc2652                                \
-    efr32                                 \
-    gp712                                 \
-    k32w                                  \
-    kw41z                                 \
-    nrf528xx                              \
-    qpg6095                               \
-    qpg6100                               \
-    qpg7015m                              \
-    samr21                                \
-    $(NULL)
-
-# Always package (e.g. for 'make dist') these subdirectories.
-
-DIST_SUBDIRS                            = \
-    cc2538                                \
-    simulation                            \
-    utils                                 \
-    $(NULL)
-
-# Always build (e.g. for 'make all') these subdirectories.
-
-SUBDIRS                                 = \
-    utils                                 \
-    $(NULL)
-
-if OPENTHREAD_PLATFORM_CC2538
-SUBDIRS                                += cc2538
-endif
-
-if OPENTHREAD_PLATFORM_SIMULATION
-SUBDIRS                                += simulation
-endif
-
-noinst_HEADERS                          = \
-    openthread-system.h                   \
-    $(NULL)
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/platforms/Makefile.platform.am b/examples/platforms/Makefile.platform.am
deleted file mode 100644
index 8ab6520..0000000
--- a/examples/platforms/Makefile.platform.am
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-#  Copyright (c) 2017, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-#
-# This utility Makefile is included by the application Makefile.am as follows:
-#
-# include $(top_srcdir)/examples/platforms/Makefile.platform.am
-#
-# It will automatically set required flags and libraries to link based on
-# the selected platform and feature options set via configure.
-#
-
-CPPFLAGS_COMMON     = $(NULL)
-LDADD_COMMON        = $(NULL)
-LDFLAGS_COMMON      = $(NULL)
-SOURCES_COMMON      = $(NULL)
-LIBTOOLFLAGS_COMMON = --preserve-dup-deps
-
-if OPENTHREAD_EXAMPLES_CC2538
-include $(top_srcdir)/examples/platforms/cc2538/Makefile.platform.am
-endif
-
-if OPENTHREAD_EXAMPLES_SIMULATION
-include $(top_srcdir)/examples/platforms/simulation/Makefile.platform.am
-endif
diff --git a/examples/platforms/cc1352/README.md b/examples/platforms/cc1352/README.md
deleted file mode 100644
index 71a4ac4..0000000
--- a/examples/platforms/cc1352/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on CC1352 example has moved to https://github.com/openthread/ot-cc13x2-cc26x2
diff --git a/examples/platforms/cc2538/CMakeLists.txt b/examples/platforms/cc2538/CMakeLists.txt
deleted file mode 100644
index f8ed5f2..0000000
--- a/examples/platforms/cc2538/CMakeLists.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-set(OT_PLATFORM_LIB "openthread-cc2538" PARENT_SCOPE)
-
-if(NOT OT_CONFIG)
-    set(OT_CONFIG "openthread-core-cc2538-config.h")
-    set(OT_CONFIG ${OT_CONFIG} PARENT_SCOPE)
-endif()
-
-list(APPEND OT_PLATFORM_DEFINES
-    "OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"openthread-core-cc2538-config-check.h\""
-    "OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1"
-)
-set(OT_PLATFORM_DEFINES ${OT_PLATFORM_DEFINES} PARENT_SCOPE)
-
-list(APPEND OT_PLATFORM_DEFINES "OPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"${OT_CONFIG}\"")
-
-add_library(openthread-cc2538
-    alarm.c
-    diag.c
-    entropy.c
-    flash.c
-    misc.c
-    radio.c
-    startup-gcc.c
-    system.c
-    logging.c
-    uart.c
-    $<TARGET_OBJECTS:openthread-platform-utils>
-)
-
-target_link_libraries(openthread-cc2538
-    PRIVATE
-        ot-config
-    PUBLIC
-        -T${PROJECT_SOURCE_DIR}/examples/platforms/cc2538/cc2538.ld
-        -Wl,--gc-sections -Wl,-Map=$<TARGET_PROPERTY:NAME>.map
-)
-
-target_compile_definitions(openthread-cc2538
-    PUBLIC
-        ${OT_PLATFORM_DEFINES}
-)
-
-target_compile_options(openthread-cc2538 PRIVATE
-    ${OT_CFLAGS}
-)
-
-target_include_directories(openthread-cc2538 PRIVATE
-    ${OT_PUBLIC_INCLUDES}
-    ${PROJECT_SOURCE_DIR}/examples/platforms
-    ${PROJECT_SOURCE_DIR}/src/core
-)
diff --git a/examples/platforms/cc2538/Makefile.am b/examples/platforms/cc2538/Makefile.am
deleted file mode 100644
index fb802f2..0000000
--- a/examples/platforms/cc2538/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-# Do not enable -Wcast-align for this platform
-override CFLAGS    := $(filter-out -Wcast-align,$(CFLAGS))
-override CXXFLAGS  := $(filter-out -Wcast-align,$(CXXFLAGS))
-
-lib_LIBRARIES                             = libopenthread-cc2538.a
-
-libopenthread_cc2538_a_CPPFLAGS           = \
-    -I$(top_srcdir)/include                 \
-    -I$(top_srcdir)/examples/platforms      \
-    -I$(top_srcdir)/src/core                \
-    $(NULL)
-
-PLATFORM_SOURCES                          = \
-    alarm.c                                 \
-    cc2538-reg.h                            \
-    diag.c                                  \
-    entropy.c                               \
-    flash.c                                 \
-    misc.c                                  \
-    openthread-core-cc2538-config.h         \
-    openthread-core-cc2538-config-check.h   \
-    platform-cc2538.h                       \
-    radio.c                                 \
-    rom-utility.h                           \
-    startup-gcc.c                           \
-    system.c                                \
-    logging.c                               \
-    uart.c                                  \
-    $(NULL)
-
-libopenthread_cc2538_a_SOURCES            = \
-    $(PLATFORM_SOURCES)                     \
-    $(NULL)
-
-Dash                                      = -
-libopenthread_cc2538_a_LIBADD             = \
-    $(shell find $(top_builddir)/examples/platforms/utils $(Dash)type f $(Dash)name "*.o")
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/platforms/cc2538/Makefile.platform.am b/examples/platforms/cc2538/Makefile.platform.am
deleted file mode 100644
index f908b4e..0000000
--- a/examples/platforms/cc2538/Makefile.platform.am
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-#  Copyright (c) 2017, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-#
-# cc2538 platform-specific Makefile
-#
-
-LDADD_COMMON                                                          += \
-    $(top_builddir)/examples/platforms/cc2538/libopenthread-cc2538.a     \
-    $(NULL)
-
-LDFLAGS_COMMON                                                        += \
-    -T $(top_srcdir)/examples/platforms/cc2538/cc2538.ld                 \
-    $(NULL)
diff --git a/examples/platforms/cc2538/README.md b/examples/platforms/cc2538/README.md
deleted file mode 100644
index 91d5b7a..0000000
--- a/examples/platforms/cc2538/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# OpenThread on CC2538 Example
-
-This directory contains example platform drivers for the [Texas Instruments CC2538][cc2538].
-
-[cc2538]: http://www.ti.com/product/CC2538
-
-The example platform drivers are intended to present the minimal code necessary to support OpenThread. As a result, the example platform drivers do not necessarily highlight the platform's full capabilities.
-
-## Toolchain
-
-Download and install the [GNU toolchain for ARM Cortex-M][gnu-toolchain].
-
-[gnu-toolchain]: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
-
-In a Bash terminal, follow these instructions to install the GNU toolchain and other dependencies.
-
-```bash
-$ cd <path-to-openthread>
-$ ./script/bootstrap
-```
-
-## Building
-
-In a Bash terminal, follow these instructions to build the cc2538 examples.
-
-```bash
-$ cd <path-to-openthread>
-$ ./bootstrap
-$ make -f examples/Makefile-cc2538
-```
-
-### CC2592 support
-
-If your board has a CC2592 range extender front-end IC connected to the CC2538 (e.g. the CC2538-CC2592 EM reference design), you need to initialise this part before reception of radio traffic will work.
-
-Support is enabled in OpenThread by building with `CC2592=1`:
-
-```bash
-$ make -f examples/Makefile-cc2538 CC2592=1
-```
-
-The default settings should work for any design following the integration advice given in TI's application report ["AN130 - Using CC2592 Front End With CC2538"](http://www.ti.com/lit/pdf/swra447).
-
-Additional settings can be customised:
-
-- `CC2592_PA_EN`: This specifies which pin (on port C of the CC2538) connects to the CC2592's `PA_EN` pin. The default is `3` (PC3).
-- `CC2592_LNA_EN`: This specifies which pin (on port C of the CC2538) connects to the CC2592's `LNA_EN` pin. The default is `2` (PC2).
-- `CC2592_USE_HGM`: This defines whether the HGM pin of the CC2592 is under GPIO control or not. If not, it is assumed that the HGM pin is tied to a power rail.
-- `CC2592_HGM_PORT`: The HGM pin can be connected to any free GPIO. TI recommend using PD2, however if you've used a pin on another GPIO port, you may specify that port (`A`, `B` or `C`) here.
-- `CC2592_HGM_PORT`: The HGM pin can be connected to any free GPIO. TI recommend using PD2, however if you've used a pin on another GPIO port, you may specify that port (`A`, `B` or `C`) here. Default is `D`.
-- `CC2592_HGM_PIN`: The HGM pin can be connected to any free GPIO. TI recommend using PD2, however if you've used a pin on another GPIO pin, you can specify the pin here. Default is `2`.
-- `CC2592_HGM_DEFAULT_STATE`: By default, HGM is enabled at power-on, but you may want to have it default to off, specify `CC2592_HGM_DEFAULT_STATE=0` to do so.
-- `CC2538_RECEIVE_SENSITIVITY`: If you have tied the HGM pin to a power rail, this allows you to calibrate the RSSI values according to the new receive sensitivity. This has no effect if `CC2592_USE_HGM=1` (the default).
-- `CC2538_RSSI_OFFSET`: If you have tied the HGM pin to a power rail, this allows you to calibrate the RSSI values according to the new RSSI offset. This has no effect if `CC2592_USE_HGM=1` (the default).
-
-## Flash Binaries
-
-If the build completed successfully, the `elf` files may be found in `<path-to-openthread>/output/cc2538/bin`.
-
-To flash the images with [Flash Programmer 2][ti-flash-programmer-2], the files must have the `*.elf` extension.
-
-```bash
-$ cd <path-to-openthread>/output/cc2538/bin
-$ cp ot-cli ot-cli.elf
-```
-
-To load the images with the [serial bootloader][ti-cc2538-bootloader], the images must be converted to `bin`. This is done using `arm-none-eabi-objcopy`
-
-```bash
-$ cd <path-to-openthread>/output/cc2538/bin
-$ arm-none-eabi-objcopy -O binary ot-cli ot-cli.bin
-```
-
-The [cc2538-bsl.py script][cc2538-bsl-tool] provides a convenient method for flashing a CC2538 via the UART. To enter the bootloader backdoor for flashing, hold down SELECT for CC2538DK (corresponds to logic '0') while you press the Reset button.
-
-[ti-flash-programmer-2]: http://www.ti.com/tool/flash-programmer
-[ti-cc2538-bootloader]: http://www.ti.com/lit/an/swra466a/swra466a.pdf
-[cc2538-bsl-tool]: https://github.com/JelmerT/cc2538-bsl
-
-## Interact
-
-1. Open terminal to `/dev/ttyUSB1` (serial port settings: 115200 8-N-1).
-2. Type `help` for list of commands.
-
-```bash
-> help
-help
-channel
-childtimeout
-contextreusedelay
-extaddr
-extpanid
-ipaddr
-keysequence
-leaderweight
-mode
-netdata register
-networkidtimeout
-networkkey
-networkname
-panid
-ping
-prefix
-releaserouterid
-rloc16
-route
-routerupgradethreshold
-scan
-start
-state
-stop
-```
diff --git a/examples/platforms/cc2538/alarm.c b/examples/platforms/cc2538/alarm.c
deleted file mode 100644
index 7deefda..0000000
--- a/examples/platforms/cc2538/alarm.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements the OpenThread platform abstraction for the alarm.
- *
- */
-
-#include <stdbool.h>
-#include <stdint.h>
-
-#include <openthread/config.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/diag.h>
-
-#include "platform-cc2538.h"
-
-enum
-{
-    kSystemClock = 32000000, ///< MHz
-    kTicksPerSec = 1000,     ///< Ticks per second
-};
-
-static uint32_t sCounter   = 0;
-static uint32_t sAlarmT0   = 0;
-static uint32_t sAlarmDt   = 0;
-static bool     sIsRunning = false;
-
-static uint8_t  sTimersIsRunning = 0;
-static uint32_t sTimersExpireAt[OT_CC2538_TIMERS_COUNT];
-
-extern void cc2538EnergyScanTimerHandler(void);
-
-void cc2538SetTimer(otCC2538Timer aTimer, uint32_t aDelay)
-{
-    sTimersIsRunning |= (1 << aTimer);
-    sTimersExpireAt[aTimer] = sCounter + aDelay;
-}
-
-void cc2538AlarmInit(void)
-{
-    HWREG(NVIC_ST_RELOAD) = kSystemClock / kTicksPerSec;
-    HWREG(NVIC_ST_CTRL)   = NVIC_ST_CTRL_CLK_SRC | NVIC_ST_CTRL_INTEN | NVIC_ST_CTRL_ENABLE;
-}
-
-uint32_t otPlatAlarmMilliGetNow(void)
-{
-    return sCounter;
-}
-
-void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t t0, uint32_t dt)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sAlarmT0   = t0;
-    sAlarmDt   = dt;
-    sIsRunning = true;
-}
-
-void otPlatAlarmMilliStop(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sIsRunning = false;
-}
-
-void cc2538AlarmProcess(otInstance *aInstance)
-{
-    uint32_t expires;
-    bool     fire = false;
-
-    if (sTimersIsRunning)
-    {
-        if ((int32_t)(sTimersExpireAt[OT_CC2538_TIMER_ENERGY_SCAN] - sCounter) < 0)
-        {
-            sTimersIsRunning &= ~(1 << OT_CC2538_TIMER_ENERGY_SCAN);
-            cc2538EnergyScanTimerHandler();
-        }
-    }
-
-    if (sIsRunning)
-    {
-        expires = sAlarmT0 + sAlarmDt;
-
-        if (sAlarmT0 <= sCounter)
-        {
-            if (expires >= sAlarmT0 && expires <= sCounter)
-            {
-                fire = true;
-            }
-        }
-        else
-        {
-            if (expires >= sAlarmT0 || expires <= sCounter)
-            {
-                fire = true;
-            }
-        }
-
-        if (fire)
-        {
-            sIsRunning = false;
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-            if (otPlatDiagModeGet())
-            {
-                otPlatDiagAlarmFired(aInstance);
-            }
-            else
-#endif
-            {
-                otPlatAlarmMilliFired(aInstance);
-            }
-        }
-    }
-}
-
-void SysTick_Handler()
-{
-    sCounter++;
-}
diff --git a/examples/platforms/cc2538/arm-none-eabi.cmake b/examples/platforms/cc2538/arm-none-eabi.cmake
deleted file mode 100644
index 2e39ec1..0000000
--- a/examples/platforms/cc2538/arm-none-eabi.cmake
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-set(CMAKE_SYSTEM_NAME              Generic)
-set(CMAKE_SYSTEM_PROCESSOR         ARM)
-
-set(CMAKE_C_COMPILER               arm-none-eabi-gcc)
-set(CMAKE_CXX_COMPILER             arm-none-eabi-g++)
-set(CMAKE_ASM_COMPILER             arm-none-eabi-as)
-set(CMAKE_RANLIB                   arm-none-eabi-ranlib)
-
-set(COMMON_C_FLAGS                 "-mthumb -fno-builtin -Wall -fdata-sections -ffunction-sections -mabi=aapcs -mcpu=cortex-m3 -mfloat-abi=soft")
-
-set(CMAKE_C_FLAGS_INIT             "${COMMON_C_FLAGS} -std=gnu99")
-set(CMAKE_CXX_FLAGS_INIT           "${COMMON_C_FLAGS} -fno-exceptions -fno-rtti")
-set(CMAKE_ASM_FLAGS_INIT           "${COMMON_C_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS_INIT    "${COMMON_C_FLAGS} -specs=nano.specs -specs=nosys.specs -nostartfiles")
diff --git a/examples/platforms/cc2538/cc2538-reg.h b/examples/platforms/cc2538/cc2538-reg.h
deleted file mode 100644
index 54972fb..0000000
--- a/examples/platforms/cc2538/cc2538-reg.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file includes CC2538 register definitions.
- *
- */
-
-#ifndef CC2538_REG_H_
-#define CC2538_REG_H_
-
-#include <stdint.h>
-
-// clang-format off
-
-#define HWREG(x)                                (*((volatile uint32_t *)(x)))
-
-/*!
- * For registers that are arrays of 32-bit integers.
- *
- * @param       reg     Register address
- * @param       idx     Register array index
- */
-#define HWREG_ARR(reg, idx)                     HWREG((reg) + ((idx) << 2))
-
-#define NVIC_ST_CTRL                            0xE000E010  // SysTick Control and Status
-#define NVIC_ST_RELOAD                          0xE000E014  // SysTick Reload Value Register
-#define NVIC_EN0                                0xE000E100  // Interrupt 0-31 Set Enable
-
-#define NVIC_ST_CTRL_COUNT                      0x00010000  // Count Flag
-#define NVIC_ST_CTRL_CLK_SRC                    0x00000004  // Clock Source
-#define NVIC_ST_CTRL_INTEN                      0x00000002  // Interrupt Enable
-#define NVIC_ST_CTRL_ENABLE                     0x00000001  // Enable
-
-#define RFCORE_XREG_SRCMATCH_EN                 0x00000001  // SRCMATCH.SRC_MATCH_EN(1)
-#define RFCORE_XREG_SRCMATCH_AUTOPEND           0x00000002  // SRCMATCH.AUTOPEND(1)
-#define RFCORE_XREG_SRCMATCH_PEND_DATAREQ_ONLY  0x00000004  // SRCMATCH.PEND_DATAREQ_ONLY(1)
-
-#define RFCORE_XREG_SRCMATCH_ENABLE_STATUS_SIZE 3           // Num of register for source match enable status
-#define RFCORE_XREG_SRCMATCH_SHORT_ENTRIES      24          // 24 short address entries in maximum
-#define RFCORE_XREG_SRCMATCH_EXT_ENTRIES        12          // 12 extended address entries in maximum
-#define RFCORE_XREG_SRCMATCH_SHORT_ENTRY_OFFSET 4           // address offset for one short address entry
-#define RFCORE_XREG_SRCMATCH_EXT_ENTRY_OFFSET   8           // address offset for one extended address entry
-
-#define INT_UART0                               21          // UART0 Rx and Tx
-
-#define IEEE_EUI64                              0x00280028  // Address of IEEE EUI-64 address
-
-#define RFCORE_FFSM_SRCADDRESS_TABLE            0x40088400  // Source Address Table
-
-#define RFCORE_FFSM_SRCEXTPENDEN0               0x40088590  // Enable/Disable automatic pending per extended address
-#define RFCORE_FFSM_SRCSHORTPENDEN0             0x4008859C  // Enable/Disable automatic pending per short address
-#define RFCORE_FFSM_EXT_ADDR0                   0x400885A8  // Local address information
-#define RFCORE_FFSM_PAN_ID0                     0x400885C8  // Local address information
-#define RFCORE_FFSM_PAN_ID1                     0x400885CC  // Local address information
-#define RFCORE_FFSM_SHORT_ADDR0                 0x400885D0  // Local address information
-#define RFCORE_FFSM_SHORT_ADDR1                 0x400885D4  // Local address information
-#define RFCORE_XREG_FRMFILT0                    0x40088600  // The frame filtering function
-#define RFCORE_XREG_SRCMATCH                    0x40088608  // Source address matching and pending bits
-#define RFCORE_XREG_SRCSHORTEN0                 0x4008860C  // Short address matching
-#define RFCORE_XREG_SRCEXTEN0                   0x40088618  // Extended address matching
-
-#define RFCORE_XREG_FRMCTRL0                    0x40088624  // Frame handling
-#define RFCORE_XREG_FRMCTRL1                    0x40088628  // Frame handling
-#define RFCORE_XREG_RXENABLE                    0x4008862C  // RX enabling
-#define RFCORE_XREG_FREQCTRL                    0x4008863C  // Controls the RF frequency
-#define RFCORE_XREG_TXPOWER                     0x40088640  // Controls the output power
-#define RFCORE_XREG_FSMSTAT0                    0x40088648  // Radio finite state machine status
-#define RFCORE_XREG_FSMSTAT1                    0x4008864C  // Radio status register
-#define RFCORE_XREG_FIFOPCTRL                   0x40088650  // FIFOP threshold
-#define RFCORE_XREG_CCACTRL0                    0x40088658  // CCA threshold
-#define RFCORE_XREG_RSSI                        0x40088660  // RSSI status register
-#define RFCORE_XREG_RSSISTAT                    0x40088664  // RSSI valid status register
-#define RFCORE_XREG_AGCCTRL1                    0x400886C8  // AGC reference level
-#define RFCORE_XREG_RFC_OBS_CTRL                0x400887AC  // RF Core observable output
-#define RFCORE_XREG_TXFILTCFG                   0x400887E8  // TX filter configuration
-#define RFCORE_XREG_RFRND                       0x4008869C  // Random data
-#define RFCORE_SFR_RFDATA                       0x40088828  // The TX FIFO and RX FIFO
-#define RFCORE_SFR_RFERRF                       0x4008882C  // RF error interrupt flags
-#define RFCORE_SFR_RFIRQF0                      0x40088834  // RF interrupt flags
-#define RFCORE_SFR_RFST                         0x40088838  // RF CSMA-CA/strobe processor
-#define CCTEST_OBSSEL                           0x44010014  // CCTEST observable output route
-
-#define RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN    0x00000001  // Enables frame filtering
-
-#define RFCORE_XREG_FRMCTRL0_AUTOACK            0x00000020
-#define RFCORE_XREG_FRMCTRL0_ENERGY_SCAN        0x00000010
-#define RFCORE_XREG_FRMCTRL0_AUTOCRC            0x00000040
-#define RFCORE_XREG_FRMCTRL0_INFINITY_RX        0x00000008
-
-#define RFCORE_XREG_FRMCTRL1_PENDING_OR         0x00000004
-
-#define RFCORE_XREG_RFRND_IRND                  0x00000001
-
-#define RFCORE_XREG_FSMSTAT0_STATE_MASK         0x0000003F
-#define RFCORE_XREG_FSMSTAT0_CAL_DONE           0x00000080
-#define RFCORE_XREG_FSMSTAT0_CAL_RUN            0x00000040
-
-#define RFCORE_XREG_FSMSTAT0_STATE_IDLE         0x00000000
-#define RFCORE_XREG_FSMSTAT0_STATE_RX_CAL       0x00000002
-#define RFCORE_XREG_FSMSTAT0_STATE_SFD_WAIT0    0x00000003
-#define RFCORE_XREG_FSMSTAT0_STATE_SFD_WAIT1    0x00000004
-#define RFCORE_XREG_FSMSTAT0_STATE_SFD_WAIT2    0x00000005
-#define RFCORE_XREG_FSMSTAT0_STATE_SFD_WAIT3    0x00000006
-#define RFCORE_XREG_FSMSTAT0_STATE_RX0          0x00000007
-#define RFCORE_XREG_FSMSTAT0_STATE_RX1          0x00000008
-#define RFCORE_XREG_FSMSTAT0_STATE_RX2          0x00000009
-#define RFCORE_XREG_FSMSTAT0_STATE_RX3          0x0000000A
-#define RFCORE_XREG_FSMSTAT0_STATE_RX4          0x0000000B
-#define RFCORE_XREG_FSMSTAT0_STATE_RX5          0x0000000C
-#define RFCORE_XREG_FSMSTAT0_STATE_RX6          0x0000000D
-#define RFCORE_XREG_FSMSTAT0_STATE_RX_WAIT      0x0000000E
-#define RFCORE_XREG_FSMSTAT0_STATE_RX_FRST      0x00000010
-#define RFCORE_XREG_FSMSTAT0_STATE_RX_OVER      0x00000011
-#define RFCORE_XREG_FSMSTAT0_STATE_TX_CAL       0x00000020
-#define RFCORE_XREG_FSMSTAT0_STATE_TX0          0x00000022
-#define RFCORE_XREG_FSMSTAT0_STATE_TX1          0x00000023
-#define RFCORE_XREG_FSMSTAT0_STATE_TX2          0x00000024
-#define RFCORE_XREG_FSMSTAT0_STATE_TX3          0x00000025
-#define RFCORE_XREG_FSMSTAT0_STATE_TX4          0x00000026
-#define RFCORE_XREG_FSMSTAT0_STATE_TX_FINAL     0x00000027
-#define RFCORE_XREG_FSMSTAT0_STATE_RXTX_TRANS   0x00000028
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK_CAL      0x00000030
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK0         0x00000031
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK1         0x00000032
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK2         0x00000033
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK3         0x00000034
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK4         0x00000035
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK5         0x00000036
-#define RFCORE_XREG_FSMSTAT0_STATE_ACK_DELAY    0x00000037
-#define RFCORE_XREG_FSMSTAT0_STATE_TX_UNDER     0x00000038
-#define RFCORE_XREG_FSMSTAT0_STATE_TX_DOWN0     0x0000001A
-#define RFCORE_XREG_FSMSTAT0_STATE_TX_DOWN1     0x0000003A
-
-#define RFCORE_XREG_FSMSTAT1_RX_ACTIVE          0x00000001
-#define RFCORE_XREG_FSMSTAT1_TX_ACTIVE          0x00000002
-#define RFCORE_XREG_FSMSTAT1_LOCK_STATUS        0x00000004
-#define RFCORE_XREG_FSMSTAT1_SAMPLED_CCA        0x00000008
-#define RFCORE_XREG_FSMSTAT1_CCA                0x00000010  // Clear channel assessment
-#define RFCORE_XREG_FSMSTAT1_SFD                0x00000020
-#define RFCORE_XREG_FSMSTAT1_FIFOP              0x00000040
-#define RFCORE_XREG_FSMSTAT1_FIFO               0x00000080
-
-#define RFCORE_XREG_RSSISTAT_RSSI_VALID         0x00000001  // RSSI value is valid.
-
-#define RFCORE_XREG_RFC_OBS_POL_INV             0x00000040  // Invert polarity of OBS signal
-#define RFCORE_XREG_RFC_OBS_MUX_ZERO            0x00000000  // Observable = constant zero
-#define RFCORE_XREG_RFC_OBS_MUX_ONE             0x00000001  // Observable = constant one
-#define RFCORE_XREG_RFC_OBS_MUX_SNIFF_DATA      0x00000008  // RFC sniff data
-#define RFCORE_XREG_RFC_OBS_MUX_SNIFF_CLK       0x00000009  // RFC sniff clock
-#define RFCORE_XREG_RFC_OBS_MUX_RSSI_VALID      0x0000000c  // RSSI valid
-#define RFCORE_XREG_RFC_OBS_MUX_DEMOD_CCA       0x0000000d  // Clear channel assessment
-#define RFCORE_XREG_RFC_OBS_MUX_SAMPLED_CCA     0x0000000e  // Sampled CCA signal
-#define RFCORE_XREG_RFC_OBS_MUX_SFD_SYNC        0x0000000f  // SFD received or transmitted
-#define RFCORE_XREG_RFC_OBS_MUX_TX_ACTIVE       0x00000010  // Transmitter is active
-#define RFCORE_XREG_RFC_OBS_MUX_RX_ACTIVE       0x00000011  // Receiver is active
-#define RFCORE_XREG_RFC_OBS_MUX_FFCTRL_FIFO     0x00000012  // One or more bytes in FIFO
-#define RFCORE_XREG_RFC_OBS_MUX_FFCTRL_FIFOP    0x00000013  // One or more frames in FIFO
-#define RFCORE_XREG_RFC_OBS_MUX_PACKET_DONE     0x00000014  // Packet received
-#define RFCORE_XREG_RFC_OBS_MUX_RFC_XOR_RAND_IQ 0x00000016  // RAND I ^ RAND Q
-#define RFCORE_XREG_RFC_OBS_MUX_RFC_RAND_Q      0x00000017  // Random data from Q channel
-#define RFCORE_XREG_RFC_OBS_MUX_RFC_RAND_I      0x00000018  // Random data from I channel
-#define RFCORE_XREG_RFC_OBS_MUX_LOCK_STATUS     0x00000019  // PLL is in lock
-#define RFCORE_XREG_RFC_OBS_MUX_PA_PD           0x00000028  // Power amp power down
-#define RFCORE_XREG_RFC_OBS_MUX_LNA_PD          0x0000002a  // LNA power down
-
-#define RFCORE_SFR_RFERRF_NLOCK                 0x00000001  // Failed to achieve PLL lock.
-#define RFCORE_SFR_RFERRF_RXABO                 0x00000002  // RX Aborted.
-#define RFCORE_SFR_RFERRF_RXOVERF               0x00000004  // RX FIFO overflowed.
-#define RFCORE_SFR_RFERRF_RXUNDERF              0x00000008  // RX FIFO underflowed.
-#define RFCORE_SFR_RFERRF_TXOVERF               0x00000010  // TX FIFO overflowed.
-#define RFCORE_SFR_RFERRF_TXUNDERF              0x00000020  // TX FIFO underflowed.
-#define RFCORE_SFR_RFERRF_STROBEERR             0x00000040  // Command Strobe Error.
-
-#define RFCORE_SFR_RFST_INSTR_RXON              0xE3        // Instruction set RX on
-#define RFCORE_SFR_RFST_INSTR_TXON              0xE9        // Instruction set TX on
-#define RFCORE_SFR_RFST_INSTR_RFOFF             0xEF        // Instruction set RF off
-#define RFCORE_SFR_RFST_INSTR_FLUSHRX           0xED        // Instruction set flush rx buffer
-#define RFCORE_SFR_RFST_INSTR_FLUSHTX           0xEE        // Instruction set flush tx buffer
-
-#define CCTEST_OBSSEL_EN                        0x00000080  // Enable the OBS output on this pin
-#define CCTEST_OBSSEL_SEL_OBS0                  0x00000000  // Route OBS0 to pin
-#define CCTEST_OBSSEL_SEL_OBS1                  0x00000001  // Route OBS1 to pin
-#define CCTEST_OBSSEL_SEL_OBS2                  0x00000002  // Route OBS2 to pin
-
-#define ANA_REGS_BASE                           0x400D6000  // ANA_REGS
-#define ANA_REGS_O_IVCTRL                       0x00000004  // Analog control register
-
-#define SYS_CTRL_CLOCK_CTRL                     0x400D2000  // The clock control register
-#define SYS_CTRL_SYSDIV_32MHZ                   0x00000000  // Sys_div for sysclk 32MHz
-#define SYS_CTRL_CLOCK_CTRL_AMP_DET             0x00200000
-
-#define SYS_CTRL_PWRDBG                         0x400D2074
-#define SYS_CTRL_PWRDBG_FORCE_WARM_RESET        0x00000008
-
-#define SYS_CTRL_RCGCUART                       0x400D2028
-#define SYS_CTRL_SCGCUART                       0x400D202C
-#define SYS_CTRL_DCGCUART                       0x400D2030
-#define SYS_CTRL_I_MAP                          0x400D2098
-#define SYS_CTRL_RCGCRFC                        0x400D20A8
-#define SYS_CTRL_SCGCRFC                        0x400D20AC
-#define SYS_CTRL_DCGCRFC                        0x400D20B0
-#define SYS_CTRL_EMUOVR                         0x400D20B4
-
-#define SYS_CTRL_RCGCRFC_RFC0                   0x00000001
-#define SYS_CTRL_SCGCRFC_RFC0                   0x00000001
-#define SYS_CTRL_DCGCRFC_RFC0                   0x00000001
-
-#define SYS_CTRL_I_MAP_ALTMAP                   0x00000001
-
-#define SYS_CTRL_RCGCUART_UART0                 0x00000001
-#define SYS_CTRL_SCGCUART_UART0                 0x00000001
-#define SYS_CTRL_DCGCUART_UART0                 0x00000001
-
-#define SYS_CTRL_RCGCUART_UART1                 0x00000002
-#define SYS_CTRL_SCGCUART_UART1                 0x00000002
-#define SYS_CTRL_DCGCUART_UART1                 0x00000002
-
-#define IOC_PA0_SEL                             0x400D4000  // Peripheral select control
-#define IOC_PA1_SEL                             0x400D4004  // Peripheral select control
-#define IOC_PA2_SEL                             0x400D4008
-#define IOC_PA3_SEL                             0x400D400C
-#define IOC_UARTRXD_UART0                       0x400D4100
-#define IOC_UARTRXD_UART1                       0x400D4108
-
-#define IOC_PA0_OVER                            0x400D4080
-#define IOC_PA1_OVER                            0x400D4084
-#define IOC_PA2_OVER                            0x400D4088
-#define IOC_PA3_OVER                            0x400D408C
-
-#define IOC_MUX_OUT_SEL_UART0_TXD               0x00000000
-#define IOC_MUX_OUT_SEL_UART1_TXD               0x00000002
-
-#define IOC_OVERRIDE_OE                         0x00000008  // PAD Config Override Output Enable
-#define IOC_OVERRIDE_DIS                        0x00000000  // PAD Config Override Disabled
-
-#define IOC_PAD_IN_SEL_PA0                      0x00000000  // PA0
-#define IOC_PAD_IN_SEL_PA1                      0x00000001  // PA1
-#define IOC_PAD_IN_SEL_PA2                      0x00000002  // PA2
-#define IOC_PAD_IN_SEL_PA3                      0x00000003  // PA3
-
-#define UART0_BASE                              0x4000C000
-#define UART1_BASE                              0x4000D000
-#define GPIO_A_BASE                             0x400D9000  // GPIO A
-#define GPIO_B_BASE                             0x400DA000  // GPIO B
-#define GPIO_C_BASE                             0x400DB000  // GPIO C
-#define GPIO_D_BASE                             0x400DC000  // GPIO D
-
-#define GPIO_O_DIR                              0x00000400
-#define GPIO_O_AFSEL                            0x00000420
-
-#define GPIO_PIN(x)                             (1UL << x)  // Arbitrary GPIO pin
-#define GPIO_PIN_0                              0x00000001  // GPIO pin 0
-#define GPIO_PIN_1                              0x00000002  // GPIO pin 1
-#define GPIO_PIN_2                              0x00000004  // GPIO pin 2
-#define GPIO_PIN_3                              0x00000008  // GPIO pin 3
-#define GPIO_PIN_4                              0x00000010  // GPIO pin 4
-#define GPIO_PIN_5                              0x00000020  // GPIO pin 5
-#define GPIO_PIN_6                              0x00000040  // GPIO pin 6
-#define GPIO_PIN_7                              0x00000080  // GPIO pin 7
-
-#define UART_O_DR                               0x00000000  // UART data
-#define UART_O_FR                               0x00000018  // UART flag
-#define UART_O_IBRD                             0x00000024
-#define UART_O_FBRD                             0x00000028
-#define UART_O_LCRH                             0x0000002C
-#define UART_O_CTL                              0x00000030  // UART control
-#define UART_O_IM                               0x00000038  // UART interrupt mask
-#define UART_O_MIS                              0x00000040  // UART masked interrupt status
-#define UART_O_ICR                              0x00000044  // UART interrupt clear
-#define UART_O_CC                               0x00000FC8  // UART clock configuration
-
-#define UART_FR_RXFE                            0x00000010  // UART receive FIFO empty
-#define UART_FR_TXFF                            0x00000020  // UART transmit FIFO full
-#define UART_FR_RXFF                            0x00000040  // UART receive FIFO full
-
-#define UART_CONFIG_WLEN_8                      0x00000060  // 8 bit data
-#define UART_CONFIG_STOP_ONE                    0x00000000  // One stop bit
-#define UART_CONFIG_PAR_NONE                    0x00000000  // No parity
-
-#define UART_CTL_UARTEN                         0x00000001  // UART enable
-#define UART_CTL_TXE                            0x00000100  // UART transmit enable
-#define UART_CTL_RXE                            0x00000200  // UART receive enable
-
-#define UART_IM_RXIM                            0x00000010  // UART receive interrupt mask
-#define UART_IM_RTIM                            0x00000040  // UART receive time-out interrupt
-
-#define SOC_ADC_ADCCON1                         0x400D7000  // ADC Control
-#define SOC_ADC_RNDL                            0x400D7014  // RNG low data
-#define SOC_ADC_RNDH                            0x400D7018  // RNG high data
-
-#define SOC_ADC_ADCCON1_RCTRL0                  0x00000004  // ADCCON1 RCTRL bit 0
-#define SOC_ADC_ADCCON1_RCTRL1                  0x00000008  // ADCCON1 RCTRL bit 1
-
-#define FLASH_CTRL_FCTL                         0x400D3008  // Flash control
-#define FLASH_CTRL_DIECFG0                      0x400D3014  // Flash information
-
-// clang-format on
-
-#endif
diff --git a/examples/platforms/cc2538/cc2538.ld b/examples/platforms/cc2538/cc2538.ld
deleted file mode 100644
index daff162..0000000
--- a/examples/platforms/cc2538/cc2538.ld
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   GCC linker script for CC2538.
- */
-
-_512k_bytes             = (512*1024);
-_256k_bytes             = (256*1024);
-_128k_bytes             = (128*1024);
-_FLASH_page_size        = 2048;
-
-/*
- * Change for your chip, default is 512k chips
- */
-_FLASH_size_bytes       = _512k_bytes;
-_FLASH_n_pages          = (_FLASH_size_bytes / _FLASH_page_size);
-/* reduce the usable size by: the CCA + settings Page A & B, total 3 pages */
-_FLASH_usable_size      = (_FLASH_size_bytes - (3 * _FLASH_page_size));
-_FLASH_start            = 0x00200000;
-_FLASH_end              = (_FLASH_start + _FLASH_size_bytes);
-
-/*
- * The CCA (Customer Configuration Area) is always the last page.
- * See: http://www.ti.com/lit/ug/swru319c/swru319c.pdf
- * table 8-2 for more details.
- */
-_FLASH_cca_page         = (_FLASH_end - (1 * _FLASH_page_size));
-
-/*
- * OpenThread NV storage goes in the settings page.
- * OpenThread requires at least 2 adjacent pages, call them A and B.
- */
-_FLASH_settings_pageB   = (_FLASH_end - (2 * _FLASH_page_size));
-_FLASH_settings_pageA   = (_FLASH_end - (3 * _FLASH_page_size));
-
-MEMORY
-{
-  /* would like to use SYMBOLS (from above)here but we cannot
-   * GCC version 4.9 does not support symbolic expressions here.
-   * But later versions do support the feature.
-   */
-  FLASH (rx) :     ORIGIN = 0x00200000,     LENGTH = 0x0007c000
-  FLASH_CCA (rx) : ORIGIN = 0x0027FFD4,     LENGTH = 0x2c
-  SRAM (rwx) :     ORIGIN = 0x20000000,     LENGTH = 32K
-}
-/*
- * To safty check what would have been the SYMBOL values
- * we use these ASSERTS to verify things are still good.
- */
-ASSERT( _FLASH_start       == 0x00200000, "invalid flash start address for cc2538")
-ASSERT( _FLASH_cca_page    == 0x0027f800, "invalid cca start address for cc2538")
-ASSERT( _FLASH_usable_size == 0x0007e800, "Invalid usable size for this config")
-
-
-
-ENTRY(flash_cca_lock_page)
-SECTIONS
-{
-    .text : ALIGN(4)
-    {
-        _text = .;
-        *(.vectors)
-        *(.text*)
-        *(.rodata*)
-        KEEP(*(.init))
-        KEEP(*(.fini))
-        _etext = .;
-    } > FLASH= 0
-
-    .init_array :
-    {
-        _init_array = .;
-        KEEP(*(SORT(.init_array.*)))
-        KEEP(*(.init_array*))
-        _einit_array = .;
-    } > FLASH
-
-    .ARM.exidx : ALIGN(4)
-    {
-        *(.ARM.exidx*)
-    } > FLASH
-
-    .data : ALIGN(4)
-    {
-        _data = .;
-        *(.data*)
-        _edata = .;
-    } > SRAM AT > FLASH
-    _ldata = LOADADDR(.data);
-
-    .bss : ALIGN(4)
-    {
-        _bss = .;
-        *(.bss*)
-        *(COMMON)
-        _ebss = .;
-    } > SRAM
-
-    _heap = .;
-    end = .;
-
-    .stack : ALIGN(4)
-    {
-        *(.stack)
-    } > SRAM
-
-    .flashcca :
-    {
-        KEEP(*(.flash_cca))
-    } > FLASH_CCA
-}
diff --git a/examples/platforms/cc2538/diag.c b/examples/platforms/cc2538/diag.c
deleted file mode 100644
index 579c1e7..0000000
--- a/examples/platforms/cc2538/diag.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-
-#include <openthread/config.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/radio.h>
-
-#include "platform-cc2538.h"
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-/**
- * Diagnostics mode variables.
- *
- */
-static bool sDiagMode = false;
-
-void otPlatDiagModeSet(bool aMode)
-{
-    sDiagMode = aMode;
-}
-
-bool otPlatDiagModeGet()
-{
-    return sDiagMode;
-}
-
-void otPlatDiagChannelSet(uint8_t aChannel)
-{
-    OT_UNUSED_VARIABLE(aChannel);
-}
-
-void otPlatDiagTxPowerSet(int8_t aTxPower)
-{
-    OT_UNUSED_VARIABLE(aTxPower);
-}
-
-void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aFrame);
-    OT_UNUSED_VARIABLE(aError);
-}
-
-void otPlatDiagAlarmCallback(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-}
-
-#endif // OPENTHREAD_CONFIG_DIAG_ENABLE
diff --git a/examples/platforms/cc2538/entropy.c b/examples/platforms/cc2538/entropy.c
deleted file mode 100644
index 47a31be..0000000
--- a/examples/platforms/cc2538/entropy.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements an entropy source based on ADC.
- *
- */
-
-#include <openthread/platform/entropy.h>
-
-#include <openthread/platform/radio.h>
-
-#include "platform-cc2538.h"
-#include "utils/code_utils.h"
-
-static void generateRandom(uint8_t *aOutput, uint16_t aOutputLength)
-{
-    uint32_t frmctrl0;
-
-    HWREG(SOC_ADC_ADCCON1) &= ~(SOC_ADC_ADCCON1_RCTRL1 | SOC_ADC_ADCCON1_RCTRL0);
-    HWREG(SYS_CTRL_RCGCRFC) = SYS_CTRL_RCGCRFC_RFC0;
-
-    while (HWREG(SYS_CTRL_RCGCRFC) != SYS_CTRL_RCGCRFC_RFC0)
-        ;
-
-    frmctrl0                    = HWREG(RFCORE_XREG_FRMCTRL0);
-    HWREG(RFCORE_XREG_FRMCTRL0) = RFCORE_XREG_FRMCTRL0_INFINITY_RX;
-    HWREG(RFCORE_SFR_RFST)      = RFCORE_SFR_RFST_INSTR_RXON;
-
-    while (!HWREG(RFCORE_XREG_RSSISTAT) & RFCORE_XREG_RSSISTAT_RSSI_VALID)
-        ;
-
-    for (uint16_t index = 0; index < aOutputLength; index++)
-    {
-        aOutput[index] = 0;
-
-        for (uint8_t offset = 0; offset < 8 * sizeof(uint8_t); offset++)
-        {
-            aOutput[index] <<= 1;
-            aOutput[index] |= (HWREG(RFCORE_XREG_RFRND) & RFCORE_XREG_RFRND_IRND);
-        }
-    }
-
-    HWREG(RFCORE_SFR_RFST)      = RFCORE_SFR_RFST_INSTR_RFOFF;
-    HWREG(RFCORE_XREG_FRMCTRL0) = frmctrl0;
-}
-
-void cc2538RandomInit(void)
-{
-    uint16_t seed = 0;
-
-    while (seed == 0x0000 || seed == 0x8003)
-    {
-        generateRandom((uint8_t *)&seed, sizeof(seed));
-    }
-
-    HWREG(SOC_ADC_RNDL) = (seed >> 8) & 0xff;
-    HWREG(SOC_ADC_RNDL) = seed & 0xff;
-}
-
-otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength)
-{
-    otError error   = OT_ERROR_NONE;
-    uint8_t channel = 0;
-
-    otEXPECT_ACTION(aOutput, error = OT_ERROR_INVALID_ARGS);
-
-    if (sInstance && otPlatRadioIsEnabled(sInstance))
-    {
-        channel = 11 + (HWREG(RFCORE_XREG_FREQCTRL) - 11) / 5;
-        otPlatRadioSleep(sInstance);
-        otPlatRadioDisable(sInstance);
-    }
-
-    generateRandom(aOutput, aOutputLength);
-
-    if (channel)
-    {
-        cc2538RadioInit();
-        otPlatRadioEnable(sInstance);
-        otPlatRadioReceive(sInstance, channel);
-    }
-
-exit:
-    return error;
-}
diff --git a/examples/platforms/cc2538/flash.c b/examples/platforms/cc2538/flash.c
deleted file mode 100644
index 04c8a65..0000000
--- a/examples/platforms/cc2538/flash.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <assert.h>
-#include <stdint.h>
-#include <string.h>
-
-#include "platform-cc2538.h"
-#include "rom-utility.h"
-
-#define FLASH_CTRL_FCTL_BUSY 0x00000080
-
-#define FLASH_PAGE_SIZE 2048
-#define FLASH_PAGE_NUM 2
-#define FLASH_SWAP_SIZE (FLASH_PAGE_SIZE * (FLASH_PAGE_NUM / 2))
-
-/* The linker script creates this external symbol */
-extern uint8_t _FLASH_settings_pageA[];
-
-/* Convert a settings offset to the physical address within the flash settings pages */
-static uint32_t flashPhysAddr(uint8_t aSwapIndex, uint32_t aOffset)
-{
-    uint32_t address = (uint32_t)(&_FLASH_settings_pageA[0]) + aOffset;
-
-    if (aSwapIndex)
-    {
-        address += FLASH_SWAP_SIZE;
-    }
-
-    return address;
-}
-
-void otPlatFlashInit(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-}
-
-uint32_t otPlatFlashGetSwapSize(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return FLASH_SWAP_SIZE;
-}
-
-void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    ROM_PageErase(flashPhysAddr(aSwapIndex, 0), FLASH_PAGE_SIZE);
-    while (HWREG(FLASH_CTRL_FCTL) & FLASH_CTRL_FCTL_BUSY)
-    {
-    }
-}
-
-void otPlatFlashWrite(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, const void *aData, uint32_t aSize)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint32_t *data = (uint32_t *)(aData);
-
-    for (uint32_t size = 0; size < aSize; size += sizeof(uint32_t), aOffset += sizeof(uint32_t), data++)
-    {
-        ROM_ProgramFlash(data, flashPhysAddr(aSwapIndex, aOffset), sizeof(uint32_t));
-
-        while (HWREG(FLASH_CTRL_FCTL) & FLASH_CTRL_FCTL_BUSY)
-        {
-        }
-    }
-}
-
-void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, uint8_t *aData, uint32_t aSize)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    memcpy(aData, (void *)flashPhysAddr(aSwapIndex, aOffset), aSize);
-}
diff --git a/examples/platforms/cc2538/logging.c b/examples/platforms/cc2538/logging.c
deleted file mode 100644
index 82158ae..0000000
--- a/examples/platforms/cc2538/logging.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file logging.c
- * Platform abstraction for the logging
- *
- */
-
-#include <openthread-core-config.h>
-#include <openthread/config.h>
-#include <openthread/platform/logging.h>
-#include <openthread/platform/toolchain.h>
-
-#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED)
-OT_TOOL_WEAK void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
-{
-    OT_UNUSED_VARIABLE(aLogLevel);
-    OT_UNUSED_VARIABLE(aLogRegion);
-    OT_UNUSED_VARIABLE(aFormat);
-}
-#endif
diff --git a/examples/platforms/cc2538/misc.c b/examples/platforms/cc2538/misc.c
deleted file mode 100644
index 94dca3d..0000000
--- a/examples/platforms/cc2538/misc.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <openthread/platform/misc.h>
-
-#include "platform-cc2538.h"
-
-void otPlatReset(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    HWREG(SYS_CTRL_PWRDBG) = SYS_CTRL_PWRDBG_FORCE_WARM_RESET;
-}
-
-otPlatResetReason otPlatGetResetReason(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    // TODO: Write me!
-    return OT_PLAT_RESET_REASON_POWER_ON;
-}
-
-void otPlatWakeHost(void)
-{
-    // TODO: implement an operation to wake the host from sleep state.
-}
diff --git a/examples/platforms/cc2538/openthread-core-cc2538-config-check.h b/examples/platforms/cc2538/openthread-core-cc2538-config-check.h
deleted file mode 100644
index 93788b1..0000000
--- a/examples/platforms/cc2538/openthread-core-cc2538-config-check.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef OPENTHREAD_CORE_CC2538_CONFIG_CHECK_H_
-#define OPENTHREAD_CORE_CC2538_CONFIG_CHECK_H_
-
-#if OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT
-#error "Platform cc2538 doesn't support configuration option: OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT"
-#endif
-
-#endif /* OPENTHREAD_CORE_CC2538_CONFIG_CHECK_H_ */
diff --git a/examples/platforms/cc2538/openthread-core-cc2538-config.h b/examples/platforms/cc2538/openthread-core-cc2538-config.h
deleted file mode 100644
index 1f26217..0000000
--- a/examples/platforms/cc2538/openthread-core-cc2538-config.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file includes cc2538 compile-time configuration constants for OpenThread.
- */
-
-#ifndef OPENTHREAD_CORE_CC2538_CONFIG_H_
-#define OPENTHREAD_CORE_CC2538_CONFIG_H_
-
-/**
- * @def OPENTHREAD_CONFIG_PLATFORM_INFO
- *
- * The platform-specific string to insert into the OpenThread version string.
- *
- */
-#define OPENTHREAD_CONFIG_PLATFORM_INFO "CC2538"
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE
- *
- * Define to 1 if you want to enable software ACK timeout logic.
- *
- */
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE 1
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE
- *
- * Define to 1 if you want to enable software retransmission logic.
- *
- */
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE 1
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE
- *
- * Define to 1 if you want to enable software CSMA-CA backoff logic.
- *
- */
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE 1
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE
- *
- * Define to 1 if you want to enable software transmission security logic.
- *
- */
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE 0
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE
- *
- * Define to 1 if you want to enable software energy scanning logic.
- *
- */
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE 1
-
-/**
- * @def OPENTHREAD_CONFIG_NCP_HDLC_ENABLE
- *
- * Define to 1 to enable NCP HDLC support.
- *
- */
-#define OPENTHREAD_CONFIG_NCP_HDLC_ENABLE 1
-
-/**
- * @def OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
- *
- * Enable support for using interrupt-driven radio reception.  This allows
- * for a single frame to be received whilst the CPU is busy processing some
- * other code.
- *
- * To disable interrupts and just rely on polling, set this to 0.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-#define OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2538_WITH_CC2592
- *
- * Enable support for the CC2592 range-extender front-end.
- *
- * This is a feature of the CC2538-CC2592 EM and other peripherals which
- * extends the range of the bare CC2538 to over a kilometre line-of-sight.
- * The CC2592 needs to be wired up to the RF port on the CC2538 in accordance
- * with application note 130 ("Using CC2592 Front End With CC2538", TI doc
- * SWRA447).
- *
- * If you have such a board, change this to 1.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2538_WITH_CC2592
-#define OPENTHREAD_CONFIG_CC2538_WITH_CC2592 0
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2592_PA_EN_PIN
- *
- * Define the pin (on port C) that connects to the CC2592 PA_EN pin.
- *
- * One of the 3 observable channels on the CC2538 radio module will be
- * configured to take the "PA power down" signal from the radio module itself,
- * invert it, and emit it on this GPIO pin.  Due to hardware constraints, it
- * may only be connected to a pin on GPIO port C.
- *
- * The default (PC3) is as per TI recommendations in AN130.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2592_PA_EN_PIN
-#define OPENTHREAD_CONFIG_CC2592_PA_EN_PIN 3
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN
- *
- * Define the pin (on port C) that connects to the CC2592 LNA_EN pin.
- *
- * One of the 3 observable channels on the CC2538 radio module will be
- * configured to take the "LNA power down" signal from the radio module itself,
- * invert it, and emit it on this GPIO pin.  Due to hardware constraints, it
- * may only be connected to a pin on GPIO port C.
- *
- * The default (PC2) is as per TI recommendations in AN130.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN
-#define OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN 2
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2592_USE_HGM
- *
- * Enable control of the high-gain mode signal.
- *
- * High-gain mode is enabled through the `HGM` pin on the CC2592, which may be
- * connected to any free GPIO pin for software control, or may be linked to
- * VDD or 0V to hard-wire it to a given state.
- *
- * Set this to 0 if you have wired this pin to a power rail, or have a
- * non-standard way of controlling it.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2592_USE_HGM
-#define OPENTHREAD_CONFIG_CC2592_USE_HGM 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY
- *
- * Set the CC2538 receive sensitivity.
- *
- * A bare CC2538 has a receive sensitivity of -88dBm.  The CC2592 changes this
- * to -85 or -81 depending on whether the HGM pin is high or low.  If
- * `OPENTHREAD_CONFIG_CC2592_USE_HGM` is 0, then this sets the receive
- * sensitivity.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY
-#define OPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY -88
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2538_RSSI_OFFSET
- *
- * Set the CC2538 RSSI offset.  This calibrates the RSSI readings received from
- * the CC2538 radio module to give a reading in dBm.
- *
- * For a standard CC2538 (no front-end), the RSSI offset is 73.
- *
- * For a CC2592 hard-wired in high-gain mode, an offset of 85 should be used;
- * or for low-gain mode, 81.  If `OPENTHREAD_CONFIG_CC2592_USE_HGM` is 0, then
- * this calibrates the RSSI value accordingly.
- */
-#ifndef OPENTHREAD_CONFIG_CC2538_RSSI_OFFSET
-#define OPENTHREAD_CONFIG_CC2538_RSSI_OFFSET 73
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2592_HGM_PORT
- *
- * Define the GPIO port that the HGM pin is connected to.  It may be
- * connected to any available GPIO pin.
- *
- * The default (GPIO port D) is as per TI recommendations.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2592_HGM_PORT
-#define OPENTHREAD_CONFIG_CC2592_HGM_PORT GPIO_D_BASE
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2592_HGM_PIN
- *
- * Define the pin on the GPIO port that the HGM pin is connected to.  It
- * may be connected to any available GPIO pin.
- *
- * The default (PD2) is as per TI recommendations.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2592_HGM_PIN
-#define OPENTHREAD_CONFIG_CC2592_HGM_PIN 2
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE
- *
- * Define the default state of the CC2592's HGM pin.
- *
- * The default is to turn high-gain mode on.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE
-#define OPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE true
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE
- *
- * Define to 1 to enable otPlatFlash* APIs to support non-volatile storage.
- *
- * When defined to 1, the platform MUST implement the otPlatFlash* APIs instead of the otPlatSettings* APIs.
- *
- */
-#define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 1
-
-#endif // OPENTHREAD_CORE_CC2538_CONFIG_H_
diff --git a/examples/platforms/cc2538/platform-cc2538.h b/examples/platforms/cc2538/platform-cc2538.h
deleted file mode 100644
index f89b01b..0000000
--- a/examples/platforms/cc2538/platform-cc2538.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file includes the platform-specific initializers.
- *
- */
-
-#ifndef PLATFORM_CC2538_H_
-#define PLATFORM_CC2538_H_
-
-#include <openthread-core-config.h>
-#include <stdint.h>
-#include <openthread/config.h>
-#include <openthread/instance.h>
-
-#include "cc2538-reg.h"
-
-// Global OpenThread instance structure
-extern otInstance *sInstance;
-
-/**
- * Initialize the debug uart
- */
-void cc2538DebugUartInit(void);
-
-/**
- * This function initializes the alarm service used by OpenThread.
- *
- */
-void cc2538AlarmInit(void);
-
-/**
- * This function performs alarm driver processing.
- *
- * @param[in]  aInstance  The OpenThread instance structure.
- *
- */
-void cc2538AlarmProcess(otInstance *aInstance);
-
-/**
- * This function initializes the radio service used by OpenThread.
- *
- */
-void cc2538RadioInit(void);
-
-/**
- * This function performs radio driver processing.
- *
- * @param[in]  aInstance  The OpenThread instance structure.
- *
- */
-void cc2538RadioProcess(otInstance *aInstance);
-
-/**
- * This function initializes the random number service used by OpenThread.
- *
- */
-void cc2538RandomInit(void);
-
-/**
- * This function performs UART driver processing.
- *
- */
-void cc2538UartProcess(void);
-
-#if OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-/**
- * Change the state of the CC2592 HGM pin.
- *
- * @param	aState	Whether or not to enable HGM
- */
-void cc2538RadioSetHgm(bool aState);
-
-/**
- * Retrieve the state of the CC2592 HGM pin.
- */
-bool cc2538RadioGetHgm(void);
-#endif // OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-
-typedef enum
-{
-    OT_CC2538_TIMER_ENERGY_SCAN, ///< Internal timer for energy scan
-    OT_CC2538_TIMERS_COUNT,      ///< Number of internal timers
-} otCC2538Timer;
-
-/**
- * This function sets the internal timer.
- *
- * @param[in]   aTimer  The timer identifier.
- * @param[in]   aDelay  The delay to trigger the timer, and must be no more than `INT32_MAX`.
- *
- */
-void cc2538SetTimer(otCC2538Timer aTimer, uint32_t aDelay);
-
-#endif // PLATFORM_CC2538_H_
diff --git a/examples/platforms/cc2538/radio.c b/examples/platforms/cc2538/radio.c
deleted file mode 100644
index 0878f11..0000000
--- a/examples/platforms/cc2538/radio.c
+++ /dev/null
@@ -1,1273 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements the OpenThread platform abstraction for radio communication.
- *
- */
-
-#include <openthread/config.h>
-#include <openthread/logging.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/diag.h>
-#include <openthread/platform/radio.h>
-
-#include "platform-cc2538.h"
-#include "utils/code_utils.h"
-
-#define RFCORE_XREG_RFIRQM0 0x4008868C // RF interrupt masks
-#define RFCORE_XREG_RFIRQM1 0x40088690 // RF interrupt masks
-#define RFCORE_XREG_RFERRM 0x40088694  // RF error interrupt mask
-
-#define RFCORE_SFR_RFIRQF0_RXMASKZERO 0x00000080      // RXENABLE is now completely clear
-#define RFCORE_SFR_RFIRQF0_RXPKTDONE 0x00000040       // A complete frame has been received
-#define RFCORE_SFR_RFIRQF0_FRAME_ACCEPTED 0x00000020  // Frame has passed frame filtering
-#define RFCORE_SFR_RFIRQF0_SRC_MATCH_FOUND 0x00000010 // Source match is found
-#define RFCORE_SFR_RFIRQF0_SRC_MATCH_DONE 0x00000008  // Source matching is complete
-#define RFCORE_SFR_RFIRQF0_FIFOP 0x00000004           // The number of bytes in the RX fifo is above threshold
-#define RFCORE_SFR_RFIRQF0_SFD 0x00000002             // SFD has been received or transmitted
-#define RFCORE_SFR_RFIRQF0_ACT_UNUSED 0x00000001      // Reserved
-
-#define RFCORE_XREG_RFIRQM0_RXMASKZERO 0x00000080
-#define RFCORE_XREG_RFIRQM0_RXPKTDONE 0x00000040
-#define RFCORE_XREG_RFIRQM0_FRAME_ACCEPTED 0x00000020
-#define RFCORE_XREG_RFIRQM0_SRC_MATCH_FOUND 0x00000010
-#define RFCORE_XREG_RFIRQM0_SRC_MATCH_DONE 0x00000008
-#define RFCORE_XREG_RFIRQM0_FIFOP 0x00000004
-#define RFCORE_XREG_RFIRQM0_SFD 0x00000002
-#define RFCORE_XREG_RFIRQM0_ACT_UNUSED 0x00000001
-
-#define RFCORE_SFR_RFIRQF1_CSP_WAIT 0x00000020
-#define RFCORE_SFR_RFIRQF1_CSP_STOP 0x00000010
-#define RFCORE_SFR_RFIRQF1_CSP_MANINT 0x00000008
-#define RFCORE_SFR_RFIRQF1_RF_IDLE 0x00000004
-#define RFCORE_SFR_RFIRQF1_TXDONE 0x00000002
-#define RFCORE_SFR_RFIRQF1_TXACKDONE 0x00000001
-
-#define RFCORE_XREG_RFIRQM1_CSP_WAIT 0x00000020
-#define RFCORE_XREG_RFIRQM1_CSP_STOP 0x00000010
-#define RFCORE_XREG_RFIRQM1_CSP_MANINT 0x00000008
-#define RFCORE_XREG_RFIRQM1_RF_IDLE 0x00000004
-#define RFCORE_XREG_RFIRQM1_TXDONE 0x00000002
-#define RFCORE_XREG_RFIRQM1_TXACKDONE 0x00000001
-
-#define RFCORE_XREG_RFERRM_STROBE_ERR 0x00000040
-#define RFCORE_XREG_RFERRM_TXUNDERF 0x00000020
-#define RFCORE_XREG_RFERRM_TXOVERF 0x00000010
-#define RFCORE_XREG_RFERRM_RXUNDERF 0x00000008
-#define RFCORE_XREG_RFERRM_RXOVERF 0x00000004
-#define RFCORE_XREG_RFERRM_RXABO 0x00000002
-#define RFCORE_XREG_RFERRM_NLOCK 0x00000001
-
-enum
-{
-    IEEE802154_MIN_LENGTH      = 5,
-    IEEE802154_MAX_LENGTH      = 127,
-    IEEE802154_ACK_LENGTH      = 5,
-    IEEE802154_FRAME_TYPE_MASK = 0x7,
-    IEEE802154_FRAME_TYPE_ACK  = 0x2,
-    IEEE802154_FRAME_PENDING   = 1 << 4,
-    IEEE802154_ACK_REQUEST     = 1 << 5,
-    IEEE802154_DSN_OFFSET      = 2,
-};
-
-enum
-{
-    CC2538_RSSI_OFFSET = OPENTHREAD_CONFIG_CC2538_RSSI_OFFSET,
-    // TI AN130 (SWRA447) Table 4 (bottom of page 3)
-    CC2592_RSSI_OFFSET_HGM = 85,
-    CC2592_RSSI_OFFSET_LGM = 81,
-    CC2538_CRC_BIT_MASK    = 0x80,
-    CC2538_LQI_BIT_MASK    = 0x7f,
-};
-
-// All values in dBm
-enum
-{
-    CC2538_RECEIVE_SENSITIVITY = OPENTHREAD_CONFIG_CC2538_RECEIVE_SENSITIVITY,
-    // TI AN130 (SWRA447) Table 3 (middle of page 3)
-    CC2592_RECEIVE_SENSITIVITY_LGM = -99,
-    CC2592_RECEIVE_SENSITIVITY_HGM = -101,
-};
-
-typedef struct TxPowerTable
-{
-    int8_t  mTxPowerVal;
-    uint8_t mTxPowerReg;
-} TxPowerTable;
-
-// The transmit power table.
-static const TxPowerTable sTxPowerTable[] = {
-#if OPENTHREAD_CONFIG_CC2538_WITH_CC2592
-    // CC2538 using CC2592 PA
-    // Values are from AN130 table 6 (page 4)
-    {22, 0xFF}, // 22.0dBm =~ 158.5mW
-    {21, 0xD5}, // 20.9dBm =~ 123.0mW
-    {20, 0xC5}, // 20.1dBm =~ 102.3mW
-    {19, 0xB0}, // 19.0dBm =~  79.4mW
-    {18, 0xA1}, // 17.8dBm =~  60.3mW
-    {16, 0x91}, // 16.4dBm =~  43.7mW
-    {15, 0x88}, // 14.9dBm =~  30.9mW
-    {13, 0x72}, // 13.0dBm =~  20.0mW
-    {11, 0x62}, // 11.0dBm =~  12.6mW
-    {10, 0x58}, //  9.5dBm =~   8.9mW
-    {8, 0x42},  //  7.5dBm =~   5.6mW
-#else
-    // CC2538 operating "bare foot"
-    // Values are from SmartRF Studio 2.4.0
-    {7, 0xFF},   //
-    {5, 0xED},   //
-    {3, 0xD5},   //
-    {1, 0xC5},   //
-    {0, 0xB6},   //
-    {-1, 0xB0},  //
-    {-3, 0xA1},  //
-    {-5, 0x91},  //
-    {-7, 0x88},  //
-    {-9, 0x72},  //
-    {-11, 0x62}, //
-    {-13, 0x58}, //
-    {-15, 0x42}, //
-    {-24, 0x00}, //
-#endif
-};
-
-static otRadioFrame sTransmitFrame;
-static otRadioFrame sReceiveFrame;
-static otError      sTransmitError;
-static otError      sReceiveError;
-
-static uint8_t sTransmitPsdu[IEEE802154_MAX_LENGTH];
-static uint8_t sReceivePsdu[IEEE802154_MAX_LENGTH];
-static uint8_t sChannel = 0;
-static int8_t  sTxPower = 0;
-
-static otRadioState sState             = OT_RADIO_STATE_DISABLED;
-static bool         sIsReceiverEnabled = false;
-
-#if OPENTHREAD_CONFIG_LOG_PLATFORM && OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-// Debugging _and_ logging are enabled, so if there's a dropped frame
-// we'll need to store the length here as using snprintf from an interrupt
-// handler is not a good idea.
-static uint8_t sDroppedFrameLength = 0;
-#endif
-
-static int8_t cc2538RadioGetRssiOffset(void);
-
-void enableReceiver(void)
-{
-    if (!sIsReceiverEnabled)
-    {
-        otLogInfoPlat("Enabling receiver", NULL);
-
-        // flush rxfifo
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-
-        // enable receiver
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_RXON;
-        sIsReceiverEnabled     = true;
-    }
-}
-
-void disableReceiver(void)
-{
-    if (sIsReceiverEnabled)
-    {
-        otLogInfoPlat("Disabling receiver", NULL);
-
-        while (HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_TX_ACTIVE)
-            ;
-
-        // flush rxfifo
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-
-        if (HWREG(RFCORE_XREG_RXENABLE) != 0)
-        {
-            // disable receiver
-            HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_RFOFF;
-        }
-
-        sIsReceiverEnabled = false;
-    }
-}
-
-void setChannel(uint8_t aChannel)
-{
-    if (sChannel != aChannel)
-    {
-        bool enabled = false;
-
-        if (sIsReceiverEnabled)
-        {
-            disableReceiver();
-            enabled = true;
-        }
-
-        otLogInfoPlat("Channel=%d", aChannel);
-
-        HWREG(RFCORE_XREG_FREQCTRL) = 11 + (aChannel - 11) * 5;
-        sChannel                    = aChannel;
-
-        if (enabled)
-        {
-            enableReceiver();
-        }
-    }
-}
-
-void setTxPower(int8_t aTxPower)
-{
-    uint8_t i = 0;
-
-    if (sTxPower != aTxPower)
-    {
-        otLogInfoPlat("TxPower=%d", aTxPower);
-
-        for (i = sizeof(sTxPowerTable) / sizeof(TxPowerTable) - 1; i > 0; i--)
-        {
-            if (aTxPower < sTxPowerTable[i].mTxPowerVal)
-            {
-                break;
-            }
-        }
-
-        HWREG(RFCORE_XREG_TXPOWER) = sTxPowerTable[i].mTxPowerReg;
-        sTxPower                   = aTxPower;
-    }
-}
-
-static bool cc2538SrcMatchEnabled(void)
-{
-    return (HWREG(RFCORE_XREG_FRMCTRL1) & RFCORE_XREG_FRMCTRL1_PENDING_OR) == 0;
-}
-
-static bool cc2538GetSrcMatchFoundIntFlag(void)
-{
-    bool flag = (HWREG(RFCORE_SFR_RFIRQF0) & RFCORE_SFR_RFIRQF0_SRC_MATCH_FOUND) != 0;
-    if (flag)
-    {
-        HWREG(RFCORE_SFR_RFIRQF0) &= ~RFCORE_SFR_RFIRQF0_SRC_MATCH_FOUND;
-    }
-    return flag;
-}
-
-void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    // EUI64 is in a mixed-endian format.  Split in two halves, each 32-bit
-    // half is in little-endian format (machine endian).  However, the
-    // most significant part of the EUI64 comes first, so we can't cheat
-    // with a uint64_t!
-    //
-    // See https://e2e.ti.com/support/wireless_connectivity/low_power_rf_tools/f/155/p/307344/1072252
-
-    volatile uint32_t *eui64 = &HWREG(IEEE_EUI64);
-
-    // Read first 32-bits
-    uint32_t part = eui64[0];
-    for (uint8_t i = 0; i < (OT_EXT_ADDRESS_SIZE / 2); i++)
-    {
-        aIeeeEui64[3 - i] = part;
-        part >>= 8;
-    }
-
-    // Read the last 32-bits
-    part = eui64[1];
-    for (uint8_t i = 0; i < (OT_EXT_ADDRESS_SIZE / 2); i++)
-    {
-        aIeeeEui64[7 - i] = part;
-        part >>= 8;
-    }
-}
-
-void otPlatRadioSetPanId(otInstance *aInstance, uint16_t aPanid)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogInfoPlat("PANID=%X", aPanid);
-
-    HWREG(RFCORE_FFSM_PAN_ID0) = aPanid & 0xFF;
-    HWREG(RFCORE_FFSM_PAN_ID1) = aPanid >> 8;
-}
-
-void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogInfoPlat("ExtAddr=%X%X%X%X%X%X%X%X", aAddress->m8[7], aAddress->m8[6], aAddress->m8[5], aAddress->m8[4],
-                  aAddress->m8[3], aAddress->m8[2], aAddress->m8[1], aAddress->m8[0]);
-
-    for (int i = 0; i < 8; i++)
-    {
-        ((volatile uint32_t *)RFCORE_FFSM_EXT_ADDR0)[i] = aAddress->m8[i];
-    }
-}
-
-void otPlatRadioSetShortAddress(otInstance *aInstance, uint16_t aAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogInfoPlat("ShortAddr=%X", aAddress);
-
-    HWREG(RFCORE_FFSM_SHORT_ADDR0) = aAddress & 0xFF;
-    HWREG(RFCORE_FFSM_SHORT_ADDR1) = aAddress >> 8;
-}
-
-void cc2538RadioInit(void)
-{
-    sTransmitFrame.mLength = 0;
-    sTransmitFrame.mPsdu   = sTransmitPsdu;
-    sReceiveFrame.mLength  = 0;
-    sReceiveFrame.mPsdu    = sReceivePsdu;
-
-#if OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-    // Enable interrupts for RX/TX, interrupt 26.
-    // That's NVIC index 0 (26 >> 5) bit 26 (26 & 0x1f).
-    HWREG(NVIC_EN0 + (0 * 4)) = (1 << 26);
-    HWREG(RFCORE_XREG_RFIRQM0) |= RFCORE_XREG_RFIRQM0_RXPKTDONE;
-#endif
-
-    // enable clock
-    HWREG(SYS_CTRL_RCGCRFC) = SYS_CTRL_RCGCRFC_RFC0;
-    HWREG(SYS_CTRL_SCGCRFC) = SYS_CTRL_SCGCRFC_RFC0;
-    HWREG(SYS_CTRL_DCGCRFC) = SYS_CTRL_DCGCRFC_RFC0;
-
-    // Table 23-7.
-    HWREG(RFCORE_XREG_AGCCTRL1)              = 0x15;
-    HWREG(RFCORE_XREG_TXFILTCFG)             = 0x09;
-    HWREG(ANA_REGS_BASE + ANA_REGS_O_IVCTRL) = 0x0b;
-
-    HWREG(RFCORE_XREG_CCACTRL0)  = 0xf8;
-    HWREG(RFCORE_XREG_FIFOPCTRL) = IEEE802154_MAX_LENGTH;
-
-    HWREG(RFCORE_XREG_FRMCTRL0) = RFCORE_XREG_FRMCTRL0_AUTOCRC | RFCORE_XREG_FRMCTRL0_AUTOACK;
-
-    // default: SRCMATCH.SRC_MATCH_EN(1), SRCMATCH.AUTOPEND(1),
-    // SRCMATCH.PEND_DATAREQ_ONLY(1), RFCORE_XREG_FRMCTRL1_PENDING_OR(0)
-
-    HWREG(RFCORE_XREG_TXPOWER) = sTxPowerTable[0].mTxPowerReg;
-    sTxPower                   = sTxPowerTable[0].mTxPowerVal;
-
-#if OPENTHREAD_CONFIG_CC2538_WITH_CC2592
-    // PA_EN pin configuration.
-    // Step 1. make it an output
-    HWREG(GPIO_C_BASE | GPIO_O_DIR) |= GPIO_PIN(OPENTHREAD_CONFIG_CC2592_PA_EN_PIN);
-    // Step 2. Route PA_PD to OBS0 and invert it to produce PA_EN
-    HWREG_ARR(RFCORE_XREG_RFC_OBS_CTRL, 0) = RFCORE_XREG_RFC_OBS_POL_INV      // Invert the output
-                                             | RFCORE_XREG_RFC_OBS_MUX_PA_PD; // PA "power down" signal
-    // Step 3. Connect the selected pin to OBS0 and enable OBS0.
-    HWREG_ARR(CCTEST_OBSSEL, OPENTHREAD_CONFIG_CC2592_PA_EN_PIN) = CCTEST_OBSSEL_EN          // Enable the output
-                                                                   | CCTEST_OBSSEL_SEL_OBS0; // Select OBS0
-
-    // LNA_EN pin configuration.
-    HWREG(GPIO_C_BASE | GPIO_O_DIR) |= GPIO_PIN(OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN);
-    HWREG_ARR(RFCORE_XREG_RFC_OBS_CTRL, 1) = RFCORE_XREG_RFC_OBS_POL_INV | RFCORE_XREG_RFC_OBS_MUX_LNA_PD;
-    HWREG_ARR(CCTEST_OBSSEL, OPENTHREAD_CONFIG_CC2592_LNA_EN_PIN) = CCTEST_OBSSEL_EN | CCTEST_OBSSEL_SEL_OBS1;
-
-#if OPENTHREAD_CONFIG_CC2592_USE_HGM
-    // HGM pin configuration.  Set the pin state first so we don't glitch.
-    cc2538RadioSetHgm(OPENTHREAD_CONFIG_CC2592_HGM_DEFAULT_STATE);
-    HWREG(OPENTHREAD_CONFIG_CC2592_HGM_PORT | GPIO_O_DIR) |= GPIO_PIN(OPENTHREAD_CONFIG_CC2592_HGM_PIN);
-#endif // OPENTHREAD_CONFIG_CC2592_USE_HGM
-#endif // OPENTHREAD_CONFIG_CC2538_WITH_CC2592
-
-    otLogInfoPlat("Initialized", NULL);
-}
-
-#if OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-void cc2538RadioSetHgm(bool aState)
-{
-    if (aState)
-    {
-        HWREG_ARR(OPENTHREAD_CONFIG_CC2592_HGM_PORT, GPIO_PIN(OPENTHREAD_CONFIG_CC2592_HGM_PIN)) =
-            GPIO_PIN(OPENTHREAD_CONFIG_CC2592_HGM_PIN);
-    }
-    else
-    {
-        HWREG_ARR(OPENTHREAD_CONFIG_CC2592_HGM_PORT, GPIO_PIN(OPENTHREAD_CONFIG_CC2592_HGM_PIN)) = 0;
-    }
-}
-
-bool cc2538RadioGetHgm(void)
-{
-    if (HWREG_ARR(OPENTHREAD_CONFIG_CC2592_HGM_PORT, GPIO_PIN(OPENTHREAD_CONFIG_CC2592_HGM_PIN)) &
-        GPIO_PIN(OPENTHREAD_CONFIG_CC2592_HGM_PIN))
-    {
-        return true;
-    }
-    else
-    {
-        return false;
-    }
-}
-#endif // OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-
-bool otPlatRadioIsEnabled(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return (sState != OT_RADIO_STATE_DISABLED) ? true : false;
-}
-
-otError otPlatRadioEnable(otInstance *aInstance)
-{
-    if (!otPlatRadioIsEnabled(aInstance))
-    {
-        otLogDebgPlat("State=OT_RADIO_STATE_SLEEP", NULL);
-        sState = OT_RADIO_STATE_SLEEP;
-    }
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioDisable(otInstance *aInstance)
-{
-    if (otPlatRadioIsEnabled(aInstance))
-    {
-        otLogDebgPlat("State=OT_RADIO_STATE_DISABLED", NULL);
-        sState = OT_RADIO_STATE_DISABLED;
-    }
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioSleep(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_INVALID_STATE;
-
-    if (sState == OT_RADIO_STATE_SLEEP || sState == OT_RADIO_STATE_RECEIVE)
-    {
-        otLogDebgPlat("State=OT_RADIO_STATE_SLEEP", NULL);
-        error  = OT_ERROR_NONE;
-        sState = OT_RADIO_STATE_SLEEP;
-        disableReceiver();
-    }
-
-    return error;
-}
-
-otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_INVALID_STATE;
-
-    if (sState != OT_RADIO_STATE_DISABLED)
-    {
-        otLogDebgPlat("State=OT_RADIO_STATE_RECEIVE", NULL);
-
-        error  = OT_ERROR_NONE;
-        sState = OT_RADIO_STATE_RECEIVE;
-        setChannel(aChannel);
-        sReceiveFrame.mChannel = aChannel;
-        enableReceiver();
-    }
-
-    return error;
-}
-
-static void setupTransmit(otRadioFrame *aFrame)
-{
-    int i;
-
-    // wait for current TX operation to complete, if any.
-    while (HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_TX_ACTIVE)
-        ;
-
-    // flush txfifo
-    HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHTX;
-    HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHTX;
-
-    // frame length
-    HWREG(RFCORE_SFR_RFDATA) = aFrame->mLength;
-
-    // frame data
-    for (i = 0; i < aFrame->mLength; i++)
-    {
-        HWREG(RFCORE_SFR_RFDATA) = aFrame->mPsdu[i];
-    }
-
-    setChannel(aFrame->mChannel);
-}
-
-otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_INVALID_STATE;
-
-    if (sState == OT_RADIO_STATE_RECEIVE)
-    {
-        int i;
-
-        error          = OT_ERROR_NONE;
-        sState         = OT_RADIO_STATE_TRANSMIT;
-        sTransmitError = OT_ERROR_NONE;
-
-        setupTransmit(aFrame);
-
-        // Set up a counter to inform us if we get stuck.
-        i = 1000000;
-
-        // Wait for radio to enter receive state.
-        while ((HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_RX_ACTIVE) == 0)
-        {
-            // Count down the cycles, and emit a message if we get to zero.
-            // Ideally, we should never get there!
-            if (i)
-            {
-                i--;
-            }
-            else
-            {
-                otLogCritPlat("Radio is stuck!!! FSMSTAT0=0x%08x FSMSTAT1=0x%08x RFERRF=0x%08x",
-                              HWREG(RFCORE_XREG_FSMSTAT0), HWREG(RFCORE_XREG_FSMSTAT1), HWREG(RFCORE_SFR_RFERRF));
-                i = 1000000;
-            }
-
-            // Ensure we haven't overflowed the RX buffer in the mean time, as this
-            // will cause a deadlock here otherwise.  Similarly, if we see an aborted
-            // RX, handle that here too to prevent deadlock.
-            if (HWREG(RFCORE_SFR_RFERRF) & (RFCORE_SFR_RFERRF_RXOVERF | RFCORE_SFR_RFERRF_RXABO))
-            {
-                if (HWREG(RFCORE_SFR_RFERRF) & RFCORE_SFR_RFERRF_RXOVERF)
-                {
-                    otLogCritPlat("RX Buffer Overflow detected", NULL);
-                }
-
-                if (HWREG(RFCORE_SFR_RFERRF) & RFCORE_SFR_RFERRF_RXABO)
-                {
-                    otLogCritPlat("Aborted RX detected", NULL);
-                }
-
-                // Flush the RX buffer
-                HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-                HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-            }
-
-            // Check for idle state.  After flushing the RX buffer, we may wind up here.
-            if (!(HWREG(RFCORE_XREG_FSMSTAT1) & (RFCORE_XREG_FSMSTAT1_TX_ACTIVE | RFCORE_XREG_FSMSTAT1_RX_ACTIVE)))
-            {
-                otLogCritPlat("Idle state detected", NULL);
-
-                // In this case, the state of our driver mis-matches our state.  So force
-                // matters by clearing our channel variable and calling setChannel.  This
-                // should bring our radio into the RX state, which should allow us to go
-                // into TX.
-                sChannel = 0;
-                setupTransmit(aFrame);
-            }
-        }
-
-        // wait for valid rssi
-        while ((HWREG(RFCORE_XREG_RSSISTAT) & RFCORE_XREG_RSSISTAT_RSSI_VALID) == 0)
-            ;
-
-        otEXPECT_ACTION(((HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_CCA) &&
-                         !((HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_SFD))),
-                        sTransmitError = OT_ERROR_CHANNEL_ACCESS_FAILURE);
-
-        // begin transmit
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_TXON;
-
-        otPlatRadioTxStarted(aInstance, aFrame);
-
-        while (HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_TX_ACTIVE)
-            ;
-
-        otLogDebgPlat("Transmitted %d bytes", aFrame->mLength);
-    }
-
-exit:
-    return error;
-}
-
-otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return &sTransmitFrame;
-}
-
-int8_t otPlatRadioGetRssi(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    int8_t rssi = OT_RADIO_RSSI_INVALID;
-
-    if ((HWREG(RFCORE_XREG_RSSISTAT) & RFCORE_XREG_RSSISTAT_RSSI_VALID) != 0)
-    {
-        rssi = HWREG(RFCORE_XREG_RSSI) & 0xff;
-
-        if (rssi > cc2538RadioGetRssiOffset() - 128)
-        {
-            rssi -= cc2538RadioGetRssiOffset();
-        }
-        else
-        {
-            rssi = -128;
-        }
-    }
-
-    return rssi;
-}
-
-otRadioCaps otPlatRadioGetCaps(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return OT_RADIO_CAPS_ENERGY_SCAN;
-}
-
-static bool cc2538RadioGetPromiscuous(void)
-{
-    return (HWREG(RFCORE_XREG_FRMFILT0) & RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN) == 0;
-}
-
-bool otPlatRadioGetPromiscuous(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return cc2538RadioGetPromiscuous();
-}
-
-static int8_t cc2538RadioGetRssiOffset(void)
-{
-#if OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-    if (cc2538RadioGetHgm())
-    {
-        return CC2592_RSSI_OFFSET_HGM;
-    }
-    else
-    {
-        return CC2592_RSSI_OFFSET_LGM;
-    }
-#else  // OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-    return CC2538_RSSI_OFFSET;
-#endif // OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-}
-
-void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogInfoPlat("PromiscuousMode=%d", aEnable ? 1 : 0);
-
-    if (aEnable)
-    {
-        HWREG(RFCORE_XREG_FRMFILT0) &= ~RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN;
-    }
-    else
-    {
-        HWREG(RFCORE_XREG_FRMFILT0) |= RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN;
-    }
-}
-
-static void readFrame(void)
-{
-    uint8_t length;
-    uint8_t crcCorr;
-    int     i;
-
-    /*
-     * There is already a frame present in the buffer, return early so
-     * we do not overwrite it (hopefully we'll catch it on the next run).
-     */
-    otEXPECT(sReceiveFrame.mLength == 0);
-
-    otEXPECT(sState == OT_RADIO_STATE_RECEIVE || sState == OT_RADIO_STATE_TRANSMIT);
-    otEXPECT((HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_FIFOP) != 0);
-
-    // read length
-    length = HWREG(RFCORE_SFR_RFDATA);
-    otEXPECT(IEEE802154_MIN_LENGTH <= length && length <= IEEE802154_MAX_LENGTH);
-
-#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
-#error Time sync requires the timestamp of SFD rather than that of rx done!
-#else
-    // Timestamp
-    if (cc2538RadioGetPromiscuous())
-#endif
-    {
-        // The current driver only supports milliseconds resolution.
-        sReceiveFrame.mInfo.mRxInfo.mTimestamp = otPlatAlarmMilliGetNow() * 1000;
-    }
-
-    // read psdu
-    for (i = 0; i < length - 2; i++)
-    {
-        sReceiveFrame.mPsdu[i] = HWREG(RFCORE_SFR_RFDATA);
-    }
-
-    sReceiveFrame.mInfo.mRxInfo.mRssi = (int8_t)HWREG(RFCORE_SFR_RFDATA) - cc2538RadioGetRssiOffset();
-    crcCorr                           = HWREG(RFCORE_SFR_RFDATA);
-
-    if (crcCorr & CC2538_CRC_BIT_MASK)
-    {
-        sReceiveFrame.mLength            = length;
-        sReceiveFrame.mInfo.mRxInfo.mLqi = crcCorr & CC2538_LQI_BIT_MASK;
-
-        if (length > IEEE802154_ACK_LENGTH)
-        {
-            // Set ACK FP flag for the received frame according to whether SRC_MATCH_FOUND was triggered just before
-            // if SRC MATCH is not enabled, SRC_MATCH_FOUND is not triggered and all ACK FP is always set
-            sReceiveFrame.mInfo.mRxInfo.mAckedWithFramePending =
-                cc2538SrcMatchEnabled() ? cc2538GetSrcMatchFoundIntFlag() : true;
-        }
-    }
-    else
-    {
-        // resets rxfifo
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-#if OPENTHREAD_CONFIG_LOG_PLATFORM && OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-        // Debugging _and_ logging are enabled, it may not be safe to do
-        // logging if we're in the interrupt context, so just stash the
-        // length and do the logging later.
-        sDroppedFrameLength = length;
-#else
-        otLogDebgPlat("Dropping %d received bytes (Invalid CRC)", length);
-#endif
-    }
-
-    // check for rxfifo overflow
-    if ((HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_FIFOP) != 0 &&
-        (HWREG(RFCORE_XREG_FSMSTAT1) & RFCORE_XREG_FSMSTAT1_FIFO) == 0)
-    {
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-        HWREG(RFCORE_SFR_RFST) = RFCORE_SFR_RFST_INSTR_FLUSHRX;
-    }
-
-exit:
-    return;
-}
-
-void cc2538RadioProcess(otInstance *aInstance)
-{
-#if OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-    // Disable the receive interrupt so that sReceiveFrame doesn't get
-    // blatted by the interrupt handler while we're polling.
-    HWREG(RFCORE_XREG_RFIRQM0) &= ~RFCORE_XREG_RFIRQM0_RXPKTDONE;
-#endif
-
-    readFrame();
-
-#if OPENTHREAD_CONFIG_LOG_PLATFORM && OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-    if (sDroppedFrameLength != 0)
-    {
-        otLogDebgPlat("Dropping %d received bytes (Invalid CRC)", sDroppedFrameLength);
-        sDroppedFrameLength = 0;
-    }
-#endif
-
-    if ((sState == OT_RADIO_STATE_RECEIVE && sReceiveFrame.mLength > 0) ||
-        (sState == OT_RADIO_STATE_TRANSMIT && sReceiveFrame.mLength > IEEE802154_ACK_LENGTH))
-    {
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-        if (otPlatDiagModeGet())
-        {
-            otPlatDiagRadioReceiveDone(aInstance, &sReceiveFrame, sReceiveError);
-        }
-        else
-#endif
-        {
-            // signal MAC layer for each received frame if promiscuous is enabled
-            // otherwise only signal MAC layer for non-ACK frame
-            if (((HWREG(RFCORE_XREG_FRMFILT0) & RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN) == 0) ||
-                (sReceiveFrame.mLength > IEEE802154_ACK_LENGTH))
-            {
-                otLogDebgPlat("Received %d bytes", sReceiveFrame.mLength);
-                otPlatRadioReceiveDone(aInstance, &sReceiveFrame, sReceiveError);
-            }
-        }
-    }
-
-    if (sState == OT_RADIO_STATE_TRANSMIT)
-    {
-        if (sTransmitError != OT_ERROR_NONE || (sTransmitFrame.mPsdu[0] & IEEE802154_ACK_REQUEST) == 0)
-        {
-            if (sTransmitError != OT_ERROR_NONE)
-            {
-                otLogDebgPlat("Transmit failed ErrorCode=%d", sTransmitError);
-            }
-
-            sState = OT_RADIO_STATE_RECEIVE;
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-            if (otPlatDiagModeGet())
-            {
-                otPlatDiagRadioTransmitDone(aInstance, &sTransmitFrame, sTransmitError);
-            }
-            else
-#endif
-            {
-                otPlatRadioTxDone(aInstance, &sTransmitFrame, NULL, sTransmitError);
-            }
-        }
-        else if (sReceiveFrame.mLength == IEEE802154_ACK_LENGTH &&
-                 (sReceiveFrame.mPsdu[0] & IEEE802154_FRAME_TYPE_MASK) == IEEE802154_FRAME_TYPE_ACK &&
-                 (sReceiveFrame.mPsdu[IEEE802154_DSN_OFFSET] == sTransmitFrame.mPsdu[IEEE802154_DSN_OFFSET]))
-        {
-            sState = OT_RADIO_STATE_RECEIVE;
-
-            otPlatRadioTxDone(aInstance, &sTransmitFrame, &sReceiveFrame, sTransmitError);
-        }
-    }
-
-    sReceiveFrame.mLength = 0;
-
-#if OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-    // Turn the receive interrupt handler back on now the buffer is clear.
-    HWREG(RFCORE_XREG_RFIRQM0) |= RFCORE_XREG_RFIRQM0_RXPKTDONE;
-#endif
-}
-
-void RFCoreRxTxIntHandler(void)
-{
-#if OPENTHREAD_CONFIG_CC2538_USE_RADIO_RX_INTERRUPT
-    if (HWREG(RFCORE_SFR_RFIRQF0) & RFCORE_SFR_RFIRQF0_RXPKTDONE)
-    {
-        readFrame();
-
-        if (sReceiveFrame.mLength > 0)
-        {
-            // A frame has been received, disable the interrupt handler
-            // until the main loop has dealt with this previous frame,
-            // otherwise we might overwrite it whilst it is being read.
-            HWREG(RFCORE_XREG_RFIRQM0) &= ~RFCORE_XREG_RFIRQM0_RXPKTDONE;
-        }
-    }
-#endif
-
-    HWREG(RFCORE_SFR_RFIRQF0) = 0;
-}
-
-void RFCoreErrIntHandler(void)
-{
-    HWREG(RFCORE_SFR_RFERRF) = 0;
-}
-
-uint32_t getSrcMatchEntriesEnableStatus(bool aShort)
-{
-    uint32_t  status = 0;
-    uint32_t *addr   = aShort ? (uint32_t *)RFCORE_XREG_SRCSHORTEN0 : (uint32_t *)RFCORE_XREG_SRCEXTEN0;
-
-    for (uint8_t i = 0; i < RFCORE_XREG_SRCMATCH_ENABLE_STATUS_SIZE; i++)
-    {
-        status |= HWREG(addr++) << (i * 8);
-    }
-
-    return status;
-}
-
-int8_t findSrcMatchShortEntry(uint16_t aShortAddress)
-{
-    int8_t    entry = -1;
-    uint16_t  shortAddr;
-    uint32_t  bitMask;
-    uint32_t *addr   = NULL;
-    uint32_t  status = getSrcMatchEntriesEnableStatus(true);
-
-    for (uint8_t i = 0; i < RFCORE_XREG_SRCMATCH_SHORT_ENTRIES; i++)
-    {
-        bitMask = 0x00000001 << i;
-
-        if ((status & bitMask) == 0)
-        {
-            continue;
-        }
-
-        addr = (uint32_t *)RFCORE_FFSM_SRCADDRESS_TABLE + (i * RFCORE_XREG_SRCMATCH_SHORT_ENTRY_OFFSET);
-
-        shortAddr = HWREG(addr + 2);
-        shortAddr |= HWREG(addr + 3) << 8;
-
-        if ((shortAddr == aShortAddress))
-        {
-            entry = i;
-            break;
-        }
-    }
-
-    return entry;
-}
-
-int8_t findSrcMatchExtEntry(const otExtAddress *aExtAddress)
-{
-    int8_t    entry = -1;
-    uint32_t  bitMask;
-    uint32_t *addr   = NULL;
-    uint32_t  status = getSrcMatchEntriesEnableStatus(false);
-
-    for (uint8_t i = 0; i < RFCORE_XREG_SRCMATCH_EXT_ENTRIES; i++)
-    {
-        uint8_t j = 0;
-        bitMask   = 0x00000001 << 2 * i;
-
-        if ((status & bitMask) == 0)
-        {
-            continue;
-        }
-
-        addr = (uint32_t *)RFCORE_FFSM_SRCADDRESS_TABLE + (i * RFCORE_XREG_SRCMATCH_EXT_ENTRY_OFFSET);
-
-        for (j = 0; j < sizeof(otExtAddress); j++)
-        {
-            if (HWREG(addr + j) != aExtAddress->m8[j])
-            {
-                break;
-            }
-        }
-
-        if (j == sizeof(otExtAddress))
-        {
-            entry = i;
-            break;
-        }
-    }
-
-    return entry;
-}
-
-void setSrcMatchEntryEnableStatus(bool aShort, uint8_t aEntry, bool aEnable)
-{
-    uint8_t   entry          = aShort ? aEntry : (2 * aEntry);
-    uint8_t   index          = entry / 8;
-    uint32_t *addrEn         = aShort ? (uint32_t *)RFCORE_XREG_SRCSHORTEN0 : (uint32_t *)RFCORE_XREG_SRCEXTEN0;
-    uint32_t *addrAutoPendEn = aShort ? (uint32_t *)RFCORE_FFSM_SRCSHORTPENDEN0 : (uint32_t *)RFCORE_FFSM_SRCEXTPENDEN0;
-    uint32_t  bitMask        = 0x00000001;
-
-    if (aEnable)
-    {
-        HWREG(addrEn + index) |= (bitMask) << (entry % 8);
-        HWREG(addrAutoPendEn + index) |= (bitMask) << (entry % 8);
-    }
-    else
-    {
-        HWREG(addrEn + index) &= ~((bitMask) << (entry % 8));
-        HWREG(addrAutoPendEn + index) &= ~((bitMask) << (entry % 8));
-    }
-}
-
-int8_t findSrcMatchAvailEntry(bool aShort)
-{
-    int8_t   entry = -1;
-    uint32_t bitMask;
-    uint32_t shortEnableStatus = getSrcMatchEntriesEnableStatus(true);
-    uint32_t extEnableStatus   = getSrcMatchEntriesEnableStatus(false);
-
-    otLogDebgPlat("Short enable status: 0x%x", shortEnableStatus);
-    otLogDebgPlat("Ext enable status: 0x%x", extEnableStatus);
-
-    if (aShort)
-    {
-        bitMask = 0x00000001;
-
-        for (uint8_t i = 0; i < RFCORE_XREG_SRCMATCH_SHORT_ENTRIES; i++)
-        {
-            if ((extEnableStatus & bitMask) == 0)
-            {
-                if ((shortEnableStatus & bitMask) == 0)
-                {
-                    entry = i;
-                    break;
-                }
-            }
-
-            if (i % 2 == 1)
-            {
-                extEnableStatus = extEnableStatus >> 2;
-            }
-
-            shortEnableStatus = shortEnableStatus >> 1;
-        }
-    }
-    else
-    {
-        bitMask = 0x00000003;
-
-        for (uint8_t i = 0; i < RFCORE_XREG_SRCMATCH_EXT_ENTRIES; i++)
-        {
-            if (((extEnableStatus | shortEnableStatus) & bitMask) == 0)
-            {
-                entry = i;
-                break;
-            }
-
-            extEnableStatus   = extEnableStatus >> 2;
-            shortEnableStatus = shortEnableStatus >> 2;
-        }
-    }
-
-    return entry;
-}
-
-void cc2538EnergyScanTimerHandler(void)
-{
-    int8_t rssi = otPlatRadioGetRssi(sInstance);
-
-    disableReceiver();
-
-    HWREG(RFCORE_XREG_FRMCTRL0) &= ~RFCORE_XREG_FRMCTRL0_ENERGY_SCAN;
-    HWREG(RFCORE_XREG_FREQCTRL) = 11 + (sChannel - 11) * 5;
-
-    if (sIsReceiverEnabled)
-    {
-        enableReceiver();
-    }
-
-    otPlatRadioEnergyScanDone(sInstance, rssi);
-}
-
-void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogInfoPlat("EnableSrcMatch=%d", aEnable ? 1 : 0);
-
-    if (aEnable)
-    {
-        // only set FramePending when ack for data poll if there are queued messages
-        // for entries in the source match table.
-        HWREG(RFCORE_XREG_FRMCTRL1) &= ~RFCORE_XREG_FRMCTRL1_PENDING_OR;
-    }
-    else
-    {
-        // set FramePending for all ack.
-        HWREG(RFCORE_XREG_FRMCTRL1) |= RFCORE_XREG_FRMCTRL1_PENDING_OR;
-    }
-}
-
-otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError   error = OT_ERROR_NONE;
-    int8_t    entry = findSrcMatchAvailEntry(true);
-    uint32_t *addr  = (uint32_t *)RFCORE_FFSM_SRCADDRESS_TABLE;
-
-    otLogDebgPlat("Add ShortAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0, error = OT_ERROR_NO_BUFS);
-
-    addr += (entry * RFCORE_XREG_SRCMATCH_SHORT_ENTRY_OFFSET);
-
-    HWREG(addr++) = HWREG(RFCORE_FFSM_PAN_ID0);
-    HWREG(addr++) = HWREG(RFCORE_FFSM_PAN_ID1);
-    HWREG(addr++) = aShortAddress & 0xFF;
-    HWREG(addr++) = aShortAddress >> 8;
-
-    setSrcMatchEntryEnableStatus(true, (uint8_t)(entry), true);
-
-exit:
-    return error;
-}
-
-otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError   error = OT_ERROR_NONE;
-    int8_t    entry = findSrcMatchAvailEntry(false);
-    uint32_t *addr  = (uint32_t *)RFCORE_FFSM_SRCADDRESS_TABLE;
-
-    otLogDebgPlat("Add ExtAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0, error = OT_ERROR_NO_BUFS);
-
-    addr += (entry * RFCORE_XREG_SRCMATCH_EXT_ENTRY_OFFSET);
-
-    for (uint8_t i = 0; i < sizeof(otExtAddress); i++)
-    {
-        HWREG(addr++) = aExtAddress->m8[i];
-    }
-
-    setSrcMatchEntryEnableStatus(false, (uint8_t)(entry), true);
-
-exit:
-    return error;
-}
-
-otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-    int8_t  entry = findSrcMatchShortEntry(aShortAddress);
-
-    otLogDebgPlat("Clear ShortAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0, error = OT_ERROR_NO_ADDRESS);
-
-    setSrcMatchEntryEnableStatus(true, (uint8_t)(entry), false);
-
-exit:
-    return error;
-}
-
-otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-    int8_t  entry = findSrcMatchExtEntry(aExtAddress);
-
-    otLogDebgPlat("Clear ExtAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0, error = OT_ERROR_NO_ADDRESS);
-
-    setSrcMatchEntryEnableStatus(false, (uint8_t)(entry), false);
-
-exit:
-    return error;
-}
-
-void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint32_t *addrEn         = (uint32_t *)RFCORE_XREG_SRCSHORTEN0;
-    uint32_t *addrAutoPendEn = (uint32_t *)RFCORE_FFSM_SRCSHORTPENDEN0;
-
-    otLogDebgPlat("Clear ShortAddr entries", NULL);
-
-    for (uint8_t i = 0; i < RFCORE_XREG_SRCMATCH_ENABLE_STATUS_SIZE; i++)
-    {
-        HWREG(addrEn++)         = 0;
-        HWREG(addrAutoPendEn++) = 0;
-    }
-}
-
-void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint32_t *addrEn         = (uint32_t *)RFCORE_XREG_SRCEXTEN0;
-    uint32_t *addrAutoPendEn = (uint32_t *)RFCORE_FFSM_SRCEXTPENDEN0;
-
-    otLogDebgPlat("Clear ExtAddr entries", NULL);
-
-    for (uint8_t i = 0; i < RFCORE_XREG_SRCMATCH_ENABLE_STATUS_SIZE; i++)
-    {
-        HWREG(addrEn++)         = 0;
-        HWREG(addrAutoPendEn++) = 0;
-    }
-}
-
-otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogInfoPlat("ScanChannel=%d", aScanChannel);
-
-    if (aScanChannel != sChannel)
-    {
-        if (sIsReceiverEnabled)
-        {
-            disableReceiver();
-        }
-
-        HWREG(RFCORE_XREG_FREQCTRL) = 11 + (aScanChannel - 11) * 5;
-
-        enableReceiver();
-    }
-    else if (!sIsReceiverEnabled)
-    {
-        enableReceiver();
-    }
-
-    // Collect peak signal strength
-    HWREG(RFCORE_XREG_FRMCTRL0) |= RFCORE_XREG_FRMCTRL0_ENERGY_SCAN;
-
-    cc2538SetTimer(OT_CC2538_TIMER_ENERGY_SCAN, aScanDuration);
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-
-    otEXPECT_ACTION(aPower != NULL, error = OT_ERROR_INVALID_ARGS);
-    *aPower = sTxPower;
-
-exit:
-    return error;
-}
-
-otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    setTxPower(aPower);
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aThreshold)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aThreshold);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-otError otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aThreshold)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aThreshold);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-#if OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-    if (cc2538RadioGetHgm())
-    {
-        return CC2592_RECEIVE_SENSITIVITY_HGM;
-    }
-    else
-    {
-        return CC2592_RECEIVE_SENSITIVITY_LGM;
-    }
-#else  // OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-    return CC2538_RECEIVE_SENSITIVITY;
-#endif // OPENTHREAD_CONFIG_CC2538_WITH_CC2592 && OPENTHREAD_CONFIG_CC2592_USE_HGM
-}
diff --git a/examples/platforms/cc2538/rom-utility.h b/examples/platforms/cc2538/rom-utility.h
deleted file mode 100644
index d0686ef..0000000
--- a/examples/platforms/cc2538/rom-utility.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ROM_UTILITY_H_
-#define ROM_UTILITY_H_
-
-#define ROM_API_TABLE_ADDR 0x00000048
-
-typedef uint32_t (*volatile FPTR_CRC32_T)(uint8_t * /*pData*/, uint32_t /*byteCount*/);
-typedef uint32_t (*volatile FPTR_GETFLSIZE_T)(void);
-typedef uint32_t (*volatile FPTR_GETCHIPID_T)(void);
-typedef int32_t (*volatile FPTR_PAGEERASE_T)(uint32_t /*FlashAddr*/, uint32_t /*Size*/);
-typedef int32_t (*volatile FPTR_PROGFLASH_T)(uint32_t * /*pRamData*/, uint32_t /*FlashAdr*/, uint32_t /*ByteCount*/);
-typedef void (*volatile FPTR_RESETDEV_T)(void);
-typedef void *(*volatile FPTR_MEMSET_T)(void * /*s*/, int32_t /*c*/, uint32_t /*n*/);
-typedef void *(*volatile FPTR_MEMCPY_T)(void * /*s1*/, const void * /*s2*/, uint32_t /*n*/);
-typedef int32_t (*volatile FPTR_MEMCMP_T)(const void * /*s1*/, const void * /*s2*/, uint32_t /*n*/);
-typedef void *(*volatile FPTR_MEMMOVE_T)(void * /*s1*/, const void * /*s2*/, uint32_t /*n*/);
-
-typedef struct
-{
-    FPTR_CRC32_T     Crc32;
-    FPTR_GETFLSIZE_T GetFlashSize;
-    FPTR_GETCHIPID_T GetChipId;
-    FPTR_PAGEERASE_T PageErase;
-    FPTR_PROGFLASH_T ProgramFlash;
-    FPTR_RESETDEV_T  ResetDevice;
-    FPTR_MEMSET_T    memset;
-    FPTR_MEMCPY_T    memcpy;
-    FPTR_MEMCMP_T    memcmp;
-    FPTR_MEMMOVE_T   memmove;
-} ROM_API_T;
-
-// clang-format off
-
-#define P_ROM_API               ((ROM_API_T*)ROM_API_TABLE_ADDR)
-
-#define ROM_Crc32(a,b)          P_ROM_API->Crc32(a,b)
-#define ROM_GetFlashSize()      P_ROM_API->GetFlashSize()
-#define ROM_GetChipId()         P_ROM_API->GetChipId()
-#define ROM_PageErase(a,b)      P_ROM_API->PageErase(a,b)
-#define ROM_ProgramFlash(a,b,c) P_ROM_API->ProgramFlash(a,b,c)
-#define ROM_ResetDevice()       P_ROM_API->ResetDevice()
-#define ROM_Memset(a,b,c)       P_ROM_API->memset(a,b,c)
-#define ROM_Memcpy(a,b,c)       P_ROM_API->memcpy(a,b,c)
-#define ROM_Memcmp(a,b,c)       P_ROM_API->memcmp(a,b,c)
-#define ROM_Memmove(a,b,c)      P_ROM_API->memmove(a,b,c)
-
-// clang-format on
-
-#endif // ROM_UTILITY_H_
diff --git a/examples/platforms/cc2538/startup-gcc.c b/examples/platforms/cc2538/startup-gcc.c
deleted file mode 100644
index f174bfa..0000000
--- a/examples/platforms/cc2538/startup-gcc.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements gcc-specific startup code for the cc2538.
- */
-
-#include <stdint.h>
-#include <string.h>
-
-#include "cc2538-reg.h"
-
-extern uint8_t _ldata;
-extern uint8_t _data;
-extern uint8_t _edata;
-extern uint8_t _bss;
-extern uint8_t _ebss;
-extern uint8_t _init_array;
-extern uint8_t _einit_array;
-
-__extension__ typedef int __guard __attribute__((mode(__DI__)));
-
-int __cxa_guard_acquire(__guard *g)
-{
-    return !*(char *)(g);
-}
-
-void __cxa_guard_release(__guard *g)
-{
-    *(char *)g = 1;
-}
-
-void __cxa_guard_abort(__guard *g)
-{
-    (void)g;
-}
-
-void __cxa_pure_virtual(void)
-{
-    while (1)
-        ;
-}
-
-void IntDefaultHandler(void);
-void ResetHandler(void);
-
-extern void SysTick_Handler(void);
-extern void UART0IntHandler(void);
-extern void RFCoreRxTxIntHandler(void);
-extern void RFCoreErrIntHandler(void);
-extern void main(void);
-
-static uint64_t stack[640] __attribute__((section(".stack")));
-
-__attribute__((section(".vectors"), used)) void (*const vectors[])(void) = {
-    (void (*)(void))((unsigned long)stack + sizeof(stack)), // Initial Stack Pointer
-    ResetHandler,                                           // 1 The reset handler
-    ResetHandler,                                           // 2 The NMI handler
-    IntDefaultHandler,                                      // 3 The hard fault handler
-    IntDefaultHandler,                                      // 4 The MPU fault handler
-    IntDefaultHandler,                                      // 5 The bus fault handler
-    IntDefaultHandler,                                      // 6 The usage fault handler
-    0,                                                      // 7 Reserved
-    0,                                                      // 8 Reserved
-    0,                                                      // 9 Reserved
-    0,                                                      // 10 Reserved
-    IntDefaultHandler,                                      // 11 SVCall handler
-    IntDefaultHandler,                                      // 12 Debug monitor handler
-    0,                                                      // 13 Reserved
-    IntDefaultHandler,                                      // 14 The PendSV handler
-    SysTick_Handler,                                        // 15 The SysTick handler
-    IntDefaultHandler,                                      // 16 GPIO Port A
-    IntDefaultHandler,                                      // 17 GPIO Port B
-    IntDefaultHandler,                                      // 18 GPIO Port C
-    IntDefaultHandler,                                      // 19 GPIO Port D
-    0,                                                      // 20 none
-    UART0IntHandler,                                        // 21 UART0 Rx and Tx
-    IntDefaultHandler,                                      // 22 UART1 Rx and Tx
-    IntDefaultHandler,                                      // 23 SSI0 Rx and Tx
-    IntDefaultHandler,                                      // 24 I2C Master and Slave
-    0,                                                      // 25 Reserved
-    0,                                                      // 26 Reserved
-    0,                                                      // 27 Reserved
-    0,                                                      // 28 Reserved
-    0,                                                      // 29 Reserved
-    IntDefaultHandler,                                      // 30 ADC Sequence 0
-    0,                                                      // 31 Reserved
-    0,                                                      // 32 Reserved
-    0,                                                      // 33 Reserved
-    IntDefaultHandler,                                      // 34 Watchdog timer, timer 0
-    IntDefaultHandler,                                      // 35 Timer 0 subtimer A
-    IntDefaultHandler,                                      // 36 Timer 0 subtimer B
-    IntDefaultHandler,                                      // 37 Timer 1 subtimer A
-    IntDefaultHandler,                                      // 38 Timer 1 subtimer B
-    IntDefaultHandler,                                      // 39 Timer 2 subtimer A
-    IntDefaultHandler,                                      // 40 Timer 2 subtimer B
-    IntDefaultHandler,                                      // 41 Analog Comparator 0
-    RFCoreRxTxIntHandler,                                   // 42 RFCore Rx/Tx
-    RFCoreErrIntHandler,                                    // 43 RFCore Error
-    IntDefaultHandler,                                      // 44 IcePick
-    IntDefaultHandler,                                      // 45 FLASH Control
-    IntDefaultHandler,                                      // 46 AES
-    IntDefaultHandler,                                      // 47 PKA
-    IntDefaultHandler,                                      // 48 Sleep Timer
-    IntDefaultHandler,                                      // 49 MacTimer
-    IntDefaultHandler,                                      // 50 SSI1 Rx and Tx
-    IntDefaultHandler,                                      // 51 Timer 3 subtimer A
-    IntDefaultHandler,                                      // 52 Timer 3 subtimer B
-    0,                                                      // 53 Reserved
-    0,                                                      // 54 Reserved
-    0,                                                      // 55 Reserved
-    0,                                                      // 56 Reserved
-    0,                                                      // 57 Reserved
-    0,                                                      // 58 Reserved
-    0,                                                      // 59 Reserved
-    IntDefaultHandler,                                      // 60 USB 2538
-    0,                                                      // 61 Reserved
-    IntDefaultHandler,                                      // 62 uDMA
-    IntDefaultHandler,                                      // 63 uDMA Error
-};
-
-void IntDefaultHandler(void)
-{
-    while (1)
-        ;
-}
-
-// clang-format off
-
-#define FLASH_CCA_BOOTLDR_CFG_DISABLE               0xEFFFFFFF ///< Disable backdoor function
-#define FLASH_CCA_BOOTLDR_CFG_ENABLE                0xF0FFFFFF ///< Enable backdoor function
-#define FLASH_CCA_BOOTLDR_CFG_ACTIVE_HIGH           0x08000000 ///< Selected pin on pad A active high
-#define FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_M          0x07000000 ///< Selected pin on pad A mask
-#define FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_S          24         ///< Selected pin on pad A shift
-#define FLASH_CCA_IMAGE_VALID                       0x00000000 ///< Indicates valid image in flash
-
-#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN  3      ///< Select Button on SmartRF06 Eval Board
-
-// clang-format on
-
-typedef struct
-{
-    uint32_t ui32BootldrCfg;
-    uint32_t ui32ImageValid;
-    uint32_t ui32ImageVectorAddr;
-    uint8_t  ui8lock[32];
-} flash_cca_lock_page_t;
-
-__attribute__((__section__(".flashcca"), used)) const flash_cca_lock_page_t flash_cca_lock_page = {
-    FLASH_CCA_BOOTLDR_CFG_ENABLE | (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN << FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_S),
-    FLASH_CCA_IMAGE_VALID,
-    (uint32_t)&vectors,
-    {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-     0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}};
-
-typedef void (*init_fn_t)(void);
-
-void ResetHandler(void)
-{
-    HWREG(SYS_CTRL_EMUOVR) = 0xFF;
-
-    // configure clocks
-    HWREG(SYS_CTRL_CLOCK_CTRL) |= SYS_CTRL_CLOCK_CTRL_AMP_DET;
-    HWREG(SYS_CTRL_CLOCK_CTRL) = SYS_CTRL_SYSDIV_32MHZ;
-
-    // alternate map
-    HWREG(SYS_CTRL_I_MAP) |= SYS_CTRL_I_MAP_ALTMAP;
-
-    // copy the data segment initializers from flash to SRAM
-    memcpy(&_data, &_ldata, &_edata - &_data);
-
-    // zero-fill the bss segment
-    memset(&_bss, 0, &_ebss - &_bss);
-
-    // C++ runtime initialization (BSS, Data, relocation, etc.)
-    init_fn_t *fp;
-
-    for (fp = (init_fn_t *)&_init_array; fp < (init_fn_t *)&_einit_array; fp++)
-    {
-        (*fp)();
-    }
-
-    // call the application's entry point
-    main();
-
-    // end here if main() returns
-    while (1)
-        ;
-}
diff --git a/examples/platforms/cc2538/system.c b/examples/platforms/cc2538/system.c
deleted file mode 100644
index 0d1cd63..0000000
--- a/examples/platforms/cc2538/system.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file includes the platform-specific initializers.
- */
-#include "platform-cc2538.h"
-#include <openthread/config.h>
-
-otInstance *sInstance;
-
-void otSysInit(int argc, char *argv[])
-{
-    OT_UNUSED_VARIABLE(argc);
-    OT_UNUSED_VARIABLE(argv);
-
-#if OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
-    cc2538DebugUartInit();
-#endif
-    cc2538AlarmInit();
-    cc2538RandomInit();
-    cc2538RadioInit();
-}
-
-bool otSysPseudoResetWasRequested(void)
-{
-    return false;
-}
-
-void otSysProcessDrivers(otInstance *aInstance)
-{
-    sInstance = aInstance;
-
-    // should sleep and wait for interrupts here
-
-    cc2538UartProcess();
-    cc2538RadioProcess(aInstance);
-    cc2538AlarmProcess(aInstance);
-}
diff --git a/examples/platforms/cc2538/uart.c b/examples/platforms/cc2538/uart.c
deleted file mode 100644
index 3325c99..0000000
--- a/examples/platforms/cc2538/uart.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements the OpenThread platform abstraction for UART communication.
- *
- */
-
-#include <openthread-core-config.h>
-#include <openthread/config.h>
-
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdio.h>
-
-#include <openthread/platform/debug_uart.h>
-#include <openthread/platform/logging.h>
-
-#include "platform-cc2538.h"
-#include "utils/code_utils.h"
-#include "utils/uart.h"
-
-enum
-{
-    kPlatformClock     = 32000000,
-    kBaudRate          = 115200,
-    kReceiveBufferSize = 128,
-};
-
-extern void UART0IntHandler(void);
-
-static void processReceive(void);
-static void processTransmit(void);
-
-static const uint8_t *sTransmitBuffer = NULL;
-static uint16_t       sTransmitLength = 0;
-
-typedef struct RecvBuffer
-{
-    // The data buffer
-    uint8_t mBuffer[kReceiveBufferSize];
-    // The offset of the first item written to the list.
-    uint16_t mHead;
-    // The offset of the next item to be written to the list.
-    uint16_t mTail;
-} RecvBuffer;
-
-static RecvBuffer sReceive;
-
-static void enable_uart_clocks(void)
-{
-    static int uart_clocks_done = 0;
-
-    if (uart_clocks_done)
-    {
-        return;
-    }
-
-    uart_clocks_done = 1;
-
-#if OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
-    HWREG(SYS_CTRL_RCGCUART) = (SYS_CTRL_RCGCUART_UART0 | SYS_CTRL_RCGCUART_UART1);
-    HWREG(SYS_CTRL_SCGCUART) = (SYS_CTRL_SCGCUART_UART0 | SYS_CTRL_SCGCUART_UART1);
-    HWREG(SYS_CTRL_DCGCUART) = (SYS_CTRL_DCGCUART_UART0 | SYS_CTRL_DCGCUART_UART1);
-#else
-    HWREG(SYS_CTRL_RCGCUART) = SYS_CTRL_RCGCUART_UART0;
-    HWREG(SYS_CTRL_SCGCUART) = SYS_CTRL_SCGCUART_UART0;
-    HWREG(SYS_CTRL_DCGCUART) = SYS_CTRL_DCGCUART_UART0;
-#endif
-}
-
-otError otPlatUartEnable(void)
-{
-    uint32_t div;
-
-    sReceive.mHead = 0;
-    sReceive.mTail = 0;
-
-    // clock
-    enable_uart_clocks();
-
-    HWREG(UART0_BASE + UART_O_CC) = 0;
-
-    // tx pin
-    HWREG(IOC_PA1_SEL)  = IOC_MUX_OUT_SEL_UART0_TXD;
-    HWREG(IOC_PA1_OVER) = IOC_OVERRIDE_OE;
-    HWREG(GPIO_A_BASE + GPIO_O_AFSEL) |= GPIO_PIN_1;
-
-    // rx pin
-    HWREG(IOC_UARTRXD_UART0) = IOC_PAD_IN_SEL_PA0;
-    HWREG(IOC_PA0_OVER)      = IOC_OVERRIDE_DIS;
-    HWREG(GPIO_A_BASE + GPIO_O_AFSEL) |= GPIO_PIN_0;
-
-    HWREG(UART0_BASE + UART_O_CTL) = 0;
-
-    // baud rate
-    div                             = (((kPlatformClock * 8) / kBaudRate) + 1) / 2;
-    HWREG(UART0_BASE + UART_O_IBRD) = div / 64;
-    HWREG(UART0_BASE + UART_O_FBRD) = div % 64;
-    HWREG(UART0_BASE + UART_O_LCRH) = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE;
-
-    // configure interrupts
-    HWREG(UART0_BASE + UART_O_IM) |= UART_IM_RXIM | UART_IM_RTIM;
-
-    // enable
-    HWREG(UART0_BASE + UART_O_CTL) = UART_CTL_UARTEN | UART_CTL_TXE | UART_CTL_RXE;
-
-    // enable interrupts
-    HWREG(NVIC_EN0) = 1 << ((INT_UART0 - 16) & 31);
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatUartDisable(void)
-{
-    return OT_ERROR_NONE;
-}
-
-otError otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength)
-{
-    otError error = OT_ERROR_NONE;
-
-    otEXPECT_ACTION(sTransmitBuffer == NULL, error = OT_ERROR_BUSY);
-
-    sTransmitBuffer = aBuf;
-    sTransmitLength = aBufLength;
-
-exit:
-    return error;
-}
-
-void processReceive(void)
-{
-    // Copy tail to prevent multiple reads
-    uint16_t tail = sReceive.mTail;
-
-    // If the data wraps around, process the first part
-    if (sReceive.mHead > tail)
-    {
-        otPlatUartReceived(sReceive.mBuffer + sReceive.mHead, kReceiveBufferSize - sReceive.mHead);
-
-        // Reset the buffer mHead back to zero.
-        sReceive.mHead = 0;
-    }
-
-    // For any data remaining, process it
-    if (sReceive.mHead != tail)
-    {
-        otPlatUartReceived(sReceive.mBuffer + sReceive.mHead, tail - sReceive.mHead);
-
-        // Set mHead to the local tail we have cached
-        sReceive.mHead = tail;
-    }
-}
-
-otError otPlatUartFlush(void)
-{
-    otEXPECT(sTransmitBuffer != NULL);
-
-    for (; sTransmitLength > 0; sTransmitLength--)
-    {
-        while (HWREG(UART0_BASE + UART_O_FR) & UART_FR_TXFF)
-            ;
-
-        HWREG(UART0_BASE + UART_O_DR) = *sTransmitBuffer++;
-    }
-
-    sTransmitBuffer = NULL;
-    return OT_ERROR_NONE;
-
-exit:
-    return OT_ERROR_INVALID_STATE;
-}
-
-void processTransmit(void)
-{
-    otPlatUartFlush();
-    otPlatUartSendDone();
-}
-
-void cc2538UartProcess(void)
-{
-    processReceive();
-    processTransmit();
-}
-
-void UART0IntHandler(void)
-{
-    uint32_t mis;
-    uint8_t  byte;
-
-    mis                            = HWREG(UART0_BASE + UART_O_MIS);
-    HWREG(UART0_BASE + UART_O_ICR) = mis;
-
-    if (mis & (UART_IM_RXIM | UART_IM_RTIM))
-    {
-        while (!(HWREG(UART0_BASE + UART_O_FR) & UART_FR_RXFE))
-        {
-            byte = HWREG(UART0_BASE + UART_O_DR);
-
-            // We can only write if incrementing mTail doesn't equal mHead
-            if (sReceive.mHead != (sReceive.mTail + 1) % kReceiveBufferSize)
-            {
-                sReceive.mBuffer[sReceive.mTail] = byte;
-                sReceive.mTail                   = (sReceive.mTail + 1) % kReceiveBufferSize;
-            }
-        }
-    }
-}
-
-#if OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
-
-int otPlatDebugUart_kbhit(void)
-{
-    uint32_t v;
-
-    /* get flags */
-    v = HWREG(UART1_BASE + UART_O_FR);
-
-    /* if FIFO empty we have no data */
-    return !(v & UART_FR_RXFE);
-}
-
-int otPlatDebugUart_getc(void)
-{
-    int v = 1;
-
-    /* if nothing in fifo */
-    if (!otPlatDebugUart_kbhit())
-    {
-        return -1;
-    }
-
-    /* fetch */
-    v = (int)HWREG(UART0_BASE + UART_O_DR);
-    v = (v & 0x0ff);
-    return v;
-}
-
-void otPlatDebugUart_putchar_raw(int b)
-{
-    /* wait till not busy */
-    while (HWREG(UART1_BASE + UART_O_FR) & UART_FR_TXFF)
-        ;
-
-    /* write byte */
-    HWREG(UART1_BASE + UART_O_DR) = ((uint32_t)(b & 0x0ff));
-}
-
-void cc2538DebugUartInit(void)
-{
-    int32_t a, b;
-
-    // clocks
-    enable_uart_clocks();
-
-    HWREG(UART1_BASE + UART_O_CC) = 0;
-
-    // UART1 - tx pin
-    // Using an RF06 Evaluation board
-    // http://www.ti.com/tool/cc2538dk
-    // PA3 => is jumper position RF1.14
-    // To use these, you will require a "flying-lead" UART adapter
-    HWREG(IOC_PA3_SEL)  = IOC_MUX_OUT_SEL_UART1_TXD;
-    HWREG(IOC_PA3_OVER) = IOC_OVERRIDE_OE;
-    HWREG(GPIO_A_BASE + GPIO_O_AFSEL) |= GPIO_PIN_3;
-
-    // UART1 - rx pin we don't really use but we setup anyway
-    // PA2 => is jumper position RF1.16
-    HWREG(IOC_UARTRXD_UART1) = IOC_PAD_IN_SEL_PA2;
-    HWREG(IOC_PA2_OVER)      = IOC_OVERRIDE_DIS;
-    HWREG(GPIO_A_BASE + GPIO_O_AFSEL) |= GPIO_PIN_2;
-
-    HWREG(UART1_BASE + UART_O_CC) = 0;
-
-    // baud rate
-    b = (((kPlatformClock * 8) / kBaudRate) + 1) / 2;
-    a = b / 64;
-    b = b % 64;
-
-    HWREG(UART1_BASE + UART_O_IBRD) = a;
-    HWREG(UART1_BASE + UART_O_FBRD) = b;
-    HWREG(UART1_BASE + UART_O_LCRH) = UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE;
-
-    /* NOTE:
-     *  uart1 is not using IRQs it is tx only
-     *  and we block when writing bytes
-     */
-    HWREG(UART1_BASE + UART_O_CTL) = UART_CTL_UARTEN | UART_CTL_TXE | UART_CTL_RXE;
-}
-
-#endif
diff --git a/examples/platforms/cc2652/README.md b/examples/platforms/cc2652/README.md
deleted file mode 100644
index adf4a6a..0000000
--- a/examples/platforms/cc2652/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on CC2652 example has moved to https://github.com/openthread/ot-cc13x2-cc26x2
diff --git a/examples/platforms/efr32/efr32mg1/README.md b/examples/platforms/efr32/efr32mg1/README.md
deleted file mode 100644
index d6ca673..0000000
--- a/examples/platforms/efr32/efr32mg1/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
diff --git a/examples/platforms/efr32/efr32mg12/README.md b/examples/platforms/efr32/efr32mg12/README.md
deleted file mode 100644
index d6ca673..0000000
--- a/examples/platforms/efr32/efr32mg12/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
diff --git a/examples/platforms/efr32/efr32mg13/README.md b/examples/platforms/efr32/efr32mg13/README.md
deleted file mode 100644
index d6ca673..0000000
--- a/examples/platforms/efr32/efr32mg13/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
diff --git a/examples/platforms/efr32/efr32mg21/README.md b/examples/platforms/efr32/efr32mg21/README.md
deleted file mode 100644
index d6ca673..0000000
--- a/examples/platforms/efr32/efr32mg21/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on EFR32 example has moved to https://github.com/openthread/ot-efr32
diff --git a/examples/platforms/gp712/README.md b/examples/platforms/gp712/README.md
deleted file mode 100644
index 83d9925..0000000
--- a/examples/platforms/gp712/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on GP712 example has moved to https://github.com/openthread/ot-qorvo
diff --git a/examples/platforms/k32w/README.md b/examples/platforms/k32w/README.md
deleted file mode 100644
index b2f9611..0000000
--- a/examples/platforms/k32w/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on K32W example has moved to https://github.com/openthread/ot-nxp
diff --git a/examples/platforms/k32w/jn5189/README.md b/examples/platforms/k32w/jn5189/README.md
deleted file mode 100644
index 8a43827..0000000
--- a/examples/platforms/k32w/jn5189/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on JN5189 example has moved to https://github.com/openthread/ot-nxp
diff --git a/examples/platforms/k32w/k32w061/README.md b/examples/platforms/k32w/k32w061/README.md
deleted file mode 100644
index c027004..0000000
--- a/examples/platforms/k32w/k32w061/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on K32W061 example has moved to https://github.com/openthread/ot-nxp
diff --git a/examples/platforms/kw41z/README.md b/examples/platforms/kw41z/README.md
deleted file mode 100644
index aa5ae1f..0000000
--- a/examples/platforms/kw41z/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on KW41Z example has moved to https://github.com/openthread/ot-kw41z
diff --git a/examples/platforms/nrf528xx/nrf52811/README.md b/examples/platforms/nrf528xx/nrf52811/README.md
deleted file mode 100644
index 0f151e6..0000000
--- a/examples/platforms/nrf528xx/nrf52811/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on nRF528xx example has moved to https://github.com/openthread/ot-nrf528xx
diff --git a/examples/platforms/nrf528xx/nrf52833/README.md b/examples/platforms/nrf528xx/nrf52833/README.md
deleted file mode 100644
index 0f151e6..0000000
--- a/examples/platforms/nrf528xx/nrf52833/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on nRF528xx example has moved to https://github.com/openthread/ot-nrf528xx
diff --git a/examples/platforms/nrf528xx/nrf52840/README.md b/examples/platforms/nrf528xx/nrf52840/README.md
deleted file mode 100644
index 0f151e6..0000000
--- a/examples/platforms/nrf528xx/nrf52840/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on nRF528xx example has moved to https://github.com/openthread/ot-nrf528xx
diff --git a/examples/platforms/openthread-system.h b/examples/platforms/openthread-system.h
deleted file mode 100644
index de8b2d1..0000000
--- a/examples/platforms/openthread-system.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file defines the platform-specific functions needed by OpenThread's example applications.
- */
-
-#ifndef OPENTHREAD_SYSTEM_H_
-#define OPENTHREAD_SYSTEM_H_
-
-#include <openthread/instance.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * This function performs all platform-specific initialization of OpenThread's drivers.
- *
- * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
- *       when initialization of OpenThread's drivers is most appropriate.
- *
- * @param[in]  argc  Number of arguments in @p argv.
- * @param[in]  argv  Argument vector.
- *
- */
-void otSysInit(int argc, char *argv[]);
-
-/**
- * This function performs all platform-specific deinitialization for OpenThread's drivers.
- *
- * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
- *       when deinitialization of OpenThread's drivers is most appropriate.
- *
- */
-void otSysDeinit(void);
-
-/**
- * This function returns true if a pseudo-reset was requested.
- *
- * In such a case, the main loop should shut down and re-initialize the OpenThread instance.
- *
- * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
- *       in the main loop to determine when to shut down and re-initialize the OpenThread instance.
- *
- */
-bool otSysPseudoResetWasRequested(void);
-
-/**
- * This function performs all platform-specific processing for OpenThread's example applications.
- *
- * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
- *       in the main loop when processing OpenThread's drivers is most appropriate.
- *
- * @param[in]  aInstance  The OpenThread instance structure.
- *
- */
-void otSysProcessDrivers(otInstance *aInstance);
-
-/**
- * This function is called whenever platform drivers needs processing.
- *
- * @note This function is not handled by the OpenThread library. Instead, the system/RTOS should handle this function
- *       and schedule a call to `otSysProcessDrivers()`.
- *
- */
-extern void otSysEventSignalPending(void);
-
-#ifdef __cplusplus
-} // end of extern "C"
-#endif
-
-#endif // OPENTHREAD_SYSTEM_H_
diff --git a/examples/platforms/qpg6095/README.md b/examples/platforms/qpg6095/README.md
deleted file mode 100644
index 7222efc..0000000
--- a/examples/platforms/qpg6095/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on QPG6095 example has moved to https://github.com/openthread/ot-qorvo
diff --git a/examples/platforms/qpg6100/README.md b/examples/platforms/qpg6100/README.md
deleted file mode 100644
index 89b0202..0000000
--- a/examples/platforms/qpg6100/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on QPG6100 example has moved to https://github.com/openthread/ot-qorvo
diff --git a/examples/platforms/qpg7015m/README.md b/examples/platforms/qpg7015m/README.md
deleted file mode 100644
index 1d10d7f..0000000
--- a/examples/platforms/qpg7015m/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on QPG7015m example has moved to https://github.com/openthread/ot-qorvo
diff --git a/examples/platforms/samr21/README.md b/examples/platforms/samr21/README.md
deleted file mode 100644
index 8ce1025..0000000
--- a/examples/platforms/samr21/README.md
+++ /dev/null
@@ -1 +0,0 @@
-The OpenThread on SAMR21 example has moved to https://github.com/openthread/ot-samr21
diff --git a/examples/platforms/simulation/CMakeLists.txt b/examples/platforms/simulation/CMakeLists.txt
deleted file mode 100644
index 883ee64..0000000
--- a/examples/platforms/simulation/CMakeLists.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-set(OT_PLATFORM_LIB "openthread-simulation" PARENT_SCOPE)
-
-add_library(ot-simulation-config INTERFACE)
-
-option(OT_SIMULATION_VIRTUAL_TIME "enable virtual time")
-if(OT_SIMULATION_VIRTUAL_TIME)
-    target_compile_definitions(ot-simulation-config INTERFACE "OPENTHREAD_SIMULATION_VIRTUAL_TIME=1")
-endif()
-
-option(OT_SIMULATION_VIRTUAL_TIME_UART "enable virtual time for UART")
-if(OT_SIMULATION_VIRTUAL_TIME_UART)
-    target_compile_definitions(ot-simulation-config INTERFACE "OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART=1")
-endif()
-
-option(OT_SIMULATION_MAX_NETWORK_SIZE "set maximum network size (default: 33)")
-if(OT_SIMULATION_MAX_NETWORK_SIZE)
-    target_compile_definitions(ot-simulation-config INTERFACE "OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE=${OT_SIMULATION_MAX_NETWORK_SIZE}")
-endif()
-
-if(NOT OT_CONFIG)
-    set(OT_CONFIG "openthread-core-simulation-config.h" PARENT_SCOPE)
-endif()
-
-list(APPEND OT_PLATFORM_DEFINES
-    "_BSD_SOURCE=1"
-    "_DEFAULT_SOURCE=1"
-    "OPENTHREAD_EXAMPLES_SIMULATION=1"
-    "OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1"
-)
-set(OT_PLATFORM_DEFINES ${OT_PLATFORM_DEFINES} PARENT_SCOPE)
-
-add_library(openthread-simulation
-    alarm.c
-    crypto.c
-    diag.c
-    dso_transport.c
-    entropy.c
-    flash.c
-    infra_if.c
-    logging.c
-    misc.c
-    radio.c
-    spi-stubs.c
-    system.c
-    trel.c
-    uart.c
-    virtual_time/alarm-sim.c
-    virtual_time/platform-sim.c
-    $<TARGET_OBJECTS:openthread-platform-utils>
-)
-
-find_library(LIBRT rt)
-if(LIBRT)
-    target_link_libraries(openthread-simulation PRIVATE ${LIBRT})
-endif()
-
-target_link_libraries(openthread-simulation PRIVATE
-    openthread-platform
-    ot-simulation-config
-    ot-config
-)
-
-target_compile_options(openthread-simulation PRIVATE
-    ${OT_CFLAGS}
-)
-
-target_include_directories(openthread-simulation PRIVATE
-    ${OT_PUBLIC_INCLUDES}
-    ${PROJECT_SOURCE_DIR}/examples/platforms
-    ${PROJECT_SOURCE_DIR}/src
-    ${PROJECT_SOURCE_DIR}/src/core
-)
-
-if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
-    set(CPACK_PACKAGE_NAME "openthread-simulation")
-    set(CPACK_GENERATOR "DEB")
-    set(CPACK_DEBIAN_PACKAGE_MAINTAINER "OpenThread Authors (https://github.com/openthread/openthread)")
-    set(CPACK_PACKAGE_CONTACT "OpenThread Authors (https://github.com/openthread/openthread)")
-    include(CPack)
-endif()
diff --git a/examples/platforms/simulation/Makefile.am b/examples/platforms/simulation/Makefile.am
deleted file mode 100644
index 227e2ae..0000000
--- a/examples/platforms/simulation/Makefile.am
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-include $(top_srcdir)/src/lib/common.am
-
-lib_LIBRARIES                             = libopenthread-simulation.a
-
-libopenthread_simulation_a_CPPFLAGS       = \
-    -I$(top_srcdir)/include                 \
-    -I$(top_srcdir)/examples/platforms      \
-    -I$(top_srcdir)/src                     \
-    -I$(top_srcdir)/src/core                \
-    -D_GNU_SOURCE                           \
-    $(NULL)
-
-PLATFORM_SOURCES                          = \
-    alarm.c                                 \
-    crypto.c                                \
-    diag.c                                  \
-    dso_transport.c                         \
-    entropy.c                               \
-    flash.c                                 \
-    infra_if.c                              \
-    logging.c                               \
-    misc.c                                  \
-    openthread-core-simulation-config.h     \
-    platform-config.h                       \
-    platform-simulation.h                   \
-    radio.c                                 \
-    spi-stubs.c                             \
-    system.c                                \
-    trel.c                                  \
-    uart.c                                  \
-    virtual_time/alarm-sim.c                \
-    virtual_time/platform-sim.c             \
-    $(NULL)
-
-libopenthread_simulation_a_SOURCES        = \
-    $(PLATFORM_SOURCES)                     \
-    $(NULL)
-
-Dash                                      = -
-libopenthread_simulation_a_LIBADD         = \
-    $(call ot_list_objects,$(top_builddir)/examples/platforms/utils/libopenthread-platform-utils.a) \
-    $(call ot_list_objects,$(top_builddir)/src/lib/platform/libopenthread-platform.a)               \
-    $(NULL)
-
-if OPENTHREAD_BUILD_COVERAGE
-libopenthread_simulation_a_CPPFLAGS      += \
-    -DOPENTHREAD_ENABLE_COVERAGE            \
-    $(NULL)
-
-CLEANFILES                                = $(wildcard *.gcda *.gcno)
-endif # OPENTHREAD_BUILD_COVERAGE
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/platforms/simulation/Makefile.platform.am b/examples/platforms/simulation/Makefile.platform.am
deleted file mode 100644
index d2cb725..0000000
--- a/examples/platforms/simulation/Makefile.platform.am
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-#  Copyright (c) 2017, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-#
-# Simulation platform-specific Makefile
-#
-
-LDADD_COMMON                                                                 += \
-    $(top_builddir)/examples/platforms/simulation/libopenthread-simulation.a    \
-    $(NULL)
-
-if OPENTHREAD_TARGET_LINUX
-LDADD_COMMON                                                          += \
-    -lrt                                                                 \
-    $(NULL)
-endif
diff --git a/examples/platforms/simulation/README.md b/examples/platforms/simulation/README.md
deleted file mode 100644
index a5f1fb3..0000000
--- a/examples/platforms/simulation/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# OpenThread Simulation on POSIX
-
-This directory contains example platform drivers for simulation on POSIX.
-
-## Build Examples
-
-### Build using autotools
-
-```bash
-$ cd <path-to-openthread>
-$ ./bootstrap
-$ make -f examples/Makefile-simulation
-```
-
-After a successful build, the `elf` files are found in:
-
-- `<path-to-openthread>/output/<platform>/bin`
-
-### Build using cmake/ninja
-
-```bash
-$ cd <path-to-openthread>
-$ mkdir build && cd build
-$ cmake -GNinja -DOT_PLATFORM=simulation ..
-$ ninja
-```
-
-After a successful build, the `elf` files are found in:
-
-- `<path-to-openthread>/build/examples/apps/cli`
-- `<path-to-openthread>/build/examples/apps/ncp`
-
-## Interact
-
-1. Spawn the process:
-
-```bash
-$ cd <path-to-openthread>/output/<platform>/bin
-$ ./ot-cli-ftd 1
-```
-
-2. Type `help` for list of commands.
-
-```bash
-> help
-help
-channel
-childtimeout
-contextreusedelay
-extaddr
-extpanid
-ipaddr
-keysequence
-leaderweight
-mode
-netdata register
-networkidtimeout
-networkkey
-networkname
-panid
-ping
-prefix
-releaserouterid
-rloc16
-route
-routerupgradethreshold
-scan
-start
-state
-stop
-```
diff --git a/examples/platforms/simulation/alarm.c b/examples/platforms/simulation/alarm.c
deleted file mode 100644
index 2795672..0000000
--- a/examples/platforms/simulation/alarm.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "utils/code_utils.h"
-
-#ifdef __linux__
-#include <signal.h>
-#include <time.h>
-
-#ifndef OPENTHREAD_CONFIG_MICRO_TIMER_SIGNAL
-#define OPENTHREAD_CONFIG_MICRO_TIMER_SIGNAL SIGRTMIN
-#endif
-
-timer_t sMicroTimer;
-#endif // __linux__
-
-#include <openthread/logging.h>
-#include <openthread/platform/alarm-micro.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/diag.h>
-
-#include "lib/platform/exit_code.h"
-
-#define MS_PER_S 1000
-#define NS_PER_US 1000
-#define US_PER_MS 1000
-#define US_PER_S 1000000
-
-#define DEFAULT_TIMEOUT_IN_SEC 10 // seconds
-
-#ifdef CLOCK_MONOTONIC_RAW
-#define OT_SIMULATION_CLOCK_ID CLOCK_MONOTONIC_RAW
-#else
-#define OT_SIMULATION_CLOCK_ID CLOCK_MONOTONIC
-#endif
-
-static bool     sIsMsRunning = false;
-static uint32_t sMsAlarm     = 0;
-
-static bool     sIsUsRunning = false;
-static uint32_t sUsAlarm     = 0;
-
-static uint32_t sSpeedUpFactor = 1;
-
-#ifdef __linux__
-static void microTimerHandler(int aSignal, siginfo_t *aSignalInfo, void *aUserContext)
-{
-    assert(aSignal == OPENTHREAD_CONFIG_MICRO_TIMER_SIGNAL);
-    assert(aSignalInfo->si_value.sival_ptr == &sMicroTimer);
-    (void)aSignal;
-    (void)aSignalInfo;
-    (void)aUserContext;
-}
-#endif
-
-static bool isExpired(uint32_t aTime, uint32_t aNow)
-{
-    // Determine whether or not `aTime` is before or same as `aNow`.
-
-    uint32_t diff = aNow - aTime;
-
-    return (diff & (1U << 31)) == 0;
-}
-
-static uint32_t calculateDuration(uint32_t aTime, uint32_t aNow)
-{
-    // Return the time duration from `aNow` to `aTime` if `aTimer` is
-    // after `aNow`, otherwise return zero.
-
-    return isExpired(aTime, aNow) ? 0 : aTime - aNow;
-}
-
-void platformAlarmInit(uint32_t aSpeedUpFactor)
-{
-    sSpeedUpFactor = aSpeedUpFactor;
-
-#ifdef __linux__
-    {
-        struct sigaction sa;
-
-        sa.sa_flags     = SA_SIGINFO;
-        sa.sa_sigaction = microTimerHandler;
-        sigemptyset(&sa.sa_mask);
-
-        if (sigaction(OPENTHREAD_CONFIG_MICRO_TIMER_SIGNAL, &sa, NULL) == -1)
-        {
-            perror("sigaction");
-            exit(EXIT_FAILURE);
-        }
-
-        struct sigevent sev;
-
-        sev.sigev_notify          = SIGEV_SIGNAL;
-        sev.sigev_signo           = OPENTHREAD_CONFIG_MICRO_TIMER_SIGNAL;
-        sev.sigev_value.sival_ptr = &sMicroTimer;
-
-        if (-1 == timer_create(CLOCK_MONOTONIC, &sev, &sMicroTimer))
-        {
-            perror("timer_create");
-            exit(EXIT_FAILURE);
-        }
-    }
-#endif
-}
-
-#if defined(CLOCK_MONOTONIC_RAW) || defined(CLOCK_MONOTONIC)
-uint64_t platformGetNow(void)
-{
-    struct timespec now;
-    int             err;
-
-    err = clock_gettime(OT_SIMULATION_CLOCK_ID, &now);
-
-    VerifyOrDie(err == 0, OT_EXIT_ERROR_ERRNO);
-
-    return (uint64_t)now.tv_sec * sSpeedUpFactor * US_PER_S + (uint64_t)now.tv_nsec * sSpeedUpFactor / NS_PER_US;
-}
-#else
-uint64_t platformGetNow(void)
-{
-    struct timeval tv;
-    int            err;
-
-    err = gettimeofday(&tv, NULL);
-
-    assert(err == 0);
-
-    return (uint64_t)tv.tv_sec * sSpeedUpFactor * US_PER_S + (uint64_t)tv.tv_usec * sSpeedUpFactor;
-}
-#endif // defined(CLOCK_MONOTONIC_RAW) || defined(CLOCK_MONOTONIC)
-
-uint32_t otPlatAlarmMilliGetNow(void)
-{
-    return (uint32_t)(platformGetNow() / US_PER_MS);
-}
-
-void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sMsAlarm     = aT0 + aDt;
-    sIsMsRunning = true;
-}
-
-void otPlatAlarmMilliStop(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sIsMsRunning = false;
-}
-
-uint32_t otPlatAlarmMicroGetNow(void)
-{
-    return (uint32_t)platformGetNow();
-}
-
-void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sUsAlarm     = aT0 + aDt;
-    sIsUsRunning = true;
-
-#ifdef __linux__
-    {
-        struct itimerspec its;
-        uint32_t          diff = sUsAlarm - otPlatAlarmMicroGetNow();
-
-        its.it_value.tv_sec  = diff / US_PER_S;
-        its.it_value.tv_nsec = (diff % US_PER_S) * NS_PER_US;
-
-        its.it_interval.tv_sec  = 0;
-        its.it_interval.tv_nsec = 0;
-
-        if (-1 == timer_settime(sMicroTimer, 0, &its, NULL))
-        {
-            perror("otPlatAlarmMicroStartAt timer_settime()");
-            exit(EXIT_FAILURE);
-        }
-    }
-#endif // __linux__
-}
-
-void otPlatAlarmMicroStop(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sIsUsRunning = false;
-
-#ifdef __linux__
-    {
-        struct itimerspec its = {{0, 0}, {0, 0}};
-
-        if (-1 == timer_settime(sMicroTimer, 0, &its, NULL))
-        {
-            perror("otPlatAlarmMicroStop timer_settime()");
-            exit(EXIT_FAILURE);
-        }
-    }
-#endif // __linux__
-}
-
-void platformAlarmUpdateTimeout(struct timeval *aTimeout)
-{
-    uint64_t remaining = DEFAULT_TIMEOUT_IN_SEC * US_PER_S; // in usec.
-
-    assert(aTimeout != NULL);
-
-    if (sIsMsRunning)
-    {
-        uint32_t msRemaining = calculateDuration(sMsAlarm, otPlatAlarmMilliGetNow());
-
-        remaining = ((uint64_t)msRemaining) * US_PER_MS;
-    }
-
-    if (sIsUsRunning)
-    {
-        uint32_t usRemaining = calculateDuration(sUsAlarm, otPlatAlarmMicroGetNow());
-
-        if (usRemaining < remaining)
-        {
-            remaining = usRemaining;
-        }
-    }
-
-    if (remaining == 0)
-    {
-        aTimeout->tv_sec  = 0;
-        aTimeout->tv_usec = 0;
-    }
-    else
-    {
-        remaining /= sSpeedUpFactor;
-
-        if (remaining == 0)
-        {
-            remaining = 1;
-        }
-
-        aTimeout->tv_sec  = (time_t)(remaining / US_PER_S);
-        aTimeout->tv_usec = remaining % US_PER_S;
-    }
-}
-
-void platformAlarmProcess(otInstance *aInstance)
-{
-    if (sIsMsRunning && isExpired(sMsAlarm, otPlatAlarmMilliGetNow()))
-    {
-        sIsMsRunning = false;
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-        if (otPlatDiagModeGet())
-        {
-            otPlatDiagAlarmFired(aInstance);
-        }
-        else
-#endif
-        {
-            otPlatAlarmMilliFired(aInstance);
-        }
-    }
-
-#if OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
-    if (sIsUsRunning && isExpired(sUsAlarm, otPlatAlarmMicroGetNow()))
-    {
-        sIsUsRunning = false;
-
-        otPlatAlarmMicroFired(aInstance);
-    }
-#endif
-}
-
-uint64_t otPlatTimeGet(void)
-{
-    return platformGetNow();
-}
-
-uint16_t otPlatTimeGetXtalAccuracy(void)
-{
-    return 0;
-}
-
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
diff --git a/examples/platforms/simulation/crypto.c b/examples/platforms/simulation/crypto.c
deleted file mode 100644
index 36cf89b..0000000
--- a/examples/platforms/simulation/crypto.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  Copyright (c) 2021, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <openthread/config.h>
-#include <openthread/platform/crypto.h>
-
-#if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
-
-// crypto key storage stubs
-
-otError otPlatCryptoImportKey(otCryptoKeyRef *     aKeyRef,
-                              otCryptoKeyType      aKeyType,
-                              otCryptoKeyAlgorithm aKeyAlgorithm,
-                              int                  aKeyUsage,
-                              otCryptoKeyStorage   aKeyPersistence,
-                              const uint8_t *      aKey,
-                              size_t               aKeyLen)
-{
-    OT_UNUSED_VARIABLE(aKeyRef);
-    OT_UNUSED_VARIABLE(aKeyType);
-    OT_UNUSED_VARIABLE(aKeyAlgorithm);
-    OT_UNUSED_VARIABLE(aKeyUsage);
-    OT_UNUSED_VARIABLE(aKeyPersistence);
-    OT_UNUSED_VARIABLE(aKey);
-    OT_UNUSED_VARIABLE(aKeyLen);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-otError otPlatCryptoExportKey(otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t aBufferLen, size_t *aKeyLen)
-{
-    OT_UNUSED_VARIABLE(aKeyRef);
-    OT_UNUSED_VARIABLE(aBuffer);
-    OT_UNUSED_VARIABLE(aBufferLen);
-    OT_UNUSED_VARIABLE(aKeyLen);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-otError otPlatCryptoDestroyKey(otCryptoKeyRef aKeyRef)
-{
-    OT_UNUSED_VARIABLE(aKeyRef);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-bool otPlatCryptoHasKey(otCryptoKeyRef aKeyRef)
-{
-    OT_UNUSED_VARIABLE(aKeyRef);
-
-    return false;
-}
-
-#endif // OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
diff --git a/examples/platforms/simulation/diag.c b/examples/platforms/simulation/diag.c
deleted file mode 100644
index ddb8c26..0000000
--- a/examples/platforms/simulation/diag.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-
-#include <openthread/config.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/radio.h>
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-/**
- * Diagnostics mode variables.
- *
- */
-static bool sDiagMode = false;
-
-void otPlatDiagModeSet(bool aMode)
-{
-    sDiagMode = aMode;
-}
-
-bool otPlatDiagModeGet()
-{
-    return sDiagMode;
-}
-
-void otPlatDiagChannelSet(uint8_t aChannel)
-{
-    OT_UNUSED_VARIABLE(aChannel);
-}
-
-void otPlatDiagTxPowerSet(int8_t aTxPower)
-{
-    OT_UNUSED_VARIABLE(aTxPower);
-}
-
-void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aFrame);
-    OT_UNUSED_VARIABLE(aError);
-}
-
-void otPlatDiagAlarmCallback(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-}
-
-#endif // OPENTHREAD_CONFIG_DIAG_ENABLE
diff --git a/examples/platforms/simulation/entropy.c b/examples/platforms/simulation/entropy.c
deleted file mode 100644
index bcb04a4..0000000
--- a/examples/platforms/simulation/entropy.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements an entropy source based on /dev/urandom or pseudo-random generator.
- *
- */
-
-#include "platform-simulation.h"
-
-#include <assert.h>
-#include <stdio.h>
-
-#include <openthread/platform/entropy.h>
-
-#include "utils/code_utils.h"
-
-#ifndef __SANITIZE_ADDRESS__
-#define __SANITIZE_ADDRESS__ 0
-#endif
-
-#if __SANITIZE_ADDRESS__ != 0
-
-static uint32_t sState = 1;
-
-#endif // __SANITIZE_ADDRESS__
-
-void platformRandomInit(void)
-{
-#if __SANITIZE_ADDRESS__ != 0
-
-    // Multiplying gNodeId assures that no two nodes gets the same seed within an hour.
-    sState = (uint32_t)time(NULL) + (3600 * gNodeId);
-
-#endif // __SANITIZE_ADDRESS__
-}
-
-#if __SANITIZE_ADDRESS__ != 0
-
-static uint32_t randomUint32Get(void)
-{
-    uint32_t mlcg, p, q;
-    uint64_t tmpstate;
-
-    tmpstate = (uint64_t)33614 * (uint64_t)sState;
-    q        = tmpstate & 0xffffffff;
-    q        = q >> 1;
-    p        = tmpstate >> 32;
-    mlcg     = p + q;
-
-    if (mlcg & 0x80000000)
-    {
-        mlcg &= 0x7fffffff;
-        mlcg++;
-    }
-
-    sState = mlcg;
-
-    return mlcg;
-}
-
-#endif // __SANITIZE_ADDRESS__
-
-otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength)
-{
-    otError error = OT_ERROR_NONE;
-
-#if __SANITIZE_ADDRESS__ == 0
-
-    FILE * file = NULL;
-    size_t readLength;
-
-    otEXPECT_ACTION(aOutput && aOutputLength, error = OT_ERROR_INVALID_ARGS);
-
-    file = fopen("/dev/urandom", "rb");
-    otEXPECT_ACTION(file != NULL, error = OT_ERROR_FAILED);
-
-    readLength = fread(aOutput, 1, aOutputLength, file);
-    otEXPECT_ACTION(readLength == aOutputLength, error = OT_ERROR_FAILED);
-
-exit:
-
-    if (file != NULL)
-    {
-        fclose(file);
-    }
-
-#else // __SANITIZE_ADDRESS__
-
-    /*
-     * THE IMPLEMENTATION BELOW IS NOT COMPLIANT WITH THE THREAD SPECIFICATION.
-     *
-     * Address Sanitizer triggers test failures when reading random
-     * values from /dev/urandom.  The pseudo-random number generator
-     * implementation below is only used to enable continuous
-     * integration checks with Address Sanitizer enabled.
-     */
-    otEXPECT_ACTION(aOutput && aOutputLength, error = OT_ERROR_INVALID_ARGS);
-
-    for (uint16_t length = 0; length < aOutputLength; length++)
-    {
-        aOutput[length] = (uint8_t)randomUint32Get();
-    }
-
-exit:
-
-#endif // __SANITIZE_ADDRESS__
-
-    return error;
-}
diff --git a/examples/platforms/simulation/flash.c b/examples/platforms/simulation/flash.c
deleted file mode 100644
index ce07f3a..0000000
--- a/examples/platforms/simulation/flash.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- *  Copyright (c) 2020, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <assert.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <openthread/config.h>
-#include <openthread/logging.h>
-#include <openthread/platform/flash.h>
-
-#include "lib/platform/exit_code.h"
-
-static int sFlashFd = -1;
-
-enum
-{
-    SWAP_SIZE = 2048,
-    SWAP_NUM  = 2,
-};
-
-void otPlatFlashInit(otInstance *aInstance)
-{
-    const char *path = OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH;
-    char        fileName[sizeof(OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH) + 32];
-    struct stat st;
-    bool        create = false;
-    const char *offset = getenv("PORT_OFFSET");
-
-    memset(&st, 0, sizeof(st));
-
-    if (stat(path, &st) == -1)
-    {
-        mkdir(path, 0777);
-    }
-
-    if (offset == NULL)
-    {
-        offset = "0";
-    }
-
-    snprintf(fileName, sizeof(fileName), "%s/%s_%d.flash", path, offset, gNodeId);
-
-    if (access(fileName, 0))
-    {
-        create = true;
-    }
-
-    sFlashFd = open(fileName, O_RDWR | O_CREAT | O_CLOEXEC, 0600);
-    VerifyOrDie(sFlashFd >= 0, OT_EXIT_ERROR_ERRNO);
-
-    lseek(sFlashFd, 0, SEEK_SET);
-
-    if (create)
-    {
-        for (uint8_t index = 0; index < SWAP_NUM; index++)
-        {
-            otPlatFlashErase(aInstance, index);
-        }
-    }
-}
-
-uint32_t otPlatFlashGetSwapSize(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return SWAP_SIZE;
-}
-
-void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint8_t  buffer[SWAP_SIZE];
-    uint32_t address;
-    ssize_t  rval;
-
-    assert((sFlashFd >= 0) && (aSwapIndex < SWAP_NUM));
-
-    address = aSwapIndex ? SWAP_SIZE : 0;
-    memset(buffer, 0xff, sizeof(buffer));
-
-    rval = pwrite(sFlashFd, buffer, sizeof(buffer), (off_t)address);
-    VerifyOrDie(rval == SWAP_SIZE, OT_EXIT_ERROR_ERRNO);
-}
-
-void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, void *aData, uint32_t aSize)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint32_t address;
-    ssize_t  rval;
-
-    assert((sFlashFd >= 0) && (aSwapIndex < SWAP_NUM) && (aSize <= SWAP_SIZE) && (aOffset <= (SWAP_SIZE - aSize)));
-
-    address = aSwapIndex ? SWAP_SIZE : 0;
-
-    rval = pread(sFlashFd, aData, aSize, (off_t)(address + aOffset));
-    VerifyOrDie((uint32_t)rval == aSize, OT_EXIT_ERROR_ERRNO);
-}
-
-void otPlatFlashWrite(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, const void *aData, uint32_t aSize)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint32_t address;
-    uint8_t  byte;
-    ssize_t  rval;
-
-    assert((sFlashFd >= 0) && (aSwapIndex < SWAP_NUM) && (aSize <= SWAP_SIZE) && (aOffset <= (SWAP_SIZE - aSize)));
-
-    address = aSwapIndex ? SWAP_SIZE : 0;
-    address += aOffset;
-
-    for (uint32_t offset = 0; offset < aSize; offset++)
-    {
-        rval = pread(sFlashFd, &byte, sizeof(byte), (off_t)(address + offset));
-        VerifyOrDie(rval == sizeof(byte), OT_EXIT_ERROR_ERRNO);
-
-        // Use bitwise AND to emulate the behavior of flash memory
-        byte &= ((uint8_t *)aData)[offset];
-
-        rval = pwrite(sFlashFd, &byte, sizeof(byte), (off_t)(address + offset));
-        VerifyOrDie(rval == sizeof(byte), OT_EXIT_ERROR_ERRNO);
-    }
-}
diff --git a/examples/platforms/simulation/infra_if.c b/examples/platforms/simulation/infra_if.c
deleted file mode 100644
index b62041b..0000000
--- a/examples/platforms/simulation/infra_if.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  Copyright (c) 2021, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <openthread/platform/infra_if.h>
-
-#if OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE
-bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddress)
-{
-    OT_UNUSED_VARIABLE(aInfraIfIndex);
-    OT_UNUSED_VARIABLE(aAddress);
-
-    return false;
-}
-
-otError otPlatInfraIfSendIcmp6Nd(uint32_t            aInfraIfIndex,
-                                 const otIp6Address *aDestAddress,
-                                 const uint8_t *     aBuffer,
-                                 uint16_t            aBufferLength)
-{
-    OT_UNUSED_VARIABLE(aInfraIfIndex);
-    OT_UNUSED_VARIABLE(aDestAddress);
-    OT_UNUSED_VARIABLE(aBuffer);
-    OT_UNUSED_VARIABLE(aBufferLength);
-
-    return OT_ERROR_FAILED;
-}
-#endif
diff --git a/examples/platforms/simulation/logging.c b/examples/platforms/simulation/logging.c
deleted file mode 100644
index 8b90c43..0000000
--- a/examples/platforms/simulation/logging.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-#include <openthread-core-config.h>
-#include <openthread/config.h>
-
-#include <ctype.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-#include <syslog.h>
-
-#include <openthread/platform/logging.h>
-#include <openthread/platform/toolchain.h>
-
-#include "utils/code_utils.h"
-
-#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED)
-OT_TOOL_WEAK void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
-{
-    OT_UNUSED_VARIABLE(aLogLevel);
-    OT_UNUSED_VARIABLE(aLogRegion);
-
-    char    logString[512];
-    int     offset;
-    va_list args;
-
-    offset = snprintf(logString, sizeof(logString), "[%d]", gNodeId);
-
-    va_start(args, aFormat);
-    vsnprintf(&logString[offset], sizeof(logString) - (uint16_t)offset, aFormat, args);
-    va_end(args);
-
-    syslog(LOG_CRIT, "%s", logString);
-}
-#endif
diff --git a/examples/platforms/simulation/misc.c b/examples/platforms/simulation/misc.c
deleted file mode 100644
index aefbca5..0000000
--- a/examples/platforms/simulation/misc.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <setjmp.h>
-#include <unistd.h>
-
-#include <openthread/platform/misc.h>
-
-#include "openthread-system.h"
-
-extern jmp_buf gResetJump;
-
-static otPlatResetReason   sPlatResetReason = OT_PLAT_RESET_REASON_POWER_ON;
-bool                       gPlatformPseudoResetWasRequested;
-static otPlatMcuPowerState gPlatMcuPowerState = OT_PLAT_MCU_POWER_STATE_ON;
-
-void otPlatReset(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-#if OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
-    gPlatformPseudoResetWasRequested = true;
-    sPlatResetReason                 = OT_PLAT_RESET_REASON_SOFTWARE;
-
-#else // OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
-    // Restart the process using execvp.
-    otSysDeinit();
-    platformUartRestore();
-
-    longjmp(gResetJump, 1);
-    assert(false);
-
-#endif // OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
-}
-
-otPlatResetReason otPlatGetResetReason(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return sPlatResetReason;
-}
-
-void otPlatWakeHost(void)
-{
-    // TODO: implement an operation to wake the host from sleep state.
-}
-
-otError otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-
-    switch (aState)
-    {
-    case OT_PLAT_MCU_POWER_STATE_ON:
-    case OT_PLAT_MCU_POWER_STATE_LOW_POWER:
-        gPlatMcuPowerState = aState;
-        break;
-
-    default:
-        error = OT_ERROR_FAILED;
-        break;
-    }
-
-    return error;
-}
-
-otPlatMcuPowerState otPlatGetMcuPowerState(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return gPlatMcuPowerState;
-}
diff --git a/examples/platforms/simulation/openthread-core-simulation-config.h b/examples/platforms/simulation/openthread-core-simulation-config.h
deleted file mode 100644
index 879f069..0000000
--- a/examples/platforms/simulation/openthread-core-simulation-config.h
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- *  Copyright (c) 2017, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file includes simulation compile-time configuration constants
- *   for OpenThread.
- */
-
-#ifndef OPENTHREAD_CORE_SIMULATION_CONFIG_H_
-#define OPENTHREAD_CORE_SIMULATION_CONFIG_H_
-
-#ifndef OPENTHREAD_RADIO
-#define OPENTHREAD_RADIO 0
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_PLATFORM_INFO
- *
- * The platform-specific string to insert into the OpenThread version string.
- *
- */
-#define OPENTHREAD_CONFIG_PLATFORM_INFO "SIMULATION"
-
-/**
- * @def OPENTHREAD_CONFIG_LOG_OUTPUT
- *
- * Specify where the log output should go.
- *
- */
-#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT /* allow command line override */
-#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
- *
- * Define as 1 to enable support for adding of auto-configured SLAAC addresses by OpenThread.
- *
- */
-#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE /* allows command line override */
-#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
-#endif
-
-#if OPENTHREAD_RADIO
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE
- *
- * Define to 1 if you want to enable software ACK timeout logic.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE
- *
- * Define to 1 if you want to enable software energy scanning logic.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE
- *
- * Define to 1 if you want to enable software retransmission logic.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE
- *
- * Define to 1 if you want to enable software CSMA-CA backoff logic.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE
- *
- * Define to 1 if you want to enable software transmission security logic.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE
- *
- * Define to 1 to enable software transmission target time logic.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE
-#define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE 1
-#endif
-#endif // OPENTHREAD_RADIO
-
-/**
- * @def OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
- *
- * Define to 1 if you want to support microsecond timer in platform.
- *
- */
-#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1
-
-/**
- * @def OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE
- *
- * Define to 1 to enable otPlatFlash* APIs to support non-volatile storage.
- *
- * When defined to 1, the platform MUST implement the otPlatFlash* APIs instead of the otPlatSettings* APIs.
- *
- */
-#define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 1
-
-/**
- * @def CLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER
- *
- * Define to 1 to use DefaultHandler for unhandled requests
- *
- */
-#define CLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER 1
-
-/**
- * @def OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
- *
- * Define to 1 if you want to enable radio coexistence implemented in platform.
- *
- */
-#ifndef OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
-#define OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE 1
-#endif
-
-#ifndef OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE
-#define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_LOG_PLATFORM
- *
- * Define to enable platform region logging.
- *
- */
-#ifndef OPENTHREAD_CONFIG_LOG_PLATFORM
-#define OPENTHREAD_CONFIG_LOG_PLATFORM 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH
- *
- * The maximum size of the CLI line in bytes.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH
-#define OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH 640
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
- *
- * The size of CLI UART RX buffer in bytes.
- *
- */
-#ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
-#define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 640
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
- *
- * The maximum number of children.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
-#define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 128
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH
- *
- * Define as 1 for a child to inform its previous parent when it attaches to a new parent.
- *
- * If this feature is enabled, when a device attaches to a new parent, it will send an IP message (with empty payload
- * and mesh-local IP address as the source address) to its previous parent.
- *
- */
-#ifndef OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH
-#define OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_UPTIME_ENABLE
- *
- * Define to 1 to enable tracking the uptime of OpenThread instance.
- *
- */
-#ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE
-#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME
- *
- * Define as 1 to prepend the current uptime to all log messages.
- *
- */
-#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME
-#define OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME 1
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
- *
- * Specifies number of service entries in the SRP client service pool.
- *
- * This config is applicable only when `OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_ENABLE` is enabled.
- *
- */
-#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
-#define OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES 20
-#endif
-
-#endif // OPENTHREAD_CORE_SIMULATION_CONFIG_H_
diff --git a/examples/platforms/simulation/platform-config.h b/examples/platforms/simulation/platform-config.h
deleted file mode 100644
index 6591268..0000000
--- a/examples/platforms/simulation/platform-config.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- *  Copyright (c) 2018, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file includes the platform-specific configuration.
- *
- */
-
-/**
- * @def OPENTHREAD_SIMULATION_UART_BAUDRATE
- *
- * This setting configures the baud rate of the UART.
- *
- */
-#ifndef OPENTHREAD_SIMULATION_UART_BAUDRATE
-#define OPENTHREAD_SIMULATION_UART_BAUDRATE B115200
-#endif
-
-/**
- * @def OPENTHREAD_SIMULATION_VIRTUAL_TIME
- *
- * This setting configures whether to use virtual time (used for simulation) in simulation platform.
- *
- */
-#ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME
-#define OPENTHREAD_SIMULATION_VIRTUAL_TIME 0
-#endif
-
-/**
- * @def OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART
- *
- * This setting configures whether to use virtual time for UART.
- *
- */
-#ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART
-#define OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART 0
-#endif
-
-/**
- * @def OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
- *
- * Define as 1 to enable pseudo-reset.
- *
- */
-#ifndef OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
-#define OPENTHREAD_PLATFORM_USE_PSEUDO_RESET 0
-#endif
-
-/**
- * @def OPENTHREAD_CONFIG_NCP_SPI_ENABLE
- *
- * Define as 1 to enable SPI NCP interface.
- *
- */
-#ifndef OPENTHREAD_CONFIG_NCP_SPI_ENABLE
-#define OPENTHREAD_CONFIG_NCP_SPI_ENABLE 0
-#endif
-
-/**
- * Check OTNS configurations
- *
- */
-#if OPENTHREAD_CONFIG_OTNS_ENABLE
-
-#if !OPENTHREAD_SIMULATION_VIRTUAL_TIME
-#error "OTNS requires virtual time simulations"
-#endif
-
-#endif // OPENTHREAD_CONFIG_OTNS_ENABLE
-
-/**
- * @def OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE
- *
- * This setting configures the maximum network size in simulation.
- *
- */
-#ifndef OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE
-#define OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE 33
-#endif
diff --git a/examples/platforms/simulation/platform-simulation.h b/examples/platforms/simulation/platform-simulation.h
deleted file mode 100644
index 4e7970b..0000000
--- a/examples/platforms/simulation/platform-simulation.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file includes the platform-specific initializers.
- */
-
-#ifndef PLATFORM_SIMULATION_H_
-#define PLATFORM_SIMULATION_H_
-
-#include <openthread-core-config.h>
-#include <openthread/config.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <arpa/inet.h>
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <poll.h>
-#include <signal.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <openthread/instance.h>
-
-#include "openthread-core-config.h"
-#include "platform-config.h"
-
-enum
-{
-    OT_SIM_EVENT_ALARM_FIRED        = 0,
-    OT_SIM_EVENT_RADIO_RECEIVED     = 1,
-    OT_SIM_EVENT_UART_WRITE         = 2,
-    OT_SIM_EVENT_RADIO_SPINEL_WRITE = 3,
-    OT_SIM_EVENT_OTNS_STATUS_PUSH   = 5,
-    OT_EVENT_DATA_MAX_SIZE          = 1024,
-};
-
-OT_TOOL_PACKED_BEGIN
-struct Event
-{
-    uint64_t mDelay;
-    uint8_t  mEvent;
-    uint16_t mDataLength;
-    uint8_t  mData[OT_EVENT_DATA_MAX_SIZE];
-} OT_TOOL_PACKED_END;
-
-enum
-{
-    MAX_NETWORK_SIZE = OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE,
-};
-
-/**
- * Unique node ID.
- *
- */
-extern uint32_t gNodeId;
-
-/**
- * This function initializes the alarm service used by OpenThread.
- *
- */
-void platformAlarmInit(uint32_t aSpeedUpFactor);
-
-/**
- * This function retrieves the time remaining until the alarm fires.
- *
- * @param[out]  aTimeout  A pointer to the timeval struct.
- *
- */
-void platformAlarmUpdateTimeout(struct timeval *aTimeout);
-
-/**
- * This function performs alarm driver processing.
- *
- * @param[in]  aInstance  The OpenThread instance structure.
- *
- */
-void platformAlarmProcess(otInstance *aInstance);
-
-/**
- * This function returns the duration to the next alarm event time (in micro seconds)
- *
- * @returns The duration (in micro seconds) to the next alarm event.
- *
- */
-uint64_t platformAlarmGetNext(void);
-
-/**
- * This function returns the current alarm time.
- *
- * @returns The current alarm time.
- *
- */
-uint64_t platformAlarmGetNow(void);
-
-/**
- * This function advances the alarm time by @p aDelta.
- *
- * @param[in]  aDelta  The amount of time to advance.
- *
- */
-void platformAlarmAdvanceNow(uint64_t aDelta);
-
-/**
- * This function initializes the radio service used by OpenThread.
- *
- */
-void platformRadioInit(void);
-
-/**
- * This function shuts down the radio service used by OpenThread.
- *
- */
-void platformRadioDeinit(void);
-
-/**
- * This function inputs a received radio frame.
- *
- * @param[in]  aInstance   A pointer to the OpenThread instance.
- * @param[in]  aBuf        A pointer to the received radio frame.
- * @param[in]  aBufLength  The size of the received radio frame.
- *
- */
-void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLength);
-
-/**
- * This function updates the file descriptor sets with file descriptors used by the radio driver.
- *
- * @param[in,out]  aReadFdSet   A pointer to the read file descriptors.
- * @param[in,out]  aWriteFdSet  A pointer to the write file descriptors.
- * @param[in,out]  aMaxFd       A pointer to the max file descriptor.
- *
- */
-void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd);
-
-/**
- * This function performs radio driver processing.
- *
- * @param[in]  aInstance    The OpenThread instance structure.
- * @param[in]  aReadFdSet   A pointer to the read file descriptors.
- * @param[in]  aWriteFdSet  A pointer to the write file descriptors.
- *
- */
-void platformRadioProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet);
-
-/**
- * This function initializes the random number service used by OpenThread.
- *
- */
-void platformRandomInit(void);
-
-/**
- * This function updates the file descriptor sets with file descriptors used by the UART driver.
- *
- * @param[in,out]  aReadFdSet   A pointer to the read file descriptors.
- * @param[in,out]  aWriteFdSet  A pointer to the write file descriptors.
- * @param[in,out]  aMaxFd       A pointer to the max file descriptor.
- *
- */
-void platformUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aErrorFdSet, int *aMaxFd);
-
-/**
- * This function performs radio driver processing.
- *
- */
-void platformUartProcess(void);
-
-/**
- * This function restores the Uart.
- *
- */
-void platformUartRestore(void);
-
-/**
- * This function sends a simulation event.
- *
- * @param[in]   aEvent  A pointer to the simulation event to send
- *
- */
-void otSimSendEvent(const struct Event *aEvent);
-
-/**
- * This function sends Uart data through simulation.
- *
- * @param[in]   aData       A pointer to the UART data.
- * @param[in]   aLength     Length of UART data.
- *
- */
-void otSimSendUartWriteEvent(const uint8_t *aData, uint16_t aLength);
-
-/**
- * This function checks if radio transmitting is pending.
- *
- * @returns Whether radio transmitting is pending.
- *
- */
-bool platformRadioIsTransmitPending(void);
-
-#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-
-/**
- * This function initializes the TREL service.
- *
- * @param[in] aSpeedUpFactor   The time speed-up factor.
- *
- */
-void platformTrelInit(uint32_t aSpeedUpFactor);
-
-/**
- * This function shuts down the TREL service.
- *
- */
-void platformTrelDeinit(void);
-
-/**
- * This function updates the file descriptor sets with file descriptors used by the TREL.
- *
- * @param[in,out]  aReadFdSet   A pointer to the read file descriptors.
- * @param[in,out]  aWriteFdSet  A pointer to the write file descriptors.
- * @param[in,out]  aTimeout     A pointer to the timeout.
- * @param[in,out]  aMaxFd       A pointer to the max file descriptor.
- *
- */
-void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd);
-
-/**
- * This function performs TREL processing.
- *
- * @param[in]  aInstance    The OpenThread instance structure.
- * @param[in]  aReadFdSet   A pointer to the read file descriptors.
- * @param[in]  aWriteFdSet  A pointer to the write file descriptors.
- *
- */
-void platformTrelProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet);
-
-#endif // OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-
-#endif // PLATFORM_SIMULATION_H_
diff --git a/examples/platforms/simulation/radio.c b/examples/platforms/simulation/radio.c
deleted file mode 100644
index 2faaa2f..0000000
--- a/examples/platforms/simulation/radio.c
+++ /dev/null
@@ -1,1272 +0,0 @@
-/*
- *  Copyright (c) 2016-2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <errno.h>
-
-#include <openthread/dataset.h>
-#include <openthread/link.h>
-#include <openthread/random_noncrypto.h>
-#include <openthread/platform/alarm-micro.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/diag.h>
-#include <openthread/platform/radio.h>
-#include <openthread/platform/time.h>
-
-#include "utils/code_utils.h"
-#include "utils/link_metrics.h"
-#include "utils/mac_frame.h"
-#include "utils/soft_source_match_table.h"
-
-// The IPv4 group for receiving packets of radio simulation
-#define OT_RADIO_GROUP "224.0.0.116"
-
-enum
-{
-    IEEE802154_ACK_LENGTH = 5,
-
-    IEEE802154_FRAME_TYPE_ACK = 2 << 0,
-
-    IEEE802154_FRAME_PENDING = 1 << 4,
-};
-
-enum
-{
-    SIM_RECEIVE_SENSITIVITY = -100, // dBm
-
-    SIM_HIGH_RSSI_SAMPLE               = -30, // dBm
-    SIM_LOW_RSSI_SAMPLE                = -98, // dBm
-    SIM_HIGH_RSSI_PROB_INC_PER_CHANNEL = 5,
-};
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME
-extern int      sSockFd;
-extern uint16_t sPortOffset;
-#else
-static int      sTxFd       = -1;
-static int      sRxFd       = -1;
-static uint16_t sPortOffset = 0;
-static uint16_t sPort       = 0;
-#endif
-
-enum
-{
-    SIM_RADIO_CHANNEL_MIN = OT_RADIO_2P4GHZ_OQPSK_CHANNEL_MIN,
-    SIM_RADIO_CHANNEL_MAX = OT_RADIO_2P4GHZ_OQPSK_CHANNEL_MAX,
-};
-
-OT_TOOL_PACKED_BEGIN
-struct RadioMessage
-{
-    uint8_t mChannel;
-    uint8_t mPsdu[OT_RADIO_FRAME_MAX_SIZE];
-} OT_TOOL_PACKED_END;
-
-static void radioTransmit(struct RadioMessage *aMessage, const struct otRadioFrame *aFrame);
-static void radioSendMessage(otInstance *aInstance);
-static void radioSendAck(void);
-static void radioProcessFrame(otInstance *aInstance);
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-static uint8_t generateAckIeData(uint8_t *aLinkMetricsIeData, uint8_t aLinkMetricsIeDataLen);
-#endif
-
-static otRadioState        sState = OT_RADIO_STATE_DISABLED;
-static struct RadioMessage sReceiveMessage;
-static struct RadioMessage sTransmitMessage;
-static struct RadioMessage sAckMessage;
-static otRadioFrame        sReceiveFrame;
-static otRadioFrame        sTransmitFrame;
-static otRadioFrame        sAckFrame;
-
-#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
-static otRadioIeInfo sTransmitIeInfo;
-#endif
-
-static otExtAddress   sExtAddress;
-static otShortAddress sShortAddress;
-static otPanId        sPanid;
-static bool           sPromiscuous = false;
-static bool           sTxWait      = false;
-static int8_t         sTxPower     = 0;
-static int8_t         sCcaEdThresh = -74;
-static int8_t         sLnaGain     = 0;
-static uint16_t       sRegionCode  = 0;
-
-enum
-{
-    kMinChannel = 11,
-    kMaxChannel = 26,
-};
-static int8_t  sChannelMaxTransmitPower[kMaxChannel - kMinChannel + 1];
-static uint8_t sCurrentChannel = kMinChannel;
-
-static bool sSrcMatchEnabled = false;
-
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-static uint8_t sAckIeData[OT_ACK_IE_MAX_SIZE];
-static uint8_t sAckIeDataLength = 0;
-#endif
-
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-static uint32_t sCslSampleTime;
-static uint32_t sCslPeriod;
-#endif
-
-#if OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
-static bool sRadioCoexEnabled = true;
-#endif
-
-otRadioCaps gRadioCaps =
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-    OT_RADIO_CAPS_TRANSMIT_SEC;
-#else
-    OT_RADIO_CAPS_NONE;
-#endif
-
-static uint32_t         sMacFrameCounter;
-static uint8_t          sKeyId;
-static otMacKeyMaterial sPrevKey;
-static otMacKeyMaterial sCurrKey;
-static otMacKeyMaterial sNextKey;
-static otRadioKeyType   sKeyType;
-
-static void ReverseExtAddress(otExtAddress *aReversed, const otExtAddress *aOrigin)
-{
-    for (size_t i = 0; i < sizeof(*aReversed); i++)
-    {
-        aReversed->m8[i] = aOrigin->m8[sizeof(*aOrigin) - 1 - i];
-    }
-}
-
-static bool hasFramePending(const otRadioFrame *aFrame)
-{
-    bool         rval = false;
-    otMacAddress src;
-
-    otEXPECT_ACTION(sSrcMatchEnabled, rval = true);
-    otEXPECT(otMacFrameGetSrcAddr(aFrame, &src) == OT_ERROR_NONE);
-
-    switch (src.mType)
-    {
-    case OT_MAC_ADDRESS_TYPE_SHORT:
-        rval = utilsSoftSrcMatchShortFindEntry(src.mAddress.mShortAddress) >= 0;
-        break;
-    case OT_MAC_ADDRESS_TYPE_EXTENDED:
-    {
-        otExtAddress extAddr;
-
-        ReverseExtAddress(&extAddr, &src.mAddress.mExtAddress);
-        rval = utilsSoftSrcMatchExtFindEntry(&extAddr) >= 0;
-        break;
-    }
-    default:
-        break;
-    }
-
-exit:
-    return rval;
-}
-
-static uint16_t crc16_citt(uint16_t aFcs, uint8_t aByte)
-{
-    // CRC-16/CCITT, CRC-16/CCITT-TRUE, CRC-CCITT
-    // width=16 poly=0x1021 init=0x0000 refin=true refout=true xorout=0x0000 check=0x2189 name="KERMIT"
-    // http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat.kermit
-    static const uint16_t sFcsTable[256] = {
-        0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5,
-        0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9, 0x8d40, 0xbfdb, 0xae52,
-        0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a, 0xbcc3,
-        0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
-        0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9,
-        0x2732, 0x36bb, 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285, 0x430c, 0x7197, 0x601e,
-        0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306, 0x728f,
-        0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
-        0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862,
-        0x9af9, 0x8b70, 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840, 0x19c9, 0x2b52, 0x3adb,
-        0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1, 0x0948,
-        0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
-        0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226,
-        0xd0bd, 0xc134, 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c, 0xd785, 0xe51e, 0xf497,
-        0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d, 0xc704,
-        0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
-        0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb,
-        0x0e70, 0x1ff9, 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c,
-        0x3de3, 0x2c6a, 0x1ef1, 0x0f78};
-    return (aFcs >> 8) ^ sFcsTable[(aFcs ^ aByte) & 0xff];
-}
-
-void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    aIeeeEui64[0] = 0x18;
-    aIeeeEui64[1] = 0xb4;
-    aIeeeEui64[2] = 0x30;
-    aIeeeEui64[3] = 0x00;
-    aIeeeEui64[4] = (gNodeId >> 24) & 0xff;
-    aIeeeEui64[5] = (gNodeId >> 16) & 0xff;
-    aIeeeEui64[6] = (gNodeId >> 8) & 0xff;
-    aIeeeEui64[7] = gNodeId & 0xff;
-}
-
-void otPlatRadioSetPanId(otInstance *aInstance, otPanId aPanid)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sPanid = aPanid;
-    utilsSoftSrcMatchSetPanId(aPanid);
-}
-
-void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    ReverseExtAddress(&sExtAddress, aExtAddress);
-}
-
-void otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sShortAddress = aShortAddress;
-}
-
-void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sPromiscuous = aEnable;
-}
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-static void initFds(void)
-{
-    int                fd;
-    int                one = 1;
-    struct sockaddr_in sockaddr;
-
-    memset(&sockaddr, 0, sizeof(sockaddr));
-
-    otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sTxFd)"));
-
-    sPort                    = (uint16_t)(9000 + sPortOffset + gNodeId);
-    sockaddr.sin_family      = AF_INET;
-    sockaddr.sin_port        = htons(sPort);
-    sockaddr.sin_addr.s_addr = inet_addr("127.0.0.1");
-
-    otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &sockaddr.sin_addr, sizeof(sockaddr.sin_addr)) != -1,
-                    perror("setsockopt(sTxFd, IP_MULTICAST_IF)"));
-
-    otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof(one)) != -1,
-                    perror("setsockopt(sRxFd, IP_MULTICAST_LOOP)"));
-
-    otEXPECT_ACTION(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) != -1, perror("bind(sTxFd)"));
-
-    // Tx fd is successfully initialized.
-    sTxFd = fd;
-
-    otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sRxFd)"));
-
-    otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) != -1,
-                    perror("setsockopt(sRxFd, SO_REUSEADDR)"));
-    otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != -1,
-                    perror("setsockopt(sRxFd, SO_REUSEPORT)"));
-
-    {
-        struct ip_mreqn mreq;
-
-        memset(&mreq, 0, sizeof(mreq));
-        inet_pton(AF_INET, OT_RADIO_GROUP, &mreq.imr_multiaddr);
-
-        // Always use loopback device to send simulation packets.
-        mreq.imr_address.s_addr = inet_addr("127.0.0.1");
-
-        otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &mreq.imr_address, sizeof(mreq.imr_address)) != -1,
-                        perror("setsockopt(sRxFd, IP_MULTICAST_IF)"));
-        otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) != -1,
-                        perror("setsockopt(sRxFd, IP_ADD_MEMBERSHIP)"));
-    }
-
-    sockaddr.sin_family      = AF_INET;
-    sockaddr.sin_port        = htons((uint16_t)(9000 + sPortOffset));
-    sockaddr.sin_addr.s_addr = inet_addr(OT_RADIO_GROUP);
-
-    otEXPECT_ACTION(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) != -1, perror("bind(sRxFd)"));
-
-    // Rx fd is successfully initialized.
-    sRxFd = fd;
-
-exit:
-    if (sRxFd == -1 || sTxFd == -1)
-    {
-        exit(EXIT_FAILURE);
-    }
-}
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-
-void platformRadioInit(void)
-{
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-    char *offset;
-
-    offset = getenv("PORT_OFFSET");
-
-    if (offset)
-    {
-        char *endptr;
-
-        sPortOffset = (uint16_t)strtol(offset, &endptr, 0);
-
-        if (*endptr != '\0')
-        {
-            fprintf(stderr, "Invalid PORT_OFFSET: %s\n", offset);
-            exit(EXIT_FAILURE);
-        }
-
-        sPortOffset *= (MAX_NETWORK_SIZE + 1);
-    }
-
-    initFds();
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-
-    sReceiveFrame.mPsdu  = sReceiveMessage.mPsdu;
-    sTransmitFrame.mPsdu = sTransmitMessage.mPsdu;
-    sAckFrame.mPsdu      = sAckMessage.mPsdu;
-
-#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT
-    sTransmitFrame.mInfo.mTxInfo.mIeInfo = &sTransmitIeInfo;
-#else
-    sTransmitFrame.mInfo.mTxInfo.mIeInfo = NULL;
-#endif
-
-    for (size_t i = 0; i <= kMaxChannel - kMinChannel; i++)
-    {
-        sChannelMaxTransmitPower[i] = OT_RADIO_POWER_INVALID;
-    }
-
-#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
-    otLinkMetricsInit(SIM_RECEIVE_SENSITIVITY);
-#endif
-}
-
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-static uint16_t getCslPhase(void)
-{
-    uint32_t curTime       = otPlatAlarmMicroGetNow();
-    uint32_t cslPeriodInUs = sCslPeriod * OT_US_PER_TEN_SYMBOLS;
-    uint32_t diff = ((sCslSampleTime % cslPeriodInUs) - (curTime % cslPeriodInUs) + cslPeriodInUs) % cslPeriodInUs;
-
-    return (uint16_t)(diff / OT_US_PER_TEN_SYMBOLS);
-}
-#endif
-
-bool otPlatRadioIsEnabled(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return (sState != OT_RADIO_STATE_DISABLED) ? true : false;
-}
-
-otError otPlatRadioEnable(otInstance *aInstance)
-{
-    if (!otPlatRadioIsEnabled(aInstance))
-    {
-        sState = OT_RADIO_STATE_SLEEP;
-    }
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioDisable(otInstance *aInstance)
-{
-    otError error = OT_ERROR_NONE;
-
-    otEXPECT(otPlatRadioIsEnabled(aInstance));
-    otEXPECT_ACTION(sState == OT_RADIO_STATE_SLEEP, error = OT_ERROR_INVALID_STATE);
-
-    sState = OT_RADIO_STATE_DISABLED;
-
-exit:
-    return error;
-}
-
-otError otPlatRadioSleep(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    otError error = OT_ERROR_INVALID_STATE;
-
-    if (sState == OT_RADIO_STATE_SLEEP || sState == OT_RADIO_STATE_RECEIVE)
-    {
-        error  = OT_ERROR_NONE;
-        sState = OT_RADIO_STATE_SLEEP;
-    }
-
-    return error;
-}
-
-otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    otError error = OT_ERROR_INVALID_STATE;
-
-    if (sState != OT_RADIO_STATE_DISABLED)
-    {
-        error                  = OT_ERROR_NONE;
-        sState                 = OT_RADIO_STATE_RECEIVE;
-        sTxWait                = false;
-        sReceiveFrame.mChannel = aChannel;
-        sCurrentChannel        = aChannel;
-    }
-
-    return error;
-}
-
-otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aFrame);
-
-    assert(aInstance != NULL);
-    assert(aFrame != NULL);
-
-    otError error = OT_ERROR_INVALID_STATE;
-
-    if (sState == OT_RADIO_STATE_RECEIVE)
-    {
-        error           = OT_ERROR_NONE;
-        sState          = OT_RADIO_STATE_TRANSMIT;
-        sCurrentChannel = aFrame->mChannel;
-    }
-
-    return error;
-}
-
-otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    return &sTransmitFrame;
-}
-
-int8_t otPlatRadioGetRssi(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    int8_t   rssi    = SIM_LOW_RSSI_SAMPLE;
-    uint8_t  channel = sReceiveFrame.mChannel;
-    uint32_t probabilityThreshold;
-
-    otEXPECT((SIM_RADIO_CHANNEL_MIN <= channel) && channel <= (SIM_RADIO_CHANNEL_MAX));
-
-    // To emulate a simple interference model, we return either a high or
-    // a low  RSSI value with a fixed probability per each channel. The
-    // probability is increased per channel by a constant.
-
-    probabilityThreshold = (channel - SIM_RADIO_CHANNEL_MIN) * SIM_HIGH_RSSI_PROB_INC_PER_CHANNEL;
-
-    if (otRandomNonCryptoGetUint16() < (probabilityThreshold * 0xffff / 100))
-    {
-        rssi = SIM_HIGH_RSSI_SAMPLE;
-    }
-
-exit:
-    return rssi;
-}
-
-otRadioCaps otPlatRadioGetCaps(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    return gRadioCaps;
-}
-
-bool otPlatRadioGetPromiscuous(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    return sPromiscuous;
-}
-
-static void radioReceive(otInstance *aInstance)
-{
-    bool isTxDone = false;
-    bool isAck    = otMacFrameIsAck(&sReceiveFrame);
-
-    otEXPECT(sReceiveFrame.mChannel == sReceiveMessage.mChannel);
-    otEXPECT(sState == OT_RADIO_STATE_RECEIVE || sState == OT_RADIO_STATE_TRANSMIT);
-
-    // Unable to simulate SFD, so use the rx done timestamp instead.
-    sReceiveFrame.mInfo.mRxInfo.mTimestamp = otPlatTimeGet();
-
-    if (sTxWait)
-    {
-        if (otMacFrameIsAckRequested(&sTransmitFrame))
-        {
-            isTxDone = isAck && otMacFrameGetSequence(&sReceiveFrame) == otMacFrameGetSequence(&sTransmitFrame);
-        }
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME
-        // Simulate tx done when receiving the echo frame.
-        else
-        {
-            isTxDone = !isAck && sTransmitFrame.mLength == sReceiveFrame.mLength &&
-                       memcmp(sTransmitFrame.mPsdu, sReceiveFrame.mPsdu, sTransmitFrame.mLength) == 0;
-        }
-#endif
-    }
-
-    if (isTxDone)
-    {
-        sState  = OT_RADIO_STATE_RECEIVE;
-        sTxWait = false;
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-        if (otPlatDiagModeGet())
-        {
-            otPlatDiagRadioTransmitDone(aInstance, &sTransmitFrame, OT_ERROR_NONE);
-        }
-        else
-#endif
-        {
-            otPlatRadioTxDone(aInstance, &sTransmitFrame, (isAck ? &sReceiveFrame : NULL), OT_ERROR_NONE);
-        }
-    }
-    else if (!isAck || sPromiscuous)
-    {
-        radioProcessFrame(aInstance);
-    }
-
-exit:
-    return;
-}
-
-static void radioComputeCrc(struct RadioMessage *aMessage, uint16_t aLength)
-{
-    uint16_t crc        = 0;
-    uint16_t crc_offset = aLength - sizeof(uint16_t);
-
-    for (uint16_t i = 0; i < crc_offset; i++)
-    {
-        crc = crc16_citt(crc, aMessage->mPsdu[i]);
-    }
-
-    aMessage->mPsdu[crc_offset]     = crc & 0xff;
-    aMessage->mPsdu[crc_offset + 1] = crc >> 8;
-}
-
-static otError radioProcessTransmitSecurity(otRadioFrame *aFrame)
-{
-    otError error = OT_ERROR_NONE;
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-    otMacKeyMaterial *key = NULL;
-    uint8_t           keyId;
-
-    otEXPECT(otMacFrameIsSecurityEnabled(aFrame) && otMacFrameIsKeyIdMode1(aFrame) &&
-             !aFrame->mInfo.mTxInfo.mIsSecurityProcessed);
-
-    if (otMacFrameIsAck(aFrame))
-    {
-        keyId = otMacFrameGetKeyId(aFrame);
-
-        otEXPECT_ACTION(keyId != 0, error = OT_ERROR_FAILED);
-
-        if (keyId == sKeyId)
-        {
-            key = &sCurrKey;
-        }
-        else if (keyId == sKeyId - 1)
-        {
-            key = &sPrevKey;
-        }
-        else if (keyId == sKeyId + 1)
-        {
-            key = &sNextKey;
-        }
-        else
-        {
-            error = OT_ERROR_SECURITY;
-            otEXPECT(false);
-        }
-    }
-    else
-    {
-        key   = &sCurrKey;
-        keyId = sKeyId;
-    }
-
-    aFrame->mInfo.mTxInfo.mAesKey = key;
-
-    if (!aFrame->mInfo.mTxInfo.mIsHeaderUpdated)
-    {
-        otMacFrameSetKeyId(aFrame, keyId);
-        otMacFrameSetFrameCounter(aFrame, sMacFrameCounter++);
-    }
-#else
-    otEXPECT(!aFrame->mInfo.mTxInfo.mIsSecurityProcessed);
-#endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-
-    otMacFrameProcessTransmitAesCcm(aFrame, &sExtAddress);
-
-exit:
-    return error;
-}
-
-void radioSendMessage(otInstance *aInstance)
-{
-#if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT && OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
-    if (sTransmitFrame.mInfo.mTxInfo.mIeInfo->mTimeIeOffset != 0)
-    {
-        uint8_t *timeIe = sTransmitFrame.mPsdu + sTransmitFrame.mInfo.mTxInfo.mIeInfo->mTimeIeOffset;
-        uint64_t time = (uint64_t)((int64_t)otPlatTimeGet() + sTransmitFrame.mInfo.mTxInfo.mIeInfo->mNetworkTimeOffset);
-
-        *timeIe = sTransmitFrame.mInfo.mTxInfo.mIeInfo->mTimeSyncSeq;
-
-        *(++timeIe) = (uint8_t)(time & 0xff);
-        for (uint8_t i = 1; i < sizeof(uint64_t); i++)
-        {
-            time        = time >> 8;
-            *(++timeIe) = (uint8_t)(time & 0xff);
-        }
-    }
-#endif // OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT && OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
-
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-    if (sCslPeriod > 0 && !sTransmitFrame.mInfo.mTxInfo.mIsHeaderUpdated)
-    {
-        otMacFrameSetCslIe(&sTransmitFrame, (uint16_t)sCslPeriod, getCslPhase());
-    }
-#endif
-
-    sTransmitMessage.mChannel = sTransmitFrame.mChannel;
-
-    otEXPECT(radioProcessTransmitSecurity(&sTransmitFrame) == OT_ERROR_NONE);
-    otPlatRadioTxStarted(aInstance, &sTransmitFrame);
-    radioComputeCrc(&sTransmitMessage, sTransmitFrame.mLength);
-    radioTransmit(&sTransmitMessage, &sTransmitFrame);
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-    sTxWait = otMacFrameIsAckRequested(&sTransmitFrame);
-
-    if (!sTxWait)
-    {
-        sState = OT_RADIO_STATE_RECEIVE;
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-        if (otPlatDiagModeGet())
-        {
-            otPlatDiagRadioTransmitDone(aInstance, &sTransmitFrame, OT_ERROR_NONE);
-        }
-        else
-#endif
-        {
-            otPlatRadioTxDone(aInstance, &sTransmitFrame, NULL, OT_ERROR_NONE);
-        }
-    }
-#else
-    // Wait for echo radio in virtual time mode.
-    sTxWait = true;
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME
-exit:
-    return;
-}
-
-bool platformRadioIsTransmitPending(void)
-{
-    return sState == OT_RADIO_STATE_TRANSMIT && !sTxWait;
-}
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME
-void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLength)
-{
-    assert(sizeof(sReceiveMessage) >= aBufLength);
-
-    memcpy(&sReceiveMessage, aBuf, aBufLength);
-
-    sReceiveFrame.mLength = (uint8_t)(aBufLength - 1);
-
-    radioReceive(aInstance);
-}
-#else
-void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd)
-{
-    if (aReadFdSet != NULL && (sState != OT_RADIO_STATE_TRANSMIT || sTxWait))
-    {
-        FD_SET(sRxFd, aReadFdSet);
-
-        if (aMaxFd != NULL && *aMaxFd < sRxFd)
-        {
-            *aMaxFd = sRxFd;
-        }
-    }
-
-    if (aWriteFdSet != NULL && platformRadioIsTransmitPending())
-    {
-        FD_SET(sTxFd, aWriteFdSet);
-
-        if (aMaxFd != NULL && *aMaxFd < sTxFd)
-        {
-            *aMaxFd = sTxFd;
-        }
-    }
-}
-
-// no need to close in virtual time mode.
-void platformRadioDeinit(void)
-{
-    if (sRxFd != -1)
-    {
-        close(sRxFd);
-    }
-
-    if (sTxFd != -1)
-    {
-        close(sTxFd);
-    }
-}
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME
-
-void platformRadioProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet)
-{
-    OT_UNUSED_VARIABLE(aReadFdSet);
-    OT_UNUSED_VARIABLE(aWriteFdSet);
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-    if (FD_ISSET(sRxFd, aReadFdSet))
-    {
-        struct sockaddr_in sockaddr;
-        socklen_t          len = sizeof(sockaddr);
-        ssize_t            rval;
-
-        memset(&sockaddr, 0, sizeof(sockaddr));
-        rval =
-            recvfrom(sRxFd, (char *)&sReceiveMessage, sizeof(sReceiveMessage), 0, (struct sockaddr *)&sockaddr, &len);
-
-        if (rval > 0)
-        {
-            if (sockaddr.sin_port != htons(sPort))
-            {
-                sReceiveFrame.mLength = (uint16_t)(rval - 1);
-
-                radioReceive(aInstance);
-            }
-        }
-        else if (rval == 0)
-        {
-            // socket is closed, which should not happen
-            assert(false);
-        }
-        else if (errno != EINTR && errno != EAGAIN)
-        {
-            perror("recvfrom(sRxFd)");
-            exit(EXIT_FAILURE);
-        }
-    }
-#endif
-
-    if (platformRadioIsTransmitPending())
-    {
-        radioSendMessage(aInstance);
-    }
-}
-
-void radioTransmit(struct RadioMessage *aMessage, const struct otRadioFrame *aFrame)
-{
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-    ssize_t            rval;
-    struct sockaddr_in sockaddr;
-
-    memset(&sockaddr, 0, sizeof(sockaddr));
-    sockaddr.sin_family = AF_INET;
-    inet_pton(AF_INET, OT_RADIO_GROUP, &sockaddr.sin_addr);
-
-    sockaddr.sin_port = htons((uint16_t)(9000 + sPortOffset));
-    rval =
-        sendto(sTxFd, (const char *)aMessage, 1 + aFrame->mLength, 0, (struct sockaddr *)&sockaddr, sizeof(sockaddr));
-
-    if (rval < 0)
-    {
-        perror("sendto(sTxFd)");
-        exit(EXIT_FAILURE);
-    }
-#else  // OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-    struct Event event;
-
-    event.mDelay      = 1; // 1us for now
-    event.mEvent      = OT_SIM_EVENT_RADIO_RECEIVED;
-    event.mDataLength = 1 + aFrame->mLength; // include channel in first byte
-    memcpy(event.mData, aMessage, event.mDataLength);
-
-    otSimSendEvent(&event);
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-}
-
-void radioSendAck(void)
-{
-    if (
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-        // Determine if frame pending should be set
-        ((otMacFrameIsVersion2015(&sReceiveFrame) && otMacFrameIsCommand(&sReceiveFrame)) ||
-         otMacFrameIsData(&sReceiveFrame) || otMacFrameIsDataRequest(&sReceiveFrame))
-#else
-        otMacFrameIsDataRequest(&sReceiveFrame)
-#endif
-        && hasFramePending(&sReceiveFrame))
-    {
-        sReceiveFrame.mInfo.mRxInfo.mAckedWithFramePending = true;
-    }
-
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-    // Use enh-ack for 802.15.4-2015 frames
-    if (otMacFrameIsVersion2015(&sReceiveFrame))
-    {
-        uint8_t  linkMetricsDataLen = 0;
-        uint8_t *dataPtr            = NULL;
-
-#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
-        uint8_t      linkMetricsData[OT_ENH_PROBING_IE_DATA_MAX_SIZE];
-        otMacAddress macAddress;
-
-        otEXPECT(otMacFrameGetSrcAddr(&sReceiveFrame, &macAddress) == OT_ERROR_NONE);
-
-        linkMetricsDataLen = otLinkMetricsEnhAckGenData(&macAddress, sReceiveFrame.mInfo.mRxInfo.mLqi,
-                                                        sReceiveFrame.mInfo.mRxInfo.mRssi, linkMetricsData);
-
-        if (linkMetricsDataLen > 0)
-        {
-            dataPtr = linkMetricsData;
-        }
-#endif
-
-        sAckIeDataLength = generateAckIeData(dataPtr, linkMetricsDataLen);
-
-        otEXPECT(otMacFrameGenerateEnhAck(&sReceiveFrame, sReceiveFrame.mInfo.mRxInfo.mAckedWithFramePending,
-                                          sAckIeData, sAckIeDataLength, &sAckFrame) == OT_ERROR_NONE);
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-        if (sCslPeriod > 0)
-        {
-            otMacFrameSetCslIe(&sAckFrame, (uint16_t)sCslPeriod, getCslPhase());
-        }
-#endif
-        if (otMacFrameIsSecurityEnabled(&sAckFrame))
-        {
-            otEXPECT(radioProcessTransmitSecurity(&sAckFrame) == OT_ERROR_NONE);
-        }
-    }
-    else
-#endif
-    {
-        otMacFrameGenerateImmAck(&sReceiveFrame, sReceiveFrame.mInfo.mRxInfo.mAckedWithFramePending, &sAckFrame);
-    }
-
-    sAckMessage.mChannel = sReceiveFrame.mChannel;
-
-    radioComputeCrc(&sAckMessage, sAckFrame.mLength);
-    radioTransmit(&sAckMessage, &sAckFrame);
-
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-exit:
-#endif
-    return;
-}
-
-void radioProcessFrame(otInstance *aInstance)
-{
-    otError      error = OT_ERROR_NONE;
-    otMacAddress macAddress;
-    OT_UNUSED_VARIABLE(macAddress);
-
-    sReceiveFrame.mInfo.mRxInfo.mRssi = -20;
-    sReceiveFrame.mInfo.mRxInfo.mLqi  = OT_RADIO_LQI_NONE;
-
-    sReceiveFrame.mInfo.mRxInfo.mAckedWithFramePending = false;
-    sReceiveFrame.mInfo.mRxInfo.mAckedWithSecEnhAck    = false;
-
-    otEXPECT(sPromiscuous == false);
-
-    otEXPECT_ACTION(otMacFrameDoesAddrMatch(&sReceiveFrame, sPanid, sShortAddress, &sExtAddress),
-                    error = OT_ERROR_ABORT);
-
-#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
-    otEXPECT_ACTION(otMacFrameGetSrcAddr(&sReceiveFrame, &macAddress) == OT_ERROR_NONE, error = OT_ERROR_PARSE);
-#endif
-
-    // generate acknowledgment
-    if (otMacFrameIsAckRequested(&sReceiveFrame))
-    {
-        radioSendAck();
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-        if (otMacFrameIsSecurityEnabled(&sAckFrame))
-        {
-            sReceiveFrame.mInfo.mRxInfo.mAckedWithSecEnhAck = true;
-            sReceiveFrame.mInfo.mRxInfo.mAckFrameCounter    = otMacFrameGetFrameCounter(&sAckFrame);
-        }
-#endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-    }
-
-exit:
-
-    if (error != OT_ERROR_ABORT)
-    {
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-        if (otPlatDiagModeGet())
-        {
-            otPlatDiagRadioReceiveDone(aInstance, error == OT_ERROR_NONE ? &sReceiveFrame : NULL, error);
-        }
-        else
-#endif
-        {
-            otPlatRadioReceiveDone(aInstance, error == OT_ERROR_NONE ? &sReceiveFrame : NULL, error);
-        }
-    }
-}
-
-void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sSrcMatchEnabled = aEnable;
-}
-
-otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aScanChannel);
-    OT_UNUSED_VARIABLE(aScanDuration);
-
-    assert(aInstance != NULL);
-    assert(aScanChannel >= SIM_RADIO_CHANNEL_MIN && aScanChannel <= SIM_RADIO_CHANNEL_MAX);
-    assert(aScanDuration > 0);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    int8_t maxPower = sChannelMaxTransmitPower[sCurrentChannel - kMinChannel];
-
-    assert(aInstance != NULL);
-
-    *aPower = sTxPower < maxPower ? sTxPower : maxPower;
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sTxPower = aPower;
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aThreshold)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    *aThreshold = sCcaEdThresh;
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aThreshold)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sCcaEdThresh = aThreshold;
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioGetFemLnaGain(otInstance *aInstance, int8_t *aGain)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL && aGain != NULL);
-
-    *aGain = sLnaGain;
-
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioSetFemLnaGain(otInstance *aInstance, int8_t aGain)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sLnaGain = aGain;
-
-    return OT_ERROR_NONE;
-}
-
-int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    return SIM_RECEIVE_SENSITIVITY;
-}
-
-otRadioState otPlatRadioGetState(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return sState;
-}
-
-#if OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
-otError otPlatRadioSetCoexEnabled(otInstance *aInstance, bool aEnabled)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    sRadioCoexEnabled = aEnabled;
-    return OT_ERROR_NONE;
-}
-
-bool otPlatRadioIsCoexEnabled(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aInstance != NULL);
-
-    return sRadioCoexEnabled;
-}
-
-otError otPlatRadioGetCoexMetrics(otInstance *aInstance, otRadioCoexMetrics *aCoexMetrics)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-
-    assert(aInstance != NULL);
-    otEXPECT_ACTION(aCoexMetrics != NULL, error = OT_ERROR_INVALID_ARGS);
-
-    memset(aCoexMetrics, 0, sizeof(otRadioCoexMetrics));
-
-    aCoexMetrics->mStopped                            = false;
-    aCoexMetrics->mNumGrantGlitch                     = 1;
-    aCoexMetrics->mNumTxRequest                       = 2;
-    aCoexMetrics->mNumTxGrantImmediate                = 3;
-    aCoexMetrics->mNumTxGrantWait                     = 4;
-    aCoexMetrics->mNumTxGrantWaitActivated            = 5;
-    aCoexMetrics->mNumTxGrantWaitTimeout              = 6;
-    aCoexMetrics->mNumTxGrantDeactivatedDuringRequest = 7;
-    aCoexMetrics->mNumTxDelayedGrant                  = 8;
-    aCoexMetrics->mAvgTxRequestToGrantTime            = 9;
-    aCoexMetrics->mNumRxRequest                       = 10;
-    aCoexMetrics->mNumRxGrantImmediate                = 11;
-    aCoexMetrics->mNumRxGrantWait                     = 12;
-    aCoexMetrics->mNumRxGrantWaitActivated            = 13;
-    aCoexMetrics->mNumRxGrantWaitTimeout              = 14;
-    aCoexMetrics->mNumRxGrantDeactivatedDuringRequest = 15;
-    aCoexMetrics->mNumRxDelayedGrant                  = 16;
-    aCoexMetrics->mAvgRxRequestToGrantTime            = 17;
-    aCoexMetrics->mNumRxGrantNone                     = 18;
-
-exit:
-    return error;
-}
-#endif
-
-uint64_t otPlatRadioGetNow(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return otPlatTimeGet();
-}
-
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-static uint8_t generateAckIeData(uint8_t *aLinkMetricsIeData, uint8_t aLinkMetricsIeDataLen)
-{
-    OT_UNUSED_VARIABLE(aLinkMetricsIeData);
-    OT_UNUSED_VARIABLE(aLinkMetricsIeDataLen);
-
-    uint8_t offset = 0;
-
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-    if (sCslPeriod > 0)
-    {
-        offset += otMacFrameGenerateCslIeTemplate(sAckIeData);
-    }
-#endif
-
-#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
-    if (aLinkMetricsIeData != NULL && aLinkMetricsIeDataLen > 0)
-    {
-        offset += otMacFrameGenerateEnhAckProbingIe(sAckIeData, aLinkMetricsIeData, aLinkMetricsIeDataLen);
-    }
-#endif
-
-    return offset;
-}
-#endif
-
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-otError otPlatRadioEnableCsl(otInstance *        aInstance,
-                             uint32_t            aCslPeriod,
-                             otShortAddress      aShortAddr,
-                             const otExtAddress *aExtAddr)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aShortAddr);
-    OT_UNUSED_VARIABLE(aExtAddr);
-
-    otError error = OT_ERROR_NONE;
-
-    sCslPeriod = aCslPeriod;
-
-    return error;
-}
-
-void otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTime)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sCslSampleTime = aCslSampleTime;
-}
-
-uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return 0;
-}
-#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-
-void otPlatRadioSetMacKey(otInstance *            aInstance,
-                          uint8_t                 aKeyIdMode,
-                          uint8_t                 aKeyId,
-                          const otMacKeyMaterial *aPrevKey,
-                          const otMacKeyMaterial *aCurrKey,
-                          const otMacKeyMaterial *aNextKey,
-                          otRadioKeyType          aKeyType)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aKeyIdMode);
-
-    otEXPECT(aPrevKey != NULL && aCurrKey != NULL && aNextKey != NULL);
-
-    sKeyId   = aKeyId;
-    sKeyType = aKeyType;
-    memcpy(&sPrevKey, aPrevKey, sizeof(otMacKeyMaterial));
-    memcpy(&sCurrKey, aCurrKey, sizeof(otMacKeyMaterial));
-    memcpy(&sNextKey, aNextKey, sizeof(otMacKeyMaterial));
-
-exit:
-    return;
-}
-
-void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sMacFrameCounter = aMacFrameCounter;
-}
-
-otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aChannel, int8_t aMaxPower)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-
-    otEXPECT_ACTION(aChannel >= kMinChannel && aChannel <= kMaxChannel, error = OT_ERROR_INVALID_ARGS);
-    sChannelMaxTransmitPower[aChannel - kMinChannel] = aMaxPower;
-
-exit:
-    return error;
-}
-
-#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
-otError otPlatRadioConfigureEnhAckProbing(otInstance *         aInstance,
-                                          otLinkMetrics        aLinkMetrics,
-                                          const otShortAddress aShortAddress,
-                                          const otExtAddress * aExtAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    return otLinkMetricsConfigureEnhAckProbing(aShortAddress, aExtAddress, aLinkMetrics);
-}
-#endif
-
-otError otPlatRadioSetRegion(otInstance *aInstance, uint16_t aRegionCode)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sRegionCode = aRegionCode;
-    return OT_ERROR_NONE;
-}
-
-otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    otError error = OT_ERROR_NONE;
-
-    otEXPECT_ACTION(aRegionCode != NULL, error = OT_ERROR_INVALID_ARGS);
-
-    *aRegionCode = sRegionCode;
-exit:
-    return error;
-}
diff --git a/examples/platforms/simulation/spi-stubs.c b/examples/platforms/simulation/spi-stubs.c
deleted file mode 100644
index 585bca7..0000000
--- a/examples/platforms/simulation/spi-stubs.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <openthread/config.h>
-#include <openthread/platform/spi-slave.h>
-
-#if OPENTHREAD_CONFIG_NCP_SPI_ENABLE
-
-// Spi-slave stubs
-
-otError otPlatSpiSlaveEnable(otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback,
-                             otPlatSpiSlaveTransactionProcessCallback  aProcessCallback,
-                             void *                                    aContext)
-{
-    OT_UNUSED_VARIABLE(aCompleteCallback);
-    OT_UNUSED_VARIABLE(aProcessCallback);
-    OT_UNUSED_VARIABLE(aContext);
-
-    fprintf(stderr, "\nNo SPI support for simulation platform.");
-    exit(0);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-void otPlatSpiSlaveDisable(void)
-{
-}
-
-otError otPlatSpiSlavePrepareTransaction(uint8_t *aOutputBuf,
-                                         uint16_t aOutputBufLen,
-                                         uint8_t *aInputBuf,
-                                         uint16_t aInputBufLen,
-                                         bool     aRequestTransactionFlag)
-{
-    OT_UNUSED_VARIABLE(aOutputBuf);
-    OT_UNUSED_VARIABLE(aOutputBufLen);
-    OT_UNUSED_VARIABLE(aInputBuf);
-    OT_UNUSED_VARIABLE(aInputBufLen);
-    OT_UNUSED_VARIABLE(aRequestTransactionFlag);
-
-    return OT_ERROR_NOT_IMPLEMENTED;
-}
-
-// Uart
-
-void otPlatUartSendDone(void)
-{
-}
-
-void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength)
-{
-    OT_UNUSED_VARIABLE(aBuf);
-    OT_UNUSED_VARIABLE(aBufLength);
-}
-
-#endif // OPENTHREAD_CONFIG_NCP_SPI_ENABLE
diff --git a/examples/platforms/simulation/system.c b/examples/platforms/simulation/system.c
deleted file mode 100644
index 57bb30c..0000000
--- a/examples/platforms/simulation/system.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file includes the platform-specific initializers.
- */
-
-#include "platform-simulation.h"
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
-
-#include <assert.h>
-#include <errno.h>
-#include <getopt.h>
-#include <libgen.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <syslog.h>
-
-#include <openthread/tasklet.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/radio.h>
-
-uint32_t gNodeId = 1;
-
-extern bool        gPlatformPseudoResetWasRequested;
-extern otRadioCaps gRadioCaps;
-
-static volatile bool gTerminate = false;
-
-static void handleSignal(int aSignal)
-{
-    OT_UNUSED_VARIABLE(aSignal);
-
-    gTerminate = true;
-}
-
-/**
- * This enumeration defines the argument return values.
- *
- */
-enum
-{
-    OT_SIM_OPT_HELP        = 'h',
-    OT_SIM_OPT_SLEEP_TO_TX = 't',
-    OT_SIM_OPT_TIME_SPEED  = 's',
-    OT_SIM_OPT_UNKNOWN     = '?',
-};
-
-static void PrintUsage(const char *aProgramName, int aExitCode)
-{
-    fprintf(stderr,
-            "Syntax:\n"
-            "    %s [Options] NodeId\n"
-            "Options:\n"
-            "    -h --help              Display this usage information.\n"
-            "    -t --sleep-to-tx       Let radio support direct transition from sleep to TX with CSMA.\n"
-            "    -s --time-speed=val    Speed up the time in simulation.\n",
-            aProgramName);
-
-    exit(aExitCode);
-}
-
-void otSysInit(int aArgCount, char *aArgVector[])
-{
-    char *   endptr;
-    uint32_t speedUpFactor = 1;
-
-    static const struct option long_options[] = {
-        {"help", no_argument, 0, OT_SIM_OPT_HELP},
-        {"sleep-to-tx", no_argument, 0, OT_SIM_OPT_SLEEP_TO_TX},
-        {"time-speed", required_argument, 0, OT_SIM_OPT_TIME_SPEED},
-        {0, 0, 0, 0},
-    };
-
-    if (gPlatformPseudoResetWasRequested)
-    {
-        gPlatformPseudoResetWasRequested = false;
-        return;
-    }
-
-    optind = 1;
-
-    while (true)
-    {
-        int c = getopt_long(aArgCount, aArgVector, "hts:", long_options, NULL);
-
-        if (c == -1)
-        {
-            break;
-        }
-
-        switch (c)
-        {
-        case OT_SIM_OPT_UNKNOWN:
-            PrintUsage(aArgVector[0], EXIT_FAILURE);
-            break;
-        case OT_SIM_OPT_HELP:
-            PrintUsage(aArgVector[0], EXIT_SUCCESS);
-            break;
-        case OT_SIM_OPT_SLEEP_TO_TX:
-            gRadioCaps |= OT_RADIO_CAPS_SLEEP_TO_TX;
-            break;
-        case OT_SIM_OPT_TIME_SPEED:
-            speedUpFactor = (uint32_t)strtol(optarg, &endptr, 10);
-            if (*endptr != '\0' || speedUpFactor == 0)
-            {
-                fprintf(stderr, "Invalid value for TimerSpeedUpFactor: %s\n", optarg);
-                exit(EXIT_FAILURE);
-            }
-            break;
-        default:
-            break;
-        }
-    }
-
-    if (optind != aArgCount - 1)
-    {
-        PrintUsage(aArgVector[0], EXIT_FAILURE);
-    }
-
-    gNodeId = (uint32_t)strtol(aArgVector[optind], &endptr, 0);
-
-    if (*endptr != '\0' || gNodeId < 1 || gNodeId > MAX_NETWORK_SIZE)
-    {
-        fprintf(stderr, "Invalid NodeId: %s\n", aArgVector[optind]);
-        exit(EXIT_FAILURE);
-    }
-
-    openlog(basename(aArgVector[0]), LOG_PID, LOG_USER);
-    setlogmask(setlogmask(0) & LOG_UPTO(LOG_NOTICE));
-
-    signal(SIGTERM, &handleSignal);
-    signal(SIGHUP, &handleSignal);
-
-    platformAlarmInit(speedUpFactor);
-    platformRadioInit();
-#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-    platformTrelInit(speedUpFactor);
-#endif
-    platformRandomInit();
-}
-
-bool otSysPseudoResetWasRequested(void)
-{
-    return gPlatformPseudoResetWasRequested;
-}
-
-void otSysDeinit(void)
-{
-    platformRadioDeinit();
-#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-    platformTrelDeinit();
-#endif
-}
-
-void otSysProcessDrivers(otInstance *aInstance)
-{
-    fd_set         read_fds;
-    fd_set         write_fds;
-    fd_set         error_fds;
-    int            max_fd = -1;
-    struct timeval timeout;
-    int            rval;
-
-    FD_ZERO(&read_fds);
-    FD_ZERO(&write_fds);
-    FD_ZERO(&error_fds);
-
-    platformUartUpdateFdSet(&read_fds, &write_fds, &error_fds, &max_fd);
-    platformRadioUpdateFdSet(&read_fds, &write_fds, &max_fd);
-    platformAlarmUpdateTimeout(&timeout);
-#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-    platformTrelUpdateFdSet(&read_fds, &write_fds, &timeout, &max_fd);
-#endif
-
-    if (otTaskletsArePending(aInstance))
-    {
-        timeout.tv_sec  = 0;
-        timeout.tv_usec = 0;
-    }
-
-    rval = select(max_fd + 1, &read_fds, &write_fds, &error_fds, &timeout);
-
-    if (rval >= 0)
-    {
-        platformUartProcess();
-        platformRadioProcess(aInstance, &read_fds, &write_fds);
-    }
-    else if (errno != EINTR)
-    {
-        perror("select");
-        exit(EXIT_FAILURE);
-    }
-
-    platformAlarmProcess(aInstance);
-#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-    platformTrelProcess(aInstance, &read_fds, &write_fds);
-#endif
-
-    if (gTerminate)
-    {
-        exit(0);
-    }
-}
-
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME == 0
diff --git a/examples/platforms/simulation/trel.c b/examples/platforms/simulation/trel.c
deleted file mode 100644
index 20c6b30..0000000
--- a/examples/platforms/simulation/trel.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- *  Copyright (c) 2019-21, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <openthread/random_noncrypto.h>
-#include <openthread/platform/trel.h>
-
-#include "utils/code_utils.h"
-
-#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
-
-// Change DEBUG_LOG to all extra logging
-#define DEBUG_LOG 0
-
-// The IPv4 group for receiving
-#define TREL_SIM_GROUP "224.0.0.116"
-#define TREL_SIM_PORT 9200
-
-#define TREL_MAX_PACKET_SIZE 1800
-
-#define TREL_MAX_PENDING_TX 64
-
-#define TREL_MAX_SERVICE_TXT_DATA_LEN 128
-
-typedef enum MessageType
-{
-    TREL_DATA_MESSAGE,
-    TREL_DNSSD_BROWSE_MESSAGE,
-    TREL_DNSSD_ADD_SERVICE_MESSAGE,
-    TREL_DNSSD_REMOVE_SERVICE_MESSAGE,
-} MessageType;
-
-typedef struct Message
-{
-    MessageType mType;
-    otSockAddr  mSockAddr;                   // Destination (when TREL_DATA_MESSAGE), or peer addr (when DNS-SD service)
-    uint16_t    mDataLength;                 // mData length
-    uint8_t     mData[TREL_MAX_PACKET_SIZE]; // TREL UDP packet (when TREL_DATA_MESSAGE), or service TXT data.
-} Message;
-
-static uint8_t sNumPendingTx = 0;
-static Message sPendingTx[TREL_MAX_PENDING_TX];
-
-static int      sTxFd       = -1;
-static int      sRxFd       = -1;
-static uint16_t sPortOffset = 0;
-static bool     sEnabled    = false;
-static uint16_t sUdpPort;
-
-static bool     sServiceRegistered = false;
-static uint16_t sServicePort;
-static uint8_t  sServiceTxtLength;
-static char     sServiceTxtData[TREL_MAX_SERVICE_TXT_DATA_LEN];
-
-#if DEBUG_LOG
-static void dumpBuffer(const void *aBuffer, uint16_t aLength)
-{
-    const uint8_t *buffer = (const uint8_t *)aBuffer;
-    fprintf(stderr, "[ (len:%d) ", aLength);
-
-    while (aLength--)
-    {
-        fprintf(stderr, "%02x ", *buffer++);
-    }
-
-    fprintf(stderr, "]");
-}
-
-static const char *messageTypeToString(MessageType aType)
-{
-    const char *str = "unknown";
-
-    switch (aType)
-    {
-    case TREL_DATA_MESSAGE:
-        str = "data";
-        break;
-    case TREL_DNSSD_BROWSE_MESSAGE:
-        str = "browse";
-        break;
-    case TREL_DNSSD_ADD_SERVICE_MESSAGE:
-        str = "add-service";
-        break;
-    case TREL_DNSSD_REMOVE_SERVICE_MESSAGE:
-        str = "remove-service";
-        break;
-    }
-
-    return str;
-}
-#endif
-
-static void initFds(void)
-{
-    int                fd;
-    int                one = 1;
-    struct sockaddr_in sockaddr;
-    struct ip_mreqn    mreq;
-
-    memset(&sockaddr, 0, sizeof(sockaddr));
-
-    otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sTxFd)"));
-
-    sUdpPort                 = (uint16_t)(TREL_SIM_PORT + sPortOffset + gNodeId);
-    sockaddr.sin_family      = AF_INET;
-    sockaddr.sin_port        = htons(sUdpPort);
-    sockaddr.sin_addr.s_addr = inet_addr("127.0.0.1");
-
-    otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &sockaddr.sin_addr, sizeof(sockaddr.sin_addr)) != -1,
-                    perror("setsockopt(sTxFd, IP_MULTICAST_IF)"));
-
-    otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof(one)) != -1,
-                    perror("setsockopt(sTxFd, IP_MULTICAST_LOOP)"));
-
-    otEXPECT_ACTION(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) != -1, perror("bind(sTxFd)"));
-
-    // Tx fd is successfully initialized.
-    sTxFd = fd;
-
-    otEXPECT_ACTION((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) != -1, perror("socket(sRxFd)"));
-
-    otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) != -1,
-                    perror("setsockopt(sRxFd, SO_REUSEADDR)"));
-    otEXPECT_ACTION(setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) != -1,
-                    perror("setsockopt(sRxFd, SO_REUSEPORT)"));
-
-    memset(&mreq, 0, sizeof(mreq));
-    inet_pton(AF_INET, TREL_SIM_GROUP, &mreq.imr_multiaddr);
-
-    // Always use loopback device to send simulation packets.
-    mreq.imr_address.s_addr = inet_addr("127.0.0.1");
-
-    otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &mreq.imr_address, sizeof(mreq.imr_address)) != -1,
-                    perror("setsockopt(sRxFd, IP_MULTICAST_IF)"));
-    otEXPECT_ACTION(setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) != -1,
-                    perror("setsockopt(sRxFd, IP_ADD_MEMBERSHIP)"));
-
-    sockaddr.sin_family      = AF_INET;
-    sockaddr.sin_port        = htons((uint16_t)(TREL_SIM_PORT + sPortOffset));
-    sockaddr.sin_addr.s_addr = inet_addr(TREL_SIM_GROUP);
-
-    otEXPECT_ACTION(bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) != -1, perror("bind(sRxFd)"));
-
-    // Rx fd is successfully initialized.
-    sRxFd = fd;
-
-exit:
-    if (sRxFd == -1 || sTxFd == -1)
-    {
-        exit(EXIT_FAILURE);
-    }
-}
-
-static void deinitFds(void)
-{
-    if (sRxFd != -1)
-    {
-        close(sRxFd);
-    }
-
-    if (sTxFd != -1)
-    {
-        close(sTxFd);
-    }
-}
-
-static uint16_t getMessageSize(const Message *aMessage)
-{
-    return (uint16_t)(&aMessage->mData[aMessage->mDataLength] - (const uint8_t *)aMessage);
-}
-
-static void sendPendingTxMessages(void)
-{
-    ssize_t            rval;
-    struct sockaddr_in sockaddr;
-
-    memset(&sockaddr, 0, sizeof(sockaddr));
-    sockaddr.sin_family = AF_INET;
-    inet_pton(AF_INET, TREL_SIM_GROUP, &sockaddr.sin_addr);
-
-    sockaddr.sin_port = htons((uint16_t)(TREL_SIM_PORT + sPortOffset));
-
-    for (uint8_t i = 0; i < sNumPendingTx; i++)
-    {
-        uint16_t size = getMessageSize(&sPendingTx[i]);
-
-#if DEBUG_LOG
-        fprintf(stderr, "\r\n[trel-sim] Sending message (num:%d, type:%s, port:%u)\r\n", i,
-                messageTypeToString(sPendingTx[i].mType), sPendingTx[i].mSockAddr.mPort);
-#endif
-
-        rval = sendto(sTxFd, &sPendingTx[i], size, 0, (struct sockaddr *)&sockaddr, sizeof(sockaddr));
-
-        if (rval < 0)
-        {
-            perror("sendto(sTxFd)");
-            exit(EXIT_FAILURE);
-        }
-    }
-
-    sNumPendingTx = 0;
-}
-
-static void sendBrowseMessage(void)
-{
-    Message *message;
-
-    assert(sNumPendingTx < TREL_MAX_PENDING_TX);
-    message = &sPendingTx[sNumPendingTx++];
-
-    message->mType       = TREL_DNSSD_BROWSE_MESSAGE;
-    message->mDataLength = 0;
-
-#if DEBUG_LOG
-    fprintf(stderr, "\r\n[trel-sim] sendBrowseMessage()\r\n");
-#endif
-}
-
-static void sendServiceMessage(MessageType aType)
-{
-    Message *message;
-
-    assert((aType == TREL_DNSSD_ADD_SERVICE_MESSAGE) || (aType == TREL_DNSSD_REMOVE_SERVICE_MESSAGE));
-
-    assert(sNumPendingTx < TREL_MAX_PENDING_TX);
-    message = &sPendingTx[sNumPendingTx++];
-
-    message->mType = aType;
-    memset(&message->mSockAddr, 0, sizeof(otSockAddr));
-    message->mSockAddr.mPort = sServicePort;
-    message->mDataLength     = sServiceTxtLength;
-    memcpy(message->mData, sServiceTxtData, sServiceTxtLength);
-
-#if DEBUG_LOG
-    fprintf(stderr, "\r\n[trel-sim] sendServiceMessage(%s): service-port:%u, txt-len:%u\r\n",
-            aType == TREL_DNSSD_ADD_SERVICE_MESSAGE ? "add" : "remove", sServicePort, sServiceTxtLength);
-#endif
-}
-
-static void processMessage(otInstance *aInstance, Message *aMessage, uint16_t aLength)
-{
-    otPlatTrelPeerInfo peerInfo;
-
-#if DEBUG_LOG
-    fprintf(stderr, "\r\n[trel-sim] processMessage(len:%u, type:%s, port:%u)\r\n", aLength,
-            messageTypeToString(aMessage->mType), aMessage->mSockAddr.mPort);
-#endif
-
-    otEXPECT(aLength > 0);
-    otEXPECT(getMessageSize(aMessage) == aLength);
-
-    switch (aMessage->mType)
-    {
-    case TREL_DATA_MESSAGE:
-        otEXPECT(aMessage->mSockAddr.mPort == sUdpPort);
-        otPlatTrelHandleReceived(aInstance, aMessage->mData, aMessage->mDataLength);
-        break;
-
-    case TREL_DNSSD_BROWSE_MESSAGE:
-        sendServiceMessage(TREL_DNSSD_ADD_SERVICE_MESSAGE);
-        break;
-
-    case TREL_DNSSD_ADD_SERVICE_MESSAGE:
-    case TREL_DNSSD_REMOVE_SERVICE_MESSAGE:
-        memset(&peerInfo, 0, sizeof(peerInfo));
-        peerInfo.mRemoved   = (aMessage->mType == TREL_DNSSD_REMOVE_SERVICE_MESSAGE);
-        peerInfo.mTxtData   = aMessage->mData;
-        peerInfo.mTxtLength = (uint8_t)(aMessage->mDataLength);
-        peerInfo.mSockAddr  = aMessage->mSockAddr;
-        otPlatTrelHandleDiscoveredPeerInfo(aInstance, &peerInfo);
-        break;
-    }
-
-exit:
-    return;
-}
-
-//---------------------------------------------------------------------------------------------------------------------
-// otPlatTrel
-
-void otPlatTrelEnable(otInstance *aInstance, uint16_t *aUdpPort)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    *aUdpPort = sUdpPort;
-
-#if DEBUG_LOG
-    fprintf(stderr, "\r\n[trel-sim] otPlatTrelEnable() *aUdpPort=%u\r\n", *aUdpPort);
-#endif
-
-    if (!sEnabled)
-    {
-        sEnabled = true;
-        sendBrowseMessage();
-    }
-}
-
-void otPlatTrelDisable(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-#if DEBUG_LOG
-    fprintf(stderr, "\r\n[trel-sim] otPlatTrelDisable()\r\n");
-#endif
-
-    if (sEnabled)
-    {
-        sEnabled = false;
-
-        if (sServiceRegistered)
-        {
-            sendServiceMessage(TREL_DNSSD_REMOVE_SERVICE_MESSAGE);
-            sServiceRegistered = false;
-        }
-    }
-}
-
-void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint8_t *aTxtData, uint8_t aTxtLength)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    assert(aTxtLength <= TREL_MAX_SERVICE_TXT_DATA_LEN);
-
-    if (sServiceRegistered)
-    {
-        sendServiceMessage(TREL_DNSSD_REMOVE_SERVICE_MESSAGE);
-    }
-
-    sServiceRegistered = true;
-    sServicePort       = aPort;
-    sServiceTxtLength  = aTxtLength;
-    memcpy(sServiceTxtData, aTxtData, aTxtLength);
-
-    sendServiceMessage(TREL_DNSSD_ADD_SERVICE_MESSAGE);
-
-#if DEBUG_LOG
-    fprintf(stderr, "\r\n[trel-sim] otPlatTrelRegisterService(aPort:%d, aTxtData:", aPort);
-    dumpBuffer(aTxtData, aTxtLength);
-    fprintf(stderr, ")\r\n");
-#endif
-}
-
-void otPlatTrelSend(otInstance *      aInstance,
-                    const uint8_t *   aUdpPayload,
-                    uint16_t          aUdpPayloadLen,
-                    const otSockAddr *aDestSockAddr)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    Message *message;
-
-    assert(sNumPendingTx < TREL_MAX_PENDING_TX);
-    assert(aUdpPayloadLen <= TREL_MAX_PACKET_SIZE);
-
-    message = &sPendingTx[sNumPendingTx++];
-
-    message->mType       = TREL_DATA_MESSAGE;
-    message->mSockAddr   = *aDestSockAddr;
-    message->mDataLength = aUdpPayloadLen;
-    memcpy(message->mData, aUdpPayload, aUdpPayloadLen);
-
-#if DEBUG_LOG
-    fprintf(stderr, "\r\n[trel-sim] otPlatTrelSend(len:%u, port:%u)\r\n", aUdpPayloadLen, aDestSockAddr->mPort);
-#endif
-}
-
-//---------------------------------------------------------------------------------------------------------------------
-// platformTrel system
-
-void platformTrelInit(uint32_t aSpeedUpFactor)
-{
-    char *str;
-
-    str = getenv("PORT_OFFSET");
-
-    if (str != NULL)
-    {
-        char *endptr;
-
-        sPortOffset = (uint16_t)strtol(str, &endptr, 0);
-
-        if (*endptr != '\0')
-        {
-            fprintf(stderr, "\r\nInvalid PORT_OFFSET: %s\r\n", str);
-            exit(EXIT_FAILURE);
-        }
-
-        sPortOffset *= (MAX_NETWORK_SIZE + 1);
-    }
-
-    initFds();
-
-    OT_UNUSED_VARIABLE(aSpeedUpFactor);
-}
-
-void platformTrelDeinit(void)
-{
-    deinitFds();
-}
-
-void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd)
-{
-    OT_UNUSED_VARIABLE(aTimeout);
-
-    // Always ready to receive
-    if (aReadFdSet != NULL)
-    {
-        FD_SET(sRxFd, aReadFdSet);
-
-        if (aMaxFd != NULL && *aMaxFd < sRxFd)
-        {
-            *aMaxFd = sRxFd;
-        }
-    }
-
-    if ((aWriteFdSet != NULL) && (sNumPendingTx > 0))
-    {
-        FD_SET(sTxFd, aWriteFdSet);
-
-        if (aMaxFd != NULL && *aMaxFd < sTxFd)
-        {
-            *aMaxFd = sTxFd;
-        }
-    }
-}
-
-void platformTrelProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet)
-{
-    if (FD_ISSET(sTxFd, aWriteFdSet) && (sNumPendingTx > 0))
-    {
-        sendPendingTxMessages();
-    }
-
-    if (FD_ISSET(sRxFd, aReadFdSet))
-    {
-        Message message;
-        ssize_t rval;
-
-        message.mDataLength = 0;
-
-        rval = recvfrom(sRxFd, (char *)&message, sizeof(message), 0, NULL, NULL);
-
-        if (rval < 0)
-        {
-            perror("recvfrom(sRxFd)");
-            exit(EXIT_FAILURE);
-        }
-
-        processMessage(aInstance, &message, (uint16_t)(rval));
-    }
-}
-
-//---------------------------------------------------------------------------------------------------------------------
-
-// This is added for RCP build to be built ok
-OT_TOOL_WEAK void otPlatTrelHandleReceived(otInstance *aInstance, uint8_t *aBuffer, uint16_t aLength)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aBuffer);
-    OT_UNUSED_VARIABLE(aLength);
-
-    assert(false);
-}
-
-OT_TOOL_WEAK void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPlatTrelPeerInfo *aInfo)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aInfo);
-
-    assert(false);
-}
-
-#endif // OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
diff --git a/examples/platforms/simulation/uart.c b/examples/platforms/simulation/uart.c
deleted file mode 100644
index 3bbcfac..0000000
--- a/examples/platforms/simulation/uart.c
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#include <assert.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <poll.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-
-#include <openthread/platform/debug_uart.h>
-
-#include "utils/code_utils.h"
-#include "utils/uart.h"
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART == 0
-
-static uint8_t        s_receive_buffer[128];
-static const uint8_t *s_write_buffer;
-static uint16_t       s_write_length;
-static int            s_in_fd;
-static int            s_out_fd;
-
-static struct termios original_stdin_termios;
-static struct termios original_stdout_termios;
-
-static void restore_stdin_termios(void)
-{
-    tcsetattr(s_in_fd, TCSAFLUSH, &original_stdin_termios);
-}
-
-static void restore_stdout_termios(void)
-{
-    tcsetattr(s_out_fd, TCSAFLUSH, &original_stdout_termios);
-}
-
-void platformUartRestore(void)
-{
-    restore_stdin_termios();
-    restore_stdout_termios();
-    dup2(s_out_fd, STDOUT_FILENO);
-}
-
-otError otPlatUartEnable(void)
-{
-    otError        error = OT_ERROR_NONE;
-    struct termios termios;
-
-    s_in_fd  = dup(STDIN_FILENO);
-    s_out_fd = dup(STDOUT_FILENO);
-    dup2(STDERR_FILENO, STDOUT_FILENO);
-
-    // We need this signal to make sure that this
-    // process terminates properly.
-    signal(SIGPIPE, SIG_DFL);
-
-    if (isatty(s_in_fd))
-    {
-        tcgetattr(s_in_fd, &original_stdin_termios);
-        atexit(&restore_stdin_termios);
-    }
-
-    if (isatty(s_out_fd))
-    {
-        tcgetattr(s_out_fd, &original_stdout_termios);
-        atexit(&restore_stdout_termios);
-    }
-
-    if (isatty(s_in_fd))
-    {
-        // get current configuration
-        otEXPECT_ACTION(tcgetattr(s_in_fd, &termios) == 0, perror("tcgetattr"); error = OT_ERROR_GENERIC);
-
-        // Set up the termios settings for raw mode. This turns
-        // off input/output processing, line processing, and character processing.
-        cfmakeraw(&termios);
-
-        // Set up our cflags for local use. Turn on hangup-on-close.
-        termios.c_cflag |= HUPCL | CREAD | CLOCAL;
-
-        // "Minimum number of characters for noncanonical read"
-        termios.c_cc[VMIN] = 1;
-
-        // "Timeout in deciseconds for noncanonical read"
-        termios.c_cc[VTIME] = 0;
-
-        // configure baud rate
-        otEXPECT_ACTION(cfsetispeed(&termios, OPENTHREAD_SIMULATION_UART_BAUDRATE) == 0, perror("cfsetispeed");
-                        error = OT_ERROR_GENERIC);
-
-        // set configuration
-        otEXPECT_ACTION(tcsetattr(s_in_fd, TCSANOW, &termios) == 0, perror("tcsetattr"); error = OT_ERROR_GENERIC);
-    }
-
-    if (isatty(s_out_fd))
-    {
-        // get current configuration
-        otEXPECT_ACTION(tcgetattr(s_out_fd, &termios) == 0, perror("tcgetattr"); error = OT_ERROR_GENERIC);
-
-        // Set up the termios settings for raw mode. This turns
-        // off input/output processing, line processing, and character processing.
-        cfmakeraw(&termios);
-
-        // Absolutely obliterate all output processing.
-        termios.c_oflag = 0;
-
-        // Set up our cflags for local use. Turn on hangup-on-close.
-        termios.c_cflag |= HUPCL | CREAD | CLOCAL;
-
-        // configure baud rate
-        otEXPECT_ACTION(cfsetospeed(&termios, OPENTHREAD_SIMULATION_UART_BAUDRATE) == 0, perror("cfsetospeed");
-                        error = OT_ERROR_GENERIC);
-
-        // set configuration
-        otEXPECT_ACTION(tcsetattr(s_out_fd, TCSANOW, &termios) == 0, perror("tcsetattr"); error = OT_ERROR_GENERIC);
-    }
-
-    return error;
-
-exit:
-    close(s_in_fd);
-    close(s_out_fd);
-    return error;
-}
-
-otError otPlatUartDisable(void)
-{
-    otError error = OT_ERROR_NONE;
-
-    close(s_in_fd);
-    close(s_out_fd);
-
-    return error;
-}
-
-otError otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength)
-{
-    otError error = OT_ERROR_NONE;
-
-    otEXPECT_ACTION(s_write_length == 0, error = OT_ERROR_BUSY);
-
-    s_write_buffer = aBuf;
-    s_write_length = aBufLength;
-
-exit:
-    return error;
-}
-
-void platformUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aErrorFdSet, int *aMaxFd)
-{
-    if (aReadFdSet != NULL)
-    {
-        FD_SET(s_in_fd, aReadFdSet);
-
-        if (aErrorFdSet != NULL)
-        {
-            FD_SET(s_in_fd, aErrorFdSet);
-        }
-
-        if (aMaxFd != NULL && *aMaxFd < s_in_fd)
-        {
-            *aMaxFd = s_in_fd;
-        }
-    }
-
-    if ((aWriteFdSet != NULL) && (s_write_length > 0))
-    {
-        FD_SET(s_out_fd, aWriteFdSet);
-
-        if (aErrorFdSet != NULL)
-        {
-            FD_SET(s_out_fd, aErrorFdSet);
-        }
-
-        if (aMaxFd != NULL && *aMaxFd < s_out_fd)
-        {
-            *aMaxFd = s_out_fd;
-        }
-    }
-}
-
-otError otPlatUartFlush(void)
-{
-    otError error = OT_ERROR_NONE;
-    ssize_t count;
-
-    otEXPECT_ACTION(s_write_buffer != NULL && s_write_length > 0, error = OT_ERROR_INVALID_STATE);
-
-    while ((count = write(s_out_fd, s_write_buffer, s_write_length)) > 0 && (s_write_length -= count) > 0)
-    {
-        s_write_buffer += count;
-    }
-
-    if (count != -1)
-    {
-        assert(s_write_length == 0);
-        s_write_buffer = NULL;
-    }
-    else
-    {
-        perror("write(UART)");
-        exit(EXIT_FAILURE);
-    }
-
-exit:
-    return error;
-}
-
-void platformUartProcess(void)
-{
-    ssize_t       rval;
-    const int     error_flags = POLLERR | POLLNVAL | POLLHUP;
-    struct pollfd pollfd[]    = {
-        {s_in_fd, POLLIN | error_flags, 0},
-        {s_out_fd, POLLOUT | error_flags, 0},
-    };
-
-    errno = 0;
-
-    rval = poll(pollfd, sizeof(pollfd) / sizeof(*pollfd), 0);
-
-    if (rval < 0)
-    {
-        perror("poll");
-        exit(EXIT_FAILURE);
-    }
-
-    if (rval > 0)
-    {
-        if ((pollfd[0].revents & error_flags) != 0)
-        {
-            perror("s_in_fd");
-            exit(EXIT_FAILURE);
-        }
-
-        if ((pollfd[1].revents & error_flags) != 0)
-        {
-            perror("s_out_fd");
-            exit(EXIT_FAILURE);
-        }
-
-        if (pollfd[0].revents & POLLIN)
-        {
-            rval = read(s_in_fd, s_receive_buffer, sizeof(s_receive_buffer));
-
-            if (rval <= 0)
-            {
-                perror("read");
-                exit(EXIT_FAILURE);
-            }
-
-            otPlatUartReceived(s_receive_buffer, (uint16_t)rval);
-        }
-
-        if ((s_write_length > 0) && (pollfd[1].revents & POLLOUT))
-        {
-            rval = write(s_out_fd, s_write_buffer, s_write_length);
-
-            if (rval >= 0)
-            {
-                s_write_buffer += (uint16_t)rval;
-                s_write_length -= (uint16_t)rval;
-
-                if (s_write_length == 0)
-                {
-                    otPlatUartSendDone();
-                }
-            }
-            else if (errno != EINTR)
-            {
-                perror("write");
-                exit(EXIT_FAILURE);
-            }
-        }
-    }
-}
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART == 0
-
-#if OPENTHREAD_CONFIG_ENABLE_DEBUG_UART && (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART)
-
-static FILE *posix_logfile;
-
-otError otPlatDebugUart_logfile(const char *filename)
-{
-    posix_logfile = fopen(filename, "wt");
-
-    return posix_logfile ? OT_ERROR_NONE : OT_ERROR_FAILED;
-}
-
-void otPlatDebugUart_putchar_raw(int c)
-{
-    FILE *fp;
-
-    /* note: log file will have a mix of cr/lf and
-     * in some/many cases duplicate cr because in
-     * some cases the log function {ie: Mbed} already
-     * includes the CR or LF... but other log functions
-     * do not include cr/lf and expect it appended
-     */
-    fp = posix_logfile;
-
-    if (fp != NULL)
-    {
-        /* log is lost ... until a file is setup */
-        fputc(c, fp);
-        /* we could "fflush" but will not */
-    }
-}
-
-int otPlatDebugUart_kbhit(void)
-{
-    /* not supported */
-    return 0;
-}
-
-int otPlatDebugUart_getc(void)
-{
-    /* not supported */
-    return -1;
-}
-
-#endif
diff --git a/examples/platforms/simulation/virtual_time/alarm-sim.c b/examples/platforms/simulation/virtual_time/alarm-sim.c
deleted file mode 100644
index 10ebaa5..0000000
--- a/examples/platforms/simulation/virtual_time/alarm-sim.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- *  Copyright (c) 2018, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "platform-simulation.h"
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <openthread/platform/alarm-micro.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/diag.h>
-
-#define US_PER_MS 1000
-
-extern uint64_t sNow; // microseconds
-
-static bool     sIsMsRunning = false;
-static uint32_t sMsAlarm     = 0;
-
-static bool     sIsUsRunning = false;
-static uint32_t sUsAlarm     = 0;
-
-void platformAlarmInit(uint32_t aSpeedUpFactor)
-{
-    OT_UNUSED_VARIABLE(aSpeedUpFactor);
-
-    sNow = 0;
-}
-
-uint64_t platformAlarmGetNow(void)
-{
-    return sNow;
-}
-
-void platformAlarmAdvanceNow(uint64_t aDelta)
-{
-    sNow += aDelta;
-}
-
-uint32_t otPlatAlarmMilliGetNow(void)
-{
-    return (uint32_t)(sNow / US_PER_MS);
-}
-
-void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sMsAlarm     = aT0 + aDt;
-    sIsMsRunning = true;
-}
-
-void otPlatAlarmMilliStop(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sIsMsRunning = false;
-}
-
-uint32_t otPlatAlarmMicroGetNow(void)
-{
-    return (uint32_t)sNow;
-}
-
-void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sUsAlarm     = aT0 + aDt;
-    sIsUsRunning = true;
-}
-
-void otPlatAlarmMicroStop(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    sIsUsRunning = false;
-}
-
-uint64_t platformAlarmGetNext(void)
-{
-    uint64_t remaining = INT64_MAX;
-
-    if (sIsMsRunning)
-    {
-        int32_t milli = (int32_t)(sMsAlarm - otPlatAlarmMilliGetNow());
-
-        if (milli < 0)
-        {
-            remaining = 0;
-        }
-        else
-        {
-            remaining = (uint64_t)milli;
-            remaining *= US_PER_MS;
-        }
-    }
-
-#if OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
-    if (sIsUsRunning)
-    {
-        int32_t micro = (int32_t)(sUsAlarm - otPlatAlarmMicroGetNow());
-
-        if (micro < 0)
-        {
-            remaining = 0;
-        }
-        else if (remaining > ((uint64_t)micro))
-        {
-            remaining = (uint64_t)micro;
-        }
-    }
-#endif
-
-    return remaining;
-}
-
-void platformAlarmProcess(otInstance *aInstance)
-{
-    int32_t remaining;
-
-    if (sIsMsRunning)
-    {
-        remaining = (int32_t)(sMsAlarm - otPlatAlarmMilliGetNow());
-
-        if (remaining <= 0)
-        {
-            sIsMsRunning = false;
-
-#if OPENTHREAD_CONFIG_DIAG_ENABLE
-
-            if (otPlatDiagModeGet())
-            {
-                otPlatDiagAlarmFired(aInstance);
-            }
-            else
-#endif
-            {
-                otPlatAlarmMilliFired(aInstance);
-            }
-        }
-    }
-
-#if OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
-
-    if (sIsUsRunning)
-    {
-        remaining = (int32_t)(sUsAlarm - otPlatAlarmMicroGetNow());
-
-        if (remaining <= 0)
-        {
-            sIsUsRunning = false;
-
-            otPlatAlarmMicroFired(aInstance);
-        }
-    }
-
-#endif // OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
-}
-
-uint64_t otPlatTimeGet(void)
-{
-    return platformAlarmGetNow();
-}
-
-#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
-uint16_t otPlatTimeGetXtalAccuracy(void)
-{
-    return 0;
-}
-#endif
-
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME
diff --git a/examples/platforms/simulation/virtual_time/platform-sim.c b/examples/platforms/simulation/virtual_time/platform-sim.c
deleted file mode 100644
index fa0dd90..0000000
--- a/examples/platforms/simulation/virtual_time/platform-sim.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- *  Copyright (c) 2018, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file includes the platform-specific initializers.
- */
-
-#include "platform-simulation.h"
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME
-
-#include <assert.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <libgen.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <syslog.h>
-
-#include <openthread/tasklet.h>
-#include <openthread/platform/alarm-milli.h>
-
-#include "utils/uart.h"
-
-uint32_t gNodeId = 1;
-
-extern bool          gPlatformPseudoResetWasRequested;
-static volatile bool gTerminate = false;
-
-int    gArgumentsCount = 0;
-char **gArguments      = NULL;
-
-uint64_t sNow = 0; // microseconds
-int      sSockFd;
-uint16_t sPortOffset;
-
-static void handleSignal(int aSignal)
-{
-    OT_UNUSED_VARIABLE(aSignal);
-
-    gTerminate = true;
-}
-
-void otSimSendEvent(const struct Event *aEvent)
-{
-    ssize_t            rval;
-    struct sockaddr_in sockaddr;
-
-    memset(&sockaddr, 0, sizeof(sockaddr));
-    sockaddr.sin_family = AF_INET;
-    inet_pton(AF_INET, "127.0.0.1", &sockaddr.sin_addr);
-    sockaddr.sin_port = htons(9000 + sPortOffset);
-
-    rval = sendto(sSockFd, aEvent, offsetof(struct Event, mData) + aEvent->mDataLength, 0, (struct sockaddr *)&sockaddr,
-                  sizeof(sockaddr));
-
-    if (rval < 0)
-    {
-        perror("sendto");
-        exit(EXIT_FAILURE);
-    }
-}
-
-static void receiveEvent(otInstance *aInstance)
-{
-    struct Event event;
-    ssize_t      rval = recvfrom(sSockFd, (char *)&event, sizeof(event), 0, NULL, NULL);
-
-    if (rval < 0 || (uint16_t)rval < offsetof(struct Event, mData))
-    {
-        perror("recvfrom");
-        exit(EXIT_FAILURE);
-    }
-
-    platformAlarmAdvanceNow(event.mDelay);
-
-    switch (event.mEvent)
-    {
-    case OT_SIM_EVENT_ALARM_FIRED:
-        break;
-
-    case OT_SIM_EVENT_RADIO_RECEIVED:
-        platformRadioReceive(aInstance, event.mData, event.mDataLength);
-        break;
-
-    case OT_SIM_EVENT_UART_WRITE:
-        otPlatUartReceived(event.mData, event.mDataLength);
-        break;
-
-    default:
-        assert(false);
-    }
-}
-
-static void platformSendSleepEvent(void)
-{
-    struct Event event;
-
-    assert(platformAlarmGetNext() > 0);
-
-    event.mDelay      = platformAlarmGetNext();
-    event.mEvent      = OT_SIM_EVENT_ALARM_FIRED;
-    event.mDataLength = 0;
-
-    otSimSendEvent(&event);
-}
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART
-void platformUartRestore(void)
-{
-}
-
-otError otPlatUartEnable(void)
-{
-    return OT_ERROR_NONE;
-}
-
-otError otPlatUartDisable(void)
-{
-    return OT_ERROR_NONE;
-}
-
-otError otPlatUartSend(const uint8_t *aData, uint16_t aLength)
-{
-    otError      error = OT_ERROR_NONE;
-    struct Event event;
-
-    event.mDelay      = 0;
-    event.mEvent      = OT_SIM_EVENT_UART_WRITE;
-    event.mDataLength = aLength;
-
-    memcpy(event.mData, aData, aLength);
-
-    otSimSendEvent(&event);
-
-    otPlatUartSendDone();
-
-    return error;
-}
-
-otError otPlatUartFlush(void)
-{
-    return OT_ERROR_NONE;
-}
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART
-
-static void socket_init(void)
-{
-    struct sockaddr_in sockaddr;
-    char *             offset;
-    memset(&sockaddr, 0, sizeof(sockaddr));
-    sockaddr.sin_family = AF_INET;
-
-    offset = getenv("PORT_OFFSET");
-
-    if (offset)
-    {
-        char *endptr;
-
-        sPortOffset = (uint16_t)strtol(offset, &endptr, 0);
-
-        if (*endptr != '\0')
-        {
-            fprintf(stderr, "Invalid PORT_OFFSET: %s\n", offset);
-            exit(EXIT_FAILURE);
-        }
-
-        sPortOffset *= (MAX_NETWORK_SIZE + 1);
-    }
-
-    sockaddr.sin_port        = htons((uint16_t)(9000 + sPortOffset + gNodeId));
-    sockaddr.sin_addr.s_addr = INADDR_ANY;
-
-    sSockFd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-
-    if (sSockFd == -1)
-    {
-        perror("socket");
-        exit(EXIT_FAILURE);
-    }
-
-    if (bind(sSockFd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) == -1)
-    {
-        perror("bind");
-        exit(EXIT_FAILURE);
-    }
-}
-
-void otSysInit(int argc, char *argv[])
-{
-    char *endptr;
-
-    if (gPlatformPseudoResetWasRequested)
-    {
-        gPlatformPseudoResetWasRequested = false;
-        return;
-    }
-
-    if (argc != 2)
-    {
-        exit(EXIT_FAILURE);
-    }
-
-    openlog(basename(argv[0]), LOG_PID, LOG_USER);
-    setlogmask(setlogmask(0) & LOG_UPTO(LOG_NOTICE));
-
-    gArgumentsCount = argc;
-    gArguments      = argv;
-
-    gNodeId = (uint32_t)strtol(argv[1], &endptr, 0);
-
-    if (*endptr != '\0' || gNodeId < 1 || gNodeId > MAX_NETWORK_SIZE)
-    {
-        fprintf(stderr, "Invalid NodeId: %s\n", argv[1]);
-        exit(EXIT_FAILURE);
-    }
-
-    socket_init();
-
-    platformAlarmInit(1);
-    platformRadioInit();
-    platformRandomInit();
-
-    signal(SIGTERM, &handleSignal);
-    signal(SIGHUP, &handleSignal);
-}
-
-bool otSysPseudoResetWasRequested(void)
-{
-    return gPlatformPseudoResetWasRequested;
-}
-
-void otSysDeinit(void)
-{
-    close(sSockFd);
-}
-
-void otSysProcessDrivers(otInstance *aInstance)
-{
-    fd_set read_fds;
-    fd_set write_fds;
-    fd_set error_fds;
-    int    max_fd = -1;
-    int    rval;
-
-    if (gTerminate)
-    {
-        exit(0);
-    }
-
-    FD_ZERO(&read_fds);
-    FD_ZERO(&write_fds);
-    FD_ZERO(&error_fds);
-
-    FD_SET(sSockFd, &read_fds);
-    max_fd = sSockFd;
-
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART == 0
-    platformUartUpdateFdSet(&read_fds, &write_fds, &error_fds, &max_fd);
-#endif
-
-    if (!otTaskletsArePending(aInstance) && platformAlarmGetNext() > 0 && !platformRadioIsTransmitPending())
-    {
-        platformSendSleepEvent();
-
-        rval = select(max_fd + 1, &read_fds, &write_fds, &error_fds, NULL);
-
-        if ((rval < 0) && (errno != EINTR))
-        {
-            perror("select");
-            exit(EXIT_FAILURE);
-        }
-
-        if (rval > 0 && FD_ISSET(sSockFd, &read_fds))
-        {
-            receiveEvent(aInstance);
-        }
-    }
-
-    platformAlarmProcess(aInstance);
-    platformRadioProcess(aInstance, &read_fds, &write_fds);
-#if OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART == 0
-    platformUartProcess();
-#endif
-}
-
-#if OPENTHREAD_CONFIG_OTNS_ENABLE
-
-void otPlatOtnsStatus(const char *aStatus)
-{
-    struct Event event;
-    uint16_t     statusLength = (uint16_t)strlen(aStatus);
-
-    assert(statusLength < sizeof(event.mData));
-
-    memcpy(event.mData, aStatus, statusLength);
-    event.mDataLength = statusLength;
-    event.mDelay      = 0;
-    event.mEvent      = OT_SIM_EVENT_OTNS_STATUS_PUSH;
-
-    otSimSendEvent(&event);
-}
-
-#endif // OPENTHREAD_CONFIG_OTNS_ENABLE
-
-#endif // OPENTHREAD_SIMULATION_VIRTUAL_TIME
diff --git a/examples/platforms/utils/CMakeLists.txt b/examples/platforms/utils/CMakeLists.txt
deleted file mode 100644
index 3dcc67e..0000000
--- a/examples/platforms/utils/CMakeLists.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#  Copyright (c) 2019, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-add_library(openthread-platform-utils OBJECT
-    debug_uart.c
-    link_metrics.cpp
-    logging_rtt.c
-    mac_frame.cpp
-    otns_utils.cpp
-    settings_ram.c
-    soft_source_match_table.c
-)
-
-target_compile_definitions(openthread-platform-utils PRIVATE
-    $<TARGET_PROPERTY:ot-config,INTERFACE_COMPILE_DEFINITIONS>
-)
-
-target_include_directories(openthread-platform-utils PRIVATE
-    ${OT_PUBLIC_INCLUDES}
-    $<TARGET_PROPERTY:ot-config,INTERFACE_INCLUDE_DIRECTORIES>
-    ${PROJECT_SOURCE_DIR}/examples/platforms
-    ${PROJECT_SOURCE_DIR}/examples/platforms/utils
-    ${PROJECT_SOURCE_DIR}/third_party/jlink/SEGGER_RTT_V640/RTT
-)
-
-# Provide a static library implementation of platform-utils for non-cmake platforms
-add_library(openthread-platform-utils-static $<TARGET_OBJECTS:openthread-platform-utils>)
diff --git a/examples/platforms/utils/Makefile.am b/examples/platforms/utils/Makefile.am
deleted file mode 100644
index 53cd3db..0000000
--- a/examples/platforms/utils/Makefile.am
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-#  Copyright (c) 2016, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-lib_LIBRARIES                           = libopenthread-platform-utils.a
-noinst_LTLIBRARIES                      = libutils-link-metrics.la
-
-COMMON_FLAGS                                            = \
-    -I$(top_srcdir)/include                               \
-    -I$(top_srcdir)/examples/platforms                    \
-    -I$(top_srcdir)/src/core                              \
-    -I$(top_srcdir)/third_party/jlink/SEGGER_RTT_V640/RTT \
-    $(NULL)
-
-libutils_link_metrics_la_CPPFLAGS                       = \
-    $(COMMON_FLAGS)                                       \
-    -fno-threadsafe-statics                               \
-    $(NULL)
-
-libutils_link_metrics_la_SOURCES                        = \
-    link_metrics.cpp                                      \
-    link_metrics.h                                        \
-    $(NULL)
-
-libopenthread_platform_utils_a_CPPFLAGS                 = \
-    $(COMMON_FLAGS)                                       \
-    $(NULL)
-
-libopenthread_platform_utils_a_SOURCES  = \
-    code_utils.h                          \
-    debug_uart.c                          \
-    logging_rtt.c                         \
-    logging_rtt.h                         \
-    mac_frame.cpp                         \
-    mac_frame.h                           \
-    otns_utils.cpp                        \
-    settings.h                            \
-    settings_ram.c                        \
-    soft_source_match_table.c             \
-    soft_source_match_table.h             \
-    uart.h                                \
-    $(NULL)
-
-libopenthread_platform_utils_a_LIBADD  = \
-    libutils-link-metrics.la             \
-    $(NULL)
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/examples/platforms/utils/code_utils.h b/examples/platforms/utils/code_utils.h
deleted file mode 100644
index 90c4827..0000000
--- a/examples/platforms/utils/code_utils.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  Copyright (c) 2017, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file includes macros for validating runtime conditions.
- */
-
-#ifndef CODE_UTILS_H
-#define CODE_UTILS_H
-
-/**
- *  This checks for the specified condition, which is expected to
- *  commonly be true, and branches to the local label 'exit' if the
- *  condition is false.
- *
- *  @param[in]  aCondition  A Boolean expression to be evaluated.
- *
- */
-#define otEXPECT(aCondition) \
-    do                       \
-    {                        \
-        if (!(aCondition))   \
-        {                    \
-            goto exit;       \
-        }                    \
-    } while (0)
-
-/**
- *  This checks for the specified condition, which is expected to
- *  commonly be true, and both executes @p anAction and branches to
- *  the local label 'exit' if the condition is false.
- *
- *  @param[in]  aCondition  A Boolean expression to be evaluated.
- *  @param[in]  aAction     An expression or block to execute when the
- *                          assertion fails.
- *
- */
-#define otEXPECT_ACTION(aCondition, aAction) \
-    do                                       \
-    {                                        \
-        if (!(aCondition))                   \
-        {                                    \
-            aAction;                         \
-            goto exit;                       \
-        }                                    \
-    } while (0)
-
-/**
- * This macro calculates the number of elements in an array.
- *
- * @param[in] aArray  Name of the array variable.
- *
- * @returns Number of elements in the array.
- *
- */
-#define otARRAY_LENGTH(aArray) (sizeof(aArray) / sizeof(aArray[0]))
-
-#endif // CODE_UTILS_H
diff --git a/examples/platforms/utils/debug_uart.c b/examples/platforms/utils/debug_uart.c
deleted file mode 100644
index e1d10bd..0000000
--- a/examples/platforms/utils/debug_uart.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *  Copyright (c) 2017, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-#include <openthread-core-config.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <openthread/config.h>
-
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/debug_uart.h>
-#include <openthread/platform/toolchain.h>
-
-/*
- * Implementation note:
- *   These are all "weak" so that a platform may if it chooses  override the instance.
- */
-
-OT_TOOL_WEAK
-void otPlatDebugUart_printf(const char *fmt, ...)
-{
-    va_list ap;
-    va_start(ap, fmt);
-    otPlatDebugUart_vprintf(fmt, ap);
-    va_end(ap);
-}
-
-OT_TOOL_WEAK
-void otPlatDebugUart_vprintf(const char *fmt, va_list ap)
-{
-    char buf[128];
-    /* by standard ...
-     * vsnprintf() always null terminates
-     */
-    vsnprintf(buf, sizeof(buf), fmt, ap);
-    /* however ... some platforms have bugs */
-    buf[sizeof(buf) - 1] = 0;
-    otPlatDebugUart_puts_no_nl(buf);
-}
-
-OT_TOOL_WEAK
-void otPlatDebugUart_write_bytes(const uint8_t *pBytes, int nBytes)
-{
-    while (nBytes > 0)
-    {
-        otPlatDebugUart_putchar((int)(*pBytes));
-        pBytes++;
-        nBytes--;
-    }
-}
-
-OT_TOOL_WEAK
-void otPlatDebugUart_puts_no_nl(const char *s)
-{
-    while (*s)
-    {
-        otPlatDebugUart_putchar(*s);
-        s++;
-    }
-}
-
-OT_TOOL_WEAK
-void otPlatDebugUart_puts(const char *s)
-{
-    otPlatDebugUart_puts_no_nl(s);
-    otPlatDebugUart_putchar('\n');
-}
-
-OT_TOOL_WEAK
-void otPlatDebugUart_putchar(int c)
-{
-    /* map lf to crlf as needed */
-    if (c == '\n')
-    {
-        otPlatDebugUart_putchar_raw('\r');
-    }
-
-    otPlatDebugUart_putchar_raw(c);
-}
-
-/* provide WEAK stubs for platforms that do not implement all functions */
-OT_TOOL_WEAK
-void otPlatDebugUart_putchar_raw(int c)
-{
-    OT_UNUSED_VARIABLE(c);
-}
-
-OT_TOOL_WEAK
-int otPlatDebugUart_kbhit(void)
-{
-    return 0; /* nothing */
-}
-
-OT_TOOL_WEAK
-int otPlatDebugUart_getc(void)
-{
-    return -1; /* nothing */
-}
-
-OT_TOOL_WEAK
-otError otPlatDebugUart_logfile(const char *filename)
-{
-    OT_UNUSED_VARIABLE(filename);
-
-    return OT_ERROR_FAILED;
-}
-
-#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART)
-/* this should not be a WEAK function */
-void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
-{
-    OT_UNUSED_VARIABLE(aLogLevel);
-    OT_UNUSED_VARIABLE(aLogRegion);
-
-    va_list  ap;
-    uint32_t now;
-
-    now = otPlatAlarmMilliGetNow();
-    otPlatDebugUart_printf("%3d.%03d | ", (int)(now / 1000), (int)(now % 1000));
-    va_start(ap, aFormat);
-    otPlatDebugUart_vprintf(aFormat, ap);
-    va_end(ap);
-
-    otPlatDebugUart_putchar('\n');
-}
-#endif
diff --git a/examples/platforms/utils/encoding.h b/examples/platforms/utils/encoding.h
deleted file mode 100644
index 55e3f43..0000000
--- a/examples/platforms/utils/encoding.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *  Copyright (c) 2020, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file includes macros for validating runtime conditions.
- */
-
-#ifndef PLATFORM_UTILS_ENCODING_H
-#define PLATFORM_UTILS_ENCODING_H
-
-#include <stdint.h>
-
-/**
- * Converts a 64-bit unsigned integer stored as a little-endian byte
- * array to uint64_t.
- *
- * Allows for the array to be byte-aligned, so that loading the
- * uint64_t value via this function avoids a processor exception due
- * to unaligned access.
- *
- * @param[in]  aSource  The byte array.
- *
- * @returns The 64-bit value as a uint64_t.
- *
- */
-static inline uint64_t otEncodingReadUint64Le(const uint8_t *aSource)
-{
-    uint64_t value = 0;
-
-    value |= (uint64_t)aSource[0];
-    value |= ((uint64_t)aSource[1]) << 8;
-    value |= ((uint64_t)aSource[2]) << 16;
-    value |= ((uint64_t)aSource[3]) << 24;
-    value |= ((uint64_t)aSource[4]) << 32;
-    value |= ((uint64_t)aSource[5]) << 40;
-    value |= ((uint64_t)aSource[6]) << 48;
-    value |= ((uint64_t)aSource[7]) << 56;
-
-    return value;
-}
-
-#endif // PLATFORM_UTILS_ENCODING_H
diff --git a/examples/platforms/utils/link_metrics.cpp b/examples/platforms/utils/link_metrics.cpp
deleted file mode 100644
index a09fab4..0000000
--- a/examples/platforms/utils/link_metrics.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- *  Copyright (c) 2020, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "link_metrics.h"
-
-#include <openthread/link_metrics.h>
-
-#include "common/clearable.hpp"
-#include "common/linked_list.hpp"
-#include "common/pool.hpp"
-#include "thread/link_quality.hpp"
-
-#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE || OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
-
-using namespace ot;
-
-static int8_t sNoiseFloor; ///< The noise floor used by Link Metrics. It should be set to the platform's
-                           ///< noise floor (measured noise floor, receiver sensitivity or a constant).
-
-class LinkMetricsDataInfo : public LinkedListEntry<LinkMetricsDataInfo>, public Clearable<LinkMetricsDataInfo>
-{
-    friend class LinkedList<LinkMetricsDataInfo>;
-    friend class LinkedListEntry<LinkMetricsDataInfo>;
-
-public:
-    /**
-     * Construtor.
-     *
-     */
-    LinkMetricsDataInfo(void) { Clear(); };
-
-    /**
-     * Set the information for this object.
-     *
-     * @param[in]  aLinkMetrics     Flags specifying what metrics to query.
-     * @param[in]  aShortAddress    Short Address of the Probing Initiator tracked by this object.
-     * @param[in]  aExtAddress      A reference to the Extended Address of the Probing Initiator tracked by this
-     *                              object.
-     *
-     */
-    void Set(otLinkMetrics aLinkMetrics, otShortAddress aShortAddress, const otExtAddress &aExtAddress)
-    {
-        mLinkMetrics  = aLinkMetrics;
-        mShortAddress = aShortAddress;
-        memcpy(mExtAddress.m8, aExtAddress.m8, sizeof(aExtAddress));
-    }
-
-    /**
-     * This method gets Link Metrics data stored in this object.
-     *
-     * TODO: Currently the order of Link Metircs data is fixed. Will update it to follow the order specified in TLV.
-     *
-     * @param[in]   aLqi     LQI value of the acknowledeged frame.
-     * @param[in]   aRssi    RSSI value of the acknowledged frame.
-     * @param[out]  aData    A pointer to the output buffer. @p aData MUST NOT be `nullptr`. The buffer must have
-     *                       at least 2 bytes (per spec 4.11.3.4.4.6). Otherwise the behavior would be undefined.
-     *
-     * @returns  The number of bytes written. `0` on failure.
-     *
-     */
-    uint8_t GetEnhAckData(uint8_t aLqi, int8_t aRssi, uint8_t *aData) const
-    {
-        enum
-        {
-            kEnhAckProbingDataMaxLen = 2,
-        };
-
-        uint8_t bytes = 0;
-
-        VerifyOrExit(aData != nullptr);
-
-        if (mLinkMetrics.mLqi)
-        {
-            aData[bytes++] = aLqi;
-        }
-        if (mLinkMetrics.mLinkMargin)
-        {
-            aData[bytes++] = static_cast<uint8_t>(GetLinkMargin(aRssi) * 255 /
-                                                  130); // Linear scale Link Margin from [0, 130] to [0, 255]
-        }
-        if (bytes < kEnhAckProbingDataMaxLen && mLinkMetrics.mRssi)
-        {
-            aData[bytes++] =
-                static_cast<uint8_t>((aRssi + 130) * 255 / 130); // Linear scale RSSI from [-130, 0] to [0, 255]
-        }
-
-    exit:
-        return bytes;
-    }
-
-    /**
-     * This method gets the length of Link Metrics Data.
-     *
-     * @returns  The number of bytes for the data.
-     *
-     */
-    uint8_t GetEnhAckDataLen() const
-    {
-        return static_cast<uint8_t>(mLinkMetrics.mLqi) + static_cast<uint8_t>(mLinkMetrics.mLinkMargin) +
-               static_cast<uint8_t>(mLinkMetrics.mRssi);
-    }
-
-    /**
-     * This method gets the metrics configured for the Enhanced-ACK Based Probing.
-     *
-     * @returns  The metrics configured.
-     *
-     */
-    otLinkMetrics GetLinkMetrics(void) const { return mLinkMetrics; }
-
-private:
-    uint8_t GetLinkMargin(int8_t aRssi) const { return LinkQualityInfo::ConvertRssToLinkMargin(sNoiseFloor, aRssi); }
-
-    bool Matches(const otShortAddress &aShortAddress) const { return mShortAddress == aShortAddress; };
-
-    bool Matches(const otExtAddress &aExtAddress) const
-    {
-        return memcmp(&mExtAddress, &aExtAddress, sizeof(otExtAddress)) == 0;
-    };
-
-    LinkMetricsDataInfo *mNext;
-
-    otLinkMetrics mLinkMetrics;
-
-    otShortAddress mShortAddress;
-    otExtAddress   mExtAddress;
-};
-
-enum
-{
-    kMaxEnhAckProbingInitiator = OPENTHREAD_CONFIG_MLE_LINK_METRICS_MAX_SERIES_SUPPORTED,
-};
-
-typedef Pool<LinkMetricsDataInfo, kMaxEnhAckProbingInitiator> LinkMetricsDataInfoPool;
-
-typedef LinkedList<LinkMetricsDataInfo> LinkMetricsDataInfoList;
-
-static LinkMetricsDataInfoPool &GetLinkMetricsDataInfoPool(void)
-{
-    static LinkMetricsDataInfoPool sDataInfoPool;
-    return sDataInfoPool;
-}
-
-static LinkMetricsDataInfoList &GetLinkMetricsDataInfoActiveList(void)
-{
-    static LinkMetricsDataInfoList sDataInfoActiveList;
-    return sDataInfoActiveList;
-}
-
-static inline bool IsLinkMetricsClear(otLinkMetrics aLinkMetrics)
-{
-    return !aLinkMetrics.mPduCount && !aLinkMetrics.mLqi && !aLinkMetrics.mLinkMargin && !aLinkMetrics.mRssi;
-}
-
-void otLinkMetricsInit(int8_t aNoiseFloor)
-{
-    sNoiseFloor = aNoiseFloor;
-}
-
-otError otLinkMetricsConfigureEnhAckProbing(otShortAddress      aShortAddress,
-                                            const otExtAddress *aExtAddress,
-                                            otLinkMetrics       aLinkMetrics)
-{
-    otError              error    = OT_ERROR_NONE;
-    LinkMetricsDataInfo *dataInfo = nullptr;
-
-    VerifyOrExit(aExtAddress != nullptr, error = OT_ERROR_INVALID_ARGS);
-
-    if (IsLinkMetricsClear(aLinkMetrics)) ///< Remove the entry
-    {
-        dataInfo = GetLinkMetricsDataInfoActiveList().RemoveMatching(aShortAddress);
-        VerifyOrExit(dataInfo != nullptr, error = OT_ERROR_NOT_FOUND);
-        GetLinkMetricsDataInfoPool().Free(*dataInfo);
-    }
-    else
-    {
-        dataInfo = GetLinkMetricsDataInfoActiveList().FindMatching(aShortAddress);
-
-        if (dataInfo == nullptr)
-        {
-            dataInfo = GetLinkMetricsDataInfoPool().Allocate();
-            VerifyOrExit(dataInfo != nullptr, error = OT_ERROR_NO_BUFS);
-            dataInfo->Clear();
-            GetLinkMetricsDataInfoActiveList().Push(*dataInfo);
-        }
-
-        // Overwrite the previous configuration if it already existed.
-        dataInfo->Set(aLinkMetrics, aShortAddress, *aExtAddress);
-    }
-
-exit:
-    return error;
-}
-
-LinkMetricsDataInfo *GetLinkMetricsInfoByMacAddress(const otMacAddress *aMacAddress)
-{
-    LinkMetricsDataInfo *dataInfo = nullptr;
-
-    VerifyOrExit(aMacAddress != nullptr);
-
-    if (aMacAddress->mType == OT_MAC_ADDRESS_TYPE_SHORT)
-    {
-        dataInfo = GetLinkMetricsDataInfoActiveList().FindMatching(aMacAddress->mAddress.mShortAddress);
-    }
-    else if (aMacAddress->mType == OT_MAC_ADDRESS_TYPE_EXTENDED)
-    {
-        dataInfo = GetLinkMetricsDataInfoActiveList().FindMatching(aMacAddress->mAddress.mExtAddress);
-    }
-
-exit:
-    return dataInfo;
-}
-
-uint8_t otLinkMetricsEnhAckGenData(const otMacAddress *aMacAddress, uint8_t aLqi, int8_t aRssi, uint8_t *aData)
-{
-    uint8_t              bytes    = 0;
-    LinkMetricsDataInfo *dataInfo = GetLinkMetricsInfoByMacAddress(aMacAddress);
-
-    VerifyOrExit(dataInfo != nullptr);
-
-    bytes = dataInfo->GetEnhAckData(aLqi, aRssi, aData);
-
-exit:
-    return bytes;
-}
-
-uint8_t otLinkMetricsEnhAckGetDataLen(const otMacAddress *aMacAddress)
-{
-    uint8_t              len      = 0;
-    LinkMetricsDataInfo *dataInfo = GetLinkMetricsInfoByMacAddress(aMacAddress);
-
-    VerifyOrExit(dataInfo != nullptr);
-    len = dataInfo->GetEnhAckDataLen();
-
-exit:
-    return len;
-}
-#endif // OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE || OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
diff --git a/examples/platforms/utils/link_metrics.h b/examples/platforms/utils/link_metrics.h
deleted file mode 100644
index 099d64b..0000000
--- a/examples/platforms/utils/link_metrics.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *  Copyright (c) 2020, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file defines the link metrics interface for OpenThread platform radio drivers.
- *
- *   APIs defined in this module could be used by a platform to implement Enhanced-ACK Based Probing feature
- *   (Probing Subject side) in its radio driver.
- *
- */
-
-#ifndef OPENTHREAD_UTILS_LINK_METRICS_H
-#define OPENTHREAD_UTILS_LINK_METRICS_H
-
-#include <openthread/link_metrics.h>
-
-#include "mac_frame.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * This method initializes the Link Metrics util module.
- *
- * @param[in]  aNoiseFloor    The noise floor used by Link Metrics. It should be set to the platform's
- *                            noise floor (measured noise floor, receiver sensitivity or a constant).
- *
- */
-void otLinkMetricsInit(int8_t aNoiseFloor);
-
-/**
- * This method sets/clears Enhanced-ACK Based Probing for a specific Initiator.
- *
- * This method can start/stop Enhanced-ACK Based Probing for a neighbor that has the address @p aShortAddress and
- * @p aExtAddress. Once the Probing is started, the device would record the Link Metrics data of link layer frames
- * sent from that neighbor and include the data into header IE in Enhanced-ACK sent to that neighbor.
- *
- * @param[in]  aShortAddress    The short address of the Initiator.
- * @param[in]  aExtAddress      A pointer to the extended address of the Initiator.
- * @param[in]  aLinkMetrics     Flags specifying what metrics to query (Pdu Count would be omitted). When
- *                              @p aLinkMetrics is eqaul to `0`, this method clears the Initiator.
- *
- * @retval  OT_ERROR_NONE            Successfully configured the Enhanced-ACK Based Probing.
- * @retval  OT_ERROR_INVALID_ARGS    @p aExtAddress is `nullptr`.
- * @retval  OT_ERROR_NOT_FOUND       The Initiator indicated by @p aShortAddress is not found when trying to clear.
- * @retval  OT_ERROR_NO_BUFS         No more Initiator can be supported.
- *
- */
-otError otLinkMetricsConfigureEnhAckProbing(otShortAddress      aShortAddress,
-                                            const otExtAddress *aExtAddress,
-                                            otLinkMetrics       aLinkMetrics);
-
-/**
- * This method generates the Link Metrics data (assessed for the acknowledged frame) bytes that would be included in
- * Vendor-Specific IE.
- *
- * This method first checks what Link Metrics are specified by the Initiator indicated by @p aMacAddress. And then
- * write the values to @p aData.
- *
- * @param[in]  aMacAddress    The Mac address of the Initiator.
- * @param[in]  aLqi           LQI value of the acknowledged frame.
- * @param[in]  aRssi          RSSI value of the acknowledged frame.
- * @param[out] aData          A pointer to the buffer where the data would be written to. The caller should make
- *                            sure that the size of the buffer is not less than the size of Link Metrics data
- *                            configured before.
- *
- * @returns  The size of data read. Would be `0` if the Initiator is not found or @p aData is invalid.
- *
- */
-uint8_t otLinkMetricsEnhAckGenData(const otMacAddress *aMacAddress, uint8_t aLqi, int8_t aRssi, uint8_t *aData);
-
-/**
- * This method returns the data length of Enhanced-ACK Based Probing for a specific Initiator.
- *
- * @param[in]  aMacAddress    The Mac address of the Initiator.
- *
- * @returns  The size of data. `0` if it's not configured for the Initiator.
- *
- */
-uint8_t otLinkMetricsEnhAckGetDataLen(const otMacAddress *aMacAddress);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // OPENTHREAD_UTILS_LINK_METRICS_H
diff --git a/examples/platforms/utils/logging_rtt.c b/examples/platforms/utils/logging_rtt.c
deleted file mode 100644
index e58db65..0000000
--- a/examples/platforms/utils/logging_rtt.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- *  Copyright (c) 2018, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements the OpenThread platform abstraction for logging.
- *
- */
-
-#include <openthread-core-config.h>
-#include <openthread/config.h>
-
-#include <utils/code_utils.h>
-#include <openthread/platform/alarm-milli.h>
-#include <openthread/platform/logging.h>
-
-#include "SEGGER_RTT.h"
-#include "logging_rtt.h"
-
-#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED)
-#if (LOG_RTT_COLOR_ENABLE == 1)
-#define RTT_COLOR_CODE_DEFAULT "\x1B[0m"
-#define RTT_COLOR_CODE_RED "\x1B[1;31m"
-#define RTT_COLOR_CODE_GREEN "\x1B[1;32m"
-#define RTT_COLOR_CODE_YELLOW "\x1B[1;33m"
-#define RTT_COLOR_CODE_CYAN "\x1B[1;36m"
-#else // LOG_RTT_COLOR_ENABLE == 1
-#define RTT_COLOR_CODE_DEFAULT ""
-#define RTT_COLOR_CODE_RED ""
-#define RTT_COLOR_CODE_GREEN ""
-#define RTT_COLOR_CODE_YELLOW ""
-#define RTT_COLOR_CODE_CYAN ""
-#endif // LOG_RTT_COLOR_ENABLE == 1
-
-static bool sLogInitialized = false;
-
-#if LOG_RTT_BUFFER_INDEX != 0
-static uint8_t sLogBuffer[LOG_RTT_BUFFER_SIZE];
-#endif
-
-/**
- * Function for getting color of a given level log.
- *
- * @param[in]  aLogLevel The log level.
- *
- * @returns  String with a log level color value.
- */
-static inline const char *levelToString(otLogLevel aLogLevel)
-{
-    switch (aLogLevel)
-    {
-    case OT_LOG_LEVEL_CRIT:
-        return RTT_COLOR_CODE_RED;
-
-    case OT_LOG_LEVEL_WARN:
-        return RTT_COLOR_CODE_YELLOW;
-
-    case OT_LOG_LEVEL_INFO:
-        return RTT_COLOR_CODE_GREEN;
-
-    case OT_LOG_LEVEL_DEBG:
-    default:
-        return RTT_COLOR_CODE_DEFAULT;
-    }
-}
-
-#if (LOG_TIMESTAMP_ENABLE == 1)
-/**
- * Function for printing actual timestamp.
- *
- * @param[in,out]  aLogString Pointer to the log buffer.
- * @param[in]      aMaxSize   Maximum size of the log buffer.
- *
- * @returns  Number of bytes successfully written to the log buffer.
- */
-static inline int logTimestamp(char *aLogString, uint16_t aMaxSize)
-{
-    long unsigned int now = otPlatAlarmMilliGetNow();
-    return snprintf(aLogString, (size_t)aMaxSize, "%s[%010lu]", RTT_COLOR_CODE_CYAN, now);
-}
-#endif
-
-/**
- * Function for printing log level.
- *
- * @param[in,out]  aLogString  Pointer to log buffer.
- * @param[in]      aMaxSize    Maximum size of log buffer.
- * @param[in]      aLogLevel   Log level.
- *
- * @returns  Number of bytes successfully written to the log buffer.
- */
-static inline int logLevel(char *aLogString, uint16_t aMaxSize, otLogLevel aLogLevel)
-{
-    return snprintf(aLogString, (size_t)aMaxSize, "%s ", levelToString(aLogLevel));
-}
-
-void utilsLogRttInit(void)
-{
-#if LOG_RTT_BUFFER_INDEX != 0
-    int res = SEGGER_RTT_ConfigUpBuffer(LOG_RTT_BUFFER_INDEX, LOG_RTT_BUFFER_NAME, sLogBuffer, LOG_RTT_BUFFER_SIZE,
-                                        SEGGER_RTT_MODE_NO_BLOCK_TRIM);
-#else
-    int res = SEGGER_RTT_SetFlagsUpBuffer(LOG_RTT_BUFFER_INDEX, SEGGER_RTT_MODE_NO_BLOCK_TRIM);
-#endif
-
-    otEXPECT(res >= 0);
-
-    sLogInitialized = true;
-
-exit:
-    return;
-}
-
-void utilsLogRttDeinit(void)
-{
-    sLogInitialized = false;
-}
-
-void utilsLogRttOutput(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap)
-{
-    (void)aLogRegion;
-
-    uint16_t length = 0;
-    int      charsWritten;
-    char     logString[LOG_PARSE_BUFFER_SIZE + 1];
-
-    otEXPECT(sLogInitialized == true);
-
-#if (LOG_TIMESTAMP_ENABLE == 1)
-    length += logTimestamp(logString, LOG_PARSE_BUFFER_SIZE);
-#endif
-
-    // Add level information.
-    length += logLevel(&logString[length], (LOG_PARSE_BUFFER_SIZE - length), aLogLevel);
-
-    charsWritten = vsnprintf(&logString[length], (size_t)(LOG_PARSE_BUFFER_SIZE - length), aFormat, ap);
-    otEXPECT(charsWritten >= 0);
-    length += charsWritten;
-
-    if (length > LOG_PARSE_BUFFER_SIZE)
-    {
-        length = LOG_PARSE_BUFFER_SIZE;
-    }
-
-    logString[length++] = '\n';
-
-    // Write user log to the RTT memory block.
-    SEGGER_RTT_WriteNoLock(0, logString, length);
-
-exit:
-    return;
-}
-#endif // (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED)
diff --git a/examples/platforms/utils/logging_rtt.h b/examples/platforms/utils/logging_rtt.h
deleted file mode 100644
index 19f6bab..0000000
--- a/examples/platforms/utils/logging_rtt.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *  Copyright (c) 2018, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file defines the logging rtt interfaces and default constants used by logging_rtt.c.
- */
-
-#ifndef UTILS_LOGGING_RTT_H
-#define UTILS_LOGGING_RTT_H
-
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-
-#include "openthread-core-config.h"
-#include <openthread/config.h>
-#include <openthread/platform/logging.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @def LOG_RTT_BUFFER_INDEX
- *
- * RTT's buffer index.
- *
- */
-#ifndef LOG_RTT_BUFFER_INDEX
-#define LOG_RTT_BUFFER_INDEX 0
-#endif
-
-/**
- * @def LOG_RTT_BUFFER_NAME
- *
- * RTT's name. Only used if LOG_RTT_BUFFER_INDEX is not 0. Otherwise,
- * the buffer name is fixed to "Terminal".
- *
- */
-#ifndef LOG_RTT_BUFFER_NAME
-#define LOG_RTT_BUFFER_NAME "Terminal"
-#endif
-
-/**
- * @def LOG_RTT_BUFFER_SIZE
- *
- * LOG RTT's buffer size. Only used if LOG_RTT_BUFFER_INDEX is not 0. To
- * configure buffer #0 size, check the BUFFER_SIZE_UP definition in
- * SEGGER_RTT_Conf.h
- *
- */
-#ifndef LOG_RTT_BUFFER_SIZE
-#define LOG_RTT_BUFFER_SIZE 256
-#endif
-
-/**
- * @def LOG_RTT_COLOR_ENABLE
- *
- * Enable colors on RTT Viewer.
- *
- */
-#ifndef LOG_RTT_COLOR_ENABLE
-#define LOG_RTT_COLOR_ENABLE 1
-#endif
-
-/**
- * @def LOG_PARSE_BUFFER_SIZE
- *
- * LOG buffer used to parse print format. It will be locally allocated on the
- * stack.
- *
- */
-#ifndef LOG_PARSE_BUFFER_SIZE
-#define LOG_PARSE_BUFFER_SIZE 128
-#endif
-
-/**
- * @def LOG_TIMESTAMP_ENABLE
- *
- * Enable timestamp in the logs.
- *
- */
-#ifndef LOG_TIMESTAMP_ENABLE
-#define LOG_TIMESTAMP_ENABLE 1
-#endif
-
-/**
- * Initialization of Logger driver.
- *
- */
-void utilsLogRttInit(void);
-
-/**
- * Deinitialization of Logger driver.
- *
- */
-void utilsLogRttDeinit(void);
-
-/**
- * This function outputs logs to SEGGER RTT.
- *
- * @param[in]  aLogLevel   The log level.
- * @param[in]  aLogRegion  The log region.
- * @param[in]  aFormat     A pointer to the format string.
- * @param[in]  ap          va_list matching information for aFormat
- *
- */
-void utilsLogRttOutput(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // UTILS_LOGGING_RTT_H
diff --git a/examples/platforms/utils/mac_frame.cpp b/examples/platforms/utils/mac_frame.cpp
deleted file mode 100644
index de23883..0000000
--- a/examples/platforms/utils/mac_frame.cpp
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "mac_frame.h"
-
-#include <assert.h>
-#include "mac/mac_frame.hpp"
-
-using namespace ot;
-
-bool otMacFrameDoesAddrMatch(const otRadioFrame *aFrame,
-                             otPanId             aPanId,
-                             otShortAddress      aShortAddress,
-                             const otExtAddress *aExtAddress)
-{
-    const Mac::Frame &frame = *static_cast<const Mac::Frame *>(aFrame);
-    bool              rval  = true;
-    Mac::Address      dst;
-    Mac::PanId        panid;
-
-    SuccessOrExit(frame.GetDstAddr(dst));
-
-    switch (dst.GetType())
-    {
-    case Mac::Address::kTypeShort:
-        VerifyOrExit(dst.GetShort() == Mac::kShortAddrBroadcast || dst.GetShort() == aShortAddress, rval = false);
-        break;
-
-    case Mac::Address::kTypeExtended:
-        VerifyOrExit(dst.GetExtended() == *static_cast<const Mac::ExtAddress *>(aExtAddress), rval = false);
-        break;
-
-    case Mac::Address::kTypeNone:
-        break;
-    }
-
-    SuccessOrExit(frame.GetDstPanId(panid));
-    VerifyOrExit(panid == Mac::kPanIdBroadcast || panid == aPanId, rval = false);
-
-exit:
-    return rval;
-}
-
-bool otMacFrameIsAck(const otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->GetType() == Mac::Frame::kFcfFrameAck;
-}
-
-bool otMacFrameIsData(const otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->GetType() == Mac::Frame::kFcfFrameData;
-}
-
-bool otMacFrameIsCommand(const otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->GetType() == Mac::Frame::kFcfFrameMacCmd;
-}
-
-bool otMacFrameIsDataRequest(const otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->IsDataRequestCommand();
-}
-
-bool otMacFrameIsAckRequested(const otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->GetAckRequest();
-}
-
-static void GetOtMacAddress(const Mac::Address &aInAddress, otMacAddress *aOutAddress)
-{
-    switch (aInAddress.GetType())
-    {
-    case Mac::Address::kTypeNone:
-        aOutAddress->mType = OT_MAC_ADDRESS_TYPE_NONE;
-        break;
-
-    case Mac::Address::kTypeShort:
-        aOutAddress->mType                  = OT_MAC_ADDRESS_TYPE_SHORT;
-        aOutAddress->mAddress.mShortAddress = aInAddress.GetShort();
-        break;
-
-    case Mac::Address::kTypeExtended:
-        aOutAddress->mType                = OT_MAC_ADDRESS_TYPE_EXTENDED;
-        aOutAddress->mAddress.mExtAddress = aInAddress.GetExtended();
-        break;
-    }
-}
-
-otError otMacFrameGetSrcAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress)
-{
-    otError      error;
-    Mac::Address address;
-
-    error = static_cast<const Mac::Frame *>(aFrame)->GetSrcAddr(address);
-    SuccessOrExit(error);
-
-    GetOtMacAddress(address, aMacAddress);
-
-exit:
-    return error;
-}
-
-otError otMacFrameGetDstAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress)
-{
-    otError      error;
-    Mac::Address address;
-
-    error = static_cast<const Mac::Frame *>(aFrame)->GetDstAddr(address);
-    SuccessOrExit(error);
-
-    GetOtMacAddress(address, aMacAddress);
-
-exit:
-    return error;
-}
-
-uint8_t otMacFrameGetSequence(const otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->GetSequence();
-}
-
-void otMacFrameProcessTransmitAesCcm(otRadioFrame *aFrame, const otExtAddress *aExtAddress)
-{
-    static_cast<Mac::TxFrame *>(aFrame)->ProcessTransmitAesCcm(*static_cast<const Mac::ExtAddress *>(aExtAddress));
-}
-
-bool otMacFrameIsVersion2015(const otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->IsVersion2015();
-}
-
-void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending, otRadioFrame *aAckFrame)
-{
-    assert(aFrame != nullptr && aAckFrame != nullptr);
-
-    static_cast<Mac::TxFrame *>(aAckFrame)->GenerateImmAck(*static_cast<const Mac::RxFrame *>(aFrame), aIsFramePending);
-}
-
-#if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2
-otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
-                                 bool                aIsFramePending,
-                                 const uint8_t *     aIeData,
-                                 uint8_t             aIeLength,
-                                 otRadioFrame *      aAckFrame)
-{
-    assert(aFrame != nullptr && aAckFrame != nullptr);
-
-    return static_cast<Mac::TxFrame *>(aAckFrame)->GenerateEnhAck(*static_cast<const Mac::RxFrame *>(aFrame),
-                                                                  aIsFramePending, aIeData, aIeLength);
-}
-#endif
-
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-void otMacFrameSetCslIe(otRadioFrame *aFrame, uint16_t aCslPeriod, uint16_t aCslPhase)
-{
-    static_cast<Mac::Frame *>(aFrame)->SetCslIe(aCslPeriod, aCslPhase);
-}
-#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-
-bool otMacFrameIsSecurityEnabled(otRadioFrame *aFrame)
-{
-    return static_cast<const Mac::Frame *>(aFrame)->GetSecurityEnabled();
-}
-
-bool otMacFrameIsKeyIdMode1(otRadioFrame *aFrame)
-{
-    uint8_t keyIdMode;
-    otError error;
-
-    error = static_cast<const Mac::Frame *>(aFrame)->GetKeyIdMode(keyIdMode);
-
-    return (error == OT_ERROR_NONE) ? (keyIdMode == Mac::Frame::kKeyIdMode1) : false;
-}
-
-uint8_t otMacFrameGetKeyId(otRadioFrame *aFrame)
-{
-    uint8_t keyId = 0;
-
-    IgnoreError(static_cast<const Mac::Frame *>(aFrame)->GetKeyId(keyId));
-
-    return keyId;
-}
-
-void otMacFrameSetKeyId(otRadioFrame *aFrame, uint8_t aKeyId)
-{
-    static_cast<Mac::Frame *>(aFrame)->SetKeyId(aKeyId);
-}
-
-uint32_t otMacFrameGetFrameCounter(otRadioFrame *aFrame)
-{
-    uint32_t frameCounter = UINT32_MAX;
-
-    IgnoreError(static_cast<Mac::Frame *>(aFrame)->GetFrameCounter(frameCounter));
-
-    return frameCounter;
-}
-
-void otMacFrameSetFrameCounter(otRadioFrame *aFrame, uint32_t aFrameCounter)
-{
-    static_cast<Mac::Frame *>(aFrame)->SetFrameCounter(aFrameCounter);
-}
-
-#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
-uint8_t otMacFrameGenerateCslIeTemplate(uint8_t *aDest)
-{
-    assert(aDest != nullptr);
-
-    reinterpret_cast<Mac::HeaderIe *>(aDest)->SetId(Mac::CslIe::kHeaderIeId);
-    reinterpret_cast<Mac::HeaderIe *>(aDest)->SetLength(sizeof(Mac::CslIe));
-
-    return sizeof(Mac::HeaderIe) + sizeof(Mac::CslIe);
-}
-#endif
-
-#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
-uint8_t otMacFrameGenerateEnhAckProbingIe(uint8_t *aDest, const uint8_t *aIeData, uint8_t aIeDataLength)
-{
-    uint8_t len = sizeof(Mac::VendorIeHeader) + aIeDataLength;
-
-    assert(aDest != nullptr);
-
-    reinterpret_cast<Mac::HeaderIe *>(aDest)->SetId(Mac::ThreadIe::kHeaderIeId);
-    reinterpret_cast<Mac::HeaderIe *>(aDest)->SetLength(len);
-
-    aDest += sizeof(Mac::HeaderIe);
-
-    reinterpret_cast<Mac::VendorIeHeader *>(aDest)->SetVendorOui(Mac::ThreadIe::kVendorOuiThreadCompanyId);
-    reinterpret_cast<Mac::VendorIeHeader *>(aDest)->SetSubType(Mac::ThreadIe::kEnhAckProbingIe);
-
-    if (aIeData != nullptr)
-    {
-        aDest += sizeof(Mac::VendorIeHeader);
-        memcpy(aDest, aIeData, aIeDataLength);
-    }
-
-    return sizeof(Mac::HeaderIe) + len;
-}
-
-void otMacFrameSetEnhAckProbingIe(otRadioFrame *aFrame, const uint8_t *aData, uint8_t aDataLen)
-{
-    assert(aFrame != nullptr && aData != nullptr);
-
-    reinterpret_cast<Mac::Frame *>(aFrame)->SetEnhAckProbingIe(aData, aDataLen);
-}
-#endif // OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
diff --git a/examples/platforms/utils/mac_frame.h b/examples/platforms/utils/mac_frame.h
deleted file mode 100644
index 8f0c679..0000000
--- a/examples/platforms/utils/mac_frame.h
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file defines the mac frame interface for OpenThread platform radio drivers.
- *
- */
-
-#ifndef OPENTHREAD_UTILS_MAC_FRAME_H
-#define OPENTHREAD_UTILS_MAC_FRAME_H
-
-#include <openthread/platform/radio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * This enumeration specifies the IEEE 802.15.4 Address type.
- *
- */
-typedef enum
-{
-    OT_MAC_ADDRESS_TYPE_NONE,     ///< No address.
-    OT_MAC_ADDRESS_TYPE_SHORT,    ///< IEEE 802.15.4 Short Address.
-    OT_MAC_ADDRESS_TYPE_EXTENDED, ///< IEEE 802.15.4 Extended Address.
-} otMacAddressType;
-
-/**
- * This structure represents an IEEE 802.15.4 short or extended Address.
- *
- */
-typedef struct otMacAddress
-{
-    union
-    {
-        otShortAddress mShortAddress; ///< The IEEE 802.15.4 Short Address.
-        otExtAddress   mExtAddress;   ///< The IEEE 802.15.4 Extended Address.
-    } mAddress;
-
-    otMacAddressType mType; ///< The address type (short, extended, or none).
-} otMacAddress;
-
-/**
- * Check if @p aFrame is an Ack frame.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @retval  true    It is an ACK frame.
- * @retval  false   It is not an ACK frame.
- *
- */
-bool otMacFrameIsAck(const otRadioFrame *aFrame);
-
-/**
- * Check if @p aFrame is a Data frame.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @retval  true    It is a Data frame.
- * @retval  false   It is not a Data frame.
- *
- */
-bool otMacFrameIsData(const otRadioFrame *aFrame);
-
-/**
- * Check if @p aFrame is a Command frame.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @retval  true    It is a Command frame.
- * @retval  false   It is not a Command frame.
- *
- */
-bool otMacFrameIsCommand(const otRadioFrame *aFrame);
-
-/**
- * Check if @p aFrame is a Data Request Command.
- *
- * @param[in]   aFrame          A pointer to the frame. For 802.15.4-2015 and above frame,
- *                              the frame should be already decrypted.
- *
- * @retval  true    It is a Data Request Command frame.
- * @retval  false   It is not a Data Request Command frame.
- *
- */
-bool otMacFrameIsDataRequest(const otRadioFrame *aFrame);
-
-/**
- * Check if @p aFrame requests ACK.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @retval  true    It requests ACK.
- * @retval  false   It does not request ACK.
- *
- */
-bool otMacFrameIsAckRequested(const otRadioFrame *aFrame);
-
-/**
- * Check if @p aFrame matches the @p aPandId and @p aShortAddress or @p aExtAddress.
- *
- * @param[in]   aFrame          A pointer to the frame.
- * @param[in]   aPanId          The PAN id to match with.
- * @param[in]   aShortAddress   The short address to match with.
- * @param[in]   aExtAddress     The extended address to match with.
- *
- * @retval  true    It is a broadcast or matches with the PAN id and one of the addresses.
- * @retval  false   It doesn't match.
- *
- */
-bool otMacFrameDoesAddrMatch(const otRadioFrame *aFrame,
-                             otPanId             aPanId,
-                             otShortAddress      aShortAddress,
-                             const otExtAddress *aExtAddress);
-
-/**
- * Get source MAC address.
- *
- * @param[in]   aFrame          A pointer to the frame.
- * @param[out]  aMacAddress     A pointer to MAC address.
- *
- * @retval  OT_ERROR_NONE   Successfully got the source MAC address.
- * @retval  OT_ERROR_PARSE  Failed to parse the source MAC address.
- *
- */
-otError otMacFrameGetSrcAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress);
-
-/**
- * Get destination MAC address.
- *
- * @param[in]   aFrame          A pointer to the frame.
- * @param[out]  aMacAddress     A pointer to MAC address.
- *
- * @retval  OT_ERROR_NONE   Successfully got the destination MAC address.
- * @retval  OT_ERROR_PARSE  Failed to parse the destination MAC address.
- *
- */
-otError otMacFrameGetDstAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress);
-
-/**
- * Get the sequence of @p aFrame.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @returns The sequence of the frame.
- *
- */
-uint8_t otMacFrameGetSequence(const otRadioFrame *aFrame);
-
-/**
- * This function performs AES CCM on the frame which is going to be sent.
- *
- * @param[in]  aFrame       A pointer to the MAC frame buffer that is going to be sent.
- * @param[in]  aExtAddress  A pointer to the extended address, which will be used to generate nonce
- *                          for AES CCM computation.
- *
- */
-void otMacFrameProcessTransmitAesCcm(otRadioFrame *aFrame, const otExtAddress *aExtAddress);
-
-/**
- * Tell if the version of @p aFrame is 2015.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @retval  true    It is a version 2015 frame.
- * @retval  false   It is not a version 2015 frame.
- *
- */
-bool otMacFrameIsVersion2015(const otRadioFrame *aFrame);
-
-/**
- * Generate Imm-Ack for @p aFrame.
- *
- * @param[in]    aFrame             A pointer to the frame.
- * @param[in]    aIsFramePending    Value of the ACK's frame pending bit.
- * @param[out]   aAckFrame          A pointer to the ack frame to be generated.
- *
- */
-void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending, otRadioFrame *aAckFrame);
-
-/**
- * Generate Enh-Ack for @p aFrame.
- *
- * @param[in]    aFrame             A pointer to the frame.
- * @param[in]    aIsFramePending    Value of the ACK's frame pending bit.
- * @param[in]    aIeData            A pointer to the IE data portion of the ACK to be sent.
- * @param[in]    aIeLength          The length of IE data portion of the ACK to be sent.
- * @param[out]   aAckFrame          A pointer to the ack frame to be generated.
- *
- * @retval  OT_ERROR_NONE           Successfully generated Enh Ack in @p aAckFrame.
- * @retval  OT_ERROR_PARSE          @p aFrame has incorrect format.
- *
- */
-otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame,
-                                 bool                aIsFramePending,
-                                 const uint8_t *     aIeData,
-                                 uint8_t             aIeLength,
-                                 otRadioFrame *      aAckFrame);
-
-/**
- * Set CSL IE content into the frame.
- *
- * @param[in,out]   aFrame         A pointer to the frame to be modified.
- * @param[in]       aCslPeriod     CSL Period in CSL IE.
- * @param[in]       aCslPhase      CSL Phase in CSL IE.
- *
- */
-void otMacFrameSetCslIe(otRadioFrame *aFrame, uint16_t aCslPeriod, uint16_t aCslPhase);
-
-/**
- * Tell if the security of @p aFrame is enabled.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @retval  true    The frame has security enabled.
- * @retval  false   The frame does not have security enabled.
- *
- */
-bool otMacFrameIsSecurityEnabled(otRadioFrame *aFrame);
-
-/**
- * Tell if the key ID mode of @p aFrame is 1.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @retval  true    The frame key ID mode is 1.
- * @retval  false   The frame security is not enabled or key ID mode is not 1.
- *
- */
-bool otMacFrameIsKeyIdMode1(otRadioFrame *aFrame);
-
-/**
- * Get the key ID of @p aFrame.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @returns The key ID of the frame with key ID mode 1. Returns 0 if failed.
- *
- */
-uint8_t otMacFrameGetKeyId(otRadioFrame *aFrame);
-
-/**
- * Set key ID to @p aFrame with key ID mode 1.
- *
- * @param[in,out]   aFrame     A pointer to the frame to be modified.
- * @param[in]       aKeyId     Key ID to be set to the frame.
- *
- */
-void otMacFrameSetKeyId(otRadioFrame *aFrame, uint8_t aKeyId);
-
-/**
- * Get the frame counter of @p aFrame.
- *
- * @param[in]   aFrame          A pointer to the frame.
- *
- * @returns The frame counter of the frame. Returns UINT32_MAX if failed.
- *
- */
-uint32_t otMacFrameGetFrameCounter(otRadioFrame *aFrame);
-
-/**
- * Set frame counter to @p aFrame.
- *
- * @param[in,out]   aFrame         A pointer to the frame to be modified.
- * @param[in]       aFrameCounter  Frame counter to be set to the frame.
- *
- */
-void otMacFrameSetFrameCounter(otRadioFrame *aFrame, uint32_t aFrameCounter);
-
-/**
- * Write CSL IE to a buffer (without setting IE value).
- *
- * @param[out]  aDest    A pointer to the output buffer.
- *
- * @returns  The total count of bytes (total length of CSL IE) written to the buffer.
- *
- */
-uint8_t otMacFrameGenerateCslIeTemplate(uint8_t *aDest);
-
-/**
- * Write Enh-ACK Probing IE (Vendor IE with THREAD OUI) to a buffer.
- *
- * @p aIeData could be `NULL`. If @p aIeData is `NULL`, this method generates the IE with the data unset. This allows
- * users to generate the pattern first and update value later. (For example, using `otMacFrameSetEnhAckProbingIe`)
- *
- * @param[out]  aDest          A pointer to the output buffer.
- * @param[in]   aIeData        A pointer to the Link Metrics data.
- * @param[in]   aIeDataLength  The length of Link Metrics data value. Should be `1` or `2`. (Per spec 4.11.3.4.4.6)
- *
- * @returns  The total count of bytes (total length of the Vendor IE) written to the buffer.
- *
- */
-uint8_t otMacFrameGenerateEnhAckProbingIe(uint8_t *aDest, const uint8_t *aIeData, uint8_t aIeDataLength);
-
-/**
- * Sets the data value of Enh-ACK Probing IE (Vendor IE with THREAD OUI) in a frame.
- *
- * If no Enh-ACK Probing IE is found in @p aFrame, nothing would be done.
- *
- * @param[in]  aFrame    The target frame that contains the IE. MUST NOT be `NULL`.
- * @param[in]  aData     A pointer to the data value. MUST NOT be `NULL`.
- * @param[in]  aDataLen  The length of @p aData.
- *
- */
-void otMacFrameSetEnhAckProbingIe(otRadioFrame *aFrame, const uint8_t *aData, uint8_t aDataLen);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // OPENTHREAD_UTILS_MAC_FRAME_H
diff --git a/examples/platforms/utils/settings.h b/examples/platforms/utils/settings.h
deleted file mode 100644
index 7b4e545..0000000
--- a/examples/platforms/utils/settings.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Copyright (c) 2016-2020, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file defines the configuration options for platform abstraction of non-volatile storage of settings.
- *
- */
-
-#ifndef UTILS_SETTINGS_H_
-#define UTILS_SETTINGS_H_
-
-#include <openthread-core-config.h>
-
-/**
- * @def OPENTHREAD_SETTINGS_RAM
- *
- * Define as 1 to enable saving the settings in RAM instead of flash.
- *
- */
-#ifndef OPENTHREAD_SETTINGS_RAM
-#define OPENTHREAD_SETTINGS_RAM 0
-#endif
-
-#endif // UTILS_SETTINGS_H_
diff --git a/examples/platforms/utils/settings_ram.c b/examples/platforms/utils/settings_ram.c
deleted file mode 100644
index fd4abd9..0000000
--- a/examples/platforms/utils/settings_ram.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements OpenThread platform abstraction for storage of settings in RAM.
- *
- */
-
-#include "settings.h"
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <openthread/instance.h>
-#include <openthread/platform/settings.h>
-
-#define SETTINGS_BUFFER_SIZE 1024
-
-#if OPENTHREAD_SETTINGS_RAM
-
-static uint8_t  sSettingsBuf[SETTINGS_BUFFER_SIZE];
-static uint16_t sSettingsBufLength;
-
-OT_TOOL_PACKED_BEGIN
-struct settingsBlock
-{
-    uint16_t key;
-    uint16_t length;
-} OT_TOOL_PACKED_END;
-
-// settings API
-void otPlatSettingsInit(otInstance *aInstance, const uint16_t *aSensitiveKeys, uint16_t aSensitiveKeysLength)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-    OT_UNUSED_VARIABLE(aSensitiveKeys);
-    OT_UNUSED_VARIABLE(aSensitiveKeysLength);
-
-    sSettingsBufLength = 0;
-}
-
-void otPlatSettingsDeinit(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-}
-
-otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint16_t                    i           = 0;
-    uint16_t                    valueLength = 0;
-    uint16_t                    readLength;
-    int                         currentIndex = 0;
-    const struct settingsBlock *currentBlock;
-    otError                     error = OT_ERROR_NOT_FOUND;
-
-    while (i < sSettingsBufLength)
-    {
-        currentBlock = (struct settingsBlock *)&sSettingsBuf[i];
-
-        if (aKey == currentBlock->key)
-        {
-            if (currentIndex == aIndex)
-            {
-                readLength = currentBlock->length;
-
-                // Perform read only if an input buffer was passed in
-                if (aValue != NULL && aValueLength != NULL)
-                {
-                    // Adjust read length if input buffer size is smaller
-                    if (readLength > *aValueLength)
-                    {
-                        readLength = *aValueLength;
-                    }
-
-                    memcpy(aValue, &sSettingsBuf[i + sizeof(struct settingsBlock)], readLength);
-                }
-
-                valueLength = currentBlock->length;
-                error       = OT_ERROR_NONE;
-                break;
-            }
-
-            currentIndex++;
-        }
-
-        i += sizeof(struct settingsBlock) + currentBlock->length;
-    }
-
-    if (aValueLength != NULL)
-    {
-        *aValueLength = valueLength;
-    }
-
-    return error;
-}
-
-otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength)
-{
-    uint16_t                    i = 0;
-    uint16_t                    currentBlockLength;
-    uint16_t                    nextBlockStart;
-    const struct settingsBlock *currentBlock;
-
-    // Delete all entries of aKey
-    while (i < sSettingsBufLength)
-    {
-        currentBlock       = (struct settingsBlock *)&sSettingsBuf[i];
-        currentBlockLength = sizeof(struct settingsBlock) + currentBlock->length;
-
-        if (aKey == currentBlock->key)
-        {
-            nextBlockStart = i + currentBlockLength;
-
-            if (nextBlockStart < sSettingsBufLength)
-            {
-                memmove(&sSettingsBuf[i], &sSettingsBuf[nextBlockStart], sSettingsBufLength - nextBlockStart);
-            }
-
-            assert(sSettingsBufLength >= currentBlockLength);
-            sSettingsBufLength -= currentBlockLength;
-        }
-        else
-        {
-            i += currentBlockLength;
-        }
-    }
-
-    return otPlatSettingsAdd(aInstance, aKey, aValue, aValueLength);
-}
-
-otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError               error;
-    struct settingsBlock *currentBlock;
-    const uint16_t        newBlockLength = sizeof(struct settingsBlock) + aValueLength;
-
-    if (sSettingsBufLength + newBlockLength <= sizeof(sSettingsBuf))
-    {
-        currentBlock         = (struct settingsBlock *)&sSettingsBuf[sSettingsBufLength];
-        currentBlock->key    = aKey;
-        currentBlock->length = aValueLength;
-
-        memcpy(&sSettingsBuf[sSettingsBufLength + sizeof(struct settingsBlock)], aValue, aValueLength);
-        sSettingsBufLength += newBlockLength;
-
-        error = OT_ERROR_NONE;
-    }
-    else
-    {
-        error = OT_ERROR_NO_BUFS;
-    }
-
-    return error;
-}
-
-otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    uint16_t                    i            = 0;
-    int                         currentIndex = 0;
-    uint16_t                    nextBlockStart;
-    uint16_t                    currentBlockLength;
-    const struct settingsBlock *currentBlock;
-    otError                     error = OT_ERROR_NOT_FOUND;
-
-    while (i < sSettingsBufLength)
-    {
-        currentBlock       = (struct settingsBlock *)&sSettingsBuf[i];
-        currentBlockLength = sizeof(struct settingsBlock) + currentBlock->length;
-
-        if (aKey == currentBlock->key)
-        {
-            if (currentIndex == aIndex)
-            {
-                nextBlockStart = i + currentBlockLength;
-
-                if (nextBlockStart < sSettingsBufLength)
-                {
-                    memmove(&sSettingsBuf[i], &sSettingsBuf[nextBlockStart], sSettingsBufLength - nextBlockStart);
-                }
-
-                assert(sSettingsBufLength >= currentBlockLength);
-                sSettingsBufLength -= currentBlockLength;
-
-                error = OT_ERROR_NONE;
-                break;
-            }
-            else
-            {
-                currentIndex++;
-            }
-        }
-
-        i += currentBlockLength;
-    }
-
-    return error;
-}
-
-void otPlatSettingsWipe(otInstance *aInstance)
-{
-    otPlatSettingsInit(aInstance, NULL, 0);
-}
-
-#endif // OPENTHREAD_SETTINGS_RAM
diff --git a/examples/platforms/utils/soft_source_match_table.c b/examples/platforms/utils/soft_source_match_table.c
deleted file mode 100644
index 458d1b5..0000000
--- a/examples/platforms/utils/soft_source_match_table.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- *   This file implements a software Source Match table, for radios that don't have
- *   such hardware acceleration. It supports only the single-instance build of
- *   OpenThread.
- *
- */
-
-#include "utils/soft_source_match_table.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <openthread/logging.h>
-
-#include "utils/code_utils.h"
-
-#if RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM || RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-static uint16_t sPanId = 0;
-
-void utilsSoftSrcMatchSetPanId(uint16_t aPanId)
-{
-    sPanId = aPanId;
-}
-#endif // RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM || RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-
-#if RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM
-typedef struct srcMatchShortEntry
-{
-    uint16_t checksum;
-    bool     allocated;
-} sSrcMatchShortEntry;
-
-static sSrcMatchShortEntry srcMatchShortEntry[RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM];
-
-int16_t utilsSoftSrcMatchShortFindEntry(uint16_t aShortAddress)
-{
-    int16_t  entry    = -1;
-    uint16_t checksum = aShortAddress + sPanId;
-
-    for (int16_t i = 0; i < RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM; i++)
-    {
-        if (checksum == srcMatchShortEntry[i].checksum && srcMatchShortEntry[i].allocated)
-        {
-            entry = i;
-            break;
-        }
-    }
-
-    return entry;
-}
-
-static int16_t findSrcMatchShortAvailEntry(void)
-{
-    int16_t entry = -1;
-
-    for (int16_t i = 0; i < RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM; i++)
-    {
-        if (!srcMatchShortEntry[i].allocated)
-        {
-            entry = i;
-            break;
-        }
-    }
-
-    return entry;
-}
-
-static inline void addToSrcMatchShortIndirect(uint16_t entry, uint16_t aShortAddress)
-{
-    uint16_t checksum = aShortAddress + sPanId;
-
-    srcMatchShortEntry[entry].checksum  = checksum;
-    srcMatchShortEntry[entry].allocated = true;
-}
-
-static inline void removeFromSrcMatchShortIndirect(uint16_t entry)
-{
-    srcMatchShortEntry[entry].allocated = false;
-    srcMatchShortEntry[entry].checksum  = 0;
-}
-
-otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-    int16_t entry = -1;
-
-    entry = findSrcMatchShortAvailEntry();
-    otLogDebgPlat("Add ShortAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0 && entry < RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM, error = OT_ERROR_NO_BUFS);
-
-    addToSrcMatchShortIndirect((uint16_t)entry, aShortAddress);
-
-exit:
-    return error;
-}
-
-otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-    int16_t entry = -1;
-
-    entry = utilsSoftSrcMatchShortFindEntry(aShortAddress);
-    otLogDebgPlat("Clear ShortAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0 && entry < RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM, error = OT_ERROR_NO_ADDRESS);
-
-    removeFromSrcMatchShortIndirect((uint16_t)entry);
-
-exit:
-    return error;
-}
-
-void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogDebgPlat("Clear ShortAddr entries", NULL);
-
-    memset(srcMatchShortEntry, 0, sizeof(srcMatchShortEntry));
-}
-#endif // RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM
-
-#if RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-typedef struct srcMatchExtEntry
-{
-    uint16_t checksum;
-    bool     allocated;
-} sSrcMatchExtEntry;
-
-static sSrcMatchExtEntry srcMatchExtEntry[RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM];
-
-int16_t utilsSoftSrcMatchExtFindEntry(const otExtAddress *aExtAddress)
-{
-    int16_t  entry    = -1;
-    uint16_t checksum = sPanId;
-
-    checksum += (uint16_t)aExtAddress->m8[0] | (uint16_t)(aExtAddress->m8[1] << 8);
-    checksum += (uint16_t)aExtAddress->m8[2] | (uint16_t)(aExtAddress->m8[3] << 8);
-    checksum += (uint16_t)aExtAddress->m8[4] | (uint16_t)(aExtAddress->m8[5] << 8);
-    checksum += (uint16_t)aExtAddress->m8[6] | (uint16_t)(aExtAddress->m8[7] << 8);
-
-    for (int16_t i = 0; i < RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM; i++)
-    {
-        if (checksum == srcMatchExtEntry[i].checksum && srcMatchExtEntry[i].allocated)
-        {
-            entry = i;
-            break;
-        }
-    }
-
-    return entry;
-}
-
-static int16_t findSrcMatchExtAvailEntry(void)
-{
-    int16_t entry = -1;
-
-    for (int16_t i = 0; i < RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM; i++)
-    {
-        if (!srcMatchExtEntry[i].allocated)
-        {
-            entry = i;
-            break;
-        }
-    }
-
-    return entry;
-}
-
-static inline void addToSrcMatchExtIndirect(uint16_t entry, const otExtAddress *aExtAddress)
-{
-    uint16_t checksum = sPanId;
-
-    checksum += (uint16_t)aExtAddress->m8[0] | (uint16_t)(aExtAddress->m8[1] << 8);
-    checksum += (uint16_t)aExtAddress->m8[2] | (uint16_t)(aExtAddress->m8[3] << 8);
-    checksum += (uint16_t)aExtAddress->m8[4] | (uint16_t)(aExtAddress->m8[5] << 8);
-    checksum += (uint16_t)aExtAddress->m8[6] | (uint16_t)(aExtAddress->m8[7] << 8);
-
-    srcMatchExtEntry[entry].checksum  = checksum;
-    srcMatchExtEntry[entry].allocated = true;
-}
-
-static inline void removeFromSrcMatchExtIndirect(uint16_t entry)
-{
-    srcMatchExtEntry[entry].allocated = false;
-    srcMatchExtEntry[entry].checksum  = 0;
-}
-
-otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-    int16_t entry = -1;
-
-    entry = findSrcMatchExtAvailEntry();
-    otLogDebgPlat("Add ExtAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0 && entry < RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM, error = OT_ERROR_NO_BUFS);
-
-    addToSrcMatchExtIndirect((uint16_t)entry, aExtAddress);
-
-exit:
-    return error;
-}
-
-otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otError error = OT_ERROR_NONE;
-    int16_t entry = -1;
-
-    entry = utilsSoftSrcMatchExtFindEntry(aExtAddress);
-    otLogDebgPlat("Clear ExtAddr entry: %d", entry);
-
-    otEXPECT_ACTION(entry >= 0 && entry < RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM, error = OT_ERROR_NO_ADDRESS);
-
-    removeFromSrcMatchExtIndirect((uint16_t)entry);
-
-exit:
-    return error;
-}
-
-void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance)
-{
-    OT_UNUSED_VARIABLE(aInstance);
-
-    otLogDebgPlat("Clear ExtAddr entries", NULL);
-
-    memset(srcMatchExtEntry, 0, sizeof(srcMatchExtEntry));
-}
-#endif // RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
diff --git a/examples/platforms/utils/soft_source_match_table.h b/examples/platforms/utils/soft_source_match_table.h
deleted file mode 100644
index f34427a..0000000
--- a/examples/platforms/utils/soft_source_match_table.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *  Copyright (c) 2019, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file defines the software source match table interfaces used by
- *   soft_source_match_table.c.
- */
-
-#ifndef SOFT_SOURCE_MATCH_TABLE_H
-#define SOFT_SOURCE_MATCH_TABLE_H
-
-#include "openthread-core-config.h"
-#include <openthread/platform/radio.h>
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM
-#define RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
-#endif
-
-#ifndef RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-#define RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
-#endif
-
-#if RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM || RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-void utilsSoftSrcMatchSetPanId(uint16_t aPanId);
-#endif // RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM || RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-
-#if RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM
-int16_t utilsSoftSrcMatchShortFindEntry(uint16_t aShortAddress);
-#endif // RADIO_CONFIG_SRC_MATCH_SHORT_ENTRY_NUM
-
-#if RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-int16_t utilsSoftSrcMatchExtFindEntry(const otExtAddress *aExtAddress);
-#endif // RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // SOFT_SOURCE_MATCH_TABLE_H
diff --git a/examples/platforms/utils/uart.h b/examples/platforms/utils/uart.h
deleted file mode 100644
index 6366dfe..0000000
--- a/examples/platforms/utils/uart.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *  Copyright (c) 2016, The OpenThread Authors.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *  1. Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *  3. Neither the name of the copyright holder nor the
- *     names of its contributors may be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- *  POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file
- * @brief
- *   This file includes the platform abstraction for UART communication.
- */
-
-#ifndef OPENTHREAD_PLATFORM_UART_H_
-#define OPENTHREAD_PLATFORM_UART_H_
-
-#include <stdint.h>
-
-#include <openthread/error.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @addtogroup plat-uart
- *
- * @brief
- *   This module includes the platform abstraction for UART communication.
- *
- * @{
- *
- */
-
-/**
- * Enable the UART.
- *
- * @retval OT_ERROR_NONE    Successfully enabled the UART.
- * @retval OT_ERROR_FAILED  Failed to enabled the UART.
- *
- */
-otError otPlatUartEnable(void);
-
-/**
- * Disable the UART.
- *
- * @retval OT_ERROR_NONE    Successfully disabled the UART.
- * @retval OT_ERROR_FAILED  Failed to disable the UART.
- *
- */
-otError otPlatUartDisable(void);
-
-/**
- * Send bytes over the UART.
- *
- * @param[in] aBuf        A pointer to the data buffer.
- * @param[in] aBufLength  Number of bytes to transmit.
- *
- * @retval OT_ERROR_NONE    Successfully started transmission.
- * @retval OT_ERROR_FAILED  Failed to start the transmission.
- *
- */
-otError otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength);
-
-/**
- * Flush the outgoing transmit buffer and wait for the data to be sent.
- * This is called when the CLI UART interface has a full buffer but still
- * wishes to send more data.
- *
- * @retval OT_ERROR_NONE                Flush succeeded, we can proceed to write more
- *                                      data to the buffer.
- *
- * @retval OT_ERROR_NOT_IMPLEMENTED     Driver does not support synchronous flush.
- * @retval OT_ERROR_INVALID_STATE       Driver has no data to flush.
- */
-otError otPlatUartFlush(void);
-
-/**
- * The UART driver calls this method to notify OpenThread that the requested bytes have been sent.
- *
- */
-extern void otPlatUartSendDone(void);
-
-/**
- * The UART driver calls this method to notify OpenThread that bytes have been received.
- *
- * @param[in]  aBuf        A pointer to the received bytes.
- * @param[in]  aBufLength  The number of bytes received.
- *
- */
-extern void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength);
-
-/**
- * @}
- *
- */
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // OPENTHREAD_PLATFORM_UART_H_
diff --git a/examples/platforms/simulation/dso_transport.c b/include/dso_transport.c
similarity index 100%
rename from examples/platforms/simulation/dso_transport.c
rename to include/dso_transport.c
diff --git a/examples/platforms/utils/otns_utils.cpp b/include/openthread-config-fuchsia-legacy-extensions.h
similarity index 74%
rename from examples/platforms/utils/otns_utils.cpp
rename to include/openthread-config-fuchsia-legacy-extensions.h
index e343503..75ca8c4 100644
--- a/examples/platforms/utils/otns_utils.cpp
+++ b/include/openthread-config-fuchsia-legacy-extensions.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2020, The OpenThread Authors.
+ *  Copyright (c) 2018, The OpenThread Authors.
  *  All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -25,15 +25,25 @@
  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  *  POSSIBILITY OF SUCH DAMAGE.
  */
-#include <openthread-core-config.h>
-#include <openthread/config.h>
 
-#include <openthread/platform/otns.h>
-#include <openthread/platform/toolchain.h>
+#ifndef OPENTHREAD_INCLUDE_OPENTHREAD_CONFIG_FUCHSIA_LEGACY_EXTENSIONS_H_
+#define OPENTHREAD_INCLUDE_OPENTHREAD_CONFIG_FUCHSIA_LEGACY_EXTENSIONS_H_
 
-#include "common/log.hpp"
+#include "openthread-config-fuchsia.h"
 
-using namespace ot;
+/**
+ * @def OPENTHREAD_CONFIG_LEGACY_ENABLE
+ * Define to 1 if you want to use legacy network support
+ *
+ */
+#define OPENTHREAD_CONFIG_LEGACY_ENABLE 1
+
+/**
+ * @def OPENTHREAD_ENABLE_VENDOR_EXTENSION
+ * Define to 1 if you want to use any kind of extensions like legacy network support.
+ *
+ */
+#define OPENTHREAD_ENABLE_VENDOR_EXTENSION 1
 
 /*
  * Implementation note:
@@ -42,10 +52,16 @@
 
 #if OPENTHREAD_CONFIG_OTNS_ENABLE
 
+#include <openthread/platform/toolchain.h>
+#include "common/log.hpp"
+
+using namespace ot;
+
 OT_TOOL_WEAK
 void otPlatOtnsStatus(const char *aStatus)
 {
     LogAlways("[OTNS] %s", aStatus);
 }
-
 #endif // OPENTHREAD_CONFIG_OTNS_ENABLE
+
+#endif  // OPENTHREAD_INCLUDE_OPENTHREAD_CONFIG_FUCHSIA_LEGACY_EXTENSIONS_H_
diff --git a/include/openthread-config-fuchsia.h b/include/openthread-config-fuchsia.h
new file mode 100644
index 0000000..993ab0d
--- /dev/null
+++ b/include/openthread-config-fuchsia.h
@@ -0,0 +1,175 @@
+/*
+ *  Copyright (c) 2018, The OpenThread Authors.
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *  3. Neither the name of the copyright holder nor the
+ *     names of its contributors may be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef OPENTHREAD_CONFIG_ANDROID_VERSION_HEADER_ENABLE
+#include <openthread-config-android-version.h>
+#endif
+
+/* Define to 1 to no longer require the use of the va_list on otCliOutputCallback. */
+#define OPENTHREAD_CONFIG_CLI_PREFORMAT_OUTPUT 1
+
+/* Define to 1 to enable the DNS-SD Server API. */
+#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 1
+
+/* Define to 1 to enable the SRP client API. */
+#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1
+
+/* Define to 1 to enable the DNS client API. */
+#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1
+
+/* Define to 1 to enable the DNS client service discovery API. */
+#define OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE 1
+
+/* Define to 1 to enable the ping sender API. */
+#define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1
+
+/* Define to 0 to disable the CLI prompt. */
+#define OPENTHREAD_CONFIG_CLI_PROMPT_ENABLE 0
+
+/* Define to 1 to enable the border agent feature. */
+#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 1
+
+/* Define to 1 if you want to enable Border Router */
+#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 1
+
+/* Define to 1 if you want to enable Border Routing */
+#define OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE 1
+
+/* Define to 1 if you want to enable platform UDP. */
+#define OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 1
+
+/* Define to 1 if you want to enable backbone router support */
+#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 1
+
+/* Define to 1 if you want to enable TREL support */
+#define OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE 1
+
+/* Define to 1 if you want to enable SRP server support */
+#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 1
+
+/* Define to 1 if you want to enable support for ECDSA */
+#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1
+
+/* Define to 1 to enable OpenThread's TCP API */
+#define OPENTHREAD_CONFIG_TCP_ENABLE 0
+
+/* Define to 1 if you want to enable channel manager feature */
+#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE 0
+
+/* Define to 1 if you want to use channel monitor feature */
+#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 1
+
+/* Define to 1 if you want to use child supervision feature */
+#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE 1
+
+/* Define to 1 to enable dtls support. */
+#define OPENTHREAD_CONFIG_DTLS_ENABLE 1
+
+/* Define to 1 if you want to use jam detection feature */
+#define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 1
+
+/* Define to 1 to enable the joiner role. */
+#define OPENTHREAD_CONFIG_JOINER_ENABLE 1
+
+/* Define to 1 to enable being a commissioner. */
+#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 1
+
+/* Define to 1 to enable the NCP HDLC interface. */
+#define OPENTHREAD_CONFIG_NCP_HDLC_ENABLE 0
+
+/* Define to 1 to enable posix platform. */
+#define OPENTHREAD_PLATFORM_POSIX 0
+
+/* Define to 1 if you want to enable Service */
+#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 1
+
+/* Define to 1 if you want to enable mac filter */
+#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1
+
+/* Define to 1 if you want to enable SLAAC address management */
+#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
+
+/* OpenThread examples */
+#define OPENTHREAD_EXAMPLES none
+
+/* OpenThread diagnostic feature */
+#define OPENTHREAD_CONFIG_DIAG_ENABLE 1
+
+/* OpenThread mac filter settings */
+#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1
+
+/* Allow OOB steering data to be set */
+#define OPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE 1
+
+/* The settings storage path on android. */
+#define OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH "/data/thread"
+
+/* Enable radio coex capability */
+#define OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE 1
+
+/* Allow the log level to be adjusted dynamicly */
+#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 1
+
+/* Set the default log level to be "note" */
+#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_NOTE
+
+/**
+ * @def OPENTHREAD_CONFIG_MAC_JOIN_BEACON_VERSION
+ *
+ * The Beacon version to use when the beacon join flag is set.
+ *
+ */
+#define OPENTHREAD_CONFIG_MAC_JOIN_BEACON_VERSION 1
+
+/**
+ * @def OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
+ *
+ * The maximum number of supported IPv6 multicast addresses allows to be externally added.
+ *
+ */
+#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
+#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 32
+#endif
+
+/**
+ * @def OPENTHREAD_CONFIG_DUA_ENABLE
+ *
+ * When set, enables Domain Unicast Address on device.
+ *
+ */
+#ifndef OPENTHREAD_CONFIG_DUA_ENABLE
+#define OPENTHREAD_CONFIG_DUA_ENABLE 1
+#endif
+
+/**
+ * @def OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
+ *
+ * The maximum number of children.
+ *
+ */
+#define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 64
diff --git a/include/openthread/BUILD.gn b/include/openthread/BUILD.gn
index 75abeb0..df7035a 100644
--- a/include/openthread/BUILD.gn
+++ b/include/openthread/BUILD.gn
@@ -37,6 +37,20 @@
   public_configs = [ "../..:openthread_config" ]
 }
 
+
+source_set("openthread_config_legacy_extensions") {
+  public = [ "config.h" ]
+
+  if (openthread_config_file == "") {
+    public_deps = [ ":openthread_config_generic" ]
+  } else {
+    public_deps = openthread_config_deps
+  }
+
+  public_configs = [ "../..:openthread_config_legacy_extensions" ]
+}
+
+
 source_set("openthread") {
   public = [
     "backbone_router.h",
@@ -118,3 +132,77 @@
 
   public_deps = [ ":openthread_config" ]
 }
+
+source_set("openthread_legacy_extensions") {
+  public = [
+    "backbone_router.h",
+    "backbone_router_ftd.h",
+    "border_agent.h",
+    "border_router.h",
+    "channel_manager.h",
+    "channel_monitor.h",
+    "child_supervision.h",
+    "cli.h",
+    "coap.h",
+    "coap_secure.h",
+    "commissioner.h",
+    "config.h",
+    "crypto.h",
+    "dataset.h",
+    "dataset_ftd.h",
+    "dataset_updater.h",
+    "diag.h",
+    "dns.h",
+    "dns_client.h",
+    "entropy.h",
+    "error.h",
+    "heap.h",
+    "icmp6.h",
+    "instance.h",
+    "ip6.h",
+    "jam_detection.h",
+    "joiner.h",
+    "link.h",
+    "link_metrics.h",
+    "link_raw.h",
+    "logging.h",
+    "message.h",
+    "multi_radio.h",
+    "ncp.h",
+    "netdata.h",
+    "netdiag.h",
+    "network_time.h",
+    "ping_sender.h",
+    "platform/alarm-micro.h",
+    "platform/alarm-milli.h",
+    "platform/debug_uart.h",
+    "platform/diag.h",
+    "platform/entropy.h",
+    "platform/flash.h",
+    "platform/infra_if.h",
+    "platform/logging.h",
+    "platform/memory.h",
+    "platform/messagepool.h",
+    "platform/misc.h",
+    "platform/otns.h",
+    "platform/radio.h",
+    "platform/settings.h",
+    "platform/spi-slave.h",
+    "platform/time.h",
+    "platform/toolchain.h",
+    "platform/trel-udp6.h",
+    "platform/udp.h",
+    "random_crypto.h",
+    "random_noncrypto.h",
+    "server.h",
+    "sntp.h",
+    "srp_client.h",
+    "srp_server.h",
+    "tasklet.h",
+    "thread.h",
+    "thread_ftd.h",
+    "udp.h",
+  ]
+
+  public_deps = [ ":openthread_config_legacy_extensions" ]
+}
diff --git a/include/openthread/platform/logging.h b/include/openthread/platform/logging.h
index adf123f..1efe361 100644
--- a/include/openthread/platform/logging.h
+++ b/include/openthread/platform/logging.h
@@ -162,6 +162,19 @@
 void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...);
 
 /**
+ * This (optional) platform function outputs a prepared log line.
+ *
+ * Note that this function is optional and if not provided by platform layer, a default (weak) implementation is
+ * provided and used by OpenThread core as `otPlatLog(aLogLevel, aLogResion, "%s", aLogLine)`.
+ *
+ * @param[in]  aLogLevel   The log level.
+ * @param[in]  aLogRegion  The log region.
+ * @param[in]  aLogLine    A pointer to a log line string.
+ *
+ */
+void otPlatLogLine(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aLogLine);
+
+/**
  * This function handles OpenThread log level changes.
  *
  * This platform function is called whenever the OpenThread log level changes.
diff --git a/openthread_upstream_version.gni b/openthread_upstream_version.gni
new file mode 100644
index 0000000..e340913
--- /dev/null
+++ b/openthread_upstream_version.gni
@@ -0,0 +1,3 @@
+# This file is added to support soft-transition in Fuchsia.
+
+openthread_upstream_version = "645fbcd400d2e6c2de641bccb0335e3eaaed1f36"
diff --git a/script/test b/script/test
deleted file mode 100755
index 2c52261..0000000
--- a/script/test
+++ /dev/null
@@ -1,674 +0,0 @@
-#!/bin/bash
-#
-#  Copyright (c) 2018, The OpenThread Authors.
-#  All rights reserved.
-#
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. Neither the name of the copyright holder nor the
-#     names of its contributors may be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-#
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-#  POSSIBILITY OF SUCH DAMAGE.
-#
-#    Description:
-#      This file runs various tests of OpenThread.
-#
-
-set -euo pipefail
-
-readonly OT_BUILDDIR="${OT_BUILDDIR:-${PWD}/build}"
-readonly OT_SRCDIR="${PWD}"
-
-readonly OT_COLOR_PASS='\033[0;32m'
-readonly OT_COLOR_FAIL='\033[0;31m'
-readonly OT_COLOR_SKIP='\033[0;33m'
-readonly OT_COLOR_NONE='\033[0m'
-
-readonly OT_NODE_TYPE="${OT_NODE_TYPE:-cli}"
-readonly OT_NATIVE_IP="${OT_NATIVE_IP:-0}"
-readonly THREAD_VERSION="${THREAD_VERSION:-1.2}"
-readonly INTER_OP="${INTER_OP:-0}"
-readonly VERBOSE="${VERBOSE:-0}"
-readonly BORDER_ROUTING="${BORDER_ROUTING:-1}"
-readonly BORDER_ROUTING_NAT64="${BORDER_ROUTING_NAT64:-1}"
-readonly INTER_OP_BBR="${INTER_OP_BBR:-1}"
-
-readonly OT_COREDUMP_DIR="${PWD}/ot-core-dump"
-readonly FULL_LOGS=${FULL_LOGS:-0}
-readonly TREL=${TREL:-0}
-readonly LOCAL_OTBR_DIR=${LOCAL_OTBR_DIR:-""}
-
-build_simulation()
-{
-    local version="$1"
-    local options=(
-        "-DBUILD_TESTING=ON"
-        "-DOT_ANYCAST_LOCATOR=ON"
-        "-DOT_DNS_CLIENT=ON"
-        "-DOT_DNS_DSO=ON"
-        "-DOT_DNSSD_SERVER=ON"
-        "-DOT_ECDSA=ON"
-        "-DOT_EXTERNAL_HEAP=ON"
-        "-DOT_HISTORY_TRACKER=ON"
-        "-DOT_MESSAGE_USE_HEAP=OFF"
-        "-DOT_NETDATA_PUBLISHER=ON"
-        "-DOT_PING_SENDER=ON"
-        "-DOT_REFERENCE_DEVICE=ON"
-        "-DOT_SERVICE=ON"
-        "-DOT_SRP_CLIENT=ON"
-        "-DOT_SRP_SERVER=ON"
-        "-DOT_UPTIME=ON"
-        "-DOT_THREAD_VERSION=${version}"
-    )
-
-    if [[ ${FULL_LOGS} == 1 ]]; then
-        options+=("-DOT_FULL_LOGS=ON")
-    fi
-
-    if [[ ${version} == "1.2" ]]; then
-        options+=("-DOT_DUA=ON")
-        options+=("-DOT_MLR=ON")
-    fi