Ubuntu 13.10

As with every Ubuntu version, the upgrade is kind of broken.
* systemd doesn’t like hal anymore. Recommended procedurce: remove hal
* KDE has forgotten its sound configuration and preferes the HDMI port over the onboard sound.
* akonadi and apparmor don’t work together. I suggest to remove apparmor
* …to be continued.

Compiling the NXP Basic Function Library BFL on Linux

The BfL source of version 4.1/2 does not offer a build system for Linux.
Here is an automake Makefile.am:

AUTOMAKE_OPTIONS = foreign
AM_CFLAGS = -g -Wall
AM_CPPFLAGS = -I$(top_srcdir)/intfs/IphcsBflI3P4AAct/inc/ \
-I$(top_srcdir)/types \
-I$(top_srcdir)/intfs/IphcsBflI3P4/inc \
-I$(top_srcdir)/intfs/IphcsBflIo/inc \
-I$(top_srcdir)/intfs/IphcsBflRegCtl/inc \
-I$(top_srcdir)/intfs/IphcsBflBal/inc \
-I$(top_srcdir)/intfs/IphcsBflAux/inc \
-I$(top_srcdir)/intfs/IphcsBflOpCtl/inc \
-I$(top_srcdir)/intfs/IphcsBflNfc/inc/ \
-I$(top_srcdir)/intfs/IphcsBflIdMan/inc \
-I$(top_srcdir)/intfs/IphcsBflI3P3A/inc \
-I$(top_srcdir)/intfs/IphcsBflMfRd/inc/ \
-I$(top_srcdir)/intfs/IphcsBflPolAct/inc/ \
-D__int32_t_defined -D__int64_t_defined
AM_CXXFLAGS = -DPHFL_BFL_CPP
lib_LTLIBRARIES = libCBFL.la
libCBFL_la_SOURCES = \
comps/phcsBflI3P4AAct/src/phcsBflI3P4AAct.c \
comps/phcsBflOpCtl/src/phcsBflOpCtl_Hw1.c \
comps/phcsBflAux/src/phcsBflAux_Hw1.c \
comps/phcsBflIo/src/phcsBflIoHw1/phcsBflIo_Hw1.c \
comps/phcsBflNfc/src/phcsBflNfc_Target.c \
comps/phcsBflNfc/src/phcsBflNfc_Initiator.c \
comps/phcsBflIdMan/src/phcsBflIdMan.c \
comps/phcsBflI3P3A/src/phcsBflI3P3A_Hw1.c \
comps/phcsBflBal/src/phcsBflBal_Hw1SerLin.c \
comps/phcsBflMfRd/src/phcsBflMfRd.c \
comps/phcsBflRegCtl/src/phcsBflRegCtlSer/phcsBflRegCtl_SerHw1.c \
comps/phcsBflPolAct/src/phcsBflPolAct_Hw1.c \
comps/phcsBflI3P4/src/phcsBflI3P4_Pcd.c \
comps/phcsBflI3P4AAct/src/phcsBflI3P4AAct_Wrapper.cpp \
comps/phcsBflOpCtl/src/phcsBflOpCtl_Wrapper.cpp \
comps/phcsBflIo/src/phcsBflIo_Wrapper.cpp \
comps/phcsBflNfc/src/phcsBflNfc_TargetWrapper.cpp \
comps/phcsBflNfc/src/phcsBflNfc_InitiatorWrapper.cpp \
comps/phcsBflIdMan/src/phcsBflIdMan_Wrapper.cpp \
comps/phcsBflI3P3A/src/phcsBflI3P3A_Wrapper.cpp \
comps/phcsBflBal/src/phcsBflBal_Wrapper.cpp \
comps/phcsBflMfRd/src/phcsBflMfRd_Wrapper.cpp \
comps/phcsBflRegCtl/src/phcsBflRegCtl_Wrapper.cpp \
comps/phcsBflPolAct/src/phcsBflPolAct_Wrapper.cpp \
comps/phcsBflI3P4/src/phcsBflI3P4_PcdWrapper.cpp

And a standard configure.ac

AC_INIT([Bfl],[4.1])
AM_INIT_AUTOMAKE
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LIBTOOL
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Beware the BfL does not work on 64bit systems.

Linux, Sound and blacklist.conf

Forget about configuring your sound device with KDE.
It is just confusing and does not work as you intended most of the time.
Here two useful blacklist.conf entries:
Disable the onboard soundcard in favor of USB soundcard:

blacklist snd_hda_intel

Disable the HDMI output of your soundcard:

snd_hda_codec_hdmi

pavucontrol is a useful tool to mute speakers and adjust the balance

Formatting Dates in JExcel

Jexcel has an annoying Feature: It exports Dates always as UTC.
They have published some kind of workaround for reading Excelfiles, but it does not work for Writing Excel files.
My workaround:

TimeZone tz = TimeZone.getDefault();
int offset = tz.getOffset(date.getTime());
Calendar cal = new GregorianCalendar();
cal.setTime(date);
cal.add(Calendar.MILLISECOND, offset);
DateTime datetime = new DateTime(j,i, cal.getTime());
WritableCellFormat cf = new WritableCellFormat(df);
datetime.setCellFormat(cf);