NXP Zigbee JN516X JN517x JN518X 用vsCode studio 環(huán)境開發(fā)編譯
前言
官方推薦是用Beyond IDE開發(fā),不方便,搭建開發(fā)環(huán)境,安裝插件基本不是成功的。
i have a problem to install the plugin Zbee pro configuration editorwith sdk JN-4141
the version of beyond studio??is :?Build 1308sdk jn 4170 is :?Build Number 1745I've reinstalled it twice in the default path and on D drive, and it still doesn't work.when i install the plugin (ZB pro configuration edition 2.0.0), i have the message error :Cannot complete the install because one or more required items could not be found.Software being installed: NXP ZBPro Configuration Editor 2.0.0 (com.jennic.sdk.zbpro.external.feature.feature.group 2.0.0)
Missing requirement: ZBPro Config Edit Support 2.0.0 (com.jennic.zps.configeditor.edit 2.0.0) requires 'bundle org.eclipse.emf.edit 0.0.0' but it could not be found
Cannot satisfy dependency:
From: NXP ZBPro Configuration Editor 2.0.0 (com.jennic.sdk.zbpro.external.feature.feature.group 2.0.0)
To: com.jennic.zps.configeditor.edit [2.0.0]
準(zhǔn)備
安裝visual code studio(microsoft官網(wǎng)下載, 安裝過程過于簡單不再贅述)
安裝EIDE插件
下載SKD(JN516x---JN-SW4170,Jn517x---JN-SW-4270) 安裝后, 復(fù)制到NXP_JN工作目錄(比如E:bstudio_nxpworkspace),不用要中文, 路徑不能太深。
具體方法,請參考:【ZigBee 系列】|NXP-JN5169 ZigBee 3.0 開發(fā)環(huán)境搭建及編譯-谷動(dòng)谷力 (sunsili.com)
下載NXP Zigeeb工程源碼示例
( 參考:?NXP Zigbee JN5169 軟件開發(fā)流程-SDK下載 及 AN 介紹與 ..., 有鏈接 下載 相關(guān)的例程)
如下:
更多內(nèi)容請參閱:NXP Zigbee JN5169 軟件開發(fā)流程-SDK 及 AN 介紹與選擇-谷動(dòng)谷力 (sunsili.com)
實(shí)戰(zhàn)操作
解壓 源碼JN-AN-1219JN-AN-1219-Zigbee-3-0-Controller-and-Switch到NXP_JN工作目錄(比如E:bstudio_nxpworkspace),不用要中文, 路徑不能太深。與在剛才SDK存放在同一目錄。方便修改Makefile SDK 相對路徑。
在“資源資源管理器” -右鍵“用vsCode打開”
或用vsCode“文件”-“打開文件夾” 打開JN-AN-1219JN-AN-1219-Zigbee-3-0-Controller-and-Switch文件夾
打開Eide msys bash 終端
到子工程目錄下的build 下
輸入命令:
make JENNIC_CHIP=JN5169 JENNIC_CHIP_FAMILY=JN516x REMOTE=ColorSceneController DR=DR1199 TRACE=1 all
或修改Makefile
#User definable make parameters that may be overwritten from the command line
選擇芯片型號(hào)系列 板型 SDK
# Default target device is the JN5179
JENNIC_CHIP ?= JN5179??#芯片型號(hào)
JENNIC_CHIP_FAMILY ?= JN517x #系列
ifeq ($(JENNIC_CHIP_FAMILY),JN517x)
ENDIAN ?= LITTLE_ENDIAN
endif
ifeq ($(JENNIC_CHIP_FAMILY),JN516x)
JENNIC_SDK ?= JN-SW-4170
JENNIC_PCB ?= DEVKIT4
else
ifeq ($(JENNIC_CHIP_FAMILY),JN517x)
JENNIC_SDK ?= JN-SW-4270
JENNIC_PCB ?= DEVKIT5
endif
修改工程名(目標(biāo))# Application target name
TARGET = EH_Switch #工程名
CFLAGS += -DPDM_USER_SUPPLIED_ID
CFLAGS += -DPDM_NO_RTOS
CFLAGS +=??-DEH_Switch
PDM_BUILD_TYPE = _EEPROM
CFLAGS += -DPDM$(PDM_BUILD_TYPE)
修改Makefile
定位好SDK、工程路徑(沒配置好,編譯會(huì)報(bào)錯(cuò))
# Use if application directory contains single target
SDK_BASE_DIR? ?? ?? ?? ?= $(abspath ../../../../sdk/$(JENNIC_SDK))
APP_BASE? ?? ?? ?? ?? ? = $(abspath ..)
APP_BLD_DIR? ?? ?? ?? ? = $(APP_BASE)/Build
APP_SRC_DIR? ?? ?? ?? ? = $(APP_BASE)/Source
APP_COMMON_SRC_DIR? ?? ?= $(APP_BASE)/../Common/Source
MMAC_DIR? ?? ?? ?? ?? ? = $(APP_BASE)/../../Components/MMAC/Include
LIB_DIR? ?? ?? ?? ?? ???= $(APP_BASE)/../Components/Library
ZIGBEE_COMMON_SRC? ?? ? = $(COMPONENTS_BASE_DIR)/ZigbeeCommon/Source
make clean
編譯前先clean
make clean
編譯
make -j8(8線程,只要電腦支持線程多,比IDE編譯快多了)