PN7150 NFC Controller on SabreSD 6q evk running Android 8.0

cancel
Showing results for 
Search instead for 
Did you mean: 

PN7150 NFC Controller on SabreSD 6q evk running Android 8.0

131 Views
Contributor I

Hello,

   We want to porting PN7150 with Android Oreo 8.0 on iMX6q Sabre SD board.below is my steps

  1. follow this link IMX_O8.0.0_1.0.0_ANDROID_SOURCE  to download android 8.0 BSP and establish development environment.
  2. select sabresd_6dq platform, then build image to make sure android image is generated without problem.
  3. Follow Document AN11690 https://www.nxp.com/docs/en/application-note/AN11690.pdf  "NXP NCI Android Porting Guidelines"'a chapter 3.3 Android Oreo 's every step to download NXP NFC package then patch to our Android 8.0 environment.
  4. follow chapter 3.3.4 adding NFC configuration to sabresd_6dq platform
  5. build sabresd_6dq again.

   

   But it will be stop on this error.

packages/apps/Nfc/nci/jni/extns/pn54x/src/utils/phNxpConfig.cpp:1025:10: error: duplicate case value '4'
    case sizeof(unsigned int):
         ^
packages/apps/Nfc/nci/jni/extns/pn54x/src/utils/phNxpConfig.cpp:1022:10: note: previous case defined here
    case sizeof(unsigned long):
         ^
1 error generated.

   I check file packages/apps/Nfc/nci/jni/extns/pn54x/src/utils/phNxpConfig.cpp

extern "C" int GetNxpNumValue (const char* name, void* pValue, unsigned long len)
{

......

....

..

.
    switch (len)
    {
    case sizeof(unsigned long):
        *(static_cast<unsigned long*>(pValue)) = (unsigned long) v;
        break;
    case sizeof(unsigned int):
        *(static_cast<unsigned int*>(pValue)) = (unsigned int) v;
        break;
    case sizeof(unsigned short):
        *(static_cast<unsigned short*>(pValue)) = (unsigned short) v;
        break;
    case sizeof(unsigned char):
        *(static_cast<unsigned char*> (pValue)) = (unsigned char) v;
        break;
    default:
        return false;
    }
    return true;
}

     Compiler think "unsigned int" and "unsigned long" 's size are same is 4, so compile stop. It seem this NXP NFC package is for 64-bit soc, not for 32-bit soc. Unfortunately imx6 CPU is 32 bit.

      Does anyone ever tried this NXP NFC package with Android Oreo 8.0 on 32 bit SOC platform?

Thanks.

0 Kudos
1 Reply

43 Views
NXP TechSupport
NXP TechSupport

The NFC package is for 8.1.0. That may not match your 8.0.

Android Pie support i.MX6Q. You may use the Android 9.0 (version P9.0.0_2.2.0) for i.MX6Q.

You can download it from here:

i.MX Software and Development Tools | NXP 

(Android P9.0.0_2.2.0 (4.14.98 kernel) Supports i.MX 6QuadPlus, i.MX 6Quad, i.MX 6DualLite, i.MX 6SoloX, i.MX 7Dual, i.MX7UL)

The use the NFC GitHub - NXPNFCLinux/nxpnfc_android_pie: Android patches for support of PN7150 NCI based NXP NFC Con... 

For your reference : https://community.nxp.com/docs/DOC-342420 

0 Kudos