Skip to content
This repository was archived by the owner on Nov 19, 2022. It is now read-only.

Commit 845e6c6

Browse files
committed
Externalize OpenThread build dependency option into boards.txt
1 parent c469b83 commit 845e6c6

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ nrf52840_pca10056.build.variant=nrf52840_pca10056
2323
nrf52840_pca10056.menu.network.802154=IEEE802.15.4
2424
nrf52840_pca10056.menu.network.802154.build.network_conf=-DOVERLAY_APPEND_NETWORK={runtime.platform.path}/variants/{build.variant}/overlay-802154.conf
2525
nrf52840_pca10056.menu.network.ot=OpenThread
26-
nrf52840_pca10056.menu.network.ot.build.network_conf=-DOVERLAY_APPEND_NETWORK={runtime.platform.path}/variants/{build.variant}/overlay-ot.conf -DDEPENDENCY_APPEND_OT=ot
26+
nrf52840_pca10056.menu.network.ot.build.network_conf=-DOVERLAY_APPEND_NETWORK={runtime.platform.path}/variants/{build.variant}/overlay-ot.conf -DDEPENDENCY_APPEND_OT=ot -DEXTERNAL_PROJECT_PATH_OPENTHREAD={build.system.path}/openthread
2727
nrf52840_pca10056.menu.network.bt=Bluetooth
2828
nrf52840_pca10056.menu.network.bt.build.network_conf=-DOVERLAY_APPEND_NETWORK={runtime.platform.path}/variants/{build.variant}/overlay-bt.conf
2929
nrf52840_pca10056.menu.uartlog.enable=Enable

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ build.zephyr.env.compiler=ZEPHYR_TOOLCHAIN_VARIANT=zephyr ZEPHYR_SDK_INSTALL_DIR
3333
build.zephyr.env.compiler.macosx=ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb GNUARMEMB_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi
3434
build.zephyr.env=ZEPHYR_BASE={build.system.path}/zephyr {build.zephyr.env.compiler}
3535
build.zephyr.args.arduino=-DARDUINO_BUILD_PATH={build.path} -DARDUINO_VARIANT_PATH={build.variant.path} -DARDUINO_PREPROC_SOURCE={source_file} -DARDUINO_PREPROC_TARGET={preprocessed_file_path}
36-
build.zephyr.args.board=-DBOARD={build.variant} -DEXTERNAL_PROJECT_PATH_OPENTHREAD={build.system.path}/openthread
36+
build.zephyr.args.board=-DBOARD={build.variant}
3737
build.zephyr.args.configs={build.network_conf} {build.uartlog_conf}
3838
build.zephyr.args={build.zephyr.args.arduino} {build.zephyr.args.board} {build.zephyr.args.configs}
3939
intiki.cmd={runtime.tools.intiki.path}/intiki

system/support/build.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,18 @@ if(NOT WIN32)
5656
endif()
5757
endif()
5858

59+
if(NOT ${EXTERNAL_PROJECT_PATH_OPENTHREAD} STREQUAL "")
60+
set(external_ot_path -DEXTERNAL_PROJECT_PATH_OPENTHREAD=${EXTERNAL_PROJECT_PATH_OPENTHREAD})
61+
else()
62+
set(external_ot_path "")
63+
endif()
64+
5965
if(EXISTS ${build_dir}/_cmakefile/.NOT_CHANGED )
6066
file(REMOVE ${build_dir}/_cmakefile/.NOT_CHANGED )
6167
else()
6268
if("${ARDUINO_PREPROC_TARGET}" STREQUAL "{preprocessed_file_path}")
6369
execute_process(
64-
COMMAND ${CMAKE_COMMAND} -GNinja -DBOARD=${BOARD} -DCONF_FILE=${conffile_opt} -DEXTERNAL_PROJECT_PATH_OPENTHREAD=${EXTERNAL_PROJECT_PATH_OPENTHREAD} ${preproc_flag} -DARDUINO_EXTRA_DEPENDENCIES=${extradeps_opt} _cmakefile
70+
COMMAND ${CMAKE_COMMAND} -GNinja -DBOARD=${BOARD} -DCONF_FILE=${conffile_opt} ${external_ot_path} ${preproc_flag} -DARDUINO_EXTRA_DEPENDENCIES=${extradeps_opt} _cmakefile
6571
WORKING_DIRECTORY ${build_dir}
6672
)
6773
else()

0 commit comments

Comments
 (0)