AMD64 Debian Wheezy Linux Installation Procedure

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

AMD64 Debian Wheezy Linux Installation Procedure

819 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by paul.rcom-software.com on Tue May 20 22:08:41 MST 2014
LPCXpresso Installation Instructions

These instructions are specific to the AMD64 Debian Wheezy Linux OS
with the LCP4088 Development Kit and the LPC-Link2 debugging module.

GENERAL PREPARATION
-------------------

* Basic multi-architecture setup. (i.e. Should be done at installation.)

dpkg add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 \
libncurses5:i386

apt-get install preload
apt-get install libc6-dev-amd64

* Install 32 bit compatibility libraries as follows.
  (i.e. This is minimal requirement in a 64 bit multi-architecture environment.)

apt-get install ia32-libs

*  If they are not present, install these packages also.

apt-get install libxml2-dev
apt-get install libusb-1.0-0:i386
apt-get install libusb-0.1-4:i386
apt-get install libudev0:i386
apt-get install libgtk2.0-0:i386
apt-get install gtk2-engines-murrine:i386
apt-get install libidn11:i386
apt-get install libglu1-mesa:i386
apt-get install libxtst6:i386


FTDI INSTALLATION
-----------------

* Install 64 bit FTDI libraries for the FT232RL chip on the LCP4088 board.
  (i.e. I used version 1.1.12) They can be downloaded via the following
  URL:

http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx1.1.12.tar.gz

  Uncompressing the tar archive will create a "release" directory.

tar xfvz libftd2xx1.1.12.tar.gz

  Now obtain the following tar archive from FTDI which contains
  libc version independent libraries.

libftd2xx_V125.zip

  Uncompressing the tar archive will yield the following two libraries.

libftd2xx.a
libftd2xx.so.1.2.5

  Become superuser and perform the following steps.

cp libftd2xx.a/usr/local/lib
cp libftd2xx.so.1.2.5/usr/local/lib

ln -sf /usr/local/lib/libftd2xx.so.1.2.5 /usr/local/lib/libftd2xx.so

  Now build the examples and try the sanity checks per the ReadMe.txt
  file in the release directory.

  Go to the release/build/x86_64 directory and do the following as
  super user. Also, if you run lsusb you should see something like
  this.

Bus 005 Device 003: ID 0403:6001 Future Technology Devices International, \
Ltd FT232 USB-Serial (UART) IC


LPCXpresso INSTALLATION
-----------------------

IMPORTANT: Make sure your account is in the "sudo" list before beginning the
procedure.


* Download Xpresso version 7.1.1 via the following URL.
  (i.e. The same version works for both 32 bit and 64 bit architecture.)


https://s3.amazonaws.com/LPCXpresso7/Installer_LPCXpresso_7.1.1_125_Linux-x86.tar.gz

  Uncompressing the tar archive will yield the following installer program.
  Just run it and it will guide you through the basic installation.

Installer_LPCXpresso_7.1.1_125_Linux-x86

  Note that section 2.2.2 of the user guide at the following URL
  gives some general Linux installation guidelines. However,
  they are not entirely accurate for the Debian environment.

http://www.lpcware.com/lpcxpresso/downloads/linux

* Update the path variable in your .bashrc with the following paths.

export PATH=$PATH:/usr/local/lpcxpresso_7.1.1_125/lpcxpresso/bin:/usr/local/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin

* Link libudev to the right place if it is not already done as
  super user.

cd /lib/i386-linux-gnu
ln -sf libudev.so.1 libudev.so.0

* Install GLIBC_2_14 (i.e. This is absolutely critical for the Redlink Server.)

debian/glibc_import

  Download the 2.14 package into a safe directory as follows.
  (i.e. This is not a regular Debian package)

wget http://security.ubuntu.com/ubuntu/pool/main/e/eglibc/libc6_2.15-0ubuntu20_i386.deb

  Create the following subdirectory structure under /usr/local/lpcxpresso_7.1.1_125/

debian/glibc_import

  Now, unpack the archive in that directory as follows:

dpkg -x libc*.deb /usr/local/lpcxpresso_7.1.1_125/debian/glibc_import

  Got to /usr/local/lpcxpresso_7.1.1_125/lpcxpresso/bin and rename redlinkserv
  as follows:

mv redlinkserv redlinkserv.exe

  Now create an executable script named redlinkserv--in the same directory,
  with the following contents:

#
# LPCXpresso Redlink Server Execution Environment
#
LPCXPRESSO_ROOT_DIR=/usr/local/lpcxpresso_7.1.1_125
LPCXPRESSO_BIN_DIR="${LPCXPRESSO_ROOT_DIR}/lpcxpresso/bin"
GLIBC_DIR="${LPCXPRESSO_ROOT_DIR}/debian/glibc_import/lib/i386-linux-gnu"
export LD_LIBRARY_PATH="${LPCXPRESSO_BIN_DIR}:${GLIBC_DIR}:${LD_LIBRARY_PATH}"
exec "${LPCXPRESSO_BIN_DIR}"/redlinkserv.exe

* Install a correct udev rules file to the /etc/udev/rules.d directory.
  (i.e. This must be done as super user.)

  Normal user processes, such as LPCXpresso, don't have permission to access
  USB devices due of a problem with the default udev rules shipped with LPCXpresso.
  The name of the file is 85-lpcxpresso.rules and it is in the
  /etc/udev/rules.d directory. (i.e. It is not designed for Debian
  systems.)

  The problem can be corrected by creating or copying a correct rules file
  to the /etc/udev/rules.d directory. You can fix the default rules file
  in the following way:

   Append the GROUP="plugdev" to each line of the file as shown below.

SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0007", MODE="0666", GROUP="plugdev"

   IMPORTANT: Verify that your login ID is in the plugdev group in the /etc/group file,
   and execute the following command after the correct rules file has been installed.

udevadm control --reload-rules

An example of correct udev rules file follows.

**************** Start 85-lpcxpresso.rules *********************************

# Define some simple rules for LPCXpresso supported USB Devices
# Each rules simply makes the device world writable when connected
# thus avoiding the need to run the debug drivers as root

# LPC-Link (unbooted)
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="df55", MODE="0666", GROUP="plugdev"
# LPC-Link (winusb)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0009", MODE="0666", GROUP="plugdev"
# LPC-Link (hid)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0007", MODE="0666", GROUP="plugdev"
# NXP LPC
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="000c", MODE="0666", GROUP="plugdev"

# Red Probe
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="ad08", MODE="0666", GROUP="plugdev"
# RDB-Link
SUBSYSTEM=="usb", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0001", MODE="0666", GROUP="plugdev"
# Red Probe+
SUBSYSTEM=="usb", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0003", MODE="0666", GROUP="plugdev"

# Redlink
KERNEL=="hidraw*", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0006", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0007", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0008", MODE="0666", GROUP="plugdev"

################
# NXP CMSIS-DAP
KERNEL=="hidraw*", ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0204", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0019", MODE="0666", GROUP="plugdev"
# NXP (Japan)
KERNEL=="hidraw*", ATTRS{idVendor}=="2786", ATTRS{idProduct}=="f00b", MODE="0666", GROUP="plugdev"

################
# KEIL CMSIS-DAP
KERNEL=="hidraw*", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="f001", MODE="0666", GROUP="plugdev"
# ULINK2
KERNEL=="hidraw*", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2722", MODE="0666", GROUP="plugdev"
# ULINK-ME
KERNEL=="hidraw*", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2723", MODE="0666", GROUP="plugdev"

# FTDI adapters (i.e. USB serial ports)
# Generically set to world read/write. If not, ftdi driver aborts when trying to
# scan for debug adapters.
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", MODE="0666", GROUP="plugdev"

**************** End 85-lpcxpresso.rules *********************************

* Get the LPC4088 LPCOPEN project and example code from the following URL.

http://www.lpcware.com/system/files/lpcopen_2_10_lpcxpresso_ea_devkit_4088.zip

* Start LPCXpresso and import the .zip file you just downloaded.

* Build all the project files and note any errors and exit Xpresso.

LPCXpresso Execution
--------------------

* Plug in both the LCP4088 dev. board and LPC-Link2 module into USB ports.

* Kill any instances of the Redlink Server.

* Remove conflicting modules as follows:
  (i.e. This will not harm your system configuration.)

rmmod ftdi_sio
rmmod usbserial

* Check the information on your LPC-Link2 module with lsusb. You
  should see something like this.

Bus 003 Device 003: ID 1fc9:000c NXP Semiconductors

LPCXpresso SANITY CHECK
-------------------------

* You should be able to compile and run the "FreeRTOS Blinky" example with Debug now.
0 Kudos
Reply
1 Reply

697 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by paul.rcom-software.com on Thu May 29 12:16:37 MST 2014
LPCXpresso Installation Instructions

These instructions are specific to the AMD64 Debian Wheezy Linux OS
with the LCP4088 Development Kit and the LPC-Link2 debugging module.\

NOTE: Updated to include CSP and BSP support infrastructure.

GENERAL PREPARATION
-------------------

* Basic multi-architecture setup. (i.e. Should be done at installation.)

dpkg add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 \
libncurses5:i386

apt-get install preload
apt-get install libc6-dev-amd64

* Install 32 bit compatibility libraries as follows.
  (i.e. This is minimal requirement in a 64 bit multi-architecture environment.)

apt-get install ia32-libs

*  If they are not present, install these packages also.

apt-get install libxml2-dev
apt-get install libusb-1.0-0:i386
apt-get install libusb-0.1-4:i386
apt-get install libudev0:i386
apt-get install libgtk2.0-0:i386
apt-get install gtk2-engines-murrine:i386
apt-get install libidn11:i386
apt-get install libglu1-mesa:i386
apt-get install libxtst6:i386


FTDI INSTALLATION
-----------------

* Install 64 bit FTDI libraries for the FT232RL chip on the LCP4088 board.
  (i.e. I used version 1.1.12) They can be downloaded via the following
  URL: (i.e. A newer version may be available.)

http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx1.1.12.tar.gz

  Uncompressing the tar archive will create a "release" directory.

tar xfvz libftd2xx1.1.12.tar.gz

  Now obtain the following tar archive from FTDI which contains
  libc version independent libraries.

libftd2xx_V125.zip

  Uncompressing the tar archive will yield the following two libraries.

libftd2xx.a
libftd2xx.so.1.2.5

  Become superuser and perform the following steps.

cp libftd2xx.a/usr/local/lib
cp libftd2xx.so.1.2.5/usr/local/lib

ln -sf /usr/local/lib/libftd2xx.so.1.2.5 /usr/local/lib/libftd2xx.so

  Now build the examples and try the sanity checks per the ReadMe.txt
  file in the release directory.

  Go to the release/build/x86_64 directory and do the following as
  super user. Also, if you run lsusb you should see something like
  this.

Bus 005 Device 003: ID 0403:6001 Future Technology Devices International, \
Ltd FT232 USB-Serial (UART) IC


LPCXpresso INSTALLATION
-----------------------

IMPORTANT: Make sure your account is in the "sudo" list before beginning the
procedure.


* Download Xpresso version 7.1.1 via the following URL.
  (i.e. The same version works for both 32 bit and 64 bit architecture and
   a newer version is probably available.)


https://s3.amazonaws.com/LPCXpresso7/Installer_LPCXpresso_7.1.1_125_Linux-x86.tar.gz

  Uncompressing the tar archive will yield the following installer program.
  Just run it and it will guide you through the basic installation.

Installer_LPCXpresso_7.1.1_125_Linux-x86

  Note that section 2.2.2 of the user guide at the following URL
  gives some general Linux installation guidelines. However,
  they are not entirely accurate for the Debian environment.

http://www.lpcware.com/lpcxpresso/downloads/linux

* Update the path variable in your .bashrc with the following paths.

export PATH=$PATH:/usr/local/lpcxpresso_7.1.1_125/lpcxpresso/bin:/usr/local/lpcxpresso_7.1.1_125/lpcxpresso/tools/bin

* Link libudev to the right place if it is not already done as
  super user.

cd /lib/i386-linux-gnu
ln -sf libudev.so.1 libudev.so.0

* Install GLIBC_2_14 (i.e. This is absolutely critical for the Redlink Server.)

debian/glibc_import

  Download the 2.14 package into a safe directory as follows.
  (i.e. This is not a regular Debian package)

wget http://security.ubuntu.com/ubuntu/pool/main/e/eglibc/libc6_2.15-0ubuntu20_i386.deb

  Create the following subdirectory structure under /usr/local/lpcxpresso_7.1.1_125/

debian/glibc_import

  Now, unpack the archive in that directory as follows:

dpkg -x libc*.deb /usr/local/lpcxpresso_7.1.1_125/debian/glibc_import

  Got to /usr/local/lpcxpresso_7.1.1_125/lpcxpresso/bin and rename redlinkserv
  as follows:

mv redlinkserv redlinkserv.exe

  Now create an executable script named redlinkserv--in the same directory,
  with the following contents:

#
# LPCXpresso Redlink Server Execution Environment
#
LPCXPRESSO_ROOT_DIR=/usr/local/lpcxpresso_7.1.1_125
LPCXPRESSO_BIN_DIR="${LPCXPRESSO_ROOT_DIR}/lpcxpresso/bin"
GLIBC_DIR="${LPCXPRESSO_ROOT_DIR}/debian/glibc_import/lib/i386-linux-gnu"
export LD_LIBRARY_PATH="${LPCXPRESSO_BIN_DIR}:${GLIBC_DIR}:${LD_LIBRARY_PATH}"
exec "${LPCXPRESSO_BIN_DIR}"/redlinkserv.exe

* Install a correct udev rules file to the /etc/udev/rules.d directory.
  (i.e. This must be done as super user.)

  Normal user processes, such as LPCXpresso, don't have permission to access
  USB devices due of a problem with the default udev rules shipped with LPCXpresso.
  The name of the file is 85-lpcxpresso.rules and it is in the
  /etc/udev/rules.d directory. (i.e. It is not designed for Debian
  systems.)

  The problem can be corrected by creating or copying a correct rules file
  to the /etc/udev/rules.d directory. You can fix the default rules file
  in the following way:

   Append the GROUP="plugdev" to each line of the file as shown below.

SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0007", MODE="0666", GROUP="plugdev"

   IMPORTANT: Verify that your login ID is in the plugdev group in the /etc/group file,
   and execute the following command after the correct rules file has been installed.

udevadm control --reload-rules

An example of correct udev rules file follows.

**************** Start 85-lpcxpresso.rules *********************************

# Define some simple rules for LPCXpresso supported USB Devices
# Each rules simply makes the device world writable when connected
# thus avoiding the need to run the debug drivers as root

# LPC-Link (unbooted)
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="df55", MODE="0666", GROUP="plugdev"
# LPC-Link (winusb)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0009", MODE="0666", GROUP="plugdev"
# LPC-Link (hid)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0007", MODE="0666", GROUP="plugdev"
# NXP LPC
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="000c", MODE="0666", GROUP="plugdev"

# Red Probe
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="ad08", MODE="0666", GROUP="plugdev"
# RDB-Link
SUBSYSTEM=="usb", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0001", MODE="0666", GROUP="plugdev"
# Red Probe+
SUBSYSTEM=="usb", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0003", MODE="0666", GROUP="plugdev"

# Redlink
KERNEL=="hidraw*", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0006", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0007", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="21bd", ATTRS{idProduct}=="0008", MODE="0666", GROUP="plugdev"

################
# NXP CMSIS-DAP
KERNEL=="hidraw*", ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0204", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0019", MODE="0666", GROUP="plugdev"
# NXP (Japan)
KERNEL=="hidraw*", ATTRS{idVendor}=="2786", ATTRS{idProduct}=="f00b", MODE="0666", GROUP="plugdev"

################
# KEIL CMSIS-DAP
KERNEL=="hidraw*", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="f001", MODE="0666", GROUP="plugdev"
# ULINK2
KERNEL=="hidraw*", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2722", MODE="0666", GROUP="plugdev"
# ULINK-ME
KERNEL=="hidraw*", ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2723", MODE="0666", GROUP="plugdev"

# FTDI adapters (i.e. USB serial ports)
# Generically set to world read/write. If not, ftdi driver aborts when trying to
# scan for debug adapters.
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", MODE="0666", GROUP="plugdev"

**************** End 85-lpcxpresso.rules *********************************

* Get the LPC4088 LPCOPEN project and example code from the following URL.
  (i.e. There may be a newer version.)

http://www.lpcware.com/system/files/lpcopen_2_10_lpcxpresso_ea_devkit_4088.zip

* Start LPCXpresso and import the .zip file you just downloaded.

* Build all the project files and note any errors and exit Xpresso.

LPCXpresso Execution
--------------------

* Plug in both the LCP4088 dev. board and LPC-Link2 module into USB ports.

* Kill any instances of the Redlink Server.

* Remove conflicting modules as follows:
  (i.e. This will not harm your system configuration.)

rmmod ftdi_sio
rmmod usbserial

* Check the information on your LPC-Link2 module with lsusb. You
  should see something like this.

Bus 003 Device 003: ID 1fc9:000c NXP Semiconductors

LPCXpresso SANITY CHECK
-------------------------

* You should be able to compile and run the "FreeRTOS Blinky" example with Debug now.

Adding BSP and CSP, Board and Chip, Support Packages
-----------------------------------------------------
First, I need to clarify what is in the LPCOpen project BSP and CSP.
The BSP does not contain a bootloader which in the LPC4088 environment
is burned into the chip. It does contain the drivers for the basic
peripherals on the board. Similary, the CSP contains the basic drivers
for the peripheral devices on the processor. Those drivers are provided
in library form.

These are the locations of the downloaded BSP packages on Linux and Windows
respectively. (i.e. There may be newer versions.)

LINUX
------
/usr/local/lpcxpresso_7.1.1_125/lpcxpresso/Examples/NXP/LPC4000/LPC407x_8x/LPC407x_8x_Libraries.zip

WINDOWS
-------
C:\nxp\LPCXpresso_7.2.0_153\lpcxpresso\Examples\NXP\LPC4000\LPC407x_8x\LPC407x_8x_Libraries.zip

This is the procedure--as far as I know, for installing the BSP packages within
LPCXpresso.

* Start LPCXpresso

* Select "Import projects" and navigate to the BSP package.  At that point select
  OK to open the package and just use defaults as the GUI guides you through
  the import process.

* Rebuild all projects--optimally in debug mode.

At this point point the BSP package in LPCXpresso and configured correctly.
It is assumed one more step is needed to download the BSP package to
the board. You only need to do this once. Subsequently, if you
build any project the correct drivers will be included in the board
executable image.
0 Kudos
Reply