perftest on RaspberryPi

5 posts / 0 new
Last post
Offline
Last seen: 7 years 6 months ago
Joined: 08/23/2016
Posts: 10
perftest on RaspberryPi

Hi,

I want to build a 'perftest' application to do some tests between a x64  Kubuntu 15.10 and RaspberryPi 1 B, but in /rtiperftest.5.2.4/perftest_cpp directory there isn't a makefile for armv6 architecture.

I have installed crosstool-ng 1.22 to build application for armv6 architecture but I don't know how to write the makefile for build 'perftest_cpp'  using crosscompiler to run it on RaspberryPi.

Anybody can help me?

Thank you so much!

Regards.

Offline
Last seen: 7 years 6 months ago
Joined: 08/23/2016
Posts: 10

Hi again,

Now I have got a makefile (attached) for build 'perftest_cpp' but I get the next error (with a lot of files) that I can't understand (I only paste one error for make it readable)

/home/ampu/x-tools/armv6-rpi-linux-gnueabi/lib/gcc/armv6-rpi-linux-gnueabi/5.2.0/../../../../armv6-rpi-linux-gnueabi/bin/ld.bfd: error: /opt/rti_connext_dds-5.2.3//lib/armv6vfphLinux3.xgcc4.7.2/libnddscorez.a(SkiplistInfo.o) uses VFP register arguments, ../bin/armv6vfphL
inux3.xgcc4.7.2/Release/perftest_cpp does not 
/home/ampu/x-tools/armv6-rpi-linux-gnueabi/lib/gcc/armv6-rpi-linux-gnueabi/5.2.0/../../../../armv6-rpi-linux-gnueabi/bin/ld.bfd: failed to merge target specific data of file /opt/rti_connext_dds-5.2.3//lib/armv6vfphLinux3.xgcc4.7.2/libnddscorez.a(SkiplistInfo.o) 
collect2: error: ld returned 1 exit status 
common2.mk:86: recipe for target '../bin/armv6vfphLinux3.xgcc4.7.2/Release/perftest_cpp' failed 
make: *** [../bin/armv6vfphLinux3.xgcc4.7.2/Release/perftest_cpp] Error 1

Any idea?

Thank you.

 

Offline
Last seen: 7 years 6 months ago
Joined: 08/23/2016
Posts: 10

If I am not mistaken,

I think that the problem is that RTI Connext DDS Libraries for Raspberry Pi are HardFP and perftest is SoftFP.

I have tried make by using -mfloat-abi=hard, -mfloat-abi=softfp and -mfpu=vfp, and combinations of these flags, but the error persists

How can I make perftest to run on RaspberryPi?

On the other hand, I think that RTI Connext DDS Libraries for Raspberry Pi are not the correct libraries to run perftest on raspberry pi without install DDS on it.
Are rti_connext_dds-5.2.0-core-target-armv6vfphLinux3.xgcc4.7.2.rtipkg libraries Ok or should I get rti_connext_dds-5.2.0-pro-target-armv6vfphLinux3.xgcc4.7.2.rtipkg instead?

Can anyone confirm this?

Please help.

Thank you.

Fernando Garcia's picture
Offline
Last seen: 4 months 6 days ago
Joined: 05/18/2011
Posts: 199

Hi ampu,

You are correct, the problem seems to be mixing HardFP and SoftFP. To use the RTI Connext DDS libraries for Raspberry Pi you need to build with HardFP support.

I have been able to build RTI Perftest using the stall first the arm-linux-gnueabihf-g++ cross compiler, which on Ubuntu you can install as follows:

$ sudo apt-get install g++-arm-linux-gnueabihf

Then, I created the following makefile (I called it perftest_cpp/Makefile.armv6vfphLinux3.xgcc4.7.2: 

ARCH := armv6vfphLinux3.xgcc4.7.2
DEBUG_FLAG := -O4
#DEBUG_FLAG := -g
DEFINES_ARCH_SPECIFIC := -DRTI_LINUX -DRTI_64BIT

cxx_cc := arm-linux-gnueabihf-g++
cxx_cc_flags := -fpic -march=armv6 -mfpu=vfp -mfloat-abi=hard -mlong-calls -marm

cxx_ld := arm-linux-gnueabihf-g++
cxx_ld_flags := -ldl -lnsl -lm -lpthread -lrt

include common.mk

And finally I build it as follows (running from perftest_cpp):

make -f Makefile.armv6vfphLinux3.xgcc4.7.2

Let me know if this works for you,

Fernando.

Offline
Last seen: 7 years 6 months ago
Joined: 08/23/2016
Posts: 10

Hi Fernando,

It works.

 

Thank you very much!