Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

How to Build

Nitu Adrian edited this page Jul 11, 2017 · 11 revisions

Build host

Current build host for libtuv

  • Ubuntu 14.04
  • Ubuntu 16.04

Build tools installation

Host build
sudo apt-get install build-essential cmake
Cross compiler for Raspberry Pi 2
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf

Raspbian Jessie used with Noobs image older than 1.9 require different compiler form Raspberry Pi repository.

The 64-bit version of compiler for Linux is in folder:

tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64

When you reconfigure your machine to use this compiler:

$export PATH="tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:$PATH"
Cross compiler for STM32F4-Discovery
Cross compiler for Tizen

Since Tizen uses soft-float ABI, gnueabi toolchain is needed:

sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi

Build and run test

for x86 linux (Ubuntu 14.04)
make
./build/i686-linux/debug/bin/tuvtester
(or)
./build/x86_64-linux/debug/bin/tuvtester
for Raspberry Pi 2
for arm-linux
TUV_PLATFORM=arm-linux TUV_BOARD=rpi2 make
for armhf-linux (Raspbian Jessie)
TUV_PLATFORM=armhf-linux make
Testing at Raspberry Pi:
scp ./build/arm-linux/debug/bin/tuvtester pi@(your rpi2 IP addr):/home/pi/.

and in your RPi2 shell

./tuvtester
for arm-nuttx (STM32F4-Discovery)
TUV_PLATFORM=arm-nuttx TUV_BOARD=stm32f4dis TUV_SYSTEMROOT=/.../nuttx/nuttx make

Where /.../nuttx/nuttx should be absolute path to nuttx where .config resides, please change to your system configuration. At the end of build, it'll copy libtuv.a and libtuvtester.a, tester in library form, to /.../nuttx/nuttx/lib folder.

for arm-mbed (FRDM-K64F)

libtuv for arm-mbed is in development state. some functions are absent and may not work properly.

make -f Makefile.mbedk64f

to flash (actually it copies binary image file to mounted folder)

make -f Makefile.mbedk64f flash
for ARTIK10
for arm-tizen
TUV_PLATFORM=arm-tizen TUV_BOARD=artik10 make
Testing:

transfer tuvtester to the device:

sdb push ./build/arm-linux/debug/bin/tuvtester /home/owner/tuv/
sdb push ./test/resources /home/owner/tuv/test/resources

and run it in the ARTIK shell

sdb shell
cd /home/owner/tuv
./tuvtester

Options

Makefile options

  • VERBOSE=1
    • verbose output if set
  • TUV_BUILD_TYPE=release
    • release build or else debug build
  • TUV_BUILDTESTER=yes|no
    • build also unit test program, default is yes
  • TUV_BUILDAPIEMULTESTER=no|yes
    • build also system api emulation test program, default is no
    • only one of tester can be build at once, so should give TUV_BUILDTESTER=no for yes
    • currently works for mbed

support platform + board

  • TUV_PLATFORM=i686-linux
    • x86 32bit linux
  • TUV_PLATFORM=x86_64-linux
    • x86 64bit linux
  • TUV_PLATFORM=arm-linux TUV_BOARD=rpi2
    • arm linux on raspberry pi 2
  • TUV_PLATFORM=armhf-linux
    • armhf linux on raspberry pi 2 (Raspbian Jessie)
  • TUV_PLATFORM=arm-nuttx TUV_BOARD=stm32f4disco
    • arm nuttx on STM32F4-Discovery with BB
  • TUV_PLATFORM=arm-mbed TUV_BOARD=mbedk64f
    • arm mbed on FRDM-K64F
    • use Makefile.mbedk64f file, it includes generating images