Using BeyondStudio for NXP JN5169 I can't seem to get set up to access function ZPS_u64AplZdoGetIeeeAddr() so I can extract the MAC address.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using BeyondStudio for NXP JN5169 I can't seem to get set up to access function ZPS_u64AplZdoGetIeeeAddr() so I can extract the MAC address.

1,650 Views
rrichardson
Contributor II

I am following "JN-AN-1172-JN516x-Customer-Module-Evaluation-Tool" as an initial basis for my application.  I have the following includes:

#include <AppHardwareApi.h>
#include <JPT.h>

When I try to compile and link the following command:

mac = ZPS_u64AplZdoGetIeeeAddr(); //Get device MAC address

I get the following linker messages for the resulting error:

C:\Users\RRICHA~1\AppData\Local\Temp\ccKiZs35.ltrans1.ltrans.o: In function `AppColdStart':
ccKiZs35.ltrans1.o:(.text+0x104): undefined reference to `ZPS_u64AplZdoGetIeeeAddr'
ccKiZs35.ltrans1.o:(.text+0x104): relocation truncated to fit: R_BA_18_PCREL against undefined symbol `ZPS_u64AplZdoGetIeeeAddr'
collect2.exe: error: ld returned 1 exit status
make: *** [AN1172_CustomerModuleEvalTool_JN5169.elf] Error 1

What am I missing in the setup to be able to access this function?

Labels (3)
0 Kudos
5 Replies

1,461 Views
rrichardson
Contributor II

RESOLVED ISSUE:  I found the resolution for this problem.  It is very simple, but hard to find.  With my current setup, the 64-bit MAC address for the NXP JN5169 IC is read directly as follows:  "mac = u64JPT_MacAddress;".  Hope this helps someone else having the same issue.  Thanks to those who offered suggestions along the way. Note that the "ZPS_u64AplZdoGetIeeeAddr();" function is not used in this development environment.

1,461 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Could you please check this thread? I believe this it's just what you are looking for, if you still have questions, just let me know. 

Regards, 

Estephania

0 Kudos

1,461 Views
rrichardson
Contributor II

Estephania,

I had already found the link you sent me to.  It tells how to code the ZPS_u64AplZdoGetIeeeAddr instruction into my application, but it does not tell me how to set up BeyondStudio and which #include files are needed to access the ZPS_u64AplZdoGetIeeeAddr instruction.  The issue I have is that the linker is not finding the instruction.  If you can help me to get the development environment to find the instruction I would be most appreciative.  

1) I need to know what SKD is needed to access the ZPS_u64AplZdoGetIeeeAddr instruction

2) I need to know if #include files are needed to reference external files.

Thanks,

Randy

0 Kudos

1,461 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Randy,

The ZPS_u64AplZdoGetIeeeAddr  is part of the Zigbee Stack, it that the reason why you are getting the error message.

You are working on the JN-AN-1172 example, the SDK that it needs is the JN-SW-4163 IEEE 802.15.4.

I recommend looking at the MAC_ExtAddr_s, mac_sap_MiniMac.h

/**
 * @brief Structure for MLME-ASSOCIATE.response
 *
 * Association response. Use type MAC_MLME_RSP_ASSOCIATE
 */
typedef struct
{
    MAC_ExtAddr_s          sDeviceAddr;          /**< Device's extended address */
    uint16                 u16AssocShortAddr;    /**< Short address allocated to Device */
    uint8                  u8Status;             /**< Status of association */
    uint8                  u8SecurityEnable;     /**< True if security is to be used on command frames 2003*/
    MAC_SecurityData_s     sSecurityData;        /**< 2006 security*/
} MAC_MlmeRspAssociate_s;

Hope it helps.

Regards,

Mario

0 Kudos

1,461 Views
rrichardson
Contributor II

Mario,

I entered the structure you sent below. My development system did not locate 'MAC_ExtAddr_s' or 'MAC_SecurityData_s'. The following compiler error messages occurred:

c:/NXP/bstudio_nxp/workspace/JN-AN-1172-JN516x-Customer-Module-Evaluation-Tool/AN1172_CustomerModuleEvalTool/Source/AN1172_CustomerModuleEvalTool.c:150:3: error: unknown type name 'MAC_ExtAddr_s'

c:/NXP/bstudio_nxp/workspace/JN-AN-1172-JN516x-Customer-Module-Evaluation-Tool/AN1172_CustomerModuleEvalTool/Source/AN1172_CustomerModuleEvalTool.c:154:6: error: unknown type name 'MAC_SecurityData_s'

Do I need to have some #include statements to help the compiler locate these types?

I also do not know how to call this structure to get the actual MAC address in my code. I would need to make some sort of call to get data into the structured variable. Can you give an example of how this is done?

Thanks,

Randy Richardson, P.E.

DPI-IPG Division Manager

801-747-0723 (office) 801-824-7736 (mobile)

250 West Berger Lane, Salt Lake City UT 84107

877-838-0534 801-270-2140 Fax: 801-281-2880

www.drillingproductsinc.com<http://www.drillingproductsinc.com/>;

0 Kudos