mirror of
https://github.com/espressif/openthread.git
synced 2026-09-13 04:30:08 +00:00
[build] rename ncp_radio to rcp (#3580)
This commit is contained in:
committed by
Jonathan Hui
parent
b9d20b590e
commit
8c08fd8815
@@ -69,7 +69,7 @@ check() {
|
||||
echo 'RADIO_PTY' $DEVICE_PTY
|
||||
echo 'CORE_PTY' $CORE_PTY
|
||||
|
||||
RADIO_NCP_PATH="$(pwd)/$(ls output/*linux*/bin/ot-ncp-radio)"
|
||||
RADIO_NCP_PATH="$(pwd)/$(ls output/*linux*/bin/ot-rcp)"
|
||||
$RADIO_NCP_PATH 1 > $RADIO_PTY < $RADIO_PTY &
|
||||
|
||||
if [[ "${DAEMON}" = 1 ]]; then
|
||||
|
||||
+7
-7
@@ -163,7 +163,7 @@ build_nrf52811() {
|
||||
make -f examples/Makefile-nrf52811 $OPENTHREAD_FLAGS || die
|
||||
arm-none-eabi-size output/nrf52811/bin/ot-cli-mtd || die
|
||||
arm-none-eabi-size output/nrf52811/bin/ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/nrf52811/bin/ot-ncp-radio || die
|
||||
arm-none-eabi-size output/nrf52811/bin/ot-rcp || die
|
||||
|
||||
# SPI transport for NCP
|
||||
git checkout -- . || die
|
||||
@@ -171,7 +171,7 @@ build_nrf52811() {
|
||||
./bootstrap || die
|
||||
NCP_SPI=1 make -f examples/Makefile-nrf52811 $OPENTHREAD_FLAGS || die
|
||||
arm-none-eabi-size output/nrf52811/bin/ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/nrf52811/bin/ot-ncp-radio || die
|
||||
arm-none-eabi-size output/nrf52811/bin/ot-rcp || die
|
||||
|
||||
# Build without transport (no CLI or NCP applications)
|
||||
git checkout -- . || die
|
||||
@@ -193,7 +193,7 @@ build_nrf52840() {
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-cli-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-radio || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-rcp || die
|
||||
|
||||
# USB transport with bootloader e.g. to support PCA10059 dongle
|
||||
git checkout -- . || die
|
||||
@@ -204,7 +204,7 @@ build_nrf52840() {
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-cli-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-radio || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-rcp || die
|
||||
|
||||
# SPI transport for NCP
|
||||
git checkout -- . || die
|
||||
@@ -213,7 +213,7 @@ build_nrf52840() {
|
||||
NCP_SPI=1 make -f examples/Makefile-nrf52840 $OPENTHREAD_FLAGS || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-ftd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-mtd || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-ncp-radio || die
|
||||
arm-none-eabi-size output/nrf52840/bin/ot-rcp || die
|
||||
|
||||
# Build without transport (no CLI or NCP applications)
|
||||
git checkout -- . || die
|
||||
@@ -408,7 +408,7 @@ build_samr21() {
|
||||
CERT_LOG=1 COVERAGE=1 VIRTUAL_TIME_UART=1 make -f examples/Makefile-posix || die
|
||||
# readline supports pipe, editline does not
|
||||
CERT_LOG=1 COVERAGE=1 READLINE=readline make -f src/posix/Makefile-posix || die
|
||||
CERT_LOG=1 COVERAGE=1 PYTHONUNBUFFERED=1 OT_CLI_PATH="$(pwd)/$(ls output/posix/*/bin/ot-cli)" RADIO_DEVICE="$(pwd)/$(ls output/*/bin/ot-ncp-radio)" make -f src/posix/Makefile-posix check || die
|
||||
CERT_LOG=1 COVERAGE=1 PYTHONUNBUFFERED=1 OT_CLI_PATH="$(pwd)/$(ls output/posix/*/bin/ot-cli)" RADIO_DEVICE="$(pwd)/$(ls output/*/bin/ot-rcp)" make -f src/posix/Makefile-posix check || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != posix-app-pty ] || {
|
||||
@@ -431,7 +431,7 @@ build_samr21() {
|
||||
CERT_LOG=1 COVERAGE=1 VIRTUAL_TIME_UART=1 make -f examples/Makefile-posix || die
|
||||
# enable code coverage for OpenThread posix radio
|
||||
CERT_LOG=1 COVERAGE=1 READLINE=readline make -f src/posix/Makefile-posix || die
|
||||
CERT_LOG=1 COVERAGE=1 PYTHONUNBUFFERED=1 OT_NCP_PATH="$(pwd)/$(ls output/posix/*/bin/ot-ncp)" RADIO_DEVICE="$(pwd)/$(ls output/*/bin/ot-ncp-radio)" NODE_TYPE=ncp-sim make -f src/posix/Makefile-posix check || die
|
||||
CERT_LOG=1 COVERAGE=1 PYTHONUNBUFFERED=1 OT_NCP_PATH="$(pwd)/$(ls output/posix/*/bin/ot-ncp)" RADIO_DEVICE="$(pwd)/$(ls output/*/bin/ot-rcp)" NODE_TYPE=ncp-sim make -f src/posix/Makefile-posix check || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != posix-ncp ] || {
|
||||
|
||||
@@ -91,10 +91,10 @@ COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_PLAT
|
||||
endif
|
||||
|
||||
#
|
||||
# Select transport which CLI, NCP and NCP-Radio examples will use to communicate.
|
||||
# Select transport which CLI, NCP and RCP examples will use to communicate.
|
||||
# To disable all transports use the DISABLE_TRANSPORTS switch. This will disable
|
||||
# the build of all above examples.
|
||||
# If NCP_SPI switch is set, only NCP and NCP-Radio examples will be built.
|
||||
# If NCP_SPI switch is set, only NCP and RCP examples will be built.
|
||||
# Otherwise, the default serial transport is UART.
|
||||
#
|
||||
ifndef DISABLE_TRANSPORTS
|
||||
|
||||
@@ -96,10 +96,10 @@ COMMONCFLAGS += -DAPP_USBD_NRF_DFU_TRIGGER_ENABLED=1
|
||||
endif
|
||||
|
||||
#
|
||||
# Select transport which CLI, NCP and NCP-Radio examples will use to communicate.
|
||||
# Select transport which CLI, NCP and RCP examples will use to communicate.
|
||||
# To disable all transports use the DISABLE_TRANSPORTS switch. This will disable
|
||||
# the build of all above examples.
|
||||
# If NCP_SPI switch is set, only NCP and NCP-Radio examples will be built.
|
||||
# If NCP_SPI switch is set, only NCP and RCP examples will be built.
|
||||
# Otherwise the user can select USB transport. If no transports were selected,
|
||||
# the default serial transport is UART.
|
||||
#
|
||||
|
||||
@@ -145,38 +145,38 @@ ot_ncp_mtd_SOURCES = \
|
||||
|
||||
if OPENTHREAD_ENABLE_RADIO_ONLY
|
||||
bin_PROGRAMS += \
|
||||
ot-ncp-radio \
|
||||
ot-rcp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ot_ncp_radio_CPPFLAGS = \
|
||||
ot_rcp_CPPFLAGS = \
|
||||
$(CPPFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_radio_LDADD = \
|
||||
$(top_builddir)/src/ncp/libopenthread-ncp-radio.a \
|
||||
ot_rcp_LDADD = \
|
||||
$(top_builddir)/src/ncp/libopenthread-rcp.a \
|
||||
$(top_builddir)/src/core/libopenthread-radio.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(top_builddir)/src/core/libopenthread-radio.a \
|
||||
$(LDADD_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_radio_LDFLAGS = \
|
||||
ot_rcp_LDFLAGS = \
|
||||
$(LDFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_radio_LIBTOOLFLAGS = \
|
||||
ot_rcp_LIBTOOLFLAGS = \
|
||||
$(LIBTOOLFLAGS_COMMON) \
|
||||
$(NULL)
|
||||
|
||||
ot_ncp_radio_SOURCES = \
|
||||
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_ncp_radio_LDFLAGS += -Wl,-Map=ot-ncp-radio.map
|
||||
ot_rcp_LDFLAGS += -Wl,-Map=ot-rcp.map
|
||||
endif
|
||||
|
||||
if OPENTHREAD_BUILD_COVERAGE
|
||||
|
||||
@@ -7,7 +7,7 @@ This directory contains example platform drivers for [Nordic Semiconductor nRF52
|
||||
This SoC is meant to be used in the configuration that involves the Host Processor and the IEEE 802.15.4 radio.
|
||||
In this configuration, the full OpenThread stack is running on the Host Processor and the nRF52811 SoC acts as an IEEE 802.15.4 radio.
|
||||
The radio is running a minimal OpenThread implementation that allows for communication between the Host Processor and the nRF52811.
|
||||
In this architecture, the nRF52811 SoC device is called NCP radio or RCP (Radio Co-Processor).
|
||||
In this architecture the nRF52811 SoC device is called RCP (Radio Co-Processor).
|
||||
|
||||
The nRF52811 platform is currently under development.
|
||||
|
||||
@@ -46,7 +46,7 @@ Install the [nRF5 Command Line Tools][nRF5-Command-Line-Tools] to flash, debug,
|
||||
|
||||
With this platform, you can build:
|
||||
- Limited version of CLI example (e.g. without Thread commissioning functionality)
|
||||
- NCP radio-only example that consists of two parts:
|
||||
- RCP example that consists of two parts:
|
||||
- firmware that is flashed to the nRF52811 SoC
|
||||
- host executables to be executed on a POSIX platform in case of the RCP usage
|
||||
|
||||
@@ -76,7 +76,7 @@ After a successful build, the `elf` files can be found in
|
||||
You can convert them to hex using `arm-none-eabi-objcopy`:
|
||||
```bash
|
||||
$ arm-none-eabi-objcopy -O ihex ot-cli-mtd ot-cli-mtd.hex
|
||||
$ arm-none-eabi-objcopy -O ihex ot-ncp-radio ot-ncp-radio.hex
|
||||
$ arm-none-eabi-objcopy -O ihex ot-rcp ot-rcp.hex
|
||||
```
|
||||
|
||||
### Building the firmware with native SPI support
|
||||
@@ -133,7 +133,7 @@ To test the example:
|
||||
|
||||
2. Flash one with the `CLI MTD Example` (ot-cli-mtd.hex, as shown above).
|
||||
|
||||
3. Flash `RCP Example` (ot-ncp-radio.hex) to the other board.
|
||||
3. Flash `RCP Example` (ot-rcp.hex) to the other board.
|
||||
|
||||
4. Connect the RCP to the PC.
|
||||
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ main()
|
||||
export VIRTUAL_TIME="${VIRTUAL_TIME:-1}"
|
||||
|
||||
if [[ "${NODE_MODE}" = 'transceiver' ]] ; then
|
||||
export RADIO_DEVICE="build/${SYSTEM_TRIPLET}/examples/apps/ncp/ot-ncp-radio"
|
||||
export RADIO_DEVICE="build/${SYSTEM_TRIPLET}/examples/apps/ncp/ot-rcp"
|
||||
export OT_CLI_PATH="build/posix/${SYSTEM_TRIPLET}/src/posix/ot-cli"
|
||||
export OT_NCP_PATH="build/posix/${SYSTEM_TRIPLET}/src/posix/ot-ncp"
|
||||
fi
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ lib_LIBRARIES += libopenthread-ncp-mtd.a
|
||||
endif
|
||||
|
||||
if OPENTHREAD_ENABLE_RADIO_ONLY
|
||||
lib_LIBRARIES += libopenthread-ncp-radio.a
|
||||
lib_LIBRARIES += libopenthread-rcp.a
|
||||
endif
|
||||
|
||||
COMMON_CPPFLAGS = \
|
||||
@@ -68,7 +68,7 @@ libopenthread_ncp_ftd_a_CPPFLAGS = \
|
||||
$(COMMON_CPPFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
libopenthread_ncp_radio_a_CPPFLAGS = \
|
||||
libopenthread_rcp_a_CPPFLAGS = \
|
||||
-DOPENTHREAD_RADIO=1 \
|
||||
$(COMMON_CPPFLAGS) \
|
||||
$(NULL)
|
||||
@@ -125,7 +125,7 @@ libopenthread_ncp_ftd_a_SOURCES = \
|
||||
$(COMMON_SOURCES) \
|
||||
$(NULL)
|
||||
|
||||
libopenthread_ncp_radio_a_SOURCES = \
|
||||
libopenthread_rcp_a_SOURCES = \
|
||||
$(COMMON_SOURCES) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
+9
-9
@@ -37,7 +37,7 @@ You can also perform radio diagnostics using the command [diag](../../src/diag/R
|
||||
|
||||
```sh
|
||||
make -f examples/Makefile-posix
|
||||
./output/posix/x86_64-unknown-linux-gnu/bin/ot-cli ./output/x86_64-unknown-linux-gnu/bin/ot-ncp-radio 1
|
||||
./output/posix/x86_64-unknown-linux-gnu/bin/ot-cli ./output/x86_64-unknown-linux-gnu/bin/ot-rcp 1
|
||||
```
|
||||
|
||||
### With Real Device
|
||||
@@ -48,8 +48,8 @@ make -f examples/Makefile-posix
|
||||
|
||||
```sh
|
||||
make -f examples/Makefile-nrf52840
|
||||
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/ot-ncp-radio ot-ncp-radio.hex
|
||||
nrfjprog -f nrf52 --chiperase --reset --program ot-ncp-radio.hex
|
||||
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/ot-rcp ot-rcp.hex
|
||||
nrfjprog -f nrf52 --chiperase --reset --program ot-rcp.hex
|
||||
nrfjprog -f nrf52 --pinresetenable
|
||||
nrfjprog -f nrf52 --reset
|
||||
|
||||
@@ -70,8 +70,8 @@ EOF
|
||||
```sh
|
||||
# without USB=1 may result in failure for serial port issue
|
||||
make -f examples/Makefile-nrf52840 USB=1
|
||||
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/ot-ncp-radio ot-ncp-radio.hex
|
||||
nrfjprog -f nrf52 --chiperase --reset --program ot-ncp-radio.hex
|
||||
arm-none-eabi-objcopy -O ihex output/nrf52840/bin/ot-rcp ot-rcp.hex
|
||||
nrfjprog -f nrf52 --chiperase --reset --program ot-rcp.hex
|
||||
# plug the CDC serial USB port
|
||||
./output/posix/x86_64-unknown-linux-gnu/bin/ot-cli /dev/ttyACM0 115200
|
||||
```
|
||||
@@ -80,9 +80,9 @@ nrfjprog -f nrf52 --chiperase --reset --program ot-ncp-radio.hex
|
||||
|
||||
```sh
|
||||
make -f examples/Makefile-cc2538
|
||||
arm-none-eabi-objcopy -O binary output/cc2538/bin/ot-ncp-radio ot-ncp-radio.bin
|
||||
arm-none-eabi-objcopy -O binary output/cc2538/bin/ot-rcp ot-rcp.bin
|
||||
# see https://github.com/JelmerT/cc2538-bsl
|
||||
python cc2538-bsl/cc2538-bsl.py -b 460800 -e -w -v -p /dev/ttyUSB0 ot-ncp-radio.bin
|
||||
python cc2538-bsl/cc2538-bsl.py -b 460800 -e -w -v -p /dev/ttyUSB0 ot-rcp.bin
|
||||
./output/posix/x86_64-unknown-linux-gnu/bin/ot-cli /dev/ttyUSB0 115200
|
||||
```
|
||||
|
||||
@@ -94,7 +94,7 @@ Wpantund Support
|
||||
### With Simulation
|
||||
|
||||
```sh
|
||||
sudo wpantund -s 'system:./output/posix/x86_64-unknown-linux-gnu/bin/ot-ncp ./output/x86_64-unknown-linux-gnu/bin/ot-ncp-radio 1'
|
||||
sudo wpantund -s 'system:./output/posix/x86_64-unknown-linux-gnu/bin/ot-ncp ./output/x86_64-unknown-linux-gnu/bin/ot-rcp 1'
|
||||
```
|
||||
|
||||
### With Real Device
|
||||
@@ -116,7 +116,7 @@ can communicate with it by connecting to the socket. The protocol is OpenThread
|
||||
# build daemon mode core stack for POSIX
|
||||
make -f src/posix/Makefile-posix DAEMON=1
|
||||
# Daemon with simulation
|
||||
./output/posix/x86_64-unknown-linux-gnu/bin/ot-daemon ./output/x86_64-unknown-linux-gnu/bin/ot-ncp-radio 1
|
||||
./output/posix/x86_64-unknown-linux-gnu/bin/ot-daemon ./output/x86_64-unknown-linux-gnu/bin/ot-rcp 1
|
||||
# Daemon with real device
|
||||
./output/posix/x86_64-unknown-linux-gnu/bin/ot-daemon /dev/ttyACM0 115200
|
||||
# Built-in controller
|
||||
|
||||
@@ -263,16 +263,16 @@ class Node(object):
|
||||
_VERBOSE = False # defines the default verbosity setting (can be changed per `Node`)
|
||||
_SPEED_UP_FACTOR = 1 # defines the default time speed up factor
|
||||
|
||||
# path to `wpantund`, `wpanctl`, `ot-ncp-ftd`,`ot-ncp` and `ot-ncp-radio`
|
||||
# path to `wpantund`, `wpanctl`, `ot-ncp-ftd`,`ot-ncp` and `ot-rcp`
|
||||
_WPANTUND = '%s/sbin/wpantund' % _WPANTUND_PREFIX
|
||||
_WPANCTL = '%s/bin/wpanctl' % _WPANTUND_PREFIX
|
||||
|
||||
_OT_NCP_FTD = '%s/examples/apps/ncp/ot-ncp-ftd' % _OT_BUILDDIR
|
||||
_OT_NCP_FTD_POSIX_APP = '%s/src/posix/ot-ncp' % _OT_BUILDDIR
|
||||
_OT_NCP_RADIO = '%s/examples/apps/ncp/ot-ncp-radio' % _OT_BUILDDIR
|
||||
_OT_RCP = '%s/examples/apps/ncp/ot-rcp' % _OT_BUILDDIR
|
||||
|
||||
# Environment variable used to determine how to run OpenThread
|
||||
# If set to 1, then posix-app (`ot-ncp`) is used along with a posix RCP `ot-ncp-radio`.
|
||||
# If set to 1, then posix-app (`ot-ncp`) is used along with a posix RCP `ot-rcp`.
|
||||
# Otherwise, the posix NCP `ot-ncp-ftd` is used
|
||||
_POSIX_APP_ENV_VAR = 'TORANJ_POSIX_APP_RCP_MODEL'
|
||||
|
||||
@@ -305,7 +305,7 @@ class Node(object):
|
||||
|
||||
if self._use_posix_app_with_rcp:
|
||||
ncp_socket_path = 'system:{} -s {} {} {}'.format(self._OT_NCP_FTD_POSIX_APP, self._SPEED_UP_FACTOR,
|
||||
self._OT_NCP_RADIO, index)
|
||||
self._OT_RCP, index)
|
||||
else:
|
||||
ncp_socket_path = 'system:{} {} {}'.format(self._OT_NCP_FTD, index, self._SPEED_UP_FACTOR)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user