Skip to content

Building SDL Core for QNX on TI OMAP 5432 Board

JackLivio edited this page Nov 30, 2015 · 4 revisions

Original Author: Jack Byrne

Description Detailed Requirement
Host Environment Ubuntu 14.04
QNX Versions 6.5SP1 or 6.6

Install packages on host

%sudo apt-get install git cmake build-essential libavahi-client-dev libsqlite3-dev chromium-browser libssl-dev libudev-dev libgtest-dev libbluetooth3 libbluetooth-dev bluez-tools gstreamer1.0* libpulse-dev

Setup QNX Environment

If you are using the QNX 6.6 sdk, navigate to your QNX installation directory and run:

source qnx660-env.sh

If you are using QNX 6.5, you must make sure the environment variables, $QNX_HOST and $QNX_TARGET, are properly pointed to your QNX host and target install directories. To check these variables:

%echo $QNX_HOST
/opt/qnx650/host/linux/x86
%echo $QNX_TARGET
/opt/qnx650/target/qnx6

Building SDL Core

// We'll move this to internal SDL soon
%git clone https://github.com/justinjdickow/sdl_core/
%cd sdl_core
%git checkout -b port/qnx origin/port/qnx
%./setup_sdl.sh

setup_sdl.sh will setup the build environment in your home directory (~/build_sdl/) and start compiling the source code.

Note: setup_sdl.sh exports the OS_TYPE as QNX and the ARCH_TYPE as arm. If you are using another arch type, such as x86, you must edit the script accordingly.

Importing into Momentics

At this point you can open up QNX Momentics using the script provided

%./run-qde.sh
  • Switch perspectives to QNX System Information.
  • Next, find the IP Address of your target, then in moments, right click in Target Navigator Window, Select New QNX Target, Enter IP Address of Target Computer and select Finish
  • Right click on target in the Target Navigator window and select “Launch TelNet Session”
  • Enter login and password
  • Switch to C/C++ Perspective
  • To import the project select Import -> General -> existing Projects into Workspace -> browse -> select the build_sdl directory - > Check Copy projects into workspace -> Finish
  • Right click on project folder and select Properties - > Navigate to C/C++ Make Project - > Remove -j4 from build command -> Replace "all" with "install" in the Build (Incremental Build) Variables -> Apply -> Ok
  • Right Click Project folder and click Build Project to ensure project imported correctly

Copy files to QNX Target

Using the target file navigator in Momentics, copy all files except the smartDeviceLinkCore executable from the host in ~/build_sdl/bin/ to the target in /root.

Copy the file named "policy" into the target's directory /pps/qnx/qdb/config. This is the QDB configuration file.

Running SDL on the QNX Target

  • Right click project -> Run as… -> Run Configurations
  • Click new c/c++ QNX QCONN (IP)
  • Under c/c++ application click Search Project... -> Click "smartDeviceLinkCore" under binaries, and under Qualifier, select the binary built in the bin folder (bin/smartDeviceLinkCore). -> Click Ok.
  • Click on the Upload tab and make sure "Upload executable to target” is checked.
  • Change the remote directory to /root
  • Under Shared Libraries click “Upload shared libraries to the target” and select Auto to grab shared libraries. Note: Sometimes this step does not get all of the libraries needed. Check to see if these libraries are missing:
liblog4cxx.so.10
libapr-1.so.5
libaprutil-1.so.5

If they are missing, you must manually link the shared libraries. Under shared libraries click Add... -> File System... -> navigate to {QNX SDK Install Directory}/target/qnx6/armle-v7/usr/lib/ -> select missing libraries.

Click Run. Wait for SDL console output after download completes.

HMI

Download the sdl_hmi from https://github.com/smartdevicelink/sdl_hmi and copy the folder onto your target in a directory that is accessible by the target's browser.

On the target, open browser and navigate to the sdl_hmi/index.html file