Skip to content

Commit

Permalink
R2.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeslin committed Jun 13, 2017
1 parent c601fdd commit 39d2fe6
Show file tree
Hide file tree
Showing 44 changed files with 6,605 additions and 74 deletions.
171 changes: 165 additions & 6 deletions Makefile.am
Expand Up @@ -3,10 +3,15 @@ lib_LTLIBRARIES = libnfc_nci_linux.la
sbin_PROGRAMS = nfcDemoApp
nfcDemoApp_DEPENDENCIES = libnfc_nci_linux.la

LDFLAGS = -Bstatic
AM_LDFLAGS = $(LDFLAGS) -Bstatic

if LLCP1_3
LDFLAGS += -L$(openssldir)/lib -lcrypto -lssl
AM_LDFLAGS += -L$(openssldir)/lib -lcrypto -lssl
endif

if ABEND
lib_LTLIBRARIES += libARMBoard.la
libnfc_nci_linux_la_DEPENDENCIES = libARMBoard.la
endif

nfcDemoApp_FLAGS = -I$(srcdir)/demoapp -I$(srcdir)/src/include
Expand All @@ -21,9 +26,23 @@ if LLCP1_3
AM_CPPFLAGS += \
-I$(openssldir)/include
endif

if LPCUSBSIO
AM_LDFLAGS += `pkg-config libudev --libs`
endif

if ABEND
AM_CPPFLAGS += \
$(libARMBoard_la_FLAGS)
endif

configdir = ${sysconfdir}

if LPCUSBSIO
udevrules_DATA = src/halimpl/pn54x/tml/lpcusbsio/97-lpcusbsio-hid.rules
udevrulesdir = /etc/udev/rules.d
endif

if PN7120
config_DATA = conf/PN7120/libnfc-brcm.conf conf/PN7120/libnfc-nxp.conf
endif
Expand Down Expand Up @@ -120,6 +139,7 @@ LIBNFC_NCI_SOURCE := \
src/libnfc-nci/adaptation/android_logmsg.cpp \
src/libnfc-nci/adaptation/CrcChecksum.cpp

if I2C
HALIMPL_INCLUDE := \
src/halimpl/include \
src/halimpl/pn54x/utils \
Expand All @@ -129,13 +149,61 @@ HALIMPL_INCLUDE := \
src/halimpl/pn54x/hal \
src/halimpl/pn54x/log \
src/halimpl/pn54x/tml \
src/halimpl/pn54x/tml/i2c \
src/halimpl/pn54x/core \
src/halimpl/pn54x/self-test

HALIMPL_SOURCE := \
src/halimpl/pn54x/tml/phDal4Nfc_messageQueueLib.c \
src/halimpl/pn54x/tml/phOsalNfc_Timer.c \
src/halimpl/pn54x/tml/i2c/phTmlNfc_i2c.c \
src/halimpl/pn54x/tml/i2c/phTmlNfc.c \
src/halimpl/pn54x/dnld/phNxpNciHal_Dnld.c \
src/halimpl/pn54x/dnld/phDnldNfc_Internal.c \
src/halimpl/pn54x/dnld/phDnldNfc.c \
src/halimpl/pn54x/dnld/phDnldNfc_Utils.c \
src/halimpl/pn54x/log/phNxpLog.c \
src/halimpl/pn54x/self-test/phNxpNciHal_SelfTest.c \
src/halimpl/pn54x/hal/phNxpNciHal_NfcDepSWPrio.c \
src/halimpl/pn54x/hal/phNxpNciHal_dta.c \
src/halimpl/pn54x/hal/phNxpNciHal_ext.c \
src/halimpl/pn54x/hal/phNxpNciHal_Kovio.c \
src/halimpl/pn54x/hal/phNxpNciHal.c \
src/halimpl/pn54x/utils/phNxpNciHal_utils.c \
src/halimpl/pn54x/utils/phNxpConfig.cpp
endif

if LPCUSBSIO
HALIMPL_INCLUDE := \
src/halimpl/include \
src/halimpl/pn54x/utils \
src/halimpl/pn54x/inc \
src/halimpl/pn54x/common \
src/halimpl/pn54x/dnld \
src/halimpl/pn54x/hal \
src/halimpl/pn54x/log \
src/halimpl/pn54x/tml \
src/halimpl/pn54x/tml/lpcusbsio \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio \
src/halimpl/pn54x/tml/lpcusbsio/hid \
src/halimpl/pn54x/core \
src/halimpl/pn54x/self-test

HALIMPL_SOURCE := \
src/halimpl/pn54x/tml/phDal4Nfc_messageQueueLib.c \
src/halimpl/pn54x/tml/phTmlNfc_i2c.c \
src/halimpl/pn54x/tml/phTmlNfc.c \
src/halimpl/pn54x/tml/phOsalNfc_Timer.c \
src/halimpl/pn54x/tml/lpcusbsio/phTmlNfc.c \
src/halimpl/pn54x/tml/lpcusbsio/phTmlNfc_lpcusbsio.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/lpcusbsio.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Allocator.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Container.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_log.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Map.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_mutex.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Parcel.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_thread.c \
src/halimpl/pn54x/tml/lpcusbsio/lpcusbsio/framework_Timer.c \
src/halimpl/pn54x/tml/lpcusbsio/hid/hid.c \
src/halimpl/pn54x/dnld/phNxpNciHal_Dnld.c \
src/halimpl/pn54x/dnld/phDnldNfc_Internal.c \
src/halimpl/pn54x/dnld/phDnldNfc.c \
Expand All @@ -149,6 +217,85 @@ HALIMPL_SOURCE := \
src/halimpl/pn54x/hal/phNxpNciHal.c \
src/halimpl/pn54x/utils/phNxpNciHal_utils.c \
src/halimpl/pn54x/utils/phNxpConfig.cpp
endif

if ABEND
HALIMPL_INCLUDE := \
src/halimpl/include \
src/halimpl/pn54x/utils \
src/halimpl/pn54x/inc \
src/halimpl/pn54x/common \
src/halimpl/pn54x/dnld \
src/halimpl/pn54x/hal \
src/halimpl/pn54x/log \
src/halimpl/pn54x/tml \
src/halimpl/pn54x/tml/abend \
src/halimpl/pn54x/tml/abend/abend \
src/halimpl/pn54x/tml/abend/LibRpc/inc \
src/halimpl/pn54x/core \
src/halimpl/pn54x/tml/abend/tools/ \
src/halimpl/pn54x/tml/abend/tools/portinglayer/linux/ \
src/halimpl/pn54x/self-test

HALIMPL_SOURCE := \
src/halimpl/pn54x/tml/phDal4Nfc_messageQueueLib.c \
src/halimpl/pn54x/tml/phOsalNfc_Timer.c \
src/halimpl/pn54x/tml/abend/phTmlNfc_Abend.cpp \
src/halimpl/pn54x/tml/abend/phTmlNfc.cpp \
src/halimpl/pn54x/tml/abend/tools/core/WaiterNotifier.cpp \
src/halimpl/pn54x/tml/abend/tools/core/Locker.cpp \
src/halimpl/pn54x/tml/abend/tools/core/Verbose.cpp \
src/halimpl/pn54x/tml/abend/tools/core/ThreadedObject.cpp \
src/halimpl/pn54x/tml/abend/tools/portinglayer/linux/OSThread.cpp \
src/halimpl/pn54x/tml/abend/tools/portinglayer/linux/MiscPort.cpp \
src/halimpl/pn54x/tml/abend/tools/portinglayer/linux/OSVerbose.cpp \
src/halimpl/pn54x/tml/abend/tools/portinglayer/linux/AllocatorsPF.cpp \
src/halimpl/pn54x/tml/abend/tools/portinglayer/linux/OSLocker.cpp \
src/halimpl/pn54x/dnld/phNxpNciHal_Dnld.c \
src/halimpl/pn54x/dnld/phDnldNfc_Internal.c \
src/halimpl/pn54x/dnld/phDnldNfc.c \
src/halimpl/pn54x/dnld/phDnldNfc_Utils.c \
src/halimpl/pn54x/log/phNxpLog.c \
src/halimpl/pn54x/self-test/phNxpNciHal_SelfTest.c \
src/halimpl/pn54x/hal/phNxpNciHal_NfcDepSWPrio.c \
src/halimpl/pn54x/hal/phNxpNciHal_dta.c \
src/halimpl/pn54x/hal/phNxpNciHal_ext.c \
src/halimpl/pn54x/hal/phNxpNciHal_Kovio.c \
src/halimpl/pn54x/hal/phNxpNciHal.c \
src/halimpl/pn54x/utils/phNxpNciHal_utils.c \
src/halimpl/pn54x/utils/phNxpConfig.cpp

libARMBoard_la_INCLUDE := \
src/halimpl/pn54x/tml/abend/LibRpc/inc \
src/halimpl/pn54x/tml/abend/LibRpc/src \
src/halimpl/pn54x/tml/abend/LibRpc/src/AddOn \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen

libARMBoard_la_SOURCES := \
src/halimpl/pn54x/tml/abend/LibRpc/src/phRpc_D.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/phRpc_H.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/phRpc_H_2.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/phRpc_H_Common.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/phRpc_H_Diversity.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/phRpc_HostIo.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/phRpc_UFn.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/AddOn/AddOn.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/AddOn/phSwId.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_DeviceDeSerialiser.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_DeviceDeSerialiser_2.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_DeviceSerialiser.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_DeviceSerialiser_2.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_HostCtx.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_HostDeSerialiser.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_HostDeSerialiser_2.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_HostSerialiser.c \
src/halimpl/pn54x/tml/abend/LibRpc/src/gen/phRpc_HostSerialiser_2.c

libARMBoard_la_LDFLAGS = -shared

libARMBoard_la_FLAGS = -DBUILDCFG=1 -DTESTSUITE -DPH_RPC_H_PLAT_LINUX___ $(libARMBoard_la_INCLUDE:%=-I$(srcdir)/%)

endif

SERVICE_INCLUDE := \
src/service/interface \
Expand Down Expand Up @@ -202,6 +349,18 @@ libnfc_nci_linux_la_FLAGS += -DPN547C2=1
libnfc_nci_linux_la_FLAGS += -DPN548C2=2
libnfc_nci_linux_la_FLAGS += -DPN551C2=3

if LPCUSBSIO
libnfc_nci_linux_la_FLAGS += -DPHFL_TML_LPCUSBSIO
endif

if ABEND
libnfc_nci_linux_la_FLAGS += -DPHFL_TML_ABEND
endif

if ALT
libnfc_nci_linux_la_FLAGS += -DPHFL_TML_ALT_NFC
endif

libnfc_nci_linux_la_FLAGS += -pthread -w -g
libnfc_nci_linux_la_FLAGS += -DNFC_NXP_NOT_OPEN_INCLUDED=TRUE
libnfc_nci_linux_la_FLAGS += -DNXP_HW_SELF_TEST
Expand All @@ -225,11 +384,11 @@ libnfc_nci_linux_la_FLAGS += -DPH_NCI_NXP_HAL_ENABLE_FW_DOWNLOAD=FALSE
endif

libnfc_nci_linux_la_LIBADD = $(AC_LIBOBJS)
libnfc_nci_linux_la_LDFLAGS :=
libnfc_nci_linux_la_LDFLAGS := $(AM_LDFLAGS)
libnfc_nci_linux_la_LDFLAGS +=-DPN547C2=1
libnfc_nci_linux_la_LDFLAGS +=-DPN548C2=2
libnfc_nci_linux_la_LDFLAGS +=-DPN551C2=3
libnfc_nci_linux_la_LDFLAGS += -shared -pthread -ldl -lrt -fPIC -release 1 -versionnfo 0:0:0
libnfc_nci_linux_la_LDFLAGS += -shared -pthread -ldl -lrt -fPIC -release 1 -version-info 0:0:0

nfcDemoApp_LDFLAGS = -pthread -ldl -lrt -lnfc_nci_linux

Expand Down
10 changes: 6 additions & 4 deletions README.md
Expand Up @@ -4,16 +4,18 @@ Linux NFC stack for NCI based NXP NFC Controllers.

Information about NXP NFC Controller can be found on [NXP website](http://www.nxp.com/products/identification_and_security/nfc_and_reader_ics/nfc_controller_solutions/#overview).

Further details about the stack [here](https://github.com/NXPNFCLinux/linux_libnfc-nci/blob/master/doc/AN11697%20-%20PN71x0%20Linux%20Software%20Stack%20Integration%20Guidelines.pdf).
Further details about the stack [here](http://www.nxp.com/documents/application_note/AN11697.pdf).

Release version
---------------
R2.1 includes support for PN7150 NFC Controller IC and some bug fixes (refer to the [documentation](https://github.com/NXPNFCLinux/linux_libnfc-nci/blob/master/doc/AN11697%20-%20PN71x0%20Linux%20Software%20Stack%20Integration%20Guidelines.pdf) for more details).
R2.2 includes support for altenartive to pn5xx_i2c kernel driver and some bug fixes (refer to the [documentation](http://www.nxp.com/documents/application_note/AN11697.pdf) for more details).

R2.0 includes LLCP1.3 support and some bug fixes (refer to the [documentation](https://github.com/NXPNFCLinux/linux_libnfc-nci/blob/master/doc/AN11697%20-%20PN71x0%20Linux%20Software%20Stack%20Integration%20Guidelines.pdf) for more details).
R2.1 includes support for PN7150 NFC Controller IC and some bug fixes (refer to the [documentation](http://www.nxp.com/documents/application_note/AN11697.pdf) for more details).

R2.0 includes LLCP1.3 support and some bug fixes (refer to the [documentation](http://www.nxp.com/documents/application_note/AN11697.pdf) for more details).

R1.0 is the first official release of Linux libnfc-nci stack

Possible problems, known errors and restrictions of R2.1:
Possible problems, known errors and restrictions of R2.2:
---------------------------------------------------------
LLCP1.3 support requires OpenSSL Cryptography and SSL/TLS Toolkit (version 1.0.1j or later)
7 changes: 4 additions & 3 deletions conf/PN7150/libnfc-nxp.conf
Expand Up @@ -107,7 +107,7 @@ NXP_CORE_CONF={ 20, 02, 2B, 0D,
###############################################################################
# RF configuration settings
# Below settings relates to OM5578 demo kit RF performance optimization
NXP_RF_CONF_BLK_1={ 20, 02, A3, 13,
NXP_RF_CONF_BLK_1={20, 02, B7, 14,
A0, 0D, 06, 04, 35, 90, 01, F4, 01,
A0, 0D, 06, 06, 44, 01, 90, 03, 00,
A0, 0D, 06, 06, 30, B0, 01, 10, 00,
Expand All @@ -126,5 +126,6 @@ NXP_RF_CONF_BLK_1={ 20, 02, A3, 13,
A0, 0D, 06, 44, 42, 88, 00, FF, FF,
A0, 0D, 06, 56, 2D, 05, 9F, 0C, 00,
A0, 0D, 06, 54, 42, 88, 00, FF, FF,
A0, 0D, 06, 0A, 33, 80, 86, 00, 70
}
A0, 0D, 06, 0A, 33, 80, 86, 00, 70,
A0, 1D, 11, 57, 33, 14, 17, 00, AA, 85, 00, 80, 55, 2A, 04, 00, 63, 00, 00, 00
};
82 changes: 79 additions & 3 deletions configure.ac
Expand Up @@ -72,6 +72,60 @@ AC_ARG_ENABLE([llcp1_3],
*) AC_MSG_ERROR([bad value ${enableval} for --enable-llcp1_3]) ;;
esac],[llcp1_3=false])

AC_ARG_ENABLE([abend],
[ --enable-abend set TML to ABEND],
[case "${enableval}" in
yes) abend=true ;;
no) abend=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-abend]) ;;
esac],[abend=false])

AC_ARG_ENABLE([lpcusbsio],
[ --enable-lpcusbsio set TML to LPCUSBSIO],
[case "${enableval}" in
yes) lpcusbsio=true ;;
no) lpcusbsio=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-lpcusbsio]) ;;
esac],[lpcusbsio=false])

AC_ARG_ENABLE([i2c],
[ --enable-i2c set TML to I2C],
[case "${enableval}" in
yes) i2c=true ;;
no) i2c=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-i2c]) ;;
esac],[i2c=false])

AC_ARG_ENABLE([alt],
[ --enable-alt set TML to ALT],
[case "${enableval}" in
yes) alt=true ;;
no) alt=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-alt]) ;;
esac],[alt=false])

AM_CONDITIONAL([TML_SEL_NOK], [
COUNT=0
if [ "$abend" = "true" ]; then
((COUNT++))
fi
if [ "$lpcusbsio" = "true" ]; then
((COUNT++))
AM_CONDITIONAL([LPCUSBSIO], [PKG_CHECK_MODULES([UDEV], [libudev],
[AC_MSG_NOTICE([libudev present])],
[AC_MSG_ERROR([libudev not present but required for lpcusbsio configuration. Install it for the given target (for instance using 'apt-get install libudev-dev' command) then run configure again])]
)])
fi
if [ "$alt" = "true" ]; then
((COUNT++))
fi
if [ "$i2c" = "true" ]; then
((COUNT++))
fi
if [test "$COUNT" -gt 1]; then
AC_MSG_ERROR(Can not enable multiple tml)
fi])

AM_CONDITIONAL([CHIP_SEL_NOK], [
COUNT=0
if [ "$pn7150" = "true" ]; then
Expand All @@ -95,6 +149,20 @@ else
AC_MSG_NOTICE([LLCP1.3 support is disabled (no secure P2P)])
fi])

AM_CONDITIONAL([TML_SEL_ONE], [if [$abend]; then
AC_MSG_NOTICE([Selected TML is ABEND])
elif [$alt]; then
AC_MSG_NOTICE([Selected TML is ALT])
i2c=true
elif [$lpcusbsio]; then
AC_MSG_NOTICE([Selected TML is LPCUSBSIO])
elif [$i2c]; then
AC_MSG_NOTICE([Selected TML is I2C])
else
AC_MSG_NOTICE([Selected TML is I2C])
i2c=true
fi])

AM_CONDITIONAL([CHIP_SEL_ONE], [if [$pn7150]; then
AC_MSG_NOTICE([Selected chip type is PN7150])
elif [$pn7120]; then
Expand All @@ -104,10 +172,18 @@ AC_MSG_NOTICE([Selected chip type is PN7120])
pn7120=true
fi])

AM_CONDITIONAL([LLCP1_3], [test x$llcp1_3 = xtrue])
AM_CONDITIONAL([LLCP1_3], [test x$llcp1_3 = xtrue])

AM_CONDITIONAL([ABEND], [test x$abend = xtrue])

AM_CONDITIONAL([LPCUSBSIO], [test x$lpcusbsio = xtrue])

AM_CONDITIONAL([I2C], [test x$i2c = xtrue])

AM_CONDITIONAL([ALT], [test x$alt = xtrue])

AM_CONDITIONAL([PN7150], [test x$pn7150 = xtrue])
AM_CONDITIONAL([PN7150], [test x$pn7150 = xtrue])

AM_CONDITIONAL([PN7120], [test x$pn7120 = xtrue])
AM_CONDITIONAL([PN7120], [test x$pn7120 = xtrue])

AC_OUTPUT

0 comments on commit 39d2fe6

Please sign in to comment.