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
-
-    if [[ ${VIRTUAL_TIME} == 1 ]]; then
-        options+=("-DOT_SIMULATION_VIRTUAL_TIME=ON")
-    fi
-
-    if [[ ${version} == "1.2" ]]; then
-        options+=("-DOT_CSL_RECEIVER=ON")
-        options+=("-DOT_LINK_METRICS_INITIATOR=ON")
-        options+=("-DOT_LINK_METRICS_SUBJECT=ON")
-    fi
-
-    if [[ ${ot_extra_options[*]+x} ]]; then
-        options+=("${ot_extra_options[@]}")
-    fi
-
-    OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/script/cmake-build simulation "${options[@]}"
-
-    if [[ ${VIRTUAL_TIME} == 1 ]] && [[ ${OT_NODE_TYPE} == rcp* ]]; then
-        OT_CMAKE_NINJA_TARGET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}" "${OT_SRCDIR}"/script/cmake-build simulation "${options[@]}" "-DOT_SIMULATION_VIRTUAL_TIME_UART=ON"
-    fi
-
-    if [[ ${version} == "1.2" && ${INTER_OP_BBR} == 1 ]]; then
-
-        options+=("-DOT_BACKBONE_ROUTER=ON")
-
-        OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"/script/cmake-build simulation "${options[@]}"
-
-        if [[ ${VIRTUAL_TIME} == 1 ]] && [[ ${OT_NODE_TYPE} == rcp* ]]; then
-            OT_CMAKE_NINJA_TARGET=ot-rcp OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-simulation-${version}-bbr" "${OT_SRCDIR}"/script/cmake-build simulation "${options[@]}" "-DOT_SIMULATION_VIRTUAL_TIME_UART=ON"
-        fi
-
-    fi
-}
-
-build_posix()
-{
-    local version="$1"
-    local options=("-DOT_MESSAGE_USE_HEAP=ON" "-DOT_THREAD_VERSION=${version}" "-DBUILD_TESTING=ON")
-
-    if [[ ${version} == "1.2" ]]; then
-        options+=("-DOT_DUA=ON")
-        options+=("-DOT_MLR=ON")
-    fi
-
-    if [[ ${FULL_LOGS} == 1 ]]; then
-        options+=("-DOT_FULL_LOGS=ON")
-    fi
-
-    if [[ ${VIRTUAL_TIME} == 1 ]]; then
-        options+=("-DOT_POSIX_VIRTUAL_TIME=ON")
-    fi
-
-    if [[ ${OT_NATIVE_IP} == 1 ]]; then
-        options+=("-DOT_PLATFORM_UDP=ON" "-DOT_PLATFORM_NETIF=ON")
-    fi
-
-    if [[ ${ot_extra_options[*]+x} ]]; then
-        options+=("${ot_extra_options[@]}")
-    fi
-
-    OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}" "${OT_SRCDIR}"/script/cmake-build posix "${options[@]}"
-
-    if [[ ${version} == "1.2" && ${INTER_OP_BBR} == 1 ]]; then
-
-        options+=("-DOT_BACKBONE_ROUTER=ON")
-
-        OT_CMAKE_BUILD_DIR="${OT_BUILDDIR}/openthread-posix-${version}-bbr" "${OT_SRCDIR}"/script/cmake-build posix "${options[@]}"
-    fi
-}
-
-build_for_one_version()
-{
-    local version="$1"
-
-    build_simulation "${version}"
-
-    if [[ ${OT_NODE_TYPE} == rcp* ]]; then
-        build_posix "${version}"
-    fi
-}
-
-do_build()
-{
-    build_for_one_version "${THREAD_VERSION}"
-
-    if [[ ${THREAD_VERSION} == "1.2" && ${INTER_OP} == "1" ]]; then
-        build_for_one_version 1.1
-    fi
-}
-
-do_clean()
-{
-    ./script/gcda-tool clean
-    rm -rfv "${OT_BUILDDIR}" || sudo rm -rfv "${OT_BUILDDIR}"
-}
-
-do_unit_version()
-{
-    local version=$1
-    local builddir="${OT_BUILDDIR}/openthread-simulation-${version}"
-
-    if [[ ! -d ${builddir} ]]; then
-        echo "Cannot find build directory: ${builddir}"
-        exit 1
-    fi
-
-    (
-        cd "${builddir}"
-        ninja test
-    )
-}
-
-do_unit()
-{
-    do_unit_version "${THREAD_VERSION}"
-
-    if [[ ${THREAD_VERSION} == "1.2" && ${INTER_OP_BBR} == 1 ]]; then
-        do_unit_version "1.2-bbr"
-    fi
-}
-
-do_cert()
-{
-    export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
-    export top_srcdir="${OT_SRCDIR}"
-
-    case "${OT_NODE_TYPE}" in
-        rcp | rcp-cli | cli)
-            export NODE_TYPE=sim
-            ;;
-        rcp-ncp | ncp)
-            export NODE_TYPE=ncp-sim
-            ;;
-    esac
-
-    if [[ ${THREAD_VERSION} == "1.2" ]]; then
-        export top_builddir_1_2_bbr="${OT_BUILDDIR}/openthread-simulation-1.2-bbr"
-        if [[ ${INTER_OP} == "1" ]]; then
-            export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
-        fi
-    fi
-
-    export PYTHONPATH=tests/scripts/thread-cert
-
-    [[ ! -d tmp ]] || rm -rvf tmp
-    PYTHONUNBUFFERED=1 "$@"
-    exit 0
-}
-
-do_cert_suite()
-{
-    export top_builddir="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}"
-
-    if [[ ${THREAD_VERSION} == "1.2" ]]; then
-        export top_builddir_1_2_bbr="${OT_BUILDDIR}/openthread-simulation-1.2-bbr"
-        if [[ ${INTER_OP} == "1" ]]; then
-            export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1"
-        fi
-    fi
-
-    export PYTHONPATH=tests/scripts/thread-cert
-    export VIRTUAL_TIME
-
-    sudo modprobe ip6table_filter
-
-    python3 tests/scripts/thread-cert/run_cert_suite.py --multiply "${MULTIPLY:-1}" "$@"
-    exit 0
-}
-
-do_get_thread_wireshark()
-{
-    echo "Downloading thread-wireshark from https://github.com/openthread/wireshark/releases ..."
-    local download_url=https://github.com/openthread/wireshark/releases/download/ot-pktverify-20200727/thread-wireshark.tar.gz
-    local save_file=/tmp/thread-wireshark.tar.gz
-
-    rm -rf /tmp/thread-wireshark || true
-    rm -rf "${save_file}" || true
-    curl -L "${download_url}" -o "${save_file}"
-    tar -C /tmp -xvzf "${save_file}"
-
-    LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/tshark -v
-    LD_LIBRARY_PATH=/tmp/thread-wireshark /tmp/thread-wireshark/dumpcap -v
-    rm -rf "${save_file}"
-}
-
-do_build_otbr_docker()
-{
-    echo "Building OTBR Docker ..."
-    local otdir
-    local otbrdir
-    local otbr_options=(
-        "-DOT_ANYCAST_LOCATOR=ON"
-        "-DOT_COVERAGE=ON"
-        "-DOT_DNS_CLIENT=ON"
-        "-DOT_DUA=ON"
-        "-DOT_MLR=ON"
-        "-DOT_NETDATA_PUBLISHER=ON"
-        "-DOT_SLAAC=ON"
-        "-DOT_SRP_CLIENT=ON"
-        "-DOT_FULL_LOGS=ON"
-        "-DOT_UPTIME=ON"
-        "-DOTBR_DUA_ROUTING=ON"
-        "-DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_DNSSD_SERVER_BIND_UNSPECIFIED_NETIF=1'"
-    )
-
-    if [[ ${TREL} == 1 ]]; then
-        otbr_options+=("-DOTBR_TREL=ON")
-    else
-        otbr_options+=("-DOTBR_TREL=OFF")
-    fi
-
-    if [[ ${BORDER_ROUTING_NAT64} == 1 ]]; then
-        otbr_options+=("-DOT_BORDER_ROUTING_NAT64=ON")
-    else
-        otbr_options+=("-DOT_BORDER_ROUTING_NAT64=OFF")
-    fi
-
-    local otbr_docker_image=${OTBR_DOCKER_IMAGE:-otbr-ot12-backbone-ci}
-
-    otbrdir=$(mktemp -d -t otbr_XXXXXX)
-    otdir=$(pwd)
-
-    (
-        if [[ -z ${LOCAL_OTBR_DIR} ]]; then
-            ./script/git-tool clone https://github.com/openthread/ot-br-posix.git --depth 1 "${otbrdir}"
-        else
-            cp -r "${LOCAL_OTBR_DIR}"/* "${otbrdir}"
-            rm -rf "${otbrdir}"/build
-        fi
-        cd "${otbrdir}"
-        rm -rf third_party/openthread/repo
-        cp -r "${otdir}" third_party/openthread/repo
-        rm -rf .git
-        docker build -t "${otbr_docker_image}" -f etc/docker/Dockerfile . \
-            --build-arg BORDER_ROUTING="${BORDER_ROUTING}" \
-            --build-arg INFRA_IF_NAME=eth0 \
-            --build-arg BACKBONE_ROUTER=1 \
-            --build-arg REFERENCE_DEVICE=1 \
-            --build-arg OT_BACKBONE_CI=1 \
-            --build-arg NAT64=0 \
-            --build-arg REST_API=0 \
-            --build-arg WEB_GUI=0 \
-            --build-arg MDNS="${OTBR_MDNS:-mDNSResponder}" \
-            --build-arg OTBR_OPTIONS="${otbr_options[*]}"
-    )
-
-    rm -rf "${otbrdir}"
-}
-
-do_pktverify()
-{
-    python3 ./tests/scripts/thread-cert/pktverify/verify.py "$1"
-}
-
-ot_exec_expect_script()
-{
-    local log_file="tmp/log_expect"
-
-    for script in "$@"; do
-        echo -e "\n${OT_COLOR_PASS}EXEC${OT_COLOR_NONE} ${script}"
-        sudo killall ot-rcp || true
-        sudo killall ot-cli || true
-        sudo killall ot-cli-ftd || true
-        sudo killall ot-cli-mtd || true
-        sudo rm -rf tmp
-        mkdir tmp
-        {
-            if [[ ${OT_NATIVE_IP} == 1 ]]; then
-                sudo -E expect -df "${script}" 2>"${log_file}"
-            else
-                expect -df "${script}" 2>"${log_file}"
-            fi
-        } || {
-            local EXIT_CODE=$?
-
-            # The exit status 77 for skipping is inherited from automake's test driver for script-based testsuites
-            if [[ ${EXIT_CODE} == 77 ]]; then
-                echo -e "\n${OT_COLOR_SKIP}SKIP${OT_COLOR_NONE} ${script}"
-                return 0
-            else
-                echo -e "\n${OT_COLOR_FAIL}FAIL${OT_COLOR_NONE} ${script}"
-                cat "${log_file}" >&2
-                return "${EXIT_CODE}"
-            fi
-        }
-        echo -e "\n${OT_COLOR_PASS}PASS${OT_COLOR_NONE} ${script}"
-        if [[ ${VERBOSE} == 1 ]]; then
-            cat "${log_file}" >&2
-        fi
-    done
-}
-
-do_expect()
-{
-    local test_patterns
-
-    if [[ ${OT_NODE_TYPE} == rcp* ]]; then
-        if [[ ${OT_NATIVE_IP} == 1 ]]; then
-            test_patterns=(-name 'tun-*.exp')
-        else
-            test_patterns=(-name 'posix-*.exp' -o -name 'cli-*.exp')
-            if [[ ${THREAD_VERSION} == "1.2" ]]; then
-                test_patterns+=(-o -name 'v1_2-*.exp')
-            fi
-        fi
-    else
-        test_patterns=(-name 'cli-*.exp' -o -name 'simulation-*.exp')
-    fi
-
-    if [[ $# != 0 ]]; then
-        ot_exec_expect_script "$@"
-    else
-        export OT_COLOR_PASS OT_COLOR_FAIL OT_COLOR_SKIP OT_COLOR_NONE OT_NATIVE_IP VERBOSE
-        export -f ot_exec_expect_script
-
-        find tests/scripts/expect -type f -perm "$([[ $OSTYPE == darwin* ]] && echo '+' || echo '/')"111 \( "${test_patterns[@]}" \) -exec bash -c 'set -euo pipefail;ot_exec_expect_script "$@"' _ {} +
-    fi
-
-    exit 0
-}
-
-print_usage()
-{
-    echo "USAGE: [ENVIRONMENTS] $0 COMMANDS
-
-ENVIRONMENTS:
-    OT_NODE_TYPE    'cli' for CLI simulation, 'ncp' for NCP simulation.
-                    'rcp' or 'rcp-cli' for CLI on POSIX platform.
-                    'rcp-ncp' for NCP on POSIX platform.
-                    The default is 'cli'.
-    OT_NATIVE_IP    1 to enable platform UDP and netif on POSIX platform. The default is 0.
-    OT_BUILDDIR     The output directory for cmake build. By default the directory is './build'. For example,
-                    'OT_BUILDDIR=\${PWD}/my_awesome_build ./script/test clean build'.
-    VERBOSE         1 to build or test verbosely. The default is 0.
-    VIRTUAL_TIME    1 for virtual time, otherwise real time. The default value is 0 when running expect tests,
-                    otherwise default value is 1.
-    THREAD_VERSION  1.1 for Thread 1.1 stack, 1.2 for Thread 1.2 stack. The default is 1.2.
-    INTER_OP        1 to build 1.1 together. Only works when THREAD_VERSION is 1.2. The default is 0.
-    INTER_OP_BBR    1 to build bbr version together. Only works when THREAD_VERSION is 1.2. The default is 1.
-
-COMMANDS:
-    clean           Clean built files to prepare for new build.
-    build           Build project for running tests. This can be used to rebuild the project for changes.
-    cert            Run a single thread-cert test. ENVIRONMENTS should be the same as those given to build or update.
-    cert_suite      Run a batch of thread-cert tests and summarize the test results. Only echo logs for failing tests.
-    unit            Run all the unit tests. This should be called after simulation is built.
-    expect          Run expect tests.
-    help            Print this help.
-
-EXAMPLES:
-    # Test CLI with default settings
-    $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
-    $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
-
-    # Test NCP with default settings
-    $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
-    $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
-
-    # Test CLI with radio only
-    $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
-    $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
-
-    # Test CLI with real time
-    VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
-    VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
-
-    # Test Thread 1.1 CLI with real time
-    THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
-    THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py
-
-    # Test Thread 1.2 with real time, use 'INTER_OP=1' when the case needs both versions.
-    VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_test_enhanced_keep_alive.py
-    INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_router_5_1_1.py
-    INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert_suite tests/scripts/thread-cert/v1_2_*
-
-    # Run a single expect test
-    $0 clean build expect tests/scripts/expect/cli-log-level.exp
-
-    # Run all expect tests
-    $0 clean build expect
-    "
-
-    exit "$1"
-}
-
-do_prepare_coredump_upload()
-{
-    echo "$OT_COREDUMP_DIR/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
-    rm -rf "$OT_COREDUMP_DIR"
-    mkdir -p "$OT_COREDUMP_DIR"
-}
-
-do_copy_so_lib()
-{
-    mkdir -p "$OT_COREDUMP_DIR/so-lib"
-    cp /lib/x86_64-linux-gnu/libgcc_s.so.1 "$OT_COREDUMP_DIR/so-lib"
-    cp /lib/x86_64-linux-gnu/libc.so.6 "$OT_COREDUMP_DIR/so-lib"
-    cp /lib64/ld-linux-x86-64.so.2 "$OT_COREDUMP_DIR/so-lib"
-}
-
-do_check_crash()
-{
-    shopt -s nullglob
-
-    # Scan core dumps and collect binaries which crashed
-    declare -A bin_list=([dummy]='')
-    for f in "$OT_COREDUMP_DIR"/core*; do
-        bin=$(file "$f" | grep -E -o "execfn: '(.*')," | sed -r "s/execfn: '(.*)',/\1/")
-        bin_list[$bin]=''
-    done
-
-    for key in "${!bin_list[@]}"; do
-        if [ "$key" != "dummy" ]; then
-            # Add postfix for binaries to avoid conflicts caused by different Thread version
-            postfix=""
-            if [[ $key =~ openthread-(simulation|posix)-([0-9]\.[0-9]) ]]; then
-                postfix="-$(echo "$key" | sed -r "s/.*openthread-(simulation|posix)-([0-9]\.[0-9]).*/\2/")"
-            fi
-            bin_name=$(basename "$key")
-            cp "$key" "$OT_COREDUMP_DIR"/"$bin_name""$postfix"
-        fi
-    done
-
-    # echo 1 and copy so libs if crash found, echo 0 otherwise
-    [[ ${#bin_list[@]} -gt 1 ]] && (
-        echo 1
-        do_copy_so_lib
-    ) || echo 0
-}
-
-do_generate_coverage()
-{
-    mkdir -p tmp/
-    sudo chmod 777 tmp/
-    rm -f tmp/coverage.lcov
-    if [[ $1 == "llvm" ]]; then
-        local llvm_gcov
-        llvm_gcov="$(mktemp -d)/llvm-gcov"
-        echo '#!/bin/bash' >>"$llvm_gcov"
-        echo 'exec llvm-cov gcov "$@"' >>"$llvm_gcov"
-        chmod +x "$llvm_gcov"
-        lcov --gcov-tool "$llvm_gcov" --directory . --capture --output-file tmp/coverage.info
-    else
-        ./script/gcda-tool collect
-        ./script/gcda-tool install
-
-        lcov --directory . --capture --output-file tmp/coverage.info
-    fi
-    lcov --list tmp/coverage.info
-    lcov --extract tmp/coverage.info "$PWD/src/core/common/message.cpp" | c++filt
-}
-
-do_combine_coverage()
-{
-    ls -R coverage/
-
-    readarray -d '' files < <(find coverage/ -type f -name 'coverage*.info' -print0)
-
-    local args=()
-    for i in "${files[@]}"; do
-        args+=('-a')
-        args+=("$i")
-    done
-    lcov "${args[@]}" -o final.info
-}
-
-envsetup()
-{
-    export THREAD_VERSION
-
-    if [[ ${OT_NODE_TYPE} == rcp* ]]; then
-        export RADIO_DEVICE="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps/ncp/ot-rcp"
-        export OT_CLI_PATH="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix/ot-cli"
-
-        if [[ ${THREAD_VERSION} == "1.2" ]]; then
-            export RADIO_DEVICE_1_1="${OT_BUILDDIR}/openthread-simulation-1.1/examples/apps/ncp/ot-rcp"
-            export OT_CLI_PATH_1_1="${OT_BUILDDIR}/openthread-posix-1.1/src/posix/ot-cli"
-            export OT_CLI_PATH_1_2_BBR="${OT_BUILDDIR}/openthread-posix-1.2-bbr/src/posix/ot-cli"
-        fi
-    fi
-
-    export OT_SIMULATION_APPS="${OT_BUILDDIR}/openthread-simulation-${THREAD_VERSION}/examples/apps"
-    export OT_POSIX_APPS="${OT_BUILDDIR}/openthread-posix-${THREAD_VERSION}/src/posix"
-
-    if [[ ! ${VIRTUAL_TIME+x} ]]; then
-        # All expect tests only works in real time mode.
-        VIRTUAL_TIME=1
-        for arg in "$@"; do
-            if [[ $arg == expect ]]; then
-                VIRTUAL_TIME=0
-                break
-            fi
-        done
-    fi
-
-    readonly VIRTUAL_TIME
-    export OT_NODE_TYPE VIRTUAL_TIME
-
-    # CMake always works in verbose mode if VERBOSE exists in environments.
-    if [[ ${VERBOSE} == 1 ]]; then
-        export VERBOSE
-    else
-        export -n VERBOSE
-    fi
-
-    if [[ ${OT_OPTIONS+x} ]]; then
-        read -r -a ot_extra_options <<<"${OT_OPTIONS}"
-    else
-        ot_extra_options=()
-    fi
-}
-
-main()
-{
-    envsetup "$@"
-
-    if [[ -z ${1:-} ]]; then
-        print_usage 1
-    fi
-
-    [[ ${VIRTUAL_TIME} == 1 ]] && echo "Using virtual time" || echo "Using real time"
-    [[ ${THREAD_VERSION} == "1.2" ]] && echo "Using Thread 1.2 stack" || echo "Using Thread 1.1 stack"
-
-    while [[ $# != 0 ]]; do
-        case "$1" in
-            clean)
-                do_clean
-                ;;
-            build)
-                do_build
-                ;;
-            cert)
-                shift
-                do_cert "$@"
-                shift $#
-                ;;
-            cert_suite)
-                shift
-                do_cert_suite "$@"
-                shift $#
-                ;;
-            get_thread_wireshark)
-                do_get_thread_wireshark
-                ;;
-            build_otbr_docker)
-                do_build_otbr_docker
-                ;;
-            pktverify)
-                shift
-                do_pktverify "$1"
-                ;;
-            unit)
-                do_unit
-                ;;
-            help)
-                print_usage
-                ;;
-            package)
-                ./script/package "${ot_extra_options[@]}"
-                ;;
-            expect)
-                shift
-                do_expect "$@"
-                ;;
-            prepare_coredump_upload)
-                do_prepare_coredump_upload
-                ;;
-            check_crash)
-                do_check_crash
-                ;;
-            generate_coverage)
-                shift
-                do_generate_coverage "$1"
-                ;;
-            combine_coverage)
-                do_combine_coverage
-                ;;
-            *)
-                echo
-                echo -e "${OT_COLOR_FAIL}Warning:${OT_COLOR_NONE} Ignoring: '$1'"
-                ;;
-        esac
-        shift
-    done
-}
-
-main "$@"
diff --git a/src/cli/BUILD.gn b/src/cli/BUILD.gn
index 2d4e8f6..3a6a70a 100644
--- a/src/cli/BUILD.gn
+++ b/src/cli/BUILD.gn
@@ -75,3 +75,17 @@
   public_configs = [":cli_config"]
   visibility = [ "../../*" ]
 }
+
+static_library("libopenthread-cli-ftd-legacy-extensions") {
+  sources = openthread_cli_sources
+  public_deps = [ "../core:libopenthread-ftd-legacy-extensions" ]
+  public_configs = [":cli_config"]
+  visibility = [ "../../*" ]
+}
+
+static_library("libopenthread-cli-mtd-legacy-extensions") {
+  sources = openthread_cli_sources
+  public_deps = [ "../core:libopenthread-mtd-legacy-extensions" ]
+  public_configs = [":cli_config"]
+  visibility = [ "../../*" ]
+}
diff --git a/src/cli/cli_output.cpp b/src/cli/cli_output.cpp
index bd61c25..7d2208e 100644
--- a/src/cli/cli_output.cpp
+++ b/src/cli/cli_output.cpp
@@ -247,7 +247,13 @@
     va_copy(args, aArguments);
 #endif
 
+#if OPENTHREAD_CONFIG_CLI_PREFORMAT_OUTPUT
+    char outputString[kInputOutputLogStringSize];
+    vsnprintf(outputString, sizeof(outputString) - 1, aFormat, aArguments);
+    mCallback(mCallbackContext, outputString, aArguments);
+#else
     mCallback(mCallbackContext, aFormat, aArguments);
+#endif
 
 #if OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE
     VerifyOrExit(mEmittingCommandOutput);
diff --git a/src/core/BUILD.gn b/src/core/BUILD.gn
index 1518546..5ba6b7c 100644
--- a/src/core/BUILD.gn
+++ b/src/core/BUILD.gn
@@ -37,6 +37,8 @@
       defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_1" ]
     } else if (openthread_config_thread_version == "1.2") {
       defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_2" ]
+    } else if (openthread_config_thread_version == "1.3") {
+      defines += [ "OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3" ]
     } else if (openthread_config_thread_version != "") {
       assert(false,
              "Unrecognized Thread version: ${openthread_config_thread_version}")
@@ -274,6 +276,7 @@
 config("core_config") {
   defines = []
   configs = []
+  cflags = [ "-Wno-ambiguous-reversed-operator" ]
 
   if (openthread_project_core_config_file != "") {
     defines += [ "OPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"${openthread_project_core_config_file}\"" ]
@@ -789,6 +792,52 @@
   public_deps += openthread_core_config_deps
 }
 
+source_set("libopenthread_core_config_legacy_extensions") {
+  public = [
+    "config/announce_sender.h",
+    "config/backbone_router.h",
+    "config/border_router.h",
+    "config/channel_manager.h",
+    "config/channel_monitor.h",
+    "config/child_supervision.h",
+    "config/coap.h",
+    "config/commissioner.h",
+    "config/dataset_updater.h",
+    "config/dhcp6_client.h",
+    "config/dhcp6_server.h",
+    "config/diag.h",
+    "config/dns_client.h",
+    "config/dnssd_server.h",
+    "config/dtls.h",
+    "config/ip6.h",
+    "config/joiner.h",
+    "config/link_quality.h",
+    "config/link_raw.h",
+    "config/logging.h",
+    "config/mac.h",
+    "config/mle.h",
+    "config/openthread-core-config-check.h",
+    "config/openthread-core-default-config.h",
+    "config/parent_search.h",
+    "config/ping_sender.h",
+    "config/platform.h",
+    "config/radio_link.h",
+    "config/sntp_client.h",
+    "config/srp_client.h",
+    "config/srp_server.h",
+    "config/time_sync.h",
+    "config/tmf.h",
+    "openthread-core-config.h",
+  ]
+  public_configs = [
+    ":core_config",
+    "../..:openthread_config_legacy_extensions",
+  ]
+  public_deps =
+      [ "../../include/openthread:openthread_config_legacy_extensions" ]
+  public_deps += openthread_core_config_deps
+}
+
 source_set("libopenthread_core_headers") {
   public = openthread_core_headers
   public_deps = [
@@ -798,6 +847,15 @@
   visibility += [ "*" ]
 }
 
+source_set("libopenthread_core_headers_legacy_extensions") {
+  public = openthread_core_headers
+  public_deps = [
+    ":libopenthread_core_config_legacy_extensions",
+    "../../include/openthread:openthread_legacy_extensions",
+  ]
+  visibility += [ "*" ]
+}
+
 group("libopenthread_platform") {
   public_deps = []
   if (openthread_external_platform != "") {
@@ -809,20 +867,49 @@
   ]
 }
 
+group("libopenthread_platform_legacy_extensions") {
+  public_deps = []
+  if (openthread_external_platform != "") {
+    public_deps += [ openthread_external_platform ]
+  }
+  public_deps += [
+    ":libopenthread_core_headers_legacy_extensions",
+    "${mbedtls_target}" + ":mbedtls_legacy_extensions",
+  ]
+}
+
 static_library("libopenthread-ftd") {
   sources = openthread_core_sources
   public_deps = [ ":libopenthread_platform" ]
   public_configs = [ "../..:openthread_ftd_config" ]
 }
 
+static_library("libopenthread-ftd-legacy-extensions") {
+  sources = openthread_core_sources
+  public_deps = [ ":libopenthread_platform_legacy_extensions" ]
+  public_configs = [ "../..:openthread_ftd_config" ]
+}
+
 static_library("libopenthread-mtd") {
   sources = openthread_core_sources
   public_deps = [ ":libopenthread_platform" ]
   public_configs = [ "../..:openthread_mtd_config" ]
 }
 
+static_library("libopenthread-mtd-legacy-extensions") {
+  sources = openthread_core_sources
+  public_deps = [ ":libopenthread_platform_legacy_extensions" ]
+  public_configs = [ "../..:openthread_mtd_config" ]
+}
+
 static_library("libopenthread-radio") {
   sources = openthread_radio_sources
   public_deps = [ ":libopenthread_platform" ]
   public_configs = [ "../..:openthread_radio_config" ]
 }
+
+static_library("libopenthread-radio-legacy-extensions") {
+  sources = openthread_radio_sources
+  public_deps = [ ":libopenthread_platform_legacy_extensions" ]
+  public_configs = [ "../..:openthread_radio_config" ]
+}
diff --git a/src/core/common/heap_allocatable.hpp b/src/core/common/heap_allocatable.hpp
index 1b88016..63b82ca 100644
--- a/src/core/common/heap_allocatable.hpp
+++ b/src/core/common/heap_allocatable.hpp
@@ -39,7 +39,10 @@
 #include "common/code_utils.hpp"
 #include "common/error.hpp"
 #include "common/heap.hpp"
+
+#ifndef __Fuchsia__
 #include "common/new.hpp"
+#endif
 
 namespace ot {
 namespace Heap {
diff --git a/src/core/common/heap_array.hpp b/src/core/common/heap_array.hpp
index a4ede90..353462d 100644
--- a/src/core/common/heap_array.hpp
+++ b/src/core/common/heap_array.hpp
@@ -43,7 +43,7 @@
 #include "common/code_utils.hpp"
 #include "common/error.hpp"
 #include "common/heap.hpp"
-#include "common/new.hpp"
+//#include "common/new.hpp"
 
 namespace ot {
 namespace Heap {
diff --git a/src/lib/spinel/BUILD.gn b/src/lib/spinel/BUILD.gn
index e4e8f03..b674cc2 100644
--- a/src/lib/spinel/BUILD.gn
+++ b/src/lib/spinel/BUILD.gn
@@ -83,3 +83,23 @@
   ]
   public_configs = [ ":spinel_config_openthread_message_disable" ]
 }
+
+static_library("libopenthread-spinel-ncp-legacy-extensions") {
+  sources = spinel_sources
+  public_deps = [
+    ":spinel-api",
+    "../../core:libopenthread_core_headers_legacy_extensions",
+    "../platform:libopenthread-platform",
+  ]
+  public_configs = [ ":spinel_config_openthread_message_enable" ]
+}
+
+static_library("libopenthread-spinel-rcp-legacy-extensions") {
+  sources = spinel_sources
+  public_deps = [
+    ":spinel-api",
+    "../../core:libopenthread_core_headers_legacy_extensions",
+    "../platform:libopenthread-platform",
+  ]
+  public_configs = [ ":spinel_config_openthread_message_disable" ]
+}
diff --git a/src/ncp/BUILD.gn b/src/ncp/BUILD.gn
index 2adfdec..0e3c8e3 100644
--- a/src/ncp/BUILD.gn
+++ b/src/ncp/BUILD.gn
@@ -58,6 +58,16 @@
   visibility = [ "../../*" ]
 }
 
+static_library("libopenthread-ncp-ftd-legacy-extensions") {
+  sources = openthread_ncp_sources
+  public_deps = [
+    "../core:libopenthread-ftd-legacy-extensions",
+    "../lib/spinel:libopenthread-spinel-ncp-legacy-extensions",
+  ]
+  public_configs = [ ":ncp_config" ]
+  visibility = [ "../../*" ]
+}
+
 static_library("libopenthread-ncp-mtd") {
   sources = openthread_ncp_sources
   public_deps = [
@@ -68,6 +78,16 @@
   visibility = [ "../../*" ]
 }
 
+static_library("libopenthread-ncp-mtd-legacy-extensions") {
+  sources = openthread_ncp_sources
+  public_deps = [
+    "../core:libopenthread-mtd-legacy-extensions",
+    "../lib/spinel:libopenthread-spinel-ncp-legacy-extensions",
+  ]
+  public_configs = [ ":ncp_config" ]
+  visibility = [ "../../*" ]
+}
+
 static_library("libopenthread-rcp") {
   sources = openthread_ncp_sources
   public_deps = [
@@ -77,3 +97,13 @@
   public_configs = [ ":ncp_config" ]
   visibility = [ "../../*" ]
 }
+
+static_library("libopenthread-rcp-legacy-extensions") {
+  sources = openthread_ncp_sources
+  public_deps = [
+    "../core:libopenthread-radio-legacy-extensions",
+    "../lib/spinel:libopenthread-spinel-rcp-legacy-extensions",
+  ]
+  public_configs = [ ":ncp_config" ]
+  visibility = [ "../../*" ]
+}
diff --git a/third_party/build_gn/BUILDCONFIG.gn b/third_party/build_gn/BUILDCONFIG.gn
deleted file mode 100644
index f9202d9..0000000
--- a/third_party/build_gn/BUILDCONFIG.gn
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-if (target_os == "") {
-  target_os = host_os
-}
-if (target_cpu == "") {
-  target_cpu = host_cpu
-}
-if (current_cpu == "") {
-  current_cpu = target_cpu
-}
-if (current_os == "") {
-  current_os = target_os
-}
-
-set_default_toolchain("//third_party/build_gn/toolchain:gcc")
diff --git a/third_party/build_gn/README.md b/third_party/build_gn/README.md
deleted file mode 100644
index 0430d11..0000000
--- a/third_party/build_gn/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# build_gn
-
-## URL
-
-https://gn.googlesource.com/gn/+/refs/heads/master/examples/simple_build/build
-
-## License
-
-BSD 3-Clause
-
-## License File
-
-[LICENSE](https://gn.googlesource.com/gn/+/refs/heads/master/LICENSE)
-
-## Description
-
-gn is metabuild system that generates ninja files for further compilation 
-
-gn tool requires paths to all the toolchains to be used for compilation, for
-example compiler, linker etc. The toolchains in toolchain/BUILD.gn are from the
-examples repository for gn. BUILDCONFIG.gn is also trimmed down version from
-examples/simple_build/build/
diff --git a/third_party/build_gn/toolchain/BUILD.gn b/third_party/build_gn/toolchain/BUILD.gn
deleted file mode 100644
index 64df6a8..0000000
--- a/third_party/build_gn/toolchain/BUILD.gn
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-toolchain("gcc") {
-  tool("cc") {
-    depfile = "{{output}}.d"
-    command = "gcc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}"
-    depsformat = "gcc"
-    description = "CC {{output}}"
-    outputs = [
-      "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
-    ]
-  }
-  tool("cxx") {
-    depfile = "{{output}}.d"
-    command = "g++ -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}"
-    depsformat = "gcc"
-    description = "CXX {{output}}"
-    outputs = [
-      "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
-    ]
-  }
-  tool("alink") {
-    rspfile = "{{output}}.rsp"
-    command = "rm -f {{output}} && ar rcs {{output}} @$rspfile"
-    description = "AR {{target_output_name}}{{output_extension}}"
-    rspfile_content = "{{inputs}}"
-    outputs = [
-      "{{target_out_dir}}/{{target_output_name}}{{output_extension}}",
-    ]
-    default_output_extension = ".a"
-    output_prefix = "lib"
-  }
-  tool("solink") {
-    soname = "{{target_output_name}}{{output_extension}}"  # e.g. "libfoo.so".
-    sofile = "{{output_dir}}/$soname"
-    rspfile = soname + ".rsp"
-    command = "g++ -shared {{ldflags}} -o $sofile -Wl,-soname=$soname @$rspfile"
-    rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive {{libs}}"
-    description = "SOLINK $soname"
-    # Use this for {{output_extension}} expansions unless a target manually
-    # overrides it (in which case {{output_extension}} will be what the target
-    # specifies).
-    default_output_extension = ".so"
-    # Use this for {{output_dir}} expansions unless a target manually overrides
-    # it (in which case {{output_dir}} will be what the target specifies).
-    default_output_dir = "{{root_out_dir}}"
-    outputs = [
-      sofile,
-    ]
-    link_output = sofile
-    depend_output = sofile
-    output_prefix = "lib"
-  }
-  tool("link") {
-    outfile = "{{target_output_name}}{{output_extension}}"
-    rspfile = "$outfile.rsp"
-    command = "g++ {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group {{libs}}"
-    description = "LINK $outfile"
-    default_output_dir = "{{root_out_dir}}"
-    rspfile_content = "{{inputs}}"
-    outputs = [
-      outfile,
-    ]
-  }
-  tool("stamp") {
-    command = "touch {{output}}"
-    description = "STAMP {{output}}"
-  }
-  tool("copy") {
-    command = "cp -af {{source}} {{output}}"
-    description = "COPY {{source}} {{output}}"
-  }
-}
diff --git a/third_party/jlink/CMakeLists.txt b/third_party/jlink/CMakeLists.txt
deleted file mode 100644
index 5160bbb..0000000
--- a/third_party/jlink/CMakeLists.txt
+++ /dev/null
@@ -1,36 +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.
-#
-
-string(REPLACE "-Wundef" "" OT_CFLAGS "${OT_CFLAGS}")
-add_library(jlinkrtt
-    SEGGER_RTT_V640/RTT/SEGGER_RTT.c
-)
-
-target_include_directories(jlinkrtt PRIVATE
-    ${PROJECT_SOURCE_DIR}/include
-)
diff --git a/third_party/jlink/Makefile.am b/third_party/jlink/Makefile.am
deleted file mode 100644
index 883eed0..0000000
--- a/third_party/jlink/Makefile.am
+++ /dev/null
@@ -1,54 +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 $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-# Do not enable -Wundef for jlink library
-override CFLAGS                                      := $(filter-out -Wundef,$(CFLAGS))
-override CXXFLAGS                                    := $(filter-out -Wundef,$(CXXFLAGS))
-
-# Do not enable -Wcast-align for jlink library
-override CFLAGS                                      := $(filter-out -Wcast-align,$(CFLAGS))
-override CXXFLAGS                                    := $(filter-out -Wcast-align,$(CXXFLAGS))
-
-lib_LIBRARIES                                             = libjlinkrtt.a
-
-libjlinkrtt_a_CPPFLAGS                                    = \
-    -I$(top_srcdir)/third_party/jlink/SEGGER_RTT_V640/RTT   \
-    $(NULL)
-
-libjlinkrtt_a_SOURCES                                     = \
-    SEGGER_RTT_V640/RTT/SEGGER_RTT.c                        \
-    $(NULL)
-
-noinst_HEADERS                                            = \
-    SEGGER_RTT_V640/RTT/SEGGER_RTT.h                        \
-    SEGGER_RTT_V640/RTT/SEGGER_RTT_Conf.h                   \
-    $(NULL)
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/third_party/jlink/README.md b/third_party/jlink/README.md
deleted file mode 100644
index c247738..0000000
--- a/third_party/jlink/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# SEGGER RTT
-
-## URL
-
-https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/
-
-## Version
-
-6.40
-
-## License File
-
-[LICENSE](SEGGER_RTT_V640/License.txt)
-
-## Description
-
-With RTT it is possible to output information from the target microcontroller as
-well as sending input to the application at a very high speed without affecting
-the target's real time behavior. SEGGER RTT can be used with any J-Link model and
-any supported target processor which allows background memory access, which are
-Cortex-M and RX targets. 
diff --git a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_InputEchoApp.c b/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_InputEchoApp.c
deleted file mode 100644
index 5b453bf..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_InputEchoApp.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-
---------- END-OF-HEADER --------------------------------------------
-File    : Main_RTT_MenuApp.c
-Purpose : Sample application to demonstrate RTT bi-directional functionality
-*/
-
-#define MAIN_C
-
-#include <stdio.h>
-
-#include "SEGGER_RTT.h"
-
-volatile int _Cnt;
-volatile int _Delay;
-
-static char r;
-
-/*********************************************************************
-*
-*       main
-*/
-void main(void) {
-
-  SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n");
-  SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_NO_BLOCK_SKIP);
-  do {
-    r = SEGGER_RTT_WaitKey();
-    SEGGER_RTT_Write(0, &r, 1);
-    r++;
-  } while (1);
-}
-
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_MenuApp.c b/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_MenuApp.c
deleted file mode 100644
index 4dbcc84..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_MenuApp.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
---------- END-OF-HEADER --------------------------------------------
-File    : Main_RTT_MenuApp.c
-Purpose : Sample application to demonstrate RTT bi-directional functionality
-*/
-
-#define MAIN_C
-
-#include <stdio.h>
-
-#include "SEGGER_RTT.h"
-
-volatile int _Cnt;
-volatile int _Delay;
-
-/*********************************************************************
-*
-*       main
-*/
-void main(void) {
-  int r;
-  int CancelOp;
-
-  do {
-    _Cnt = 0;
-
-    SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n");
-    SEGGER_RTT_WriteString(0, "Press <1> to continue in blocking mode (Application waits if necessary, no data lost)\r\n");
-    SEGGER_RTT_WriteString(0, "Press <2> to continue in non-blocking mode (Application does not wait, data lost if fifo full)\r\n");
-    do {
-      r = SEGGER_RTT_WaitKey();
-    } while ((r != '1') && (r != '2'));
-    if (r == '1') {
-      SEGGER_RTT_WriteString(0, "\r\nSelected <1>. Configuring RTT and starting...\r\n");
-      SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);
-    } else {
-      SEGGER_RTT_WriteString(0, "\r\nSelected <2>. Configuring RTT and starting...\r\n");
-      SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_NO_BLOCK_SKIP);
-    }
-    CancelOp = 0;
-    do {
-      //for (_Delay = 0; _Delay < 10000; _Delay++);
-      SEGGER_RTT_printf(0, "Count: %d. Press <Space> to get back to menu.\r\n", _Cnt++);
-      r = SEGGER_RTT_HasKey();
-      if (r) {
-        CancelOp = (SEGGER_RTT_GetKey() == ' ') ? 1 : 0;
-      }
-      //
-      // Check if user selected to cancel the current operation
-      //
-      if (CancelOp) {
-        SEGGER_RTT_WriteString(0, "Operation cancelled, going back to menu...\r\n");
-        break;
-      }
-    } while (1);
-    SEGGER_RTT_GetKey();
-    SEGGER_RTT_WriteString(0, "\r\n");
-  } while (1);
-}
-
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_PrintfTest.c b/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_PrintfTest.c
deleted file mode 100644
index 2d90fff..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_PrintfTest.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-
---------- END-OF-HEADER --------------------------------------------
-File    : Main_RTT_MenuApp.c
-Purpose : Sample application to demonstrate RTT bi-directional functionality
-*/
-
-#define MAIN_C
-
-#include <stdio.h>
-
-#include "SEGGER_RTT.h"
-
-volatile int _Cnt;
-
-/*********************************************************************
-*
-*       main
-*/
-void main(void) {
-
-  SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);
-
-  SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n\r\n");
-  SEGGER_RTT_WriteString(0, "###### Testing SEGGER_printf() ######\r\n");
-
-  SEGGER_RTT_printf(0, "printf Test: %%c,         'S' : %c.\r\n", 'S');
-  SEGGER_RTT_printf(0, "printf Test: %%5c,        'E' : %5c.\r\n", 'E');
-  SEGGER_RTT_printf(0, "printf Test: %%-5c,       'G' : %-5c.\r\n", 'G');
-  SEGGER_RTT_printf(0, "printf Test: %%5.3c,      'G' : %-5c.\r\n", 'G');
-  SEGGER_RTT_printf(0, "printf Test: %%.3c,       'E' : %-5c.\r\n", 'E');
-  SEGGER_RTT_printf(0, "printf Test: %%c,         'R' : %c.\r\n", 'R');
-
-  SEGGER_RTT_printf(0, "printf Test: %%s,      \"RTT\" : %s.\r\n", "RTT");
-  SEGGER_RTT_printf(0, "printf Test: %%s, \"RTT\\r\\nRocks.\" : %s.\r\n", "RTT\r\nRocks.");
-
-  SEGGER_RTT_printf(0, "printf Test: %%u,       12345 : %u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%+u,      12345 : %+u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%.3u,     12345 : %.3u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%.6u,     12345 : %.6u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%6.3u,    12345 : %6.3u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%8.6u,    12345 : %8.6u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%08u,     12345 : %08u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%08.6u,   12345 : %08.6u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%0u,      12345 : %0u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-.6u,    12345 : %-.6u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-6.3u,   12345 : %-6.3u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-8.6u,   12345 : %-8.6u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-08u,    12345 : %-08u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-08.6u,  12345 : %-08.6u.\r\n", 12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-0u,     12345 : %-0u.\r\n", 12345);
-
-  SEGGER_RTT_printf(0, "printf Test: %%u,      -12345 : %u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%+u,     -12345 : %+u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%.3u,    -12345 : %.3u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%.6u,    -12345 : %.6u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%6.3u,   -12345 : %6.3u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%8.6u,   -12345 : %8.6u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%08u,    -12345 : %08u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%08.6u,  -12345 : %08.6u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%0u,     -12345 : %0u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-.6u,   -12345 : %-.6u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-6.3u,  -12345 : %-6.3u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-8.6u,  -12345 : %-8.6u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-08u,   -12345 : %-08u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-08.6u, -12345 : %-08.6u.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-0u,    -12345 : %-0u.\r\n", -12345);
-
-  SEGGER_RTT_printf(0, "printf Test: %%d,      -12345 : %d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%+d,     -12345 : %+d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%.3d,    -12345 : %.3d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%.6d,    -12345 : %.6d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%6.3d,   -12345 : %6.3d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%8.6d,   -12345 : %8.6d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%08d,    -12345 : %08d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%08.6d,  -12345 : %08.6d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%0d,     -12345 : %0d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-.6d,   -12345 : %-.6d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-6.3d,  -12345 : %-6.3d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-8.6d,  -12345 : %-8.6d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-08d,   -12345 : %-08d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-08.6d, -12345 : %-08.6d.\r\n", -12345);
-  SEGGER_RTT_printf(0, "printf Test: %%-0d,    -12345 : %-0d.\r\n", -12345);
-
-  SEGGER_RTT_printf(0, "printf Test: %%x,      0x1234ABC : %x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%+x,     0x1234ABC : %+x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%.3x,    0x1234ABC : %.3x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%.6x,    0x1234ABC : %.6x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%6.3x,   0x1234ABC : %6.3x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%8.6x,   0x1234ABC : %8.6x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%08x,    0x1234ABC : %08x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%08.6x,  0x1234ABC : %08.6x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%0x,     0x1234ABC : %0x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%-.6x,   0x1234ABC : %-.6x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%-6.3x,  0x1234ABC : %-6.3x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%-8.6x,  0x1234ABC : %-8.6x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%-08x,   0x1234ABC : %-08x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%-08.6x, 0x1234ABC : %-08.6x.\r\n", 0x1234ABC);
-  SEGGER_RTT_printf(0, "printf Test: %%-0x,    0x1234ABC : %-0x.\r\n", 0x1234ABC);
-
-  SEGGER_RTT_printf(0, "printf Test: %%p,      &_Cnt      : %p.\r\n", &_Cnt);
-
-  SEGGER_RTT_WriteString(0, "###### SEGGER_printf() Tests done. ######\r\n");
-  do {
-    _Cnt++;
-  } while (1);
-}
-
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_SpeedTestApp.c b/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_SpeedTestApp.c
deleted file mode 100644
index 0dc0c75..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Examples/Main_RTT_SpeedTestApp.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-
---------- END-OF-HEADER --------------------------------------------
-File    : Main_RTT_SpeedTestApp.c
-Purpose : Sample program for measuring RTT performance.
-*/
-
-#include "RTOS.h"
-#include "BSP.h"
-
-#include "SEGGER_RTT.h"
-#include <stdio.h>
-
-OS_STACKPTR int StackHP[128], StackLP[128];          /* Task stacks */
-OS_TASK TCBHP, TCBLP;                        /* Task-control-blocks */
-
-static void HPTask(void) {
-  while (1) {
-    //
-    // Measure time needed for RTT output
-    // Perform dummy write with 0 characters, so we know the overhead of toggling LEDs and RTT in general
-    //
-// Set BP here. Then start sampling on scope
-    BSP_ClrLED(0);
-    SEGGER_RTT_Write(0, 0, 0);
-    BSP_SetLED(0);
-    BSP_ClrLED(0);
-    SEGGER_RTT_Write(0, "01234567890123456789012345678901234567890123456789012345678901234567890123456789\r\n", 82);
-    BSP_SetLED(0);
-// Set BP here. Then stop sampling on scope
-    OS_Delay(200);
-  }
-}
-
-static void LPTask(void) {
-  while (1) {
-    BSP_ToggleLED(1);
-    OS_Delay (500);
-  }
-}
-
-/*********************************************************************
-*
-*       main
-*
-*********************************************************************/
-
-int main(void) {
-  OS_IncDI();                      /* Initially disable interrupts  */
-  OS_InitKern();                   /* Initialize OS                 */
-  OS_InitHW();                     /* Initialize Hardware for OS    */
-  BSP_Init();                      /* Initialize LED ports          */
-  BSP_SetLED(0);
-  /* You need to create at least one task before calling OS_Start() */
-  OS_CREATETASK(&TCBHP, "HP Task", HPTask, 100, StackHP);
-  OS_CREATETASK(&TCBLP, "LP Task", LPTask,  50, StackLP);
-  OS_Start();                      /* Start multitasking            */
-  return 0;
-}
-
diff --git a/third_party/jlink/SEGGER_RTT_V640/License.txt b/third_party/jlink/SEGGER_RTT_V640/License.txt
deleted file mode 100644
index bfe93b3..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/License.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Important - Read carefully:
-
-SEGGER RTT - Real Time Transfer for embedded targets
-
-All rights reserved.
-
-SEGGER strongly recommends to not make any changes
-to or modify the source code of this software in order to stay
-compatible with the RTT protocol and J-Link.
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following
-conditions are met:
-
-o Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-
-o 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.
-
-o Neither the name of SEGGER Microcontroller GmbH
-  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 SEGGER Microcontroller 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.
-
-
-(c) 2014 - 2016  SEGGER Microcontroller GmbH
-www.segger.com
diff --git a/third_party/jlink/SEGGER_RTT_V640/README.txt b/third_party/jlink/SEGGER_RTT_V640/README.txt
deleted file mode 100644
index 49ec655..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/README.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-README.txt for the SEGGER RTT Implementation Pack.
-
-Included files:
-===============
-Root Directory
-  - Examples
-    - Main_RTT_InputEchoApp.c    - Sample application which echoes input on Channel 0.
-    - Main_RTT_MenuApp.c         - Sample application to demonstrate RTT bi-directional functionality.
-    - Main_RTT_PrintfTest.c      - Sample application to test RTT small printf implementation.
-    - Main_RTT_SpeedTestApp.c    - Sample application for measuring RTT performance. embOS needed.
-  - RTT
-    - SEGGER_RTT.c                - The RTT implementation.
-    - SEGGER_RTT.h                - Header for RTT implementation.
-    - SEGGER_RTT_Conf.h           - Pre-processor configuration for the RTT implementation.
-    - SEGGER_RTT_Printf.c         - Simple implementation of printf to write formatted strings via RTT.
-  - Syscalls
-    - RTT_Syscalls_GCC.c          - Low-level syscalls to retarget printf() to RTT with GCC / Newlib.
-    - RTT_Syscalls_IAR.c          - Low-level syscalls to retarget printf() to RTT with IAR compiler.
-    - RTT_Syscalls_KEIL.c         - Low-level syscalls to retarget printf() to RTT with KEIL/uVision compiler.
-    - RTT_Syscalls_SES.c          - Low-level syscalls to retarget printf() to RTT with SEGGER Embedded Studio.
diff --git a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.c b/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.c
deleted file mode 100644
index 8fc0f6c..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.c
+++ /dev/null
@@ -1,1761 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*                        The Embedded Experts                        *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH                  *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : SEGGER_RTT.c
-Purpose : Implementation of SEGGER real-time transfer (RTT) which
-          allows real-time communication on targets which support
-          debugger memory accesses while the CPU is running.
-Revision: $Rev: 12804 $
-
-Additional information:
-          Type "int" is assumed to be 32-bits in size
-          H->T    Host to target communication
-          T->H    Target to host communication
-
-          RTT channel 0 is always present and reserved for Terminal usage.
-          Name is fixed to "Terminal"
-
-          Effective buffer size: SizeOfBuffer - 1
-
-          WrOff == RdOff:       Buffer is empty
-          WrOff == (RdOff - 1): Buffer is full
-          WrOff >  RdOff:       Free space includes wrap-around
-          WrOff <  RdOff:       Used space includes wrap-around
-          (WrOff == (SizeOfBuffer - 1)) && (RdOff == 0):  
-                                Buffer full and wrap-around after next byte
-
-
-----------------------------------------------------------------------
-*/
-
-#include "SEGGER_RTT.h"
-
-#include <string.h>                 // for memcpy
-
-/*********************************************************************
-*
-*       Configuration, default values
-*
-**********************************************************************
-*/
-
-#ifndef   BUFFER_SIZE_UP
-  #define BUFFER_SIZE_UP                                  1024  // Size of the buffer for terminal output of target, up to host
-#endif
-
-#ifndef   BUFFER_SIZE_DOWN
-  #define BUFFER_SIZE_DOWN                                16    // Size of the buffer for terminal input to target from host (Usually keyboard input)
-#endif
-
-#ifndef   SEGGER_RTT_MAX_NUM_UP_BUFFERS
-  #define SEGGER_RTT_MAX_NUM_UP_BUFFERS                    2    // Number of up-buffers (T->H) available on this target
-#endif
-
-#ifndef   SEGGER_RTT_MAX_NUM_DOWN_BUFFERS
-  #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS                  2    // Number of down-buffers (H->T) available on this target
-#endif
-
-#ifndef SEGGER_RTT_BUFFER_SECTION
-  #if defined(SEGGER_RTT_SECTION)
-    #define SEGGER_RTT_BUFFER_SECTION SEGGER_RTT_SECTION
-  #endif
-#endif
-
-#ifndef   SEGGER_RTT_ALIGNMENT
-  #define SEGGER_RTT_ALIGNMENT                            0
-#endif
-
-#ifndef   SEGGER_RTT_BUFFER_ALIGNMENT
-  #define SEGGER_RTT_BUFFER_ALIGNMENT                     0
-#endif
-
-#ifndef   SEGGER_RTT_MODE_DEFAULT
-  #define SEGGER_RTT_MODE_DEFAULT                         SEGGER_RTT_MODE_NO_BLOCK_SKIP
-#endif
-
-#ifndef   SEGGER_RTT_LOCK
-  #define SEGGER_RTT_LOCK()
-#endif
-
-#ifndef   SEGGER_RTT_UNLOCK
-  #define SEGGER_RTT_UNLOCK()
-#endif
-
-#ifndef   STRLEN
-  #define STRLEN(a)                                       strlen((a))
-#endif
-
-#ifndef   SEGGER_RTT_MEMCPY_USE_BYTELOOP
-  #define SEGGER_RTT_MEMCPY_USE_BYTELOOP                  0
-#endif
-
-#ifndef   SEGGER_RTT_MEMCPY
-  #ifdef  MEMCPY
-    #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes)      MEMCPY((pDest), (pSrc), (NumBytes))
-  #else
-    #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes)      memcpy((pDest), (pSrc), (NumBytes))
-  #endif
-#endif
-
-#ifndef   MIN
-  #define MIN(a, b)         (((a) < (b)) ? (a) : (b))
-#endif
-
-#ifndef   MAX
-  #define MAX(a, b)         (((a) > (b)) ? (a) : (b))
-#endif
-//
-// For some environments, NULL may not be defined until certain headers are included
-//
-#ifndef NULL
-  #define NULL 0
-#endif
-
-/*********************************************************************
-*
-*       Defines, fixed
-*
-**********************************************************************
-*/
-#if (defined __ICCARM__) || (defined __ICCRX__)
-  #define RTT_PRAGMA(P) _Pragma(#P)
-#endif
-
-#if SEGGER_RTT_ALIGNMENT || SEGGER_RTT_BUFFER_ALIGNMENT
-  #if (defined __GNUC__)
-    #define SEGGER_RTT_ALIGN(Var, Alignment) Var __attribute__ ((aligned (Alignment)))
-  #elif (defined __ICCARM__) || (defined __ICCRX__)
-    #define PRAGMA(A) _Pragma(#A)
-#define SEGGER_RTT_ALIGN(Var, Alignment) RTT_PRAGMA(data_alignment=Alignment) \
-                                  Var
-  #elif (defined __CC_ARM)
-    #define SEGGER_RTT_ALIGN(Var, Alignment) Var __attribute__ ((aligned (Alignment)))
-  #else
-    #error "Alignment not supported for this compiler."
-  #endif
-#else
-  #define SEGGER_RTT_ALIGN(Var, Alignment) Var
-#endif
-
-#if defined(SEGGER_RTT_SECTION) || defined (SEGGER_RTT_BUFFER_SECTION)
-  #if (defined __GNUC__)
-    #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section))) Var
-  #elif (defined __ICCARM__) || (defined __ICCRX__)
-#define SEGGER_RTT_PUT_SECTION(Var, Section) RTT_PRAGMA(location=Section) \
-                                        Var
-  #elif (defined __CC_ARM)
-    #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section), zero_init))  Var
-  #else
-    #error "Section placement not supported for this compiler."
-  #endif
-#else
-  #define SEGGER_RTT_PUT_SECTION(Var, Section) Var
-#endif
-
-
-#if SEGGER_RTT_ALIGNMENT
-  #define SEGGER_RTT_CB_ALIGN(Var)  SEGGER_RTT_ALIGN(Var, SEGGER_RTT_ALIGNMENT)
-#else
-  #define SEGGER_RTT_CB_ALIGN(Var)  Var
-#endif
-
-#if SEGGER_RTT_BUFFER_ALIGNMENT
-  #define SEGGER_RTT_BUFFER_ALIGN(Var)  SEGGER_RTT_ALIGN(Var, SEGGER_RTT_BUFFER_ALIGNMENT)
-#else
-  #define SEGGER_RTT_BUFFER_ALIGN(Var)  Var
-#endif
-
-
-#if defined(SEGGER_RTT_SECTION)
-  #define SEGGER_RTT_PUT_CB_SECTION(Var) SEGGER_RTT_PUT_SECTION(Var, SEGGER_RTT_SECTION)
-#else
-  #define SEGGER_RTT_PUT_CB_SECTION(Var) Var
-#endif
-
-#if defined(SEGGER_RTT_BUFFER_SECTION)
-  #define SEGGER_RTT_PUT_BUFFER_SECTION(Var) SEGGER_RTT_PUT_SECTION(Var, SEGGER_RTT_BUFFER_SECTION)
-#else
-  #define SEGGER_RTT_PUT_BUFFER_SECTION(Var) Var
-#endif
-
-/*********************************************************************
-*
-*       Static const data
-*
-**********************************************************************
-*/
-
-static unsigned char _aTerminalId[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-
-/*********************************************************************
-*
-*       Static data
-*
-**********************************************************************
-*/
-//
-// RTT Control Block and allocate buffers for channel 0
-//
-SEGGER_RTT_PUT_CB_SECTION(SEGGER_RTT_CB_ALIGN(SEGGER_RTT_CB _SEGGER_RTT));
-
-SEGGER_RTT_PUT_BUFFER_SECTION(SEGGER_RTT_BUFFER_ALIGN(static char _acUpBuffer  [BUFFER_SIZE_UP]));
-SEGGER_RTT_PUT_BUFFER_SECTION(SEGGER_RTT_BUFFER_ALIGN(static char _acDownBuffer[BUFFER_SIZE_DOWN]));
-
-static char _ActiveTerminal;
-
-/*********************************************************************
-*
-*       Static functions
-*
-**********************************************************************
-*/
-
-/*********************************************************************
-*
-*       _DoInit()
-*
-*  Function description
-*    Initializes the control block an buffers.
-*    May only be called via INIT() to avoid overriding settings.
-*
-*/
-#define INIT()  do {                                            \
-                  if (_SEGGER_RTT.acID[0] == '\0') { _DoInit(); }  \
-                } while (0)
-static void _DoInit(void) {
-  SEGGER_RTT_CB* p;
-  //
-  // Initialize control block
-  //
-  p = &_SEGGER_RTT;
-  p->MaxNumUpBuffers    = SEGGER_RTT_MAX_NUM_UP_BUFFERS;
-  p->MaxNumDownBuffers  = SEGGER_RTT_MAX_NUM_DOWN_BUFFERS;
-  //
-  // Initialize up buffer 0
-  //
-  p->aUp[0].sName         = "Terminal";
-  p->aUp[0].pBuffer       = _acUpBuffer;
-  p->aUp[0].SizeOfBuffer  = sizeof(_acUpBuffer);
-  p->aUp[0].RdOff         = 0u;
-  p->aUp[0].WrOff         = 0u;
-  p->aUp[0].Flags         = SEGGER_RTT_MODE_DEFAULT;
-  //
-  // Initialize down buffer 0
-  //
-  p->aDown[0].sName         = "Terminal";
-  p->aDown[0].pBuffer       = _acDownBuffer;
-  p->aDown[0].SizeOfBuffer  = sizeof(_acDownBuffer);
-  p->aDown[0].RdOff         = 0u;
-  p->aDown[0].WrOff         = 0u;
-  p->aDown[0].Flags         = SEGGER_RTT_MODE_DEFAULT;
-  //
-  // Finish initialization of the control block.
-  // Copy Id string in three steps to make sure "SEGGER RTT" is not found
-  // in initializer memory (usually flash) by J-Link
-  //
-  strcpy(&p->acID[7], "RTT");
-  strcpy(&p->acID[0], "SEGGER");
-  p->acID[6] = ' ';
-}
-
-/*********************************************************************
-*
-*       _WriteBlocking()
-*
-*  Function description
-*    Stores a specified number of characters in SEGGER RTT ring buffer
-*    and updates the associated write pointer which is periodically
-*    read by the host.
-*    The caller is responsible for managing the write chunk sizes as
-*    _WriteBlocking() will block until all data has been posted successfully.
-*
-*  Parameters
-*    pRing        Ring buffer to post to.
-*    pBuffer      Pointer to character array. Does not need to point to a \0 terminated string.
-*    NumBytes     Number of bytes to be stored in the SEGGER RTT control block.
-*
-*  Return value
-*    >= 0 - Number of bytes written into buffer.
-*/
-static unsigned _WriteBlocking(SEGGER_RTT_BUFFER_UP* pRing, const char* pBuffer, unsigned NumBytes) {
-  unsigned NumBytesToWrite;
-  unsigned NumBytesWritten;
-  unsigned RdOff;
-  unsigned WrOff;
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-  char*    pDst;
-#endif
-  //
-  // Write data to buffer and handle wrap-around if necessary
-  //
-  NumBytesWritten = 0u;
-  WrOff = pRing->WrOff;
-  do {
-    RdOff = pRing->RdOff;                         // May be changed by host (debug probe) in the meantime
-    if (RdOff > WrOff) {
-      NumBytesToWrite = RdOff - WrOff - 1u;
-    } else {
-      NumBytesToWrite = pRing->SizeOfBuffer - (WrOff - RdOff + 1u);
-    }
-    NumBytesToWrite = MIN(NumBytesToWrite, (pRing->SizeOfBuffer - WrOff));      // Number of bytes that can be written until buffer wrap-around
-    NumBytesToWrite = MIN(NumBytesToWrite, NumBytes);
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-    pDst = pRing->pBuffer + WrOff;
-    NumBytesWritten += NumBytesToWrite;
-    NumBytes        -= NumBytesToWrite;
-    WrOff           += NumBytesToWrite;
-    while (NumBytesToWrite--) {
-      *pDst++ = *pBuffer++;
-    };
-#else
-    SEGGER_RTT_MEMCPY(pRing->pBuffer + WrOff, pBuffer, NumBytesToWrite);
-    NumBytesWritten += NumBytesToWrite;
-    pBuffer         += NumBytesToWrite;
-    NumBytes        -= NumBytesToWrite;
-    WrOff           += NumBytesToWrite;
-#endif
-    if (WrOff == pRing->SizeOfBuffer) {
-      WrOff = 0u;
-    }
-    pRing->WrOff = WrOff;
-  } while (NumBytes);
-  //
-  return NumBytesWritten;
-}
-
-/*********************************************************************
-*
-*       _WriteNoCheck()
-*
-*  Function description
-*    Stores a specified number of characters in SEGGER RTT ring buffer
-*    and updates the associated write pointer which is periodically
-*    read by the host.
-*    It is callers responsibility to make sure data actually fits in buffer.
-*
-*  Parameters
-*    pRing        Ring buffer to post to.
-*    pBuffer      Pointer to character array. Does not need to point to a \0 terminated string.
-*    NumBytes     Number of bytes to be stored in the SEGGER RTT control block.
-*
-*  Notes
-*    (1) If there might not be enough space in the "Up"-buffer, call _WriteBlocking
-*/
-static void _WriteNoCheck(SEGGER_RTT_BUFFER_UP* pRing, const char* pData, unsigned NumBytes) {
-  unsigned NumBytesAtOnce;
-  unsigned WrOff;
-  unsigned Rem;
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-  char*    pDst;
-#endif
-
-  WrOff = pRing->WrOff;
-  Rem = pRing->SizeOfBuffer - WrOff;
-  if (Rem > NumBytes) {
-    //
-    // All data fits before wrap around
-    //
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-    pDst = pRing->pBuffer + WrOff;
-    WrOff += NumBytes;
-    while (NumBytes--) {
-      *pDst++ = *pData++;
-    };
-    pRing->WrOff = WrOff;
-#else
-    SEGGER_RTT_MEMCPY(pRing->pBuffer + WrOff, pData, NumBytes);
-    pRing->WrOff = WrOff + NumBytes;
-#endif
-  } else {
-    //
-    // We reach the end of the buffer, so need to wrap around
-    //
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-    pDst = pRing->pBuffer + WrOff;
-    NumBytesAtOnce = Rem;
-    while (NumBytesAtOnce--) {
-      *pDst++ = *pData++;
-    };
-    pDst = pRing->pBuffer;
-    NumBytesAtOnce = NumBytes - Rem;
-    while (NumBytesAtOnce--) {
-      *pDst++ = *pData++;
-    };
-    pRing->WrOff = NumBytes - Rem;
-#else
-    NumBytesAtOnce = Rem;
-    SEGGER_RTT_MEMCPY(pRing->pBuffer + WrOff, pData, NumBytesAtOnce);
-    NumBytesAtOnce = NumBytes - Rem;
-    SEGGER_RTT_MEMCPY(pRing->pBuffer, pData + Rem, NumBytesAtOnce);
-    pRing->WrOff = NumBytesAtOnce;
-#endif
-  }
-}
-
-/*********************************************************************
-*
-*       _PostTerminalSwitch()
-*
-*  Function description
-*    Switch terminal to the given terminal ID.  It is the caller's
-*    responsibility to ensure the terminal ID is correct and there is
-*    enough space in the buffer for this to complete successfully.
-*
-*  Parameters
-*    pRing        Ring buffer to post to.
-*    TerminalId   Terminal ID to switch to.
-*/
-static void _PostTerminalSwitch(SEGGER_RTT_BUFFER_UP* pRing, unsigned char TerminalId) {
-  unsigned char ac[2];
-
-  ac[0] = 0xFFu;
-  ac[1] = _aTerminalId[TerminalId];  // Caller made already sure that TerminalId does not exceed our terminal limit
-  _WriteBlocking(pRing, (const char*)ac, 2u);
-}
-
-/*********************************************************************
-*
-*       _GetAvailWriteSpace()
-*
-*  Function description
-*    Returns the number of bytes that can be written to the ring
-*    buffer without blocking.
-*
-*  Parameters
-*    pRing        Ring buffer to check.
-*
-*  Return value
-*    Number of bytes that are free in the buffer.
-*/
-static unsigned _GetAvailWriteSpace(SEGGER_RTT_BUFFER_UP* pRing) {
-  unsigned RdOff;
-  unsigned WrOff;
-  unsigned r;
-  //
-  // Avoid warnings regarding volatile access order.  It's not a problem
-  // in this case, but dampen compiler enthusiasm.
-  //
-  RdOff = pRing->RdOff;
-  WrOff = pRing->WrOff;
-  if (RdOff <= WrOff) {
-    r = pRing->SizeOfBuffer - 1u - WrOff + RdOff;
-  } else {
-    r = RdOff - WrOff - 1u;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       Public code
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       SEGGER_RTT_ReadNoLock()
-*
-*  Function description
-*    Reads characters from SEGGER real-time-terminal control block
-*    which have been previously stored by the host.
-*    Do not lock against interrupts and multiple access.
-*
-*  Parameters
-*    BufferIndex  Index of Down-buffer to be used (e.g. 0 for "Terminal").
-*    pBuffer      Pointer to buffer provided by target application, to copy characters from RTT-down-buffer to.
-*    BufferSize   Size of the target application buffer.
-*
-*  Return value
-*    Number of bytes that have been read.
-*/
-unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned BufferSize) {
-  unsigned                NumBytesRem;
-  unsigned                NumBytesRead;
-  unsigned                RdOff;
-  unsigned                WrOff;
-  unsigned char*          pBuffer;
-  SEGGER_RTT_BUFFER_DOWN* pRing;
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-  const char*             pSrc;
-#endif
-  //
-  INIT();
-  pRing = &_SEGGER_RTT.aDown[BufferIndex];
-  pBuffer = (unsigned char*)pData;
-  RdOff = pRing->RdOff;
-  WrOff = pRing->WrOff;
-  NumBytesRead = 0u;
-  //
-  // Read from current read position to wrap-around of buffer, first
-  //
-  if (RdOff > WrOff) {
-    NumBytesRem = pRing->SizeOfBuffer - RdOff;
-    NumBytesRem = MIN(NumBytesRem, BufferSize);
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-    pSrc = pRing->pBuffer + RdOff;
-    NumBytesRead += NumBytesRem;
-    BufferSize   -= NumBytesRem;
-    RdOff        += NumBytesRem;
-    while (NumBytesRem--) {
-      *pBuffer++ = *pSrc++;
-    };
-#else
-    SEGGER_RTT_MEMCPY(pBuffer, pRing->pBuffer + RdOff, NumBytesRem);
-    NumBytesRead += NumBytesRem;
-    pBuffer      += NumBytesRem;
-    BufferSize   -= NumBytesRem;
-    RdOff        += NumBytesRem;
-#endif
-    //
-    // Handle wrap-around of buffer
-    //
-    if (RdOff == pRing->SizeOfBuffer) {
-      RdOff = 0u;
-    }
-  }
-  //
-  // Read remaining items of buffer
-  //
-  NumBytesRem = WrOff - RdOff;
-  NumBytesRem = MIN(NumBytesRem, BufferSize);
-  if (NumBytesRem > 0u) {
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-    pSrc = pRing->pBuffer + RdOff;
-    NumBytesRead += NumBytesRem;
-    BufferSize   -= NumBytesRem;
-    RdOff        += NumBytesRem;
-    while (NumBytesRem--) {
-      *pBuffer++ = *pSrc++;
-    };
-#else
-    SEGGER_RTT_MEMCPY(pBuffer, pRing->pBuffer + RdOff, NumBytesRem);
-    NumBytesRead += NumBytesRem;
-    pBuffer      += NumBytesRem;
-    BufferSize   -= NumBytesRem;
-    RdOff        += NumBytesRem;
-#endif
-  }
-  if (NumBytesRead) {
-    pRing->RdOff = RdOff;
-  }
-  //
-  return NumBytesRead;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_Read
-*
-*  Function description
-*    Reads characters from SEGGER real-time-terminal control block
-*    which have been previously stored by the host.
-*
-*  Parameters
-*    BufferIndex  Index of Down-buffer to be used (e.g. 0 for "Terminal").
-*    pBuffer      Pointer to buffer provided by target application, to copy characters from RTT-down-buffer to.
-*    BufferSize   Size of the target application buffer.
-*
-*  Return value
-*    Number of bytes that have been read.
-*/
-unsigned SEGGER_RTT_Read(unsigned BufferIndex, void* pBuffer, unsigned BufferSize) {
-  unsigned NumBytesRead;
-  //
-  SEGGER_RTT_LOCK();
-  //
-  // Call the non-locking read function
-  //
-  NumBytesRead = SEGGER_RTT_ReadNoLock(BufferIndex, pBuffer, BufferSize);
-  //
-  // Finish up.
-  //
-  SEGGER_RTT_UNLOCK();
-  //
-  return NumBytesRead;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_WriteWithOverwriteNoLock
-*
-*  Function description
-*    Stores a specified number of characters in SEGGER RTT
-*    control block.
-*    SEGGER_RTT_WriteWithOverwriteNoLock does not lock the application 
-*    and overwrites data if the data does not fit into the buffer.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    pBuffer      Pointer to character array. Does not need to point to a \0 terminated string.
-*    NumBytes     Number of bytes to be stored in the SEGGER RTT control block.
-*
-*  Notes
-*    (1) If there is not enough space in the "Up"-buffer, data is overwritten.
-*    (2) For performance reasons this function does not call Init()
-*        and may only be called after RTT has been initialized.
-*        Either by calling SEGGER_RTT_Init() or calling another RTT API function first.
-*    (3) Do not use SEGGER_RTT_WriteWithOverwriteNoLock if a J-Link 
-*        connection reads RTT data.
-*/
-void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) {
-  const char*           pData;
-  SEGGER_RTT_BUFFER_UP* pRing;
-  unsigned              Avail;
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-  char*                 pDst;
-#endif
-
-  pData = (const char *)pBuffer;
-  //
-  // Get "to-host" ring buffer and copy some elements into local variables.
-  //
-  pRing = &_SEGGER_RTT.aUp[BufferIndex];
-  //
-  // Check if we will overwrite data and need to adjust the RdOff.
-  //
-  if (pRing->WrOff == pRing->RdOff) {
-    Avail = pRing->SizeOfBuffer - 1u;
-  } else if ( pRing->WrOff < pRing->RdOff) {
-    Avail = pRing->RdOff - pRing->WrOff - 1u;
-  } else {
-    Avail = pRing->RdOff - pRing->WrOff - 1u + pRing->SizeOfBuffer;
-  }
-  if (NumBytes > Avail) {
-    pRing->RdOff += (NumBytes - Avail);
-    while (pRing->RdOff >= pRing->SizeOfBuffer) {
-      pRing->RdOff -= pRing->SizeOfBuffer;
-    }
-  }
-  //
-  // Write all data, no need to check the RdOff, but possibly handle multiple wrap-arounds
-  //
-  Avail = pRing->SizeOfBuffer - pRing->WrOff;
-  do {
-    if (Avail > NumBytes) {
-      //
-      // Last round
-      //
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-      pDst = pRing->pBuffer + pRing->WrOff;
-      Avail = NumBytes;
-      while (NumBytes--) {
-        *pDst++ = *pData++;
-      };
-      pRing->WrOff += Avail;
-#else
-      SEGGER_RTT_MEMCPY(pRing->pBuffer + pRing->WrOff, pData, NumBytes);
-      pRing->WrOff += NumBytes;
-#endif
-      break;
-    } else {
-      //
-      //  Wrap-around necessary, write until wrap-around and reset WrOff
-      //
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-      pDst = pRing->pBuffer + pRing->WrOff;
-      NumBytes -= Avail;
-      while (Avail--) {
-        *pDst++ = *pData++;
-      };
-      pRing->WrOff = 0;
-#else
-      SEGGER_RTT_MEMCPY(pRing->pBuffer + pRing->WrOff, pData, Avail);
-      pData += Avail;
-      pRing->WrOff = 0;
-      NumBytes -= Avail;
-#endif
-      Avail = (pRing->SizeOfBuffer - 1);
-    }
-  } while (NumBytes);
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_WriteSkipNoLock
-*
-*  Function description
-*    Stores a specified number of characters in SEGGER RTT
-*    control block which is then read by the host.
-*    SEGGER_RTT_WriteSkipNoLock does not lock the application and
-*    skips all data, if the data does not fit into the buffer.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    pBuffer      Pointer to character array. Does not need to point to a \0 terminated string.
-*    NumBytes     Number of bytes to be stored in the SEGGER RTT control block.
-*
-*  Return value
-*    Number of bytes which have been stored in the "Up"-buffer.
-*
-*  Notes
-*    (1) If there is not enough space in the "Up"-buffer, all data is dropped.
-*    (2) For performance reasons this function does not call Init()
-*        and may only be called after RTT has been initialized.
-*        Either by calling SEGGER_RTT_Init() or calling another RTT API function first.
-*/
-unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) {
-  const char*           pData;
-  SEGGER_RTT_BUFFER_UP* pRing;
-  unsigned              Avail;
-  unsigned              RdOff;
-  unsigned              WrOff;
-  unsigned              Rem;
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-  char*                 pDst;
-#endif
-
-  pData = (const char *)pBuffer;
-  //
-  // Get "to-host" ring buffer and copy some elements into local variables.
-  //
-  pRing = &_SEGGER_RTT.aUp[BufferIndex];
-  RdOff = pRing->RdOff;
-  WrOff = pRing->WrOff;
-  //
-  // Handle the most common cases fastest.
-  // Which is:
-  //    RdOff <= WrOff -> Space until wrap around is free.
-  //  AND
-  //    WrOff + NumBytes < SizeOfBuffer -> No Wrap around necessary.
-  //
-  //  OR
-  //
-  //    RdOff > WrOff -> Space until RdOff - 1 is free.
-  //  AND
-  //    WrOff + NumBytes < RdOff -> Data fits into buffer
-  //
-  if (RdOff <= WrOff) {
-    //
-    // Get space until WrOff will be at wrap around.
-    //
-    Avail = pRing->SizeOfBuffer - 1u - WrOff ;
-    if (Avail >= NumBytes) {
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-      pDst = pRing->pBuffer + WrOff;
-      WrOff += NumBytes;
-      while (NumBytes--) {
-        *pDst++ = *pData++;
-      };
-      pRing->WrOff = WrOff;
-#else
-      SEGGER_RTT_MEMCPY(pRing->pBuffer + WrOff, pData, NumBytes);
-      pRing->WrOff = WrOff + NumBytes;
-#endif
-      return 1;
-    }
-    //
-    // If data did not fit into space until wrap around calculate complete space in buffer.
-    //
-    Avail += RdOff;
-    //
-    // If there is still no space for the whole of this output, don't bother.
-    //
-    if (Avail >= NumBytes) {
-      //
-      //  OK, we have enough space in buffer. Copy in one or 2 chunks
-      //
-      Rem = pRing->SizeOfBuffer - WrOff;      // Space until end of buffer
-      if (Rem > NumBytes) {
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-        pDst = pRing->pBuffer + WrOff;
-        WrOff += NumBytes;
-        while (NumBytes--) {
-          *pDst++ = *pData++;
-        };
-        pRing->WrOff = WrOff;
-#else
-        SEGGER_RTT_MEMCPY(pRing->pBuffer + WrOff, pData, NumBytes);
-        pRing->WrOff = WrOff + NumBytes;
-#endif
-      } else {
-        //
-        // We reach the end of the buffer, so need to wrap around
-        //
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-        pDst = pRing->pBuffer + WrOff;
-        NumBytes -= Rem;
-        WrOff = NumBytes;
-        do {
-          *pDst++ = *pData++;
-        } while (--Rem);
-        pDst = pRing->pBuffer;
-        while (NumBytes--) {
-          *pDst++ = *pData++;
-        };
-        pRing->WrOff = WrOff;
-#else
-        SEGGER_RTT_MEMCPY(pRing->pBuffer + WrOff, pData, Rem);
-        SEGGER_RTT_MEMCPY(pRing->pBuffer, pData + Rem, NumBytes - Rem);
-        pRing->WrOff = NumBytes - Rem;
-#endif
-      }
-      return 1;
-    }
-  } else {
-    Avail = RdOff - WrOff - 1u;
-    if (Avail >= NumBytes) {
-#if SEGGER_RTT_MEMCPY_USE_BYTELOOP
-      pDst = pRing->pBuffer + WrOff;
-      WrOff += NumBytes;
-      while (NumBytes--) {
-        *pDst++ = *pData++;
-      };
-      pRing->WrOff = WrOff;
-#else
-      SEGGER_RTT_MEMCPY(pRing->pBuffer + WrOff, pData, NumBytes);
-      pRing->WrOff = WrOff + NumBytes;
-#endif
-      return 1;
-    }
-  }
-  //
-  // If we reach this point no data has been written
-  //
-  return 0;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_WriteNoLock
-*
-*  Function description
-*    Stores a specified number of characters in SEGGER RTT
-*    control block which is then read by the host.
-*    SEGGER_RTT_WriteNoLock does not lock the application.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    pBuffer      Pointer to character array. Does not need to point to a \0 terminated string.
-*    NumBytes     Number of bytes to be stored in the SEGGER RTT control block.
-*
-*  Return value
-*    Number of bytes which have been stored in the "Up"-buffer.
-*
-*  Notes
-*    (1) Data is stored according to buffer flags.
-*    (2) For performance reasons this function does not call Init()
-*        and may only be called after RTT has been initialized.
-*        Either by calling SEGGER_RTT_Init() or calling another RTT API function first.
-*/
-unsigned SEGGER_RTT_WriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) {
-  unsigned              Status;
-  unsigned              Avail;
-  const char*           pData;
-  SEGGER_RTT_BUFFER_UP* pRing;
-
-  pData = (const char *)pBuffer;
-  //
-  // Get "to-host" ring buffer.
-  //
-  pRing = &_SEGGER_RTT.aUp[BufferIndex];
-  //
-  // How we output depends upon the mode...
-  //
-  switch (pRing->Flags) {
-  case SEGGER_RTT_MODE_NO_BLOCK_SKIP:
-    //
-    // If we are in skip mode and there is no space for the whole
-    // of this output, don't bother.
-    //
-    Avail = _GetAvailWriteSpace(pRing);
-    if (Avail < NumBytes) {
-      Status = 0u;
-    } else {
-      Status = NumBytes;
-      _WriteNoCheck(pRing, pData, NumBytes);
-    }
-    break;
-  case SEGGER_RTT_MODE_NO_BLOCK_TRIM:
-    //
-    // If we are in trim mode, trim to what we can output without blocking.
-    //
-    Avail = _GetAvailWriteSpace(pRing);
-    Status = Avail < NumBytes ? Avail : NumBytes;
-    _WriteNoCheck(pRing, pData, Status);
-    break;
-  case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL:
-    //
-    // If we are in blocking mode, output everything.
-    //
-    Status = _WriteBlocking(pRing, pData, NumBytes);
-    break;
-  default:
-    Status = 0u;
-    break;
-  }
-  //
-  // Finish up.
-  //
-  return Status;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_Write
-*
-*  Function description
-*    Stores a specified number of characters in SEGGER RTT
-*    control block which is then read by the host.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    pBuffer      Pointer to character array. Does not need to point to a \0 terminated string.
-*    NumBytes     Number of bytes to be stored in the SEGGER RTT control block.
-*
-*  Return value
-*    Number of bytes which have been stored in the "Up"-buffer.
-*
-*  Notes
-*    (1) Data is stored according to buffer flags.
-*/
-unsigned SEGGER_RTT_Write(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) {
-  unsigned Status;
-  //
-  INIT();
-  SEGGER_RTT_LOCK();
-  //
-  // Call the non-locking write function
-  //
-  Status = SEGGER_RTT_WriteNoLock(BufferIndex, pBuffer, NumBytes);
-  //
-  // Finish up.
-  //
-  SEGGER_RTT_UNLOCK();
-  //
-  return Status;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_WriteString
-*
-*  Function description
-*    Stores string in SEGGER RTT control block.
-*    This data is read by the host.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    s            Pointer to string.
-*
-*  Return value
-*    Number of bytes which have been stored in the "Up"-buffer.
-*
-*  Notes
-*    (1) Data is stored according to buffer flags.
-*    (2) String passed to this function has to be \0 terminated
-*    (3) \0 termination character is *not* stored in RTT buffer
-*/
-unsigned SEGGER_RTT_WriteString(unsigned BufferIndex, const char* s) {
-  unsigned Len;
-
-  Len = STRLEN(s);
-  return SEGGER_RTT_Write(BufferIndex, s, Len);
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_PutCharSkipNoLock
-*
-*  Function description
-*    Stores a single character/byte in SEGGER RTT buffer.
-*    SEGGER_RTT_PutCharSkipNoLock does not lock the application and
-*    skips the byte, if it does not fit into the buffer.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    c            Byte to be stored.
-*
-*  Return value
-*    Number of bytes which have been stored in the "Up"-buffer.
-*
-*  Notes
-*    (1) If there is not enough space in the "Up"-buffer, the character is dropped.
-*    (2) For performance reasons this function does not call Init()
-*        and may only be called after RTT has been initialized.
-*        Either by calling SEGGER_RTT_Init() or calling another RTT API function first.
-*/
-
-unsigned SEGGER_RTT_PutCharSkipNoLock(unsigned BufferIndex, char c) {
-  SEGGER_RTT_BUFFER_UP* pRing;
-  unsigned              WrOff;
-  unsigned              Status;
-  //
-  // Get "to-host" ring buffer.
-  //
-  pRing = &_SEGGER_RTT.aUp[BufferIndex];
-  //
-  // Get write position and handle wrap-around if necessary
-  //
-  WrOff = pRing->WrOff + 1;
-  if (WrOff == pRing->SizeOfBuffer) {
-    WrOff = 0;
-  }
-  //
-  // Output byte if free space is available
-  //
-  if (WrOff != pRing->RdOff) {
-    pRing->pBuffer[pRing->WrOff] = c;
-    pRing->WrOff = WrOff;
-    Status = 1;
-  } else {
-    Status = 0;
-  }
-  //
-  return Status;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_PutCharSkip
-*
-*  Function description
-*    Stores a single character/byte in SEGGER RTT buffer.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    c            Byte to be stored.
-*
-*  Return value
-*    Number of bytes which have been stored in the "Up"-buffer.
-*
-*  Notes
-*    (1) If there is not enough space in the "Up"-buffer, the character is dropped.
-*/
-
-unsigned SEGGER_RTT_PutCharSkip(unsigned BufferIndex, char c) {
-  SEGGER_RTT_BUFFER_UP* pRing;
-  unsigned              WrOff;
-  unsigned              Status;
-  //
-  // Prepare
-  //
-  INIT();
-  SEGGER_RTT_LOCK();
-  //
-  // Get "to-host" ring buffer.
-  //
-  pRing = &_SEGGER_RTT.aUp[BufferIndex];
-  //
-  // Get write position and handle wrap-around if necessary
-  //
-  WrOff = pRing->WrOff + 1;
-  if (WrOff == pRing->SizeOfBuffer) {
-    WrOff = 0;
-  }
-  //
-  // Output byte if free space is available
-  //
-  if (WrOff != pRing->RdOff) {
-    pRing->pBuffer[pRing->WrOff] = c;
-    pRing->WrOff = WrOff;
-    Status = 1;
-  } else {
-    Status = 0;
-  }
-  //
-  // Finish up.
-  //
-  SEGGER_RTT_UNLOCK();
-  //
-  return Status;
-}
-
- /*********************************************************************
-*
-*       SEGGER_RTT_PutChar
-*
-*  Function description
-*    Stores a single character/byte in SEGGER RTT buffer.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
-*    c            Byte to be stored.
-*
-*  Return value
-*    Number of bytes which have been stored in the "Up"-buffer.
-*
-*  Notes
-*    (1) Data is stored according to buffer flags.
-*/
-
-unsigned SEGGER_RTT_PutChar(unsigned BufferIndex, char c) {
-  SEGGER_RTT_BUFFER_UP* pRing;
-  unsigned              WrOff;
-  unsigned              Status;
-  //
-  // Prepare
-  //
-  INIT();
-  SEGGER_RTT_LOCK();
-  //
-  // Get "to-host" ring buffer.
-  //
-  pRing = &_SEGGER_RTT.aUp[BufferIndex];
-  //
-  // Get write position and handle wrap-around if necessary
-  //
-  WrOff = pRing->WrOff + 1;
-  if (WrOff == pRing->SizeOfBuffer) {
-    WrOff = 0;
-  }
-  //
-  // Wait for free space if mode is set to blocking
-  //
-  if (pRing->Flags == SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) {
-    while (WrOff == pRing->RdOff) {
-      ;
-    }
-  }
-  //
-  // Output byte if free space is available
-  //
-  if (WrOff != pRing->RdOff) {
-    pRing->pBuffer[pRing->WrOff] = c;
-    pRing->WrOff = WrOff;
-    Status = 1;
-  } else {
-    Status = 0;
-  }
-  //
-  // Finish up.
-  //
-  SEGGER_RTT_UNLOCK();
-  //
-  return Status;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_GetKey
-*
-*  Function description
-*    Reads one character from the SEGGER RTT buffer.
-*    Host has previously stored data there.
-*
-*  Return value
-*    <  0 -   No character available (buffer empty).
-*    >= 0 -   Character which has been read. (Possible values: 0 - 255)
-*
-*  Notes
-*    (1) This function is only specified for accesses to RTT buffer 0.
-*/
-int SEGGER_RTT_GetKey(void) {
-  char c;
-  int r;
-
-  r = (int)SEGGER_RTT_Read(0u, &c, 1u);
-  if (r == 1) {
-    r = (int)(unsigned char)c;
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_WaitKey
-*
-*  Function description
-*    Waits until at least one character is avaible in the SEGGER RTT buffer.
-*    Once a character is available, it is read and this function returns.
-*
-*  Return value
-*    >=0 -   Character which has been read.
-*
-*  Notes
-*    (1) This function is only specified for accesses to RTT buffer 0
-*    (2) This function is blocking if no character is present in RTT buffer
-*/
-int SEGGER_RTT_WaitKey(void) {
-  int r;
-
-  do {
-    r = SEGGER_RTT_GetKey();
-  } while (r < 0);
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_HasKey
-*
-*  Function description
-*    Checks if at least one character for reading is available in the SEGGER RTT buffer.
-*
-*  Return value
-*    == 0 -     No characters are available to read.
-*    == 1 -     At least one character is available.
-*
-*  Notes
-*    (1) This function is only specified for accesses to RTT buffer 0
-*/
-int SEGGER_RTT_HasKey(void) {
-  unsigned RdOff;
-  int r;
-
-  INIT();
-  RdOff = _SEGGER_RTT.aDown[0].RdOff;
-  if (RdOff != _SEGGER_RTT.aDown[0].WrOff) {
-    r = 1;
-  } else {
-    r = 0;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_HasData
-*
-*  Function description
-*    Check if there is data from the host in the given buffer.
-*
-*  Return value:
-*  ==0:  No data
-*  !=0:  Data in buffer
-*
-*/
-unsigned SEGGER_RTT_HasData(unsigned BufferIndex) {
-  SEGGER_RTT_BUFFER_DOWN* pRing;
-  unsigned                v;
-
-  pRing = &_SEGGER_RTT.aDown[BufferIndex];
-  v = pRing->WrOff;
-  return v - pRing->RdOff;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_HasDataUp
-*
-*  Function description
-*    Check if there is data remaining to be sent in the given buffer.
-*
-*  Return value:
-*  ==0:  No data
-*  !=0:  Data in buffer
-*
-*/
-unsigned SEGGER_RTT_HasDataUp(unsigned BufferIndex) {
-  SEGGER_RTT_BUFFER_UP* pRing;
-  unsigned                v;
-
-  pRing = &_SEGGER_RTT.aUp[BufferIndex];
-  v = pRing->RdOff;
-  return pRing->WrOff - v;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_AllocDownBuffer
-*
-*  Function description
-*    Run-time configuration of the next down-buffer (H->T).
-*    The next buffer, which is not used yet is configured.
-*    This includes: Buffer address, size, name, flags, ...
-*
-*  Parameters
-*    sName        Pointer to a constant name string.
-*    pBuffer      Pointer to a buffer to be used.
-*    BufferSize   Size of the buffer.
-*    Flags        Operating modes. Define behavior if buffer is full (not enough space for entire message).
-*
-*  Return value
-*    >= 0 - O.K. Buffer Index
-*     < 0 - Error
-*/
-int SEGGER_RTT_AllocDownBuffer(const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) {
-  int BufferIndex;
-
-  INIT();
-  SEGGER_RTT_LOCK();
-  BufferIndex = 0;
-  do {
-    if (_SEGGER_RTT.aDown[BufferIndex].pBuffer == NULL) {
-      break;
-    }
-    BufferIndex++;
-  } while (BufferIndex < _SEGGER_RTT.MaxNumDownBuffers);
-  if (BufferIndex < _SEGGER_RTT.MaxNumDownBuffers) {
-    _SEGGER_RTT.aDown[BufferIndex].sName        = sName;
-    _SEGGER_RTT.aDown[BufferIndex].pBuffer      = (char*)pBuffer;
-    _SEGGER_RTT.aDown[BufferIndex].SizeOfBuffer = BufferSize;
-    _SEGGER_RTT.aDown[BufferIndex].RdOff        = 0u;
-    _SEGGER_RTT.aDown[BufferIndex].WrOff        = 0u;
-    _SEGGER_RTT.aDown[BufferIndex].Flags        = Flags;
-  } else {
-    BufferIndex = -1;
-  }
-  SEGGER_RTT_UNLOCK();
-  return BufferIndex;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_AllocUpBuffer
-*
-*  Function description
-*    Run-time configuration of the next up-buffer (T->H).
-*    The next buffer, which is not used yet is configured.
-*    This includes: Buffer address, size, name, flags, ...
-*
-*  Parameters
-*    sName        Pointer to a constant name string.
-*    pBuffer      Pointer to a buffer to be used.
-*    BufferSize   Size of the buffer.
-*    Flags        Operating modes. Define behavior if buffer is full (not enough space for entire message).
-*
-*  Return value
-*    >= 0 - O.K. Buffer Index
-*     < 0 - Error
-*/
-int SEGGER_RTT_AllocUpBuffer(const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) {
-  int BufferIndex;
-
-  INIT();
-  SEGGER_RTT_LOCK();
-  BufferIndex = 0;
-  do {
-    if (_SEGGER_RTT.aUp[BufferIndex].pBuffer == NULL) {
-      break;
-    }
-    BufferIndex++;
-  } while (BufferIndex < _SEGGER_RTT.MaxNumUpBuffers);
-  if (BufferIndex < _SEGGER_RTT.MaxNumUpBuffers) {
-    _SEGGER_RTT.aUp[BufferIndex].sName        = sName;
-    _SEGGER_RTT.aUp[BufferIndex].pBuffer      = (char*)pBuffer;
-    _SEGGER_RTT.aUp[BufferIndex].SizeOfBuffer = BufferSize;
-    _SEGGER_RTT.aUp[BufferIndex].RdOff        = 0u;
-    _SEGGER_RTT.aUp[BufferIndex].WrOff        = 0u;
-    _SEGGER_RTT.aUp[BufferIndex].Flags        = Flags;
-  } else {
-    BufferIndex = -1;
-  }
-  SEGGER_RTT_UNLOCK();
-  return BufferIndex;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_ConfigUpBuffer
-*
-*  Function description
-*    Run-time configuration of a specific up-buffer (T->H).
-*    Buffer to be configured is specified by index.
-*    This includes: Buffer address, size, name, flags, ...
-*
-*  Parameters
-*    BufferIndex  Index of the buffer to configure.
-*    sName        Pointer to a constant name string.
-*    pBuffer      Pointer to a buffer to be used.
-*    BufferSize   Size of the buffer.
-*    Flags        Operating modes. Define behavior if buffer is full (not enough space for entire message).
-*
-*  Return value
-*    >= 0 - O.K.
-*     < 0 - Error
-*
-*  Additional information
-*    Buffer 0 is configured on compile-time.
-*    May only be called once per buffer.
-*    Buffer name and flags can be reconfigured using the appropriate functions.
-*/
-int SEGGER_RTT_ConfigUpBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) {
-  int r;
-
-  INIT();
-  if (BufferIndex < (unsigned)_SEGGER_RTT.MaxNumUpBuffers) {
-    SEGGER_RTT_LOCK();
-    if (BufferIndex > 0u) {
-      _SEGGER_RTT.aUp[BufferIndex].sName        = sName;
-      _SEGGER_RTT.aUp[BufferIndex].pBuffer      = (char*)pBuffer;
-      _SEGGER_RTT.aUp[BufferIndex].SizeOfBuffer = BufferSize;
-      _SEGGER_RTT.aUp[BufferIndex].RdOff        = 0u;
-      _SEGGER_RTT.aUp[BufferIndex].WrOff        = 0u;
-    }
-    _SEGGER_RTT.aUp[BufferIndex].Flags          = Flags;
-    SEGGER_RTT_UNLOCK();
-    r =  0;
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_ConfigDownBuffer
-*
-*  Function description
-*    Run-time configuration of a specific down-buffer (H->T).
-*    Buffer to be configured is specified by index.
-*    This includes: Buffer address, size, name, flags, ...
-*
-*  Parameters
-*    BufferIndex  Index of the buffer to configure.
-*    sName        Pointer to a constant name string.
-*    pBuffer      Pointer to a buffer to be used.
-*    BufferSize   Size of the buffer.
-*    Flags        Operating modes. Define behavior if buffer is full (not enough space for entire message).
-*
-*  Return value
-*    >= 0  O.K.
-*     < 0  Error
-*
-*  Additional information
-*    Buffer 0 is configured on compile-time.
-*    May only be called once per buffer.
-*    Buffer name and flags can be reconfigured using the appropriate functions.
-*/
-int SEGGER_RTT_ConfigDownBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) {
-  int r;
-
-  INIT();
-  if (BufferIndex < (unsigned)_SEGGER_RTT.MaxNumDownBuffers) {
-    SEGGER_RTT_LOCK();
-    if (BufferIndex > 0u) {
-      _SEGGER_RTT.aDown[BufferIndex].sName        = sName;
-      _SEGGER_RTT.aDown[BufferIndex].pBuffer      = (char*)pBuffer;
-      _SEGGER_RTT.aDown[BufferIndex].SizeOfBuffer = BufferSize;
-      _SEGGER_RTT.aDown[BufferIndex].RdOff        = 0u;
-      _SEGGER_RTT.aDown[BufferIndex].WrOff        = 0u;
-    }
-    _SEGGER_RTT.aDown[BufferIndex].Flags          = Flags;
-    SEGGER_RTT_UNLOCK();
-    r =  0;
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_SetNameUpBuffer
-*
-*  Function description
-*    Run-time configuration of a specific up-buffer name (T->H).
-*    Buffer to be configured is specified by index.
-*
-*  Parameters
-*    BufferIndex  Index of the buffer to renamed.
-*    sName        Pointer to a constant name string.
-*
-*  Return value
-*    >= 0  O.K.
-*     < 0  Error
-*/
-int SEGGER_RTT_SetNameUpBuffer(unsigned BufferIndex, const char* sName) {
-  int r;
-
-  INIT();
-  if (BufferIndex < (unsigned)_SEGGER_RTT.MaxNumUpBuffers) {
-    SEGGER_RTT_LOCK();
-    _SEGGER_RTT.aUp[BufferIndex].sName = sName;
-    SEGGER_RTT_UNLOCK();
-    r =  0;
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_SetNameDownBuffer
-*
-*  Function description
-*    Run-time configuration of a specific Down-buffer name (T->H).
-*    Buffer to be configured is specified by index.
-*
-*  Parameters
-*    BufferIndex  Index of the buffer to renamed.
-*    sName        Pointer to a constant name string.
-*
-*  Return value
-*    >= 0  O.K.
-*     < 0  Error
-*/
-int SEGGER_RTT_SetNameDownBuffer(unsigned BufferIndex, const char* sName) {
-  int r;
-
-  INIT();
-  if (BufferIndex < (unsigned)_SEGGER_RTT.MaxNumDownBuffers) {
-    SEGGER_RTT_LOCK();
-    _SEGGER_RTT.aDown[BufferIndex].sName = sName;
-    SEGGER_RTT_UNLOCK();
-    r =  0;
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_SetFlagsUpBuffer
-*
-*  Function description
-*    Run-time configuration of specific up-buffer flags (T->H).
-*    Buffer to be configured is specified by index.
-*
-*  Parameters
-*    BufferIndex  Index of the buffer.
-*    Flags        Flags to set for the buffer.
-*
-*  Return value
-*    >= 0  O.K.
-*     < 0  Error
-*/
-int SEGGER_RTT_SetFlagsUpBuffer(unsigned BufferIndex, unsigned Flags) {
-  int r;
-
-  INIT();
-  if (BufferIndex < (unsigned)_SEGGER_RTT.MaxNumUpBuffers) {
-    SEGGER_RTT_LOCK();
-    _SEGGER_RTT.aUp[BufferIndex].Flags = Flags;
-    SEGGER_RTT_UNLOCK();
-    r =  0;
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_SetFlagsDownBuffer
-*
-*  Function description
-*    Run-time configuration of specific Down-buffer flags (T->H).
-*    Buffer to be configured is specified by index.
-*
-*  Parameters
-*    BufferIndex  Index of the buffer to renamed.
-*    Flags        Flags to set for the buffer.
-*
-*  Return value
-*    >= 0  O.K.
-*     < 0  Error
-*/
-int SEGGER_RTT_SetFlagsDownBuffer(unsigned BufferIndex, unsigned Flags) {
-  int r;
-
-  INIT();
-  if (BufferIndex < (unsigned)_SEGGER_RTT.MaxNumDownBuffers) {
-    SEGGER_RTT_LOCK();
-    _SEGGER_RTT.aDown[BufferIndex].Flags = Flags;
-    SEGGER_RTT_UNLOCK();
-    r =  0;
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_Init
-*
-*  Function description
-*    Initializes the RTT Control Block.
-*    Should be used in RAM targets, at start of the application.
-*
-*/
-void SEGGER_RTT_Init (void) {
-  _DoInit();
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_SetTerminal
-*
-*  Function description
-*    Sets the terminal to be used for output on channel 0.
-*
-*  Parameters
-*    TerminalId  Index of the terminal.
-*
-*  Return value
-*    >= 0  O.K.
-*     < 0  Error (e.g. if RTT is configured for non-blocking mode and there was no space in the buffer to set the new terminal Id)
-*/
-int SEGGER_RTT_SetTerminal (char TerminalId) {
-  unsigned char         ac[2];
-  SEGGER_RTT_BUFFER_UP* pRing;
-  unsigned Avail;
-  int r;
-  //
-  INIT();
-  //
-  r = 0;
-  ac[0] = 0xFFu;
-  if ((unsigned char)TerminalId < (unsigned char)sizeof(_aTerminalId)) { // We only support a certain number of channels
-    ac[1] = _aTerminalId[(unsigned char)TerminalId];
-    pRing = &_SEGGER_RTT.aUp[0];    // Buffer 0 is always reserved for terminal I/O, so we can use index 0 here, fixed
-    SEGGER_RTT_LOCK();    // Lock to make sure that no other task is writing into buffer, while we are and number of free bytes in buffer does not change downwards after checking and before writing
-    if ((pRing->Flags & SEGGER_RTT_MODE_MASK) == SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) {
-      _ActiveTerminal = TerminalId;
-      _WriteBlocking(pRing, (const char*)ac, 2u);
-    } else {                                                                            // Skipping mode or trim mode? => We cannot trim this command so handling is the same for both modes
-      Avail = _GetAvailWriteSpace(pRing);
-      if (Avail >= 2) {
-        _ActiveTerminal = TerminalId;    // Only change active terminal in case of success
-        _WriteNoCheck(pRing, (const char*)ac, 2u);
-      } else {
-        r = -1;
-      }
-    }
-    SEGGER_RTT_UNLOCK();
-  } else {
-    r = -1;
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_TerminalOut
-*
-*  Function description
-*    Writes a string to the given terminal
-*     without changing the terminal for channel 0.
-*
-*  Parameters
-*    TerminalId   Index of the terminal.
-*    s            String to be printed on the terminal.
-*
-*  Return value
-*    >= 0 - Number of bytes written.
-*     < 0 - Error.
-*
-*/
-int SEGGER_RTT_TerminalOut (char TerminalId, const char* s) {
-  int                   Status;
-  unsigned              FragLen;
-  unsigned              Avail;
-  SEGGER_RTT_BUFFER_UP* pRing;
-  //
-  INIT();
-  //
-  // Validate terminal ID.
-  //
-  if (TerminalId < (char)sizeof(_aTerminalId)) { // We only support a certain number of channels
-    //
-    // Get "to-host" ring buffer.
-    //
-    pRing = &_SEGGER_RTT.aUp[0];
-    //
-    // Need to be able to change terminal, write data, change back.
-    // Compute the fixed and variable sizes.
-    //
-    FragLen = STRLEN(s);
-    //
-    // How we output depends upon the mode...
-    //
-    SEGGER_RTT_LOCK();
-    Avail = _GetAvailWriteSpace(pRing);
-    switch (pRing->Flags & SEGGER_RTT_MODE_MASK) {
-    case SEGGER_RTT_MODE_NO_BLOCK_SKIP:
-      //
-      // If we are in skip mode and there is no space for the whole
-      // of this output, don't bother switching terminals at all.
-      //
-      if (Avail < (FragLen + 4u)) {
-        Status = 0;
-      } else {
-        _PostTerminalSwitch(pRing, TerminalId);
-        Status = (int)_WriteBlocking(pRing, s, FragLen);
-        _PostTerminalSwitch(pRing, _ActiveTerminal);
-      }
-      break;
-    case SEGGER_RTT_MODE_NO_BLOCK_TRIM:
-      //
-      // If we are in trim mode and there is not enough space for everything,
-      // trim the output but always include the terminal switch.  If no room
-      // for terminal switch, skip that totally.
-      //
-      if (Avail < 4u) {
-        Status = -1;
-      } else {
-        _PostTerminalSwitch(pRing, TerminalId);
-        Status = (int)_WriteBlocking(pRing, s, (FragLen < (Avail - 4u)) ? FragLen : (Avail - 4u));
-        _PostTerminalSwitch(pRing, _ActiveTerminal);
-      }
-      break;
-    case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL:
-      //
-      // If we are in blocking mode, output everything.
-      //
-      _PostTerminalSwitch(pRing, TerminalId);
-      Status = (int)_WriteBlocking(pRing, s, FragLen);
-      _PostTerminalSwitch(pRing, _ActiveTerminal);
-      break;
-    default:
-      Status = -1;
-      break;
-    }
-    //
-    // Finish up.
-    //
-    SEGGER_RTT_UNLOCK();
-  } else {
-    Status = -1;
-  }
-  return Status;
-}
-
-
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.h b/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.h
deleted file mode 100644
index 7c6a0a9..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*                        The Embedded Experts                        *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH                  *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : SEGGER_RTT.h
-Purpose : Implementation of SEGGER real-time transfer which allows
-          real-time communication on targets which support debugger 
-          memory accesses while the CPU is running.
-Revision: $Rev: 12826 $
-----------------------------------------------------------------------
-*/
-
-#ifndef SEGGER_RTT_H
-#define SEGGER_RTT_H
-
-#ifdef SEGGER_RTT_CONFIG_H
-#include SEGGER_RTT_CONFIG_H
-#else
-#include "SEGGER_RTT_Conf.h"
-#endif
-
-#ifndef SEGGER_RTT_ASM  // defined when SEGGER_RTT.h is included from assembly file
-#include <stdlib.h>
-#include <stdarg.h>
-
-/*********************************************************************
-*
-*       Defines, fixed
-*
-**********************************************************************
-*/
-
-/*********************************************************************
-*
-*       Types
-*
-**********************************************************************
-*/
-
-//
-// Description for a circular buffer (also called "ring buffer")
-// which is used as up-buffer (T->H)
-//
-typedef struct {
-  const     char*    sName;         // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4"
-            char*    pBuffer;       // Pointer to start of buffer
-            unsigned SizeOfBuffer;  // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty.
-            unsigned WrOff;         // Position of next item to be written by either target.
-  volatile  unsigned RdOff;         // Position of next item to be read by host. Must be volatile since it may be modified by host.
-            unsigned Flags;         // Contains configuration flags
-} SEGGER_RTT_BUFFER_UP;
-
-//
-// Description for a circular buffer (also called "ring buffer")
-// which is used as down-buffer (H->T)
-//
-typedef struct {
-  const     char*    sName;         // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4"
-            char*    pBuffer;       // Pointer to start of buffer
-            unsigned SizeOfBuffer;  // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty.
-  volatile  unsigned WrOff;         // Position of next item to be written by host. Must be volatile since it may be modified by host.
-            unsigned RdOff;         // Position of next item to be read by target (down-buffer).
-            unsigned Flags;         // Contains configuration flags
-} SEGGER_RTT_BUFFER_DOWN;
-
-//
-// RTT control block which describes the number of buffers available
-// as well as the configuration for each buffer
-//
-//
-typedef struct {
-  char                    acID[16];                                 // Initialized to "SEGGER RTT"
-  int                     MaxNumUpBuffers;                          // Initialized to SEGGER_RTT_MAX_NUM_UP_BUFFERS (type. 2)
-  int                     MaxNumDownBuffers;                        // Initialized to SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (type. 2)
-  SEGGER_RTT_BUFFER_UP    aUp[SEGGER_RTT_MAX_NUM_UP_BUFFERS];       // Up buffers, transferring information up from target via debug probe to host
-  SEGGER_RTT_BUFFER_DOWN  aDown[SEGGER_RTT_MAX_NUM_DOWN_BUFFERS];   // Down buffers, transferring information down from host via debug probe to target
-} SEGGER_RTT_CB;
-
-/*********************************************************************
-*
-*       Global data
-*
-**********************************************************************
-*/
-extern SEGGER_RTT_CB _SEGGER_RTT;
-
-/*********************************************************************
-*
-*       RTT API functions
-*
-**********************************************************************
-*/
-#ifdef __cplusplus
-  extern "C" {
-#endif
-int          SEGGER_RTT_AllocDownBuffer         (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
-int          SEGGER_RTT_AllocUpBuffer           (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
-int          SEGGER_RTT_ConfigUpBuffer          (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
-int          SEGGER_RTT_ConfigDownBuffer        (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
-int          SEGGER_RTT_GetKey                  (void);
-unsigned     SEGGER_RTT_HasData                 (unsigned BufferIndex);
-int          SEGGER_RTT_HasKey                  (void);
-unsigned     SEGGER_RTT_HasDataUp               (unsigned BufferIndex);
-void         SEGGER_RTT_Init                    (void);
-unsigned     SEGGER_RTT_Read                    (unsigned BufferIndex,       void* pBuffer, unsigned BufferSize);
-unsigned     SEGGER_RTT_ReadNoLock              (unsigned BufferIndex,       void* pData,   unsigned BufferSize);
-int          SEGGER_RTT_SetNameDownBuffer       (unsigned BufferIndex, const char* sName);
-int          SEGGER_RTT_SetNameUpBuffer         (unsigned BufferIndex, const char* sName);
-int          SEGGER_RTT_SetFlagsDownBuffer      (unsigned BufferIndex, unsigned Flags);
-int          SEGGER_RTT_SetFlagsUpBuffer        (unsigned BufferIndex, unsigned Flags);
-int          SEGGER_RTT_WaitKey                 (void);
-unsigned     SEGGER_RTT_Write                   (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
-unsigned     SEGGER_RTT_WriteNoLock             (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
-unsigned     SEGGER_RTT_WriteSkipNoLock         (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
-unsigned     SEGGER_RTT_WriteString             (unsigned BufferIndex, const char* s);
-void         SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
-unsigned     SEGGER_RTT_PutChar                 (unsigned BufferIndex, char c);
-unsigned     SEGGER_RTT_PutCharSkip             (unsigned BufferIndex, char c);
-unsigned     SEGGER_RTT_PutCharSkipNoLock       (unsigned BufferIndex, char c);
-//
-// Function macro for performance optimization
-//
-#define      SEGGER_RTT_HASDATA(n)       (_SEGGER_RTT.aDown[n].WrOff - _SEGGER_RTT.aDown[n].RdOff)
-
-/*********************************************************************
-*
-*       RTT "Terminal" API functions
-*
-**********************************************************************
-*/
-int     SEGGER_RTT_SetTerminal        (char TerminalId);
-int     SEGGER_RTT_TerminalOut        (char TerminalId, const char* s);
-
-/*********************************************************************
-*
-*       RTT printf functions (require SEGGER_RTT_printf.c)
-*
-**********************************************************************
-*/
-int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...);
-int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList);
-
-#ifdef __cplusplus
-  }
-#endif
-
-#endif // SEGGER_RTT_ASM
-
-/*********************************************************************
-*
-*       Defines
-*
-**********************************************************************
-*/
-
-//
-// Operating modes. Define behavior if buffer is full (not enough space for entire message)
-//
-#define SEGGER_RTT_MODE_NO_BLOCK_SKIP         (0)     // Skip. Do not block, output nothing. (Default)
-#define SEGGER_RTT_MODE_NO_BLOCK_TRIM         (1)     // Trim: Do not block, output as much as fits.
-#define SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL    (2)     // Block: Wait until there is space in the buffer.
-#define SEGGER_RTT_MODE_MASK                  (3)
-
-//
-// Control sequences, based on ANSI.
-// Can be used to control color, and clear the screen
-//
-#define RTT_CTRL_RESET                "\x1B[0m"         // Reset to default colors
-#define RTT_CTRL_CLEAR                "\x1B[2J"         // Clear screen, reposition cursor to top left
-
-#define RTT_CTRL_TEXT_BLACK           "\x1B[2;30m"
-#define RTT_CTRL_TEXT_RED             "\x1B[2;31m"
-#define RTT_CTRL_TEXT_GREEN           "\x1B[2;32m"
-#define RTT_CTRL_TEXT_YELLOW          "\x1B[2;33m"
-#define RTT_CTRL_TEXT_BLUE            "\x1B[2;34m"
-#define RTT_CTRL_TEXT_MAGENTA         "\x1B[2;35m"
-#define RTT_CTRL_TEXT_CYAN            "\x1B[2;36m"
-#define RTT_CTRL_TEXT_WHITE           "\x1B[2;37m"
-
-#define RTT_CTRL_TEXT_BRIGHT_BLACK    "\x1B[1;30m"
-#define RTT_CTRL_TEXT_BRIGHT_RED      "\x1B[1;31m"
-#define RTT_CTRL_TEXT_BRIGHT_GREEN    "\x1B[1;32m"
-#define RTT_CTRL_TEXT_BRIGHT_YELLOW   "\x1B[1;33m"
-#define RTT_CTRL_TEXT_BRIGHT_BLUE     "\x1B[1;34m"
-#define RTT_CTRL_TEXT_BRIGHT_MAGENTA  "\x1B[1;35m"
-#define RTT_CTRL_TEXT_BRIGHT_CYAN     "\x1B[1;36m"
-#define RTT_CTRL_TEXT_BRIGHT_WHITE    "\x1B[1;37m"
-
-#define RTT_CTRL_BG_BLACK             "\x1B[24;40m"
-#define RTT_CTRL_BG_RED               "\x1B[24;41m"
-#define RTT_CTRL_BG_GREEN             "\x1B[24;42m"
-#define RTT_CTRL_BG_YELLOW            "\x1B[24;43m"
-#define RTT_CTRL_BG_BLUE              "\x1B[24;44m"
-#define RTT_CTRL_BG_MAGENTA           "\x1B[24;45m"
-#define RTT_CTRL_BG_CYAN              "\x1B[24;46m"
-#define RTT_CTRL_BG_WHITE             "\x1B[24;47m"
-
-#define RTT_CTRL_BG_BRIGHT_BLACK      "\x1B[4;40m"
-#define RTT_CTRL_BG_BRIGHT_RED        "\x1B[4;41m"
-#define RTT_CTRL_BG_BRIGHT_GREEN      "\x1B[4;42m"
-#define RTT_CTRL_BG_BRIGHT_YELLOW     "\x1B[4;43m"
-#define RTT_CTRL_BG_BRIGHT_BLUE       "\x1B[4;44m"
-#define RTT_CTRL_BG_BRIGHT_MAGENTA    "\x1B[4;45m"
-#define RTT_CTRL_BG_BRIGHT_CYAN       "\x1B[4;46m"
-#define RTT_CTRL_BG_BRIGHT_WHITE      "\x1B[4;47m"
-
-
-#endif
-
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT_Conf.h b/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT_Conf.h
deleted file mode 100644
index d1ccfdd..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT_Conf.h
+++ /dev/null
@@ -1,340 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*                        The Embedded Experts                        *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH                  *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : SEGGER_RTT_Conf.h
-Purpose : Implementation of SEGGER real-time transfer (RTT) which
-          allows real-time communication on targets which support
-          debugger memory accesses while the CPU is running.
-Revision: $Rev: 12847 $
-
-*/
-
-#ifndef SEGGER_RTT_CONF_H
-#define SEGGER_RTT_CONF_H
-
-#ifdef __IAR_SYSTEMS_ICC__
-  #include <intrinsics.h>
-#endif
-
-/*********************************************************************
-*
-*       Defines, configurable
-*
-**********************************************************************
-*/
-
-#define SEGGER_RTT_MAX_NUM_UP_BUFFERS             (3)     // Max. number of up-buffers (T->H) available on this target    (Default: 3)
-#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS           (3)     // Max. number of down-buffers (H->T) available on this target  (Default: 3)
-
-#define BUFFER_SIZE_UP                            (1024)  // Size of the buffer for terminal output of target, up to host (Default: 1k)
-#define BUFFER_SIZE_DOWN                          (16)    // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16)
-
-#define SEGGER_RTT_PRINTF_BUFFER_SIZE             (64u)    // Size of buffer for RTT printf to bulk-send chars via RTT     (Default: 64)
-
-#define SEGGER_RTT_MODE_DEFAULT                   SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0)
-
-#define USE_RTT_ASM                               (0)     // Use assembler version of SEGGER_RTT.c when 1 
-
-/*********************************************************************
-*
-*       RTT memcpy configuration
-*
-*       memcpy() is good for large amounts of data, 
-*       but the overhead is big for small amounts, which are usually stored via RTT.
-*       With SEGGER_RTT_MEMCPY_USE_BYTELOOP a simple byte loop can be used instead.
-*
-*       SEGGER_RTT_MEMCPY() can be used to replace standard memcpy() in RTT functions.
-*       This is may be required with memory access restrictions, 
-*       such as on Cortex-A devices with MMU.
-*/
-#define SEGGER_RTT_MEMCPY_USE_BYTELOOP              0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop
-//
-// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets
-//
-//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__))  
-//  #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes)      SEGGER_memcpy((pDest), (pSrc), (NumBytes))
-//#endif
-
-//
-// Target is not allowed to perform other RTT operations while string still has not been stored completely.
-// Otherwise we would probably end up with a mixed string in the buffer.
-// If using  RTT from within interrupts, multiple tasks or multi processors, define the SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK() function here.
-//
-// SEGGER_RTT_MAX_INTERRUPT_PRIORITY can be used in the sample lock routines on Cortex-M3/4.
-// Make sure to mask all interrupts which can send RTT data, i.e. generate SystemView events, or cause task switches.
-// When high-priority interrupts must not be masked while sending RTT data, SEGGER_RTT_MAX_INTERRUPT_PRIORITY needs to be adjusted accordingly.
-// (Higher priority = lower priority number)
-// Default value for embOS: 128u
-// Default configuration in FreeRTOS: configMAX_SYSCALL_INTERRUPT_PRIORITY: ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
-// In case of doubt mask all interrupts: 1 << (8 - BASEPRI_PRIO_BITS) i.e. 1 << 5 when 3 bits are implemented in NVIC
-// or define SEGGER_RTT_LOCK() to completely disable interrupts.
-//
-
-#define SEGGER_RTT_MAX_INTERRUPT_PRIORITY         (0x20)   // Interrupt priority to lock on SEGGER_RTT_LOCK on Cortex-M3/4 (Default: 0x20)
-
-/*********************************************************************
-*
-*       RTT lock configuration for SEGGER Embedded Studio,
-*       Rowley CrossStudio and GCC
-*/
-#if (defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__) || (defined __clang__)
-  #if (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__))
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                    unsigned int LockState;                                         \
-                                  __asm volatile ("mrs   %0, primask  \n\t"                         \
-                                                  "movs  r1, $1       \n\t"                         \
-                                                  "msr   primask, r1  \n\t"                         \
-                                                  : "=r" (LockState)                                \
-                                                  :                                                 \
-                                                  : "r1"                                            \
-                                                  );
-
-    #define SEGGER_RTT_UNLOCK()   __asm volatile ("msr   primask, %0  \n\t"                         \
-                                                  :                                                 \
-                                                  : "r" (LockState)                                 \
-                                                  :                                                 \
-                                                  );                                                \
-                                }
-  #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__))
-    #ifndef   SEGGER_RTT_MAX_INTERRUPT_PRIORITY
-      #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY   (0x20)
-    #endif
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                    unsigned int LockState;                                         \
-                                  __asm volatile ("mrs   %0, basepri  \n\t"                         \
-                                                  "mov   r1, %1       \n\t"                         \
-                                                  "msr   basepri, r1  \n\t"                         \
-                                                  : "=r" (LockState)                                \
-                                                  : "i"(SEGGER_RTT_MAX_INTERRUPT_PRIORITY)          \
-                                                  : "r1"                                            \
-                                                  );
-
-    #define SEGGER_RTT_UNLOCK()   __asm volatile ("msr   basepri, %0  \n\t"                         \
-                                                  :                                                 \
-                                                  : "r" (LockState)                                 \
-                                                  :                                                 \
-                                                  );                                                \
-                                }
-
-  #elif defined(__ARM_ARCH_7A__)
-    #define SEGGER_RTT_LOCK() {                                                \
-                                 unsigned int LockState;                       \
-                                 __asm volatile ("mrs r1, CPSR \n\t"           \
-                                                 "mov %0, r1 \n\t"             \
-                                                 "orr r1, r1, #0xC0 \n\t"      \
-                                                 "msr CPSR_c, r1 \n\t"         \
-                                                 : "=r" (LockState)            \
-                                                 :                             \
-                                                 : "r1"                        \
-                                                 );
-
-    #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t"              \
-                                                "mrs r1, CPSR \n\t"            \
-                                                "bic r1, r1, #0xC0 \n\t"       \
-                                                "and r0, r0, #0xC0 \n\t"       \
-                                                "orr r1, r1, r0 \n\t"          \
-                                                "msr CPSR_c, r1 \n\t"          \
-                                                :                              \
-                                                : "r" (LockState)              \
-                                                : "r0", "r1"                   \
-                                                );                             \
-                            }
-#else
-    #define SEGGER_RTT_LOCK()
-    #define SEGGER_RTT_UNLOCK()
-  #endif
-#endif
-
-/*********************************************************************
-*
-*       RTT lock configuration for IAR EWARM
-*/
-#ifdef __ICCARM__
-  #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__))
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                  unsigned int LockState;                                           \
-                                  LockState = __get_PRIMASK();                                      \
-                                  __set_PRIMASK(1);
-
-    #define SEGGER_RTT_UNLOCK()   __set_PRIMASK(LockState);                                         \
-                                }
-  #elif ((defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) || (defined (__ARM7M__) && (__CORE__ == __ARM7M__)))
-    #ifndef   SEGGER_RTT_MAX_INTERRUPT_PRIORITY
-      #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY   (0x20)
-    #endif
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                  unsigned int LockState;                                           \
-                                  LockState = __get_BASEPRI();                                      \
-                                  __set_BASEPRI(SEGGER_RTT_MAX_INTERRUPT_PRIORITY);
-
-    #define SEGGER_RTT_UNLOCK()   __set_BASEPRI(LockState);                                         \
-                                }
-  #endif
-#endif
-
-/*********************************************************************
-*
-*       RTT lock configuration for IAR RX
-*/
-#ifdef __ICCRX__
-  #define SEGGER_RTT_LOCK()   {                                                                     \
-                                unsigned long LockState;                                            \
-                                LockState = __get_interrupt_state();                                \
-                                __disable_interrupt();
-
-  #define SEGGER_RTT_UNLOCK()   __set_interrupt_state(LockState);                                   \
-                              }
-#endif
-
-/*********************************************************************
-*
-*       RTT lock configuration for IAR RL78
-*/
-#ifdef __ICCRL78__
-  #define SEGGER_RTT_LOCK()   {                                                                     \
-                                __istate_t LockState;                                               \
-                                LockState = __get_interrupt_state();                                \
-                                __disable_interrupt();
-
-  #define SEGGER_RTT_UNLOCK()   __set_interrupt_state(LockState);                                   \
-                              }
-#endif
-
-/*********************************************************************
-*
-*       RTT lock configuration for KEIL ARM
-*/
-#ifdef __CC_ARM
-  #if (defined __TARGET_ARCH_6S_M)
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                  unsigned int LockState;                                           \
-                                  register unsigned char PRIMASK __asm( "primask");                 \
-                                  LockState = PRIMASK;                                              \
-                                  PRIMASK = 1u;                                                     \
-                                  __schedule_barrier();
-
-    #define SEGGER_RTT_UNLOCK()   PRIMASK = LockState;                                              \
-                                  __schedule_barrier();                                             \
-                                }
-  #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
-    #ifndef   SEGGER_RTT_MAX_INTERRUPT_PRIORITY
-      #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY   (0x20)
-    #endif
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                  unsigned int LockState;                                           \
-                                  register unsigned char BASEPRI __asm( "basepri");                 \
-                                  LockState = BASEPRI;                                              \
-                                  BASEPRI = SEGGER_RTT_MAX_INTERRUPT_PRIORITY;                      \
-                                  __schedule_barrier();
-
-    #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
-                                  __schedule_barrier();                                             \
-                                }
-  #endif
-#endif
-
-/*********************************************************************
-*
-*       RTT lock configuration for TI ARM
-*/
-#ifdef __TI_ARM__
-  #if defined (__TI_ARM_V6M0__)
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                  unsigned int LockState;                                           \
-                                  LockState = __get_PRIMASK();                                      \
-                                  __set_PRIMASK(1);
-
-    #define SEGGER_RTT_UNLOCK()   __set_PRIMASK(LockState);                                         \
-                                }
-  #elif (defined (__TI_ARM_V7M3__) || defined (__TI_ARM_V7M4__))
-    #ifndef   SEGGER_RTT_MAX_INTERRUPT_PRIORITY
-      #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY   (0x20)
-    #endif
-    #define SEGGER_RTT_LOCK()   {                                                                   \
-                                  unsigned int LockState;                                           \
-                                  LockState = _set_interrupt_priority(SEGGER_RTT_MAX_INTERRUPT_PRIORITY);
-
-    #define SEGGER_RTT_UNLOCK()   _set_interrupt_priority(LockState);                               \
-                                }
-  #endif
-#endif
-
-/*********************************************************************
-*
-*       RTT lock configuration for CCRX
-*/
-#ifdef __RX
-  #define SEGGER_RTT_LOCK()   {                                                                     \
-                                unsigned long LockState;                                            \
-                                LockState = get_psw() & 0x010000;                                   \
-                                clrpsw_i();                           
-                                    
-  #define SEGGER_RTT_UNLOCK()   set_psw(get_psw() | LockState);                                     \
-                              }
-#endif
-
-/*********************************************************************
-*
-*       RTT lock configuration fallback
-*/
-#ifndef   SEGGER_RTT_LOCK
-  #define SEGGER_RTT_LOCK()                // Lock RTT (nestable)   (i.e. disable interrupts)
-#endif
-
-#ifndef   SEGGER_RTT_UNLOCK
-  #define SEGGER_RTT_UNLOCK()              // Unlock RTT (nestable) (i.e. enable previous interrupt lock state)
-#endif
-
-#endif
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT_printf.c b/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT_printf.c
deleted file mode 100644
index 75082f0..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/RTT/SEGGER_RTT_printf.c
+++ /dev/null
@@ -1,510 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH         *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : SEGGER_RTT_printf.c
-Purpose : Replacement for printf to write formatted data via RTT
-Revision: $Rev: 12360 $
-----------------------------------------------------------------------
-*/
-#include "SEGGER_RTT.h"
-#include "SEGGER_RTT_Conf.h"
-
-/*********************************************************************
-*
-*       Defines, configurable
-*
-**********************************************************************
-*/
-
-#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE
-  #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64)
-#endif
-
-#include <stdlib.h>
-#include <stdarg.h>
-
-
-#define FORMAT_FLAG_LEFT_JUSTIFY   (1u << 0)
-#define FORMAT_FLAG_PAD_ZERO       (1u << 1)
-#define FORMAT_FLAG_PRINT_SIGN     (1u << 2)
-#define FORMAT_FLAG_ALTERNATE      (1u << 3)
-
-/*********************************************************************
-*
-*       Types
-*
-**********************************************************************
-*/
-
-typedef struct {
-  char*     pBuffer;
-  unsigned  BufferSize;
-  unsigned  Cnt;
-
-  int   ReturnValue;
-
-  unsigned RTTBufferIndex;
-} SEGGER_RTT_PRINTF_DESC;
-
-/*********************************************************************
-*
-*       Function prototypes
-*
-**********************************************************************
-*/
-
-/*********************************************************************
-*
-*       Static code
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       _StoreChar
-*/
-static void _StoreChar(SEGGER_RTT_PRINTF_DESC * p, char c) {
-  unsigned Cnt;
-
-  Cnt = p->Cnt;
-  if ((Cnt + 1u) <= p->BufferSize) {
-    *(p->pBuffer + Cnt) = c;
-    p->Cnt = Cnt + 1u;
-    p->ReturnValue++;
-  }
-  //
-  // Write part of string, when the buffer is full
-  //
-  if (p->Cnt == p->BufferSize) {
-    if (SEGGER_RTT_Write(p->RTTBufferIndex, p->pBuffer, p->Cnt) != p->Cnt) {
-      p->ReturnValue = -1;
-    } else {
-      p->Cnt = 0u;
-    }
-  }
-}
-
-/*********************************************************************
-*
-*       _PrintUnsigned
-*/
-static void _PrintUnsigned(SEGGER_RTT_PRINTF_DESC * pBufferDesc, unsigned v, unsigned Base, unsigned NumDigits, unsigned FieldWidth, unsigned FormatFlags) {
-  static const char _aV2C[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-  unsigned Div;
-  unsigned Digit;
-  unsigned Number;
-  unsigned Width;
-  char c;
-
-  Number = v;
-  Digit = 1u;
-  //
-  // Get actual field width
-  //
-  Width = 1u;
-  while (Number >= Base) {
-    Number = (Number / Base);
-    Width++;
-  }
-  if (NumDigits > Width) {
-    Width = NumDigits;
-  }
-  //
-  // Print leading chars if necessary
-  //
-  if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) {
-    if (FieldWidth != 0u) {
-      if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && (NumDigits == 0u)) {
-        c = '0';
-      } else {
-        c = ' ';
-      }
-      while ((FieldWidth != 0u) && (Width < FieldWidth)) {
-        FieldWidth--;
-        _StoreChar(pBufferDesc, c);
-        if (pBufferDesc->ReturnValue < 0) {
-          break;
-        }
-      }
-    }
-  }
-  if (pBufferDesc->ReturnValue >= 0) {
-    //
-    // Compute Digit.
-    // Loop until Digit has the value of the highest digit required.
-    // Example: If the output is 345 (Base 10), loop 2 times until Digit is 100.
-    //
-    while (1) {
-      if (NumDigits > 1u) {       // User specified a min number of digits to print? => Make sure we loop at least that often, before checking anything else (> 1 check avoids problems with NumDigits being signed / unsigned)
-        NumDigits--;
-      } else {
-        Div = v / Digit;
-        if (Div < Base) {        // Is our divider big enough to extract the highest digit from value? => Done
-          break;
-        }
-      }
-      Digit *= Base;
-    }
-    //
-    // Output digits
-    //
-    do {
-      Div = v / Digit;
-      v -= Div * Digit;
-      _StoreChar(pBufferDesc, _aV2C[Div]);
-      if (pBufferDesc->ReturnValue < 0) {
-        break;
-      }
-      Digit /= Base;
-    } while (Digit);
-    //
-    // Print trailing spaces if necessary
-    //
-    if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == FORMAT_FLAG_LEFT_JUSTIFY) {
-      if (FieldWidth != 0u) {
-        while ((FieldWidth != 0u) && (Width < FieldWidth)) {
-          FieldWidth--;
-          _StoreChar(pBufferDesc, ' ');
-          if (pBufferDesc->ReturnValue < 0) {
-            break;
-          }
-        }
-      }
-    }
-  }
-}
-
-/*********************************************************************
-*
-*       _PrintInt
-*/
-static void _PrintInt(SEGGER_RTT_PRINTF_DESC * pBufferDesc, int v, unsigned Base, unsigned NumDigits, unsigned FieldWidth, unsigned FormatFlags) {
-  unsigned Width;
-  int Number;
-
-  Number = (v < 0) ? -v : v;
-
-  //
-  // Get actual field width
-  //
-  Width = 1u;
-  while (Number >= (int)Base) {
-    Number = (Number / (int)Base);
-    Width++;
-  }
-  if (NumDigits > Width) {
-    Width = NumDigits;
-  }
-  if ((FieldWidth > 0u) && ((v < 0) || ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN))) {
-    FieldWidth--;
-  }
-
-  //
-  // Print leading spaces if necessary
-  //
-  if ((((FormatFlags & FORMAT_FLAG_PAD_ZERO) == 0u) || (NumDigits != 0u)) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u)) {
-    if (FieldWidth != 0u) {
-      while ((FieldWidth != 0u) && (Width < FieldWidth)) {
-        FieldWidth--;
-        _StoreChar(pBufferDesc, ' ');
-        if (pBufferDesc->ReturnValue < 0) {
-          break;
-        }
-      }
-    }
-  }
-  //
-  // Print sign if necessary
-  //
-  if (pBufferDesc->ReturnValue >= 0) {
-    if (v < 0) {
-      v = -v;
-      _StoreChar(pBufferDesc, '-');
-    } else if ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN) {
-      _StoreChar(pBufferDesc, '+');
-    } else {
-
-    }
-    if (pBufferDesc->ReturnValue >= 0) {
-      //
-      // Print leading zeros if necessary
-      //
-      if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) && (NumDigits == 0u)) {
-        if (FieldWidth != 0u) {
-          while ((FieldWidth != 0u) && (Width < FieldWidth)) {
-            FieldWidth--;
-            _StoreChar(pBufferDesc, '0');
-            if (pBufferDesc->ReturnValue < 0) {
-              break;
-            }
-          }
-        }
-      }
-      if (pBufferDesc->ReturnValue >= 0) {
-        //
-        // Print number without sign
-        //
-        _PrintUnsigned(pBufferDesc, (unsigned)v, Base, NumDigits, FieldWidth, FormatFlags);
-      }
-    }
-  }
-}
-
-/*********************************************************************
-*
-*       Public code
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       SEGGER_RTT_vprintf
-*
-*  Function description
-*    Stores a formatted string in SEGGER RTT control block.
-*    This data is read by the host.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used. (e.g. 0 for "Terminal")
-*    sFormat      Pointer to format string
-*    pParamList   Pointer to the list of arguments for the format string
-*
-*  Return values
-*    >= 0:  Number of bytes which have been stored in the "Up"-buffer.
-*     < 0:  Error
-*/
-int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList) {
-  char c;
-  SEGGER_RTT_PRINTF_DESC BufferDesc;
-  int v;
-  unsigned NumDigits;
-  unsigned FormatFlags;
-  unsigned FieldWidth;
-  char acBuffer[SEGGER_RTT_PRINTF_BUFFER_SIZE];
-
-  BufferDesc.pBuffer        = acBuffer;
-  BufferDesc.BufferSize     = SEGGER_RTT_PRINTF_BUFFER_SIZE;
-  BufferDesc.Cnt            = 0u;
-  BufferDesc.RTTBufferIndex = BufferIndex;
-  BufferDesc.ReturnValue    = 0;
-
-  do {
-    c = *sFormat;
-    sFormat++;
-    if (c == 0u) {
-      break;
-    }
-    if (c == '%') {
-      //
-      // Filter out flags
-      //
-      FormatFlags = 0u;
-      v = 1;
-      do {
-        c = *sFormat;
-        switch (c) {
-        case '-': FormatFlags |= FORMAT_FLAG_LEFT_JUSTIFY; sFormat++; break;
-        case '0': FormatFlags |= FORMAT_FLAG_PAD_ZERO;     sFormat++; break;
-        case '+': FormatFlags |= FORMAT_FLAG_PRINT_SIGN;   sFormat++; break;
-        case '#': FormatFlags |= FORMAT_FLAG_ALTERNATE;    sFormat++; break;
-        default:  v = 0; break;
-        }
-      } while (v);
-      //
-      // filter out field with
-      //
-      FieldWidth = 0u;
-      do {
-        c = *sFormat;
-        if ((c < '0') || (c > '9')) {
-          break;
-        }
-        sFormat++;
-        FieldWidth = (FieldWidth * 10u) + ((unsigned)c - '0');
-      } while (1);
-
-      //
-      // Filter out precision (number of digits to display)
-      //
-      NumDigits = 0u;
-      c = *sFormat;
-      if (c == '.') {
-        sFormat++;
-        do {
-          c = *sFormat;
-          if ((c < '0') || (c > '9')) {
-            break;
-          }
-          sFormat++;
-          NumDigits = NumDigits * 10u + ((unsigned)c - '0');
-        } while (1);
-      }
-      //
-      // Filter out length modifier
-      //
-      c = *sFormat;
-      do {
-        if ((c == 'l') || (c == 'h')) {
-          sFormat++;
-          c = *sFormat;
-        } else {
-          break;
-        }
-      } while (1);
-      //
-      // Handle specifiers
-      //
-      switch (c) {
-      case 'c': {
-        char c0;
-        v = va_arg(*pParamList, int);
-        c0 = (char)v;
-        _StoreChar(&BufferDesc, c0);
-        break;
-      }
-      case 'd':
-        v = va_arg(*pParamList, int);
-        _PrintInt(&BufferDesc, v, 10u, NumDigits, FieldWidth, FormatFlags);
-        break;
-      case 'u':
-        v = va_arg(*pParamList, int);
-        _PrintUnsigned(&BufferDesc, (unsigned)v, 10u, NumDigits, FieldWidth, FormatFlags);
-        break;
-      case 'x':
-      case 'X':
-        v = va_arg(*pParamList, int);
-        _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, NumDigits, FieldWidth, FormatFlags);
-        break;
-      case 's':
-        {
-          const char * s = va_arg(*pParamList, const char *);
-          do {
-            c = *s;
-            s++;
-            if (c == '\0') {
-              break;
-            }
-           _StoreChar(&BufferDesc, c);
-          } while (BufferDesc.ReturnValue >= 0);
-        }
-        break;
-      case 'p':
-        v = va_arg(*pParamList, int);
-        _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, 8u, 8u, 0u);
-        break;
-      case '%':
-        _StoreChar(&BufferDesc, '%');
-        break;
-      default:
-        break;
-      }
-      sFormat++;
-    } else {
-      _StoreChar(&BufferDesc, c);
-    }
-  } while (BufferDesc.ReturnValue >= 0);
-
-  if (BufferDesc.ReturnValue > 0) {
-    //
-    // Write remaining data, if any
-    //
-    if (BufferDesc.Cnt != 0u) {
-      SEGGER_RTT_Write(BufferIndex, acBuffer, BufferDesc.Cnt);
-    }
-    BufferDesc.ReturnValue += (int)BufferDesc.Cnt;
-  }
-  return BufferDesc.ReturnValue;
-}
-
-/*********************************************************************
-*
-*       SEGGER_RTT_printf
-*
-*  Function description
-*    Stores a formatted string in SEGGER RTT control block.
-*    This data is read by the host.
-*
-*  Parameters
-*    BufferIndex  Index of "Up"-buffer to be used. (e.g. 0 for "Terminal")
-*    sFormat      Pointer to format string, followed by the arguments for conversion
-*
-*  Return values
-*    >= 0:  Number of bytes which have been stored in the "Up"-buffer.
-*     < 0:  Error
-*
-*  Notes
-*    (1) Conversion specifications have following syntax:
-*          %[flags][FieldWidth][.Precision]ConversionSpecifier
-*    (2) Supported flags:
-*          -: Left justify within the field width
-*          +: Always print sign extension for signed conversions
-*          0: Pad with 0 instead of spaces. Ignored when using '-'-flag or precision
-*        Supported conversion specifiers:
-*          c: Print the argument as one char
-*          d: Print the argument as a signed integer
-*          u: Print the argument as an unsigned integer
-*          x: Print the argument as an hexadecimal integer
-*          s: Print the string pointed to by the argument
-*          p: Print the argument as an 8-digit hexadecimal integer. (Argument shall be a pointer to void.)
-*/
-int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...) {
-  int r;
-  va_list ParamList;
-
-  va_start(ParamList, sFormat);
-  r = SEGGER_RTT_vprintf(BufferIndex, sFormat, &ParamList);
-  va_end(ParamList);
-  return r;
-}
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_GCC.c b/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_GCC.c
deleted file mode 100644
index b0b6ca3..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_GCC.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH         *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : SEGGER_RTT_Syscalls_GCC.c
-Purpose : Low-level functions for using printf() via RTT in GCC.
-          To use RTT for printf output, include this file in your 
-          application.
-Revision: $Rev: 9599 $
-----------------------------------------------------------------------
-*/
-#if (defined __GNUC__) && !(defined __SES_ARM) && !(defined __CROSSWORKS_ARM)
-
-#include <reent.h>  // required for _write_r
-#include "SEGGER_RTT.h"
-
-
-/*********************************************************************
-*
-*       Types
-*
-**********************************************************************
-*/
-//
-// If necessary define the _reent struct 
-// to match the one passed by the used standard library.
-//
-struct _reent;
-
-/*********************************************************************
-*
-*       Function prototypes
-*
-**********************************************************************
-*/
-int _write(int file, char *ptr, int len);
-int _write_r(struct _reent *r, int file, const void *ptr, int len);
-
-/*********************************************************************
-*
-*       Global functions
-*
-**********************************************************************
-*/
-
-/*********************************************************************
-*
-*       _write()
-*
-* Function description
-*   Low-level write function.
-*   libc subroutines will use this system routine for output to all files,
-*   including stdout.
-*   Write data via RTT.
-*/
-int _write(int file, char *ptr, int len) {
-  (void) file;  /* Not used, avoid warning */
-  SEGGER_RTT_Write(0, ptr, len);
-  return len;
-}
-
-/*********************************************************************
-*
-*       _write_r()
-*
-* Function description
-*   Low-level reentrant write function.
-*   libc subroutines will use this system routine for output to all files,
-*   including stdout.
-*   Write data via RTT.
-*/
-int _write_r(struct _reent *r, int file, const void *ptr, int len) {
-  (void) file;  /* Not used, avoid warning */
-  (void) r;     /* Not used, avoid warning */
-  SEGGER_RTT_Write(0, ptr, len);
-  return len;
-}
-
-#endif
-/****** End Of File *************************************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_IAR.c b/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_IAR.c
deleted file mode 100644
index f8baf69..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_IAR.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH         *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : SEGGER_RTT_Syscalls_IAR.c
-Purpose : Low-level functions for using printf() via RTT in IAR.
-          To use RTT for printf output, include this file in your 
-          application and set the Library Configuration to Normal.
-Revision: $Rev: 12303 $
-----------------------------------------------------------------------
-*/
-#ifdef __IAR_SYSTEMS_ICC__
-
-//
-// Since IAR EWARM V8 yfuns.h is considered as deprecated and LowLevelIOInterface.h shall be used instead
-// To not break any compatibility with older compiler versions, we have a version check in here
-//
-#if __VER__ >= 8000000
-  #include <LowLevelIOInterface.h>
-#else
-  #include <yfuns.h>
-#endif
-
-#include "SEGGER_RTT.h"
-#pragma module_name = "?__write"
-
-/*********************************************************************
-*
-*       Function prototypes
-*
-**********************************************************************
-*/
-size_t __write(int handle, const unsigned char * buffer, size_t size);
-
-/*********************************************************************
-*
-*       Global functions
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       __write()
-*
-* Function description
-*   Low-level write function.
-*   Standard library subroutines will use this system routine
-*   for output to all files, including stdout.
-*   Write data via RTT.
-*/
-size_t __write(int handle, const unsigned char * buffer, size_t size) {
-  (void) handle;  /* Not used, avoid warning */
-  SEGGER_RTT_Write(0, (const char*)buffer, size);
-  return size;
-}
-
-/*********************************************************************
-*
-*       __write_buffered()
-*
-* Function description
-*   Low-level write function.
-*   Standard library subroutines will use this system routine
-*   for output to all files, including stdout.
-*   Write data via RTT.
-*/
-size_t __write_buffered(int handle, const unsigned char * buffer, size_t size) {
-  (void) handle;  /* Not used, avoid warning */
-  SEGGER_RTT_Write(0, (const char*)buffer, size);
-  return size;
-}
-
-#endif
-/****** End Of File *************************************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_KEIL.c b/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_KEIL.c
deleted file mode 100644
index 50d38c1..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_KEIL.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*       Solutions for real time microcontroller applications         *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH         *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : RTT_Syscalls_KEIL.c
-Purpose : Retargeting module for KEIL MDK-CM3.
-          Low-level functions for using printf() via RTT
-Revision: $Rev: 9599 $
-----------------------------------------------------------------------
-*/
-#ifdef __CC_ARM
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rt_sys.h>
-#include <rt_misc.h>
-
-#include "SEGGER_RTT.h"
-/*********************************************************************
-*
-*       #pragmas
-*
-**********************************************************************
-*/
-#pragma import(__use_no_semihosting)
-
-#ifdef _MICROLIB
-  #pragma import(__use_full_stdio)
-#endif
-
-/*********************************************************************
-*
-*       Defines non-configurable
-*
-**********************************************************************
-*/
-
-/* Standard IO device handles - arbitrary, but any real file system handles must be
-   less than 0x8000. */
-#define STDIN             0x8001    // Standard Input Stream
-#define STDOUT            0x8002    // Standard Output Stream
-#define STDERR            0x8003    // Standard Error Stream
-
-/*********************************************************************
-*
-*       Public const
-*
-**********************************************************************
-*/
-//const char __stdin_name[]  = "STDIN";
-const char __stdout_name[] = "STDOUT";
-const char __stderr_name[] = "STDERR";
-
-/*********************************************************************
-*
-*       Public code
-*
-**********************************************************************
-*/
-
-/*********************************************************************
-*
-*       _ttywrch
-*
-*  Function description:
-*    Outputs a character to the console
-*
-*  Parameters:
-*    c    - character to output
-*  
-*/
-void _ttywrch(int c) {
-  fputc(c, stdout); // stdout
-  fflush(stdout);
-}
-
-/*********************************************************************
-*
-*       _sys_open
-*
-*  Function description:
-*    Opens the device/file in order to do read/write operations
-*
-*  Parameters:
-*    sName        - sName of the device/file to open
-*    OpenMode    - This parameter is currently ignored
-*  
-*  Return value:
-*    != 0     - Handle to the object to open, otherwise 
-*    == 0     -"device" is not handled by this module
-*
-*/
-FILEHANDLE _sys_open(const char * sName, int OpenMode) {
-  (void)OpenMode;
-  // Register standard Input Output devices.
-  if (strcmp(sName, __stdout_name) == 0) {
-    return (STDOUT);
-  } else if (strcmp(sName, __stderr_name) == 0) {
-    return (STDERR);
-  } else
-  return (0);  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_close
-*
-*  Function description:
-*    Closes the handle to the open device/file
-*
-*  Parameters:
-*    hFile    - Handle to a file opened via _sys_open
-*  
-*  Return value:
-*    0     - device/file closed
-*
-*/
-int _sys_close(FILEHANDLE hFile) {
-  (void)hFile;
-  return 0;  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_write
-*
-*  Function description:
-*    Writes the data to an open handle.
-*    Currently this function only outputs data to the console
-*
-*  Parameters:
-*    hFile    - Handle to a file opened via _sys_open
-*    pBuffer  - Pointer to the data that shall be written
-*    NumBytes      - Number of bytes to write
-*    Mode     - The Mode that shall be used
-*  
-*  Return value:
-*    Number of bytes *not* written to the file/device
-*
-*/
-int _sys_write(FILEHANDLE hFile, const unsigned char * pBuffer, unsigned NumBytes, int Mode) {
-  int r = 0;
-
-  (void)Mode;
-  if (hFile == STDOUT) {
-    return NumBytes - SEGGER_RTT_Write(0, (const char*)pBuffer, NumBytes);
-  }
-  return r;
-}
-
-/*********************************************************************
-*
-*       _sys_read
-*
-*  Function description:
-*    Reads data from an open handle.
-*    Currently this modules does nothing.
-*
-*  Parameters:
-*    hFile    - Handle to a file opened via _sys_open
-*    pBuffer  - Pointer to buffer to store the read data
-*    NumBytes      - Number of bytes to read
-*    Mode     - The Mode that shall be used
-*  
-*  Return value:
-*    Number of bytes read from the file/device
-*
-*/
-int _sys_read(FILEHANDLE hFile, unsigned char * pBuffer, unsigned NumBytes, int Mode) {
-  (void)hFile;
-  (void)pBuffer;
-  (void)NumBytes;
-  (void)Mode;
-  return (0);  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_istty
-*
-*  Function description:
-*    This function shall return whether the opened file 
-*    is a console device or not.
-*
-*  Parameters:
-*    hFile    - Handle to a file opened via _sys_open
-*  
-*  Return value:
-*    1       - Device is     a console
-*    0       - Device is not a console
-*
-*/
-int _sys_istty(FILEHANDLE hFile) {
-  if (hFile > 0x8000) {
-    return (1);
-  }
-  return (0);  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_seek
-*
-*  Function description:
-*    Seeks via the file to a specific position
-*
-*  Parameters:
-*    hFile  - Handle to a file opened via _sys_open
-*    Pos    - 
-*  
-*  Return value:
-*    int       - 
-*
-*/
-int _sys_seek(FILEHANDLE hFile, long Pos) {
-  (void)hFile;
-  (void)Pos;
-  return (0);  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_ensure
-*
-*  Function description:
-*    
-*
-*  Parameters:
-*    hFile    - Handle to a file opened via _sys_open
-*  
-*  Return value:
-*    int       - 
-*
-*/
-int _sys_ensure(FILEHANDLE hFile) {
-  (void)hFile;
-  return (-1);  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_flen
-*
-*  Function description:
-*    Returns the length of the opened file handle
-*
-*  Parameters:
-*    hFile    - Handle to a file opened via _sys_open
-*  
-*  Return value:
-*    Length of the file
-*
-*/
-long _sys_flen(FILEHANDLE hFile) {
-  (void)hFile;
-  return (0);  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_tmpnam
-*
-*  Function description:
-*    This function converts the file number fileno for a temporary 
-*    file to a unique filename, for example, tmp0001.
-*
-*  Parameters:
-*    pBuffer    - Pointer to a buffer to store the name
-*    FileNum    - file number to convert
-*    MaxLen     - Size of the buffer
-*  
-*  Return value:
-*     1 - Error
-*     0 - Success  
-*
-*/
-int _sys_tmpnam(char * pBuffer, int FileNum, unsigned MaxLen) {
-  (void)pBuffer;
-  (void)FileNum;
-  (void)MaxLen;
-  return (1);  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_command_string
-*
-*  Function description:
-*    This function shall execute a system command.
-*
-*  Parameters:
-*    cmd    - Pointer to the command string
-*    len    - Length of the string
-*  
-*  Return value:
-*    == NULL - Command was not successfully executed
-*    == sCmd - Command was passed successfully
-*
-*/
-char * _sys_command_string(char * cmd, int len) {
-  (void)len;
-  return cmd;  // Not implemented
-}
-
-/*********************************************************************
-*
-*       _sys_exit
-*
-*  Function description:
-*    This function is called when the application returns from main
-*
-*  Parameters:
-*    ReturnCode    - Return code from the main function
-*  
-*
-*/
-void _sys_exit(int ReturnCode) {
-  (void)ReturnCode;
-  while (1);  // Not implemented
-}
-
-#endif
-/*************************** End of file ****************************/
diff --git a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_SES.c b/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_SES.c
deleted file mode 100644
index 48609e4..0000000
--- a/third_party/jlink/SEGGER_RTT_V640/Syscalls/SEGGER_RTT_Syscalls_SES.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*********************************************************************
-*                    SEGGER Microcontroller GmbH                     *
-*                        The Embedded Experts                        *
-**********************************************************************
-*                                                                    *
-*            (c) 1995 - 2018 SEGGER Microcontroller GmbH             *
-*                                                                    *
-*       www.segger.com     Support: support@segger.com               *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-*       SEGGER RTT * Real Time Transfer for embedded targets         *
-*                                                                    *
-**********************************************************************
-*                                                                    *
-* All rights reserved.                                               *
-*                                                                    *
-* SEGGER strongly recommends to not make any changes                 *
-* to or modify the source code of this software in order to stay     *
-* compatible with the RTT protocol and J-Link.                       *
-*                                                                    *
-* Redistribution and use in source and binary forms, with or         *
-* without modification, are permitted provided that the following    *
-* conditions are met:                                                *
-*                                                                    *
-* o Redistributions of source code must retain the above copyright   *
-*   notice, this list of conditions and the following disclaimer.    *
-*                                                                    *
-* o 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.                                           *
-*                                                                    *
-* o Neither the name of SEGGER Microcontroller GmbH                  *
-*   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 SEGGER Microcontroller 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.                                                            *
-*                                                                    *
-**********************************************************************
----------------------------END-OF-HEADER------------------------------
-File    : SEGGER_RTT_Syscalls_SES.c
-Purpose : Reimplementation of printf, puts and __getchar using RTT
-          in SEGGER Embedded Studio.
-          To use RTT for printf output, include this file in your
-          application.
-Revision: $Rev: 12804 $
-----------------------------------------------------------------------
-*/
-#if (defined __SES_ARM) || (defined __CROSSWORKS_ARM)
-
-#include "SEGGER_RTT.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include "limits.h"
-#include "__libc.h"
-#include "__vfprintf.h"
-
-/*********************************************************************
-*
-*       Defines, configurable
-*
-**********************************************************************
-*/
-//
-// Select string formatting implementation.
-//
-// RTT printf formatting
-//  - Configurable stack usage. (SEGGER_RTT_PRINTF_BUFFER_SIZE in SEGGER_RTT_Conf.h)
-//  - No maximum string length.
-//  - Limited conversion specifiers and flags. (See SEGGER_RTT_printf.c)
-// Standard library printf formatting
-//  - Configurable formatting capabilities.
-//  - Full conversion specifier and flag support.
-//  - Maximum string length has to be known or (slightly) slower character-wise output.
-//
-// #define PRINTF_USE_SEGGER_RTT_FORMATTING    0 // Use standard library formatting
-// #define PRINTF_USE_SEGGER_RTT_FORMATTING    1 // Use RTT formatting
-//
-#ifndef   PRINTF_USE_SEGGER_RTT_FORMATTING
-  #define PRINTF_USE_SEGGER_RTT_FORMATTING    0
-#endif
-//
-// If using standard library formatting,
-// select maximum output string buffer size or character-wise output.
-//
-// #define PRINTF_BUFFER_SIZE                  0 // Use character-wise output
-// #define PRINTF_BUFFER_SIZE                128 // Default maximum string length
-//
-#ifndef   PRINTF_BUFFER_SIZE
-  #define PRINTF_BUFFER_SIZE                128
-#endif
-
-#if PRINTF_USE_SEGGER_RTT_FORMATTING  // Use SEGGER RTT formatting implementation
-/*********************************************************************
-*
-*       Function prototypes
-*
-**********************************************************************
-*/
-int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList);
-
-/*********************************************************************
-*
-*       Global functions, printf
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       printf()
-*
-*  Function description
-*    print a formatted string using RTT and SEGGER RTT formatting.
-*/
-int printf(const char *fmt,...) {
-  int     n;
-  va_list args;
-
-  va_start (args, fmt);
-  n = SEGGER_RTT_vprintf(0, fmt, &args);
-  va_end(args);
-  return n;
-}
-
-#elif PRINTF_BUFFER_SIZE == 0 // Use standard library formatting with character-wise output
-
-/*********************************************************************
-*
-*       Static functions
-*
-**********************************************************************
-*/
-static int _putchar(int x, __printf_tag_ptr ctx) {
-  (void)ctx;
-  SEGGER_RTT_Write(0, (char *)&x, 1);
-  return x;
-}
-
-/*********************************************************************
-*
-*       Global functions, printf
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       printf()
-*
-*  Function description
-*    print a formatted string character-wise, using RTT and standard
-*    library formatting.
-*/
-int printf(const char *fmt, ...) {
-  int         n;
-  va_list     args;
-  __printf_t  iod;
-
-  va_start(args, fmt);
-  iod.string    = 0;
-  iod.maxchars  = INT_MAX;
-  iod.output_fn = _putchar;
-  SEGGER_RTT_LOCK();
-  n = __vfprintf(&iod, fmt, args);
-  SEGGER_RTT_UNLOCK();
-  va_end(args);
-  return n;
-}
-
-#else // Use standard library formatting with static buffer
-
-/*********************************************************************
-*
-*       Global functions, printf
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       printf()
-*
-*  Function description
-*    print a formatted string using RTT and standard library formatting.
-*/
-int printf(const char *fmt,...) {
-  int     n;
-  char    aBuffer[PRINTF_BUFFER_SIZE];
-  va_list args;
-
-  va_start (args, fmt);
-  n = vsnprintf(aBuffer, sizeof(aBuffer), fmt, args);
-  if (n > (int)sizeof(aBuffer)) {
-    SEGGER_RTT_Write(0, aBuffer, sizeof(aBuffer));
-  } else if (n > 0) {
-    SEGGER_RTT_Write(0, aBuffer, n);
-  }
-  va_end(args);
-  return n;
-}
-#endif
-
-/*********************************************************************
-*
-*       Global functions
-*
-**********************************************************************
-*/
-/*********************************************************************
-*
-*       puts()
-*
-*  Function description
-*    print a string using RTT.
-*/
-int puts(const char *s) {
-  return SEGGER_RTT_WriteString(0, s);
-}
-
-/*********************************************************************
-*
-*       __putchar()
-*
-*  Function description
-*    Write one character via RTT.
-*/
-int __putchar(int x, __printf_tag_ptr ctx) {
-  (void)ctx;
-  SEGGER_RTT_Write(0, (char *)&x, 1);
-  return x;
-}
-
-/*********************************************************************
-*
-*       __getchar()
-*
-*  Function description
-*    Wait for and get a character via RTT.
-*/
-int __getchar() {
-  return SEGGER_RTT_WaitKey();
-}
-
-#endif
-/****** End Of File *************************************************/
diff --git a/third_party/mbedtls/BUILD.gn b/third_party/mbedtls/BUILD.gn
index 66cac5d..e2a041a 100644
--- a/third_party/mbedtls/BUILD.gn
+++ b/third_party/mbedtls/BUILD.gn
@@ -28,9 +28,6 @@
 declare_args() {
   # Configuration file for MbedTLS.
   mbedtls_config_file = "mbedtls-config.h"
-
-  # Extra dependencies for MbedTLS
-  mbedtls_deps = [ "../../src/core:libopenthread_core_config" ]
 }
 
 config("mbedtls_config") {
@@ -44,176 +41,184 @@
   cflags = [ "-Wno-conversion" ]
 }
 
+mbedtls_sources = [
+  "repo/include/mbedtls/aes.h",
+  "repo/include/mbedtls/aesni.h",
+  "repo/include/mbedtls/arc4.h",
+  "repo/include/mbedtls/aria.h",
+  "repo/include/mbedtls/asn1.h",
+  "repo/include/mbedtls/asn1write.h",
+  "repo/include/mbedtls/base64.h",
+  "repo/include/mbedtls/bignum.h",
+  "repo/include/mbedtls/blowfish.h",
+  "repo/include/mbedtls/bn_mul.h",
+  "repo/include/mbedtls/camellia.h",
+  "repo/include/mbedtls/ccm.h",
+  "repo/include/mbedtls/certs.h",
+  "repo/include/mbedtls/chacha20.h",
+  "repo/include/mbedtls/chachapoly.h",
+  "repo/include/mbedtls/check_config.h",
+  "repo/include/mbedtls/cipher.h",
+  "repo/include/mbedtls/cipher_internal.h",
+  "repo/include/mbedtls/cmac.h",
+  "repo/include/mbedtls/compat-1.3.h",
+  "repo/include/mbedtls/config.h",
+  "repo/include/mbedtls/config_psa.h",
+  "repo/include/mbedtls/ctr_drbg.h",
+  "repo/include/mbedtls/debug.h",
+  "repo/include/mbedtls/des.h",
+  "repo/include/mbedtls/dhm.h",
+  "repo/include/mbedtls/ecdh.h",
+  "repo/include/mbedtls/ecdsa.h",
+  "repo/include/mbedtls/ecjpake.h",
+  "repo/include/mbedtls/ecp.h",
+  "repo/include/mbedtls/ecp_internal.h",
+  "repo/include/mbedtls/entropy.h",
+  "repo/include/mbedtls/entropy_poll.h",
+  "repo/include/mbedtls/error.h",
+  "repo/include/mbedtls/gcm.h",
+  "repo/include/mbedtls/havege.h",
+  "repo/include/mbedtls/hkdf.h",
+  "repo/include/mbedtls/hmac_drbg.h",
+  "repo/include/mbedtls/md.h",
+  "repo/include/mbedtls/md2.h",
+  "repo/include/mbedtls/md4.h",
+  "repo/include/mbedtls/md5.h",
+  "repo/include/mbedtls/md_internal.h",
+  "repo/include/mbedtls/memory_buffer_alloc.h",
+  "repo/include/mbedtls/net.h",
+  "repo/include/mbedtls/net_sockets.h",
+  "repo/include/mbedtls/nist_kw.h",
+  "repo/include/mbedtls/oid.h",
+  "repo/include/mbedtls/padlock.h",
+  "repo/include/mbedtls/pem.h",
+  "repo/include/mbedtls/pk.h",
+  "repo/include/mbedtls/pk_internal.h",
+  "repo/include/mbedtls/pkcs11.h",
+  "repo/include/mbedtls/pkcs12.h",
+  "repo/include/mbedtls/pkcs5.h",
+  "repo/include/mbedtls/platform.h",
+  "repo/include/mbedtls/platform_time.h",
+  "repo/include/mbedtls/platform_util.h",
+  "repo/include/mbedtls/poly1305.h",
+  "repo/include/mbedtls/ripemd160.h",
+  "repo/include/mbedtls/rsa.h",
+  "repo/include/mbedtls/rsa_internal.h",
+  "repo/include/mbedtls/sha1.h",
+  "repo/include/mbedtls/sha256.h",
+  "repo/include/mbedtls/sha512.h",
+  "repo/include/mbedtls/ssl.h",
+  "repo/include/mbedtls/ssl_cache.h",
+  "repo/include/mbedtls/ssl_ciphersuites.h",
+  "repo/include/mbedtls/ssl_cookie.h",
+  "repo/include/mbedtls/ssl_internal.h",
+  "repo/include/mbedtls/ssl_ticket.h",
+  "repo/include/mbedtls/threading.h",
+  "repo/include/mbedtls/timing.h",
+  "repo/include/mbedtls/version.h",
+  "repo/include/mbedtls/x509.h",
+  "repo/include/mbedtls/x509_crl.h",
+  "repo/include/mbedtls/x509_crt.h",
+  "repo/include/mbedtls/x509_csr.h",
+  "repo/include/mbedtls/xtea.h",
+  "repo/library/aes.c",
+  "repo/library/aesni.c",
+  "repo/library/arc4.c",
+  "repo/library/aria.c",
+  "repo/library/asn1parse.c",
+  "repo/library/asn1write.c",
+  "repo/library/base64.c",
+  "repo/library/bignum.c",
+  "repo/library/blowfish.c",
+  "repo/library/camellia.c",
+  "repo/library/ccm.c",
+  "repo/library/certs.c",
+  "repo/library/constant_time.c",
+  "repo/library/chacha20.c",
+  "repo/library/chachapoly.c",
+  "repo/library/cipher.c",
+  "repo/library/cipher_wrap.c",
+  "repo/library/cmac.c",
+  "repo/library/ctr_drbg.c",
+  "repo/library/debug.c",
+  "repo/library/des.c",
+  "repo/library/dhm.c",
+  "repo/library/ecdh.c",
+  "repo/library/ecdsa.c",
+  "repo/library/ecjpake.c",
+  "repo/library/ecp.c",
+  "repo/library/ecp_curves.c",
+  "repo/library/entropy.c",
+  "repo/library/entropy_poll.c",
+  "repo/library/error.c",
+  "repo/library/gcm.c",
+  "repo/library/havege.c",
+  "repo/library/hkdf.c",
+  "repo/library/hmac_drbg.c",
+  "repo/library/md.c",
+  "repo/library/md2.c",
+  "repo/library/md4.c",
+  "repo/library/md5.c",
+  "repo/library/memory_buffer_alloc.c",
+  "repo/library/net_sockets.c",
+  "repo/library/nist_kw.c",
+  "repo/library/oid.c",
+  "repo/library/padlock.c",
+  "repo/library/pem.c",
+  "repo/library/pk.c",
+  "repo/library/pk_wrap.c",
+  "repo/library/pkcs11.c",
+  "repo/library/pkcs12.c",
+  "repo/library/pkcs5.c",
+  "repo/library/pkparse.c",
+  "repo/library/pkwrite.c",
+  "repo/library/platform.c",
+  "repo/library/platform_util.c",
+  "repo/library/poly1305.c",
+  "repo/library/psa_crypto.c",
+  "repo/library/psa_crypto_driver_wrappers.c",
+  "repo/library/psa_crypto_se.c",
+  "repo/library/psa_crypto_slot_management.c",
+  "repo/library/psa_crypto_storage.c",
+  "repo/library/psa_its_file.c",
+  "repo/library/ripemd160.c",
+  "repo/library/rsa.c",
+  "repo/library/rsa_internal.c",
+  "repo/library/sha1.c",
+  "repo/library/sha256.c",
+  "repo/library/sha512.c",
+  "repo/library/ssl_cache.c",
+  "repo/library/ssl_ciphersuites.c",
+  "repo/library/ssl_cli.c",
+  "repo/library/ssl_cookie.c",
+  "repo/library/ssl_msg.c",
+  "repo/library/ssl_srv.c",
+  "repo/library/ssl_ticket.c",
+  "repo/library/ssl_tls.c",
+  "repo/library/ssl_tls13_keys.c",
+  "repo/library/threading.c",
+  "repo/library/timing.c",
+  "repo/library/version.c",
+  "repo/library/version_features.c",
+  "repo/library/x509.c",
+  "repo/library/x509_create.c",
+  "repo/library/x509_crl.c",
+  "repo/library/x509_crt.c",
+  "repo/library/x509_csr.c",
+  "repo/library/x509write_crt.c",
+  "repo/library/x509write_csr.c",
+  "repo/library/xtea.c",
+]
+
 static_library("mbedtls") {
-  sources = [
-    "repo/include/mbedtls/aes.h",
-    "repo/include/mbedtls/aesni.h",
-    "repo/include/mbedtls/arc4.h",
-    "repo/include/mbedtls/aria.h",
-    "repo/include/mbedtls/asn1.h",
-    "repo/include/mbedtls/asn1write.h",
-    "repo/include/mbedtls/base64.h",
-    "repo/include/mbedtls/bignum.h",
-    "repo/include/mbedtls/blowfish.h",
-    "repo/include/mbedtls/bn_mul.h",
-    "repo/include/mbedtls/camellia.h",
-    "repo/include/mbedtls/ccm.h",
-    "repo/include/mbedtls/certs.h",
-    "repo/include/mbedtls/chacha20.h",
-    "repo/include/mbedtls/chachapoly.h",
-    "repo/include/mbedtls/check_config.h",
-    "repo/include/mbedtls/cipher.h",
-    "repo/include/mbedtls/cipher_internal.h",
-    "repo/include/mbedtls/cmac.h",
-    "repo/include/mbedtls/compat-1.3.h",
-    "repo/include/mbedtls/config.h",
-    "repo/include/mbedtls/config_psa.h",
-    "repo/include/mbedtls/ctr_drbg.h",
-    "repo/include/mbedtls/debug.h",
-    "repo/include/mbedtls/des.h",
-    "repo/include/mbedtls/dhm.h",
-    "repo/include/mbedtls/ecdh.h",
-    "repo/include/mbedtls/ecdsa.h",
-    "repo/include/mbedtls/ecjpake.h",
-    "repo/include/mbedtls/ecp.h",
-    "repo/include/mbedtls/ecp_internal.h",
-    "repo/include/mbedtls/entropy.h",
-    "repo/include/mbedtls/entropy_poll.h",
-    "repo/include/mbedtls/error.h",
-    "repo/include/mbedtls/gcm.h",
-    "repo/include/mbedtls/havege.h",
-    "repo/include/mbedtls/hkdf.h",
-    "repo/include/mbedtls/hmac_drbg.h",
-    "repo/include/mbedtls/md.h",
-    "repo/include/mbedtls/md2.h",
-    "repo/include/mbedtls/md4.h",
-    "repo/include/mbedtls/md5.h",
-    "repo/include/mbedtls/md_internal.h",
-    "repo/include/mbedtls/memory_buffer_alloc.h",
-    "repo/include/mbedtls/net.h",
-    "repo/include/mbedtls/net_sockets.h",
-    "repo/include/mbedtls/nist_kw.h",
-    "repo/include/mbedtls/oid.h",
-    "repo/include/mbedtls/padlock.h",
-    "repo/include/mbedtls/pem.h",
-    "repo/include/mbedtls/pk.h",
-    "repo/include/mbedtls/pk_internal.h",
-    "repo/include/mbedtls/pkcs11.h",
-    "repo/include/mbedtls/pkcs12.h",
-    "repo/include/mbedtls/pkcs5.h",
-    "repo/include/mbedtls/platform.h",
-    "repo/include/mbedtls/platform_time.h",
-    "repo/include/mbedtls/platform_util.h",
-    "repo/include/mbedtls/poly1305.h",
-    "repo/include/mbedtls/ripemd160.h",
-    "repo/include/mbedtls/rsa.h",
-    "repo/include/mbedtls/rsa_internal.h",
-    "repo/include/mbedtls/sha1.h",
-    "repo/include/mbedtls/sha256.h",
-    "repo/include/mbedtls/sha512.h",
-    "repo/include/mbedtls/ssl.h",
-    "repo/include/mbedtls/ssl_cache.h",
-    "repo/include/mbedtls/ssl_ciphersuites.h",
-    "repo/include/mbedtls/ssl_cookie.h",
-    "repo/include/mbedtls/ssl_internal.h",
-    "repo/include/mbedtls/ssl_ticket.h",
-    "repo/include/mbedtls/threading.h",
-    "repo/include/mbedtls/timing.h",
-    "repo/include/mbedtls/version.h",
-    "repo/include/mbedtls/x509.h",
-    "repo/include/mbedtls/x509_crl.h",
-    "repo/include/mbedtls/x509_crt.h",
-    "repo/include/mbedtls/x509_csr.h",
-    "repo/include/mbedtls/xtea.h",
-    "repo/library/aes.c",
-    "repo/library/aesni.c",
-    "repo/library/arc4.c",
-    "repo/library/aria.c",
-    "repo/library/asn1parse.c",
-    "repo/library/asn1write.c",
-    "repo/library/base64.c",
-    "repo/library/bignum.c",
-    "repo/library/blowfish.c",
-    "repo/library/camellia.c",
-    "repo/library/ccm.c",
-    "repo/library/certs.c",
-    "repo/library/chacha20.c",
-    "repo/library/chachapoly.c",
-    "repo/library/cipher.c",
-    "repo/library/cipher_wrap.c",
-    "repo/library/cmac.c",
-    "repo/library/ctr_drbg.c",
-    "repo/library/debug.c",
-    "repo/library/des.c",
-    "repo/library/dhm.c",
-    "repo/library/ecdh.c",
-    "repo/library/ecdsa.c",
-    "repo/library/ecjpake.c",
-    "repo/library/ecp.c",
-    "repo/library/ecp_curves.c",
-    "repo/library/entropy.c",
-    "repo/library/entropy_poll.c",
-    "repo/library/error.c",
-    "repo/library/gcm.c",
-    "repo/library/havege.c",
-    "repo/library/hkdf.c",
-    "repo/library/hmac_drbg.c",
-    "repo/library/md.c",
-    "repo/library/md2.c",
-    "repo/library/md4.c",
-    "repo/library/md5.c",
-    "repo/library/memory_buffer_alloc.c",
-    "repo/library/net_sockets.c",
-    "repo/library/nist_kw.c",
-    "repo/library/oid.c",
-    "repo/library/padlock.c",
-    "repo/library/pem.c",
-    "repo/library/pk.c",
-    "repo/library/pk_wrap.c",
-    "repo/library/pkcs11.c",
-    "repo/library/pkcs12.c",
-    "repo/library/pkcs5.c",
-    "repo/library/pkparse.c",
-    "repo/library/pkwrite.c",
-    "repo/library/platform.c",
-    "repo/library/platform_util.c",
-    "repo/library/poly1305.c",
-    "repo/library/psa_crypto.c",
-    "repo/library/psa_crypto_driver_wrappers.c",
-    "repo/library/psa_crypto_se.c",
-    "repo/library/psa_crypto_slot_management.c",
-    "repo/library/psa_crypto_storage.c",
-    "repo/library/psa_its_file.c",
-    "repo/library/ripemd160.c",
-    "repo/library/rsa.c",
-    "repo/library/rsa_internal.c",
-    "repo/library/sha1.c",
-    "repo/library/sha256.c",
-    "repo/library/sha512.c",
-    "repo/library/ssl_cache.c",
-    "repo/library/ssl_ciphersuites.c",
-    "repo/library/ssl_cli.c",
-    "repo/library/ssl_cookie.c",
-    "repo/library/ssl_msg.c",
-    "repo/library/ssl_srv.c",
-    "repo/library/ssl_ticket.c",
-    "repo/library/ssl_tls.c",
-    "repo/library/ssl_tls13_keys.c",
-    "repo/library/threading.c",
-    "repo/library/timing.c",
-    "repo/library/version.c",
-    "repo/library/version_features.c",
-    "repo/library/x509.c",
-    "repo/library/x509_create.c",
-    "repo/library/x509_crl.c",
-    "repo/library/x509_crt.c",
-    "repo/library/x509_csr.c",
-    "repo/library/x509write_crt.c",
-    "repo/library/x509write_csr.c",
-    "repo/library/xtea.c",
-  ]
+  sources = mbedtls_sources
+  public_deps = [ "../../src/core:libopenthread_core_config" ]
+  public_configs = [ ":mbedtls_config" ]
+}
 
-  public_deps = mbedtls_deps
 
+static_library("mbedtls_legacy_extensions") {
+  sources = mbedtls_sources
+  public_deps = [ "../../src/core:libopenthread_core_config_legacy_extensions" ]
   public_configs = [ ":mbedtls_config" ]
 }
diff --git a/third_party/nlbuild-autotools/repo/.default-version b/third_party/nlbuild-autotools/repo/.default-version
deleted file mode 100644
index 9494224..0000000
--- a/third_party/nlbuild-autotools/repo/.default-version
+++ /dev/null
@@ -1 +0,0 @@
-1.6.16
diff --git a/third_party/nlbuild-autotools/repo/.gitignore b/third_party/nlbuild-autotools/repo/.gitignore
deleted file mode 100644
index 33232b3..0000000
--- a/third_party/nlbuild-autotools/repo/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.local-version
diff --git a/third_party/nlbuild-autotools/repo/.travis.yml b/third_party/nlbuild-autotools/repo/.travis.yml
deleted file mode 100644
index f658937..0000000
--- a/third_party/nlbuild-autotools/repo/.travis.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#    Copyright 2019 Google LLC. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the Travis CI hosted, distributed continuous 
-#      integration configuration file for nlbuild-autotools.
-#
-
-language: generic
-
-sudo: false
-
-os:
-  - linux
-  - osx
-
-# At present, simply ensure that several targets can be successfully built.
-
-script:
-  - make dist
-  - make tools
-  - make toolsdist
diff --git a/third_party/nlbuild-autotools/repo/CHANGES b/third_party/nlbuild-autotools/repo/CHANGES
deleted file mode 100644
index c15255c..0000000
--- a/third_party/nlbuild-autotools/repo/CHANGES
+++ /dev/null
@@ -1,240 +0,0 @@
-1.6.16 (2020-01-23)
-
-        * Allow absolute paths in PRETTY_FILES.
-
-1.6.15 (2019-12-06)
-
-        * Remove redundant libtool m4 libraries.
-
-1.6.14 (2019-07-16)
-
-        * Update MANIFEST to ensure that 'make dist' works correctly.
-
-1.6.13 (2019-07-16)
-
-        * Update coreutils to a newer version s.t. they build cleanly
-          on linux systems with GLIBC 2.28 or newer.  Remove the strip
-          from install libraries to allow coreutils to be installed on
-          Mac OS systems.
-	
-1.6.12 (2019-06-11)
-
-        * install-headers target now depends on BUILT_SOURCES to
-          enable installation of generated headers
-
-1.6.11 (2019-05-23)
-
-        * Changed the bootstrap shebang from sh to bash to address a
-          bashism that arrived at 1.6.10.
-
-1.6.10 (2019-05-02)
-
-        * Added additional up-front checks to the bootstrap script to
-          ensure required executables are available.
-
-1.6.9 (2019-04-30)
-
-        * Now that both automake and pure make headers and footers are
-          co-mingled, address an issues in which the .DEFAULT_GOAL
-          specifications in the repos.mak footer were conflicting with
-          makefiles that wanted a different default goal by moving
-          those .DEFAULT_GOAL specifications to Makefile-bootstrap.
-
-1.6.8 (2019-04-29)
-
-        * Downgraded m4 from 1.4.17 to 1.4.5 since 1.4.5 seems to be the
-          last version of m4 that does not abort on invocation in the m4
-          *rintf and friends compatibility and portability library.
-
-        * Leverage both automake and pure make headers and footers by
-          including the latter in the former.
-
-        * Reworked how verbose progress is handled to simplify
-          specification of progress macros.
-
-        * Rebased several automake header macros implementations on their
-          pure make equivalents.
-
-1.6.7 (2019-04-26)
-
-        * Addressed issues with NL_FILTERED_CANONICAL in which the desired
-          content to be filtered was not filtering correctly and in which
-          the desired filtered canonical variables were not emitted in
-          makefiles.
-
-1.6.6 (2019-04-09)
-
-        * Added code coverage support for clang, which uses a link flag
-          --coverage instead of linking to a library(-lgov) as gcc does
-          for code coverage functions.
-
-1.6.5 (2018-11-19)
-
-        * Addressed an issue in which the failure to make the 'repos-warning'
-          target order-only caused dependent repo paths to be repeatedly
-          and unnecessarily remade which, in turn, caused git operations
-          and the configuration or build to fail.
-
-1.6.4 (2018-11-14)
-
-        * Added support for pulling down remote package dependencies using
-          git clone (default) or git submodule depending on the setting of
-          pull.method in repos.conf.
-
-1.6.3 (2018-10-19)
-
-        * Added support for coverage-local and check-local targets. Added
-          documentation for all coverage-related targets.
-
-1.6.2 (2018-10-09)
-
-        * Take a different approach to version flapping against 'make
-          distcheck' by leaving VERSION_FILE as an immediate (:=) variable
-          and instead creating a two-level <PACKAGE>_VERSION variable, the
-          first of which is set from VERSION_FILE by default at make
-          recursion level zero (0).
-
-1.6.1 (2018-09-26)
-
-        * Address an issue with VERSION_FILE on clean source code control
-          clones or unarchived distribution in which 'make dist' or
-          'make distcheck' fail. VERSION_FILE should be and is
-          intentionally a deferred (=) rather than an immediate (:=)
-          variable to ensure late evaluation AFTER .local-version MAY
-          be created rather than when the makefile containing it is
-          parsed.
-
-1.6.0 (2018-09-19)
-
-        * Added support to repos.conf for a 'commit' key such that a
-          hash or tag other than HEAD for a given repository and
-          branch may be synchronized and checked out.
-
-        * Made a minor change to the 'bootstrap' script such that it emits
-          the actual action commands that will be executed when the verbose
-          flag is asserted.
-
-1.5.3 (2018-09-14)
-
-        * Address a number of issues with building the prepackaged GNU
-          autotools subset included in nlbuild-autotools for Ubuntu
-          Bionic.
-
-          - Fixed "Unescaped left brace in regex is deprecated" that
-            was formerly a warning in Perl 5.22 and is now a hard error
-            in Perl 5.26.
-
-          - Address new glibc glob interface changes by upgrading from
-            make-3.82 to make-4.1 and applying relevant Ubuntu Bionic
-            patches.
-
-        * Add support to the package 'build' script to find and apply
-          patches for the above.
-
-1.5.2 (2018-04-26)
-
-        * Since the '--name-only' option only appears in git-2.6 and later
-          and there are production systems using git version as old as
-          git-1.9, do not use '--name-only' when processing 'repos.conf'.
-
-1.5.1 (2018-04-20)
-
-        * Addressed a number of typos and grammatical errors in comments
-          and help output.
-
-1.5.0 (2018-04-19)
-
-        * Added support for pulling down remote package dependencies
-          using git submodule.
-
-        * Addressed an issue in which nl_enable_coverage.m4 did not work
-          correctly on some Linux distributions by specifying coverage
-          libraries under LIBS rather than LDFLAGS.
-
-1.4.4 (2018-02-06)
-
-        * Addressed an issue where 'mkskeleton' failed while trying to
-          generate "third_party/Makefile.am".
-
-1.4.3 (2018-02-01)
-
-        * Addressed an issue with NL_{SAVE,RESTORE}_WERROR in which
-          -Werror=<specific> was not handled.
-
-1.4.2 (2017-06-20)
-
-	* Addressed an issue with the 'make coverage' target where certain
-	  make versions may have sensitivites to trailing slashes in order-
-	  only targets.
-
-1.4.1 (2017-06-19)
-
-	* Refactored m4 and autotools auxilliary files to ensure that 
-	  third-party content remains under third_party/....
-	* Addressed issues with generating distributions on Mac OS X 
-	  where GNU software, including wget, is not available in PATH.
-	* Addressed issue with missing files in MANIFEST.
-
-1.4 (2017-06-15)
-
-	* Remove package archives and prebuilt in-package binaries.
-	* Ensure that GNU tool build process is completely self-sufficient
-	  and has no dependencies on installed host binaries.	
-	* Add support for generating versioned core and prebuilt package binary
-	  distributions.
-	* Ensure that 'bootstrap' can work with either prebuilt in-package
-	  binaries or with installed host binaries.
-	
-1.3.1 (2017-05-10)
-
-	* Specify the correct m4 URL.
-
-1.3 (2016-12-05)
-
-	* Added the support for detection of supported C++ version.
-
-1.2.2 (2016-08-29)
-
-	* Use the arguments passed, as designed and intended, to
-	  NL_PROG_LNDIR rather than hard-coded values for the GNU cp
-	  fallback.
-
-1.2.1 (2016-07-13)
-
-	* Make the 'pretty' and 'pretty-check' targets dependent on
-	  $(PRETTY_FILES) and then iterate on a filtered version of $(^) so
-	  that make's VPATH engine can be leveraged to find sources and
-	  headers that are not in directly stat-able paths listed in
-	  $(PRETTY_FILES).
-
-1.2 (2016-06-01)
-
-	* Added support for coding style formatting and checking targets.
-
-1.1.2 (2016-03-19)
-
-	* Improve the code coverage generation process to cover an entire
-	  project's source.
-
-1.1.1 (2015-12-10)
-
-	* Properly handle package optionality when using pkg-config to
-	  detect external packages.
-
-1.1 (2015-11-10)
-
-	* Added support for a recursive 'install-headers' target to allow
-	  packages that wish to leverage it to install their public headers
-	  and only their public headers to DESTDIR on 'make install-headers'
-	  without performing any additional build actions.
-
-1.0.1 (2015-10-27)
-
-	* Refactored NL_WITH_PACKAGE into NL_WITH_REQUIRED_EXTERNAL_PACKAGE,
-	  NL_WITH_OPTIONAL_EXTERNAL_PACKAGE, NL_WITH_REQUIRED_INTERNAL_PACKAGE,
-	  and NL_WITH_OPTIONAL_INTERNAL_PACKAGE.
-
-1.0 (2015-03-19)
-
-        * Initial revision with GNU m4 1.4.17, autoconf 2.68, automake 1.14.1,
-          libtool 2.4.2, make 3.82, and coreutils 8.21.
diff --git a/third_party/nlbuild-autotools/repo/CONTRIBUTING.md b/third_party/nlbuild-autotools/repo/CONTRIBUTING.md
deleted file mode 100644
index 2827b7d..0000000
--- a/third_party/nlbuild-autotools/repo/CONTRIBUTING.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Want to contribute? Great! First, read this page (including the small print at the end).
-
-### Before you contribute
-Before we can use your code, you must sign the
-[Google Individual Contributor License Agreement]
-(https://cla.developers.google.com/about/google-individual)
-(CLA), which you can do online. The CLA is necessary mainly because you own the
-copyright to your changes, even after your contribution becomes part of our
-codebase, so we need your permission to use and distribute your code. We also
-need to be sure of various other things—for instance that you'll tell us if you
-know that your code infringes on other people's patents. You don't have to sign
-the CLA until after you've submitted your code for review and a member has
-approved it, but you must do it before we can put your code into our codebase.
-Before you start working on a larger contribution, you should get in touch with
-us first through the issue tracker with your idea so that we can help out and
-possibly guide you. Coordinating up front makes it much easier to avoid
-frustration later on.
-
-### Code reviews
-All submissions, including submissions by project members, require review. We
-use Github pull requests for this purpose.
-
-### The small print
-Contributions made by corporations are covered by a different agreement than
-the one above, the
-[Software Grant and Corporate Contributor License Agreement]
-(https://cla.developers.google.com/about/google-corporate).
diff --git a/third_party/nlbuild-autotools/repo/Common.mak b/third_party/nlbuild-autotools/repo/Common.mak
deleted file mode 100644
index fdfb29a..0000000
--- a/third_party/nlbuild-autotools/repo/Common.mak
+++ /dev/null
@@ -1,129 +0,0 @@
-#
-#    Copyright 2017 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This make file header defines common variables, rules, and
-#      targets for maintaining nlbuild-autotools distributions.
-#
-
-.DEFAULT_GOAL         = all
-
-#
-# This package
-#
-PACKAGE              := nlbuild-autotools
-
-#
-# Tools
-#
-CAT                  ?= cat
-CHMOD                ?= chmod
-CMP                  ?= cmp
-FIND                 ?= find
-GZIP                 ?= gzip
-MKDIR                ?= mkdir
-MV                   ?= mv
-RM                   ?= rm
-SED                  ?= sed
-TAR                  ?= tar
-XZ                   ?= xz
-
-dist_tar_ARCHIVE      = $(TAR) -chof -
-
-dist_tgz_ARCHIVE      = $(dist_tar_ARCHIVE)
-dist_tgz_COMPRESS     = $(GZIP) --best -c
-
-dist_txz_ARCHIVE      = $(dist_tar_ARCHIVE)
-dist_txz_COMPRESS     = $(XZ) --extreme -c
-
-TGZ_EXTENSION        := .tar.gz
-TXZ_EXTENSION        := .tar.xz
-
-DIST_TARGETS	     ?= dist-tgz dist-txz
-DIST_ARCHIVES         = $(dist_tgz_TARGETS) $(dist_txz_TARGETS)
-
-#
-# Verbosity
-#
-
-NL_DEFAULT_VERBOSITY  = 0
-
-NL_V_AT               = $(NL_V_AT_$(V))
-NL_V_AT_              = $(NL_V_AT_$(NL_DEFAULT_VERBOSITY))
-NL_V_AT_0             = @
-NL_V_AT_1             = 
-
-NL_V_MAKE             = $(NL_V_MAKE_$(V))
-NL_V_MAKE_            = $(NL_V_MAKE_$(NL_DEFAULT_VERBOSITY))
-NL_V_MAKE_0           = @echo "  MAKE     $(@)";
-NL_V_MAKE_1           = 
-
-NL_V_MKDIR_P          = $(NL_V_MKDIR_P_$(V))
-NL_V_MKDIR_P_         = $(NL_V_MKDIR_P_$(NL_DEFAULT_VERBOSITY))
-NL_V_MKDIR_P_0        = @echo "  MKDIR    $(1)";
-NL_V_MKDIR_P_1        = 
-
-NL_V_RMDIR            = $(NL_V_RMDIR_$(V))
-NL_V_RMDIR_           = $(NL_V_RMDIR_$(NL_DEFAULT_VERBOSITY))
-NL_V_RMDIR_0          = @echo "  RMDIR    $(1)";
-NL_V_RMDIR_1          = 
-
-NL_V_TGZ              = $(NL_V_TGZ_$(V))
-NL_V_TGZ_             = $(NL_V_TGZ_$(NL_DEFAULT_VERBOSITY))
-NL_V_TGZ_0            = @echo "  TGZ      $(@)";
-NL_V_TGZ_1            = 
-
-NL_V_TXZ              = $(NL_V_TXZ_$(V))
-NL_V_TXZ_             = $(NL_V_TXZ_$(NL_DEFAULT_VERBOSITY))
-NL_V_TXZ_0            = @echo "  TXZ      $(@)";
-NL_V_TXZ_1            = 
-
-#
-# nl-create-dir <directory>
-#
-# Create the specified directory, including any parent directories
-# that may not exist.
-#
-define nl-create-dir
-$(NL_V_AT)echo "  MKDIR    $(1)"; \
-$(MKDIR) -p "$(1)"
-endef # nl-create-dir
-
-#
-# nl-remove-dir <directory>
-#
-# If the specified directory exists, then ensure all of the
-# directories are writable by the current user, and then forcibly
-# remove the directory and all of its contents, sleeping for five (5)
-# seconds and failure before trying the removal again.
-#
-define nl-remove-dir
-$(NL_V_RMDIR) \
-if [ -d "$(1)" ]; then \
-    $(FIND) "$(1)" -type d ! -perm -200 -exec $(CHMOD) u+w {} ';' \
-    && $(RM) -rf "$(1)" \
-    || { sleep 5 && $(RM) -rf "$(1)"; }; \
-fi
-endef # nl-remove-dir
-
-clean-local:
-	$(NL_V_AT)$(RM) -f *~ "#"*
-
-help:
-	@echo "This make file shold not be needed for end users and system "
-	@echo "integrators of $(PACKAGE). It should only be needed by "
-	@echo "maintainers producing distributions of $(PACKAGE)."
diff --git a/third_party/nlbuild-autotools/repo/LICENSE b/third_party/nlbuild-autotools/repo/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/third_party/nlbuild-autotools/repo/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/third_party/nlbuild-autotools/repo/MANIFEST b/third_party/nlbuild-autotools/repo/MANIFEST
deleted file mode 100644
index eb87e88..0000000
--- a/third_party/nlbuild-autotools/repo/MANIFEST
+++ /dev/null
@@ -1,105 +0,0 @@
-.default-version
-.gitignore
-.travis.yml
-CHANGES
-Common.mak
-CONTRIBUTING.md
-LICENSE
-MANIFEST
-Makefile
-README.md
-autoconf/m4/ax_check_compiler.m4
-autoconf/m4/ax_check_file.m4
-autoconf/m4/ax_check_preprocessor.m4
-autoconf/m4/nl_enable_coverage.m4
-autoconf/m4/nl_enable_coverage_reporting.m4
-autoconf/m4/nl_enable_debug.m4
-autoconf/m4/nl_enable_docs.m4
-autoconf/m4/nl_enable_optimization.m4
-autoconf/m4/nl_enable_tests.m4
-autoconf/m4/nl_enable_werror.m4
-autoconf/m4/nl_filtered_canonical.m4
-autoconf/m4/nl_prog_lndir.m4
-autoconf/m4/nl_werror.m4
-autoconf/m4/nl_with_package.m4
-automake/post.am
-automake/post/rules.am
-automake/post/rules/coverage.am
-automake/post/rules/headers.am
-automake/post/rules/pretty.am
-automake/pre.am
-automake/pre/macros.am
-automake/pre/macros/constants.am
-automake/pre/macros/coverage.am
-automake/pre/macros/paths.am
-automake/pre/macros/pretty.am
-automake/pre/macros/subdirs.am
-automake/pre/macros/verbosity.am
-etc/lcov.config
-examples/Doxyfile.in
-examples/Makefile-bootstrap
-examples/Makefile-doc.am
-examples/Makefile-src.am
-examples/Makefile-tests.am
-examples/Makefile-third_party.am
-examples/Makefile-toplevel.am
-examples/bootstrap
-examples/configure.ac
-examples/repos.conf
-make/host/tools.mak
-make/host/tools/bootstrap.mak
-make/host/tools/tools.mak
-make/post.mak
-make/post/rules.mak
-make/post/rules/bootstrap.mak
-make/post/rules/help.mak
-make/post/rules/repos.mak
-make/pre.mak
-make/pre/macros.mak
-make/pre/macros/git.mak
-make/pre/macros/repos.mak
-make/pre/macros/verbosity.mak
-make/pre/tools.mak
-scripts/bootstrap
-scripts/bootstrap-configure
-scripts/mkskeleton
-scripts/mkversion
-third_party/autoconf/ar-lib
-third_party/autoconf/compile
-third_party/autoconf/config.guess
-third_party/autoconf/config.sub
-third_party/autoconf/depcomp
-third_party/autoconf/install-sh
-third_party/autoconf/ltmain.sh
-third_party/autoconf/m4/ax_compare_version.m4
-third_party/autoconf/m4/ax_cxx_compile_stdcxx.m4
-third_party/autoconf/m4/ax_cxx_compile_stdcxx_0x.m4
-third_party/autoconf/m4/ax_cxx_compile_stdcxx_11.m4
-third_party/autoconf/m4/ax_cxx_compile_stdcxx_14.m4
-third_party/autoconf/m4/ax_jni_include_dir.m4
-third_party/autoconf/m4/ax_prog_doxygen.m4
-third_party/autoconf/m4/ax_pthread.m4
-third_party/autoconf/m4/pkg.m4
-third_party/autoconf/missing
-third_party/autoconf/mkinstalldirs
-third_party/autoconf/py-compile
-third_party/autoconf/test-driver
-tools/Makefile
-tools/packages/autoconf/autoconf.url
-tools/packages/autoconf/autoconf.version
-tools/packages/automake/automake.patches/automake-00.description
-tools/packages/automake/automake.patches/automake-00.patch
-tools/packages/automake/automake.url
-tools/packages/automake/automake.version
-tools/packages/build
-tools/packages/coreutils/coreutils.url
-tools/packages/coreutils/coreutils.version
-tools/packages/libtool/libtool.url
-tools/packages/libtool/libtool.version
-tools/packages/m4/m4.url
-tools/packages/m4/m4.version
-tools/packages/make/make.patches/make-00.patch
-tools/packages/make/make.patches/make-00.url
-tools/packages/make/make.url
-tools/packages/make/make.version
-tools/packages/packages
diff --git a/third_party/nlbuild-autotools/repo/Makefile b/third_party/nlbuild-autotools/repo/Makefile
deleted file mode 100644
index 19ab6c7..0000000
--- a/third_party/nlbuild-autotools/repo/Makefile
+++ /dev/null
@@ -1,241 +0,0 @@
-#
-#    Copyright (c) 2017-2018 Nest Labs Inc. All Rights Reserved.
-#    Copyright (c) 2018 Google LLC. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This make file supports generating distributions of
-#      nlbuild-autotools.
-#
-
-include Common.mak
-
-#
-# Build directories
-#
-
-builddir         := .
-top_builddir     := .
-abs_builddir     := $(CURDIR)
-abs_top_builddir := $(CURDIR)
-
-#
-# Source directories
-#
-
-srcdir           := .
-top_srcdir       := .
-abs_srcdir       := $(CURDIR)
-abs_top_srcdir   := $(CURDIR)
-
-distdir           = $(PACKAGE)-$(VERSION)
-
-dist_tgz_TARGETS  = $(distdir)$(TGZ_EXTENSION)
-dist_txz_TARGETS  = $(distdir)$(TXZ_EXTENSION)
-
-DISTFILES        := $(shell $(CAT) MANIFEST)
-
-#
-# Package version files:
-#
-# .default-version - The default package version. This file is ALWAYS checked
-#                    in and should always represent the current baseline
-#                    version of the package.
-#
-# .dist-version    - The distributed package version. This file is NEVER
-#                    checked in within the upstream repository, is auto-
-#                    generated, and is only found in the package distribution.
-#
-# .local-version   - The current source code controlled package version. This
-#                    file is NEVER checked in within the upstream repository,
-#                    is auto-generated, and can always be found in both the
-#                    build tree and distribution.
-#
-# When present, the .local-version file is preferred first, the
-# .dist-version second, and the .default-version last.
-#
-
-# VERSION_FILE should be and is intentionally an immediate (:=) rather
-# than a deferred (=) variable to ensure the value binds once and only once
-# for a given MAKELEVEL even as .local-version and .dist-version are created
-# during makefile execution.
-
-VERSION_FILE                      := $(if $(wildcard $(builddir)/.local-version),$(builddir)/.local-version,$(if $(wildcard $(srcdir)/.dist-version),$(srcdir)/.dist-version,$(srcdir)/.default-version))
-
-#
-# The two-level variables and the check against MAKELEVEL ensures that
-# not only can the package version be overridden from the command line
-# but also when the version is NOT overridden that we bind the version
-# once and only once across potential sub-makes to prevent the version
-# from flapping as VERSION_FILE changes.
-#
-
-export MAYBE_PACKAGE_VERSION      := $(if $(filter 0,$(MAKELEVEL)),$(shell cat $(VERSION_FILE) 2> /dev/null),$(MAYBE_PACKAGE_VERSION))
-
-PACKAGE_VERSION                   ?= $(MAYBE_PACKAGE_VERSION)
-
-VERSION                            = $(PACKAGE_VERSION)
-
-#
-# Verbosity
-#
-_NL_V_COPY                         = $(_NL_V_COPY_$(V))
-_NL_V_COPY_                        = $(_NL_V_COPY_$(NL_DEFAULT_VERBOSITY))
-_NL_V_COPY_0                       = @for file in $(DISTFILES); do echo "  COPY     $${file}"; done;
-_NL_V_COPY_1                       = 
-
-_NL_V_MAKE                         = $(_NL_V_MAKE_$(V))
-_NL_V_MAKE_                        = $(_NL_V_MAKE_$(NL_DEFAULT_VERBOSITY))
-_NL_V_MAKE_0                       = @echo "  MAKE     dist-hook";
-_NL_V_MAKE_1                       = 
-
-#
-# check-file <macro suffix>
-#
-# Check whether a file, referenced by the $(@) variable, should be
-# updated / regenerated based on its dependencies, referenced by the
-# $(<) variable by running the make macro check-file-<macro suffix>.
-#
-# The $(<) is passed as the first argument if the macro wants to process
-# it and the prospective new output file, which the macro MUST
-# generate, as the second.
-#
-# This macro will ensure that any required parent directories are created
-# prior to invoking check-file-<macro suffix>.
-#
-# This macro is similar to and inspired by that from Linux Kbuild and
-# elsewhere.
-#
-#   <macro suffix> - The name, suffixed to "check-file-", which indicates
-#                    the make macro to invoke.
-#
-#
-define check-file
-$(NL_V_AT)set -e;                                   \
-echo '  CHECK    $(@)';                             \
-$(MKDIR) -p $(dir $(@));                            \
-$(call check-file-$(1),$(<),$(@).N);                \
-if [ -r "$(@)" ] && $(CMP) -s "$(@)" "$(@).N"; then \
-    $(RM) -f "$(@).N";                              \
-else                                                \
-    echo '  GEN      $(@)';                         \
-    $(MV) -f "$(@).N" "$(@)";                       \
-fi
-endef # check-file
-
-#
-# check-file-.local-version
-#
-# Speculatively regenerate .local-version and check to see if it needs
-# to be updated.
-#
-# If PACKAGE_VERSION has been supplied anywhere other than in this file
-# (which is implicitly the contents of .local-version), then use that;
-# otherwise, attempt to generate it from the SCM system.
-#
-# This is called from $(call check-file,.local-version).
-#
-define check-file-.local-version
-if [ "$(origin PACKAGE_VERSION)" != "file" ]; then     \
-    echo "$(PACKAGE_VERSION)" > "$(2)";                \
-else                                                   \
-    $(abs_top_srcdir)/scripts/mkversion                \
-        -b "$(PACKAGE_VERSION)" "$(top_srcdir)"        \
-        > "$(2)";                                      \
-fi
-endef
-
-#
-# check-file-.dist-version
-#
-# Speculatively regenerate .dist-version and check to see if it needs
-# to be updated.
-#
-# This is called from $(call check-file,.dist-version).
-#
-define check-file-.dist-version
-$(CAT) "$(1)" > "$(2)"
-endef
-
-#
-# Version file regeneration rules.
-#
-.PHONY: force
-
-$(builddir)/.local-version: $(srcdir)/.default-version force
-
-$(distdir)/.dist-version: $(builddir)/.local-version force
-
-$(distdir)/.dist-version $(builddir)/.local-version:
-	$(call check-file,$(@F))
-
-all: .local-version
-
-dist-hook: $(distdir)/.dist-version
-
-#
-# Stage the distribution files to a distribution directory
-#
-stage: $(DISTFILES) .local-version
-	$(call nl-remove-dir,$(distdir))
-	$(call nl-create-dir,$(distdir))
-	$(_NL_V_MAKE)$(MAKE) -s distdir="$(distdir)" dist-hook
-	$(_NL_V_COPY)(cd $(abs_top_srcdir); $(dist_tar_ARCHIVE) $(DISTFILES) | (cd $(abs_builddir)/$(distdir); $(TAR) xfBp -))
-
-#
-# Produce an architecture-independent distribution using a tar archive
-# with gzip compression
-#
-$(dist_tgz_TARGETS): stage
-	$(NL_V_TGZ)$(dist_tgz_ARCHIVE) $(distdir) | $(dist_tgz_COMPRESS) > "$(@)"
-
-#
-# Produce an architecture-independent distribution using a tar archive
-# with xz compression
-#
-$(dist_txz_TARGETS): stage
-	$(NL_V_TXZ)$(dist_txz_ARCHIVE) $(distdir) | $(dist_txz_COMPRESS) > "$(@)"
-
-#
-# Produce an architecture-independent distribution of the
-# nlbuild-autotools core.
-#
-dist: $(DIST_TARGETS) .local-version
-	$(call nl-remove-dir,$(distdir))
-
-dist-tgz: $(dist_tgz_TARGETS)
-
-dist-txz: $(dist_txz_TARGETS)
-
-#
-# Produce prebuilt GNU autotools binaries for the architecture of the
-# CURRENT build machine and install them in THIS nlbuild-autotools
-# package.
-#
-.PHONY: tools
-tools:
-	$(NL_V_MAKE)$(MAKE) -C tools $(@)
-
-#
-# Produce prebuilt GNU autotools architecture-dependent and -independent
-# binaries for the architecture of the CURRENT build machine and PACKAGE
-# them up for EXTERNAL distribution.
-#
-toolsdist: .local-version
-	$(NL_V_MAKE)$(MAKE) -C tools $(@)
-
-clean: clean-local
-	$(NL_V_MAKE)$(MAKE) -C tools $(@)
diff --git a/third_party/nlbuild-autotools/repo/README.md b/third_party/nlbuild-autotools/repo/README.md
deleted file mode 100644
index 9d1891d..0000000
--- a/third_party/nlbuild-autotools/repo/README.md
+++ /dev/null
@@ -1,340 +0,0 @@
-Nest Labs Build - GNU Autotools
-===============================
-
-[![Build Status][nlbuild-autotools-travis-svg]][nlbuild-autotools-travis]
-
-[nlbuild-autotools-travis]: https://travis-ci.org/nestlabs/nlbuild-autotools
-[nlbuild-autotools-travis-svg]: https://travis-ci.org/nestlabs/nlbuild-autotools.svg?branch=master
-
-# Introduction
-
-The Nest Labs Build - GNU Autotools (nlbuild-autotools) provides a
-customized, turnkey build system framework, based on GNU autotools, for
-standalone Nest Labs (or other) software packages that need to support
-not only building on and targeting against standalone build host
-systems but also embedded target systems using GCC-based or
--compatible toolchains.
-
-In addition, nlbuild-autotools endeavors to make it easy to support:
-
-  * Unit and Functional Tests (via 'make check')
-  * Code Coverage (via 'make coverage')
-  * Code Formatting (via 'make pretty' or 'make pretty-check')
-  * Documentation
-  * Distribution Generation (via 'make dist' or 'make docdist')
-
-# Users and System Integrators
-
-## Getting Started
-
-This project is typically subtreed (or git submoduled) into a target
-project repository and serves as the seed for that project's build
-system.
-
-Assuming that you already have a project repository established in
-git, perform the following in your project repository:
-
-```
-1. % git remote add nlbuild-autotools ssh://<PATH_TO_REPOSITORY>/nlbuild-autotools.git
-2. % git fetch nlbuild-autotools
-```
-
-You can place the nlbuild-autotools package anywhere in your project;
-however, by convention, "third_party/nlbuild-autotools/repo" is recommended:
-
-```
-3. % mkdir third_party
-4. % git subtree add --prefix=third_party/nlbuild-autotools/repo --squash --message="Add subtree mirror of repository 'ssh://<PATH_TO_REPOSITORY>/nlbuild-autotools.git' branch 'master' at commit 'HEAD'." nlbuild-autotools HEAD
-```
-
-At this point, you now have the nlbuild-autotools package integrated
-into your project. The next step is using the
-nlbuild-autotools-provided examples as templates. To do this, a
-convenience script has been provided that will get you started. You
-can tune and customize the results, as needed, for your project. From
-the top level of your project tree:
-
-```
-5. % third_party/nlbuild-autotools/repo/scripts/mkskeleton -I third_party/nlbuild-autotools/repo --package-description "My Fantastic Package" --package-name "mfp"
-```
-
-## Supported Build Host Systems
-
-For Linux users, you likely already have GNU autotools installed through your system's distribution (e.g. Ubuntu). However, if your GNU autotools packages are incomplete or downrevision relative to what's required from nlbuild-autotools, nlbuild-autotools can be built and installed or can be downloaded and expanded in your local nlbuild-autotools tree.
-
-The nlbuild-autotools system supports and has been tested against the
-following POSIX-based build host systems:
-
-  * i686-pc-cygwin
-  * i686-pc-linux-gnu
-  * x86_64-apple-darwin
-  * x86_64-unknown-linux-gnu
-
-### Build and Install {#Build_and_Install}
-
-Simply invoke `make tools` at the top-level of your nlbuild-autotools
-tree or, for example, from your package or project in which you have
-integrated nlbuild-autotools:
-
-```
-make -C third_party/nlbuild-autotools/repo tools
-```
-
-### Download and Expand
-
-Alongside nlbuild-autotools distributions are pre-built
-architecture-independent and -dependent distributions of the form:
-
-  * nlbuild-autotools-common-_version_.tar.{gz,xz}
-  * nlbuild-autotools-_host_-_version_.tar.{gz,xz}
-
-Find and download the appropriate pair of nlbuild-autotools-common and
-nlbuild-autotools-_host_ for your system and then expand them from the
-top-level of your nlbuild-autotools tree with a command similar to the
-following example:
-
-```
-% tar --directory tools/host -zxvf nlbuild-autotools-common-1.1.tar.gz
-% tar --directory tools/host -zxvf nlbuild-autotools-x86_64-unknown-linux-gnu-1.1.tar.gz
-```
-
-Please see the [FAQ](#FAQ) section for more background on why this package
-provides options for these pre-built tools.
-
-## Package Organization
-
-The nlbuild-autotools package is laid out as follows:
-
-| Directory                            | Description                                                                              |
-|--------------------------------------|------------------------------------------------------------------------------------------|
-| autoconf/                            | GNU autoconf infrastructure provided by nlbuild-autotools.                               |
-| autoconf/m4/                         | GNU m4 macros for configure.ac provided by nlbuild-autotools.                            |
-| automake/                            | GNU automake Makefile.am header and footer infrastructure provided by nlbuild-autotools. |
-| automake/post/                       | GNU automake Makefile.am footers.                                                        |
-| automake/post.am                     | GNU automake Makefile.am footer included by every makefile.                              |
-| automake/pre/                        | GNU automake Makefile.am headers.                                                        |
-| automake/pre.am                      | GNU automake Makefile.am header included by every makefile.                              |
-| examples/                            | Example template files for starting your own nlbuild-autotools-based project.            |
-| scripts/                             | Automation scripts for regenerating the build system and for managing package versions.  |
-| tools/                               | Qualified packages of and pre-built instances of GNU autotools.                          |
-| tools/host/                          | Pre-built instances of GNU autotools (if installed).                                     |
-| tools/host/i686-pc-cygwin/           | Pre-built instances of GNU autotools for 32-bit Cygwin (if installed).                   |
-| tools/host/i686-pc-linux-gnu/        | Pre-built instances of GNU autotools for 32-bit Linux (if installed).                    |
-| tools/host/x86_64-apple-darwin/      | Pre-built instances of GNU autotools for 64-bit Mac OS X (if installed).                 |
-| tools/host/x86_64-unknown-linux-gnu/ | Pre-built instances of GNU autotools for 64-bit Linux (if installed).                    |
-| tools/packages/                      | Qualified packages for GNU autotools.                                                    |
-## Internal Package Dependencies and Repositories
-
-Your package may have dependencies on other packages that can either
-be inlined into your package or can be specified externally. If your
-package has such dependencies, nlbuild-autotools contains support to
-facilitate easy standalone tests and a successful 'make distcheck'
-target (which effectively reqires 'configure' with no arguments to
-produce a successful build) without incurring the costs of inlining
-these dependencies into your own package.
-
-nlbuild-autotools supports this by providing a means to pull down
-external git package repositories that your package depends on using
-either git clone (default) or git submodules when you use and support
---with-<package>=internal as a location for your dependent packages.
-
-The example 'Makefile-bootstrap' has been provided as infrastructure to
-make this easy for you as a package maintainer and for your package
-users. The bootstrap makefile supports both the generic 'repos' target
-to pull down all repositories on which your project depends as well as
-relative path targets to where those repositories might live in your
-project when they are internal (e.g,
-third_party/package/repo).
-
-Consequently, you can, for example, invoke:
-
-```
-% make -f Makefile-bootstrap repos
-```
-
-or
-
-```
-% make -f Makefile-bootstrap third_party/package/repo
-```
-
-to pull down all repositories or just the repository, for example,
-placed at 'third_party/package/repos'.
-
-The bootstrap makefile generated for your package is yours to edit and
-extend. In fact, hooks have been added so that you can do
-package-specific work, including recursively pulling down repositories
-for other packages.
-
-However, an even better and easier approach for your package users is
-to integrate the bootstrap makefile repository process into your
-configure script such that when an "internal" package location is
-detected, it invokes the bootstrap makefile to perform this work on
-behalf of the user. For example:
-
-```
-# Depending on whether my-package has been configured for an internal
-# location, its directory stem within this package needs to be set
-# accordingly. In addition, if the location is internal, then we need
-# to attempt to pull it down using the bootstrap makefile.
-
-if test "${nl_with_my_package}" = "internal"; then
-    maybe_my_package_dirstem="my-package/repo"
-    my_package_dirstem="third_party/${maybe_my_package_dirstem}"
-
-    AC_MSG_NOTICE([attempting to create internal ${my_package_dirstem}]) 
-    ${MAKE-make} --no-print-directory -C ${ac_confdir} -f Makefile-bootstrap ${my_package_dirstem}
-
-    if test $? -ne 0; then
-        AC_MSG_ERROR([failed to create ${my_package_dirstem}. Please check your network connection or the correctness of 'repos.conf'])
-    fi
-else
-    maybe_my_package_dirstem=""
-fi
-
-AC_SUBST(MY_PACKAGE_SUBDIRS, [${maybe_my_package_dirstem}])
-AM_CONDITIONAL([PACKAGE_WITH_MY_PACKAGE_INTERNAL], [test "${nl_with_my_package}" = "internal"])
-```
-
-Note, the use of AC_SUBST on MY_PACKAGE_SUBDIRS to provide a mechanism
-to conditionally populate SUBDIRS in the appropriate automake file
-locations such that GNU autoconf does not generate syntax errors about
-the potential absence of the subdirectory at bootstrap time.
-
-Of course, in either case, network connectivity is required to reach
-the external git server hosting the packages on which your project
-depends.
-
-In addition to the 'repos' target, the bootstrap makefile also
-supports the 'clean-repos' target that undoes the work of the 'repos'
-target. When using either the 'clone' or 'submodule' pull methods, it
-will clean-up all of the synchronized repositories. When using the
-'submodule' pull method, it also is careful to ensure it does not
-disturb existing git or git submodule state your project might be
-using.
-
-The infrastructure all works, of course, whether you are working in or
-out of git and whether you have colocated or non-colocated source and
-build directories.
-
-### Configuration
-
-This dependent repository feature of nlbuild-autotools uses a file,
-'repos.conf', at the top level of your project source directory to
-determine what external project repositories your package might want
-to pull down, the location of their git server, the branch you want to
-pull, and the location in your project in which you want to place
-them.
-
-The format of 'repos.conf' _almost_ precisely follows that used by git
-submodules with two notable additions, the 'pull' section and the
-'commit' key. The 'pull' section allows you to optionally specify the
-'method' key as 'clone' or 'submodule' (defaulting to 'clone' when the
-key is not present). This selects whether 'git clone' or 'git
-submodule' is used to pull down repositories. The 'commit' key allows
-you to specify not only what branch to checkout but, more precisely,
-what commit or tag to checkout rather than just _HEAD_ of a
-branch. More information is available in 'Makefile-bootstrap' or with
-`man gitmodules` or `git help gitmodules`.
-
-# FAQ {#FAQ}
-
-Q: Why does nlbuild-autotools have an option for its own built versions
-   of GNU autotools rather than leveraging whatever versions exist on
-   the build host system?
-
-A: Some build host systems such as Mac OS X may not have GNU autotools
-   at all. Other build host systems, such as Linux, may have different
-   distributions or different versions of those distributions in which
-   the versions of GNU autotools are apt to be different.
-
-   This differences lead to different primary and secondary autotools
-   output and, as a consequence, a divergent user and support
-   experience. To avoid this, this package provides a pre-built,
-   qualified set of GNU autotools along with a comprehensive,
-   standalone set of scripts to drive them without reliance on those
-   versions of the tools on the build host system.
-
-Q: When I rebootstrap my package, I see that a number of files related to
-   nlbuild-autotools have unexpectedly changed. Why is this happening?
-
-A: From time to time, the packages that comprise GNU autotools change
-   upstream. Frequently, common host operating systems (e.g., Ubuntu) take
-   a stable snapshot of the current autotools for a major release (e.g.,
-   Ubuntu 14). On the next major release (e.g., Ubuntu 16), another snapshot
-   is taken.
-
-   If your package was first bootstrapped with one version of
-   autotools and those bootstrap-generated files checked-in but you
-   later bootstrap with another version of autotools, then you will
-   likely observe this behavior.
-
-   There are two solutions to this problem. First, to ensure a
-   consistent set of bootstrap-generated files, you can build the
-   autotools included with nlbuild-autotools. The bootstrap process
-   will always prefer to use those versions rather than those
-   available on the build host when they are available. See the
-   section [Build and Install](#Build_and_Install) for more
-   information.
-
-   The second way to ensure a consistent set of bootstrap-generated
-   files is to not check them in. This does, however, require that
-   package users, rather than package maintainers, perform the
-   bootstrap process and does require that package users, rather than
-   package maintainers, have autotools available on the build host.
-
-## Maintainers
-
-If you are maintaining nlbuild-autotools, you have several key things to know:
-
-1. Generating nlbuild-autotools distributions
-2. Generating optional nlbuild-autotools prebuilt binary distributions.
-3. Upgrading GNU autotools packages.
-
-### Generating Distributions
-
-To generate a nlbuild-autotools distribution, simply invoke:
-
-```
-% make dist
-```
-
-The package version will come from tags in the source code control
-system, if available; otherwise, from '.default-version'. The version
-can be overridden from the PACKAGE_VERSION or VERSION environment
-variables.
-
-The resulting archive will be at the top of the package build
-directory.
-
-### Generating Optional Prebuilt Binary Distributions
-
-To generate an optional nlbuild-autotools prebuilt binary
-distribution, simply invoke:
-
-```
-% make toolsdist
-```
-
-The package version will come from the source code control system, if
-available; otherwise, from `.default-version`. The version can be
-overridden from the _PACKAGE_VERSION_ or _VERSION_ environment variables.
-
-The resulting archives will be at the top of the package build
-directory.
-
-### Upgrading GNU Autotools Packages
-
-To change or upgrade GNU autotools packages used by nlbuild-autotools,
-edit the metadata for each package in tools/packages/_package_/
-_package_.{url,version}.
-
-# Versioning
-
-nlbuild-autools follows the [Semantic Versioning guidelines](http://semver.org/) 
-for release cycle transparency and to maintain backwards compatibility.
-
-# License
-
-nlbuild-autools is released under the [Apache License, Version 2.0 license](https://opensource.org/licenses/Apache-2.0). 
-See the `LICENSE` file for more information.
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_compiler.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_compiler.m4
deleted file mode 100644
index 701ebff..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_compiler.m4
+++ /dev/null
@@ -1,108 +0,0 @@
-#
-#    Copyright 2014-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-# _AX_CHECK_COMPILER_OPTION_WITH_VAR(language, variable, option)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   variable - The variable to add the checked compiler option to.
-#   option   - The compiler flag to check.
-#
-# Add, if supported, the specified compiler flag for the compiler selected
-# for the specified language to the provided variable.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_AX_CHECK_COMPILER_OPTION_WITH_VAR],
-[
-    AC_LANG_PUSH($1)
-    AC_MSG_CHECKING([whether the _AC_LANG compiler understands $3])
-    SAVE_[]_AC_LANG_PREFIX[]FLAGS=${_AC_LANG_PREFIX[]FLAGS}
-    SAVE_$2=${$2}
-    _AC_LANG_PREFIX[]FLAGS=$3
-    AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); _AC_LANG_PREFIX[]FLAGS="${SAVE_[]_AC_LANG_PREFIX[]FLAGS}"; $2="${SAVE_$2} $3",AC_MSG_RESULT([no]); _AC_LANG_PREFIX[]FLAGS=${SAVE_[]_AC_LANG_PREFIX[]FLAGS}; $2=${SAVE_$2});
-    unset SAVE_[]_AC_LANG_PREFIX[]FLAGS
-    unset SAVE_$2
-    AC_LANG_POP($1)
-])
-
-#
-# _AX_CHECK_COMPILER_OPTION(language, option)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   option   - The compiler flag to check.
-#
-# Add, if supported, the specified compiler flag for the compiler selected
-# for the specified language.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_AX_CHECK_COMPILER_OPTION],
-[
-    AC_LANG_PUSH($1)
-    AC_MSG_CHECKING([whether the _AC_LANG compiler understands $2])
-    SAVE_[]_AC_LANG_PREFIX[]FLAGS=${_AC_LANG_PREFIX[]FLAGS}
-    _AC_LANG_PREFIX[]FLAGS=$2
-    AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); _AC_LANG_PREFIX[]FLAGS="${SAVE_[]_AC_LANG_PREFIX[]FLAGS} $2",AC_MSG_RESULT([no]); _AC_LANG_PREFIX[]FLAGS=${SAVE_[]_AC_LANG_PREFIX[]FLAGS});
-    unset SAVE_[]_AC_LANG_PREFIX[]FLAGS
-    AC_LANG_POP($1)
-])
-
-#
-# AX_CHECK_COMPILER_OPTION(language, [variable,] option)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   variable - If supplied, the variable to add the checked compiler option
-#              to.
-#   option   - The compiler flag to check.
-#
-# Add, if supported, the specified compiler flag for the compiler selected
-# for the specified language, optionally saving it to the specified variable.
-# ----------------------------------------------------------------------------
-AC_DEFUN([AX_CHECK_COMPILER_OPTION],
-[
-    ifelse($#,
-        3,
-        [_AX_CHECK_COMPILER_OPTION_WITH_VAR($1, $2, $3)],
-        [_AX_CHECK_COMPILER_OPTION($1, $2)])
-])
-
-#
-# AX_CHECK_COMPILER_OPTIONS(language, [variable,] option ...)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   variable - If supplied, the variable to add the checked compiler option
-#              to.
-#   options  - The compiler flags to check.
-#
-# Add, if supported, the specified compiler flags for the compiler selected
-# for the specified language, optionally saving it to the specified variable.
-# ----------------------------------------------------------------------------
-AC_DEFUN([AX_CHECK_COMPILER_OPTIONS],
-[
-    ifelse($#,
-        3,
-        [
-            for ax_compiler_option in [$3]; do
-                _AX_CHECK_COMPILER_OPTION_WITH_VAR([$1], [$2], $ax_compiler_option)
-            done
-	],
-        [
-            for ax_compiler_option in [$2]; do
-                _AX_CHECK_COMPILER_OPTION([$1], $ax_compiler_option)
-            done
-	])
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_file.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_file.m4
deleted file mode 100644
index ccb7048..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_file.m4
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-#    Copyright 2014-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file implements a GNU M4 autoconf macro for checking for
-#      the existence of files.
-#
-#      The autoconf version of AC_CHECK_FILE is absolutely broken in
-#      that it cannot check for files when cross-compiling even though
-#      the only thing it relies upon is a shell file readability
-#      check.
-#
-
-# AX_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# -------------------------------------------------------------
-#
-# Check for the existence of FILE.
-AC_DEFUN([AX_CHECK_FILE],
-[AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
-AC_CACHE_CHECK([for $1], [ac_File],
-[if test -r "$1"; then
-  AS_VAR_SET([ac_File], [yes])
-else
-  AS_VAR_SET([ac_File], [no])
-fi])
-AS_VAR_IF([ac_File], [yes], [$2], [$3])
-AS_VAR_POPDEF([ac_File])dnl
-])# AX_CHECK_FILE
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_preprocessor.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_preprocessor.m4
deleted file mode 100644
index 88fac92..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/ax_check_preprocessor.m4
+++ /dev/null
@@ -1,116 +0,0 @@
-#
-#    Copyright 2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a number of GNU autoconf M4-style macros
-#      for checking language-specific preprocessor options.
-#
-
-#
-# _AX_CHECK_PREPROCESSOR_OPTION_WITH_VAR(language, variable, option)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   variable - The variable to add the checked preprocessor option to.
-#   option   - The preprocessor flag to check.
-#
-# Add, if supported, the specified preprocessor flag for the preprocessor
-# selected for the specified language to the provided variable.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_AX_CHECK_PREPROCESSOR_OPTION_WITH_VAR],
-[
-    AC_LANG_PUSH($1)
-    AC_MSG_CHECKING([whether the _AC_LANG preprocessor understands $3])
-    SAVE_CPPFLAGS=${CPPFLAGS}
-    SAVE_$2=${$2}
-    CPPFLAGS=$3
-    AC_TRY_CPP(,AC_MSG_RESULT([yes]); CPPFLAGS="${SAVE_CPPFLAGS}"; $2="${SAVE_$2} $3",AC_MSG_RESULT([no]); CPPFLAGS=${SAVE_CPPFLAGS}; $2=${SAVE_$2});
-    unset SAVE_CPPFLAGS
-    unset SAVE_$2
-    AC_LANG_POP($1)
-])
-
-#
-# _AX_CHECK_PREPROCESSOR_OPTION(language, option)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   option   - The preprocessor flag to check.
-#
-# Add, if supported, the specified preprocessor flag for the preprocessor
-# selected for the specified language.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_AX_CHECK_PREPROCESSOR_OPTION],
-[
-    AC_LANG_PUSH($1)
-    AC_MSG_CHECKING([whether the _AC_LANG preprocessor understands $2])
-    SAVE_CPPFLAGS=${CPPFLAGS}
-    CPPFLAGS=$2
-    AC_TRY_CPP(,AC_MSG_RESULT([yes]); CPPFLAGS="${SAVE_CPPFLAGS} $2",AC_MSG_RESULT([no]); CPPFLAGS=${SAVE_CPPFLAGS});
-    unset SAVE_CPPFLAGS
-    AC_LANG_POP($1)
-])
-
-#
-# AX_CHECK_PREPROCESSOR_OPTION(language, [variable,] option)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   variable - If supplied, the variable to add the checked preprocessor option
-#              to.
-#   option   - The preprocessor flag to check.
-#
-# Add, if supported, the specified preprocessor flag for the preprocessor
-# selected for the specified language, optionally saving it to the specified
-# variable.
-# ----------------------------------------------------------------------------
-AC_DEFUN([AX_CHECK_PREPROCESSOR_OPTION],
-[
-    ifelse($#,
-        3,
-        [_AX_CHECK_PREPROCESSOR_OPTION_WITH_VAR($1, $2, $3)],
-        [_AX_CHECK_PREPROCESSOR_OPTION($1, $2)])
-])
-
-#
-# AX_CHECK_PREPROCESSOR_OPTIONS(language, [variable,] option ...)
-#
-#   language - The autoconf language (C, C++, Objective C, Objective C++,
-#              etc.).
-#   variable - If supplied, the variable to add the checked preprocessor option
-#              to.
-#   options  - The preprocessor flags to check.
-#
-# Add, if supported, the specified preprocessor flags for the preprocessor
-# selected for the specified language, optionally saving it to the specified
-# variable.
-# ----------------------------------------------------------------------------
-AC_DEFUN([AX_CHECK_PREPROCESSOR_OPTIONS],
-[
-    ifelse($#,
-        3,
-        [
-            for ax_preprocessor_option in [$3]; do
-                _AX_CHECK_PREPROCESSOR_OPTION_WITH_VAR([$1], [$2], $ax_preprocessor_option)
-            done
-	],
-        [
-            for ax_preprocessor_option in [$2]; do
-                _AX_CHECK_PREPROCESSOR_OPTION([$1], $ax_preprocessor_option)
-            done
-	])
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage.m4
deleted file mode 100644
index 7a62a53..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage.m4
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro that adds an
-#      --enable-coverage configuration option to the package and
-#      controls whether the package will be built for code coverage.
-#
-
-#
-# NL_ENABLE_COVERAGE(default)
-#
-#   default - Whether the option should be enabled (yes) or disabled (no)
-#             by default.
-#
-# Adds an --enable-coverage configuration option to the package with a
-# default value of 'default' (should be either 'no' or 'yes') and controls
-# whether the package will be built with or without code coverage.
-#
-# The value 'nl_cv_build_coverage' will be set to the result. In
-# addition, NL_COVERAGE_CPPFLAGS and NL_COVERAGE_LIBS will be set
-# to the appropriate values to pass to the compiler and linker,
-# respectively.
-#
-# NOTE: This is only supported at present for GCC or GCC-compatible
-#       toolchains.
-#
-# NOTE: The behavior of this is influenced by nl_cv_build_optimized from
-#       NL_DISABLE_OPTIMIZATION
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_ENABLE_COVERAGE],
-[
-    # Check whether or not a default value has been passed in.
-
-    m4_case([$1],
-        [yes],[],
-        [no],[],
-        [m4_fatal([$0: invalid default value '$1'; must be 'yes' or 'no'])])
-
-    AC_CACHE_CHECK([whether to build code-coverage instances of programs and libraries],
-        nl_cv_build_coverage,
-        [
-            AC_ARG_ENABLE(coverage,
-                [AS_HELP_STRING([--enable-coverage],[Enable the generation of code-coverage instances @<:@default=$1@:>@.])],
-                [
-                    case "${enableval}" in
-
-                    no|yes)
-                        nl_cv_build_coverage=${enableval}
-
-                        if test "${nl_cv_build_optimized}" = "yes"; then
-                            AC_MSG_ERROR([both --enable-optimization and --enable-coverage cannot used. Please, choose one or the other to enable.])
-                        fi
-                        ;;
-
-                    *)
-                        AC_MSG_ERROR([Invalid value ${enableval} for --enable-coverage])
-                        ;;
-
-                    esac
-                ],
-                [
-                    if test "${nl_cv_build_optimized}" = "yes"; then
-                        AC_MSG_WARN([--enable-optimization was specified, coverage disabled])
-                        nl_cv_build_coverage=no
-
-                    else
-                        nl_cv_build_coverage=$1
-
-                    fi
-                ])
-
-            if test "${nl_cv_build_coverage}" = "yes"; then
-                if test "${GCC}" != "yes"; then
-                    AC_MSG_ERROR([GCC or a GCC-compatible toolchain is required for --enable-coverage])
-                else
-                    NL_COVERAGE_CPPFLAGS="--coverage"
-                    if ${CC} --version | grep -q clang; then
-                        NL_COVERAGE_LDFLAGS="--coverage"
-                    else
-                        NL_COVERAGE_LIBS="-lgcov"
-                    fi
-                fi
-            fi
-    ])
-])
-
-
-
-
-
-
-
-
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage_reporting.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage_reporting.m4
deleted file mode 100644
index d20e3a5..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_coverage_reporting.m4
+++ /dev/null
@@ -1,149 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro that adds an
-#      --enable-coverage configuration option to the package and
-#      controls whether the package will be built for code coverage
-#      reporting, using the LCOV package.
-#
-
-#
-# NL_ENABLE_COVERAGE_REPORTS(default)
-#
-#   default - Whether the option should be automatic (auto), enabled
-#             (yes), or disabled (no) by default.
-#
-# Adds an --enable-coverage-reports configuration option to the
-# package with a default value of 'default' (should be 'auto', 'no' or
-# 'yes') and controls whether the package will be built with or
-# without code coverage reports, using the LCOV package.
-#
-# The value 'nl_cv_build_coverage_reports' will be set to the result. In
-# addition, LCOV will be set to the path of the 'lcov' tool and GENHTML will  be set to the path of the 'genhtml' tool.
-#
-# NOTE: The behavior of this is influenced by nl_cv_build_coverage from
-#       NL_ENABLE_COVERAGE.
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_ENABLE_COVERAGE_REPORTS],
-[
-    # Check whether or not a default value has been passed in.
-
-    m4_case([$1],
-        [auto],[],
-        [yes],[],
-        [no],[],
-        [m4_fatal([$0: invalid default value '$1'; must be 'auto', 'yes' or 'no'])])
-
-    # Check for the presence of lcov and genhtml, required
-    # to build and generate the coverage reports.
-
-    AC_PATH_PROG(LCOV, lcov)
-    AC_PATH_PROG(GENHTML, genhtml)
-
-    AC_CACHE_CHECK([whether to build graphical code coverage reports],
-        nl_cv_build_coverage_reports,
-        [
-            AC_ARG_ENABLE(coverage-reports,
-                [AS_HELP_STRING([--enable-coverage-reports],[Enable the generation of code coverage reports (requires lcov)  @<:@default=$1@:>@.])],
-                [
-                    case "${enableval}" in 
-
-                    auto|no|yes)
-                        nl_cv_build_coverage_reports=${enableval}
-                        ;;
-
-                    *)
-                        AC_MSG_ERROR([Invalid value ${enableval} for --enable-coverage])
-                        ;;
-
-                    esac
-                ],
-                [
-                    nl_cv_build_coverage_reports=$1
-                ])
-
-            # If coverage is not enabled, then coverage reports
-            # defaults to 'no' if it is 'auto' or fails if it is
-            # 'yes'. Otherwise, availability of lcov and genhtml
-            # condition behavior. Lack of availability for 'yes'
-            # results in failure; however, for 'auto' then coverage
-            # reports default to 'no'.
-
-            case "${nl_cv_build_coverage}" in
-
-            no)
-                case "${nl_cv_build_coverage_reports}" in
-
-                    auto)
-                        nl_cv_build_coverage_reports="no"
-                        ;;
-
-                    yes)
-                        AC_MSG_ERROR([--enable-coverage must be asserted to use --enable-coverage-reports.])
-                        ;;
-
-                    no)
-                        ;;
-
-                esac
-                ;;
-
-            yes)
-                case "${nl_cv_build_coverage_reports}" in
-
-                    auto)
-                        # Both lcov and genhtml must exist to successfully
-                        # enable coverage reports.
-
-                        if test "x${LCOV}" = "x" || test "x${GENHTML}" = "x"; then
-                            nl_cv_build_coverage_reports="no"
-
-                        else
-                            nl_cv_build_coverage_reports="yes"
-
-                        fi
-                        ;;
-
-                    yes)
-                        # Both lcov and genhtml must exist to successfully
-                        # enable coverage reports. Since the default or user
-                        # ask is 'yes', we must fail if lcov or genhtml cannot
-                        # be found.
-
-                        if test "x${LCOV}" = "x"; then
-                            AC_MSG_ERROR([Cannot find 'lcov'. You must have the lcov package installed to use coverage reports.])
-
-                        elif test "x${GENHTML}" = "x"; then
-                            AC_MSG_ERROR([Cannot find 'genhtml'. You must have the lcov package installed to use coverage reports.])
-
-                        elif test "${nl_cv_build_coverage_reports}" = "auto"; then
-                            nl_cv_build_coverage_reports="yes"
-
-                        fi
-                        ;;
-
-                    no)
-                        ;;
-
-                esac
-                ;;
-
-            esac
-    ])
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_debug.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_debug.m4
deleted file mode 100644
index e83f43d..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_debug.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro that adds an
-#      --enable-debug configuration option to the package and controls
-#      whether the package will be built for debug instances of programs
-#      and libraries.
-#
-
-#
-# NL_ENABLE_DEBUG(default)
-#
-#   default - Whether the option should be enabled (yes) or disabled (no)
-#             by default.
-#
-# Adds an --enable-debug configuration option to the package with a
-# default value of 'default' (should be either 'no' or 'yes') and controls
-# whether the package will be built with or without -DDEBUG enabled.
-#
-# The value 'nl_cv_build_debug' will be set to the result. In
-# addition, the contents of CFLAGS, CXXFLAGS, OBJCFLAGS, and
-# OBJCXXFLAGS may be altered by the use of this macro, adding -DDEBUG
-# if this option is asserted.
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_ENABLE_DEBUG],
-[
-    # Check whether or not a default value has been passed in.
-
-    m4_case([$1],
-        [yes],[],
-        [no],[],
-        [m4_fatal([$0: invalid default value '$1'; must be 'yes' or 'no'])])
-
-    AC_CACHE_CHECK([whether to build debug instances of programs and libraries],
-        nl_cv_build_debug,
-        [
-            AC_ARG_ENABLE(debug,
-                [AS_HELP_STRING([--enable-debug],[Enable the generation of debug instances @<:@default=$1@:>@.])],
-                [
-                    case "${enableval}" in 
-
-                    no|yes)
-                        nl_cv_build_debug=${enableval}
-                        ;;
-
-                    *)
-                        AC_MSG_ERROR([Invalid value ${enableval} for --enable-debug])
-                        ;;
-
-                    esac
-                ],
-                [
-                    nl_cv_build_debug=$1
-                ])
-
-            if test "${nl_cv_build_debug}" = "yes"; then
-                CFLAGS="${CFLAGS} -DDEBUG"
-                CXXFLAGS="${CXXFLAGS} -DDEBUG"
-                OBJCFLAGS="${OBJCFLAGS} -DDEBUG"
-                OBJCXXFLAGS="${OBJCXXFLAGS} -DDEBUG"
-            fi
-    ])
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_docs.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_docs.m4
deleted file mode 100644
index a7b3566..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_docs.m4
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro that adds an
-#      --disable-docs configuration option to the package and controls
-#      whether the package will be built with or without documentation.
-#
-
-#
-# NL_ENABLE_DOCS(default, dot_default)
-#
-#   default     - Whether the option should be automatic (auto), enabled
-#                 (yes), disabled (no) by default.
-#   dot_default - Whether Doxygen should use (YES) or not use (NO)
-#                 GraphViz dot.
-#
-# Adds an --disable-docs configuration option to the package with a
-# default value of 'default' (should be 'auto', 'no' or 'yes') and
-# controls whether the package will be built with or without Doxygen-based
-# documentation.
-#
-# The value 'nl_cv_build_docs' will be set to the result. In addition:
-#
-#   DOXYGEN         - Will be set to the path of the Doxygen executable.
-#   DOT             - Will be set to the path of the GraphViz dot
-#                     executable.
-#   DOXYGEN_USE_DOT - Will be set to 'NO' or 'YES' depending on whether
-#                     GraphViz dot is available.
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_ENABLE_DOCS],
-[
-    # Check whether or not the 'default' value is sane.
-
-    m4_case([$1],
-        [auto],[],
-        [yes],[],
-        [no],[],
-        [m4_fatal([$0: invalid default value '$1'; must be 'auto', 'yes' or 'no'])])
-
-    # Check whether or not the 'dot_default' value is sane.
-
-    m4_case([$2],
-        [YES],[],
-        [NO],[],
-        [m4_fatal([$0: invalid default value '$2'; must be 'YES' or 'NO'])])
-
-    DOXYGEN_USE_DOT=$2
-
-    AC_ARG_VAR(DOXYGEN, [Doxygen executable])
-    AC_ARG_VAR(DOT,     [GraphViz 'dot' executable, which may be used, when present, to generate Doxygen class graphs])
-
-    AC_PATH_PROG(DOXYGEN, doxygen)
-    AC_PATH_PROG(DOT, dot)
-
-    AC_CACHE_CHECK([whether to build documentation],
-        nl_cv_build_docs,
-        [
-	    AC_ARG_ENABLE(docs,
-		[AS_HELP_STRING([--disable-docs],[Enable building documentation (requires Doxygen) @<:@default=$1@:>@.])],
-		[
-		    case "${enableval}" in 
-
-		    auto|no|yes)
-			nl_cv_build_docs=${enableval}
-			;;
-
-		    *)
-			AC_MSG_ERROR([Invalid value ${enableval} for --disable-docs])
-			;;
-
-		    esac
-		],
-		[nl_cv_build_docs=$1])
-
-	    if test "x${DOXYGEN}" != "x"; then
-		nl_cv_have_doxygen=yes
-	    else
-		nl_cv_have_doxygen=no
-	    fi
-
-	    if test "${nl_cv_build_docs}" = "auto"; then
-		if test "${nl_cv_have_doxygen}" = "no"; then
-		    nl_cv_build_docs=no
-		else
-		    nl_cv_build_docs=yes
-		fi
-	    fi
-
-	    if test "${nl_cv_build_docs}" = "yes"; then
-		if test "${nl_cv_have_doxygen}" = "no"; then
-		    AC_MSG_ERROR([Building docs was explicitly requested but Doxygen cannot be found])
-		elif test "${nl_cv_have_doxygen}" = "yes"; then
-		    if test "x${DOT}" != "x"; then
-			DOXYGEN_USE_DOT=YES
-		    fi
-		fi
-	    fi
-    ])
-
-    AC_SUBST(DOXYGEN_USE_DOT)
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_optimization.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_optimization.m4
deleted file mode 100644
index f6c941e..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_optimization.m4
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro that adds an
-#      --enable-optimization configuration option to the package and
-#      controls whether the package will be built with or without code
-#      optimization.
-#
-
-#
-# NL_ENABLE_OPTIMIZATION(default)
-#
-#   default - Whether the option should be enabled (yes) or disabled (no)
-#             by default.
-#
-# Adds an --enable-optimization configuration option to the package with a
-# default value of 'default' (should be either 'no' or 'yes') and controls
-# whether the package will be built with or without code optimization.
-#
-# The value 'nl_cv_build_optimized' will be set to the result. In
-# addition, the contents of CFLAGS, CXXFLAGS, OBJCFLAGS, and OBJCXXFLAGS may
-# be altered by the use of this macro, converting -O<something> to -O0.
-#
-# NOTE: The behavior of this is influenced by nl_cv_build_coverage from
-#       NL_ENABLE_COVERAGE
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_ENABLE_OPTIMIZATION],
-[
-    # Check whether or not a default value has been passed in.
-
-    m4_case([$1],
-        [yes],[],
-        [no],[],
-        [m4_fatal([$0: invalid default value '$1'; must be 'yes' or 'no'])])
-
-    AC_CACHE_CHECK([whether to build code-optimized instances of programs and libraries],
-        nl_cv_build_optimized,
-        [
-            AC_ARG_ENABLE(optimization,
-                [AS_HELP_STRING([--enable-optimization],[Enable the generation of code-optimized instances @<:@default=$1@:>@.])],
-                [
-                    case "${enableval}" in 
-
-                    no|yes)
-                        nl_cv_build_optimized=${enableval}
-
-                        if test "${nl_cv_build_coverage}" = "yes" && test "${nl_cv_build_optimized}" = "yes"; then
-                            AC_MSG_ERROR([both --enable-optimization and --enable-coverage cannot used. Please, choose one or the other to enable.])
-                        fi
-                        ;;
-
-                    *)
-                        AC_MSG_ERROR([Invalid value ${enableval} for --enable-optimized])
-                        ;;
-
-                    esac
-                ],
-                [
-                    if test "${nl_cv_build_coverage}" = "yes"; then
-                        AC_MSG_WARN([--enable-coverage was specified, optimization disabled])
-                        nl_cv_build_optimized=no
-            
-                    else
-                        nl_cv_build_optimized=$1
-            
-                    fi
-                ])
-
-            if test "${nl_cv_build_optimized}" = "no"; then
-                CFLAGS="`echo ${CFLAGS} | sed -e 's,-O[[[:alnum:]]]*,-O0,g'`"
-                CXXFLAGS="`echo ${CXXFLAGS} | sed -e 's,-O[[[:alnum:]]]*,-O0,g'`"
-                OBJCFLAGS="`echo ${OBJCFLAGS} | sed -e 's,-O[[[:alnum:]]]*,-O0,g'`"
-                OBJCXXFLAGS="`echo ${OBJCXXFLAGS} | sed -e 's,-O[[[:alnum:]]]*,-O0,g'`"
-            fi
-    ])
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_tests.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_tests.m4
deleted file mode 100644
index 25b7914..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_tests.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro that adds an
-#      --enable-tests configuration option to the package and controls
-#      whether the package will be built with or without unit and
-#      integration tests.
-#
-
-#
-# NL_ENABLE_TESTS(default)
-#
-#   default - Whether the option should be enabled (yes) or disabled (no)
-#             by default.
-#
-# Adds an --enable-tests configuration option to the package with a
-# default value of 'default' (should be either 'no' or 'yes') and
-# controls whether the package will be built with or without unit and
-# integration tests.
-#
-# The value 'nl_cv_build_tests' will be set to the result.
-#
-#------------------------------------------------------------------------------
-
-AC_DEFUN([NL_ENABLE_TESTS],
-[
-    # Check whether or not a default value has been passed in.
-
-    m4_case([$1],
-        [yes],[],
-        [no],[],
-        [m4_fatal([$0: invalid default value '$1'; must be 'yes' or 'no'])])
-
-    AC_CACHE_CHECK([whether to build tests],
-        nl_cv_build_tests,
-        [
-            AC_ARG_ENABLE(tests,
-                [AS_HELP_STRING([--enable-tests],[Enable building of tests @<:@default=$1@:>@.])],
-                [
-                    case "${enableval}" in 
-
-                    no|yes)
-                        nl_cv_build_tests=${enableval}
-                        ;;
-
-                    *)
-                        AC_MSG_ERROR([Invalid value ${enableval} for --enable-tests])
-                        ;;
-
-                    esac
-                ],
-                [
-                    nl_cv_build_tests=$1
-                ])
-    ])
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_werror.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_werror.m4
deleted file mode 100644
index 85032ab..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_enable_werror.m4
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro that adds an
-#      --enable-warnings-as-errors configuration option to the package
-#      and controls whether the package will be built to treat all
-#      compilation warnings as errors.  #
-
-#
-# NL_ENABLE_WERROR(default)
-#
-#   default - Whether the option should be enabled (yes) or disabled (no)
-#             by default.
-#
-# Adds an --enable-warnings-as-errors configuration option to the
-# package with a default value of 'default' (should be either 'no' or
-# 'yes') and controls whether the package will be built with or
-# without -Werror enabled.
-#
-# The value 'nl_cv_warnings_as_errors' will be set to the result. In
-# addition, the variable NL_WERROR_CPPFLAGS will be set to the
-# compiler-specific flag necessary to assert this option.
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_ENABLE_WERROR],
-[
-    # Check whether or not a default value has been passed in.
-
-    m4_case([$1],
-        [yes],[],
-        [no],[],
-        [m4_fatal([$0: invalid default value '$1'; must be 'yes' or 'no'])])
-
-    AC_CACHE_CHECK([whether to treat all compilation warnings as errors],
-        nl_cv_warnings_as_errors,
-        [
-            AC_ARG_ENABLE(warnings-as-errors,
-                [AS_HELP_STRING([--enable-warnings-as-errors],[Treat all compilation warnings as errors @<:@default=$1@:>@.])],
-                [
-                    case "${enableval}" in 
-
-                    no|yes)
-                        nl_cv_warnings_as_errors=${enableval}
-                        ;;
-
-                    *)
-                        AC_MSG_ERROR([Invalid value ${enableval} for --enable-warnings-as-errors])
-                        ;;
-
-                    esac
-                ],
-                [
-                    nl_cv_warnings_as_errors=$1
-                ])
-    ])
-
-    if test "${nl_cv_warnings_as_errors}" = "yes"; then
-        AX_CHECK_COMPILER_OPTION([C], NL_WERROR_CPPFLAGS, [-Werror])
-        if test "x${NL_WERROR_CPPFLAGS}" = "x"; then
-            AC_MSG_ERROR([Could not determine how to treat warnings as errors for your compiler ${CC}])
-        fi
-    fi
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_filtered_canonical.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_filtered_canonical.m4
deleted file mode 100644
index d3d2eb1..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_filtered_canonical.m4
+++ /dev/null
@@ -1,153 +0,0 @@
-#
-#    Copyright 2019 Google LLC. All Rights Reserved.
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro for filtering
-#      the autoconf canonical build, host, or target.
-#
-#      Mac OS X / Darwin ends up putting some versioning cruft on the
-#      end of its tuples that most users of these variables rarely
-#      care about.
-#
-
-#
-# _NL_FILTERED_CANONICAL_SPLIT(name)
-#
-#   name - The existing autoconf variable to split
-#
-#   This splits, by CPU architecture, vendor, and OS, the filtered
-#   tuples otherwise created by autotools, creating:
-#
-#     nl_filtered_<name>
-#     nl_filtered_<name>_cpu
-#     nl_filtered_<name>_os
-#     nl_filtered_<name>_vendor
-#
-#   filtered of the versioning cruft on the vendor component that most
-#   users of these variables rarely care about.
-#
-#   The resulting values are available both in configure.ac as well
-#   as in makefiles.
-#
-_NL_FILTERED_CANONICAL_SPLIT(name)
-AC_DEFUN([_NL_FILTERED_CANONICAL_SPLIT],
-[
-    case ${nl_cv_filtered_$1} in
-    
-    *-*-*) ;;
-    *) AC_MSG_ERROR([invalid value of canonical $1]);;
-    
-    esac
-    
-    AC_SUBST([nl_filtered_$1], [$nl_cv_filtered_$1])
-    
-    nl_save_IFS=$IFS; IFS='-'
-    set x $nl_cv_filtered_$1
-    shift
-    
-    AC_SUBST([nl_filtered_$1_cpu], [$[1]])
-    AC_SUBST([nl_filtered_$1_vendor], [$[2]])
-    
-    shift; shift
-    [# Remember, the first character of IFS is used to create $]*,
-    # except with old shells:
-    nl_filtered_$1_os=$[*]
-    IFS=$nl_save_IFS
-    
-    case nl_filtered_$$1_os in
-    
-    *\ *) nl_filtered_$1_os=`echo "$$1_os" | sed 's/ /-/g'`;;
-    
-    esac
-    
-    AC_SUBST([nl_filtered_$1_os])
-])
-
-#
-# _NL_FILTERED_CANONICAL(name)
-#
-#   name - The existing autoconf variable to filter
-#
-#   Mac OS X / Darwin ends up putting some versioning cruft on the end
-#   of its tuples that most users of these variables rarely care about.
-#
-#   This filters such versioning cruft from the variable 'name'
-#   generated from AC_CANONICAL_<NAME> and saves it in
-#   'nl_filtered_<name>'.
-#
-_NL_FILTERED_CANONICAL(name)
-AC_DEFUN([_NL_FILTERED_CANONICAL],
-[
-    AC_CACHE_CHECK([filtered $1 system type],
-        [nl_cv_filtered_$1],
-        [nl_cv_filtered_$1=`echo ${$1} | sed -e 's/[[[:digit:].]]*$//g'`
-        nl_filtered_$1=${nl_cv_filtered_$1}])
-
-    _NL_FILTERED_CANONICAL_SPLIT($1)
-])
-
-#
-# NL_FILTERED_CANONICAL_BUILD
-#
-#   Mac OS X / Darwin ends up putting some versioning cruft on the end
-#   of its tuples that most users of these variables rarely care about.
-#
-#   This filters such versioning cruft from the variable 'build'
-#   generated from AC_CANONICAL_BUILD and saves it in
-#   'nl_filtered_build'.
-#
-NL_FILTERED_CANONICAL_BUILD
-AC_DEFUN([NL_FILTERED_CANONICAL_BUILD],
-[
-    AC_REQUIRE([AC_CANONICAL_BUILD])
-    _NL_FILTERED_CANONICAL(build)
-])
-
-#
-# NL_FILTERED_CANONICAL_HOST
-#
-#   Mac OS X / Darwin ends up putting some versioning cruft on the end
-#   of its tuples that most users of these variables rarely care about.
-#
-#   This filters such versioning cruft from the variable 'host'
-#   generated from AC_CANONICAL_HOST and saves it in
-#   'nl_filtered_build'.
-#
-NL_FILTERED_CANONICAL_HOST
-AC_DEFUN([NL_FILTERED_CANONICAL_HOST],
-[
-    AC_REQUIRE([AC_CANONICAL_HOST])
-    _NL_FILTERED_CANONICAL(host)
-])
-
-#
-# NL_FILTERED_CANONICAL_TARGET
-#
-#   Mac OS X / Darwin ends up putting some versioning cruft on the end
-#   of its tuples that most users of these variables rarely care about.
-#
-#   This filters such versioning cruft from the variable 'target'
-#   generated from AC_CANONICAL_TARGET and saves it in
-#   'nl_filtered_target'.
-#
-NL_FILTERED_CANONICAL_TARGET
-AC_DEFUN([NL_FILTERED_CANONICAL_TARGET],
-[
-    AC_REQUIRE([AC_CANONICAL_TARGET])
-    _NL_FILTERED_CANONICAL(target)
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_prog_lndir.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_prog_lndir.m4
deleted file mode 100644
index a958858..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_prog_lndir.m4
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro for checking
-#      for a build host-based tool that can shadow a directory using
-#      symbolic links, ostensibly either GNU cp or X11 lndir.
-#
-
-AC_DEFUN([_NL_CHECK_CP_RS],
-[
-    $1 -Rs 2>&1 | grep 'missing file operand' > /dev/null
-])
-
-AC_DEFUN([_NL_CHECK_LNDIR],
-[
-    $1 -silent 2>&1 | grep 'usage: lndir' > /dev/null
-])
-
-#
-# NL_PROG_LNDIR([fallback GNU cp path to test, fallback GNU cp path to set])
-#
-#   test path    - The fallback GNU cp path and arguments to test if a system
-#                  GNU cp cannot be found.
-#   set path     - The fallback GNU cp path and arguments to set to LNDIR if
-#                  the test path succeeds.
-#
-# Determine and assign to LNDIR, a build host-based tool that can shadow
-# a directory using symbolic links, attempting either GNU cp or X11 lndir
-# as preferred defaults.
-#
-# If the host doesn't have GNU cp natively, the caller can specify
-# both a GNU cp path to test and a GNU cp path to set if the test path
-# was successful.
-#
-# ----------------------------------------------------------------------------
-AC_DEFUN([NL_PROG_LNDIR],
-[
-    AC_ARG_VAR(LNDIR, [Program and arguments to create a shadow directory of symbolic links to another directory tree (e.g. 'cp -Rs')])
-
-    AC_MSG_CHECKING([how to shadow a directory tree])
-
-    if test "x${LNDIR}" = "x"; then
-	if `_NL_CHECK_CP_RS(cp)`; then
-	    LNDIR="cp -Rs"
-
-	elif `_NL_CHECK_LNDIR(lndir)`; then
-	    LNDIR="lndir -silent"
-
-	elif `_NL_CHECK_CP_RS($1)`; then
-	    LNDIR="$2 -Rs"
-
-	else
-	    AC_MSG_ERROR([Cannot determine how to shadow a directory tree. Neither 'cp -Rs' nor 'lndir -silent' appear to be available or functional. Please consider installing or making available in your PATH one of: GNU coreutils <http://www.gnu.org/software/coreutils/>, XQuartz (Mac OS X-only) <http://xquartz.macosforge.org/>, or lndir <http://www.mit.edu/afs/sipb/project/sipbsrc/rt/lndir/>.])
-
-	fi
-    fi
-
-    AC_MSG_RESULT(${LNDIR})
-
-    AC_SUBST(LNDIR)
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_werror.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_werror.m4
deleted file mode 100644
index 5385b5d..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_werror.m4
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-#    Copyright 2015-2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines GNU autoconf M4-style macros that ensure the
-#      -Werror (or -Werror=<...>) compiler option(s) for GCC-based or
-#      -compatible compilers do not break some autoconf tests (see
-#      http://lists.gnu.org/archive/html/autoconf-patches/2008-09/msg00014.html).
-#
-#      If -Werror (or -Werror=<...>) has/have been passed transform it
-#      into -Wno-error (or -Wno-error=<...>) for CPPFLAGS, CFLAGS,
-#      CXXFLAGS, OBJCFLAGS, and OBJCXXFLAGS with
-#      NL_SAVE_WERROR. Transform them back again with
-#      NL_RESTORE_WERROR.
-#
-
-# 
-# _NL_SAVE_WERROR_FOR_VAR(variable)
-#
-#   variable - The compiler flags variable to scan for the presence of
-#              -Werror (or -Werror=<...>) and, if present, transform
-#              to -Wno-error (or -Wno-error=<...>).
-#
-# This transforms, for the specified compiler flags variable, -Werror
-# (or -Werror=<...>) to -Wno-error (or -Wno-error=<...>), if it was it
-# present. The original state may be restored by invoking
-# _NL_RESTORE_WERROR_FOR_VAR([variable]).
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([_NL_SAVE_WERROR_FOR_VAR],
-[
-    if echo "${$1}" | grep -q '\-Werror'; then
-	$1="`echo ${$1} | sed -e 's,-Werror\(=[[[:alnum:]_-]]\+\)*\([[[:space:]]]\),-Wno-error\1\2,g'`"
-	nl_had_$1_werror=yes
-    else
-	nl_had_$1_werror=no
-    fi
-])
-
-#
-# _NL_RESTORE_WERROR_FOR_VAR(variable)
-#
-#   variable - The compiler flag for which to restore -Wno-error back
-#              to -Werror if it was originally passed in by the user as
-#              such.
-#
-# This restores, for the specified compiler flags variable, -Werror
-# (or -Werror=<...>) from -Wno-error (or -Wno-error=<...>), if it was
-# initially set as -Werror (or -Werror=<...>) at the time
-# _NL_SAVE_WERROR_FOR_VAR([variable]) was invoked.
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([_NL_RESTORE_WERROR_FOR_VAR],
-[
-    if test "${nl_had_$1_werror}" = "yes"; then
-	$1="`echo ${$1} | sed -e 's,-Wno-error\(=[[[:alnum:]_-]]\+\)*\([[[:space:]]]\),-Werror\1\2,g'`"
-    fi
-
-    unset nl_had_$1_werror
-])
-
-# 
-# NL_SAVE_WERROR
-#
-# This transforms, for each of CFLAGS, CXXFLAGS, OBJCFLAGS, and
-# OBJCXXFLAGS, -Werror (or -Werror=<...>) to -Wno-error (or
-# -Wno-error=<...>), if it was it present. The original state may be
-# restored by invoking NL_RESTORE_WERROR.
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_SAVE_WERROR],
-[
-    _NL_SAVE_WERROR_FOR_VAR([CPPFLAGS])
-    _NL_SAVE_WERROR_FOR_VAR([CFLAGS])
-    _NL_SAVE_WERROR_FOR_VAR([CXXFLAGS])
-    _NL_SAVE_WERROR_FOR_VAR([OBJCFLAGS])
-    _NL_SAVE_WERROR_FOR_VAR([OBJCXXFLAGS])
-])
-
-#
-# NL_RESTORE_WERROR
-#
-# This restores, for each of OBJCXXFLAGS, OBJCFLAGS, CXXFLAGS, and
-# CFLAGS, -Werror (or -Werror=<...>) from -Wno-error (or
-# -Wno-error=<...>), if it was initially set as -Werror (or
-# -Werror=<...>) at the time NL_SAVE_WERROR was invoked.
-#
-#------------------------------------------------------------------------------
-AC_DEFUN([NL_RESTORE_WERROR],
-[
-    _NL_RESTORE_WERROR_FOR_VAR([OBJCXXFLAGS])
-    _NL_RESTORE_WERROR_FOR_VAR([OBJCFLAGS])
-    _NL_RESTORE_WERROR_FOR_VAR([CXXFLAGS])
-    _NL_RESTORE_WERROR_FOR_VAR([CFLAGS])
-    _NL_RESTORE_WERROR_FOR_VAR([CPPFLAGS])
-])
diff --git a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_with_package.m4 b/third_party/nlbuild-autotools/repo/autoconf/m4/nl_with_package.m4
deleted file mode 100644
index fc5eaec..0000000
--- a/third_party/nlbuild-autotools/repo/autoconf/m4/nl_with_package.m4
+++ /dev/null
@@ -1,755 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines a GNU autoconf M4-style macro for checking
-#      the presence and viability of both required and optional
-#      dependent packages, which may be internal or external to the
-#      current package.
-#
-#      Five (5) macros are made available:
-#
-#        * NL_WITH_REQUIRED_EXTERNAL_PACKAGE
-#        * NL_WITH_OPTIONAL_EXTERNAL_PACKAGE
-#        * NL_WITH_REQUIRED_INTERNAL_PACKAGE
-#        * NL_WITH_OPTIONAL_INTERNAL_PACKAGE
-#        * NL_WITH_PACKAGE
-#
-#      Note, however, that NL_WITH_PACKAGE is deprecated and maps to
-#      NL_WITH_REQUIRED_INTERNAL_PACKAGE.
-#
-
-# _NL_ARG_WITH_INCLUDES_OR_LIBS(PACKAGE-DISPOSITION,
-#                               PACKAGE-SOURCE,
-#                               PACKAGE-PRETTY-NAME,
-#                               PACKAGE-VARIABLE-PREFIX,
-#                               PACKAGE-SUCCINCT-NAME,
-#                               PACKAGE-WITH-OPTION,
-#                               PLURAL-WITH-OPTION-HELP-WORD,
-#                               WITH-DIR-VARIABLE-MODIFIER)
-# ----------------------------------------------------------------------------
-# This is a wrapper around AC_ARG_WITH that provides the ability to
-# optionally specify a dependent package include and link library
-# directories independently as
-# --with-<PACKAGE-SUCCINCT-NAME>-<PACKAGE-WITH-OPTION>=<DIR>.
-#
-# If the package is specified as required, the use of
-# --without-<PACKAGE-SUCCINCT-NAME> or the use of
-# --with-<PACKAGE-SUCCINCT-NAME>=no will result in a fatal error.
-#
-# At the successful conclusion of the execution of the macro, 
-# two variables will be defined:
-#
-#   * nl_with_<PACKAGE-SUCCINCT-NAME>
-#   * <PACKAGE-SUCCINT-NAME>_<WITH-DIR-VARIABLE-MODIFIER>_dir
-#
-# The package disposition and source are specified by:
-#
-#   PACKAGE-DISPOSITION     : This may be either 'required' if the dependent
-#                             package is required or 'optional' if
-#                             not.
-#   PACKAGE-SOURCE          : This may be either 'internal' if the dependent
-#                             package may be provided either
-#                             internally or externally to the current
-#                             package or 'external' if the dependent
-#                             package may only be provided outside of
-#                             the current package. This also serves as
-#                             the default value for where the
-#                             configuration script expects to find the
-#                             package.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_NL_ARG_WITH_INCLUDES_OR_LIBS],
-[
-    dnl Check whether or not the package is required
-
-    m4_case([$1],
-        [required],[],
-        [optional],[],
-        [m4_fatal([$0: invalid disposition value '$1'; must be 'required' or 'optional'])])
-
-    dnl Check whether or not the package is internal
-
-    m4_case([$2],
-        [internal],[],
-        [external],[],
-        [m4_fatal([$0: invalid source value '$2'; must be 'internal' or 'external'])])
-
-    AC_ARG_WITH($5-$6,
-	AS_HELP_STRING([--with-$5-$6=DIR],
-		   [Specify location of $1 $3 $7 @<:@default=$2@:>@.]),
-	[
-	    if test "${withval}" = "no"; then
-                m4_if([$1],
-                      [required],
-                      [AC_MSG_ERROR([${PACKAGE_NAME} requires the $3 package.])],
-                      [nl_with_$5=${withval}])
-	    fi
-	
-	    if test "x${$5_dir}" != "x"; then
-		AC_MSG_WARN([overriding --with-$5=${$5_dir}])
-	    fi
-
-	    if test "${withval}" = "internal"; then
-		$5_$8_dir=${withval}
-		nl_with_$5=${withval}
-	    else
-		$5_$8_dir=${withval}
-		nl_with_$5=external
-	    fi
-	],
-	[
-	    $5_$8_dir=;
-	    if test "x${nl_with_$5}" = "x"; then
-		nl_with_$5=$2
-	    fi
-	])
-])
-
-# _NL_ARG_WITH_INCLUDES(PACKAGE-DISPOSITION,
-#                       PACKAGE-SOURCE,
-#                       PACKAGE-PRETTY-NAME,
-#                       PACKAGE-VARIABLE-PREFIX,
-#                       PACKAGE-SUCCINCT-NAME)
-# ----------------------------------------------------------------------------
-# This is a wrapper around AC_ARG_WITH that provides the ability to
-# optionally specify a dependent package include directory
-# independently as --with-<PACKAGE-SUCCINCT-NAME>-includes=<DIR>.
-#
-# If the package is specified as required, the use of
-# --without-<PACKAGE-SUCCINCT-NAME>-includes or the use of
-# --with-<PACKAGE-SUCCINCT-NAME>-includes=no will result in a fatal error.
-#
-# At the successful conclusion of the execution of the macro, 
-# two variables will be defined:
-#
-#   * nl_with_<PACKAGE-SUCCINCT-NAME>
-#   * <PACKAGE-SUCCINT-NAME>_header_dir
-#
-# The package disposition and source are specified by:
-#
-#   PACKAGE-DISPOSITION     : This may be either 'required' if the dependent
-#                             package is required or 'optional' if
-#                             not.
-#   PACKAGE-SOURCE          : This may be either 'internal' if the dependent
-#                             package may be provided either
-#                             internally or externally to the current
-#                             package or 'external' if the dependent
-#                             package may only be provided outside of
-#                             the current package. This also serves as
-#                             the default value for where the
-#                             configuration script expects to find the
-#                             package.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_NL_ARG_WITH_INCLUDES],
-[
-    _NL_ARG_WITH_INCLUDES_OR_LIBS([$1], [$2], [$3], [$4], [$5], [includes], [headers], [header])dnl
-])
-
-# _NL_ARG_WITH_LIBS(PACKAGE-DISPOSITION,
-#                   PACKAGE-SOURCE,
-#                   PACKAGE-PRETTY-NAME,
-#                   PACKAGE-VARIABLE-PREFIX,
-#                   PACKAGE-SUCCINCT-NAME)
-# ----------------------------------------------------------------------------
-# This is a wrapper around AC_ARG_WITH that provides the ability to
-# optionally specify a dependent package link library directory
-# independently as --with-<PACKAGE-SUCCINCT-NAME>-libs=<DIR>.
-#
-# If the package is specified as required, the use of
-# --without-<PACKAGE-SUCCINCT-NAME>-libs or the use of
-# --with-<PACKAGE-SUCCINCT-NAME>-libs=no will result in a fatal error.
-#
-# At the successful conclusion of the execution of the macro, 
-# two variables will be defined:
-#
-#   * nl_with_<PACKAGE-SUCCINCT-NAME>
-#   * <PACKAGE-SUCCINT-NAME>_library_dir
-#
-# The package disposition and source are specified by:
-#
-#   PACKAGE-DISPOSITION     : This may be either 'required' if the dependent
-#                             package is required or 'optional' if
-#                             not.
-#   PACKAGE-SOURCE          : This may be either 'internal' if the dependent
-#                             package may be provided either
-#                             internally or externally to the current
-#                             package or 'external' if the dependent
-#                             package may only be provided outside of
-#                             the current package. This also serves as
-#                             the default value for where the
-#                             configuration script expects to find the
-#                             package.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_NL_ARG_WITH_LIBS],
-[
-    _NL_ARG_WITH_INCLUDES_OR_LIBS([$1], [$2], [$3], [$4], [$5], [libs], [libraries], [library])dnl
-])
-
-# _NL_ARG_WITH_PACKAGE(PACKAGE-DISPOSITION,
-#                      PACKAGE-SOURCE,
-#                      PACKAGE-PRETTY-NAME,
-#                      PACKAGE-VARIABLE-PREFIX,
-#                      PACKAGE-SUCCINCT-NAME)
-# ----------------------------------------------------------------------------
-# This is a wrapper around AC_ARG_WITH that provides the ability to
-# optionally specify a dependent package as
-# --with-<PACKAGE-SUCCINCT-NAME>=<DIR> or to independently specify the
-# include and link library directories independently as
-# --with-<PACKAGE-SUCCINCT-NAME>-includes=<DIR> and
-# --with-<PACKAGE-SUCCINCT-NAME>-libs=<DIR>.
-#
-# If the package is specified as required, the use of
-# --without-<PACKAGE-SUCCINCT-NAME>* or the use of
-# --with-<PACKAGE-SUCCINCT-NAME>*=no will result in a fatal error.
-#
-# At the successful conclusion of the execution of the macro, 
-# two or more variables will be defined:
-#
-#   * nl_with_<PACKAGE-SUCCINCT-NAME>
-#   * <PACKAGE-SUCCINT-NAME>_dir
-#   * <PACKAGE-SUCCINT-NAME>_header_dir
-#   * <PACKAGE-SUCCINT-NAME>_library_dir
-#
-# The package disposition and source are specified by:
-#
-#   PACKAGE-DISPOSITION     : This may be either 'required' if the dependent
-#                             package is required or 'optional' if
-#                             not.
-#   PACKAGE-SOURCE          : This may be either 'internal' if the dependent
-#                             package may be provided either
-#                             internally or externally to the current
-#                             package or 'external' if the dependent
-#                             package may only be provided outside of
-#                             the current package. This also serves as
-#                             the default value for where the
-#                             configuration script expects to find the
-#                             package.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_NL_ARG_WITH_PACKAGE],
-[
-    AC_ARG_WITH($5,
-	AS_HELP_STRING([--with-$5=DIR],
-		   [Specify location of the $1 $3 headers and libraries @<:@default=$2@:>@.]),
-	[
-	    if test "${withval}" = "no"; then
-                m4_if([$1],
-                      [required],
-                      [AC_MSG_ERROR([${PACKAGE_NAME} requires the $3 package.])],
-                      [nl_with_$5=${withval}])
-	    elif test "${withval}" = "internal"; then
-		$5_dir=${withval}
-		nl_with_$5=${withval}
-	    else
-		$5_dir=${withval}
-		nl_with_$5=external
-	    fi
-	],
-	[$5_dir=; nl_with_$5=$2])
-
-    # Allow users to specify external headers and libraries independently.
-
-    _NL_ARG_WITH_INCLUDES([$1], [$2], [$3], [$4], [$5])dnl
-
-    _NL_ARG_WITH_LIBS([$1], [$2], [$3], [$4], [$5])dnl
-])
-
-# _NL_WITH_PACKAGE(PACKAGE-DISPOSITION,
-#                  PACKAGE-SOURCE,
-#                  PACKAGE-PRETTY-NAME,
-#                  PACKAGE-VARIABLE-PREFIX,
-#                  PACKAGE-SUCCINCT-NAME,
-#                  [DEFAULT-PACKAGE-LIBS],
-#                  [ACTIONS-TO-RUN-IF-NOT-EXTERNAL],
-#                  [ACTIONS-TO-RUN-IF-NOT-INTERNAL])
-# ----------------------------------------------------------------------------
-# This macro is used to test for the presence, with pkg-config if it
-# is available, of the specified, optional or required dependent
-# package. The dependent package may be provided externally or may
-# exist within the current package itself.
-#
-# If the package is specified as required, failure to find the
-# dependent package will result in a fatal error.
-#
-# At the successful conclusion of the execution of the macro, three
-# variables will be defined:
-#
-#   * <PACKAGE-VARIABLE-PREFIX>_CPPFLAGS
-#   * <PACKAGE-VARIABLE-PREFIX>_LDFLAGS
-#   * <PACKAGE-VARIABLE-PREFIX>_LIBS
-#
-# In addition, the variable:
-#
-#   * nl_with_<PACKAGE-SUCCINCT-NAME>
-#
-# will unconditionally be set to the source of the package if it is to
-# be used and is found; otherwise, 'no' if it is not to be used.
-#
-# The package disposition and source are specified by:
-#
-#   PACKAGE-DISPOSITION     : This may be either 'required' if the dependent
-#                             package is required or 'optional' if
-#                             not.
-#   PACKAGE-SOURCE          : This may be either 'internal' if the dependent
-#                             package may be provided either
-#                             internally or externally to the current
-#                             package or 'external' if the dependent
-#                             package may only be provided outside of
-#                             the current package. This also serves as
-#                             the default value for where the
-#                             configuration script expects to find the
-#                             package.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-#
-# In addition, if any additional, default link libraries are required
-# for use with the package, these are specified as:
-#
-#   DEFAULT-PACKAGE-LIBS    : Default link libraries required for use with
-#                             the package. These are used if pkg-config is
-#                             not available or cannot identify any
-#                             such libraries. For example, '-lmgsp'.
-#
-# If the package is specified, either internally or externally, optional
-# actions are run.
-#
-#   ACTIONS-TO-RUN-IF-NOT-EXTERNAL : Optional actions to run if the package
-#                                    is not external.
-#   ACTIONS-TO-RUN-IF-NOT-INTERNAL : Optional actions to run if the package
-#                                    is not internal.
-# ----------------------------------------------------------------------------
-AC_DEFUN([_NL_WITH_PACKAGE],
-[
-    # Influential external variables for the package support
-
-    AC_ARG_VAR($4_CPPFLAGS, [$3 C preprocessor flags])
-    AC_ARG_VAR($4_LDFLAGS,  [$3 linker flags])
-    AC_ARG_VAR($4_LIBS,     [$3 linker libraries])
-
-    # Allow the user to specify both external headers and libraries
-    # together (or internal).
-
-    _NL_ARG_WITH_PACKAGE([$1], [$2], [$3], [$4], [$5])dnl
-
-    if test "${nl_with_$5}" == "no"; then
-	AC_MSG_CHECKING([whether to use the $3 package])
-	AC_MSG_RESULT([${nl_with_$5}])
-
-    else
-	AC_MSG_CHECKING([source of the $3 package])
-	AC_MSG_RESULT([${nl_with_$5}])
-
-	# If the user has selected or has defaulted into the internal $3
-	# package, set the values appropriately. Otherwise, run through the
-	# usual routine.
-
-	if test "${nl_with_$5}" = "internal"; then
-	    $7
-
-	else
-	    # We always prefer checking the values of the various '--with-$5-...' 
-	    # options first to using pkg-config because the former might be used
-	    # in a cross-compilation environment on a system that also contains
-	    # pkg-config. In such a case, the user wants what he/she specified
-	    # rather than what pkg-config indicates.
-
-	    if test "x${$5_dir}" != "x" -o "x${$5_header_dir}" != "x" -o "x${$5_library_dir}" != "x"; then
-			if test "x${$5_dir}" != "x"; then
-		    if test -d "${$5_dir}"; then
-			if test -d "${$5_dir}/include"; then
-			    $4_CPPFLAGS="-I${$5_dir}/include"
-			else
-			    $4_CPPFLAGS="-I${$5_dir}"
-			fi
-
-			if test -d "${$5_dir}/lib"; then
-			    $4_LDFLAGS="-L${$5_dir}/lib"
-			else
-			    $4_LDFLAGS="-L${$5_dir}"
-			fi
-		    else
-			AC_MSG_ERROR([No such directory ${$5_dir}])
-		    fi
-		fi
-
-		if test "x${$5_header_dir}" != "x"; then
-		    if test -d "${$5_header_dir}"; then
-			$4_CPPFLAGS="-I${$5_header_dir}"
-		    else
-			AC_MSG_ERROR([No such directory ${$5_header_dir}])
-		    fi
-		fi
-
-		if test "x${$5_library_dir}" != "x"; then
-		    if test -d "${$5_library_dir}"; then
-			$4_LDFLAGS="-L${$5_library_dir}"
-		    else
-			AC_MSG_ERROR([No such directory ${$5_library_dir}])
-		    fi
-		fi
-
-		$4_LIBS="${$4_LDFLAGS} $6"
-
-	    elif test "x${PKG_CONFIG}" != "x"; then
-                if ${PKG_CONFIG} --exists "$5"; then
-		    $4_CPPFLAGS="`${PKG_CONFIG} --cflags $5`"
-		    $4_LDFLAGS="`${PKG_CONFIG} --libs-only-L $5`"
-		    $4_LIBS="`${PKG_CONFIG} --libs-only-l $5`"
-                else
-                    m4_if([$1],
-                          [required],
-                          [AC_MSG_ERROR([Cannot find the $5 package with ${PKG_CONFIG}. ${PACKAGE_NAME} requires the $5 package. Try installing the package or use the relevant --with options to configure.])],
-                          [nl_with_$5="no"])
-                fi
-
-	    else
-                m4_if([$1],
-                      [required],
-                      [AC_MSG_ERROR([Cannot find the $3 package. ${PACKAGE_NAME} requires the $3 package.])],
-                      [nl_with_$5="no"])
-	    fi
-	fi
-
-	AC_SUBST($4_CPPFLAGS)
-	AC_SUBST($4_LDFLAGS)
-	AC_SUBST($4_LIBS)
-
-	if test "${nl_with_$5}" != "internal" -a "${nl_with_$5}" != "no"; then
-	    nl_saved_CPPFLAGS="${CPPFLAGS}"
-	    nl_saved_LDFLAGS="${LDFLAGS}"
-	    nl_saved_LIBS="${LIBS}"
-
-	    CPPFLAGS="${CPPFLAGS} ${$4_CPPFLAGS}"
-	    LDFLAGS="${LDFLAGS} ${$4_LDFLAGS}"
-	    LIBS="${LIBS} ${$4_LIBS}"
-
-		$8
-
-	    CPPFLAGS="${nl_saved_CPPFLAGS}"
-	    LDFLAGS="${nl_saved_LDFLAGS}"
-	    LIBS="${nl_saved_LIBS}"
-	fi
-    fi
-])
-
-# NL_WITH_REQUIRED_EXTERNAL_PACKAGE(PACKAGE-PRETTY-NAME,
-#                                   PACKAGE-VARIABLE-PREFIX,
-#                                   PACKAGE-SUCCINCT-NAME,
-#                                   [DEFAULT-PACKAGE-LIBS],
-#                                   [ACTIONS-TO-RUN])
-# ----------------------------------------------------------------------------
-# This macro is used to test for the presence, with pkg-config if it
-# is available, of the specified, required external dependent package.
-#
-# Failure to find the dependent package will result in a fatal error.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-#
-# In addition, if any additional, default link libraries are required
-# for use with the package, these are specified as:
-#
-#   DEFAULT-PACKAGE-LIBS    : Default link libraries required for use with
-#                             the package. These are used if pkg-config is
-#                             not available or cannot identify any
-#                             such libraries. For example, '-lmgsp'.
-#
-# If the package is specified, optional actions are run.
-#
-#   ACTIONS-TO-RUN-IF-FOUND : Optional actions to run if the package is found.
-# ----------------------------------------------------------------------------
-AC_DEFUN([NL_WITH_REQUIRED_EXTERNAL_PACKAGE],
-[
-    _NL_WITH_PACKAGE([required], [external], [$1], [$2], [$3], [$4], [:], [$5])dnl
-])
-
-# NL_WITH_OPTIONAL_EXTERNAL_PACKAGE(PACKAGE-PRETTY-NAME,
-#                                   PACKAGE-VARIABLE-PREFIX,
-#                                   PACKAGE-SUCCINCT-NAME,
-#                                   [DEFAULT-PACKAGE-LIBS],
-#                                   [ACTIONS-TO-RUN])
-# ----------------------------------------------------------------------------
-# This macro is used to test for the presence, with pkg-config if it
-# is available, of the specified, optional external dependent package.
-#
-# Failure to find the dependent package will NOT result in a fatal error.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-#
-# In addition, if any additional, default link libraries are required
-# for use with the package, these are specified as:
-#
-#   DEFAULT-PACKAGE-LIBS    : Default link libraries required for use with
-#                             the package. These are used if pkg-config is
-#                             not available or cannot identify any
-#                             such libraries. For example, '-lmgsp'.
-#
-# If the package is specified, optional actions are run.
-#
-#   ACTIONS-TO-RUN-IF-FOUND : Optional actions to run if the package is found.
-# ----------------------------------------------------------------------------
-AC_DEFUN([NL_WITH_OPTIONAL_EXTERNAL_PACKAGE],
-[
-    _NL_WITH_PACKAGE([optional], [external], [$1], [$2], [$3], [$4], [:], [$5])dnl
-])
-
-# NL_WITH_REQUIRED_INTERNAL_PACKAGE(PACKAGE-PRETTY-NAME,
-#                                   PACKAGE-VARIABLE-PREFIX,
-#                                   PACKAGE-SUCCINCT-NAME,
-#                                   [DEFAULT-PACKAGE-LIBS],
-#                                   [ACTIONS-TO-RUN-IF-NOT-EXTERNAL],
-#                                   [ACTIONS-TO-RUN-IF-NOT-INTERNAL])
-# ----------------------------------------------------------------------------
-# This macro is used to test for the presence, with pkg-config if it
-# is available, of the specified, required dependent package. The dependent
-# package may be provided externally or may exist within the current
-# package itself.
-#
-# Failure to find the dependent package will result in a fatal error.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-#
-# In addition, if any additional, default link libraries are required
-# for use with the package, these are specified as:
-#
-#   DEFAULT-PACKAGE-LIBS    : Default link libraries required for use with
-#                             the package. These are used if pkg-config is
-#                             not available or cannot identify any
-#                             such libraries. For example, '-lmgsp'.
-#
-# If the package is specified, either internally or externally, optional
-# actions are run.
-#
-#   ACTIONS-TO-RUN-IF-NOT-EXTERNAL : Optional actions to run if the package
-#                                    is not external.
-#   ACTIONS-TO-RUN-IF-NOT-INTERNAL : Optional actions to run if the package
-#                                    is not internal.
-# ----------------------------------------------------------------------------
-AC_DEFUN([NL_WITH_REQUIRED_INTERNAL_PACKAGE],
-[
-    _NL_WITH_PACKAGE([required], [internal], [$1], [$2], [$3], [$4], [$5], [$6])dnl
-])
-
-# NL_WITH_OPTIONAL_INTERNAL_PACKAGE(PACKAGE-PRETTY-NAME,
-#                                   PACKAGE-VARIABLE-PREFIX,
-#                                   PACKAGE-SUCCINCT-NAME,
-#                                   [DEFAULT-PACKAGE-LIBS],
-#                                   [ACTIONS-TO-RUN-IF-NOT-EXTERNAL],
-#                                   [ACTIONS-TO-RUN-IF-NOT-INTERNAL])
-# ----------------------------------------------------------------------------
-# This macro is used to test for the presence, with pkg-config if it
-# is available, of the specified, optional dependent package. The dependent
-# package may be provided externally or may exist within the current
-# package itself.
-#
-# Failure to find the dependent package will NOT result in a fatal error.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-#
-# In addition, if any additional, default link libraries are required
-# for use with the package, these are specified as:
-#
-#   DEFAULT-PACKAGE-LIBS    : Default link libraries required for use with
-#                             the package. These are used if pkg-config is
-#                             not available or cannot identify any
-#                             such libraries. For example, '-lmgsp'.
-#
-# If the package is specified, either internally or externally, optional
-# actions are run.
-#
-#   ACTIONS-TO-RUN-IF-NOT-EXTERNAL : Optional actions to run if the package
-#                                    is not external.
-#   ACTIONS-TO-RUN-IF-NOT-INTERNAL : Optional actions to run if the package
-#                                    is not internal.
-# ----------------------------------------------------------------------------
-AC_DEFUN([NL_WITH_OPTIONAL_INTERNAL_PACKAGE],
-[
-    _NL_WITH_PACKAGE([optional], [internal], [$1], [$2], [$3], [$4], [$5], [$6])dnl
-])
-
-# NL_WITH_PACKAGE(PACKAGE-PRETTY-NAME, PACKAGE-VARIABLE-PREFIX,
-#                 PACKAGE-SUCCINCT-NAME, [DEFAULT-PACKAGE-LIBS],
-#                 [ACTIONS-TO-RUN-IF-NOT-EXTERNAL],
-#                 [ACTIONS-TO-RUN-IF-NOT-INTERNAL])
-# ----------------------------------------------------------------------------
-# This macro is used to test for the presence, with pkg-config if it
-# is available, of the specified dependent package. The dependent
-# package may be provided externally or may exist within the current
-# package itself.
-#
-# The dependent package is specified in three forms:
-#
-#   PACKAGE-PRETTY-NAME     : The human-readable name by which the package
-#                             will be referred for any diagnostic output. For
-#                             example, "My Great Software Package".
-#   PACKAGE-VARIABLE-PREFIX : The package-specific prefix applied to variables
-#                             defined as a result of running this macro for the
-#                             packages. For example, "MGSP" here is transformed
-#                             into MGSP_CPPFLAGS.
-#   PACKAGE-SUCCINCT-NAME   : The package-specific name used for pkg-config,
-#                             in temporary variables and on the
-#                             configure command line.  For example,
-#                             "mgsp" here is used for --with-mgsp=DIR
-#                             or 'pkg-config --cflags mgsp'.
-#
-# In addition, if any additional, default link libraries are required
-# for use with the package, these are specified as:
-#
-#   DEFAULT-PACKAGE-LIBS    : Default link libraries required for use with
-#                             the package. These are used if pkg-config is
-#                             not available or cannot identify any
-#                             such libraries. For example, '-lmgsp'.
-#
-# If the package is specified, either internally or externally, optional
-# actions are run.
-#
-#   ACTIONS-TO-RUN-IF-NOT-EXTERNAL : Optional actions to run if the package
-#                                    is not external.
-#   ACTIONS-TO-RUN-IF-NOT-INTERNAL : Optional actions to run if the package
-#                                    is not internal.
-# ----------------------------------------------------------------------------
-AC_DEFUN([NL_WITH_PACKAGE],
-[
-    m4_warn(obsolete, [$0: this macro has been deprecated. Consider using NL_WITH_REQUIRED_INTERNAL_PACKAGE instead.])
-
-    NL_WITH_REQUIRED_INTERNAL_PACKAGE([$1], [$2], [$3], [$4], [$5], [$6])dnl
-])
-
-
diff --git a/third_party/nlbuild-autotools/repo/automake/post.am b/third_party/nlbuild-autotools/repo/automake/post.am
deleted file mode 100644
index 2ad1e77..0000000
--- a/third_party/nlbuild-autotools/repo/automake/post.am
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "tail" or post automake header that may
-#      be included in any automakefile used in the build tree.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post/rules.am
-
-include $(abs_top_nlbuild_autotools_dir)/make/post.mak
diff --git a/third_party/nlbuild-autotools/repo/automake/post/rules.am b/third_party/nlbuild-autotools/repo/automake/post/rules.am
deleted file mode 100644
index 1836910..0000000
--- a/third_party/nlbuild-autotools/repo/automake/post/rules.am
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the automake footer for all common
-#      (i.e. non-toolchain-specific) rules.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post/rules/coverage.am
-include $(abs_top_nlbuild_autotools_dir)/automake/post/rules/pretty.am
-include $(abs_top_nlbuild_autotools_dir)/automake/post/rules/headers.am
diff --git a/third_party/nlbuild-autotools/repo/automake/post/rules/coverage.am b/third_party/nlbuild-autotools/repo/automake/post/rules/coverage.am
deleted file mode 100644
index 6410bb3..0000000
--- a/third_party/nlbuild-autotools/repo/automake/post/rules/coverage.am
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-#    Copyright 2018 Google LLC. All Rights Reserved.
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the automake footer for all code-coverage related
-#      targets and rules.
-#
-#      This represents the minimum integration with GNU autotools
-#      (automake in particular) such that 'make coverage' may be invoked
-#      at the top of the tree and all the prerequisites occur such
-#      that it executes successfully with no intervening make target
-#      invocations. The 'check-am' and '$(BUILT_SOURCES)' are the key
-#      automake-specific dependencies to ensure that happens.
-#
-#      This defines the following make targets:
-#
-#        coverage:
-#          Execute local and recursive coverage targets across the
-#          project sub-tree at the current invocation point.
-#
-#          This target is intended to be user-visibile and -invoked.
-#
-#        coverage-local:
-#          Execute local coverage targets at the current invocation point.
-#
-#          This target is intended to be user-visibile and -invoked.
-#
-#        coverage-recursive:
-#          Recursively execute the 'coverage' target across the
-#          project sub-tree at the current invocation point.
-#
-#          This target is NOT intended to be user-visibile and -invoked.
-#
-#        check-local:
-#          Alias for the 'check-am' target. Execute local check
-#          targets at the current invocation point. Local coverage targets
-#          may depend on this to ensure local tests are made before
-#          coverage targets are made.
-#
-#          This target is intended to be user-visibile and -invoked.
-#
-
-.PHONY: coverage coverage-recursive coverage-local check-local
-
-check-local: check-am
-
-coverage: coverage-local
-
-coverage: coverage-recursive
-
-coverage: check-am
-
-coverage: $(BUILT_SOURCES)
-
-coverage-recursive:
-	$(nl-make-subdirs)
diff --git a/third_party/nlbuild-autotools/repo/automake/post/rules/headers.am b/third_party/nlbuild-autotools/repo/automake/post/rules/headers.am
deleted file mode 100644
index f459838..0000000
--- a/third_party/nlbuild-autotools/repo/automake/post/rules/headers.am
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the automake footer for installing header files
-#      independently of the rest of a package.
-#
-#      Packages that wish to avail themselves of this target may wish
-#      to add the following goals and dependencies:
-#
-#        install-headers: install-includeHEADERS
-#
-#      in places where the package uses and defines 'include_HEADERS' or
-#
-#        install-headers: install-data
-#
-#      where the package uses and defines a more complex 'dist_*_HEADERS'.
-#
-#      This represents the minimum integration with GNU autotools
-#      (automake inparticular) such that 'make install-headers' may be
-#      invoked at the top of the tree and all the prerequisites occur 
-#      such that it executes successfully with no intervening make 
-#      target invocations.
-#
-
-.PHONY: install-headers install-headers-recursive
-
-install-headers: $(BUILT_SOURCES) install-headers-recursive
-
-install-headers-recursive:
-	$(nl-make-subdirs)
diff --git a/third_party/nlbuild-autotools/repo/automake/post/rules/pretty.am b/third_party/nlbuild-autotools/repo/automake/post/rules/pretty.am
deleted file mode 100644
index 5498a97..0000000
--- a/third_party/nlbuild-autotools/repo/automake/post/rules/pretty.am
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the automake footer for all coding style-related
-#      targets and rules.
-#
-#      The recursive target 'pretty', invoked against '$(PRETTY_SUBDIRS)', 
-#      is intended to reformat a collection of source files, defined by 
-#      '$(PRETTY_FILES)' using the program '$(PRETTY)' with the arguments 
-#      '$(PRETTY_ARGS)'.
-#
-#      The recursive target 'pretty-check' (and its alias 'lint'),
-#      invoked against '$(PRETTY_SUBDIRS)', is intended to only check 
-#      but NOT reformat a collection of source files, defined by
-#      '$(PRETTY_FILES)' using the program '$(PRETTY_CHECK)' with the
-#      arguments '$(PRETTY_CHECK_ARGS)'.
-#
-#      This represents the minimum integration with GNU autotools
-#      (automake inparticular) such that 'make pretty' and 'make
-#      pretty-check' may be invoked at the top of the tree and all 
-#      the prerequisites occur such that it executes successfully 
-#      with no intervening make target invocations. '$(BUILT_SOURCES)' 
-#      are the key automake-specific dependencies to ensure that happens.
-#
-
-# nl-make-pretty <TERSE OUTPUT COMMAND> <COMMAND> <COMMAND ARGUMENTS> <PATHS>
-#
-# This function iterates over PATHS, invoking COMMAND with
-# COMMAND ARGUEMENTS on each file. If a non-verbose make has been
-# requested TERSE OUTPUT COMMAND is emitted to standard output.
-
-define nl-make-pretty
-$(AM_V_at)for file in $(4); do \
-    $(1) \
-    if test -f $${file}; then d=; else d=$(srcdir)/; fi; \
-    $(2) $(3) $${d}$${file} \
-    || exit 1; \
-done
-endef
-
-.PHONY: pretty pretty-recursive pretty-check pretty-check-recursive lint
-
-pretty: pretty-recursive
-
-pretty pretty-check: $(BUILT_SOURCES)
-
-# Map the build action 'lint' to the more vernacular 'pretty-check'.
-
-lint: pretty-check
-
-pretty-check: pretty-check-recursive
-
-pretty-recursive pretty-check-recursive:
-	$(call nl-make-subdirs-with-dirs,$(PRETTY_SUBDIRS))
-
-pretty: $(PRETTY_FILES)
-ifneq ($(PRETTY),)
-	$(call nl-make-pretty,$(AM_V_PRETTY),$(PRETTY),$(PRETTY_ARGS),$(filter-out $(@)-recursive,$(PRETTY_FILES)))
-endif
-
-pretty-check: $(PRETTY_FILES)
-ifneq ($(PRETTY_CHECK),)
-	$(call nl-make-pretty,$(AM_V_PRETTY_CHECK),$(PRETTY_CHECK),$(PRETTY_CHECK_ARGS),$(filter-out $(@)-recursive,$(PRETTY_FILES)))
-endif
diff --git a/third_party/nlbuild-autotools/repo/automake/pre.am b/third_party/nlbuild-autotools/repo/automake/pre.am
deleted file mode 100644
index 04d0078..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre.am
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#    Copyright 2014-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "head" or pre automake header that may
-#      be included in any automakefile used in the build tree.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros.am
-
-include $(abs_top_nlbuild_autotools_dir)/make/pre.mak
diff --git a/third_party/nlbuild-autotools/repo/automake/pre/macros.am b/third_party/nlbuild-autotools/repo/automake/pre/macros.am
deleted file mode 100644
index 2e06b0a..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre/macros.am
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-#    Copyright 2019 Google LLC. All Rights Reserved.
-#    Copyright 2014-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines automake macros common to all other automake
-#      headers and files.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/constants.am
-include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/paths.am
-include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/pretty.am
-include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/verbosity.am
-include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/coverage.am
-include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/subdirs.am
-
-#
-# create-directory
-#
-# Create the directory with the name of the $(@) variable.
-#
-define create-directory
-$(call nl-create-dir,$(@))
-endef # create-directory
-
-#
-# create-link
-#
-# Create the symbolic link with the source of the $(<) variable and
-# the destination of the $(@) variable.
-#
-define create-link
-$(call nl-create-link)
-endef # create-link
-
-#
-# check-file <macro suffix>
-#
-# Check whether a file, referenced by the $(@) variable, should be
-# updated / regenerated based on its dependencies, referenced by the
-# $(<) variable by running the make macro check-file-<macro suffix>.
-#
-# The $(<) is passed as the first argument if the macro wants to process
-# it and the prospective new output file, which the macro MUST
-# generate, as the second.
-#
-# This macro will ensure that any required parent directories are created
-# prior to invoking check-file-<macro suffix>.
-#
-# This macro is similar to and inspired by that from Linux Kbuild and
-# elsewhere.
-#
-#   <macro suffix> - The name, suffixed to "check-file-", which indicates
-#                    the make macro to invoke.
-#
-#
-define check-file
-$(call nl-check-file-with-subroutine,check-file,$(1))
-endef # check-file
-
-
-
-
diff --git a/third_party/nlbuild-autotools/repo/automake/pre/macros/constants.am b/third_party/nlbuild-autotools/repo/automake/pre/macros/constants.am
deleted file mode 100644
index 1277a29..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre/macros/constants.am
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-#    Copyright 2010-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines automake file constants common to all other
-#      automake headers and files.
-#
-
-#
-# Character constants for those make does not otherwise handle well or
-# naturally.
-#
-
-# Path separator
-
-Slash                   := /
diff --git a/third_party/nlbuild-autotools/repo/automake/pre/macros/coverage.am b/third_party/nlbuild-autotools/repo/automake/pre/macros/coverage.am
deleted file mode 100644
index f3a762a..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre/macros/coverage.am
+++ /dev/null
@@ -1,106 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines automake variables and macros common to all
-#      other automake headers and files for code coverage.
-#
-
-# Suffixes
-
-#
-# Suffix for the code coverage report "bundle".
-#
-NL_COVERAGE_BUNDLE_SUFFIX = .lcov
-
-#
-# Suffix for the lcov "info" file inside the code coverage report bundle.
-#
-NL_COVERAGE_INFO_SUFFIX   = .info
-
-#
-# Verbosity macros and flags
-#
-
-NL_V_LCOV             = $(nl__v_LCOV_$(V))
-nl__v_LCOV_           = $(nl__v_LCOV_$(AM_DEFAULT_VERBOSITY))
-nl__v_LCOV_0          = @echo "  LCOV     $(@)";
-nl__v_LCOV_1          = 
-
-NL_V_LCOV_FLAGS       = $(nl__v_LCOV_FLAGS_$(V))
-nl__v_LCOV_FLAGS_     = $(nl__v_LCOV_FLAGS_$(AM_DEFAULT_VERBOSITY))
-nl__v_LCOV_FLAGS_0    = --quiet
-nl__v_LCOV_FLAGS_1    =
-
-NL_V_GENHTML          = $(nl__v_GENHTML_$(V))
-nl__v_GENHTML_        = $(nl__v_GENHTML_$(AM_DEFAULT_VERBOSITY))
-nl__v_GENHTML_0       = @echo "  GENHTML  $(@)";
-nl__v_GENHTML_1       = 
-
-NL_V_GENHTML_FLAGS    = $(nl__v_GENHTML_FLAGS_$(V))
-nl__v_GENHTML_FLAGS_  = $(nl__v_GENHTML_FLAGS_$(AM_DEFAULT_VERBOSITY))
-nl__v_GENHTML_FLAGS_0 = --quiet 
-nl__v_GENHTML_FLAGS_1 =
-
-#
-# generate-coverage-report <directory>
-#
-# Capture, using lcov, a coverage report from the specified directory 'directory'
-# with an final output "info" file as specified by the target variable.
-#
-#   <directory> - The directory from which lcov should search for coverage data (*.gcno & *.gcda)
-#
-#   - create baseline coverage data file (base.info) with '-i|--initial' option
-#   - create test coverage data file (test.info)
-#   - combine baseline and test coverage data to create the final "info" file
-#
-# Then, on success, generate an HTML-based coverage report using genhtml.
-#
-define generate-coverage-report
-$(NL_V_LCOV)$(LCOV) $(NL_V_LCOV_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" --initial --capture --directory "$(1)" --output-file "base.info"
-$(NL_V_LCOV)$(LCOV) $(NL_V_LCOV_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" --capture --directory "$(1)" --output-file "test.info"
-$(NL_V_LCOV)$(LCOV) $(NL_V_LCOV_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" --add-tracefile "base.info" --add-tracefile "test.info" --output-file "$(@)"
-$(NL_V_GENHTML)$(GENHTML) $(NL_V_GENHTML_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" "$(@)" --output-directory "$(@D)"
-endef # generate-coverage-report
-
-#
-# generate-coverage-report-with-filter <directory> <remove_filter>
-#
-# Capture, using lcov, a coverage report from the specified directory 'directory' and a filter 'remove_filter'
-# with an final output "info" file as specified by the target variable.
-#
-#   <directory>      - The directory from which lcov should search for coverage data (*.gcno & *.gcda)
-#
-#   <remove_filter>  - The filter is a whitespace-separated list of shell wildcard patterns. (note that they may need to be escaped accordingly to prevent
-#                      the shell from expanding them first). Every file entry in tracefile which matches at least one of those patterns will be removed.
-#
-#   - create baseline coverage data file (base.info) with '-i|--initial' option
-#   - create test coverage data file (test.info)
-#   - combine baseline and test coverage data to create the final "info" file
-#   - remove particular coverage data specifiled by the remove_filter (no change if remove_filter is null)
-#
-# Then, on success, generate an HTML-based coverage report using genhtml.
-#
-define generate-coverage-report-with-filter
-$(NL_V_LCOV)$(LCOV) $(NL_V_LCOV_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" --initial --capture --directory "$(1)" --output-file "base.info"
-$(NL_V_LCOV)$(LCOV) $(NL_V_LCOV_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" --capture --directory "$(1)" --output-file "test.info"
-$(NL_V_LCOV)$(LCOV) $(NL_V_LCOV_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" --add-tracefile "base.info" --add-tracefile "test.info" --output-file "$(@)"
-$(NL_V_LCOV)$(LCOV) $(NL_V_LCOV_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" --remove "$(@)" $(foreach pattern,$(2),"$(pattern)") --output-file "$(@)"
-$(NL_V_GENHTML)$(GENHTML) $(NL_V_GENHTML_FLAGS) --config-file="$(abs_top_nlbuild_autotools_dir)/etc/lcov.config" "$(@)" --output-directory "$(@D)"
-endef # generate-coverage-report-with-filter
-
-
diff --git a/third_party/nlbuild-autotools/repo/automake/pre/macros/paths.am b/third_party/nlbuild-autotools/repo/automake/pre/macros/paths.am
deleted file mode 100644
index 892b7cc..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre/macros/paths.am
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-#    Copyright 2010-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines automake macros for manipulating and querying
-#      paths.
-#
-
-# Deslashify <path> ...
-#
-# Ensure that there is NO trailing directory delimiter at the end of
-# the specified path.
-
-Deslashify          = $(patsubst %$(Slash),%,$(1))
-
-# Slashify <path> ...
-#
-# Ensure that there is a single trailing directory delimiter at the
-# end of the specified path.
-
-Slashify            = $(addsuffix $(Slash),$(call Deslashify,$(1)))
-
-#
-# IsRealPath <path>
-#
-# If the path is a real rather than symbolic link path, the path is returned. 
-
-IsRealPath          = $(if $(patsubst $(realpath $(1)),,$(abspath $(1))),,$(1))
diff --git a/third_party/nlbuild-autotools/repo/automake/pre/macros/pretty.am b/third_party/nlbuild-autotools/repo/automake/pre/macros/pretty.am
deleted file mode 100644
index a983c29..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre/macros/pretty.am
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#    Copyright 2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines automake variables for performing coding
-#      style formatting and checking.
-#
-
-AM_V_PRETTY          = $(am__v_PRETTY_$(V))
-am__v_PRETTY_        = $(am__v_PRETTY_$(AM_DEFAULT_VERBOSITY))
-am__v_PRETTY_0       = echo "  PRETTY   $${file}";
-am__v_PRETTY_1       = 
-
-AM_V_PRETTY_CHECK    = $(am__v_PRETTY_CHECK_$(V))
-am__v_PRETTY_CHECK_  = $(am__v_PRETTY_CHECK_$(AM_DEFAULT_VERBOSITY))
-am__v_PRETTY_CHECK_0 = echo "  PRETTY   $${file}";
-am__v_PRETTY_CHECK_1 = 
-
-# PRETTY_FILES
-#
-# This defines the collection of files against which the PRETTY and
-# PRETTY_CHECK profiles will be invoked for the 'pretty' and
-# 'pretty-check' targets, respectively.
-#
-# This defaults to SOURCES and HEADERS and may be overriden or
-# appended to.
-
-PRETTY_FILES    ?= $(SOURCES) $(HEADERS)
-
-# PRETTY_SUBDIRS
-#
-# This defines the subdirectories for which the recursive 'pretty' and
-# 'pretty-check' targets will run against.
-#
-# This defaults to SUBDIRS and may be overridden or appended to.
-
-PRETTY_SUBDIRS  ?= $(SUBDIRS)
-
diff --git a/third_party/nlbuild-autotools/repo/automake/pre/macros/subdirs.am b/third_party/nlbuild-autotools/repo/automake/pre/macros/subdirs.am
deleted file mode 100644
index 174cefe..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre/macros/subdirs.am
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines automake variables and macros common to all
-#      other automake headers and files for invoking make in a list
-#      of subdirectories with a list of target goals.
-#
-
-#
-# nl-make-subdirs-with-dirs-and-goals <subdirectories> <goals>
-#
-# This iteratively invokes make with the provided target goals in each
-# subdirectory specified.
-#
-#   subdirectories  A space-delimited list of subdirectories in which to
-#                   invoke make with the provided target goals.
-#
-#   goals           A space-delimited list of target goals to
-#                   attempt to make in each specified subdirectory.
-#
-define nl-make-subdirs-with-dirs-and-goals
-+$(AM_V_at)for subdir in $(1); do \
-    echo "Making $(2) in $${subdir}"; \
-    $(MAKE) -C "$${subdir}" $(AM_MAKEFLAGS) $(2) \
-    || exit 1; \
-done
-endef # nl-make-subdirs-with-dirs-and-goals
-
-#
-# nl-make-subdirs-with-dirs <subdirectories>
-#
-# This iteratively invokes make with the target goals defined in
-# MAKECMDGOALS in each subdirectory specified.
-#
-#   subdirectories  A space-delimited list of subdirectories in which to
-#                   invoke make with the provided target goals.
-#
-define nl-make-subdirs-with-dirs
-$(call nl-make-subdirs-with-dirs-and-goals,$(1),$(MAKECMDGOALS))
-endef # nl-make-subdirs-with-dirs
-
-#
-# nl-make-subdirs-with-goals <goals>
-#
-# This iteratively invokes make with the provided target goals in the
-# subdirectories defined in SUBDIRS.
-#
-#   goals           A space-delimited list of target goals to
-#                   attempt to make in SUBDIRS.
-#
-define nl-make-subdirs-with-goals
-$(call nl-make-subdirs-with-dirs-and-goals,$(SUBDIRS),$(1))
-endef # nl-make-subdirs-with-goals
-
-#
-# nl-make-subdirs
-#
-# This iteratively invokes make with the target goals defined in
-# MAKECMDGOALS in the subdirectories defined in SUBDIRS.
-#
-define nl-make-subdirs
-$(call nl-make-subdirs-with-dirs-and-goals,$(SUBDIRS),$(MAKECMDGOALS))
-endef # nl-make-subdirs
diff --git a/third_party/nlbuild-autotools/repo/automake/pre/macros/verbosity.am b/third_party/nlbuild-autotools/repo/automake/pre/macros/verbosity.am
deleted file mode 100644
index 6f72bd6..0000000
--- a/third_party/nlbuild-autotools/repo/automake/pre/macros/verbosity.am
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-#    Copyright 2014-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file defines automake variables common to all other
-#      automake headers and files for silent-rules-style (V=[0|1]) build
-#      verbosity output.
-#
-
-AM_V_LN_S       = $(am__v_LN_S_$(V))
-am__v_LN_S_     = $(am__v_LN_S_$(AM_DEFAULT_VERBOSITY))
-am__v_LN_S_0    = @echo "  LN       $(@)";
-am__v_LN_S_1    = 
-
-AM_V_MKDIR_P    = $(am__v_MKDIR_P_$(V))
-am__v_MKDIR_P_  = $(am__v_MKDIR_P_$(AM_DEFAULT_VERBOSITY))
-am__v_MKDIR_P_0 = @echo "  MKDIR    $(@)";
-am__v_MKDIR_P_1 = 
-
-
-
diff --git a/third_party/nlbuild-autotools/repo/etc/lcov.config b/third_party/nlbuild-autotools/repo/etc/lcov.config
deleted file mode 100644
index d4ee495..0000000
--- a/third_party/nlbuild-autotools/repo/etc/lcov.config
+++ /dev/null
@@ -1,148 +0,0 @@
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is an lcov configuration file based on the default
-#      from /etc/lcovrc. The key difference is the inclusion of
-#      'genhtml_branch_coverage = 1' and lcov_branch_coverage = 1' to
-#      ensure that branch coverage is reported.
-#
-
-# External style sheet file
-#genhtml_css_file = gcov.css
-
-# Coverage rate limits
-genhtml_hi_limit = 90
-genhtml_med_limit = 75
-
-# Width of line coverage field in source code view
-genhtml_line_field_width = 12
-
-# Width of branch coverage field in source code view
-genhtml_branch_field_width = 16
-
-# Width of overview image
-genhtml_overview_width = 80
-
-# Resolution of overview navigation
-genhtml_nav_resolution = 4
-
-# Offset for source code navigation
-genhtml_nav_offset = 10
-
-# Do not remove unused test descriptions if non-zero
-genhtml_keep_descriptions = 0
-
-# Do not remove prefix from directory names if non-zero
-genhtml_no_prefix = 0
-
-# Do not create source code view if non-zero
-genhtml_no_source = 0
-
-# Specify size of tabs
-genhtml_num_spaces = 8
-
-# Highlight lines with converted-only data if non-zero
-genhtml_highlight = 0
-
-# Include color legend in HTML output if non-zero
-genhtml_legend = 0
-
-# Include HTML file at start of HTML output
-#genhtml_html_prolog = prolog.php
-
-# Include HTML file at end of HTML output
-#genhtml_html_epilog = epilog.php
-
-# Use custom HTML file extension
-#genhtml_html_extension = html
-
-# Compress all generated html files with gzip.
-#genhtml_html_gzip = 1
-
-# Include sorted overview pages
-genhtml_sort = 1
-
-# Include function coverage data display
-#genhtml_function_coverage = 1
-
-# Include branch coverage data display
-genhtml_branch_coverage = 1
-
-# Specify the character set of all generated HTML pages
-genhtml_charset=UTF-8
-
-# Allow HTML markup in test case description text if non-zero
-genhtml_desc_html=0
-
-# Location of the gcov tool
-#geninfo_gcov_tool = gcov
-
-# Adjust test names if non-zero
-#geninfo_adjust_testname = 0
-
-# Calculate a checksum for each line if non-zero
-geninfo_checksum = 0
-
-# Enable libtool compatibility mode if non-zero
-geninfo_compat_libtool = 0
-
-# Specify whether to capture coverage data for external source
-# files
-#geninfo_external = 1
-
-# Use gcov’s --all-blocks option if non-zero
-#geninfo_gcov_all_blocks = 1
-
-# Specify compatiblity modes (same as --compat option
-# of geninfo)
-#geninfo_compat = libtool=on, hammer=auto, split_crc=auto
-
-# Adjust path to source files by removing or changing path
-# components that match the specified pattern (Perl regular
-# expression format)
-#geninfo_adjust_src_path = /tmp/build => /usr/src
-
-# Specify if geninfo should try to automatically determine
-# the base-directory when collecting coverage data.
-geninfo_auto_base = 1
-
-# Directory containing gcov kernel files
-lcov_gcov_dir = /proc/gcov
-
-# Location for temporary directories
-lcov_tmp_dir = /tmp
-
-# Show full paths during list operation if non-zero
-lcov_list_full_path = 0
-
-# Specify the maximum width for list output. This value is
-# ignored when lcov_list_full_path is non-zero.
-lcov_list_width = 80
-
-# Specify the maximum percentage of file names which may be
-# truncated when choosing a directory prefix in list output.
-# This value is ignored when lcov_list_full_path is non-zero.
-lcov_list_truncate_max = 20
-
-# Specify if function coverage data should be collected and
-# processed.
-lcov_function_coverage = 1
-
-# Specify if branch coverage data should be collected and
-# processed.
-lcov_branch_coverage = 1
diff --git a/third_party/nlbuild-autotools/repo/examples/Doxyfile.in b/third_party/nlbuild-autotools/repo/examples/Doxyfile.in
deleted file mode 100644
index dd1c6ea..0000000
--- a/third_party/nlbuild-autotools/repo/examples/Doxyfile.in
+++ /dev/null
@@ -1,2371 +0,0 @@
-# Doxyfile 1.8.6
-
-#
-#    Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file describes the settings to be used by the
-#      documentation system # doxygen (www.doxygen.org)
-#
-#      This was initially autogenerated 'doxywizard' and then hand-tuned.
-#
-#      All text after a hash (#) is considered a comment and will be
-#      ignored.
-#
-#      The format is:
-#
-#          TAG = value [value, ...]
-#
-#      For lists items can also be appended using:
-#
-#          TAG += value [value, ...]
-#
-#      Values that contain spaces should be placed between quotes (" ")
-#
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME           = @PACKAGE_NAME@
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER         = @PACKAGE_VERSION@
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF          =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
-
-PROJECT_LOGO           =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = @abs_builddir@
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS         = YES
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF       = "The $name class" \
-                         "The $name widget" \
-                         "The $name file" \
-                         is \
-                         provides \
-                         specifies \
-                         contains \
-                         represents \
-                         a \
-                         an \
-                         the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES        = YES
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH        = @abs_top_srcdir@ \
-                         @abs_top_builddir@
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH    = @abs_top_srcdir@
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF      = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE               = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES                =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST              =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C.
-#
-# Note For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT       = YES
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS  = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC         = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC  = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if <section_label> ... \endif and \cond <section_label>
-# ... \endcond blocks.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES        = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE            =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
-
-CITE_BIB_FILES         =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS               = YES
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE           =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
-# Note: If this tag is empty the current directory is searched.
-
-INPUT                  = @abs_top_builddir@/src \
-                         @abs_top_srcdir@/include \
-                         @abs_top_srcdir@/doc
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
-
-FILE_PATTERNS          = *.c \
-                         *.cc \
-                         *.cxx \
-                         *.cpp \
-                         *.c++ \
-                         *.d \
-                         *.java \
-                         *.ii \
-                         *.ixx \
-                         *.ipp \
-                         *.i++ \
-                         *.inl \
-                         *.h \
-                         *.hh \
-                         *.hxx \
-                         *.hpp \
-                         *.h++ \
-                         *.idl \
-                         *.odl \
-                         *.cs \
-                         *.php \
-                         *.php3 \
-                         *.inc \
-                         *.m \
-                         *.mm \
-                         *.dox \
-                         *.py \
-                         *.f90 \
-                         *.f \
-                         *.for \
-                         *.vhd \
-                         *.vhdl
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE              = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH           =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS       = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH             =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-# <filter> <input-file>
-#
-# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS        = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX     = YES
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER            =
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER            =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET        =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET  =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET        = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP      = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE               =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION           =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI           = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING     =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX          = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW      = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE   = 1
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH         = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT         = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS     =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE       =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use <access key> + S
-# (what the <access key> is depends on the OS and browser, but it is typically
-# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
-# key> to jump into the search results window, the results can be navigated
-# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
-# to select a filter and <Enter> or <escape> to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE           = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavours of web server based searching depending on the
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
-# searching and an index file used by the script. When EXTERNAL_SEARCH is
-# enabled the indexing and searching needs to be provided by external tools. See
-# the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH    = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH        = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL       =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE        = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID     =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS  =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES         =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
-# replace them by respectively the title of the page, the current date and time,
-# only the current date, the version number of doxygen, the project name (see
-# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER           =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES      =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS         = YES
-
-# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE        = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES     = NO
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE        = plain
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_DTD                =
-
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK       = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT         = docbook
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED             =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all refrences to function-like macros that are alone on a line, have an
-# all uppercase name, and do not end with a semicolon. Such function macros are
-# typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have an unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES               =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE       =
-
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
-# The default value is: NO.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS        = YES
-
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES         = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH              = @PERL@
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH               =
-
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: NO.
-
-HAVE_DOT               = @DOXYGEN_USE_DOT@
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS        = 0
-
-# When you want a differently looking font n the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK               = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS   = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH          = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH             = YES
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH           = YES
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, jpg, gif and svg.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT       = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG        = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS           =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS           =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS      = YES
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP            = YES
diff --git a/third_party/nlbuild-autotools/repo/examples/Makefile-bootstrap b/third_party/nlbuild-autotools/repo/examples/Makefile-bootstrap
deleted file mode 100644
index e3e84b8..0000000
--- a/third_party/nlbuild-autotools/repo/examples/Makefile-bootstrap
+++ /dev/null
@@ -1,116 +0,0 @@
-#
-#    Copyright 2019 Google LLC. All Rights Reserved.
-#    Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the makefile for inlining optional and required
-#      third-party packages as package-internal copies and for providing
-#      convenience targets for bootstrapping the GNU autotools-based build
-#      system used by this package.
-#
-#      If your package has dependent git repositories that you might
-#      otherwise be inclined to subtree in, you can define a
-#      "repos.conf" file at the top of your project that enumerates
-#      the repositories, the branch thereof, and where to put it in
-#      your project. An example is shown below:
-#
-#        [submodule "nlassert"]
-#            path = third_party/nlassert/repo
-#            url = git@github.com:nestlabs/nlassert.git
-#            branch = master
-#            update = none
-#        [submodule "nlunit-test"]
-#            path = third_party/nlunit-test/repo
-#            url = git@github.com:nestlabs/nlunit-test.git
-#            branch = master
-#            commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f
-#            update = none
-#
-
-ThisMakefile                     := $(firstword $(MAKEFILE_LIST))
-
-builddir                         ?= .
-abs_builddir                     ?= $(realpath $(builddir))
-top_builddir                     ?= $(builddir)
-abs_top_builddir                 ?= $(realpath $(top_builddir))
-srcdir                           ?= $(dir $(realpath $(ThisMakefile)))
-abs_srcdir                       ?= $(realpath $(srcdir))
-top_srcdir                       ?= $(srcdir)
-abs_top_srcdir                   ?= $(realpath $(top_srcdir))
-
-nlbuild_autotools_stem           ?= @NLBUILD_AUTOTOOLS_STEM@
-abs_top_nlbuild_autotools_dir    ?= $(abs_top_srcdir)/$(nlbuild_autotools_stem)
-
-include $(abs_top_nlbuild_autotools_dir)/make/pre.mak
-include $(abs_top_nlbuild_autotools_dir)/make/host/tools/bootstrap.mak
-
-# If repos have been defined, create them as the default target goal;
-# otherwise, default to help.
-
-ifneq ($(REPOS),)
-.DEFAULT_GOAL                    := repos
-else
-.DEFAULT_GOAL                    := help
-endif # REPOS
-
-#
-# Add any project-specific bootstrap help commands to this
-# 'help-hook' target.
-#
-# These commands will be executed AFTER the core bootstrap 'help'
-# target commands.
-#
-help-hook:
-
-#
-# Add any project-specific bootstrap help commands to this
-# 'help-bootstrap-hook' target.
-#
-# These commands will be executed AFTER the core bootstrap 'help' and
-# 'help-bootstrap' target commands.
-#
-help-bootstrap-hook:
-
-#
-# Add any project-specific bootstrap help commands to this
-# 'help-repos-hook' target.
-#
-# These commands will be executed AFTER the core bootstrap 'help' and
-# 'help-repos' target commands.
-#
-help-repos-hook:
-
-#
-# Add any project-specific bootstrap repos commands to this
-# 'repos-hook' target.
-#
-# These commands will be executed AFTER the core bootstrap 'repos'
-# target commands.
-#
-repos-hook:
-
-#
-# Add any project-specific bootstrap repos commands to this
-# 'clean-repos-hook' target.
-#
-# These commands will be executed BEFORE the core bootstrap 'clean-repos'
-# target commands.
-#
-clean-repos-hook:
-
-include $(abs_top_nlbuild_autotools_dir)/make/post.mak
-include $(abs_top_nlbuild_autotools_dir)/make/post/rules/bootstrap.mak
diff --git a/third_party/nlbuild-autotools/repo/examples/Makefile-doc.am b/third_party/nlbuild-autotools/repo/examples/Makefile-doc.am
deleted file mode 100644
index ffd7ef1..0000000
--- a/third_party/nlbuild-autotools/repo/examples/Makefile-doc.am
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-#    Copyright 2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the GNU automake template for the @PACKAGE_DESCRIPTION@
-#      in-package, documentation.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-EXTRA_DIST                                      = \
-    $(srcdir)/Doxyfile.in                         \
-    $(NULL)
-
-#
-# Override autotool's default notion of the package version variables.
-# This ensures that when we create a doc distribution that the
-# version is always the current version, not the version when the
-# package was bootstrapped.
-#
-PACKAGE_VERSION                                 = $(shell cat $(top_builddir)/.local-version)
-VERSION                                         = $(PACKAGE_VERSION)
-
-
-docdistdir                                     ?= .
-
-@PACKAGE_SHORT_LOWER@_docdist_alias             = \
-    $(PACKAGE_TARNAME)-docs
-
-@PACKAGE_SHORT_LOWER@_docdist_name              = \
-    $(@PACKAGE_SHORT_LOWER@_docdist_alias)-$(VERSION)
-
-@PACKAGE_SHORT_LOWER@_docdist_archive           = \
-    $(docdistdir)/$(@PACKAGE_SHORT_LOWER@_docdist_name).tar.gz
-
-CLEANFILES                                      = \
-    Doxyfile                                      \
-    $(@PACKAGE_SHORT_LOWER@_docdist_archive)      \
-    $(NULL)
-
-if @PACKAGE_SHORT_UPPER@_BUILD_DOCS
-
-all-local: html/index.html
-
-#
-# We choose to manually transform Doxyfile.in into Doxyfile here in
-# the makefile rather than in the configure script so that we can take
-# advantage of live, at build time (rather than at configure time),
-# updating of the package version number.
-#
-
-Doxyfile: $(srcdir)/Doxyfile.in Makefile
-	$(AM_V_GEN)$(SED)                                     \
-	    -e "s,\@DOXYGEN_USE_DOT\@,$(DOXYGEN_USE_DOT),g"   \
-	    -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g"         \
-	    -e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g"   \
-	    -e "s,\@PERL\@,$(PERL),g"                         \
-	    -e "s,\@abs_builddir\@,$(abs_builddir),g"         \
-	    -e "s,\@abs_srcdir\@,$(abs_srcdir),g"             \
-	    -e "s,\@abs_top_builddir\@,$(abs_top_builddir),g" \
-	    -e "s,\@abs_top_srcdir\@,$(abs_top_srcdir),g"     \
-	    < "$(srcdir)/Doxyfile.in" > "$(@)"
-
-html/index.html: Doxyfile
-	$(AM_V_GEN)$(DOXYGEN) $(<)
-
-#
-# Addition rules and commands to create a documentation-only
-# distribution of @PACKAGE_SHORT_LOWER@
-#
-
-$(@PACKAGE_SHORT_LOWER@_docdist_name): html/index.html
-	$(AM_V_at)rm -f -r $(@)
-	$(call create-directory)
-	$(AM_V_at)cp -R html $(@)
-
-$(@PACKAGE_SHORT_LOWER@_docdist_archive): $(@PACKAGE_SHORT_LOWER@_docdist_name)
-	$(AM_V_at)echo "  TAR      $(@)"
-	$(AM_V_at)tardir="$(<)" && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c > "$(@)" && rm -rf $(<)
-
-docdist $(@PACKAGE_SHORT_LOWER@_docdist_alias): $(@PACKAGE_SHORT_LOWER@_docdist_archive)
-
-clean-local:
-	$(AM_V_at)rm -f -r html
-
-endif # @PACKAGE_SHORT_UPPER@_BUILD_DOCS
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/third_party/nlbuild-autotools/repo/examples/Makefile-src.am b/third_party/nlbuild-autotools/repo/examples/Makefile-src.am
deleted file mode 100644
index 655cbcb..0000000
--- a/third_party/nlbuild-autotools/repo/examples/Makefile-src.am
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-#    Copyright 2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the GNU automake template for the @PACKAGE_DESCRIPTION@.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-lib_LIBRARIES                       = lib@PACKAGE_SHORT_LOWER@.a
-
-lib@PACKAGE_SHORT_LOWER@_a_CPPFLAGS = \
-    -I$(top_srcdir)/include           \
-    $(NULL)
-
-lib@PACKAGE_SHORT_LOWER@_a_SOURCES  = @PACKAGE_SHORT_LOWER@.c
-
-include_HEADERS                     = \
-    @PACKAGE_SHORT_LOWER@.h           \
-    $(NULL)
-
-install-headers: install-includeHEADERS
-
-if @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE
-CLEANFILES                          = $(wildcard *.gcda *.gcno)
-endif # @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/third_party/nlbuild-autotools/repo/examples/Makefile-tests.am b/third_party/nlbuild-autotools/repo/examples/Makefile-tests.am
deleted file mode 100644
index 19d50e3..0000000
--- a/third_party/nlbuild-autotools/repo/examples/Makefile-tests.am
+++ /dev/null
@@ -1,107 +0,0 @@
-#
-#    Copyright 2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the GNU automake template for the @PACKAGE_DESCRIPTION@
-#      unit tests.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-#
-# Local headers to build against and distribute but not to install
-# since they are not part of the package.
-#
-noinst_HEADERS                                 = \
-    @PACKAGE_SHORT_LOWER@-test.h                 \
-    $(NULL)
-
-#
-# Other files we do want to distribute with the package.
-#
-EXTRA_DIST                                     = \
-    $(NULL)
-
-if @PACKAGE_SHORT_UPPER@_BUILD_TESTS
-# C preprocessor option flags that will apply to all compiled objects in this
-# makefile.
-
-AM_CPPFLAGS                                    = \
-    -I$(top_srcdir)/include                      \
-    $(NULL)
-
-COMMON_LDADD                                   = \
-    -L${top_builddir}/src -l@PACKAGE_SHORT_LOWER@
-    $(NULL)
-
-# Test applications that should be run when the 'check' target is run.
-
-check_PROGRAMS                                 = \
-    @PACKAGE_SHORT_LOWER@-test                   \
-    @PACKAGE_SHORT_LOWER@-test-cxx               \
-    $(NULL)
-
-# Test applications and scripts that should be built and run when the
-# 'check' target is run.
-
-TESTS                                          = \
-    $(check_PROGRAMS)                            \
-    $(NULL)
-
-# The additional environment variables and their values that will be
-# made available to all programs and scripts in TESTS.
-
-TESTS_ENVIRONMENT                              = \
-    $(NULL)
-
-# Source, compiler, and linker options for test programs.
-
-@PACKAGE_SHORT_LOWER@_test_LDADD               = $(COMMON_LDADD)
-@PACKAGE_SHORT_LOWER@_test_SOURCES             = @PACKAGE_SHORT_LOWER@-test.c                 
-
-@PACKAGE_SHORT_LOWER@_test_cxx_LDADD           = $(COMMON_LDADD)
-@PACKAGE_SHORT_LOWER@_test_cxx_SOURCES         = @PACKAGE_SHORT_LOWER@-test-cxx.cpp           
-
-if @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE
-CLEANFILES                                     = $(wildcard *.gcda *.gcno)
-
-if @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE_REPORTS
-# The bundle should positively be qualified with the absolute build
-# path. Otherwise, VPATH will get auto-prefixed to it if there is
-# already such a directory in the non-colocated source tree.
-
-@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE                           = ${abs_builddir}/${PACKAGE}${NL_COVERAGE_BUNDLE_SUFFIX}
-@PACKAGE_SHORT_UPPER@_COVERAGE_INFO                             = ${@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE}/${PACKAGE}${NL_COVERAGE_INFO_SUFFIX}
-
-$(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE):
-	$(call create-directory)
-
-$(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO): check-local | $(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE)
-	$(call generate-coverage-report,${top_builddir})
-
-coverage-local: $(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO)
-
-clean-local: clean-local-coverage
-
-.PHONY: clean-local-coverage
-clean-local-coverage:
-	-$(AM_V_at)rm -rf $(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE)
-endif # @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE_REPORTS
-endif # @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE
-endif # @PACKAGE_SHORT_UPPER@_BUILD_TESTS
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/third_party/nlbuild-autotools/repo/examples/Makefile-third_party.am b/third_party/nlbuild-autotools/repo/examples/Makefile-third_party.am
deleted file mode 100644
index 7bd0be5..0000000
--- a/third_party/nlbuild-autotools/repo/examples/Makefile-third_party.am
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the GNU automake template for the @PACKAGE_DESCRIPTION@
-#      third-party software directory.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-# Always package (e.g. for 'make dist') these subdirectories.
-
-DIST_SUBDIRS             = \
-    $(NULL)
-
-# Here is an example with nlunit-test. Uncomment and adapt or delete
-# this, as needed. If you choose to use this, please also take a look at
-# configure.ac and Makefile.am and uncomment the appropriate sections
-# there.
-
-# # NLUNIT_TEST_SUBDIRS is not a permanent part of DIST_SUBDIRS since we do not
-# # ever want to include it in a distribution archive; however, when it's been
-# # pulled as a 'repo' module, we do want to remove it on invocation of the
-# # 'distclean' target. Consequently, we conditionally include it in DIST_SUBDIRS
-# # on invocation of 'distclean-recursive'
-#
-# distclean-recursive: DIST_SUBDIRS += $(NLUNIT_TEST_SUBDIRS)
-
-# Always build (e.g. for 'make all') these subdirectories.
-# #
-# # The value of NLUNIT_TEST_SUBDIRS will be populated by configure if
-# # --with-nlunit_test=internal
-
-SUBDIRS                           = \
-    $(NLUNIT_TEST_SUBDIRS)          \
-    $(NULL)
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/third_party/nlbuild-autotools/repo/examples/Makefile-toplevel.am b/third_party/nlbuild-autotools/repo/examples/Makefile-toplevel.am
deleted file mode 100644
index 5786e91..0000000
--- a/third_party/nlbuild-autotools/repo/examples/Makefile-toplevel.am
+++ /dev/null
@@ -1,193 +0,0 @@
-#
-#    Copyright (c) 2016-2018 Nest Labs Inc. All Rights Reserved.
-#    Copyright (c) 2018 Google LLC. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the GNU automake template for the @PACKAGE_DESCRIPTION@.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
-
-AM_MAKEFLAGS                              = --no-print-directory
-
-SUBDIRS                                   = \
-    include                                 \
-    src                                     \
-    tests                                   \
-    doc                                     \
-    $(NULL)
-
-EXTRA_DIST                                = \
-    Makefile-bootstrap                      \
-    .default-version                        \
-    bootstrap                               \
-    bootstrap-configure                     \
-    $(srcdir)/third_party/nlbuild-autotools \
-    $(NULL)
-
-BUILT_SOURCES                             = \
-    .local-version                          \
-    $(NULL)
-
-dist_doc_DATA                             = \
-    $(NULL)
-
-DISTCLEANFILES                            = \
-    .local-version                          \
-    $(NULL)
-
-#
-# Package version files:
-#
-# .default-version - The default package version. This file is ALWAYS checked
-#                    in and should always represent the current baseline
-#                    version of the package.
-#
-# .dist-version    - The distributed package version. This file is NEVER
-#                    checked in within the upstream repository, is auto-
-#                    generated, and is only found in the package distribution.
-#
-# .local-version   - The current source code controlled package version. This
-#                    file is NEVER checked in within the upstream repository,
-#                    is auto-generated, and can always be found in both the
-#                    build tree and distribution.
-#
-# When present, the .local-version file is preferred first, the
-# .dist-version second, and the .default-version last.
-#
-
-# VERSION_FILE should be and is intentionally an immediate (:=) rather
-# than a deferred (=) variable to ensure the value binds once and only once
-# for a given MAKELEVEL even as .local-version and .dist-version are created
-# during makefile execution.
-
-VERSION_FILE                      := $(if $(wildcard $(builddir)/.local-version),$(builddir)/.local-version,$(if $(wildcard $(srcdir)/.dist-version),$(srcdir)/.dist-version,$(srcdir)/.default-version))
-
-#
-# Override autotool's default notion of the package version variables.
-# This ensures that when we create a source distribution the
-# version is always the current version, not the package bootstrap
-# version.
-#
-# The two-level variables and the check against MAKELEVEL ensures that
-# not only can the package version be overridden from the command line
-# but also when the version is NOT overridden that we bind the version
-# once and only once across potential sub-makes to prevent the version
-# from flapping as VERSION_FILE changes.
-#
-
-export MAYBE_@PACKAGE_SHORT_UPPER@_VERSION        := $(if $(filter 0,$(MAKELEVEL)),$(shell cat $(VERSION_FILE) 2> /dev/null),$(MAYBE_@PACKAGE_SHORT_UPPER@_VERSION))
-
-@PACKAGE_SHORT_UPPER@_VERSION                     ?= $(MAYBE_@PACKAGE_SHORT_UPPER@_VERSION)
-
-PACKAGE_VERSION                    = $(@PACKAGE_SHORT_UPPER@_VERSION)
-VERSION                            = $(PACKAGE_VERSION)
-
-#
-# check-file-.local-version
-#
-# Speculatively regenerate .local-version and check to see if it needs
-# to be updated.
-#
-# If @PACKAGE_SHORT_UPPER@_VERSION has been supplied anywhere other than in this file
-# (which is implicitly the contents of .local-version), then use that;
-# otherwise, attempt to generate it from the SCM system.
-#
-# This is called from $(call check-file,.local-version).
-#
-define check-file-.local-version
-if [ "$(origin @PACKAGE_SHORT_UPPER@_VERSION)" != "file" ]; then \
-    echo "$(@PACKAGE_SHORT_UPPER@_VERSION)" > "$(2)";            \
-else                                                             \
-    $(abs_top_nlbuild_autotools_dir)/scripts/mkversion           \
-        -b "$(@PACKAGE_SHORT_UPPER@_VERSION)" "$(top_srcdir)"    \
-        > "$(2)";                                                \
-fi
-endef
-
-#
-# check-file-.dist-version
-#
-# Speculatively regenerate .dist-version and check to see if it needs
-# to be updated.
-#
-# This is called from $(call check-file,.dist-version).
-#
-define check-file-.dist-version
-cat "$(1)" > "$(2)"
-endef
-
-#
-# A convenience target to allow package users to easily rerun the
-# package configuration according to the current configuration.
-#
-.PHONY: reconfigure
-reconfigure: $(builddir)/config.status
-	$(AM_V_at)$(<) --recheck
-
-#
-# Version file regeneration rules.
-#
-.PHONY: force
-
-$(builddir)/.local-version: $(srcdir)/.default-version force
-
-$(distdir)/.dist-version: $(builddir)/.local-version force
-
-$(distdir)/.dist-version $(builddir)/.local-version:
-	$(call check-file,$(@F))
-
-# If you are synchronizing a package on which yours depends using 'repos.conf',
-# to 'third_party', uncomment and adapt or delete this, as needed. If you choose
-# to use this, please also take a look at Makefile.am and third_party/Makefile.am
-# and uncomment the appropriate sections there.
-
-# #
-# # When we run 'distcheck' and --with-nlunit_test defaults to 'internal',
-# # the nlbuild-autotools infrastructure will attempt to create git paths
-# # to manage the nlunit-test repo. Two directories need to be writable
-# # to facilitate this.
-# #
-# DISTCHECK_CONFIGURE_FLAGS=`chmod u+w .. ../third_party`
-
-dist distcheck distdir install-headers: $(BUILT_SOURCES)
-
-dist-hook: $(distdir)/.dist-version
-
-# If you are synchronizing a package on which yours depends using 'repos.conf',
-# to 'third_party', uncomment and adapt or delete this, as needed. If you choose
-# to use this, please also take a look at Makefile.am and third_party/Makefile.am
-# and uncomment the appropriate sections there.
-
-# #
-# # Ensure any locally synchronized repositories defined by 'repos.conf'
-# # are cleaned up.
-# #
-# distclean-local:
-# 	$(MAKE) -C $(srcdir) -f Makefile-bootstrap clean-repos
-
-#
-# Top-level convenience target for making a documentation-only
-# distribution whose results appear at the top level of the build tree
-# in the same fashion that the distribution would be for 'make dist'.
-#
-
-.PHONY: docdist
-docdist: $(BUILT_SOURCES)
-	$(MAKE) -C doc docdistdir=$(abs_builddir) $(@)
-
-include $(abs_top_nlbuild_autotools_dir)/automake/post.am
diff --git a/third_party/nlbuild-autotools/repo/examples/bootstrap b/third_party/nlbuild-autotools/repo/examples/bootstrap
deleted file mode 100755
index 60504b4..0000000
--- a/third_party/nlbuild-autotools/repo/examples/bootstrap
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-#
-#    Copyright 2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is a trampoline script to the nlbuild-autotools
-#      bootstrap script and augments it by providing the path to the
-#      nlbuild-autotools repository for this project.
-#
-
-# Set this to the relative location of nlbuild-autotools to this script
-
-nlbuild_autotools_stem="third_party/nlbuild-autotools/repo"
-
-# Establish some key directories
-
-srcdir=`dirname ${0}`
-abs_srcdir=`pwd`
-abs_top_srcdir="${abs_srcdir}"
-
-exec ${srcdir}/${nlbuild_autotools_stem}/scripts/bootstrap -I "${abs_top_srcdir}/${nlbuild_autotools_stem}" $*
diff --git a/third_party/nlbuild-autotools/repo/examples/configure.ac b/third_party/nlbuild-autotools/repo/examples/configure.ac
deleted file mode 100644
index 4de4270..0000000
--- a/third_party/nlbuild-autotools/repo/examples/configure.ac
+++ /dev/null
@@ -1,459 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-#
-#    Copyright 2016-2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the GNU autoconf input source file for
-#      @PACKAGE_DESCRIPTION@.
-#
-
-#
-# Declare autoconf version requirements
-#
-AC_PREREQ([2.68])
-
-#
-# Initialize autoconf for the package
-#
-AC_INIT([@PACKAGE_SHORT_LOWER@],
-        m4_esyscmd([@NLBUILD_AUTOTOOLS_STEM@/scripts/mkversion -b `cat .default-version` .]),
-        [@PACKAGE_EMAIL@],
-        [@PACKAGE_SHORT_LOWER@],
-        [@PACKAGE_URL@])
-
-# Tell the rest of the build system the absolute path where the
-# nlbuild-autotools repository is rooted at.
-
-AC_SUBST(nlbuild_autotools_stem,[@NLBUILD_AUTOTOOLS_STEM@])
-AC_SUBST(abs_top_nlbuild_autotools_dir,[\${abs_top_srcdir}/\${nlbuild_autotools_stem}])
-
-#
-# @PACKAGE_SHORT_UPPER@ interface current, revision, and age versions.
-#
-# Maintainters: Please manage these fields as follows:
-#
-#   Interfaces removed:    CURRENT++, AGE = 0, REVISION = 0
-#   Interfaces added:      CURRENT++, AGE++,   REVISION = 0
-#   No interfaces changed:                     REVISION++
-#
-#
-AC_SUBST(LIB@PACKAGE_SHORT_UPPER@_VERSION_CURRENT,  [1])
-AC_SUBST(LIB@PACKAGE_SHORT_UPPER@_VERSION_AGE,      [0])
-AC_SUBST(LIB@PACKAGE_SHORT_UPPER@_VERSION_REVISION, [0])
-AC_SUBST(LIB@PACKAGE_SHORT_UPPER@_VERSION_INFO,     [${LIB@PACKAGE_SHORT_UPPER@_VERSION_CURRENT}:${LIB@PACKAGE_SHORT_UPPER@_VERSION_REVISION}:${LIB@PACKAGE_SHORT_UPPER@_VERSION_AGE}])
-
-#
-# Check the sanity of the source directory by checking for the
-# presence of a key watch file
-#
-AC_CONFIG_SRCDIR([include/@PACKAGE_SHORT_LOWER@.h])
-
-#
-# Tell autoconf where to find auxilliary build tools (e.g. config.guess,
-# install-sh, missing, etc.)
-#
-AC_CONFIG_AUX_DIR([@NLBUILD_AUTOTOOLS_STEM@/third_party/autoconf])
-
-#
-# Tell autoconf where to find auxilliary M4 macros
-#
-AC_CONFIG_MACRO_DIRS([@NLBUILD_AUTOTOOLS_STEM@/third_party/autoconf/m4 @NLBUILD_AUTOTOOLS_STEM@/autoconf/m4])
-
-#
-# Tell autoconf what file the package is using to aggregate C preprocessor
-# defines.
-#
-AC_CONFIG_HEADERS([include/@PACKAGE_SHORT_LOWER@-config.h])
-
-#
-# Figure out what the canonical build, host and target tuples are.
-#
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
-
-#
-# Mac OS X / Darwin ends up putting some versioning cruft on the end of its
-# tuple that we don't care about in this script. Create "clean" variables
-# devoid of it.
-#
-
-NL_FILTERED_CANONICAL_BUILD
-NL_FILTERED_CANONICAL_HOST
-NL_FILTERED_CANONICAL_TARGET
-
-#
-# Configure automake with the desired options, indicating that this is not
-# a native GNU package, that we want "silent" build rules, and that we want
-# objects built in the same subdirectory as their source rather than collapsed
-# together at the top-level directory.
-#
-# Disable silent build rules by either passing --disable-silent-rules to
-# configure or passing V=1 to make
-#
-AM_INIT_AUTOMAKE([1.14 foreign silent-rules subdir-objects tar-pax])
-
-#
-# Silent build rules requires at least automake-1.11. Employ
-# techniques for not breaking earlier versions of automake.
-#
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-AM_SILENT_RULES([yes])
-
-#
-# Enable maintainer mode to prevent the package from constantly trying
-# to rebuild configure, Makefile.in, etc. Rebuilding such files rarely,
-# if ever, needs to be done "in the field".
-#
-# Use the included 'bootstrap' script instead when necessary.
-#
-AM_MAINTAINER_MODE
-
-#
-# Checks for build host programs
-#
-
-# If we are cross-compiling and we are on an embedded target that
-# doesn't support independent, standalone executables, then all
-# compiler tests that attempt to create an executable will fail. In
-# such circumstances, set AC_NO_EXECUTABLES (see http://sourceware.org/
-# ml/newlib/2006/msg00353.html).
-
-AC_MSG_CHECKING([whether to disable executable checking])
-if test "$cross_compiling" = yes; then
-    AC_NO_EXECUTABLES
-    AC_MSG_RESULT([yes])
-else
-    AC_MSG_RESULT([no])
-fi
-
-# Passing -Werror to GCC-based or -compatible compilers breaks some
-# autoconf tests (see
-# http://lists.gnu.org/archive/html/autoconf-patches/2008-09/msg00014.html).
-#
-# If -Werror has been passed transform it into -Wno-error. We'll
-# transform it back later with NL_RESTORE_WERROR.
-
-NL_SAVE_WERROR
-
-# Check for compilers.
-#
-# These should be checked BEFORE we check for and, implicitly,
-# initialize libtool such that libtool knows what languages it has to
-# work with.
-
-AC_PROG_CPP
-AC_PROG_CPP_WERROR
-
-AC_PROG_CC
-AC_PROG_CC_C_O
-
-AC_PROG_CXXCPP
-
-AC_PROG_CXX
-AC_PROG_CXX_C_O
-
-# Check for other compiler toolchain tools.
-
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib)
-AC_CHECK_TOOL(OBJCOPY, objcopy)
-AC_CHECK_TOOL(STRIP, strip)
-
-# Check for other host tools.
-
-AC_PROG_INSTALL
-AC_PROG_LN_S
-
-AC_PATH_PROG(CMP, cmp)
-AC_PATH_PROG(PERL, perl)
-
-#
-# Checks for specific compiler characteristics
-#
-
-#
-# Common compiler flags we would like to have.
-#
-#   -Wall                        CC, CXX
-#
-
-PROSPECTIVE_CFLAGS="-Wall"
-PROSPECTIVE_CXXFLAGS=""
-
-AX_CHECK_COMPILER_OPTIONS([C],   ${PROSPECTIVE_CFLAGS})
-AX_CHECK_COMPILER_OPTIONS([C++], ${PROSPECTIVE_CFLAGS} ${PROSPECTIVE_CXXFLAGS})
-
-# Check for and initialize libtool
-
-LT_INIT
-
-#
-# Debug instances
-#
-AC_MSG_NOTICE([checking whether to build debug instances])
-
-# Debug
-
-NL_ENABLE_DEBUG([no])
-
-AM_CONDITIONAL([@PACKAGE_SHORT_UPPER@_BUILD_DEBUG], [test "${nl_cv_build_debug}" = "yes"])
-
-#
-# Code coverage and compiler optimization
-#
-
-# Coverage
-
-NL_ENABLE_COVERAGE([no])
-
-AM_CONDITIONAL([@PACKAGE_SHORT_UPPER@_BUILD_COVERAGE], [test "${nl_cv_build_coverage}" = "yes"])
-
-NL_ENABLE_COVERAGE_REPORTS([auto])
-
-AM_CONDITIONAL([@PACKAGE_SHORT_UPPER@_BUILD_COVERAGE_REPORTS], [test "${nl_cv_build_coverage_reports}" = "yes"])
-
-# Optimization
-
-NL_ENABLE_OPTIMIZATION([yes])
-
-AM_CONDITIONAL([@PACKAGE_SHORT_UPPER@_BUILD_OPTIMIZED], [test "${nl_cv_build_optimized}" = "yes"])
-
-#
-# Tests
-#
-AC_MSG_NOTICE([checking whether to build tests])
-
-# Tests
-
-NL_ENABLE_TESTS([yes])
-
-AM_CONDITIONAL([@PACKAGE_SHORT_UPPER@_BUILD_TESTS], [test "${nl_cv_build_tests}" = "yes"])
-
-#
-# Documentation
-#
-
-# Determine whether or not documentation (via Doxygen) should be built
-# or not, with 'auto' as the default and establish a default support
-# value for GraphViz 'dot' support.
-
-NL_ENABLE_DOCS([auto],[NO])
-
-AM_CONDITIONAL(@PACKAGE_SHORT_UPPER@_BUILD_DOCS, [test "${nl_cv_build_docs}" = "yes"])
-
-#
-# Checks for libraries and packages.
-#
-# At minimum, the following packages are optional, depending on
-# configuration:
-#
-#   * TBD
-#
-AC_MSG_NOTICE([checking required package dependencies])
-
-# Check if the build host has pkg-config
-
-AC_PATH_PROG([PKG_CONFIG],[pkg-config])
-
-# Here is a package example with nlunit-test. Uncomment and adapt or delete
-# this, as needed. If you choose to use this, please also take a look at
-# Makefile.am and third_party/Makefile.am and uncomment the appropriate
-# sections there.
-
-# #
-# # Nlunit-test
-# #
-#
-# if test "${nl_cv_build_tests}" = "yes"; then
-#     NL_WITH_PACKAGE(
-#         [Nlunit-test],
-#         [NLUNIT_TEST],
-#         [nlunit_test],
-#         [-lnlunit-test],
-#         [
-# 	    # At this point, the internal Nlunit-test package will be neither
-# 	    # configured nor built, so the normal checks we undertake for an
-# 	    # external package cannot be run here. Simply set the appropriate
-# 	    # variables and trust all will be well.
-#
-#             NLUNIT_TEST_CPPFLAGS="-I\${abs_top_srcdir}/third_party/nlunit-test/repo/src"
-#             NLUNIT_TEST_LDFLAGS="-L${ac_pwd}/third_party/nlunit-test/repo/src"
-#             NLUNIT_TEST_LIBS="-lnlunit-test"
-#         ],
-#         [
-#             # Check for required nlunit-test headers.
-#
-#             AC_CHECK_HEADERS([nlunit-test.h],
-#             [],
-#             [
-#                 AC_MSG_ERROR(The nlunit-test header "$ac_header" is required but cannot be found.)
-#             ])
-#         ])
-# fi
-#
-# # Depending on whether nlunit-test has been configured for an internal
-# # location, its directory stem within this package needs to be set
-# # accordingly. In addition, if the location is internal, then we need
-# # to attempt to pull it down using the bootstrap makefile.
-#
-# if test "${nl_with_nlunit_test}" = "internal"; then
-#     maybe_nlunit_test_dirstem="nlunit-test/repo"
-#     nlunit_test_dirstem="third_party/${maybe_nlunit_test_dirstem}"
-#
-#     AC_MSG_NOTICE([attempting to create internal ${nlunit_test_dirstem}])
-#
-#     ${MAKE-make} --no-print-directory -C ${srcdir} -f Makefile-bootstrap ${nlunit_test_dirstem}
-#
-#     if test $? -ne 0; then
-#         AC_MSG_ERROR([failed to create ${nlunit_test_dirstem}. Please check your network connection or the correctness of 'repos.conf'])
-#     fi
-# else
-#     maybe_nlunit_test_dirstem=""
-# fi
-#
-# AC_SUBST(NLUNIT_TEST_SUBDIRS, [${maybe_nlunit_test_dirstem}])
-# AM_CONDITIONAL([@PACKAGE_SHORT_UPPER@_WITH_NLUNIT_TEST_INTERNAL], [test "${nl_with_nlunit_test}" = "internal"])
-
-#
-# Check for headers
-#
-AC_HEADER_STDBOOL
-AC_HEADER_STDC
-
-AC_CHECK_HEADERS([stdint.h])
-AC_CHECK_HEADERS([string.h])
-
-#
-# Check for types and structures
-#
-AC_TYPE_INT8_T
-AC_TYPE_INT16_T
-AC_TYPE_INT32_T
-AC_TYPE_INT64_T
-AC_TYPE_UINT8_T
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT64_T
-
-#
-# Checks for library functions
-#
-
-if test "${ac_no_link}" != "yes"; then
-    AC_CHECK_FUNCS([memcpy])
-fi
-
-# Here is an example with nlunit-test. Uncomment and adapt or delete
-# this, as needed.
-
-# # Add any nlunit-test CPPFLAGS, LDFLAGS, and LIBS
-#
-# CPPFLAGS="${CPPFLAGS} ${NLUNIT_TEST_CPPFLAGS}"
-# LDFLAGS="${LDFLAGS} ${NLUNIT_TEST_LDFLAGS}"
-# LIBS="${LIBS} ${NLUNIT_TEST_LIBS}"
-
-# Add any code coverage CPPFLAGS and LIBS
-
-CPPFLAGS="${CPPFLAGS} ${NL_COVERAGE_CPPFLAGS}"
-LIBS="${LIBS} ${NL_COVERAGE_LIBS}"
-LDFLAGS="${LDFLAGS} ${NL_COVERAGE_LDFLAGS}"
-
-# At this point, we can restore the compiler flags to whatever the
-# user passed in, now that we're clear of any -Werror issues by
-# transforming -Wno-error back to -Werror.
-
-NL_RESTORE_WERROR
-
-# Here is an example with nlunit-test. Uncomment and adapt or delete
-# this, as needed.
-
-# # Configure any autotools-based subdirectories
-#
-# if test "${nl_with_nlunit_test}" = "internal"; then
-#     AC_CONFIG_SUBDIRS([third_party/nlunit-test/repo])
-# fi
-
-#
-# Identify the various makefiles and auto-generated files for the package
-#
-AC_CONFIG_FILES([
-Makefile
-third_party/Makefile
-src/Makefile
-tests/Makefile
-doc/Makefile
-])
-
-#
-# Generate the auto-generated files for the package
-#
-AC_OUTPUT
-
-#
-# Summarize the package configuration
-#
-
-AC_MSG_NOTICE([
-
-  Configuration Summary
-  ---------------------
-  Package                                   : ${PACKAGE_NAME}
-  Version                                   : ${PACKAGE_VERSION}
-  Interface                                 : ${LIB@PACKAGE_SHORT_UPPER@_VERSION_INFO//:/.}
-  Build system                              : ${build}
-  Host system                               : ${host}
-  Target system                             : ${target}
-  Target architecture                       : ${target_cpu}
-  Target OS                                 : ${target_os}
-  Cross compiling                           : ${cross_compiling}
-  Build shared libraries                    : ${enable_shared}
-  Build static libraries                    : ${enable_static}
-  Build debug libraries                     : ${nl_cv_build_debug}
-  Build optimized libraries                 : ${nl_cv_build_optimized}
-  Build coverage libraries                  : ${nl_cv_build_coverage}
-  Build coverage reports                    : ${nl_cv_build_coverage_reports}
-  Lcov                                      : ${LCOV:--}
-  Genhtml                                   : ${GENHTML:--}
-  Build tests                               : ${nl_cv_build_tests}
-  Prefix                                    : ${prefix}
-  Shadow directory program                  : ${LNDIR}
-  Documentation support                     : ${nl_cv_build_docs}
-  Doxygen                                   : ${DOXYGEN:--}
-  GraphViz dot                              : ${DOT:--}
-  PERL                                      : ${PERL:--}
-  Nlunit-test source                        : ${nl_with_nlunit_test:--}
-  Nlunit-test compile flags                 : ${NLUNIT_TEST_CPPFLAGS:--}
-  Nlunit-test link flags                    : ${NLUNIT_TEST_LDFLAGS:--}
-  Nlunit-test link libraries                : ${NLUNIT_TEST_LIBS:--}
-  C Preprocessor                            : ${CPP}
-  C Compiler                                : ${CC}
-  C++ Preprocessor                          : ${CXXCPP}
-  C++ Compiler                              : ${CXX}
-  Archiver                                  : ${AR}
-  Archive Indexer                           : ${RANLIB}
-  Symbol Stripper                           : ${STRIP}
-  Object Copier                             : ${OBJCOPY}
-  C Preprocessor flags                      : ${CPPFLAGS:--}
-  C Compile flags                           : ${CFLAGS:--}
-  C++ Compile flags                         : ${CXXFLAGS:--}
-  Link flags                                : ${LDFLAGS:--}
-  Link libraries                            : ${LIBS}
-
-])
diff --git a/third_party/nlbuild-autotools/repo/examples/repos.conf b/third_party/nlbuild-autotools/repo/examples/repos.conf
deleted file mode 100644
index dce15b7..0000000
--- a/third_party/nlbuild-autotools/repo/examples/repos.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-# You can synchronize a remote package on which yours depends with git
-# to 'third_party' (or another directory).
-#
-# Here is an example using nlunit-test. Uncomment and adapt or
-# delete this, as needed. If you do not have any packages to
-# sychronize, then this file is unneeded and may be deleted from your
-# project.
-#
-# If you choose to use this, please also take a look at configure.ac,
-# Makefile.am, and third_party/Makefile.am and uncomment the appropriate
-# sections there.
-#
-# The 'pull' section is optional. The 'pull' section allows you to
-# optionally specify the 'method' key as 'clone' or 'submodule'
-# (defaulting to 'clone' when the key is not present). This selects
-# whether 'git clone' or 'git submodule' is used to pull down
-# repositories.
-#
-# While the 'branch' key is required, the 'commit' key is
-# optional. The 'commit' key allows you to specify a particular commit
-# hash or tag if you do not want HEAD of the specified branch.
-
-# [pull]
-#	method = clone
-#
-# [submodule "nlunit-test"]
-# 	path = third_party/nlunit-test/repo
-# 	url = https://github.com/nestlabs/nlunit-test.git
-# 	branch = master
-#	commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f
-# 	update = none
diff --git a/third_party/nlbuild-autotools/repo/make/host/tools.mak b/third_party/nlbuild-autotools/repo/make/host/tools.mak
deleted file mode 100644
index 04ee0f4..0000000
--- a/third_party/nlbuild-autotools/repo/make/host/tools.mak
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "header" or pre make header for all
-#      common host-specific (i.e., non-target and -toolchain-specific)
-#      tools included in any makefile used in the build tree.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/make/host/tools/tools.mak
diff --git a/third_party/nlbuild-autotools/repo/make/host/tools/bootstrap.mak b/third_party/nlbuild-autotools/repo/make/host/tools/bootstrap.mak
deleted file mode 100644
index 5959df4..0000000
--- a/third_party/nlbuild-autotools/repo/make/host/tools/bootstrap.mak
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the make header for the nlbuild-autotools
-#      bootstrap script.
-#
-
-BOOTSTRAP                        ?= $(top_srcdir)/bootstrap
diff --git a/third_party/nlbuild-autotools/repo/make/host/tools/tools.mak b/third_party/nlbuild-autotools/repo/make/host/tools/tools.mak
deleted file mode 100644
index dc3ae1b..0000000
--- a/third_party/nlbuild-autotools/repo/make/host/tools/tools.mak
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-#    Copyright (c) 2019 Google LLC. All Rights Reserved.
-#    Copyright (c) 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "header" or pre make header for all
-#      common host-specific (i.e., non-target and -toolchain-specific)
-#      tools included in any makefile used in the build tree.
-#
-
-CAT                              ?= cat
-CHMOD                            ?= chmod
-CMP                              ?= cmp
-CUT                              ?= cut
-DIFF                             ?= diff
-FIND                             ?= find
-GIT                              ?= git
-GREP                             ?= grep
-GZIP                             ?= gzip
-MKDIR                            ?= mkdir
-MKDIR_P                          ?= $(MKDIR) -p                  
-MV                               ?= mv
-
-RMFLAGS                           = -f
-ifeq ($(V),1)
-RMFLAGS                          += -v
-endif
-RM                               ?= rm $(RMFLAGS)
-
-RMDIR                            ?= rmdir
-SED                              ?= sed
-SORT                             ?= sort
-TAR                              ?= tar
-UNIQ                             ?= uniq
-XZ                               ?= xz
-
-#
-# nl-create-dir <directory>
-#
-# Create the specified directory, including any parent directories
-# that may not exist.
-#
-define nl-create-dir
-$(NL_V_PROGRESS_MKDIR)
-$(NL_V_AT)$(MKDIR_P) "$(1)"
-endef # nl-create-dir
-
-#
-# nl-remove-dir <directory>
-#
-# If the specified directory exists, then ensure all of the
-# directories are writable by the current user, and then forcibly
-# remove the directory and all of its contents, sleeping for five (5)
-# seconds and failure before trying the removal again.
-#
-define nl-remove-dir
-$(NL_V_PROGRESS_RMDIR)
-$(NL_V_AT)if [ -d "$(1)" ]; then \
-    $(FIND) "$(1)" -type d ! -perm -200 -exec $(CHMOD) u+w {} ';' \
-    && $(RM) -rf "$(1)" \
-    || { sleep 5 && $(RM) -rf "$(1)"; }; \
-fi
-endef # nl-remove-dir
-
-#
-# nl-check-file-with-subroutine <subroutine prefix> <macro suffix>
-#
-# Check whether a file, referenced by the $(@) variable, should be
-# updated / regenerated based on its dependencies, referenced by the
-# $(<) variable by running the make macro check-file-<macro suffix>.
-#
-# The $(<) is passed as the first argument if the macro wants to process
-# it and the prospective new output file, which the macro MUST
-# generate, as the second.
-#
-# This macro will ensure that any required parent directories are created
-# prior to invoking the subroutine <subroutine prefix>-<macro suffix>.
-#
-# This macro is similar to and inspired by that from Linux Kbuild and
-# elsewhere.
-#
-#   <subroutine prefix> - The subroutine name, prefixed to "-<macro suffix>",
-#                         which, together with <macro suffix>, indicates the
-#                         make macro to invoke to actually check the file.
-#
-#   <macro suffix>      - The name, suffixed to "<subroutine prefix>-", which
-#                         together with <subroutine prefix>, indicates the
-#                         make macro to invoke to actually check the file.
-#
-#
-define nl-check-file-with-subroutine
-$(NL_V_AT)set -e;                                   \
-$(_NL_PROGRESS) "CHECK" "$(@)";                     \
-$(MKDIR_P) $(dir $(@));                             \
-$(call $(1)-$(2),$(<),$(@).N);                      \
-if [ -r "$(@)" ] && $(CMP) -s "$(@)" "$(@).N"; then \
-    rm -f "$(@).N";                                 \
-else                                                \
-    $(_NL_PROGRESS) "GEN" "$(@)";                   \
-    mv -f "$(@).N" "$(@)";                          \
-fi
-endef # nl-check-file
-
-#
-# nl-check-file <macro suffix>
-#
-# Check whether a file, referenced by the $(@) variable, should be
-# updated / regenerated based on its dependencies, referenced by the
-# $(<) variable by running the make macro check-file-<macro suffix>.
-#
-# The $(<) is passed as the first argument if the macro wants to process
-# it and the prospective new output file, which the macro MUST
-# generate, as the second.
-#
-# This macro will ensure that any required parent directories are created
-# prior to invoking check-file-<macro suffix>.
-#
-# This macro is similar to and inspired by that from Linux Kbuild and
-# elsewhere.
-#
-#   <macro suffix> - The name, suffixed to "check-file-", which indicates
-#                    the make macro to invoke.
-#
-#
-define nl-check-file
-$(call nl-check-file-with-subroutine,nl-check-file,$(1))
-endef # nl-check-file
-
-#
-# nl-create-link
-#
-# Create the symbolic link with the source of the $(<) variable and
-# the destination of the $(@) variable, using the LN_S macro.
-#
-define nl-create-link
-$(NL_V_PROGRESS_LN_S)
-$(NL_V_AT)$(LN_S) $(<) $(@)
-endef # nl-create-link
diff --git a/third_party/nlbuild-autotools/repo/make/post.mak b/third_party/nlbuild-autotools/repo/make/post.mak
deleted file mode 100644
index 702580b..0000000
--- a/third_party/nlbuild-autotools/repo/make/post.mak
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "footer" or post make header included in
-#      any makefile used in the build tree.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/make/post/rules.mak
diff --git a/third_party/nlbuild-autotools/repo/make/post/rules.mak b/third_party/nlbuild-autotools/repo/make/post/rules.mak
deleted file mode 100644
index da4503a..0000000
--- a/third_party/nlbuild-autotools/repo/make/post/rules.mak
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "footer" or post make header for all
-#      common rules included in any makefile used in the build tree.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/make/post/rules/help.mak
-include $(abs_top_nlbuild_autotools_dir)/make/post/rules/repos.mak
diff --git a/third_party/nlbuild-autotools/repo/make/post/rules/bootstrap.mak b/third_party/nlbuild-autotools/repo/make/post/rules/bootstrap.mak
deleted file mode 100644
index db56e0a..0000000
--- a/third_party/nlbuild-autotools/repo/make/post/rules/bootstrap.mak
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the make footer for nlbuild-autotools bootstrap
-#      convenience targets.
-#
-
-# The following targets provide some convenience targets for bootstrapping
-# the GNU autotools-based build system used by this package.
-
-all check coverage dist distcheck doc docdist install install-headers pretty pretty-check: Makefile
-	$(NL_V_PROGRESS_MAKE)
-	$(MAKE) -f $(<) --no-print-directory $(@)
-
-Makefile: $(top_srcdir)/Makefile.in $(top_srcdir)/configure
-	$(NL_V_PROGRESS_CONFIGURE)
-	$(top_srcdir)/configure
-
-$(top_srcdir)/configure: $(top_srcdir)/configure.ac
-	$(NL_V_PROGRESS_BOOTSTRAP_CONFIG)
-	$(BOOTSTRAP) -w config
-
-Makefile.in: Makefile.am
-	$(NL_V_PROGRESS_BOOTSTRAP_MAKE)
-	$(BOOTSTRAP) -w make
-
-.PHONY: bootstrap
-bootstrap:
-	$(NL_V_PROGRESS_BOOTSTRAP_ALL)
-	$(BOOTSTRAP) -w all
-
-.PHONY: bootstrap-config
-bootstrap-config:
-	$(NL_V_PROGRESS_BOOTSTRAP_CONFIG)
-	$(BOOTSTRAP) -w config
-
-.PHONY: bootstrap-make
-bootstrap-make:
-	$(NL_V_PROGRESS_BOOTSTRAP_MAKE)
-	$(BOOTSTRAP) -w make
-
-define PrintBootstrapHelp
-$(NL_V_AT)echo "  all"
-$(NL_V_AT)echo "    Generate all configured build artifacts for this project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  bootstrap"
-$(NL_V_AT)echo "    (Re-)generate all build infrastructure for the project, "
-$(NL_V_AT)echo "    including both build configuration scripts and makefiles."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  bootstrap-all"
-$(NL_V_AT)echo "    (Re-)generate all build infrastructure for the project, "
-$(NL_V_AT)echo "    including both build configuration scripts and makefiles."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  bootstrap-config"
-$(NL_V_AT)echo "    (Re-)generate build configuration scripts for the project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  bootstrap-make"
-$(NL_V_AT)echo "    (Re-)generate build makefiles for the project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  check"
-$(NL_V_AT)echo "    Generate all configured build artifacts and run all unit "
-$(NL_V_AT)echo "    and functional tests for this project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  coverage"
-$(NL_V_AT)echo "    Generate all configured build artifacts, run all unit "
-$(NL_V_AT)echo "    and functional tests, and generate code coverage results "
-$(NL_V_AT)echo "    for this project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  dist"
-$(NL_V_AT)echo "    Generate an archive distribution snapshot for this project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  distcheck"
-$(NL_V_AT)echo "    Generate an archive distribution snapshot for this project "
-$(NL_V_AT)echo "    and sanity check the resulting distribution by running "
-$(NL_V_AT)echo "    'make check' on it for this project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  doc"
-$(NL_V_AT)echo "    Generate documentation for the project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  docdist"
-$(NL_V_AT)echo "    Generate an archive distribution of the documentation for "
-$(NL_V_AT)echo "    the project."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  install"
-$(NL_V_AT)echo "    Generate all configured build artifacts for this project "
-$(NL_V_AT)echo "    and install them in DESTDIR on the build host system."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  install-headers"
-$(NL_V_AT)echo "    Generate all configured public header artifacts for this "
-$(NL_V_AT)echo "    project and install them in DESTDIR on the build host "
-$(NL_V_AT)echo "    system."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  pretty"
-$(NL_V_AT)echo "    (Re-)format a collection of project source files."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  pretty-check"
-$(NL_V_AT)echo "    Check but do not (re-)format a collection of project "
-$(NL_V_AT)echo "    source files."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  Makefile"
-$(NL_V_AT)echo "    Run 'configure' for this project and generate the"
-$(NL_V_AT)echo "    host-specific makefile."
-$(NL_V_AT)echo
-endef # PrintBootstrapHelp
-
-.PHONY: help-bootstrap-local
-help-bootstrap-local:
-	$(call PrintBootstrapHelp)
-
-.PHONY: help-bootstrap-hook
-help-bootstrap-hook: help-bootstrap-local
-
-.PHONY: help-bootstrap
-help-bootstrap: help-bootstrap-local help-bootstrap-hook
-
-.PHONY: help
-help: help-bootstrap
-
diff --git a/third_party/nlbuild-autotools/repo/make/post/rules/help.mak b/third_party/nlbuild-autotools/repo/make/post/rules/help.mak
deleted file mode 100644
index 8c90615..0000000
--- a/third_party/nlbuild-autotools/repo/make/post/rules/help.mak
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the make "footer" or post make header for help-related
-#      targets.
-#
-
-define PrintHelp
-$(NL_V_AT)echo "This makefile supports the following build targets:"
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  help"
-$(NL_V_AT)echo "    Display this content."
-$(NL_V_AT)echo
-endef # PrintHelp
-
-.PHONY: help-local
-help-local:
-	$(call PrintHelp)
-
-.PHONY: help-hook
-help-hook: help-local
-
-.PHONY: help
-help: help-local help-hook
diff --git a/third_party/nlbuild-autotools/repo/make/post/rules/repos.mak b/third_party/nlbuild-autotools/repo/make/post/rules/repos.mak
deleted file mode 100644
index 96b24e9..0000000
--- a/third_party/nlbuild-autotools/repo/make/post/rules/repos.mak
+++ /dev/null
@@ -1,227 +0,0 @@
-#
-#    Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
-#    Copyright 2018 Google LLC. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is a make "footer" or post make header that defines make
-#      convenience targets and templates for interacting with and managing
-#      "foreign" (e.g., those outside of this project) git projects in the
-#      context of managing project dependencies.
-#
-
-ifneq ($(REPOS),)
-# Stem for git clones and submodules
-
-__REPOS_GIT_STEM                 := /.git
-
-# Stem for the git configuration file for a git repository.
-
-__REPOS_GIT_CONFIG_STEM          := $(__REPOS_GIT_STEM)/config
-
-# Stem for the git cache directory for a git submodule
-
-__REPOS_GIT_MODULE_CACHE_STEM    := $(__REPOS_GIT_STEM)/modules
-
-# git submodule configuration file and path
-
-__REPOS_GIT_MODULES_FILE         := .gitmodules
-__REPOS_GIT_MODULES_PATH         := $(top_srcdir)/$(__REPOS_GIT_MODULES_FILE)
-
-# Stem for the git configuration file for a git clone or submodule.
-
-__REPOS_GIT_CLONE_STEM           := $(__REPOS_GIT_STEM)
-__REPOS_GIT_SUBMODULE_STEM       := $(__REPOS_GIT_STEM)
-
-# Git "pull" method to use for retrieving repositories on which this
-# package may depend.
-#
-# This defaults to 'clone' if no configuration value is present.
-
-__REPOS_MAYBE_PULL_METHOD        := $(call nlGitGetMethodForPullFromFile,$(REPOS_CONFIG))
-__REPOS_DEFAULT_PULL_METHOD      := clone
-REPOS_PULL_METHOD                := $(if $(__REPOS_MAYBE_PULL_METHOD),$(__REPOS_MAYBE_PULL_METHOD),$(__REPOS_DEFAULT_PULL_METHOD))
-
-# Git repository configuration for this package, if it exists.
-#
-# This value is only relevant when the pull method is 'submodule'.
-
-ifeq ($(REPOS_PULL_METHOD),submodule)
-REPOS_PACKAGE_GIT_PATH           := $(top_srcdir)$(__REPOS_GIT_CONFIG_STEM)
-else
-REPOS_PACKAGE_GIT_PATH           :=
-endif
-
-# Sentinel Files
-
-REPOS_GIT_INIT_SENTINEL          := $(top_srcdir)/.repos-git-init-stamp
-REPOS_GIT_MODULES_SENTINEL       := $(top_srcdir)/.repos-git-modules-stamp
-REPOS_WARNING_SENTINEL           := $(top_builddir)/.repos-warning-stamp
-
-#
-# REPOS_template <repo file> <repo name>
-#
-# This template defines variables and targets used for inlining optional and
-# required third-party packages as package-internal copies.
-#
-#   <repo file>  - Path to the repo configuration file from which to get
-#                  values for named repo.
-#   <repo name>  - Name of the repository in <repo file> for which to get
-#                  values for branch, local path, and URL.
-#
-define REPOS_template
-$(2)_repo_NAME               := $(2)
-$(2)_repo_BRANCH             := $$(call nlGitGetBranchForRepoFromNameFromFile,$(1),$(2))
-$(2)_repo_COMMIT             := $$(call nlGitGetCommitForRepoFromNameFromFile,$(1),$(2))
-$(2)_repo_PATH               := $$(call nlGitGetPathForRepoFromNameFromFile,$(1),$(2))
-$(2)_repo_URL                := $$(call nlGitGetURLForRepoFromNameFromFile,$(1),$(2))
-
-$(2)_repo_GIT                := $$(addsuffix $(__REPOS_GIT_STEM),$$($(2)_repo_PATH))
-$(2)_repo_CACHE              := $(top_srcdir)$(__REPOS_GIT_MODULE_CACHE_STEM)/$$($(2)_repo_PATH)
-
-REPO_NAMES                   += $$($(2)_repo_NAME)
-REPO_GITS                    += $$($(2)_repo_GIT)
-REPO_PATHS                   += $$($(2)_repo_PATH)
-REPO_URLS                    += $$($(2)_repo_URL)
-REPO_CACHES                  += $$($(2)_repo_CACHE)
-
-# Allow a repo to be made with a path target (e.g., third_party/foo/repo) or
-# with its actual git target (e.g., third_party/foo/repo/.git).
-
-$$($(2)_repo_PATH): | $$($(2)_repo_GIT)
-
-$$($(2)_repo_GIT): $(REPOS_PACKAGE_GIT_PATH) | repos-warning
-	$(NL_V_AT)case "$(REPOS_PULL_METHOD)" in \
-	    submodule) echo "  SUBMODULE    $$(subst $(__REPOS_GIT_SUBMODULE_STEM),,$$(@))"; \
-		if ! test -f $(__REPOS_GIT_MODULES_PATH); then \
-			touch $(REPOS_GIT_MODULES_SENTINEL); \
-		fi; \
-		$(GIT) -C $(top_srcdir) submodule -q add -f -b $$($(2)_repo_BRANCH) -- $$($(2)_repo_URL) $$($(2)_repo_PATH);; \
-            clone) echo "  CLONE        $$(subst $(__REPOS_GIT_CLONE_STEM),,$$(@))"; \
-                $(GIT) -C $(top_srcdir) clone -q -b $$($(2)_repo_BRANCH) -- $$($(2)_repo_URL) $$($(2)_repo_PATH);; \
-            *) echo "$(REPOS_CONFIG): Unknown or unsupported pull method '$(REPOS_PULL_METHOD)'.";; \
-        esac
-	$(NL_V_AT)if ! test -z "$$($(2)_repo_COMMIT)"; then \
-                $(GIT) -C $$($(2)_repo_PATH) checkout -q $$($(2)_repo_COMMIT); \
-        fi
-endef # REPOS_template
-
-$(REPOS_PACKAGE_GIT_PATH):
-	$(NL_V_PROGRESS_GIT_INIT)
-	$(GIT) -C $(top_srcdir) init -q $(top_srcdir)
-	$(NL_V_AT)touch $(REPOS_GIT_INIT_SENTINEL)
-
-define PrintReposWarning
-$(NL_V_AT)echo "The 'repos' target requires external network connectivity to"
-$(NL_V_AT)echo "reach the following upstream GIT repositories:"
-$(NL_V_AT)echo ""
-$(NL_V_AT)for url in $(REPO_URLS); do echo "    $${url}"; done
-$(NL_V_AT)echo ""
-$(NL_V_AT)echo "and will fail if external network connectivity is not"
-$(NL_V_AT)echo "available. This package may still be buildable without these"
-$(NL_V_AT)echo "packages but may require disabling certain features or"
-$(NL_V_AT)echo "functionality."
-$(NL_V_AT)echo ""
-endef # PrintReposWarning
-
-$(REPOS_WARNING_SENTINEL):
-	$(NL_V_AT)touch $(@)
-	$(call PrintReposWarning)
-
-.PHONY: repos-warning
-repos-warning: $(REPOS_WARNING_SENTINEL)
-
-.PHONY: repos-local
-repos-local: repos-warning
-	$(NL_V_AT)$(MAKE) -f $(firstword $(MAKEFILE_LIST)) --no-print-directory $(REPO_GITS)
-
-.PHONY: repos-hook
-repos-hook: repos-local
-
-.PHONY: repos
-repos: repos-local repos-hook
-
-.PHONY: clean-repos-hook
-clean-repos-hook:
-
-.PHONY: clean-repos-local
-clean-repos-local: clean-repos-hook
-	@echo "  CLEAN"
-	$(NL_V_AT)case "$(REPOS_PULL_METHOD)" in \
-	    submodule) $(GIT) -C $(top_srcdir) submodule -q deinit -f -- $(REPO_PATHS) 2> /dev/null || true; \
-		if test -f $(REPOS_GIT_MODULES_SENTINEL); then \
-		    $(RM) $(REPOS_GIT_MODULES_SENTINEL); \
-		    $(GIT) -C $(top_srcdir) rm -f -q $(__REPOS_GIT_MODULES_PATH) 2> /dev/null; \
-		fi ; \
-		if test -f $(REPOS_GIT_INIT_SENTINEL); then \
-		    $(RM) -r $(dir $(REPOS_PACKAGE_GIT_PATH)); \
-		    $(RM) $(REPOS_GIT_INIT_SENTINEL); \
-		fi; \
-		$(RM) $(REPOS_WARNING_SENTINEL); \
-		$(GIT) -C $(top_srcdir) rm -rf -q --cached $(REPO_PATHS) 2> /dev/null || true; \
-		$(RM) -r $(addprefix $(top_srcdir)/,$(REPO_PATHS)); \
-		$(RMDIR) -p $(addprefix $(top_srcdir),$(dir $(REPO_PATHS))) 2> /dev/null || true; \
-		$(RM) -r $(REPO_CACHES) 2> /dev/null;; \
-	    clone) $(GIT) -C $(top_srcdir) rm -rf -q --cached $(REPO_PATHS) 2> /dev/null || true; \
-		$(RM) $(REPOS_WARNING_SENTINEL); \
-		$(RM) -r $(addprefix $(top_srcdir)/,$(REPO_PATHS)); \
-		$(RMDIR) -p $(addprefix $(top_srcdir),$(dir $(REPO_PATHS))) 2> /dev/null || true;; \
-            *) echo "$(REPOS_CONFIG): Unknown or unsupported pull method '$(REPOS_PULL_METHOD)'.";; \
-	esac
-
-.PHONY: clean-repos
-clean-repos: clean-repos-local
-
-# Invoke the REPOS_template for each defined optionally-inlined package repo
-
-$(foreach repo,$(REPOS),$(eval $(call REPOS_template,$(REPOS_CONFIG),$(repo))))
-
-define MaybePrintReposHelp
-$(NL_V_AT)echo "  repos"
-$(NL_V_AT)echo "    Clone any upstream, dependent git repositories that this package"
-$(NL_V_AT)echo "    regards as required or optional rather than using '--with-<package>'"
-$(NL_V_AT)echo "    options to specify external instances of those packages."
-$(NL_V_AT)echo
-$(NL_V_AT)echo "  clean-repos"
-$(NL_V_AT)echo "    This is the opposite of the 'repos' target. This removes, in their"
-$(NL_V_AT)echo "    entirety, any clones of any upstream, dependent git repositories that"
-$(NL_V_AT)echo "    this package regards as required or optional."
-$(NL_V_AT)echo
-endef # MaybePrintReposHelp
-
-else
-
-define MaybePrintReposHelp
-endef # MaybePrintReposHelp
-
-endif # REPOS
-
-define PrintReposHelp
-$(call MaybePrintReposHelp)
-endef # PrintReposHelp
-
-.PHONY: help-repos-local
-help-repos-local:
-	$(call PrintReposHelp)
-
-.PHONY: help-repos-hook
-help-repos-hook: help-repos-local
-
-.PHONY: help-repos
-help-repos: help-repos-local help-repos-hook
-
-.PHONY: help
-help: help-repos
diff --git a/third_party/nlbuild-autotools/repo/make/pre.mak b/third_party/nlbuild-autotools/repo/make/pre.mak
deleted file mode 100644
index 62b204d..0000000
--- a/third_party/nlbuild-autotools/repo/make/pre.mak
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "header" or pre make header included in
-#      any makefile used in the build tree.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/make/pre/tools.mak
-include $(abs_top_nlbuild_autotools_dir)/make/pre/macros.mak
diff --git a/third_party/nlbuild-autotools/repo/make/pre/macros.mak b/third_party/nlbuild-autotools/repo/make/pre/macros.mak
deleted file mode 100644
index f92b442..0000000
--- a/third_party/nlbuild-autotools/repo/make/pre/macros.mak
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the make "header" or pre make header for macros common to
-#      all other make headers and files.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/make/pre/macros/git.mak
-include $(abs_top_nlbuild_autotools_dir)/make/pre/macros/repos.mak
-include $(abs_top_nlbuild_autotools_dir)/make/pre/macros/verbosity.mak
diff --git a/third_party/nlbuild-autotools/repo/make/pre/macros/git.mak b/third_party/nlbuild-autotools/repo/make/pre/macros/git.mak
deleted file mode 100644
index f45907e..0000000
--- a/third_party/nlbuild-autotools/repo/make/pre/macros/git.mak
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-#    Copyright 2018 Google LLC. All Rights Reserved.
-#    Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the make "header" or pre make header that defines make
-#      convenience macros for interacting with git.
-#
-
-# nlGitGetConfigFromFileCommand <file>
-#
-# Command to get a value for a variable set in the specified git config file <file>.
-
-nlGitGetConfigFromFileCommand         = $(GIT) config --file $(1)
-
-# nlGitListConfigFromFileCommand <file>
-#
-# Command to list all variables set in the specified config file <file>
-
-nlGitListConfigFromFileCommand        = $(call nlGitGetConfigFromFileCommand,$(1)) --list
-
-# nlGitGetConfigFromFile <file>
-#
-# Get a value for a variable set in the specified git config file <file>.
-
-nlGitGetConfigFromFile                = $(shell $(call nlGitGetConfigFromFileCommand,$(1)))
-
-# nlGitListConfigFromFile <file>
-#
-# List all variables set in the specified config file <file>
-
-nlGitListConfigFromFile               = $(shell $(call nlGitListConfigFromFileCommand,$(1)))
-
-# nlGitGetValueForRepoFromNameFromFile <file> <repo name> <value>
-#
-# Get a value for a repo / submodule variable set in specified git config file <file>.
-
-nlGitGetValueForRepoFromNameFromFile  = $(shell $(call nlGitGetConfigFromFileCommand,$(1)) 'submodule.$(2).$(3)')
-
-# nlGitGetBranchForRepoFromNameFromFile <file> <repo name>
-#
-# Get the remote branch for a repo / submodule variable set in specified git config file <file>.
-
-nlGitGetBranchForRepoFromNameFromFile = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),branch)
-
-# nlGitGetCommitForRepoFromNameFromFile <file> <repo name>
-#
-# Get the commit for a repo / submodule variable set in specified git config file <file>.
-
-nlGitGetCommitForRepoFromNameFromFile = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),commit)
-
-# nlGitGetURLForRepoFromNameFromFile <file> <repo name>
-#
-# Get the remote URL for a repo / submodule variable set in specified git config file <file>.
-
-nlGitGetURLForRepoFromNameFromFile    = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),url)
-
-# nlGitGetPathForRepoFromNameFromFile <file> <repo name>
-#
-# Get the local path for a repo / submodule variable set in specified git config file <file>.
-
-nlGitGetPathForRepoFromNameFromFile   = $(call nlGitGetValueForRepoFromNameFromFile,$(1),$(2),path)
-
-# nlGitGetMethodForPullFromFile <file>
-#
-# Get the pull method set in specified git config file <file>.
-
-nlGitGetMethodForPullFromFile         = $(shell $(call nlGitGetConfigFromFileCommand,$(1)) 'pull.method')
-
diff --git a/third_party/nlbuild-autotools/repo/make/pre/macros/repos.mak b/third_party/nlbuild-autotools/repo/make/pre/macros/repos.mak
deleted file mode 100644
index 29f4b51..0000000
--- a/third_party/nlbuild-autotools/repo/make/pre/macros/repos.mak
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-#    Copyright 2018 Google LLC. All Rights Reserved.
-#    Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is a make "header" or pre make header that defines
-#      make convenience macros for interacting with and managing "foreign"
-#      (e.g., those outside of this project) git projects in the context of
-#      managing project dependencies.
-#
-
-# Third-party package repository configuration, if it exists, listing all
-# packages and their names, branches, URLs, and local paths that may be
-# optionally inlined for this package.
-#
-# This file is formatted identically to .gitmodules (see gitmodules(5)).
-
-REPOS_CONFIG                     ?= $(top_srcdir)/repos.conf
-
-REPOS                            := $(shell if test -f $(REPOS_CONFIG); then $(call nlGitListConfigFromFileCommand,$(REPOS_CONFIG)) | $(GREP) '^submodule\.' | $(CUT) -d '.' -f 2 | $(SORT) | $(UNIQ); fi)
diff --git a/third_party/nlbuild-autotools/repo/make/pre/macros/verbosity.mak b/third_party/nlbuild-autotools/repo/make/pre/macros/verbosity.mak
deleted file mode 100644
index 87ceda3..0000000
--- a/third_party/nlbuild-autotools/repo/make/pre/macros/verbosity.mak
+++ /dev/null
@@ -1,101 +0,0 @@
-#
-#    Copyright 2019 Google LLC. All Rights Reserved.
-#    Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is a make "header" or pre make header that defines
-#      make macros for controlling build verbosity.
-#
-
-#
-# Verbosity
-#
-
-# The default build verbosity is 0 or none. Invoking 'make V=0' is
-# equivalent to 'make' with this default.
-
-NL_DEFAULT_VERBOSITY             ?= 0
-
-# Alias for the command echo suppression marker.
-
-NL_AT                            := @
-
-# Alias for a conditional command echo suppression marker, conditioned
-# on the build verbosity.
-
-NL_V_AT                           = $(NL_V_AT_$(V))
-NL_V_AT_                          = $(NL_V_AT_$(NL_DEFAULT_VERBOSITY))
-NL_V_AT_0                         = $(NL_AT)
-NL_V_AT_1                         = 
-
-#
-# Verbosity Build Progress Macros
-#
-
-# Macro for emitting "<ACTION> <target | output>" oneline, succinct
-# build progress messages.
-
-_NL_PROGRESS                     := printf "  %-13s %s\n"
-NL_PROGRESS                      := $(NL_AT)$(_NL_PROGRESS)
-
-# Macro for emitting "<ACTION> <target | output>" oneline, succinct
-# build progress messages, conditioned on build verbosity.
-
-NL_V_PROGRESS                     = $(NL_V_PROGRESS_$(V))
-NL_V_PROGRESS_                    = $(NL_V_PROGRESS_$(NL_DEFAULT_VERBOSITY))
-NL_V_PROGRESS_0                   = $(NL_PROGRESS)
-NL_V_PROGRESS_1                   = $(NL_AT)true
-
-# Common convenience progress message macros, conditioned on build
-# verbosity.
-
-NL_V_PROGRESS_BOOTSTRAP           = $(NL_V_PROGRESS) "BOOTSTRAP"   "$(1)";
-NL_V_PROGRESS_BOOTSTRAP_ALL       = $(NL_V_BOOTSTRAP) "all";
-NL_V_PROGRESS_BOOTSTRAP_CONFIG    = $(NL_V_BOOTSTRAP) "config";
-NL_V_PROGRESS_BOOTSTRAP_MAKE      = $(NL_V_BOOTSTRAP) "make";
-
-NL_V_PROGRESS_CONFIGURE           = $(NL_V_PROGRESS) "CONFIGURE"
-
-NL_V_PROGRESS_GIT_INIT            = $(NL_V_PROGRESS) "GIT INIT"    "$(@)";
-
-NL_V_PROGRESS_MAKE                = $(NL_V_PROGRESS) "MAKE"        "$(@)";
-
-NL_V_PROGRESS_LN_S                = $(NL_V_PROGRESS) "LN"          "$(@)";
-
-NL_V_PROGRESS_MKDIR               = $(NL_V_PROGRESS) "MKDIR"       "$(1)";
-NL_V_PROGRESS_MKDIR_P             = $(NL_V_MKDIR)
-NL_V_PROGRESS_RMDIR               = $(NL_V_PROGRESS) "RMDIR"       "$(1)";
-
-NL_V_PROGRESS_GZIP                = $(NL_V_PROGRESS) "GZIP"        "$(@)";
-NL_V_PROGRESS_TAR                 = $(NL_V_PROGRESS) "TAR"         "$(@)";
-NL_V_PROGRESS_TGZ                 = $(NL_V_PROGRESS) "TGZ"         "$(@)";
-NL_V_PROGRESS_TXZ                 = $(NL_V_PROGRESS) "TXZ"         "$(@)";
-NL_V_PROGRESS_XZ                  = $(NL_V_PROGRESS) "XZ"          "$(@)";
-
-#
-# Verbosity Commands and Flags
-#
-
-# This is useful when we do not want submake to be chatty about what
-# it doing when verbosity is suppressed. However, when verbosity is
-# requested, -s (silent) would otherwise suppress all make verbose
-# output. Consequently, suppress -s when verbosity is requested.
-
-NL_V_MAKE_S                       = $(NL_V_MAKE_S_$(V))                   
-NL_V_MAKE_S_                      = $(NL_V_MAKE_S_$(NL_DEFAULT_VERBOSITY))
-NL_V_MAKE_S_0                     = $(MAKE) -s
-NL_V_MAKE_S_1                     = $(MAKE)
diff --git a/third_party/nlbuild-autotools/repo/make/pre/tools.mak b/third_party/nlbuild-autotools/repo/make/pre/tools.mak
deleted file mode 100644
index 96ae503..0000000
--- a/third_party/nlbuild-autotools/repo/make/pre/tools.mak
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#    Copyright 2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is the generic "header" or pre make header for all
-#      common (i.e., non-host-specific, non-target-specific, and
-#      non-toolchain-specific) tools included in any makefile used in the
-#      build tree.
-#
-
-include $(abs_top_nlbuild_autotools_dir)/make/host/tools.mak
diff --git a/third_party/nlbuild-autotools/repo/scripts/bootstrap b/third_party/nlbuild-autotools/repo/scripts/bootstrap
deleted file mode 100755
index c718606..0000000
--- a/third_party/nlbuild-autotools/repo/scripts/bootstrap
+++ /dev/null
@@ -1,365 +0,0 @@
-#!/bin/bash
-
-#
-#    Copyright 2019 Google LLC. All Rights Reserved.
-#    Copyright 2014-2017 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is a convenience script that will bootstrap the GNU
-#      autotools system for a project after any build system changes.
-#
-
-#
-# usage
-#
-# Display program usage.
-#
-usage() {
-    name=`basename $0`
-
-    echo "Usage: ${name} [ options ] [ -w <what> ]"
-
-    if [ $1 -ne 0 ]; then
-        echo "Try '${name} -h' for more information."
-    fi
-
-    if [ $1 -ne 1 ]; then
-        echo ""
-        echo "  -h, --help       Print this help, then exit."
-        echo "  -I DIR           Specify directory DIR as the root of the "
-        echo "                   nlbuild-autotools repository."
-        echo "  -v, --verbose    Verbosely report bootstrap progress."
-        echo "  -w, --what WHAT  Specify what part of the package should be "
-        echo "                   bootstrapped: all, config, make, or none "
-        echo "                   (default: all)."
-        echo ""
-    fi
-
-    exit $1
-}
-
-#
-# check_required_executable <path variable> <executable name>
-#
-# Check to ensure that the named executable with the path in the
-# provided variable exists and is executable by the current user.
-#
-check_required_executable() {
-    variable="${1}"
-    path="${!variable}"
-    name="${2}"
-    output="${3}"
-    stem="The required executable '${name}'"
-
-    if [ -z "${path}" ]; then
-        echo "${stem} could not be found."
-
-        eval "${output}"="no"
-
-        return 1
-    elif [ ! -e "${path}" ] || [ ! -x "${path}" ]; then
-        stem="${stem} at '${path}'"
-
-        if [ ! -e ${path} ]; then
-            echo "${stem} does not exist."
-        elif [ ! -x ${path} ]; then
-            echo "${stem} is not executable."
-        fi
-
-        echo "Please ensure '${name}' is available in PATH."
-
-	eval "${output}"="no"
-
-        return 1
-    fi
-
-    eval "${output}"="yes"
-
-    return 0
-}
-
-check_required_executables()
-{
-    check_required_executable ACLOCAL aclocal have_aclocal
-    check_required_executable AUTOCONF autoconf have_autoconf
-    check_required_executable AUTOHEADER autoheader have_autoheader
-    check_required_executable AUTOMAKE automake have_automake
-    check_required_executable LIBTOOLIZE libtoolize have_libtoolize
-    check_required_executable M4 m4 have_m4
-
-    if [ "${have_aclocal}" = "no" ] || [ "${have_autoconf}" = "no" ] || [ "${have_autoheader}" = "no" ] || [ "${have_automake}" = "no" ] || [ "${have_libtoolize}" = "no" ] || [ "${have_m4}" = "no" ]; then
-	cat << EOF
---------------------------------------------------------------------------------
-Your build host system is missing one or more of the above executables required
-for bootstrapping this nlbuild-autotools-based package. You can either install
-these yourself using package management tools available and appropriate for your
-build host platform or you can build preselected versions of these executables
-from source for this package on this build host by invoking:
-
-    make -C ${nlbuild_autotools_dir} tools
-
-and then re-running this script which will use those executables.
---------------------------------------------------------------------------------
-EOF
-    
-      exit 1
-    
-    fi
-}
-
-#
-# removetmp
-#
-# Remove temporary files and directories used during the run of this
-# script.
-#
-removetmp() {
-    if [ -n "${LIBTOOLIZE}"  ] && [ "${LIBTOOLIZE}" = "${BOOTSTRAP_TMPDIR}/libtoolize" ]; then
-        rm -f "${LIBTOOLIZE}"
-    fi
-
-    if [ -n "${AUTOM4TE_CFG}" ]; then
-        rm -f "${AUTOM4TE_CFG}"
-    fi
-
-    rm -r -f "${BOOTSTRAP_TMPDIR}"
-}
-
-what="all"
-verbose=
-nlbuild_autotools_dir=
-
-# Parse out any command line options
-
-while [ ${#} -gt 0 ]; do
-    case ${1} in
-    -h|--help)
-        usage 0
-        ;;
-
-    -I)
-        nlbuild_autotools_dir="${2}"
-        shift 2
-        ;;
-
-    -v|--verbose)
-        verbose="--verbose"
-        shift 1
-        ;;
-
-    -w|--what)
-        case "${2}" in
-
-        all|make*|conf*|none)
-            what="${2}"
-            shift 2
-            ;;
-
-        *)
-	    echo "Unknown what value '${2}'." >&2
-            usage 1
-            ;;
-
-        esac
-        ;;
-
-    *)
-        usage 1
-        ;;
-
-    esac
-done
-
-# Check to ensure that the location of the nlbuild-autotools directory
-# is sane.
-
-if [ -z "${nlbuild_autotools_dir}" ]; then
-    echo "$0: No -I option specified. Please provide the location of the nlbuild-autotools directory." >&2
-    exit 1
-
-elif [ ! -d "${nlbuild_autotools_dir}" ]; then
-    echo "$0: No such directory: ${nlbuild_autotools_dir}. Please provide a valid path to the nlbuild-autotools directory." >&2
-    exit 1
-
-fi
-
-# Establish some key directories
-
-srcdir=`dirname ${0}`
-abs_srcdir=`pwd`
-abs_top_srcdir="${abs_srcdir}"
-
-abs_top_hostdir="${nlbuild_autotools_dir}/tools/host"
-
-# Figure out what sort of build host we are running on, stripping off
-# any trailing version number information typically included on Darwin
-# / Mac OS X.
-
-host=`${nlbuild_autotools_dir}/third_party/autoconf/config.guess | sed -e 's/[[:digit:].]*$//g'`
-
-# If possible, attempt to be self-sufficient, relying on GNU autotools
-# executables installed along with the SDK itself.
-
-if [ -d "${abs_top_hostdir}/${host}/bin" ]; then
-    export PATH="${abs_top_hostdir}/${host}/bin:${PATH}"
-fi
-
-if [ -d "${abs_top_hostdir}/bin" ]; then
-    export PATH="${abs_top_hostdir}/bin:${PATH}"
-fi
-
-export ACLOCAL=`which aclocal`
-export AUTOCONF="`which autoconf`"
-export AUTOHEADER="`which autoheader`"
-export AUTOM4TE="`which autom4te`"
-export AUTOMAKE="`which automake`"
-export LIBTOOLIZE="`which libtoolize || which glibtoolize`"
-export M4=`which m4`
-
-# Establish, if necessary, some SDK-specific directories needed to
-# override various paths in GNU autotools that otherwise expect to be
-# absolute (e.g. /usr/share, etc.).
-
-if [ -d "${abs_top_hostdir}/share" ]; then
-    if [ -d "${abs_top_hostdir}/share/autoconf" ]; then
-        export AC_MACRODIR="${abs_top_hostdir}/share/autoconf"
-
-        export autom4te_perllibdir="${abs_top_hostdir}/share/autoconf"
-    fi
-
-    if [ -d "${abs_top_hostdir}/share/automake-1.14" ]; then
-        export PERL5LIB="${abs_top_hostdir}/share/automake-1.14:${PERL5LIB}"
-
-	make_action_options="--libdir ${abs_top_hostdir}/share/automake-1.14"
-    fi
-
-    if [ -d "${abs_top_hostdir}/share/aclocal-1.14" ]; then
-        local_action_options="--automake-acdir=${abs_top_hostdir}/share/aclocal-1.14 ${local_action_options}"
-    fi
-
-    if [ -d "${abs_top_hostdir}/share/aclocal" ]; then
-        local_action_options="--system-acdir=${abs_top_hostdir}/share/aclocal ${local_action_options}"
-    fi
-fi
-
-# Both autom4te.cfg and libtoolize, as installed from source, want to
-# use absolute file system paths that cannot be
-# overridden. Consequently, we create temporary, local versions of
-# these, patched up with SDK-specific paths.
-
-BOOTSTRAP_TMPDIR="`mktemp -d /tmp/tmp.bootstrapXXXXXX`"
-
-trap "removetmp" 1 2 3 9 15
-
-#
-# Generate any temporary files that need to be patched at run time
-# with the location of the SDK tree, including:
-#
-#   -  The autom4te configuration file
-#   -  The libtoolize executable script
-#
-
-if [ -r "${abs_top_hostdir}/share/autoconf/autom4te.cfg" ]; then
-    export AUTOM4TE_CFG="${BOOTSTRAP_TMPDIR}/autom4te.cfg"
-
-    sed -e "s,//share/autoconf,${abs_top_hostdir}/share/autoconf,g" < "${abs_top_hostdir}/share/autoconf/autom4te.cfg" > "${AUTOM4TE_CFG}"
-fi
-
-if [ -r "${abs_top_hostdir}/${host}/bin/libtoolize" ]; then
-    export LIBTOOLIZE="${BOOTSTRAP_TMPDIR}/libtoolize"
-
-    sed -e "s,//share/libtool,${abs_top_hostdir}/share/libtool,g" -e "s,//share/aclocal,${abs_top_hostdir}/share/aclocal,g" < "${abs_top_hostdir}/${host}/bin/libtoolize" > "${LIBTOOLIZE}"
-
-    chmod 775 "${LIBTOOLIZE}"
-fi
-
-# Before we get much further, check to ensure that the required
-# executables are available and, if not, provide some actionable
-# guidance.
-
-check_required_executables
- 
-if [ -n "${verbose}" ]; then
-    echo PATH="${PATH}"
-
-    echo ACLOCAL="${ACLOCAL}"
-    echo AUTOCONF="${AUTOCONF}"
-    echo AUTOHEADER="${AUTOHEADER}"
-    echo AUTOM4TE="${AUTOM4TE}"
-    echo AUTOMAKE="${AUTOMAKE}"
-    echo LIBTOOLIZE="${LIBTOOLIZE}"
-    echo M4="${M4}"
-
-    echo AC_MACRODIR="${AC_MACRODIR}"
-    echo AUTOM4TE_CFG="${AUTOM4TE_CFG}"
-    echo PERL5LIB="${PERL5LIB}"
-    echo autom4te_perllibdir="${autom4te_perllibdir}"
-
-    echo local_action_options="${local_action_options}"
-    echo make_action_options="${make_action_options}"
-fi
-
-# Set up the default actions for each bootstrap stage.
-
-local_action="${ACLOCAL} ${verbose} ${local_action_options}"
-header_action="${AUTOHEADER} ${verbose}"
-tool_action="${LIBTOOLIZE} ${verbose} --automake --copy --force"
-make_action="${AUTOMAKE} ${verbose} ${make_action_options} --add-missing --copy"
-config_action="${AUTOCONF} ${verbose}"
-
-# Determine what needs to be short-circuited based on the
-# user-specified "what".
-
-case "${what}" in
-
-    all)
-        ;;
-
-    conf*)
-        local_action=true
-        header_action=true
-        tool_action=true
-        make_action=true
-        ;;
-
-    make*)
-        local_action=true
-        header_action=true
-        config_action=true
-        ;;
-
-    none)
-        local_action=true
-        header_action=true
-        tool_action=true
-        make_action=true
-        config_action=true
-        ;;
-
-esac
-
-# Bootstrap the package.
-
-if [ -n "${verbose}" ]; then
-    echo "${local_action} && ${tool_action} && ${header_action} && ${make_action} && ${config_action}"
-fi
-
-${local_action} && ${tool_action} && ${header_action} && ${make_action} && ${config_action}
-
-# Clean up any temporary files created.
-
-removetmp
diff --git a/third_party/nlbuild-autotools/repo/scripts/bootstrap-configure b/third_party/nlbuild-autotools/repo/scripts/bootstrap-configure
deleted file mode 100755
index b745e1e..0000000
--- a/third_party/nlbuild-autotools/repo/scripts/bootstrap-configure
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-#
-#    Copyright 2014-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file implements a script which, when run from a project
-#      build directory (either disparate or colocated with the
-#      source), will attempt to clean the build directory, rebootstrap
-#      the package, and then rerun the configuration script for the
-#      package with the provided arguments.
-#
-#      This script is particularly useful when you are changing the
-#      configuration script and testing those changes.
-#
-
-srcdir=`dirname ${0}`
-builddir=.
-
-# Bring the package build back to a pristine state.
-
-if [ -f config.status ]; then
-	make maintainer-clean
-fi
-
-# Change directories to the package source and rebootstrap the package.
-
-pushd ${srcdir}
-
-./bootstrap
-bootstrap_status=$?
-
-popd
-
-# If the package was successfully bootstrapped, configure it.
-
-if [ ${bootstrap_status} -eq 0 ]; then
-    ${srcdir}/configure $*
-else
-   exit ${bootstrap_status}
-fi
diff --git a/third_party/nlbuild-autotools/repo/scripts/mkskeleton b/third_party/nlbuild-autotools/repo/scripts/mkskeleton
deleted file mode 100755
index 2a1233e..0000000
--- a/third_party/nlbuild-autotools/repo/scripts/mkskeleton
+++ /dev/null
@@ -1,239 +0,0 @@
-#!/bin/bash
-
-#
-#    Copyright 2015-2018 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is a convenience script that will create a skeleton
-#      build layout using the nlbuild-autotools package.
-#
-
-YEAR=`date "+%Y"`
-NAME=""
-DESCRIPTION=""
-DIR=""
-VERSION="1.0"
-verbose=1
-
-#
-# usage
-#
-# Display program usage.
-#
-usage() {
-    name=`basename $0`
-
-    echo "Usage: ${name} [ options ]"
-
-    if [ $1 -ne 0 ]; then
-        echo "Try '${name} -h' for more information."
-    fi
-
-    if [ $1 -ne 1 ]; then
-        echo ""
-        echo "  -h, --help                  Print this help, then exit."
-        echo "  -I DIR                      Specify directory DIR as the root of the "
-        echo "                              nlbuild-autotools repository."
-        echo "  -v, --verbose               Verbosely report mkskeleton progress (default: yes)."
-        echo "  --package-description DESC  Specify description DESC as a the "
-        echo "                              package description."
-        echo "  --package-name NAME         Specify name NAME as the package name."
-        echo "  --package-version VERSION   Specify version VERSION as the initial "
-        echo "                              version for the package (default: ${VERSION})."
-        echo "  --package-year YEAR         Specify year YEAR as the creation "
-        echo "                              year for the package (default: ${YEAR})."
-        echo "  -q, --quiet                 Do not verbosely report mkskeleton progress (default: no)."
-
-        echo ""
-    fi
-
-    exit $1
-}
-
-#
-# log
-#
-log() {
-    if [ ! -z ${verbose} ] && [ ${verbose} -eq 1 ]; then
-        echo $*
-    fi
-}
-
-transform() {
-    local from="${1}"
-    local to="${2}"
-
-    sed                                                   \
-        -e "s,\@NLBUILD_AUTOTOOLS_STEM\@,${DIR},g"        \
-        -e "s,\@PACKAGE_DESCRIPTION\@,${DESCRIPTION},g"   \
-        -e "s,\@PACKAGE_SHORT_LOWER\@,${LOWER},g"         \
-        -e "s,\@PACKAGE_SHORT_UPPER\@,${UPPER},g"         \
-        -e "s,\@PACKAGE_YEAR\@,${YEAR},g"                 \
-        < "${from}" > "${to}"
-}
-
-populate() {
-    local nlbuild="${1}"
-    local perm=${2}
-    local file="${3}"
-    local directory="${4}"
-    local stem="${file%.*}"
-    local extension="${file##*.}"
-    local from
-    local to
-
-    if [ -r "${nlbuild}/examples/${file}" ]; then
-        from="${nlbuild}/examples/${file}"
-
-    elif [ -r "${nlbuild}/examples/${stem}-${directory}.${extension}" ]; then
-        from="${nlbuild}/examples/${stem}-${directory}.${extension}"
-
-    elif [ "${directory}" = "." ] && [ -r "${nlbuild}/examples/${stem}-toplevel.${extension}" ]; then
-        from="${nlbuild}/examples/${stem}-toplevel.${extension}"
-
-    else
-        echo "Cannot find an example file \"${file}\" for directory \"${directory}\"."
-        exit 1
-
-    fi
-
-    to="${directory}/${file}"
-
-    log "Creating \"${to}\"..."
-
-    transform "${from}" "${to}"
-
-    if [ $? = 0 ]; then
-        chmod ${perm} "${to}"
-    fi
-}
-
-#
-# link
-#
-link() {
-    local nlbuild="${1}"
-    local perm=${2}
-    local source="${3}"
-    local directory="${4}"
-    local from="${nlbuild}/scripts/${source}"
-    local to="${directory}/${source}"
-
-    log "Creating \"${to}\"..."
-
-    ln -sf "${from}" "${to}"
-}
-
-# Parse out any command line options
-
-while [ ${#} -gt 0 ]; do
-    if [ ${1} == "-h" ] || [ ${1} == "--help" ]; then
-        usage 0
-
-    elif [ ${1} == "-I" ]; then
-        DIR="${2}"
-        shift 2
-
-    elif [ ${1} == "--package-description" ]; then
-        DESCRIPTION="${2}"
-        shift 2
-
-    elif [ ${1} == "--package-name" ]; then
-        NAME="${2}"
-        shift 2
-
-        UPPER="`echo ${NAME} | tr '[[:lower:]]' '[[:upper:]]'`"
-        LOWER="`echo ${NAME} | tr '[[:upper:]]' '[[:lower:]]'`"
-
-    elif [ ${1} == "--package-version" ]; then
-        VERSION="${2}"
-        shift 2
-
-    elif [ ${1} == "--package-year" ]; then
-        YEAR="${2}"
-        shift 2
-
-    elif [ ${1} == "-q" ] || [ ${1} == "--quiet" ]; then
-        verbose=0
-        shift 1
-
-    elif [ ${1} == "-v" ] || [ ${1} == "--verbose" ]; then
-        verbose=1
-        shift 1
-
-    else
-        usage 1
-
-    fi
-done
-
-# Sanity check the command line arguments
-
-if [ -z "${DIR}" ]; then
-    echo "$0: No -I option specified. Please provide the location of the nlbuild-autotools directory."
-    exit 1
-
-fi
-
-if [ -z "${DESCRIPTION}" ]; then
-    echo "$0: Please provide a package description via --package-description."
-    exit 1
-fi
-
-if [ -z "${NAME}" ]; then
-    echo "$0: Please provide a package name via --package-name."
-    exit 1
-fi
-
-if [ -z "${VERSION}" ]; then
-    echo "$0: Please provide a package default version via --package-version."
-    exit 1
-fi
-
-if [ -z "${YEAR}" ]; then
-    echo "$0: Please provide a package creation year via --package-year."
-    exit 1
-fi
-
-# Create the skeleton directories
-
-DIRS="doc third_party include src tests"
-
-for dir in ${DIRS}; do
-    log "Creating \"${dir}\"..."
-    mkdir -p "${dir}"
-done
-
-# Populate the skeleton directories
-
-populate "${DIR}" 664 configure.ac        .
-populate "${DIR}" 775 bootstrap           .
-populate "${DIR}" 664 repos.conf          .
-populate "${DIR}" 664 Makefile.am         .
-populate "${DIR}" 664 Makefile-bootstrap  .
-populate "${DIR}" 664 Makefile.am         doc
-populate "${DIR}" 664 Doxyfile.in         doc
-populate "${DIR}" 664 Makefile.am         third_party 
-populate "${DIR}" 664 Makefile.am         src
-populate "${DIR}" 664 Makefile.am         tests
-link     "${DIR}" 775 bootstrap-configure .
-
-# Create the default package version
-
-log "Creating default version ${VERSION}..."
-
-echo "${VERSION}" > ".default-version"
diff --git a/third_party/nlbuild-autotools/repo/scripts/mkversion b/third_party/nlbuild-autotools/repo/scripts/mkversion
deleted file mode 100755
index aa0b9f8..0000000
--- a/third_party/nlbuild-autotools/repo/scripts/mkversion
+++ /dev/null
@@ -1,245 +0,0 @@
-#!/bin/bash
-
-#
-#    Copyright 2011-2016 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file attempts to find and generate a package version
-#      including, if necessary, the number of commits from the last
-#      GIT tag and the current GIT hash corresponding to HEAD for the
-#      current branch.
-#
-#      This is largely cobbled together from similar scripts in other
-#      packages that are maintained in GIT (linux, u-boot, parted, etc.).
-#
-#      This can produce version information such as:
-#
-#        1.0.1
-#        1.0.1-dirty
-#        1.0.1-00032-gab50dbb
-#        1.0.1-00032-gab50dbb-dirty
-#
-
-# Constants
-
-ROOTDIR=${PREFIX}/
-
-BINDIR=${ROOTDIR}bin
-DATADIR=${ROOTDIR}share
-DEVICEDIR=${ROOTDIR}dev
-CONFDIR=${ROOTDIR}etc
-LIBDIR=${ROOTDIR}lib
-LIBEXECDIR=${ROOTDIR}libexec
-VARDIR=${ROOTDIR}var
-LOGDIR=${VARDIR}/log
-MANDIR=${ROOTDIR}man
-SBINDIR=${ROOTDIR}sbin
-
-USRDIR=${ROOTDIR}usr
-USRBINDIR=${USRDIR}/bin
-USRDATADIR=${USRDIR}/share
-USRLIBDIR=${USRDIR}/lib
-USRLIBEXECDIR=${USRDIR}/libexec
-USRSBINDIR=${USRDIR}/sbin
-
-AWK=${USRBINDIR}/awk
-BASENAME=${USRBINDIR}/basename
-CAT=${BINDIR}/cat
-ECHO="${BINDIR}/echo"
-NULL=${DEVICEDIR}/null
-PRINTF=${USRBINDIR}/printf
-RM=${BINDIR}/rm
-SED=${BINDIR}/sed
-
-VERSION=""
-
-#
-# usage <status>
-#
-# Description:
-#   This routine prints out the proper command line usage for this
-#   program and then exits with the specified status.
-#
-# Input(s):
-#   status - Exit status to exit the program with.
-#
-# Returns:
-#   This subroutine does not return.
-#
-usage() {
-	local name=`${BASENAME} ${0}`
-
-	${ECHO} "Usage: ${name} [options] [ <project root> ]"
-
-	if [ ${1} -ne 0 ]; then
-		${ECHO} "Try '${name} -h' for more information."
-	fi
-
-	if [ ${1} -ne 1 ]; then
-${CAT} << EOF
-  -b, --build-version=VERSION  Specify VERSION as the build version to generate
-                               extra build information against.
-  -h, --help                   Print this help, then exit.
-EOF
-	fi
-
-	exit ${1}
-}
-
-#
-# gitversion <string> <directory> <version>
-#
-# Description:
-#   This routine prints out any GIT version information appended to the
-#   end of the package version, including the number of commits from
-#   the last GIT tag and the current GIT hash corresponding to HEAD
-#   for the current branch.
-#
-# Input(s):
-#   string    - The current version string which may be empty.
-#   directory - The current directory.
-#   version   - The optional current package version.
-#
-# Returns:
-#   N/A
-#
-gitversion() {
-	local string="${1}"
-	local dir="${2}"
-	local version="${3}"
-	local head
-	local exact
-	local dtag
-	local gitversion
-
-	# Retrieve the shortened, unique GIT hash associated with the
-	# 'HEAD' GIT object
-
-	head=`test -d .git && git rev-parse --verify --short HEAD 2> ${NULL}`
-
-	# If we found a hash, we are actually in a GIT repository; continue.
-
-	if [ -n "${head}" ]; then
-	    	# Check to see if we have a position in GIT that is
-	    	# exactly at an existing tag (e.g. 1.0.2). If we are,
-	    	# just use it and add a dirty qualifier. Otherwise,
-	    	# work through the logic to determine how far off the
-	    	# tag the tree is.
-
-	    	exact="`git describe --exact-match 2> ${NULL}`"
-
-		if [ -z "${exact}" ] || [ -n "${version}" ] && [ "${version}" != "${exact}" ]; then
-			dtag="`git describe 2> ${NULL}`"
-
-			# If we are n commits away from a tag, then
-			# print n and a shortened version of the
-			# hash. Otherwise, just print the hash.
-			#
-			# If we are at an exact version, then there
-			# won't be a delta or a hash, just use the
-			# exact tag.
-
-			if [ -n "${dtag}" ]; then
-				if [ "${dtag}" == "${exact}" ]; then
-					gitversion="${dtag}"
-				else
-					gitversion=`${PRINTF} "${dtag}" | ${AWK} -F '-' '{printf("%s-%05d-%s", $(NF-2),$(NF-1),$(NF))}' 2> ${NULL}`
-				fi
-
-			else
-				gitversion=`${PRINTF} "g${head}"`
-
-			fi
-
-                else
-			gitversion="${exact}"
-
-		fi
-
-		# Update the index if we are in a writable directory
-		# so that we can successfully check for a dirty (has
-		# uncommitted changes or unresolved merges) tree.
-
-		if [ -w "${dir}" ]; then
-			git update-index --refresh --unmerged > ${NULL}
-		fi
-
-		# Now check for such a dirty tree and add to the "string"
-		# if we found one.
-
-		if git diff-index --name-only HEAD | read dummy; then
-		    	if [ -n "${gitversion}" ]; then
-				gitversion="${gitversion}-dirty"
-			else
-				gitversion="dirty"
-			fi
-    		fi
-
-	else
-		gitversion="${version}"
-
-	fi
-
-	if [ -n "${string}" ] && [ -n "${gitversion}" ]; then
-		string="${string}-${gitversion}"
-	else
-		string="${gitversion}"
-	fi
-
-	${PRINTF} "${string}"
-}
-
-#
-# Main Program Body
-#
-
-while [ ${#} -gt 0 ]; do
-    	if [ ${1:0:1} == "-" ]; then
-		if [ "${1}" == "-h" ] || [ "${1}" == "--help" ]; then
-			usage 0
-
-		elif [ "${1}" == "-b" ] || [ "${1}" == "--build-version" ]; then
-			version="${2}"
-			shift 2
-
-		else
-		    	${ECHO} "Unknown argument '${1}'."
-			usage 1
-
-		fi
-
-	else
-		break
-
-	fi
-done
-
-if [ ${#} -gt 1 ]; then
-	usage 1
-elif [ ${#} -eq 1 ]; then
-	tree="${1}"
-else
-	tree="."
-fi
-
-if [ "${tree}" != "." ]; then
-	cd "${tree}"
-fi
-
-VERSION="`gitversion \"${VERSION}\" . ${version}`"
-
-${PRINTF} "${VERSION}"
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/ar-lib b/third_party/nlbuild-autotools/repo/third_party/autoconf/ar-lib
deleted file mode 100755
index fe2301e..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/ar-lib
+++ /dev/null
@@ -1,270 +0,0 @@
-#! /bin/sh
-# Wrapper for Microsoft lib.exe
-
-me=ar-lib
-scriptversion=2012-03-01.08; # UTC
-
-# Copyright (C) 2010-2013 Free Software Foundation, Inc.
-# Written by Peter Rosin <peda@lysator.liu.se>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-
-# func_error message
-func_error ()
-{
-  echo "$me: $1" 1>&2
-  exit 1
-}
-
-file_conv=
-
-# func_file_conv build_file
-# Convert a $build file to $host form and store it in $file
-# Currently only supports Windows hosts.
-func_file_conv ()
-{
-  file=$1
-  case $file in
-    / | /[!/]*) # absolute file, and not a UNC file
-      if test -z "$file_conv"; then
-	# lazily determine how to convert abs files
-	case `uname -s` in
-	  MINGW*)
-	    file_conv=mingw
-	    ;;
-	  CYGWIN*)
-	    file_conv=cygwin
-	    ;;
-	  *)
-	    file_conv=wine
-	    ;;
-	esac
-      fi
-      case $file_conv in
-	mingw)
-	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
-	  ;;
-	cygwin)
-	  file=`cygpath -m "$file" || echo "$file"`
-	  ;;
-	wine)
-	  file=`winepath -w "$file" || echo "$file"`
-	  ;;
-      esac
-      ;;
-  esac
-}
-
-# func_at_file at_file operation archive
-# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
-# for each of them.
-# When interpreting the content of the @FILE, do NOT use func_file_conv,
-# since the user would need to supply preconverted file names to
-# binutils ar, at least for MinGW.
-func_at_file ()
-{
-  operation=$2
-  archive=$3
-  at_file_contents=`cat "$1"`
-  eval set x "$at_file_contents"
-  shift
-
-  for member
-  do
-    $AR -NOLOGO $operation:"$member" "$archive" || exit $?
-  done
-}
-
-case $1 in
-  '')
-     func_error "no command.  Try '$0 --help' for more information."
-     ;;
-  -h | --h*)
-    cat <<EOF
-Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
-
-Members may be specified in a file named with @FILE.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "$me, version $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test $# -lt 3; then
-  func_error "you must specify a program, an action and an archive"
-fi
-
-AR=$1
-shift
-while :
-do
-  if test $# -lt 2; then
-    func_error "you must specify a program, an action and an archive"
-  fi
-  case $1 in
-    -lib | -LIB \
-    | -ltcg | -LTCG \
-    | -machine* | -MACHINE* \
-    | -subsystem* | -SUBSYSTEM* \
-    | -verbose | -VERBOSE \
-    | -wx* | -WX* )
-      AR="$AR $1"
-      shift
-      ;;
-    *)
-      action=$1
-      shift
-      break
-      ;;
-  esac
-done
-orig_archive=$1
-shift
-func_file_conv "$orig_archive"
-archive=$file
-
-# strip leading dash in $action
-action=${action#-}
-
-delete=
-extract=
-list=
-quick=
-replace=
-index=
-create=
-
-while test -n "$action"
-do
-  case $action in
-    d*) delete=yes  ;;
-    x*) extract=yes ;;
-    t*) list=yes    ;;
-    q*) quick=yes   ;;
-    r*) replace=yes ;;
-    s*) index=yes   ;;
-    S*)             ;; # the index is always updated implicitly
-    c*) create=yes  ;;
-    u*)             ;; # TODO: don't ignore the update modifier
-    v*)             ;; # TODO: don't ignore the verbose modifier
-    *)
-      func_error "unknown action specified"
-      ;;
-  esac
-  action=${action#?}
-done
-
-case $delete$extract$list$quick$replace,$index in
-  yes,* | ,yes)
-    ;;
-  yesyes*)
-    func_error "more than one action specified"
-    ;;
-  *)
-    func_error "no action specified"
-    ;;
-esac
-
-if test -n "$delete"; then
-  if test ! -f "$orig_archive"; then
-    func_error "archive not found"
-  fi
-  for member
-  do
-    case $1 in
-      @*)
-        func_at_file "${1#@}" -REMOVE "$archive"
-        ;;
-      *)
-        func_file_conv "$1"
-        $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
-        ;;
-    esac
-  done
-
-elif test -n "$extract"; then
-  if test ! -f "$orig_archive"; then
-    func_error "archive not found"
-  fi
-  if test $# -gt 0; then
-    for member
-    do
-      case $1 in
-        @*)
-          func_at_file "${1#@}" -EXTRACT "$archive"
-          ;;
-        *)
-          func_file_conv "$1"
-          $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
-          ;;
-      esac
-    done
-  else
-    $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
-    do
-      $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
-    done
-  fi
-
-elif test -n "$quick$replace"; then
-  if test ! -f "$orig_archive"; then
-    if test -z "$create"; then
-      echo "$me: creating $orig_archive"
-    fi
-    orig_archive=
-  else
-    orig_archive=$archive
-  fi
-
-  for member
-  do
-    case $1 in
-    @*)
-      func_file_conv "${1#@}"
-      set x "$@" "@$file"
-      ;;
-    *)
-      func_file_conv "$1"
-      set x "$@" "$file"
-      ;;
-    esac
-    shift
-    shift
-  done
-
-  if test -n "$orig_archive"; then
-    $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
-  else
-    $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
-  fi
-
-elif test -n "$list"; then
-  if test ! -f "$orig_archive"; then
-    func_error "archive not found"
-  fi
-  $AR -NOLOGO -LIST "$archive" || exit $?
-fi
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/config.guess b/third_party/nlbuild-autotools/repo/third_party/autoconf/config.guess
deleted file mode 100755
index d622a44..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/config.guess
+++ /dev/null
@@ -1,1530 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
-
-timestamp='2012-02-10'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep -q __ELF__
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-		os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-	exitcode=$?
-	trap '' 0
-	exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-	echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
-	exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
-	SUN_ARCH="i386"
-	# If there is a compiler, see if it is configured for 64-bit objects.
-	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		grep IS_64BIT_ARCH >/dev/null
-	    then
-		SUN_ARCH="x86_64"
-	    fi
-	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
-	exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
-	exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
-	exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-	# DG/UX returns AViiON for all architectures
-	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
-	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[4567])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
-		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
-			  32) HP_ARCH="hppa2.0n" ;;
-			  64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-			esac ;;
-		    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
-
-		#define _HPUX_SOURCE
-		#include <stdlib.h>
-		#include <unistd.h>
-
-		int main ()
-		{
-		#if defined(_SC_KERNEL_BITS)
-		    long bits = sysconf(_SC_KERNEL_BITS);
-		#endif
-		    long cpu  = sysconf (_SC_CPU_VERSION);
-
-		    switch (cpu)
-			{
-			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-			case CPU_PA_RISC2_0:
-		#if defined(_SC_KERNEL_BITS)
-			    switch (bits)
-				{
-				case 64: puts ("hppa2.0w"); break;
-				case 32: puts ("hppa2.0n"); break;
-				default: puts ("hppa2.0"); break;
-				} break;
-		#else  /* !defined(_SC_KERNEL_BITS) */
-			    puts ("hppa2.0"); break;
-		#endif
-			default: puts ("hppa1.0"); break;
-			}
-		    exit (0);
-		}
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep -q __LP64__
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-	exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-	exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-	exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-	exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case ${UNAME_PROCESSOR} in
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:MSYS*:*)
-	echo ${UNAME_MACHINE}-pc-msys
-	exit ;;
-    i*:windows32*:*)
-	# uname -m includes "-pc" on this system.
-	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:*)
-	case ${UNAME_MACHINE} in
-	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    8664:Windows_NT:*)
-	echo x86_64-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    aarch64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    aarch64_be:Linux:*:*)
-	UNAME_MACHINE=aarch64_be
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-	esac
-	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    arm*:Linux:*:*)
-	eval $set_cc_for_build
-	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-	    | grep -q __ARM_EABI__
-	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
-	else
-	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-		| grep -q __ARM_PCS_VFP
-	    then
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-	    else
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
-	    fi
-	fi
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	LIBC=gnu
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:* | mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef ${UNAME_MACHINE}
-	#undef ${UNAME_MACHINE}el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=${UNAME_MACHINE}el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=${UNAME_MACHINE}
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-	# Unixware is an offshoot of SVR4, but it has its own version
-	# number series starting with 2...
-	# I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-	# Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-	# uname -m prints for DJGPP always 'pc', but it prints nothing about
-	# the processor, so we play safe by assuming i586.
-	# Note: whatever this is, it MUST be the same as what config.sub
-	# prints for the "djgpp" host, or else GDB configury will decide that
-	# this is a cross-build.
-	echo i586-pc-msdosdjgpp
-	exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4; exit; } ;;
-    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-	OS_REL='.3'
-	test -r /etc/.relid \
-	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-			# says <Richard.M.Bartel@ccMail.Census.GOV>
-	echo i586-unisys-sysv4
-	exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv${UNAME_RELEASE}
-	else
-		echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-	exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
-	echo i586-pc-haiku
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		      grep IS_64BIT_ARCH >/dev/null
-		  then
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-	echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-    i*86:AROS:*:*)
-	echo ${UNAME_MACHINE}-pc-aros
-	exit ;;
-    x86_64:VMkernel:*:*)
-	echo ${UNAME_MACHINE}-unknown-esx
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-	"4"
-#else
-	""
-#endif
-	); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/config.sub b/third_party/nlbuild-autotools/repo/third_party/autoconf/config.sub
deleted file mode 100755
index c894da4..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/config.sub
+++ /dev/null
@@ -1,1773 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
-
-timestamp='2012-02-10'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
-  kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  android-linux)
-    os=-linux-android
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray | -microblaze)
-		os=
-		basic_machine=$1
-		;;
-	-bluegene*)
-		os=-cnk
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
-	-chorusrdb)
-		os=-chorusrdb
-		basic_machine=$1
-		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| aarch64 | aarch64_be \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-        | be32 | be64 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| epiphany \
-	| fido | fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| hexagon \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| le32 | le64 \
-	| lm32 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64octeon | mips64octeonel \
-	| mips64orion | mips64orionel \
-	| mips64r5900 | mips64r5900el \
-	| mips64vr | mips64vrel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| moxie \
-	| mt \
-	| msp430 \
-	| nds32 | nds32le | nds32be \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| open8 \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle \
-	| pyramid \
-	| rl78 | rx \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu \
-	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
-	| ubicom32 \
-	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-	| we32k \
-	| x86 | xc16x | xstormy16 | xtensa \
-	| z8k | z80)
-		basic_machine=$basic_machine-unknown
-		;;
-	c54x)
-		basic_machine=tic54x-unknown
-		;;
-	c55x)
-		basic_machine=tic55x-unknown
-		;;
-	c6x)
-		basic_machine=tic6x-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	strongarm | thumb | xscale)
-		basic_machine=arm-unknown
-		;;
-	xgate)
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	xscaleeb)
-		basic_machine=armeb-unknown
-		;;
-
-	xscaleel)
-		basic_machine=armel-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| aarch64-* | aarch64_be-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| be32-* | be64-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| hexagon-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| le32-* | le64-* \
-	| lm32-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64octeon-* | mips64octeonel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64r5900-* | mips64r5900el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nds32-* | nds32le-* | nds32be-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| open8-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-	| pyramid-* \
-	| rl78-* | romp-* | rs6000-* | rx-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
-	| tahoe-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile*-* \
-	| tron-* \
-	| ubicom32-* \
-	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
-	| vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* \
-	| xstormy16-* | xtensa*-* \
-	| ymp-* \
-	| z8k-* | z80-*)
-		;;
-	# Recognize the basic CPU types without company name, with glob match.
-	xtensa*)
-		basic_machine=$basic_machine-unknown
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aros)
-		basic_machine=i386-pc
-		os=-aros
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	blackfin)
-		basic_machine=bfin-unknown
-		os=-linux
-		;;
-	blackfin-*)
-		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	bluegene*)
-		basic_machine=powerpc-ibm
-		os=-cnk
-		;;
-	c54x-*)
-		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c55x-*)
-		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c6x-*)
-		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	cegcc)
-		basic_machine=arm-unknown
-		os=-cegcc
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16 | cr16-*)
-		basic_machine=cr16-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dicos)
-		basic_machine=i686-pc
-		os=-dicos
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m68knommu)
-		basic_machine=m68k-unknown
-		os=-linux
-		;;
-	m68knommu-*)
-		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	microblaze)
-		basic_machine=microblaze-xilinx
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	mingw32ce)
-		basic_machine=arm-unknown
-		os=-mingw32ce
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	msys)
-		basic_machine=i386-pc
-		os=-msys
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	nacl)
-		basic_machine=le32-unknown
-		os=-nacl
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	neo-tandem)
-		basic_machine=neo-tandem
-		;;
-	nse-tandem)
-		basic_machine=nse-tandem
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	parisc)
-		basic_machine=hppa-unknown
-		os=-linux
-		;;
-	parisc-*)
-		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc | ppcbe)	basic_machine=powerpc-unknown
-		;;
-	ppc-* | ppcbe-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh5el)
-		basic_machine=sh5le-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	strongarm-* | thumb-*)
-		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tile*)
-		basic_machine=$basic_machine-unknown
-		os=-linux-gnu
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	xscale-* | xscalee[bl]-*)
-		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	z80-*-coff)
-		basic_machine=z80-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-	# First match some system type aliases
-	# that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-auroraux)
-		os=-auroraux
-		;;
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-	      | -sym* | -kopensolaris* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-	-os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-	-tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-dicos*)
-		os=-dicos
-		;;
-	-nacl*)
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	score-*)
-		os=-elf
-		;;
-	spu-*)
-		os=-elf
-		;;
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-	c4x-* | tic4x-*)
-		os=-coff
-		;;
-	tic54x-*)
-		os=-coff
-		;;
-	tic55x-*)
-		os=-coff
-		;;
-	tic6x-*)
-		os=-coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mep-*)
-		os=-elf
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-cnk*|-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/install-sh b/third_party/nlbuild-autotools/repo/third_party/autoconf/install-sh
deleted file mode 100755
index a9244eb..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/install-sh
+++ /dev/null
@@ -1,527 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2011-01-19.21; # UTC
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" ""	$nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
-     --help     display this help and exit.
-     --version  display version info and exit.
-
-  -c            (ignored)
-  -C            install only if different (preserve the last data modification time)
-  -d            create directories instead of installing files.
-  -g GROUP      $chgrpprog installed files to GROUP.
-  -m MODE       $chmodprog installed files to MODE.
-  -o USER       $chownprog installed files to USER.
-  -s            $stripprog installed files.
-  -t DIRECTORY  install into DIRECTORY.
-  -T            report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
-  RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
-  case $1 in
-    -c) ;;
-
-    -C) copy_on_change=true;;
-
-    -d) dir_arg=true;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-	shift;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) mode=$2
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-	shift;;
-
-    -o) chowncmd="$chownprog $2"
-	shift;;
-
-    -s) stripcmd=$stripprog;;
-
-    -t) dst_arg=$2
-	# Protect names problematic for `test' and other utilities.
-	case $dst_arg in
-	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
-	esac
-	shift;;
-
-    -T) no_target_directory=true;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    --)	shift
-	break;;
-
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
-
-    *)  break;;
-  esac
-  shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
-  # When -d is used, all remaining arguments are directories to create.
-  # When -t is used, the destination is already specified.
-  # Otherwise, the last argument is the destination.  Remove it from $@.
-  for arg
-  do
-    if test -n "$dst_arg"; then
-      # $@ is not empty: it contains at least $arg.
-      set fnord "$@" "$dst_arg"
-      shift # fnord
-    fi
-    shift # arg
-    dst_arg=$arg
-    # Protect names problematic for `test' and other utilities.
-    case $dst_arg in
-      -* | [=\(\)!]) dst_arg=./$dst_arg;;
-    esac
-  done
-fi
-
-if test $# -eq 0; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-if test -z "$dir_arg"; then
-  do_exit='(exit $ret); exit $ret'
-  trap "ret=129; $do_exit" 1
-  trap "ret=130; $do_exit" 2
-  trap "ret=141; $do_exit" 13
-  trap "ret=143; $do_exit" 15
-
-  # Set umask so as not to create temps with too-generous modes.
-  # However, 'strip' requires both read and write access to temps.
-  case $mode in
-    # Optimize common cases.
-    *644) cp_umask=133;;
-    *755) cp_umask=22;;
-
-    *[0-7])
-      if test -z "$stripcmd"; then
-	u_plus_rw=
-      else
-	u_plus_rw='% 200'
-      fi
-      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
-    *)
-      if test -z "$stripcmd"; then
-	u_plus_rw=
-      else
-	u_plus_rw=,u+rw
-      fi
-      cp_umask=$mode$u_plus_rw;;
-  esac
-fi
-
-for src
-do
-  # Protect names problematic for `test' and other utilities.
-  case $src in
-    -* | [=\(\)!]) src=./$src;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    dstdir=$dst
-    test -d "$dstdir"
-    dstdir_status=$?
-  else
-
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dst_arg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-    dst=$dst_arg
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dst_arg: Is a directory" >&2
-	exit 1
-      fi
-      dstdir=$dst
-      dst=$dstdir/`basename "$src"`
-      dstdir_status=0
-    else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
-      test -d "$dstdir"
-      dstdir_status=$?
-    fi
-  fi
-
-  obsolete_mkdir_used=false
-
-  if test $dstdir_status != 0; then
-    case $posix_mkdir in
-      '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
-
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
-	else
-	  mkdir_mode=
-	fi
-
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
-    esac
-
-    if
-      $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
-      )
-    then :
-    else
-
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
-      # or it failed possibly due to a race condition.  Create the
-      # directory the slow way, step by step, checking for races as we go.
-
-      case $dstdir in
-	/*) prefix='/';;
-	[-=\(\)!]*) prefix='./';;
-	*)  prefix='';;
-      esac
-
-      eval "$initialize_posix_glob"
-
-      oIFS=$IFS
-      IFS=/
-      $posix_glob set -f
-      set fnord $dstdir
-      shift
-      $posix_glob set +f
-      IFS=$oIFS
-
-      prefixes=
-
-      for d
-      do
-	test X"$d" = X && continue
-
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
-      done
-
-      if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
-      fi
-    fi
-  fi
-
-  if test -n "$dir_arg"; then
-    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
-    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
-    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
-      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
-  else
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
-    # Copy the file name to the temp name.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
-    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
-    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
-    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
-    # If -C, don't bother to copy if it wouldn't change the file.
-    if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
-       set X $old && old=:$2:$4:$5:$6 &&
-       set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
-       test "$old" = "$new" &&
-       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
-    then
-      rm -f "$dsttmp"
-    else
-      # Rename the file to the real destination.
-      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
-      # The rename failed, perhaps because mv can't rename something else
-      # to itself, or perhaps because mv is so ancient that it does not
-      # support -f.
-      {
-	# Now remove or move aside any old file at destination location.
-	# We try this two ways since rm can't unlink itself on some
-	# systems and the destination file might be busy for other
-	# reasons.  In this case, the final cleanup might fail but the new
-	# file should still install successfully.
-	{
-	  test ! -f "$dst" ||
-	  $doit $rmcmd -f "$dst" 2>/dev/null ||
-	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-	  } ||
-	  { echo "$0: cannot unlink or rename $dst" >&2
-	    (exit 1); exit 1
-	  }
-	} &&
-
-	# Now rename the file to the real destination.
-	$doit $mvcmd "$dsttmp" "$dst"
-      }
-    fi || exit 1
-
-    trap '' 0
-  fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_compare_version.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_compare_version.m4
deleted file mode 100644
index 74dc0fd..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_compare_version.m4
+++ /dev/null
@@ -1,177 +0,0 @@
-# ===========================================================================
-#    http://www.gnu.org/software/autoconf-archive/ax_compare_version.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-#
-# DESCRIPTION
-#
-#   This macro compares two version strings. Due to the various number of
-#   minor-version numbers that can exist, and the fact that string
-#   comparisons are not compatible with numeric comparisons, this is not
-#   necessarily trivial to do in a autoconf script. This macro makes doing
-#   these comparisons easy.
-#
-#   The six basic comparisons are available, as well as checking equality
-#   limited to a certain number of minor-version levels.
-#
-#   The operator OP determines what type of comparison to do, and can be one
-#   of:
-#
-#    eq  - equal (test A == B)
-#    ne  - not equal (test A != B)
-#    le  - less than or equal (test A <= B)
-#    ge  - greater than or equal (test A >= B)
-#    lt  - less than (test A < B)
-#    gt  - greater than (test A > B)
-#
-#   Additionally, the eq and ne operator can have a number after it to limit
-#   the test to that number of minor versions.
-#
-#    eq0 - equal up to the length of the shorter version
-#    ne0 - not equal up to the length of the shorter version
-#    eqN - equal up to N sub-version levels
-#    neN - not equal up to N sub-version levels
-#
-#   When the condition is true, shell commands ACTION-IF-TRUE are run,
-#   otherwise shell commands ACTION-IF-FALSE are run. The environment
-#   variable 'ax_compare_version' is always set to either 'true' or 'false'
-#   as well.
-#
-#   Examples:
-#
-#     AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
-#     AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
-#
-#   would both be true.
-#
-#     AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
-#     AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
-#
-#   would both be false.
-#
-#     AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
-#
-#   would be true because it is only comparing two minor versions.
-#
-#     AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
-#
-#   would be true because it is only comparing the lesser number of minor
-#   versions of the two values.
-#
-#   Note: The characters that separate the version numbers do not matter. An
-#   empty string is the same as version 0. OP is evaluated by autoconf, not
-#   configure, so must be a string, not a variable.
-#
-#   The author would like to acknowledge Guido Draheim whose advice about
-#   the m4_case and m4_ifvaln functions make this macro only include the
-#   portions necessary to perform the specific comparison specified by the
-#   OP argument in the final configure script.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 11
-
-dnl #########################################################################
-AC_DEFUN([AX_COMPARE_VERSION], [
-  AC_REQUIRE([AC_PROG_AWK])
-
-  # Used to indicate true or false condition
-  ax_compare_version=false
-
-  # Convert the two version strings to be compared into a format that
-  # allows a simple string comparison.  The end result is that a version
-  # string of the form 1.12.5-r617 will be converted to the form
-  # 0001001200050617.  In other words, each number is zero padded to four
-  # digits, and non digits are removed.
-  AS_VAR_PUSHDEF([A],[ax_compare_version_A])
-  A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-                     -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/[[^0-9]]//g'`
-
-  AS_VAR_PUSHDEF([B],[ax_compare_version_B])
-  B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-                     -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-                     -e 's/[[^0-9]]//g'`
-
-  dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
-  dnl # then the first line is used to determine if the condition is true.
-  dnl # The sed right after the echo is to remove any indented white space.
-  m4_case(m4_tolower($2),
-  [lt],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
-  ],
-  [gt],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
-  ],
-  [le],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
-  ],
-  [ge],[
-    ax_compare_version=`echo "x$A
-x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
-  ],[
-    dnl Split the operator from the subversion count if present.
-    m4_bmatch(m4_substr($2,2),
-    [0],[
-      # A count of zero means use the length of the shorter version.
-      # Determine the number of characters in A and B.
-      ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
-      ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
-
-      # Set A to no more than B's length and B to no more than A's length.
-      A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
-      B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
-    ],
-    [[0-9]+],[
-      # A count greater than zero means use only that many subversions
-      A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
-      B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
-    ],
-    [.+],[
-      AC_WARNING(
-        [illegal OP numeric parameter: $2])
-    ],[])
-
-    # Pad zeros at end of numbers to make same length.
-    ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
-    B="$B`echo $A | sed 's/./0/g'`"
-    A="$ax_compare_version_tmp_A"
-
-    # Check for equality or inequality as necessary.
-    m4_case(m4_tolower(m4_substr($2,0,2)),
-    [eq],[
-      test "x$A" = "x$B" && ax_compare_version=true
-    ],
-    [ne],[
-      test "x$A" != "x$B" && ax_compare_version=true
-    ],[
-      AC_WARNING([illegal OP parameter: $2])
-    ])
-  ])
-
-  AS_VAR_POPDEF([A])dnl
-  AS_VAR_POPDEF([B])dnl
-
-  dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
-  if test "$ax_compare_version" = "true" ; then
-    m4_ifvaln([$4],[$4],[:])dnl
-    m4_ifvaln([$5],[else $5])dnl
-  fi
-]) dnl AX_COMPARE_VERSION
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx.m4
deleted file mode 100644
index 2c18e49..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx.m4
+++ /dev/null
@@ -1,562 +0,0 @@
-# ===========================================================================
-#   http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
-#
-# DESCRIPTION
-#
-#   Check for baseline language coverage in the compiler for the specified
-#   version of the C++ standard.  If necessary, add switches to CXX and
-#   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard)
-#   or '14' (for the C++14 standard).
-#
-#   The second argument, if specified, indicates whether you insist on an
-#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
-#   -std=c++11).  If neither is specified, you get whatever works, with
-#   preference for an extended mode.
-#
-#   The third argument, if specified 'mandatory' or if left unspecified,
-#   indicates that baseline support for the specified C++ standard is
-#   required and that the macro should error out if no mode with that
-#   support is found.  If specified 'optional', then configuration proceeds
-#   regardless, after defining HAVE_CXX${VERSION} if and only if a
-#   supporting mode is found.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
-#   Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
-#   Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
-#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
-#   Copyright (c) 2015 Paul Norman <penorman@mac.com>
-#   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 4
-
-dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
-dnl  (serial version number 13).
-
-AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
-  m4_if([$1], [11], [],
-        [$1], [14], [],
-        [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
-        [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
-  m4_if([$2], [], [],
-        [$2], [ext], [],
-        [$2], [noext], [],
-        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
-  m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
-        [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
-        [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
-        [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
-  AC_LANG_PUSH([C++])dnl
-  ac_success=no
-  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
-  ax_cv_cxx_compile_cxx$1,
-  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
-    [ax_cv_cxx_compile_cxx$1=yes],
-    [ax_cv_cxx_compile_cxx$1=no])])
-  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
-    ac_success=yes
-  fi
-
-  m4_if([$2], [noext], [], [dnl
-  if test x$ac_success = xno; then
-    for switch in -std=gnu++$1 -std=gnu++0x; do
-      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
-      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
-                     $cachevar,
-        [ac_save_CXX="$CXX"
-         CXX="$CXX $switch"
-         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
-          [eval $cachevar=yes],
-          [eval $cachevar=no])
-         CXX="$ac_save_CXX"])
-      if eval test x\$$cachevar = xyes; then
-        CXX="$CXX $switch"
-        if test -n "$CXXCPP" ; then
-          CXXCPP="$CXXCPP $switch"
-        fi
-        ac_success=yes
-        break
-      fi
-    done
-  fi])
-
-  m4_if([$2], [ext], [], [dnl
-  if test x$ac_success = xno; then
-    dnl HP's aCC needs +std=c++11 according to:
-    dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
-    dnl Cray's crayCC needs "-h std=c++11"
-    for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
-      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
-      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
-                     $cachevar,
-        [ac_save_CXX="$CXX"
-         CXX="$CXX $switch"
-         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
-          [eval $cachevar=yes],
-          [eval $cachevar=no])
-         CXX="$ac_save_CXX"])
-      if eval test x\$$cachevar = xyes; then
-        CXX="$CXX $switch"
-        if test -n "$CXXCPP" ; then
-          CXXCPP="$CXXCPP $switch"
-        fi
-        ac_success=yes
-        break
-      fi
-    done
-  fi])
-  AC_LANG_POP([C++])
-  if test x$ax_cxx_compile_cxx$1_required = xtrue; then
-    if test x$ac_success = xno; then
-      AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
-    fi
-  fi
-  if test x$ac_success = xno; then
-    HAVE_CXX$1=0
-    AC_MSG_NOTICE([No compiler with C++$1 support was found])
-  else
-    HAVE_CXX$1=1
-    AC_DEFINE(HAVE_CXX$1,1,
-              [define if the compiler supports basic C++$1 syntax])
-  fi
-  AC_SUBST(HAVE_CXX$1)
-])
-
-
-dnl  Test body for checking C++11 support
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
-  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
-)
-
-
-dnl  Test body for checking C++14 support
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
-  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
-  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
-)
-
-
-dnl  Tests for new features in C++11
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
-
-// If the compiler admits that it is not ready for C++11, why torture it?
-// Hopefully, this will speed up the test.
-
-#ifndef __cplusplus
-
-#error "This is not a C++ compiler"
-
-#elif __cplusplus < 201103L
-
-#error "This is not a C++11 compiler"
-
-#else
-
-namespace cxx11
-{
-
-  namespace test_static_assert
-  {
-
-    template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-  }
-
-  namespace test_final_override
-  {
-
-    struct Base
-    {
-      virtual void f() {}
-    };
-
-    struct Derived : public Base
-    {
-      virtual void f() override {}
-    };
-
-  }
-
-  namespace test_double_right_angle_brackets
-  {
-
-    template < typename T >
-    struct check {};
-
-    typedef check<void> single_type;
-    typedef check<check<void>> double_type;
-    typedef check<check<check<void>>> triple_type;
-    typedef check<check<check<check<void>>>> quadruple_type;
-
-  }
-
-  namespace test_decltype
-  {
-
-    int
-    f()
-    {
-      int a = 1;
-      decltype(a) b = 2;
-      return a + b;
-    }
-
-  }
-
-  namespace test_type_deduction
-  {
-
-    template < typename T1, typename T2 >
-    struct is_same
-    {
-      static const bool value = false;
-    };
-
-    template < typename T >
-    struct is_same<T, T>
-    {
-      static const bool value = true;
-    };
-
-    template < typename T1, typename T2 >
-    auto
-    add(T1 a1, T2 a2) -> decltype(a1 + a2)
-    {
-      return a1 + a2;
-    }
-
-    int
-    test(const int c, volatile int v)
-    {
-      static_assert(is_same<int, decltype(0)>::value == true, "");
-      static_assert(is_same<int, decltype(c)>::value == false, "");
-      static_assert(is_same<int, decltype(v)>::value == false, "");
-      auto ac = c;
-      auto av = v;
-      auto sumi = ac + av + 'x';
-      auto sumf = ac + av + 1.0;
-      static_assert(is_same<int, decltype(ac)>::value == true, "");
-      static_assert(is_same<int, decltype(av)>::value == true, "");
-      static_assert(is_same<int, decltype(sumi)>::value == true, "");
-      static_assert(is_same<int, decltype(sumf)>::value == false, "");
-      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
-      return (sumf > 0.0) ? sumi : add(c, v);
-    }
-
-  }
-
-  namespace test_noexcept
-  {
-
-    int f() { return 0; }
-    int g() noexcept { return 0; }
-
-    static_assert(noexcept(f()) == false, "");
-    static_assert(noexcept(g()) == true, "");
-
-  }
-
-  namespace test_constexpr
-  {
-
-    template < typename CharT >
-    unsigned long constexpr
-    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
-    {
-      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
-    }
-
-    template < typename CharT >
-    unsigned long constexpr
-    strlen_c(const CharT *const s) noexcept
-    {
-      return strlen_c_r(s, 0UL);
-    }
-
-    static_assert(strlen_c("") == 0UL, "");
-    static_assert(strlen_c("1") == 1UL, "");
-    static_assert(strlen_c("example") == 7UL, "");
-    static_assert(strlen_c("another\0example") == 7UL, "");
-
-  }
-
-  namespace test_rvalue_references
-  {
-
-    template < int N >
-    struct answer
-    {
-      static constexpr int value = N;
-    };
-
-    answer<1> f(int&)       { return answer<1>(); }
-    answer<2> f(const int&) { return answer<2>(); }
-    answer<3> f(int&&)      { return answer<3>(); }
-
-    void
-    test()
-    {
-      int i = 0;
-      const int c = 0;
-      static_assert(decltype(f(i))::value == 1, "");
-      static_assert(decltype(f(c))::value == 2, "");
-      static_assert(decltype(f(0))::value == 3, "");
-    }
-
-  }
-
-  namespace test_uniform_initialization
-  {
-
-    struct test
-    {
-      static const int zero {};
-      static const int one {1};
-    };
-
-    static_assert(test::zero == 0, "");
-    static_assert(test::one == 1, "");
-
-  }
-
-  namespace test_lambdas
-  {
-
-    void
-    test1()
-    {
-      auto lambda1 = [](){};
-      auto lambda2 = lambda1;
-      lambda1();
-      lambda2();
-    }
-
-    int
-    test2()
-    {
-      auto a = [](int i, int j){ return i + j; }(1, 2);
-      auto b = []() -> int { return '0'; }();
-      auto c = [=](){ return a + b; }();
-      auto d = [&](){ return c; }();
-      auto e = [a, &b](int x) mutable {
-        const auto identity = [](int y){ return y; };
-        for (auto i = 0; i < a; ++i)
-          a += b--;
-        return x + identity(a + b);
-      }(0);
-      return a + b + c + d + e;
-    }
-
-    int
-    test3()
-    {
-      const auto nullary = [](){ return 0; };
-      const auto unary = [](int x){ return x; };
-      using nullary_t = decltype(nullary);
-      using unary_t = decltype(unary);
-      const auto higher1st = [](nullary_t f){ return f(); };
-      const auto higher2nd = [unary](nullary_t f1){
-        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
-      };
-      return higher1st(nullary) + higher2nd(nullary)(unary);
-    }
-
-  }
-
-  namespace test_variadic_templates
-  {
-
-    template <int...>
-    struct sum;
-
-    template <int N0, int... N1toN>
-    struct sum<N0, N1toN...>
-    {
-      static constexpr auto value = N0 + sum<N1toN...>::value;
-    };
-
-    template <>
-    struct sum<>
-    {
-      static constexpr auto value = 0;
-    };
-
-    static_assert(sum<>::value == 0, "");
-    static_assert(sum<1>::value == 1, "");
-    static_assert(sum<23>::value == 23, "");
-    static_assert(sum<1, 2>::value == 3, "");
-    static_assert(sum<5, 5, 11>::value == 21, "");
-    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
-
-  }
-
-  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
-  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
-  // because of this.
-  namespace test_template_alias_sfinae
-  {
-
-    struct foo {};
-
-    template<typename T>
-    using member = typename T::member_type;
-
-    template<typename T>
-    void func(...) {}
-
-    template<typename T>
-    void func(member<T>*) {}
-
-    void test();
-
-    void test() { func<foo>(0); }
-
-  }
-
-}  // namespace cxx11
-
-#endif  // __cplusplus >= 201103L
-
-]])
-
-
-dnl  Tests for new features in C++14
-
-m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
-
-// If the compiler admits that it is not ready for C++14, why torture it?
-// Hopefully, this will speed up the test.
-
-#ifndef __cplusplus
-
-#error "This is not a C++ compiler"
-
-#elif __cplusplus < 201402L
-
-#error "This is not a C++14 compiler"
-
-#else
-
-namespace cxx14
-{
-
-  namespace test_polymorphic_lambdas
-  {
-
-    int
-    test()
-    {
-      const auto lambda = [](auto&&... args){
-        const auto istiny = [](auto x){
-          return (sizeof(x) == 1UL) ? 1 : 0;
-        };
-        const int aretiny[] = { istiny(args)... };
-        return aretiny[0];
-      };
-      return lambda(1, 1L, 1.0f, '1');
-    }
-
-  }
-
-  namespace test_binary_literals
-  {
-
-    constexpr auto ivii = 0b0000000000101010;
-    static_assert(ivii == 42, "wrong value");
-
-  }
-
-  namespace test_generalized_constexpr
-  {
-
-    template < typename CharT >
-    constexpr unsigned long
-    strlen_c(const CharT *const s) noexcept
-    {
-      auto length = 0UL;
-      for (auto p = s; *p; ++p)
-        ++length;
-      return length;
-    }
-
-    static_assert(strlen_c("") == 0UL, "");
-    static_assert(strlen_c("x") == 1UL, "");
-    static_assert(strlen_c("test") == 4UL, "");
-    static_assert(strlen_c("another\0test") == 7UL, "");
-
-  }
-
-  namespace test_lambda_init_capture
-  {
-
-    int
-    test()
-    {
-      auto x = 0;
-      const auto lambda1 = [a = x](int b){ return a + b; };
-      const auto lambda2 = [a = lambda1(x)](){ return a; };
-      return lambda2();
-    }
-
-  }
-
-  namespace test_digit_seperators
-  {
-
-    constexpr auto ten_million = 100'000'000;
-    static_assert(ten_million == 100000000, "");
-
-  }
-
-  namespace test_return_type_deduction
-  {
-
-    auto f(int& x) { return x; }
-    decltype(auto) g(int& x) { return x; }
-
-    template < typename T1, typename T2 >
-    struct is_same
-    {
-      static constexpr auto value = false;
-    };
-
-    template < typename T >
-    struct is_same<T, T>
-    {
-      static constexpr auto value = true;
-    };
-
-    int
-    test()
-    {
-      auto x = 0;
-      static_assert(is_same<int, decltype(f(x))>::value, "");
-      static_assert(is_same<int&, decltype(g(x))>::value, "");
-      return x;
-    }
-
-  }
-
-}  // namespace cxx14
-
-#endif  // __cplusplus >= 201402L
-
-]])
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_0x.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_0x.m4
deleted file mode 100644
index 52c3984..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_0x.m4
+++ /dev/null
@@ -1,111 +0,0 @@
-# ============================================================================
-#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_0x.html
-# ============================================================================
-#
-# SYNOPSIS
-#
-#   AX_CXX_COMPILE_STDCXX_0X
-#
-# DESCRIPTION
-#
-#   Check for baseline language coverage in the compiler for the C++0x
-#   standard.
-#
-#   This macro is deprecated and has been superseded by the
-#   AX_CXX_COMPILE_STDCXX_11 macro which should be used instead.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 10
-
-AU_ALIAS([AC_CXX_COMPILE_STDCXX_0X], [AX_CXX_COMPILE_STDCXX_0X])
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_0X], [
-  AC_OBSOLETE([$0], [; use AX_CXX_COMPILE_STDCXX_11 instead])
-  AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
-  ax_cv_cxx_compile_cxx0x_native,
-  [AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  AC_TRY_COMPILE([
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);],,
-  ax_cv_cxx_compile_cxx0x_native=yes, ax_cv_cxx_compile_cxx0x_native=no)
-  AC_LANG_RESTORE
-  ])
-
-  AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
-  ax_cv_cxx_compile_cxx0x_cxx,
-  [AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  ac_save_CXX="$CXX"
-  CXX="$CXX -std=c++0x"
-  AC_TRY_COMPILE([
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);],,
-  ax_cv_cxx_compile_cxx0x_cxx=yes, ax_cv_cxx_compile_cxx0x_cxx=no)
-  CXX="$ac_save_CXX"
-  AC_LANG_RESTORE
-  ])
-
-  AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
-  ax_cv_cxx_compile_cxx0x_gxx,
-  [AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  ac_save_CXX="$CXX"
-  CXX="$CXX -std=gnu++0x"
-  AC_TRY_COMPILE([
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);],,
-  ax_cv_cxx_compile_cxx0x_gxx=yes, ax_cv_cxx_compile_cxx0x_gxx=no)
-  CXX="$ac_save_CXX"
-  AC_LANG_RESTORE
-  ])
-
-  if test "$ax_cv_cxx_compile_cxx0x_native" = yes ||
-     test "$ax_cv_cxx_compile_cxx0x_cxx" = yes ||
-     test "$ax_cv_cxx_compile_cxx0x_gxx" = yes; then
-    AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
-  fi
-])
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_11.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_11.m4
deleted file mode 100644
index 0aadeaf..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_11.m4
+++ /dev/null
@@ -1,39 +0,0 @@
-# ============================================================================
-#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
-# ============================================================================
-#
-# SYNOPSIS
-#
-#   AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
-#
-# DESCRIPTION
-#
-#   Check for baseline language coverage in the compiler for the C++11
-#   standard; if necessary, add switches to CXX and CXXCPP to enable
-#   support.
-#
-#   This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
-#   macro with the version set to C++11.  The two optional arguments are
-#   forwarded literally as the second and third argument respectively.
-#   Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
-#   more information.  If you want to use this macro, you also need to
-#   download the ax_cxx_compile_stdcxx.m4 file.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
-#   Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
-#   Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
-#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
-#   Copyright (c) 2015 Paul Norman <penorman@mac.com>
-#   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 17
-
-AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_14.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_14.m4
deleted file mode 100644
index 51123f2..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_cxx_compile_stdcxx_14.m4
+++ /dev/null
@@ -1,34 +0,0 @@
-# ============================================================================
-#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_14.html
-# ============================================================================
-#
-# SYNOPSIS
-#
-#   AX_CXX_COMPILE_STDCXX_14([ext|noext], [mandatory|optional])
-#
-# DESCRIPTION
-#
-#   Check for baseline language coverage in the compiler for the C++14
-#   standard; if necessary, add switches to CXX and CXXCPP to enable
-#   support.
-#
-#   This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
-#   macro with the version set to C++14.  The two optional arguments are
-#   forwarded literally as the second and third argument respectively.
-#   Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
-#   more information.  If you want to use this macro, you also need to
-#   download the ax_cxx_compile_stdcxx.m4 file.
-#
-# LICENSE
-#
-#   Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 4
-
-AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [AX_CXX_COMPILE_STDCXX([14], [$1], [$2])])
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_jni_include_dir.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_jni_include_dir.m4
deleted file mode 100644
index 7af1d6d..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_jni_include_dir.m4
+++ /dev/null
@@ -1,133 +0,0 @@
-# ===========================================================================
-#    http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_JNI_INCLUDE_DIR
-#
-# DESCRIPTION
-#
-#   AX_JNI_INCLUDE_DIR finds include directories needed for compiling
-#   programs using the JNI interface.
-#
-#   JNI include directories are usually in the Java distribution. This is
-#   deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in
-#   that order. When this macro completes, a list of directories is left in
-#   the variable JNI_INCLUDE_DIRS.
-#
-#   Example usage follows:
-#
-#     AX_JNI_INCLUDE_DIR
-#
-#     for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
-#     do
-#             CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
-#     done
-#
-#   If you want to force a specific compiler:
-#
-#   - at the configure.in level, set JAVAC=yourcompiler before calling
-#   AX_JNI_INCLUDE_DIR
-#
-#   - at the configure level, setenv JAVAC
-#
-#   Note: This macro can work with the autoconf M4 macros for Java programs.
-#   This particular macro is not part of the original set of macros.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Don Anderson <dda@sleepycat.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 11.1
-# This version of the script has a local patch that has not yet been upstreamed.
-
-AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
-AC_DEFUN([AX_JNI_INCLUDE_DIR],[
-
-JNI_INCLUDE_DIRS=""
-
-# if JAVA_HOME is set, always use that.
-if test "x$JAVA_HOME" != x; then
-    _JTOPDIR="$JAVA_HOME"
-else
-    case "$host_os" in
-        darwin*)
-            # on OS X, use the java_home command to find the user's prefered JVM.
-            _JTOPDIR=`/usr/libexec/java_home`
-            ;;
-        *)
-            # otherwise, attempt to infer the JDK directory from the location of the
-            # javac command.
-            if test "x$JAVAC" = x; then
-                JAVAC=javac
-            fi
-            AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
-            if test "x$_ACJNI_JAVAC" = xno; then
-                AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
-            fi
-            _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
-            _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::' -e 's:/[[^/]]*$::'`
-            ;;
-    esac
-fi
-
-# always include the main JDK include directory. this is where jni.h should be located.
-_JINC="$_JTOPDIR/include"
-
-_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
-_AS_ECHO_LOG([_JINC=$_JINC])
-
-# verify that jni.h can be found.
-if test -f "$_JINC/jni.h"; then
-    JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
-else
-    AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
-fi
-
-# get the likely subdirectories for system specific java includes (e.g. jni_md.h).
-case "$host_os" in
-bsdi*)          _JNI_INC_SUBDIRS="bsdos";;
-freebsd*)       _JNI_INC_SUBDIRS="freebsd";;
-darwin*)        _JNI_INC_SUBDIRS="darwin";;
-linux*)         _JNI_INC_SUBDIRS="linux genunix";;
-osf*)           _JNI_INC_SUBDIRS="alpha";;
-solaris*)       _JNI_INC_SUBDIRS="solaris";;
-mingw*)         _JNI_INC_SUBDIRS="win32";;
-cygwin*)        _JNI_INC_SUBDIRS="win32";;
-*)              _JNI_INC_SUBDIRS="genunix";;
-esac
-
-# add any subdirectories that are present
-for JINCSUBDIR in $_JNI_INC_SUBDIRS
-do
-    if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
-         JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
-    fi
-done
-])
-
-# _ACJNI_FOLLOW_SYMLINKS <path>
-# Follows symbolic links on <path>,
-# finally setting variable _ACJNI_FOLLOWED
-# ----------------------------------------
-AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[
-# find the include directory relative to the javac executable
-_cur="$1"
-while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
-        AC_MSG_CHECKING([symlink for $_cur])
-        _slink=`ls -ld "$_cur" | sed 's/.* -> //'`
-        case "$_slink" in
-        /*) _cur="$_slink";;
-        # 'X' avoids triggering unwanted echo options.
-        *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";;
-        esac
-        AC_MSG_RESULT([$_cur])
-done
-_ACJNI_FOLLOWED="$_cur"
-])# _ACJNI
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_prog_doxygen.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_prog_doxygen.m4
deleted file mode 100644
index 44b22b0..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_prog_doxygen.m4
+++ /dev/null
@@ -1,532 +0,0 @@
-# ===========================================================================
-#      http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   DX_INIT_DOXYGEN(PROJECT-NAME, DOXYFILE-PATH, [OUTPUT-DIR])
-#   DX_DOXYGEN_FEATURE(ON|OFF)
-#   DX_DOT_FEATURE(ON|OFF)
-#   DX_HTML_FEATURE(ON|OFF)
-#   DX_CHM_FEATURE(ON|OFF)
-#   DX_CHI_FEATURE(ON|OFF)
-#   DX_MAN_FEATURE(ON|OFF)
-#   DX_RTF_FEATURE(ON|OFF)
-#   DX_XML_FEATURE(ON|OFF)
-#   DX_PDF_FEATURE(ON|OFF)
-#   DX_PS_FEATURE(ON|OFF)
-#
-# DESCRIPTION
-#
-#   The DX_*_FEATURE macros control the default setting for the given
-#   Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for
-#   generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML
-#   help (for MS users), 'CHI' for generating a seperate .chi file by the
-#   .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate
-#   output formats. The environment variable DOXYGEN_PAPER_SIZE may be
-#   specified to override the default 'a4wide' paper size.
-#
-#   By default, HTML, PDF and PS documentation is generated as this seems to
-#   be the most popular and portable combination. MAN pages created by
-#   Doxygen are usually problematic, though by picking an appropriate subset
-#   and doing some massaging they might be better than nothing. CHM and RTF
-#   are specific for MS (note that you can't generate both HTML and CHM at
-#   the same time). The XML is rather useless unless you apply specialized
-#   post-processing to it.
-#
-#   The macros mainly control the default state of the feature. The use can
-#   override the default by specifying --enable or --disable. The macros
-#   ensure that contradictory flags are not given (e.g.,
-#   --enable-doxygen-html and --enable-doxygen-chm,
-#   --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each
-#   feature will be automatically disabled (with a warning) if the required
-#   programs are missing.
-#
-#   Once all the feature defaults have been specified, call DX_INIT_DOXYGEN
-#   with the following parameters: a one-word name for the project for use
-#   as a filename base etc., an optional configuration file name (the
-#   default is 'Doxyfile', the same as Doxygen's default), and an optional
-#   output directory name (the default is 'doxygen-doc').
-#
-#   Automake Support
-#
-#   The following is a template aminclude.am file for use with Automake.
-#   Make targets and variables values are controlled by the various
-#   DX_COND_* conditionals set by autoconf.
-#
-#   The provided targets are:
-#
-#     doxygen-doc: Generate all doxygen documentation.
-#
-#     doxygen-run: Run doxygen, which will generate some of the
-#                  documentation (HTML, CHM, CHI, MAN, RTF, XML)
-#                  but will not do the post processing required
-#                  for the rest of it (PS, PDF, and some MAN).
-#
-#     doxygen-man: Rename some doxygen generated man pages.
-#
-#     doxygen-ps:  Generate doxygen PostScript documentation.
-#
-#     doxygen-pdf: Generate doxygen PDF documentation.
-#
-#   Note that by default these are not integrated into the automake targets.
-#   If doxygen is used to generate man pages, you can achieve this
-#   integration by setting man3_MANS to the list of man pages generated and
-#   then adding the dependency:
-#
-#     $(man3_MANS): doxygen-doc
-#
-#   This will cause make to run doxygen and generate all the documentation.
-#
-#   The following variable is intended for use in Makefile.am:
-#
-#     DX_CLEANFILES = everything to clean.
-#
-#   Then add this variable to MOSTLYCLEANFILES.
-#
-#     ----- begin aminclude.am -------------------------------------
-#
-#     ## --------------------------------- ##
-#     ## Format-independent Doxygen rules. ##
-#     ## --------------------------------- ##
-#
-#     if DX_COND_doc
-#
-#     ## ------------------------------- ##
-#     ## Rules specific for HTML output. ##
-#     ## ------------------------------- ##
-#
-#     if DX_COND_html
-#
-#     DX_CLEAN_HTML = @DX_DOCDIR@/html
-#
-#     endif DX_COND_html
-#
-#     ## ------------------------------ ##
-#     ## Rules specific for CHM output. ##
-#     ## ------------------------------ ##
-#
-#     if DX_COND_chm
-#
-#     DX_CLEAN_CHM = @DX_DOCDIR@/chm
-#
-#     if DX_COND_chi
-#
-#     DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
-#
-#     endif DX_COND_chi
-#
-#     endif DX_COND_chm
-#
-#     ## ------------------------------ ##
-#     ## Rules specific for MAN output. ##
-#     ## ------------------------------ ##
-#
-#     if DX_COND_man
-#
-#     DX_CLEAN_MAN = @DX_DOCDIR@/man
-#
-#     endif DX_COND_man
-#
-#     ## ------------------------------ ##
-#     ## Rules specific for RTF output. ##
-#     ## ------------------------------ ##
-#
-#     if DX_COND_rtf
-#
-#     DX_CLEAN_RTF = @DX_DOCDIR@/rtf
-#
-#     endif DX_COND_rtf
-#
-#     ## ------------------------------ ##
-#     ## Rules specific for XML output. ##
-#     ## ------------------------------ ##
-#
-#     if DX_COND_xml
-#
-#     DX_CLEAN_XML = @DX_DOCDIR@/xml
-#
-#     endif DX_COND_xml
-#
-#     ## ----------------------------- ##
-#     ## Rules specific for PS output. ##
-#     ## ----------------------------- ##
-#
-#     if DX_COND_ps
-#
-#     DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
-#
-#     DX_PS_GOAL = doxygen-ps
-#
-#     doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
-#
-#     @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
-#         cd @DX_DOCDIR@/latex; \
-#         rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
-#         $(DX_LATEX) refman.tex; \
-#         $(MAKEINDEX_PATH) refman.idx; \
-#         $(DX_LATEX) refman.tex; \
-#         countdown=5; \
-#         while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
-#                           refman.log > /dev/null 2>&1 \
-#            && test $$countdown -gt 0; do \
-#             $(DX_LATEX) refman.tex; \
-#             countdown=`expr $$countdown - 1`; \
-#         done; \
-#         $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
-#
-#     endif DX_COND_ps
-#
-#     ## ------------------------------ ##
-#     ## Rules specific for PDF output. ##
-#     ## ------------------------------ ##
-#
-#     if DX_COND_pdf
-#
-#     DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
-#
-#     DX_PDF_GOAL = doxygen-pdf
-#
-#     doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
-#
-#     @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
-#         cd @DX_DOCDIR@/latex; \
-#         rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
-#         $(DX_PDFLATEX) refman.tex; \
-#         $(DX_MAKEINDEX) refman.idx; \
-#         $(DX_PDFLATEX) refman.tex; \
-#         countdown=5; \
-#         while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
-#                           refman.log > /dev/null 2>&1 \
-#            && test $$countdown -gt 0; do \
-#             $(DX_PDFLATEX) refman.tex; \
-#             countdown=`expr $$countdown - 1`; \
-#         done; \
-#         mv refman.pdf ../@PACKAGE@.pdf
-#
-#     endif DX_COND_pdf
-#
-#     ## ------------------------------------------------- ##
-#     ## Rules specific for LaTeX (shared for PS and PDF). ##
-#     ## ------------------------------------------------- ##
-#
-#     if DX_COND_latex
-#
-#     DX_CLEAN_LATEX = @DX_DOCDIR@/latex
-#
-#     endif DX_COND_latex
-#
-#     .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
-#
-#     .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
-#
-#     doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
-#
-#     doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
-#
-#     @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
-#         rm -rf @DX_DOCDIR@
-#         $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
-#
-#     DX_CLEANFILES = \
-#         @DX_DOCDIR@/@PACKAGE@.tag \
-#         -r \
-#         $(DX_CLEAN_HTML) \
-#         $(DX_CLEAN_CHM) \
-#         $(DX_CLEAN_CHI) \
-#         $(DX_CLEAN_MAN) \
-#         $(DX_CLEAN_RTF) \
-#         $(DX_CLEAN_XML) \
-#         $(DX_CLEAN_PS) \
-#         $(DX_CLEAN_PDF) \
-#         $(DX_CLEAN_LATEX)
-#
-#     endif DX_COND_doc
-#
-#     ----- end aminclude.am ---------------------------------------
-#
-# LICENSE
-#
-#   Copyright (c) 2009 Oren Ben-Kiki <oren@ben-kiki.org>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 12
-
-## ----------##
-## Defaults. ##
-## ----------##
-
-DX_ENV=""
-AC_DEFUN([DX_FEATURE_doc],  ON)
-AC_DEFUN([DX_FEATURE_dot],  OFF)
-AC_DEFUN([DX_FEATURE_man],  OFF)
-AC_DEFUN([DX_FEATURE_html], ON)
-AC_DEFUN([DX_FEATURE_chm],  OFF)
-AC_DEFUN([DX_FEATURE_chi],  OFF)
-AC_DEFUN([DX_FEATURE_rtf],  OFF)
-AC_DEFUN([DX_FEATURE_xml],  OFF)
-AC_DEFUN([DX_FEATURE_pdf],  ON)
-AC_DEFUN([DX_FEATURE_ps],   ON)
-
-## --------------- ##
-## Private macros. ##
-## --------------- ##
-
-# DX_ENV_APPEND(VARIABLE, VALUE)
-# ------------------------------
-# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen.
-AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])])
-
-# DX_DIRNAME_EXPR
-# ---------------
-# Expand into a shell expression prints the directory part of a path.
-AC_DEFUN([DX_DIRNAME_EXPR],
-         [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
-
-# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
-# -------------------------------------
-# Expands according to the M4 (static) status of the feature.
-AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
-
-# DX_REQUIRE_PROG(VARIABLE, PROGRAM)
-# ----------------------------------
-# Require the specified program to be found for the DX_CURRENT_FEATURE to work.
-AC_DEFUN([DX_REQUIRE_PROG], [
-AC_PATH_TOOL([$1], [$2])
-if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
-    AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
-    AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
-fi
-])
-
-# DX_TEST_FEATURE(FEATURE)
-# ------------------------
-# Expand to a shell expression testing whether the feature is active.
-AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
-
-# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
-# -------------------------------------------------
-# Verify that a required features has the right state before trying to turn on
-# the DX_CURRENT_FEATURE.
-AC_DEFUN([DX_CHECK_DEPEND], [
-test "$DX_FLAG_$1" = "$2" \
-|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
-                            requires, contradicts) doxygen-DX_CURRENT_FEATURE])
-])
-
-# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
-# ----------------------------------------------------------
-# Turn off the DX_CURRENT_FEATURE if the required feature is off.
-AC_DEFUN([DX_CLEAR_DEPEND], [
-test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
-])
-
-# DX_FEATURE_ARG(FEATURE, DESCRIPTION,
-#                CHECK_DEPEND, CLEAR_DEPEND,
-#                REQUIRE, DO-IF-ON, DO-IF-OFF)
-# --------------------------------------------
-# Parse the command-line option controlling a feature. CHECK_DEPEND is called
-# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
-# otherwise CLEAR_DEPEND is called to turn off the default state if a required
-# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
-# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
-# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
-AC_DEFUN([DX_ARG_ABLE], [
-    AC_DEFUN([DX_CURRENT_FEATURE], [$1])
-    AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
-    AC_ARG_ENABLE(doxygen-$1,
-                  [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
-                                                      [--enable-doxygen-$1]),
-                                  DX_IF_FEATURE([$1], [don't $2], [$2]))],
-                  [
-case "$enableval" in
-#(
-y|Y|yes|Yes|YES)
-    AC_SUBST([DX_FLAG_$1], 1)
-    $3
-;; #(
-n|N|no|No|NO)
-    AC_SUBST([DX_FLAG_$1], 0)
-;; #(
-*)
-    AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
-;;
-esac
-], [
-AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
-$4
-])
-if DX_TEST_FEATURE([$1]); then
-    $5
-    :
-fi
-AM_CONDITIONAL(DX_COND_$1, DX_TEST_FEATURE([$1]))
-if DX_TEST_FEATURE([$1]); then
-    $6
-    :
-else
-    $7
-    :
-fi
-])
-
-## -------------- ##
-## Public macros. ##
-## -------------- ##
-
-# DX_XXX_FEATURE(DEFAULT_STATE)
-# -----------------------------
-AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc],  [$1])])
-AC_DEFUN([DX_DOT_FEATURE],     [AC_DEFUN([DX_FEATURE_dot], [$1])])
-AC_DEFUN([DX_MAN_FEATURE],     [AC_DEFUN([DX_FEATURE_man],  [$1])])
-AC_DEFUN([DX_HTML_FEATURE],    [AC_DEFUN([DX_FEATURE_html], [$1])])
-AC_DEFUN([DX_CHM_FEATURE],     [AC_DEFUN([DX_FEATURE_chm],  [$1])])
-AC_DEFUN([DX_CHI_FEATURE],     [AC_DEFUN([DX_FEATURE_chi],  [$1])])
-AC_DEFUN([DX_RTF_FEATURE],     [AC_DEFUN([DX_FEATURE_rtf],  [$1])])
-AC_DEFUN([DX_XML_FEATURE],     [AC_DEFUN([DX_FEATURE_xml],  [$1])])
-AC_DEFUN([DX_XML_FEATURE],     [AC_DEFUN([DX_FEATURE_xml],  [$1])])
-AC_DEFUN([DX_PDF_FEATURE],     [AC_DEFUN([DX_FEATURE_pdf],  [$1])])
-AC_DEFUN([DX_PS_FEATURE],      [AC_DEFUN([DX_FEATURE_ps],   [$1])])
-
-# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR])
-# ---------------------------------------------------------
-# PROJECT also serves as the base name for the documentation files.
-# The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc".
-AC_DEFUN([DX_INIT_DOXYGEN], [
-
-# Files:
-AC_SUBST([DX_PROJECT], [$1])
-AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])])
-AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])])
-
-# Environment variables used inside doxygen.cfg:
-DX_ENV_APPEND(SRCDIR, $srcdir)
-DX_ENV_APPEND(PROJECT, $DX_PROJECT)
-DX_ENV_APPEND(DOCDIR, $DX_DOCDIR)
-DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
-
-# Doxygen itself:
-DX_ARG_ABLE(doc, [generate any doxygen documentation],
-            [],
-            [],
-            [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
-             DX_REQUIRE_PROG([DX_PERL], perl)],
-            [DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
-
-# Dot for graphics:
-DX_ARG_ABLE(dot, [generate graphics for doxygen documentation],
-            [DX_CHECK_DEPEND(doc, 1)],
-            [DX_CLEAR_DEPEND(doc, 1)],
-            [DX_REQUIRE_PROG([DX_DOT], dot)],
-            [DX_ENV_APPEND(HAVE_DOT, YES)
-             DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
-            [DX_ENV_APPEND(HAVE_DOT, NO)])
-
-# Man pages generation:
-DX_ARG_ABLE(man, [generate doxygen manual pages],
-            [DX_CHECK_DEPEND(doc, 1)],
-            [DX_CLEAR_DEPEND(doc, 1)],
-            [],
-            [DX_ENV_APPEND(GENERATE_MAN, YES)],
-            [DX_ENV_APPEND(GENERATE_MAN, NO)])
-
-# RTF file generation:
-DX_ARG_ABLE(rtf, [generate doxygen RTF documentation],
-            [DX_CHECK_DEPEND(doc, 1)],
-            [DX_CLEAR_DEPEND(doc, 1)],
-            [],
-            [DX_ENV_APPEND(GENERATE_RTF, YES)],
-            [DX_ENV_APPEND(GENERATE_RTF, NO)])
-
-# XML file generation:
-DX_ARG_ABLE(xml, [generate doxygen XML documentation],
-            [DX_CHECK_DEPEND(doc, 1)],
-            [DX_CLEAR_DEPEND(doc, 1)],
-            [],
-            [DX_ENV_APPEND(GENERATE_XML, YES)],
-            [DX_ENV_APPEND(GENERATE_XML, NO)])
-
-# (Compressed) HTML help generation:
-DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
-            [DX_CHECK_DEPEND(doc, 1)],
-            [DX_CLEAR_DEPEND(doc, 1)],
-            [DX_REQUIRE_PROG([DX_HHC], hhc)],
-            [DX_ENV_APPEND(HHC_PATH, $DX_HHC)
-             DX_ENV_APPEND(GENERATE_HTML, YES)
-             DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
-            [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
-
-# Seperate CHI file generation.
-DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
-            [DX_CHECK_DEPEND(chm, 1)],
-            [DX_CLEAR_DEPEND(chm, 1)],
-            [],
-            [DX_ENV_APPEND(GENERATE_CHI, YES)],
-            [DX_ENV_APPEND(GENERATE_CHI, NO)])
-
-# Plain HTML pages generation:
-DX_ARG_ABLE(html, [generate doxygen plain HTML documentation],
-            [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
-            [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
-            [],
-            [DX_ENV_APPEND(GENERATE_HTML, YES)],
-            [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
-
-# PostScript file generation:
-DX_ARG_ABLE(ps, [generate doxygen PostScript documentation],
-            [DX_CHECK_DEPEND(doc, 1)],
-            [DX_CLEAR_DEPEND(doc, 1)],
-            [DX_REQUIRE_PROG([DX_LATEX], latex)
-             DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
-             DX_REQUIRE_PROG([DX_DVIPS], dvips)
-             DX_REQUIRE_PROG([DX_EGREP], egrep)])
-
-# PDF file generation:
-DX_ARG_ABLE(pdf, [generate doxygen PDF documentation],
-            [DX_CHECK_DEPEND(doc, 1)],
-            [DX_CLEAR_DEPEND(doc, 1)],
-            [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
-             DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
-             DX_REQUIRE_PROG([DX_EGREP], egrep)])
-
-# LaTeX generation for PS and/or PDF:
-AM_CONDITIONAL(DX_COND_latex, DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf))
-if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
-    DX_ENV_APPEND(GENERATE_LATEX, YES)
-else
-    DX_ENV_APPEND(GENERATE_LATEX, NO)
-fi
-
-# Paper size for PS and/or PDF:
-AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
-           [a4wide (default), a4, letter, legal or executive])
-case "$DOXYGEN_PAPER_SIZE" in
-#(
-"")
-    AC_SUBST(DOXYGEN_PAPER_SIZE, "")
-;; #(
-a4wide|a4|letter|legal|executive)
-    DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
-;; #(
-*)
-    AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
-;;
-esac
-
-#For debugging:
-#echo DX_FLAG_doc=$DX_FLAG_doc
-#echo DX_FLAG_dot=$DX_FLAG_dot
-#echo DX_FLAG_man=$DX_FLAG_man
-#echo DX_FLAG_html=$DX_FLAG_html
-#echo DX_FLAG_chm=$DX_FLAG_chm
-#echo DX_FLAG_chi=$DX_FLAG_chi
-#echo DX_FLAG_rtf=$DX_FLAG_rtf
-#echo DX_FLAG_xml=$DX_FLAG_xml
-#echo DX_FLAG_pdf=$DX_FLAG_pdf
-#echo DX_FLAG_ps=$DX_FLAG_ps
-#echo DX_ENV=$DX_ENV
-])
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_pthread.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_pthread.m4
deleted file mode 100644
index 4c4051e..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ax_pthread.m4
+++ /dev/null
@@ -1,485 +0,0 @@
-# ===========================================================================
-#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-#   This macro figures out how to build C programs using POSIX threads. It
-#   sets the PTHREAD_LIBS output variable to the threads library and linker
-#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-#   flags that are needed. (The user can also force certain compiler
-#   flags/libs to be tested by setting these environment variables.)
-#
-#   Also sets PTHREAD_CC to any special C compiler that is needed for
-#   multi-threaded programs (defaults to the value of CC otherwise). (This
-#   is necessary on AIX to use the special cc_r compiler alias.)
-#
-#   NOTE: You are assumed to not only compile your program with these flags,
-#   but also to link with them as well. For example, you might link with
-#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-#
-#   If you are only building threaded programs, you may wish to use these
-#   variables in your default LIBS, CFLAGS, and CC:
-#
-#     LIBS="$PTHREAD_LIBS $LIBS"
-#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-#     CC="$PTHREAD_CC"
-#
-#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-#   has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
-#   that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
-#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
-#   PTHREAD_CFLAGS.
-#
-#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
-#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-#   is not found. If ACTION-IF-FOUND is not specified, the default action
-#   will define HAVE_PTHREAD.
-#
-#   Please let the authors know if this macro fails on any platform, or if
-#   you have any other suggestions or comments. This macro was based on work
-#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
-#   grateful for the helpful feedback of numerous users.
-#
-#   Updated for Autoconf 2.68 by Daniel Richard G.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-#   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
-#
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-
-#serial 23
-
-AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
-AC_DEFUN([AX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_PROG_SED])
-AC_LANG_PUSH([C])
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on Tru64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
-        ax_pthread_save_CC="$CC"
-        ax_pthread_save_CFLAGS="$CFLAGS"
-        ax_pthread_save_LIBS="$LIBS"
-        AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
-        AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
-        AC_MSG_RESULT([$ax_pthread_ok])
-        if test "x$ax_pthread_ok" = "xno"; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        CC="$ax_pthread_save_CC"
-        CFLAGS="$ax_pthread_save_CFLAGS"
-        LIBS="$ax_pthread_save_LIBS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
-#           (Note: HP C rejects this with "bad form for `-t' option")
-# -pthreads: Solaris/gcc (Note: HP C also rejects)
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads and
-#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
-#      is present but should not be used directly; and before -mthreads,
-#      because the compiler interprets this as "-mt" + "-hreads")
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case $host_os in
-
-        freebsd*)
-
-        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-
-        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
-        ;;
-
-        hpux*)
-
-        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
-        # multi-threading and also sets -lpthread."
-
-        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
-        ;;
-
-        openedition*)
-
-        # IBM z/OS requires a feature-test macro to be defined in order to
-        # enable POSIX threads at all, so give the user a hint if this is
-        # not set. (We don't define these ourselves, as they can affect
-        # other portions of the system API in unpredictable ways.)
-
-        AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
-            [
-#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
-             AX_PTHREAD_ZOS_MISSING
-#            endif
-            ],
-            [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
-        ;;
-
-        solaris*)
-
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed. (N.B.: The stubs are missing
-        # pthread_cleanup_push, or rather a function called by this macro,
-        # so we could check for that, but who knows whether they'll stub
-        # that too in a future libc.)  So we'll check first for the
-        # standard Solaris way of linking pthreads (-mt -lpthread).
-
-        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
-        ;;
-esac
-
-# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
-
-AS_IF([test "x$GCC" = "xyes"],
-      [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
-
-# The presence of a feature test macro requesting re-entrant function
-# definitions is, on some systems, a strong hint that pthreads support is
-# correctly enabled
-
-case $host_os in
-        darwin* | hpux* | linux* | osf* | solaris*)
-        ax_pthread_check_macro="_REENTRANT"
-        ;;
-
-        aix*)
-        ax_pthread_check_macro="_THREAD_SAFE"
-        ;;
-
-        *)
-        ax_pthread_check_macro="--"
-        ;;
-esac
-AS_IF([test "x$ax_pthread_check_macro" = "x--"],
-      [ax_pthread_check_cond=0],
-      [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
-
-# Are we compiling with Clang?
-
-AC_CACHE_CHECK([whether $CC is Clang],
-    [ax_cv_PTHREAD_CLANG],
-    [ax_cv_PTHREAD_CLANG=no
-     # Note that Autoconf sets GCC=yes for Clang as well as GCC
-     if test "x$GCC" = "xyes"; then
-        AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
-            [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
-#            if defined(__clang__) && defined(__llvm__)
-             AX_PTHREAD_CC_IS_CLANG
-#            endif
-            ],
-            [ax_cv_PTHREAD_CLANG=yes])
-     fi
-    ])
-ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
-
-ax_pthread_clang_warning=no
-
-# Clang needs special handling, because older versions handle the -pthread
-# option in a rather... idiosyncratic way
-
-if test "x$ax_pthread_clang" = "xyes"; then
-
-        # Clang takes -pthread; it has never supported any other flag
-
-        # (Note 1: This will need to be revisited if a system that Clang
-        # supports has POSIX threads in a separate library.  This tends not
-        # to be the way of modern systems, but it's conceivable.)
-
-        # (Note 2: On some systems, notably Darwin, -pthread is not needed
-        # to get POSIX threads support; the API is always present and
-        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
-        # -pthread does define _REENTRANT, and while the Darwin headers
-        # ignore this macro, third-party headers might not.)
-
-        PTHREAD_CFLAGS="-pthread"
-        PTHREAD_LIBS=
-
-        ax_pthread_ok=yes
-
-        # However, older versions of Clang make a point of warning the user
-        # that, in an invocation where only linking and no compilation is
-        # taking place, the -pthread option has no effect ("argument unused
-        # during compilation").  They expect -pthread to be passed in only
-        # when source code is being compiled.
-        #
-        # Problem is, this is at odds with the way Automake and most other
-        # C build frameworks function, which is that the same flags used in
-        # compilation (CFLAGS) are also used in linking.  Many systems
-        # supported by AX_PTHREAD require exactly this for POSIX threads
-        # support, and in fact it is often not straightforward to specify a
-        # flag that is used only in the compilation phase and not in
-        # linking.  Such a scenario is extremely rare in practice.
-        #
-        # Even though use of the -pthread flag in linking would only print
-        # a warning, this can be a nuisance for well-run software projects
-        # that build with -Werror.  So if the active version of Clang has
-        # this misfeature, we search for an option to squash it.
-
-        AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
-            [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
-            [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
-             # Create an alternate version of $ac_link that compiles and
-             # links in two steps (.c -> .o, .o -> exe) instead of one
-             # (.c -> exe), because the warning occurs only in the second
-             # step
-             ax_pthread_save_ac_link="$ac_link"
-             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
-             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
-             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
-             ax_pthread_save_CFLAGS="$CFLAGS"
-             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
-                AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
-                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
-                ac_link="$ax_pthread_save_ac_link"
-                AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
-                    [ac_link="$ax_pthread_2step_ac_link"
-                     AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
-                         [break])
-                    ])
-             done
-             ac_link="$ax_pthread_save_ac_link"
-             CFLAGS="$ax_pthread_save_CFLAGS"
-             AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
-             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
-            ])
-
-        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
-                no | unknown) ;;
-                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
-        esac
-
-fi # $ax_pthread_clang = yes
-
-if test "x$ax_pthread_ok" = "xno"; then
-for ax_pthread_try_flag in $ax_pthread_flags; do
-
-        case $ax_pthread_try_flag in
-                none)
-                AC_MSG_CHECKING([whether pthreads work without any flags])
-                ;;
-
-                -mt,pthread)
-                AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
-                PTHREAD_CFLAGS="-mt"
-                PTHREAD_LIBS="-lpthread"
-                ;;
-
-                -*)
-                AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
-                PTHREAD_CFLAGS="$ax_pthread_try_flag"
-                ;;
-
-                pthread-config)
-                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
-                AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
-                PTHREAD_CFLAGS="`pthread-config --cflags`"
-                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-                ;;
-
-                *)
-                AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
-                PTHREAD_LIBS="-l$ax_pthread_try_flag"
-                ;;
-        esac
-
-        ax_pthread_save_CFLAGS="$CFLAGS"
-        ax_pthread_save_LIBS="$LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-
-        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
-#                       if $ax_pthread_check_cond
-#                        error "$ax_pthread_check_macro must be defined"
-#                       endif
-                        static void routine(void *a) { a = 0; }
-                        static void *start_routine(void *a) { return a; }],
-                       [pthread_t th; pthread_attr_t attr;
-                        pthread_create(&th, 0, start_routine, 0);
-                        pthread_join(th, 0);
-                        pthread_attr_init(&attr);
-                        pthread_cleanup_push(routine, 0);
-                        pthread_cleanup_pop(0) /* ; */])],
-            [ax_pthread_ok=yes],
-            [])
-
-        CFLAGS="$ax_pthread_save_CFLAGS"
-        LIBS="$ax_pthread_save_LIBS"
-
-        AC_MSG_RESULT([$ax_pthread_ok])
-        AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
-
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$ax_pthread_ok" = "xyes"; then
-        ax_pthread_save_CFLAGS="$CFLAGS"
-        ax_pthread_save_LIBS="$LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-        AC_CACHE_CHECK([for joinable pthread attribute],
-            [ax_cv_PTHREAD_JOINABLE_ATTR],
-            [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
-             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-                 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
-                                                 [int attr = $ax_pthread_attr; return attr /* ; */])],
-                                [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
-                                [])
-             done
-            ])
-        AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
-               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
-               test "x$ax_pthread_joinable_attr_defined" != "xyes"],
-              [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
-                                  [$ax_cv_PTHREAD_JOINABLE_ATTR],
-                                  [Define to necessary symbol if this constant
-                                   uses a non-standard name on your system.])
-               ax_pthread_joinable_attr_defined=yes
-              ])
-
-        AC_CACHE_CHECK([whether more special flags are required for pthreads],
-            [ax_cv_PTHREAD_SPECIAL_FLAGS],
-            [ax_cv_PTHREAD_SPECIAL_FLAGS=no
-             case $host_os in
-             solaris*)
-             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
-             ;;
-             esac
-            ])
-        AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
-               test "x$ax_pthread_special_flags_added" != "xyes"],
-              [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
-               ax_pthread_special_flags_added=yes])
-
-        AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
-            [ax_cv_PTHREAD_PRIO_INHERIT],
-            [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
-                                             [[int i = PTHREAD_PRIO_INHERIT;]])],
-                            [ax_cv_PTHREAD_PRIO_INHERIT=yes],
-                            [ax_cv_PTHREAD_PRIO_INHERIT=no])
-            ])
-        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
-               test "x$ax_pthread_prio_inherit_defined" != "xyes"],
-              [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
-               ax_pthread_prio_inherit_defined=yes
-              ])
-
-        CFLAGS="$ax_pthread_save_CFLAGS"
-        LIBS="$ax_pthread_save_LIBS"
-
-        # More AIX lossage: compile with *_r variant
-        if test "x$GCC" != "xyes"; then
-            case $host_os in
-                aix*)
-                AS_CASE(["x/$CC"],
-                    [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
-                    [#handle absolute path differently from PATH based program lookup
-                     AS_CASE(["x$CC"],
-                         [x/*],
-                         [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
-                         [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
-                ;;
-            esac
-        fi
-fi
-
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-
-AC_SUBST([PTHREAD_LIBS])
-AC_SUBST([PTHREAD_CFLAGS])
-AC_SUBST([PTHREAD_CC])
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test "x$ax_pthread_ok" = "xyes"; then
-        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
-        :
-else
-        ax_pthread_ok=no
-        $2
-fi
-AC_LANG_POP
-])dnl AX_PTHREAD
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/pkg.m4 b/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/pkg.m4
deleted file mode 100644
index 9a71878..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/m4/pkg.m4
+++ /dev/null
@@ -1,159 +0,0 @@
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
-m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=m4_default([$1], [0.9.0])
-	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		PKG_CONFIG=""
-	fi
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_default([$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes ],
-		     [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-   	AC_MSG_RESULT([no])
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-	m4_default([$4], [AC_MSG_ERROR(
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT])[]dnl
-        ])
-elif test $pkg_failed = untried; then
-     	AC_MSG_RESULT([no])
-	m4_default([$4], [AC_MSG_FAILURE(
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
-        ])
-else
-	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-	$3
-fi[]dnl
-])# PKG_CHECK_MODULES
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs b/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs
deleted file mode 100755
index 4191a45..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/mkinstalldirs
+++ /dev/null
@@ -1,162 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2009-04-28.21; # UTC
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-nl='
-'
-IFS=" ""	$nl"
-errstatus=0
-dirmode=
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage"
-      exit $?
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --version)
-      echo "$0 $scriptversion"
-      exit $?
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error.  This is a problem when calling mkinstalldirs
-# from a parallel make.  We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
-  '')
-    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    else
-      # On NextStep and OpenStep, the `mkdir' command does not
-      # recognize any option.  It will interpret all options as
-      # directories to create, and then abort because `.' already
-      # exists.
-      test -d ./-p && rmdir ./-p
-      test -d ./--version && rmdir ./--version
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
-       test ! -d ./--version; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    else
-      # Clean up after NextStep and OpenStep mkdir.
-      for d in ./-m ./-p ./--version "./$dirmode";
-      do
-        test -d $d && rmdir $d
-      done
-    fi
-    ;;
-esac
-
-for file
-do
-  case $file in
-    /*) pathcomp=/ ;;
-    *)  pathcomp= ;;
-  esac
-  oIFS=$IFS
-  IFS=/
-  set fnord $file
-  shift
-  IFS=$oIFS
-
-  for d
-  do
-    test "x$d" = x && continue
-
-    pathcomp=$pathcomp$d
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-	errstatus=$lasterr
-      else
-	if test ! -z "$dirmode"; then
-	  echo "chmod $dirmode $pathcomp"
-	  lasterr=
-	  chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-	  if test ! -z "$lasterr"; then
-	    errstatus=$lasterr
-	  fi
-	fi
-      fi
-    fi
-
-    pathcomp=$pathcomp/
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/py-compile b/third_party/nlbuild-autotools/repo/third_party/autoconf/py-compile
deleted file mode 100755
index 46ea866..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/py-compile
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/bin/sh
-# py-compile - Compile a Python program
-
-scriptversion=2011-06-08.12; # UTC
-
-# Copyright (C) 2000-2013 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-if [ -z "$PYTHON" ]; then
-  PYTHON=python
-fi
-
-me=py-compile
-
-usage_error ()
-{
-  echo "$me: $*" >&2
-  echo "Try '$me --help' for more information." >&2
-  exit 1
-}
-
-basedir=
-destdir=
-while test $# -ne 0; do
-  case "$1" in
-    --basedir)
-      if test $# -lt 2; then
-        usage_error "option '--basedir' requires an argument"
-      else
-        basedir=$2
-      fi
-      shift
-      ;;
-    --destdir)
-      if test $# -lt 2; then
-        usage_error "option '--destdir' requires an argument"
-      else
-        destdir=$2
-      fi
-      shift
-      ;;
-    -h|--help)
-      cat <<\EOF
-Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
-
-Byte compile some python scripts FILES.  Use --destdir to specify any
-leading directory path to the FILES that you don't want to include in the
-byte compiled file.  Specify --basedir for any additional path information you
-do want to be shown in the byte compiled file.
-
-Example:
-  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-      exit $?
-      ;;
-    -v|--version)
-      echo "$me $scriptversion"
-      exit $?
-      ;;
-    --)
-      shift
-      break
-      ;;
-    -*)
-      usage_error "unrecognized option '$1'"
-      ;;
-    *)
-      break
-      ;;
-  esac
-  shift
-done
-
-files=$*
-if test -z "$files"; then
-    usage_error "no files given"
-fi
-
-# if basedir was given, then it should be prepended to filenames before
-# byte compilation.
-if [ -z "$basedir" ]; then
-    pathtrans="path = file"
-else
-    pathtrans="path = os.path.join('$basedir', file)"
-fi
-
-# if destdir was given, then it needs to be prepended to the filename to
-# byte compile but not go into the compiled file.
-if [ -z "$destdir" ]; then
-    filetrans="filepath = path"
-else
-    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
-fi
-
-$PYTHON -c "
-import sys, os, py_compile, imp
-
-files = '''$files'''
-
-sys.stdout.write('Byte-compiling python modules...\n')
-for file in files.split():
-    $pathtrans
-    $filetrans
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
-                                            and filepath[-3:] == '.py'):
-	    continue
-    sys.stdout.write(file)
-    sys.stdout.flush()
-    if hasattr(imp, 'get_tag'):
-        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
-    else:
-        py_compile.compile(filepath, filepath + 'c', path)
-sys.stdout.write('\n')" || exit $?
-
-# this will fail for python < 1.5, but that doesn't matter ...
-$PYTHON -O -c "
-import sys, os, py_compile, imp
-
-# pypy does not use .pyo optimization
-if hasattr(sys, 'pypy_translation_info'):
-    sys.exit(0)
-
-files = '''$files'''
-sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
-for file in files.split():
-    $pathtrans
-    $filetrans
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
-                                            and filepath[-3:] == '.py'):
-	    continue
-    sys.stdout.write(file)
-    sys.stdout.flush()
-    if hasattr(imp, 'get_tag'):
-        py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
-    else:
-        py_compile.compile(filepath, filepath + 'o', path)
-sys.stdout.write('\n')" 2>/dev/null || :
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/third_party/nlbuild-autotools/repo/third_party/autoconf/test-driver b/third_party/nlbuild-autotools/repo/third_party/autoconf/test-driver
deleted file mode 100755
index d306056..0000000
--- a/third_party/nlbuild-autotools/repo/third_party/autoconf/test-driver
+++ /dev/null
@@ -1,139 +0,0 @@
-#! /bin/sh
-# test-driver - basic testsuite driver script.
-
-scriptversion=2013-07-13.22; # UTC
-
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-# Make unconditional expansion of undefined variables an error.  This
-# helps a lot in preventing typo-related bugs.
-set -u
-
-usage_error ()
-{
-  echo "$0: $*" >&2
-  print_usage >&2
-  exit 2
-}
-
-print_usage ()
-{
-  cat <<END
-Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--]
-              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
-The '--test-name', '--log-file' and '--trs-file' options are mandatory.
-END
-}
-
-test_name= # Used for reporting.
-log_file=  # Where to save the output of the test script.
-trs_file=  # Where to save the metadata of the test run.
-expect_failure=no
-color_tests=no
-enable_hard_errors=yes
-while test $# -gt 0; do
-  case $1 in
-  --help) print_usage; exit $?;;
-  --version) echo "test-driver $scriptversion"; exit $?;;
-  --test-name) test_name=$2; shift;;
-  --log-file) log_file=$2; shift;;
-  --trs-file) trs_file=$2; shift;;
-  --color-tests) color_tests=$2; shift;;
-  --expect-failure) expect_failure=$2; shift;;
-  --enable-hard-errors) enable_hard_errors=$2; shift;;
-  --) shift; break;;
-  -*) usage_error "invalid option: '$1'";;
-   *) break;;
-  esac
-  shift
-done
-
-missing_opts=
-test x"$test_name" = x && missing_opts="$missing_opts --test-name"
-test x"$log_file"  = x && missing_opts="$missing_opts --log-file"
-test x"$trs_file"  = x && missing_opts="$missing_opts --trs-file"
-if test x"$missing_opts" != x; then
-  usage_error "the following mandatory options are missing:$missing_opts"
-fi
-
-if test $# -eq 0; then
-  usage_error "missing argument"
-fi
-
-if test $color_tests = yes; then
-  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
-  red='' # Red.
-  grn='' # Green.
-  lgn='' # Light green.
-  blu='' # Blue.
-  mgn='' # Magenta.
-  std=''     # No color.
-else
-  red= grn= lgn= blu= mgn= std=
-fi
-
-do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
-trap "st=129; $do_exit" 1
-trap "st=130; $do_exit" 2
-trap "st=141; $do_exit" 13
-trap "st=143; $do_exit" 15
-
-# Test script is run here.
-"$@" >$log_file 2>&1
-estatus=$?
-if test $enable_hard_errors = no && test $estatus -eq 99; then
-  estatus=1
-fi
-
-case $estatus:$expect_failure in
-  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
-  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
-  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
-  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
-  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
-  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
-esac
-
-# Report outcome to console.
-echo "${col}${res}${std}: $test_name"
-
-# Register the test result, and other relevant metadata.
-echo ":test-result: $res" > $trs_file
-echo ":global-test-result: $res" >> $trs_file
-echo ":recheck: $recheck" >> $trs_file
-echo ":copy-in-global-log: $gcopy" >> $trs_file
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/third_party/nlbuild-autotools/repo/tools/Makefile b/third_party/nlbuild-autotools/repo/tools/Makefile
deleted file mode 100644
index 54c976e..0000000
--- a/third_party/nlbuild-autotools/repo/tools/Makefile
+++ /dev/null
@@ -1,139 +0,0 @@
-#
-#    Copyright 2017 Nest Labs Inc. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This make file supports generating prebuilt architecture
-#      -independent and -dependent distributions of nlbuild-autotools
-#      binaries for the architeture of the current build host.
-#
-
-include ../Common.mak
-
-#
-# Build directories
-#
-
-builddir         := .
-top_builddir     := ..
-abs_builddir     := $(CURDIR)
-abs_top_builddir := $(abspath $(top_builddir))
-
-#
-# Source directories
-#
-
-srcdir           := .
-top_srcdir       := ..
-abs_srcdir       := $(CURDIR)
-abs_top_srcdir   := $(abspath $(top_srcdir))
-
-# Figure out what sort of build host we are running on, stripping off
-# any trailing version number information typically included on Darwin
-# / Mac OS X.
-
-host             := $(shell $(top_srcdir)/third_party/autoconf/config.guess | $(SED) -e 's/[[:digit:].]*$$//g')
-
-distdir           = $(PACKAGE)-$(VERSION)
-
-dist_tgz_TARGETS  = ${top_builddir}/${PACKAGE}-common-$(VERSION)$(TGZ_EXTENSION) \
-                    ${top_builddir}/${PACKAGE}-${host}-$(VERSION)$(TGZ_EXTENSION)
-
-dist_txz_TARGETS  = ${top_builddir}/${PACKAGE}-common-$(VERSION)$(TXZ_EXTENSION) \
-                    ${top_builddir}/${PACKAGE}-${host}-$(VERSION)$(TXZ_EXTENSION)
-
-dist_common_DIRS  = share include
-dist_arch_DIRS    = $(host)
-
-PACKAGE_VERSION   = $(shell $(CAT) $(top_builddir)/.local-version)
-
-VERSION           = $(PACKAGE_VERSION)
-
-DIST_TMPDIR      := $(shell mktemp -u -d /tmp/tmp.$(PACKAGE)-$(VERSION)XXXXXX)
-TOOLS_TMPDIR     := $(shell mktemp -u -d /tmp/tmp.$(PACKAGE)-$(VERSION)XXXXXX)
-
-#
-# Verbosity
-#
-_NL_V_BUILD       = $(_NL_V_BUILD_$(V))
-_NL_V_BUILD_      = $(_NL_V_BUILD_$(NL_DEFAULT_VERBOSITY))
-_NL_V_BUILD_0     = @echo "  BUILD";
-_NL_V_BUILD_1     = 
-
-dist-tgz: $(dist_tgz_TARGETS)
-
-dist-txz: $(dist_txz_TARGETS)
-
-#
-# Produce prebuilt GNU autotools binaries for the architecture of the
-# current build machine and install them in this nlbuild-autotools
-# package.
-#
-tools:
-	$(call nl-remove-dir,$(TOOLS_TMPDIR))
-	$(call nl-create-dir,$(TOOLS_TMPDIR))
-	$(_NL_V_BUILD)${srcdir}/packages/build --arch ${host} --srcdir ${abs_srcdir}/packages --builddir "${TOOLS_TMPDIR}" --destdir "${abs_top_srcdir}/tools/host"
-	$(call nl-remove-dir,$(TOOLS_TMPDIR))
-
-#
-# Produce prebuilt GNU autotools architecture-dependent and -independent
-# binaries for the architecture of the current build machine and package
-# them up for distribution.
-#
-dist toolsdist: $(DIST_TARGETS)
-	$(call nl-remove-dir,$(DIST_TMPDIR))
-
-#
-# Stage the distribution files to a distribution directory
-#
-stage:
-	$(call nl-remove-dir,$(DIST_TMPDIR))
-	$(call nl-create-dir,$(DIST_TMPDIR))
-	$(_NL_V_BUILD)${srcdir}/packages/build --arch ${host} --srcdir ${abs_srcdir}/packages --builddir "${DIST_TMPDIR}" --destdir "${DIST_TMPDIR}"
-
-#
-# Produce prebuilt GNU autotools architecture-independent binaries for
-# the architecture of the current build machine and package them up
-# for distribution in tar-gzip format.
-#
-${top_builddir}/${PACKAGE}-common-$(VERSION)$(TGZ_EXTENSION): stage
-	$(NL_V_TGZ)$(dist_tgz_ARCHIVE) --directory ${DIST_TMPDIR} $(dist_common_DIRS) | $(dist_tgz_COMPRESS) > "$(@)"
-
-#
-# Produce prebuilt GNU autotools architecture-dependent binaries for
-# the architecture of the current build machine and package them up
-# for distribution in tar-gzip format.
-#
-${top_builddir}/${PACKAGE}-${host}-$(VERSION)$(TGZ_EXTENSION): stage
-	$(NL_V_TGZ)$(dist_tgz_ARCHIVE) --directory ${DIST_TMPDIR} $(dist_arch_DIRS) | $(dist_tgz_COMPRESS) > "$(@)"
-
-#
-# Produce prebuilt GNU autotools architecture-independent binaries for
-# the architecture of the current build machine and package them up
-# for distribution in tar-xz format.
-#
-${top_builddir}/${PACKAGE}-common-$(VERSION)$(TXZ_EXTENSION): stage
-	$(NL_V_TXZ)$(dist_txz_ARCHIVE) --directory ${DIST_TMPDIR} $(dist_common_DIRS) | $(dist_txz_COMPRESS) > "$(@)"
-
-#
-# Produce prebuilt GNU autotools architecture-dependent binaries for
-# the architecture of the current build machine and package them up
-# for distribution in tar-xz format.
-#
-${top_builddir}/${PACKAGE}-${host}-$(VERSION)$(TXZ_EXTENSION): stage
-	$(NL_V_TXZ)$(dist_txz_ARCHIVE) --directory ${DIST_TMPDIR} $(dist_arch_DIRS) | $(dist_txz_COMPRESS) > "$(@)"
-
-clean: clean-local
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/autoconf/autoconf.url b/third_party/nlbuild-autotools/repo/tools/packages/autoconf/autoconf.url
deleted file mode 100644
index 8a6a2f3..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/autoconf/autoconf.url
+++ /dev/null
@@ -1 +0,0 @@
-http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.68.tar.gz
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/autoconf/autoconf.version b/third_party/nlbuild-autotools/repo/tools/packages/autoconf/autoconf.version
deleted file mode 100644
index 264f2ce..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/autoconf/autoconf.version
+++ /dev/null
@@ -1 +0,0 @@
-2.68
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.patches/automake-00.description b/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.patches/automake-00.description
deleted file mode 100644
index 5523a74..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.patches/automake-00.description
+++ /dev/null
@@ -1,10 +0,0 @@
-2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
-
-    automake: port to Perl 5.22 and later
-
-    Without this change, Perl 5.22 complains "Unescaped left brace in
-    regex is deprecated" and this is planned to become a hard error in
-    Perl 5.26.  See:
-    http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
-    * bin/automake.in (substitute_ac_subst_variables): Escape left brace.
-
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.patches/automake-00.patch b/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.patches/automake-00.patch
deleted file mode 100644
index 3770783..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.patches/automake-00.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -aruN a/bin/automake.in b/bin/automake.in
---- a/bin/automake.in	2013-11-02 17:48:13.000000000 -0700
-+++ b/bin/automake.in	2018-09-14 10:21:04.000000000 -0700
-@@ -3872,7 +3872,7 @@
- sub substitute_ac_subst_variables
- {
-   my ($text) = @_;
--  $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
-+  $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
-   return $text;
- }
- 
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.url b/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.url
deleted file mode 100644
index 667ea63..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.url
+++ /dev/null
@@ -1 +0,0 @@
-http://ftp.gnu.org/pub/gnu/automake/automake-1.14.1.tar.gz
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.version b/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.version
deleted file mode 100644
index 63e799c..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/automake/automake.version
+++ /dev/null
@@ -1 +0,0 @@
-1.14.1
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/build b/third_party/nlbuild-autotools/repo/tools/packages/build
deleted file mode 100755
index 6386427..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/build
+++ /dev/null
@@ -1,566 +0,0 @@
-#!/bin/sh
-
-#
-#    Copyright 2014-2018 Nest Labs Inc. All Rights Reserved.
-#    Copyright 2018 Google LLC. All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-
-#
-#    Description:
-#      This file is a convenience script for building, for the current
-#      build host system, the minimal, core set of GNU autotools on
-#      which other projects' build systems depend.
-#
-
-EXTENSIONS="tar.gz tar.xz"
-
-VERBOSE=0
-
-stem=tools/packages
-abs_srcdir=`pwd`
-abs_top_srcdir=`echo ${abs_srcdir} | sed -e s,/${stem},,g`
-
-abs_top_hostdir="${abs_top_srcdir}/tools/host"
-
-#
-# usage
-#
-# Display program usage.
-#
-usage() {
-    name=`basename ${0}`
-
-    echo "Usage: ${name} [ options ] [ -- <package> ... ]"
-
-    if [ $1 -ne 0 ]; then
-        echo "Try '${name} -h' for more information."
-    fi
-
-    if [ $1 -ne 1 ]; then
-        echo ""
-        echo "  --arch ARCH      Build the package for ARCH host architecture."
-        echo "  -h, --help       Print this help, then exit."
-        echo "  --builddir DIR   Build the packages in DIR."
-        echo "  --destdir DIR    Install the built tools to directory DIR."
-        echo "  --srcdir DIR     Find package, version, and URL metadata in DIR."
-        echo "  -v, --verbose    Enable verbose output."
-        echo ""
-    fi
-
-    exit $1
-}
-
-#
-# error <...>
-#
-# Display to standard error the specified arguments
-#
-error() {
-    echo "${*}" >&2
-}
-
-#
-# verbose <...>
-#
-# Display to standard error the specified arguments
-#
-verbose() {
-    echo "${*}" >&2
-}
-
-#
-# separator
-#
-# Display to standard error a log separator.
-#
-separator() {
-    verbose "--------------------------------------------------------------------------------"
-}
-
-#
-# trailer
-#
-# Display to standard error a log trailer.
-#
-trailer() {
-    verbose "================================================================================"
-}
-
-#
-# banner <message ...>
-#
-# Display to standard error a log banner with a message.
-#
-banner() {
-    trailer
-
-    verbose "${*}"
-}
-
-#
-# subbanner <message ...>
-#
-# Display to standard error a log subbanner with a message.
-#
-subbanner() {
-    separator
-
-    verbose "${*}"
-}
-
-#
-# find_archive <subdir> <package> <extensions...>
-#
-# Attempt to find the specified package archive in the provided
-# subdirectory matching one of the specified extensions.
-#
-find_archive() {
-    local subdir="${1}"
-    local package="${2}"
-    local archive
-
-    shift 2
-
-    for extension in ${*}; do
-        local maybe_archive="${subdir}/${package}.${extension}"
-
-        verbose "  FIND     ${maybe_archive}"
-
-        if [ -r "${maybe_archive}" ]; then
-            archive="${maybe_archive}"
-            break
-        fi
-    done
-
-    echo "${archive}"
-}
-
-#
-# find_versioned_or_nonversioned_archive <subdir> <package> <version> <extensions...>
-#
-# Attempt to find the specified version-qualified or non-qualified
-# package archive in the provided subdirectory matching one of the
-# specified extensions.
-#
-find_versioned_or_nonverioned_archive() {
-    local subdir="${1}"
-    local package="${2}"
-    local version="${3}"
-    local fqpackage="${package}-${version}"
-    local archive
-
-    shift 3
-
-    archive="`find_archive ${subdir} ${fqpackage} ${*}`"
-
-    if [ -z "${archive}" ]; then
-        archive="`find_archive ${subdir} ${package} ${*}`"
-    fi
-
-    echo "${archive}"
-}
-
-#
-# fetch_url_with_command <fetchdir> <url> <command ...>
-#
-# Attempt to fetch the specified URL to the provided directory with
-# the provided command.
-#
-fetch_url_with_command() {
-    local fetchdir="${1}"
-    local url="${2}"
-    local executable="`which ${3}`"
-    local curdir="`pwd`"
-    local status=1
-
-    shift 2
-    
-    if [ -x "${executable}" ]; then
-        cd "${fetchdir}"
-        
-            verbose "  `echo ${1} | tr '[[:lower:]]' '[[:upper:]]'`     ${url}"
-
-            ${*} "${url}"
-
-            status=${?}
-
-            if [ ${?} -ne 0 ]; then
-                    error "Failed to fetch ${url} with ${1}."
-            fi
-
-        cd "${curdir}"
-    fi
-    
-    return ${status}
-}
-
-#
-# fetch_url <fetchdir> <url>
-#
-# Attempt to fetch the specified URL to the provided directory with
-# either wget or curl.
-#
-fetch_url() {
-    local fetchdir="${1}"
-    local url="${2}"
-
-    # Try to fetch the package using wget or curl
-
-    fetch_url_with_command "${fetchdir}" "${url}" wget --tries 4 --no-check-certificate --quiet ||
-        fetch_url_with_command "${fetchdir}" "${url}" curl --retry 4 --insecure --silent --remote-name
-}
-
-#
-# fetch_package <finddir> <fetchdir> <package> <version> <url>
-#
-# Attempt to fetch the specified package version to <fetchdir>, if a
-# local archive does not already exist in <finddir> or <fetchdir>,
-# from the provided URL.
-#
-fetch_package() {
-    local finddir="${1}"
-    local fetchdir="${2}"
-    local package="${3}"
-    local version="${4}"
-    local url="${5}"
-    local fqpackage="${package}-${version}"
-
-    # Check whether a local archive already exists in <finddir> or <fetchdir>.
-
-    archive="`find_versioned_or_nonverioned_archive ${finddir} ${package} ${version} ${EXTENSIONS}`"
-
-    if [ -z "${archive}" ]; then
-        archive="`find_versioned_or_nonverioned_archive ${fetchdir} ${package} ${version} ${EXTENSIONS}`"
-    fi
-
-    # If no archive was found, attempt to fetch it.
-
-    if [ -z "${archive}" ]; then
-        verbose "  FETCH    ${url}"
-
-        fetch_url "${fetchdir}" "${url}"
-
-    else
-        error "No, found ${archive} locally."
-
-    fi
-}
-
-#
-# removetmp
-#
-# Remove temporary files and directories used during the run of this
-# script.
-#
-removetmp() {
-    if [ -O "${LIBTOOLIZE}" ]; then
-        rm -f "${LIBTOOLIZE}"
-    fi
-    if [ -n "${AUTOM4TE_CFG}" ]; then
-        rm -f "${AUTOM4TE_CFG}"
-    fi
-}
-
-#
-# patch_directory <directory> <patch arguments> <patch file> [ ... ]
-#
-# Patch the specified directory by applying the provided patched files
-# using the specified patch arguments. The specified patch files may
-# be uncompressed or compressed with any of bz2, gz, xz, compress, or
-# zip.
-#
-patch_directory() {
-    local directory="${1}"
-    local patchargs="${2}"
-
-    shift 2
-
-    verbose "  PATCH    ${directory}"
-
-    for patch in "${*}"; do
-        verbose "  PATCH    ${patch}"
-
-        extension=`echo "${patch}" | awk -F . '{if (NF > 1) {print $$NF}}'`;
-
-        case "${extension}" in
-
-            bz2)
-                uncompressor="bunzip2 -c"
-                ;;
-
-            gz)
-                uncompressor="gunzip -c"
-                ;;
-
-            xz)
-                uncompressor="xz -d -c"
-                ;;
-
-            Z)
-                uncompressor="uncompress -c"
-                ;;
-
-            zip)
-                uncompressor="unzip -p"
-                ;;
-
-            *)
-                uncompressor="cat"
-                ;;
-
-        esac
-
-        ${uncompressor} "${patch}" | patch ${patchargs} -d "${directory}" || exit 1;
-
-    done
-}
-
-#
-# build_package <package> <version> <host> <patchdir> <archivedir> <builddir> <destdir>
-#
-# Build the specified package version for <host> in <builddir> from
-# the archive found in <archivedir>, after applying the patches in
-# <patchdir> (if any), and install it into the specified destination
-# directory, <destdir>.
-#
-build_package() {
-    local package="${1}"
-    local version="${2}"
-    local host="${3}"
-    local patchdir="${4}"
-    local archivedir="${5}"
-    local builddir="${6}"
-    local destdir="${7}"
-    local fqpackage="${package}-${version}"
-    local curdir=`pwd`
-    local archive
-
-    verbose "  CHECK    ${package}"
-
-    archive="`find_versioned_or_nonverioned_archive ${archivedir} ${package} ${version} ${EXTENSIONS}`"
-
-    if [ -z "${archive}" ]; then
-        error "Could not find an archive for ${package}."
-        exit 1
-    fi
-
-    if [ ! -d "${archivedir}/${fqpackage}" ]; then
-        verbose "  TAR      ${archive}"
-        tar --directory "${archivedir}" -xf "${archive}" || exit ${?}
-    fi
-
-    # If necessary, patch the expanded package.
-
-    if [ -d "${patchdir}" ]; then
-	patch_directory "${archivedir}/${fqpackage}" "-s -p1" ${patchdir}/*.patch*
-    fi
-
-    # If possible, attempt to be self-sufficient, relying on GNU autotools
-    # executables installed along with the SDK itself.
-
-    if [ -d "${destdir}/${host}/bin" ]; then
-        export PATH="${destdir}/${host}/bin:${PATH}"
-    fi
-
-    if [ -d "${destdir}/bin" ]; then
-        export PATH="${destdir}/bin:${PATH}"
-    fi
-
-    export ACLOCAL=`which aclocal`
-    export AUTOCONF="`which autoconf`"
-    export AUTOHEADER="`which autoheader`"
-    export AUTOM4TE="`which autom4te`"
-    export AUTOMAKE="`which automake`"
-    export LIBTOOLIZE="`which libtoolize || which glibtoolize`"
-    export M4=`which m4`
-
-    # Establish, if necessary, some SDK-specific directories needed to
-    # override various paths in GNU autotools that otherwise expect to be
-    # absolute (e.g. /usr/share, etc.).
-
-    if [ -d "${destdir}/share" ]; then
-        if [ -d "${destdir}/share/autoconf" ]; then
-            export AC_MACRODIR="${destdir}/share/autoconf"
-
-            export autom4te_perllibdir="${destdir}/share/autoconf"
-        fi
-
-        if [ -d "${destdir}/share/automake-1.14" ]; then
-            export PERL5LIB="${destdir}/share/automake-1.14:${PERL5LIB}"
-        fi
-    fi
-
-    trap "removetmp" 1 2 3 9 15
-
-    #
-    # Generate any temporary files that need to be patched at run time
-    # with the location of the SDK tree, including:
-    #
-    #   -  The autom4te configuration file
-    #   -  The libtoolize executable script
-    #
-
-    if [ -r "${destdir}/share/autoconf/autom4te.cfg" ]; then
-        export AUTOM4TE_CFG="${destdir}/autom4te.cfg"
-
-        sed -e "s,//share/autoconf,${destdir}/share/autoconf,g" < "${destdir}/share/autoconf/autom4te.cfg" > "${AUTOM4TE_CFG}"
-    fi
-
-    if [ -r "${destdir}/${host}/bin/libtoolize" ]; then
-        export LIBTOOLIZE="${destdir}/libtoolize"
-
-        sed -e "s,//share/libtool,${destdir}/share/libtool,g" -e "s,//share/aclocal,${destdir}/share/aclocal,g" < "${destdir}/${host}/bin/libtoolize" > "${LIBTOOLIZE}"
-
-        chmod 775 "${LIBTOOLIZE}"
-    fi
-
-    # Configure the package
-
-    if [ ${VERBOSE} -gt 0 ]; then
-        CONFIGURE_FLAGS=""
-    else
-        CONFIGURE_FLAGS="--quiet"
-    fi
-
-    verbose "  CONFIG   ${package}"
-
-    cd "${builddir}"
-
-        ${archivedir}/${fqpackage}/configure ${CONFIGURE_FLAGS} --prefix=/ --exec-prefix=/${host} || exit ${?}
-
-    cd "${curdir}"
-
-    # Build the package
-
-    verbose "  MAKE     ${package}"
-
-    make V=${VERBOSE} -C "${builddir}" all || exit ${?}
-
-    # Install / stage the package
-
-    verbose "  INSTALL  ${package}"
-
-    make V=${VERBOSE} -C "${builddir}" DESTDIR="${destdir}" install || exit ${?}
-
-    # Remove any temporary files created.
-
-    removetmp
-}
-
-# Parse out any command line options
-
-while [ ${#} -gt 0 ]; do
-    case ${1} in
-        --arch)
-            ARCH=${2}
-            shift 2
-            ;;
-
-        -h|--help)
-            usage 0
-            ;;
-
-        --builddir)
-            BUILDDIR=${2}
-            shift 2
-            ;;
-
-        --destdir)
-            DESTDIR=${2}
-            shift 2
-            ;;
-
-        --srcdir)
-            SRCDIR=${2}
-            shift 2
-            ;;
-
-        -v|--verbose)
-            $((VERBOSE++))
-            shift 1
-            ;;
-
-        --)
-            shift 1
-            break
-            ;;
-
-        *)
-            usage 1
-            ;;
-    esac
-done
-
-# If the architecture is not specified, fail.
-
-if [ -z "${ARCH}" ]; then
-    error "The host architecture was not specified via --arch."
-
-    usage 1
-fi
-
-# If the --builddir option wasn't specified, then provide a default.
-
-if [ -z "${BUILDDIR}" ]; then
-    BUILDDIR="`pwd`"
-fi
-
-# If the --destdir option wasn't specified, then provide a default.
-
-if [ -z "${DESTDIR}" ]; then
-    DESTDIR=${abs_top_hostdir}
-fi
-
-# If the --srcdir option wasn't specified, then provide a default.
-
-if [ -z "${SRCDIR}" ]; then
-    SRCDIR="`pwd`"
-fi
-
-# Determine what packages to build
-
-if [ ${#} -gt 0 ]; then
-    PACKAGES="${*}"
-
-else
-    PACKAGES="`cat ${SRCDIR}/packages`"
-
-fi
-
-# Build each package
-
-banner "Building GNU autotools for ${ARCH}..."
-
-for package in ${PACKAGES}; do
-    url="`cat ${SRCDIR}/${package}/${package}.url`"
-    version="`cat ${SRCDIR}/${package}/${package}.version`"
-    patchdir="${SRCDIR}/${package}/${package}.patches"
-
-    # Fetch, if necessary, the package from the canonical source location.
-
-    subbanner "  CHECK    ${package}"
-
-    fetch_package "${SRCDIR}/${package}" "${BUILDDIR}" "${package}" "${version}" "${url}"
-
-    # Build and install the package.
-
-    verbose "  MKDIR    ${BUILDDIR}/build/${ARCH}/${package}-${version}"
-
-    mkdir -p "${BUILDDIR}/build/${ARCH}/${package}-${version}" || exit ${?}
-
-    build_package "${package}" "${version}" "${ARCH}" "${patchdir}" "${BUILDDIR}" "${BUILDDIR}/build/${ARCH}/${package}-${version}" "${DESTDIR}"
-done
-
-trailer
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/coreutils/coreutils.url b/third_party/nlbuild-autotools/repo/tools/packages/coreutils/coreutils.url
deleted file mode 100644
index d43fcea..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/coreutils/coreutils.url
+++ /dev/null
@@ -1 +0,0 @@
-http://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.31.tar.xz
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/coreutils/coreutils.version b/third_party/nlbuild-autotools/repo/tools/packages/coreutils/coreutils.version
deleted file mode 100644
index 72b9b42..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/coreutils/coreutils.version
+++ /dev/null
@@ -1 +0,0 @@
-8.31
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/libtool/libtool.url b/third_party/nlbuild-autotools/repo/tools/packages/libtool/libtool.url
deleted file mode 100644
index f3bc9fb..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/libtool/libtool.url
+++ /dev/null
@@ -1 +0,0 @@
-http://ftp.gnu.org/pub/gnu/libtool/libtool-2.4.2.tar.gz
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/libtool/libtool.version b/third_party/nlbuild-autotools/repo/tools/packages/libtool/libtool.version
deleted file mode 100644
index 8e8299d..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/libtool/libtool.version
+++ /dev/null
@@ -1 +0,0 @@
-2.4.2
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/m4/m4.url b/third_party/nlbuild-autotools/repo/tools/packages/m4/m4.url
deleted file mode 100644
index 09eb869..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/m4/m4.url
+++ /dev/null
@@ -1 +0,0 @@
-http://ftp.gnu.org/pub/gnu/m4/m4-1.4.5.tar.gz
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/m4/m4.version b/third_party/nlbuild-autotools/repo/tools/packages/m4/m4.version
deleted file mode 100644
index e516bb9..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/m4/m4.version
+++ /dev/null
@@ -1 +0,0 @@
-1.4.5
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/make/make.patches/make-00.patch b/third_party/nlbuild-autotools/repo/tools/packages/make/make.patches/make-00.patch
deleted file mode 100644
index 716faaf..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/make/make.patches/make-00.patch
+++ /dev/null
@@ -1,442 +0,0 @@
---- make-dfsg-4.1.orig/ar.c
-+++ make-dfsg-4.1/ar.c
-@@ -68,25 +68,39 @@
- 
- /* This function is called by 'ar_scan' to find which member to look at.  */
- 
-+struct member_date_lookup
-+{
-+  const char *name;
-+  time_t *member_date;
-+};
-+
- /* ARGSUSED */
- static long int
- ar_member_date_1 (int desc UNUSED, const char *mem, int truncated,
-                   long int hdrpos UNUSED, long int datapos UNUSED,
-                   long int size UNUSED, long int date,
-                   int uid UNUSED, int gid UNUSED, int mode UNUSED,
--                  const void *name)
-+                  const void *data)
- {
--  return ar_name_equal (name, mem, truncated) ? date : 0;
-+  const struct member_date_lookup *lookup_data = data;
-+  if (ar_name_equal (lookup_data->name, mem, truncated))
-+    {
-+      *lookup_data->member_date = date;
-+      return 1;
-+    }
-+  return 0;
- }
- 
--/* Return the modtime of NAME.  */
-+/* Read the modtime of NAME in MEMBER_DATE.
-+   Returns 1 if NAME exists, 0 otherwise.  */
- 
--time_t
--ar_member_date (const char *name)
-+int
-+ar_member_date (const char *name, time_t *member_date)
- {
-   char *arname;
-   char *memname;
--  long int val;
-+  int found;
-+  struct member_date_lookup lookup_data;
- 
-   ar_parse_name (name, &arname, &memname);
- 
-@@ -107,11 +121,14 @@
-       (void) f_mtime (arfile, 0);
-   }
- 
--  val = ar_scan (arname, ar_member_date_1, memname);
-+  lookup_data.name = memname;
-+  lookup_data.member_date = member_date;
-+  found = ar_scan (arname, ar_member_date_1, &lookup_data);
- 
-   free (arname);
- 
--  return (val <= 0 ? (time_t) -1 : (time_t) val);
-+  /* return 0 (not found) if the archive does not exist or has invalid format. */
-+  return (found == 1) ? 1 : 0;
- }
- 
- /* Set the archive-member NAME's modtime to now.  */
---- make-dfsg-4.1.orig/commands.c
-+++ make-dfsg-4.1/commands.c
-@@ -622,7 +622,10 @@
-       time_t file_date = (file->last_mtime == NONEXISTENT_MTIME
-                           ? (time_t) -1
-                           : (time_t) FILE_TIMESTAMP_S (file->last_mtime));
--      if (ar_member_date (file->name) != file_date)
-+      time_t member_date = NONEXISTENT_MTIME;
-+      int found;
-+      found = ar_member_date (file->name, &member_date);
-+      if (found && member_date != file_date)
-         {
-           if (on_behalf_of)
-             OSS (error, NILF,
---- make-dfsg-4.1.orig/configure
-+++ make-dfsg-4.1/configure
-@@ -11060,10 +11061,9 @@
- #include <glob.h>
- #include <fnmatch.h>
- 
--#define GLOB_INTERFACE_VERSION 1
- #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
- # include <gnu-versions.h>
--# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
-+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
-    gnu glob
- # endif
- #endif],
---- make-dfsg-4.1.orig/dir.c
-+++ make-dfsg-4.1/dir.c
-@@ -748,8 +748,11 @@
-   const char *slash;
- 
- #ifndef NO_ARCHIVES
--  if (ar_name (name))
--    return ar_member_date (name) != (time_t) -1;
-+  {
-+    time_t member_date;
-+    if (ar_name (name))
-+      return ar_member_date (name, &member_date);
-+  }
- #endif
- 
- #ifdef VMS
-@@ -1212,15 +1215,40 @@
- }
- #endif
- 
-+/* Similarly for lstat.  */
-+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
-+# ifndef VMS
-+#  ifndef HAVE_SYS_STAT_H
-+int lstat (const char *path, struct stat *sbuf);
-+#  endif
-+# else
-+    /* We are done with the fake lstat.  Go back to the real lstat */
-+#   ifdef lstat
-+#     undef lstat
-+#   endif
-+# endif
-+# define local_lstat lstat
-+#elif defined(WINDOWS32)
-+/* Windows doesn't support lstat().  */
-+# define local_lstat local_stat
-+#else
-+static int
-+local_lstat (const char *path, struct stat *buf)
-+{
-+  int e;
-+  EINTRLOOP (e, lstat (path, buf));
-+  return e;
-+}
-+#endif
-+
- void
- dir_setup_glob (glob_t *gl)
- {
-   gl->gl_opendir = open_dirstream;
-   gl->gl_readdir = read_dirstream;
-   gl->gl_closedir = free;
-+  gl->gl_lstat = local_lstat;
-   gl->gl_stat = local_stat;
--  /* We don't bother setting gl_lstat, since glob never calls it.
--     The slot is only there for compatibility with 4.4 BSD.  */
- }
- 
- void
---- make-dfsg-4.1.orig/job.c
-+++ make-dfsg-4.1/job.c
-@@ -27,6 +27,14 @@
- 
- #include <string.h>
- 
-+#if defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H)
-+#include <sys/user.h>
-+#include <linux/binfmts.h>
-+#endif
-+#ifndef PAGE_SIZE
-+# define PAGE_SIZE (sysconf(_SC_PAGESIZE))
-+#endif
-+
- /* Default shell to use.  */
- #ifdef WINDOWS32
- #include <windows.h>
-@@ -824,8 +832,6 @@
-           break;
-         }
- 
--      child_failed = exit_sig != 0 || exit_code != 0;
--
-       /* Search for a child matching the deceased one.  */
-       lastc = 0;
-       for (c = children; c != 0; lastc = c, c = c->next)
-@@ -837,6 +843,15 @@
-            Ignore it; it was inherited from our invoker.  */
-         continue;
- 
-+      /* Determine the failure status: 0 for success, 1 for updating target in
-+         question mode, 2 for anything else.  */
-+      if (exit_sig == 0 && exit_code == 0)
-+        child_failed = MAKE_SUCCESS;
-+      else if (exit_sig == 0 && exit_code == 1 && question_flag && c->recursive)
-+        child_failed = MAKE_TROUBLE;
-+      else
-+        child_failed = MAKE_FAILURE;
-+
-       DB (DB_JOBS, (child_failed
-                     ? _("Reaping losing child %p PID %s %s\n")
-                     : _("Reaping winning child %p PID %s %s\n"),
-@@ -872,10 +887,10 @@
-              delete non-precious targets, and abort.  */
-           static int delete_on_error = -1;
- 
--          if (!dontcare)
-+          if (!dontcare && child_failed == MAKE_FAILURE)
-             child_error (c, exit_code, exit_sig, coredump, 0);
- 
--          c->file->update_status = us_failed;
-+          c->file->update_status = child_failed == MAKE_FAILURE ? us_failed : us_question;
-           if (delete_on_error == -1)
-             {
-               struct file *f = lookup_file (".DELETE_ON_ERROR");
-@@ -987,7 +1002,7 @@
-       if (!err && child_failed && !dontcare && !keep_going_flag &&
-           /* fatal_error_signal will die with the right signal.  */
-           !handling_fatal_signal)
--        die (MAKE_FAILURE);
-+        die (child_failed);
- 
-       /* Only block for one child.  */
-       block = 0;
-@@ -1189,14 +1204,15 @@
-       ++p;
-     }
- 
-+  child->recursive = ((flags & COMMANDS_RECURSE) != 0);
-+
-   /* Update the file's command flags with any new ones we found.  We only
-      keep the COMMANDS_RECURSE setting.  Even this isn't 100% correct; we are
-      now marking more commands recursive than should be in the case of
-      multiline define/endef scripts where only one line is marked "+".  In
-      order to really fix this, we'll have to keep a lines_flags for every
-      actual line, after expansion.  */
--  child->file->cmds->lines_flags[child->command_line - 1]
--    |= flags & COMMANDS_RECURSE;
-+  child->file->cmds->lines_flags[child->command_line - 1] |= flags & COMMANDS_RECURSE;
- 
-   /* POSIX requires that a recipe prefix after a backslash-newline should
-      be ignored.  Remove it now so the output is correct.  */
-@@ -3115,6 +3131,7 @@
- #ifdef WINDOWS32
-     char *command_ptr = NULL; /* used for batch_mode_shell mode */
- #endif
-+    char *args_ptr;
- 
- # ifdef __EMX__ /* is this necessary? */
-     if (!unixy_shell && shellflags)
-@@ -3280,8 +3297,17 @@
-         return new_argv;
-       }
- 
-+#ifdef MAX_ARG_STRLEN
-+    static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ ";
-+#define ARG_NUMBER_DIGITS 5
-+#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4                   \
-+                  + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2))
-+#else
-+#define EVAL_LEN 0
-+#endif
-+
-     new_line = xmalloc ((shell_len*2) + 1 + sflags_len + 1
--                        + (line_len*2) + 1);
-+                        + (line_len*2) + 1 + EVAL_LEN);
-     ap = new_line;
-     /* Copy SHELL, escaping any characters special to the shell.  If
-        we don't escape them, construct_command_argv_internal will
-@@ -3301,6 +3327,30 @@
- #ifdef WINDOWS32
-     command_ptr = ap;
- #endif
-+
-+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
-+    if (unixy_shell && line_len > MAX_ARG_STRLEN)
-+      {
-+       unsigned j;
-+       memcpy (ap, eval_line, sizeof (eval_line) - 1);
-+       ap += sizeof (eval_line) - 1;
-+       for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++)
-+         ap += sprintf (ap, "\\$\\{%u\\}", j);
-+       *ap++ = '\\';
-+       *ap++ = '"';
-+       *ap++ = ' ';
-+       /* Copy only the first word of SHELL to $0.  */
-+       for (p = shell; *p != '\0'; ++p)
-+         {
-+           if (isspace ((unsigned char)*p))
-+             break;
-+           *ap++ = *p;
-+         }
-+       *ap++ = ' ';
-+      }
-+#endif
-+    args_ptr = ap;
-+
-     for (p = line; *p != '\0'; ++p)
-       {
-         if (restp != NULL && *p == '\n')
-@@ -3348,6 +3398,13 @@
-           }
- #endif
-         *ap++ = *p;
-+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN)
-+       if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2))
-+         {
-+           *ap++ = ' ';
-+           args_ptr = ap;
-+         }
-+#endif
-       }
-     if (ap == new_line + shell_len + sflags_len + 2)
-       {
---- make-dfsg-4.1.orig/job.h
-+++ make-dfsg-4.1/job.h
-@@ -108,6 +108,7 @@
-     unsigned int  noerror:1;    /* Nonzero if commands contained a '-'.  */
-     unsigned int  good_stdin:1; /* Nonzero if this child has a good stdin.  */
-     unsigned int  deleted:1;    /* Nonzero if targets have been deleted.  */
-+    unsigned int  recursive:1;  /* Nonzero for recursive command ('+' etc.)  */
-     unsigned int  dontcare:1;   /* Saved dontcare flag.  */
-   };
- 
---- make-dfsg-4.1.orig/main.c
-+++ make-dfsg-4.1/main.c
-@@ -1401,13 +1401,18 @@
- #ifdef HAVE_ISATTY
-     if (isatty (fileno (stdout)))
-       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
--        define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
--                               o_default, 0)->export = v_export;
--
-+        {
-+          const char *tty = TTYNAME (fileno (stdout));
-+          define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
-+                                 o_default, 0)->export = v_export;
-+        }
-     if (isatty (fileno (stderr)))
-       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
--        define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
--                               o_default, 0)->export = v_export;
-+        {
-+          const char *tty = TTYNAME (fileno (stderr));
-+          define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
-+                                 o_default, 0)->export = v_export;
-+        }
- #endif
- 
-   /* Reset in case the switches changed our minds.  */
-@@ -2418,6 +2423,11 @@
-             exit (WIFEXITED(r) ? WEXITSTATUS(r) : EXIT_FAILURE);
-           }
- #else
-+#ifdef SET_STACK_SIZE
-+          /* Reset limits, if necessary.  */
-+          if (stack_limit.rlim_cur)
-+            setrlimit (RLIMIT_STACK, &stack_limit);
-+#endif
-           exec_command ((char **)nargv, environ);
- #endif
-           free (aargv);
---- make-dfsg-4.1.orig/makeint.h
-+++ make-dfsg-4.1/makeint.h
-@@ -424,10 +424,11 @@
- /* The number of bytes needed to represent the largest integer as a string.  */
- #define INTSTR_LENGTH         CSTRLEN ("18446744073709551616")
- 
-+#define DEFAULT_TTYNAME "true"
- #ifdef HAVE_TTYNAME
- # define TTYNAME(_f) ttyname (_f)
- #else
--# define TTYNAME(_f) "true"
-+# define TTYNAME(_f) DEFAULT_TTYNAME
- #endif
- 
- 
-@@ -478,7 +479,7 @@
- int ar_name (const char *);
- void ar_parse_name (const char *, char **, char **);
- int ar_touch (const char *);
--time_t ar_member_date (const char *);
-+int ar_member_date (const char *, time_t *);
- 
- typedef long int (*ar_member_func_t) (int desc, const char *mem, int truncated,
-                                       long int hdrpos, long int datapos,
---- make-dfsg-4.1.orig/remake.c
-+++ make-dfsg-4.1/remake.c
-@@ -1259,6 +1259,7 @@
- 
-       char *arname, *memname;
-       struct file *arfile;
-+      int found;
-       time_t member_date;
- 
-       /* Find the archive's name.  */
-@@ -1306,10 +1307,15 @@
-         /* The archive doesn't exist, so its members don't exist either.  */
-         return NONEXISTENT_MTIME;
- 
--      member_date = ar_member_date (file->hname);
--      mtime = (member_date == (time_t) -1
--               ? NONEXISTENT_MTIME
--               : file_timestamp_cons (file->hname, member_date, 0));
-+      found = ar_member_date (file->hname, &member_date);
-+      if (found && member_date == (time_t) 0)
-+        {
-+              OSS (error, NILF,
-+                   _("Warning: Archive '%s' seems to have been created in deterministic mode. '%s' will always be updated. Please consider passing the U flag to ar to avoid the problem."),
-+                   arfile->name, memname);
-+
-+        }
-+      mtime = found ? file_timestamp_cons (file->hname, member_date, 0) : NONEXISTENT_MTIME;
-     }
-   else
- #endif
-@@ -1548,9 +1554,11 @@
- {
-   static const char *dirs[] =
-     {
-+#ifdef MULTIARCH_DIRS
-+      MULTIARCH_DIRS
-+#endif
- #ifndef _AMIGA
-       "/lib",
--      "/usr/lib",
- #endif
- #if defined(WINDOWS32) && !defined(LIBDIR)
- /*
-@@ -1559,7 +1567,19 @@
-  */
- #define LIBDIR "."
- #endif
--      LIBDIR,                   /* Defined by configuration.  */
-+      LIBDIR,			/* Defined by configuration.  */
-+#ifndef _AMIGA
-+/*
-+ * In the Debian binaries, PREFIX is /usr and thus this searches /lib,
-+ * /usr/lib and /usr/lib again and therefore misses any libraries that
-+ * are not packaged and were installed by the site admin.  The ideal
-+ * behaviour would be to have the search path set by a Makefile
-+ * variable (other than the VPATH blunt object) but even absent that,
-+ * it would be more useful if it looked in /usr/local/lib even though
-+ * make itself hasn't been installed in the /usr/local tree -- manoj
-+ */
-+      "/usr/local/lib",
-+#endif
-       0
-     };
- 
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/make/make.patches/make-00.url b/third_party/nlbuild-autotools/repo/tools/packages/make/make.patches/make-00.url
deleted file mode 100644
index 26bd501..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/make/make.patches/make-00.url
+++ /dev/null
@@ -1 +0,0 @@
-http://archive.ubuntu.com/ubuntu/pool/main/m/make-dfsg/make-dfsg_4.1-9.1ubuntu1.diff.gz
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/make/make.url b/third_party/nlbuild-autotools/repo/tools/packages/make/make.url
deleted file mode 100644
index b472eb9..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/make/make.url
+++ /dev/null
@@ -1 +0,0 @@
-http://ftp.gnu.org/pub/gnu/make/make-4.1.tar.gz
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/make/make.version b/third_party/nlbuild-autotools/repo/tools/packages/make/make.version
deleted file mode 100644
index 7d5c902..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/make/make.version
+++ /dev/null
@@ -1 +0,0 @@
-4.1
diff --git a/third_party/nlbuild-autotools/repo/tools/packages/packages b/third_party/nlbuild-autotools/repo/tools/packages/packages
deleted file mode 100644
index 28d8733..0000000
--- a/third_party/nlbuild-autotools/repo/tools/packages/packages
+++ /dev/null
@@ -1,6 +0,0 @@
-m4
-autoconf
-automake
-libtool
-make
-coreutils
diff --git a/third_party/openthread-test-driver/LICENSE b/third_party/openthread-test-driver/LICENSE
deleted file mode 100644
index d511905..0000000
--- a/third_party/openthread-test-driver/LICENSE
+++ /dev/null
@@ -1,339 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/third_party/openthread-test-driver/README.md b/third_party/openthread-test-driver/README.md
deleted file mode 100644
index acffbab..0000000
--- a/third_party/openthread-test-driver/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Automake test-driver
-
-## URL
-
-http://git.savannah.gnu.org/cgit/automake.git/tree/lib/test-driver
-
-## Version
-
-2016-01-11.22
-
-## License
-
-GPLv2
-
-## License File
-
-[LICENSE](https://www.gnu.org/licenses/)
-
-## Description
-
-Automake testsuite driver script.
-
-## Modifications
-
-Change the test-driver automake script to support
-parallel test scripts execution, each one initiated
-with a unique number.
diff --git a/third_party/openthread-test-driver/test-driver b/third_party/openthread-test-driver/test-driver
deleted file mode 100755
index 96f6db8..0000000
--- a/third_party/openthread-test-driver/test-driver
+++ /dev/null
@@ -1,165 +0,0 @@
-#! /bin/sh
-# test-driver - basic testsuite driver script.
-
-scriptversion=2016-01-11.22; # UTC
-
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-# Make unconditional expansion of undefined variables an error.  This
-# helps a lot in preventing typo-related bugs.
-set -u
-
-usage_error ()
-{
-  echo "$0: $*" >&2
-  print_usage >&2
-  exit 2
-}
-
-print_usage ()
-{
-  cat <<END
-Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--]
-              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
-The '--test-name', '--log-file' and '--trs-file' options are mandatory.
-END
-}
-
-test_name= # Used for reporting.
-log_file=  # Where to save the output of the test script.
-trs_file=  # Where to save the metadata of the test run.
-expect_failure=no
-color_tests=no
-enable_hard_errors=yes
-while test $# -gt 0; do
-  case $1 in
-  --help) print_usage; exit $?;;
-  --version) echo "test-driver $scriptversion"; exit $?;;
-  --test-name) test_name=$2; shift;;
-  --log-file) log_file=$2; shift;;
-  --trs-file) trs_file=$2; shift;;
-  --color-tests) color_tests=$2; shift;;
-  --expect-failure) expect_failure=$2; shift;;
-  --enable-hard-errors) enable_hard_errors=$2; shift;;
-  --) shift; break;;
-  -*) usage_error "invalid option: '$1'";;
-   *) break;;
-  esac
-  shift
-done
-
-missing_opts=
-test x"$test_name" = x && missing_opts="$missing_opts --test-name"
-test x"$log_file"  = x && missing_opts="$missing_opts --log-file"
-test x"$trs_file"  = x && missing_opts="$missing_opts --trs-file"
-if test x"$missing_opts" != x; then
-  usage_error "the following mandatory options are missing:$missing_opts"
-fi
-
-if test $# -eq 0; then
-  usage_error "missing argument"
-fi
-
-if test $color_tests = yes; then
-  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
-  red='' # Red.
-  grn='' # Green.
-  lgn='' # Light green.
-  blu='' # Blue.
-  mgn='' # Magenta.
-  std=''     # No color.
-else
-  red= grn= lgn= blu= mgn= std=
-fi
-
-do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
-trap "st=129; $do_exit" 1
-trap "st=130; $do_exit" 2
-trap "st=141; $do_exit" 13
-trap "st=143; $do_exit" 15
-
-# Test script is run here.
-# Get an unique offset
-lock_path="/tmp/offset"
-OFFSET=0
-while true; do
-    mkdir "${lock_path}.${OFFSET}.lock.d" > /dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        break
-    fi
-    OFFSET=$(expr $OFFSET + 1)
-done
-
-# Run a test
-TEST_NAME="${test_name}" PORT_OFFSET=$OFFSET python3 "$@" >$log_file 2>&1
-estatus=$?
-
-# Return the offset
-rm -rf "${lock_path}.${OFFSET}.lock.d"
-# Remove the flash files
-rm -f tmp/${OFFSET}_*.flash tmp/${OFFSET}_*.data tmp/${OFFSET}_*.swap
-
-if test $enable_hard_errors = no && test $estatus -eq 99; then
-  tweaked_estatus=1
-else
-  tweaked_estatus=$estatus
-fi
-
-case $tweaked_estatus:$expect_failure in
-  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
-  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
-  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
-  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
-  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
-  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
-esac
-
-# Report the test outcome and exit status in the logs, so that one can
-# know whether the test passed or failed simply by looking at the '.log'
-# file, without the need of also peaking into the corresponding '.trs'
-# file (automake bug#11814).
-echo "$res $test_name (exit status: $estatus)" >>$log_file
-
-# Report outcome to console.
-echo "${col}${res}${std}: $test_name"
-
-# Register the test result, and other relevant metadata.
-echo ":test-result: $res" > $trs_file
-echo ":global-test-result: $res" >> $trs_file
-echo ":recheck: $recheck" >> $trs_file
-echo ":copy-in-global-log: $gcopy" >> $trs_file
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
-# time-stamp-end: "; # UTC"
-# End: