I am trying to get the ZigBee Home Application Demo (JN-AN-1189) running on the JN516x-EK004 Evaluation Kit.
I downloaded BeyondStudio (JN-SW-4141) and the ZigBee HA SDK (JN-SW-4168) and
followed the instructions of the BeyondStudio User Guide (JN-UG-3098).
I installed them under C:\nxp\bstudio_nxp (default location) and downloaded the ZigBee Plug-ins as described in the guide.
Then I created a workspace (default workspace) and imported the JN-AN-1189-ZigBee-HA-Demo.
But when I tried to build it, I got 2 errors:
1. 'zps_msgMcpsDcfm' undeclared here (not in a function)
2. make: *** [/c/nxp/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/ColorDimmableLight/Build/zps_gen.o]
Error 1
Do I have to do any changes to the code or the settings to build it?
Hi Jerome,
Be sure that the example location is on the next path.
C:\NXP\bstudio_nxp\workspace\JN-AN-1189-ZigBee-HA-Demo
Please let me know your findings.
Best Regards,
Mario
Hi Mario
The Demo is located at C:\nxp\bstudio_nxp\workspace\JN-AN-1189-ZigBee-HA-Demo.
I realized that I am working with the JN-AN-1221 (ZigBee-HA-with-NFC), which gets renamed during the import to JN-AN-1189.
The actual JN-AN-1189-Demo didn't cause any errors, but i would prefer the 1221-Demo.
When I open the app_start.c file i get even more errors, all of them are: '...' could not be resolved.
The same happens also with other files.
Regards
Jerome
Hi Jerome,
The errors that are you seeing are because Eclipse can not link some files, But if you check on the log file the compilation process works well
I'm sorry for this misunderstanding
Regards,
Mario.
Hi Mario,
I'm not sure which log file you mean, the console output, the error log file (found under: Help > About BeyondStudio > Installation Details > View Error Log) or something else.
The problem is that the .bin files don't get created. When i delete the old ones, only .d and .o files get created.
The files when I build DimmableLight (manu_config.mk was copied from the old folder) :
Regards,
Jerome
Hi Jerome,
The JN-AN-1221 hasn't been updated to the last SDK version 1620.
If you go through the release notes
https://www.nxp.com/docs/en/supporting-information/JN-RN-0058.pdf?fsrch=1&sr=3&pageNum=1
So, You need to do some changes in the OS Config Diagram.
4.7.1 OS Configuration diagram update
A new message queue should be added to the ZBPro stack scope box, see below
4.7.2 Stack configurations
Remember: All references to sNtEntry.uAncAttrs.bfBitfields.u3Age should now be changed to sNtEntry.u8Age.
Please let me know if you have problems with the OS Config Diagram
Regards,
Mario
I would like to know how to open this graphical configuration page. I have encountered the same zps_msgMcpsDcfm problem
Hi Dirk,
Could you please create a new community post with the AN that you are working on and the SDK?
Regards,
Mario
Hi Mario,
I did the changes in the OS Config Diagram, but I still get these errors:
That's what the Config Diagram looks like:
I tried to build it after the changes and the .bin files still didn't get created.
Do I have to do this change with all OS Config Diagrams or just App_ZHA_Light_JN516x_NFC_rgb.oscfgdiag?
Regards,
Jerome
Hi Jerome,
Remember: Clean the project and be sure the ColorDimmableLight is set to active.
4.7.2 Stack configurations
Remember: All references to sNtEntry.uAncAttrs.bfBitfields.u3Age should now be changed to sNtEntry.u8Age.
app_zbp_utilities.c
DBG_vPrintf(TRACE_ZBP_UTILS, "SAddr: 0x%04x - ExtAddr: 0x%016llx - LQI: %i - Failed TX's: %i - Auth: %i - %i %i %i %i %i %i - Active: %i - %i %i %i\n",
thisNib->sTbl.psNtActv[i].u16NwkAddr,
ZPS_u64NwkNibGetMappedIeeeAddr(thisNet,thisNib->sTbl.psNtActv[i].u16Lookup),
thisNib->sTbl.psNtActv[i].u8LinkQuality,
thisNib->sTbl.psNtActv[i].u8TxFailed,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1Authenticated,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1DeviceType,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1ExpectAnnc,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1LinkStatusDone,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1PowerSource,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1RxOnWhenIdle,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1SecurityMode,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u1Used,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u2Relationship,
thisNib->sTbl.psNtActv[i].u8Age,
thisNib->sTbl.psNtActv[i].uAncAttrs.bfBitfields.u3OutgoingCost
);
Yes, You only have to change App_ZHA_Light_JN516x_NFC_rgb.oscfgdiag.
Regards,
Mario
Hi Mario,
It worked when I cleaned the Project and selected ColorDimmableLight.
But how can I build the other ones?
Regards,
Jerome
Hi Jerome,
You only have to select the example that you want and build it.
Regards,
Mario
Hi Mario,
I would like to run the DimmableLight and the DimmerSwitch example but both gave me back an error.
It seems like the ColorDimmableLight example is the only one working. I loaded it on a Carrier Board for testing, but I didn't get the Debugger running. I always get this two messages:
First I made sure that the .bin file is in the ColorDimmableLight Build folder.
In the BeyondStudio Installation and User Guide(JN-UG-3098) I read that you can download the binary file via USB, but the debugging happens via JTAG.
The Evaluation Kit doesn't include any adapter, so how can I debug an application?
Regards,
Jerome
Hi Jerome,
You have to edit all the OS Config Diagrams oscfgdiag files.
App_ZHA_Switch_JN516x.oscfgdiag
App_ZHA_Switch_JN516x_NFC.oscfgdiag
Regards,
Mario
Hi Mario,
After I edited the two oscfgdiag files, the DimmerSwitch example is working.
Unfortunately the DimmableLight example still causes errors, same with the DimmableLight - GP example.
make: *** [/c/nxp/bstudio_nxp/workspace/JN-AN-1189-ZigBee-HA-Demo/DimmableLight/Build/DimmableLight_JN5169_DR1175_LED_EXP_MONO_GP_NFC.elf] Error 1
It didn't generate the .bin files but a lot of .d and .o files
I tried if it helps when I also edit these oscfgdiag files:
App_ZHA_Light_JN516x_mono.oscfgdiag
App_ZHA_Light_JN516x_NFC_mono.oscfgdiag
App_Coordinator_JN516x.oscfgdiag
but without any success
Like already mentioned before I have problems with the debugger. I can download bin files via USB, but I don't get any debug messages and when I try to start the debugger I get a error message.
jerome.oehninger wrote:
I loaded it on a Carrier Board for testing, but I didn't get the Debugger running. I always get this two messages:
First I made sure that the .bin file is in the ColorDimmableLight Build folder.
In the BeyondStudio Installation and User Guide(JN-UG-3098) I read that you can download the binary file via USB, but the debugging happens via JTAG.
How does the debugger work? Do I need a special programmer to debug the program? I contemplabled to build one myself with the jn-rd-6021, but just if needed.
Regards,
Jerome
Hi Jerome,
I compiled the DimmableLight - GP example. successfully, what is the version that you are working on?
I downloaded the JN-AN-1189 (v1.15), this AN doesn't need any change, Are you working with the JN-AN-1221, aren't you?
Please take a look at JN516x JTAG Debugging in BeyondStudio
https://www.nxp.com/docs/en/application-note/JN-AN-1203.pdf
Hardware Requirements.
Best Regards,
Mario
Hi Mario,
Yes, I'm working with JN-AN-1221, version 1.2. I also don't have any problems with the JN-AN-1189.
So I have to buy one of these adaptors, I can't do it via USB? Would it also work if I build one by myself with the JN-RD-6021?
Do Debug Messages also only work with JTAG? I tried it with USB but I didn't receive anything.
EDIT:
When I tried again to build the DimmerSwitch today, it worked! I don't know why it worked this time and it generated hunderts of .d and .o files but also the .bin file.
Now I have all the needed examples, so I just have to get the debugger working and I should be fine.
Regards,
Jerome
Hi Jerome
So I have to buy one of these adaptors.
Unfortunately, This adaptor provides the proper configuration for the JN debugging.
I can't do it via USB? Would it also work if I build one by myself with the JN-RD-6021?
The adaptor is for serial debug purpose. For Example:
Change:
TRACE ?=1 (Line 193) to TRACE=1
Enable:
CFLAGS += -DDEBUG_START_UP
CFLAGS += -DDEBUG_LIGHT_NODE
CFLAGS += -DDEBUG_LIGHT_TASK
CFLAGS += -DDEBUG_JOIN
CFLAGS += -DDEBUG_COMMISSION
CFLAGS += -DDEBUG_BDB (Line 272)
The JN-RD-6021 The USB Programming Dongle (DR1128) provides a simple solution for programming a Flash memory device on a JN51xx-based application board using the standard JN51xx Flash Programmer tool
Regards,
Mario
Hi Mario,
In the documentation to the home automation examples (JN-AN-1221) in chapter 10.2.1 it is explained that with no further hardware debug messages can be seen.
I have uncommented line 99 (DEBUG ?=HW) in the Common_Switch/Build/Makefile and made sure that the DEBUG_PORT ?= UART0 is present. When building log shows twice "Building HW debug version ... ".
However I wasn't able to receive any messages so far. I have tried the eclipse in-build terminal as well as others.
How can these messages be seen?
Regards
Jerome
Hi Jerome,
I compiled the Dimmer Switch and modified the make file like this.
###############################################################################
# Debug options define DEBUG either HW or SW
#DEBUG ?=SW
#DEBUG ?=HW
#
# Define which UART to use for HW debug
DEBUG_PORT ?= UART0
...
...
###############################################################################
# Define TRACE to use with DBG module
TRACE =1
...
...
#CFLAGS += -DNXP_HARDWARE
#CFLAGS += -DDEBUG_EZMODE
#CFLAGS += -DDEBUG_ZCL
CFLAGS += -DDEBUG_CLD_ONOFF
CFLAGS += -DDEBUG_APP_BUTTON
CFLAGS += -DDEBUG_START_UP
CFLAGS += -DDEBUG_SWITCH_NODE
#CFLAGS += -DDEBUG_REMOTE_TASK
CFLAGS += -DDEBUG_SCAN
CFLAGS += -DDEBUG_JOIN
CFLAGS += -DDEBUG_COMMISSION
CFLAGS += -DDEBUG_SWITCH_STATE
#CFLAGS += -DDEBUG_CIRCULAR_ROUTE
#CFLAGS += -DDEBUG_APP_OTA
CFLAGS += -DOTA_DEMO_BUILD=TRUE
Serial Debug
Regards,
Mario
Hi Mario,
I have another question:
I wanted to test a board mounted with a JN5164. The programmer detected the chip I could download the DimmerSwitch example without any problems. But after the download it seemd like the chip is destroyed. The programmer didn't detect it anymore and the current consumption was much higher.
What could have caused this problem?
I know that the examples are for the JN5168/69 but I thought that wouldn't be a big problem. Before the download a warning appeared, that it wouldn't be the right chip for this program (I don't remeber the exact content).
Can i use the examples to develop an application for a JN5164?
I saw that the used chip is defined in the makefiles, does it help when i change these to JN5164?
Regards,
Jerome