Build problem on E100

For some reason the ARM Assembler doesn’t like the NEON instructions in
dotprod_fff_armv7_a.c:

[ 9%] Building C object
gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o
/tmp/ccAcWVL4.s: 27: Error: bad instruction vmov.f32 q8,#0.0' /tmp/ccAcWVL4.s: 28: Error: bad instructionvmov.f32 q9,#0.0’
/tmp/ccAcWVL4.s: 31: Error: bad instruction vldl.32 {d0,d1,d2,d3},[r3]!' /tmp/ccAcWVL4.s: 32: Error: bad instructionvldl.32
{d4,d5,d6,d7},[r1]!’
/tmp/ccAcWVL4.s: 33: Error: bad instruction vmla.f32 q8,q0,q2' /tmp/ccAcWVL4.s: 34: Error: bad instructionvmla.f32 q9,q1,q3’
/tmp/ccAcWVL4.s: 36: Error: bad instruction vadd.f32 q8,q8,q9' /tmp/ccAcWVL4.s: 37: Error: bad instructionvpadd.f32 d0,d16,d17’
/tmp/ccAcWVL4.s: 38: Error: bad instruction `vadd.f32 s16,s0,s1’
make[2]: ***
[gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o]
Error 1
make[1]: ***
[gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/all] Error 2
make: *** [all] Error 2

My cmake command was as follows:

$ cmake
-DCMAKE_TOOLCHAIN_DIR=…/cmake/Toolchains/arm_cortex_a8_native.cmake
-DENABLE_GRC=OFF -DENABLE_GR_QTGUI=OFF
-DQT_QTCORE_INCLUDE_DIR=/usr/include/qt4/QtCore
-DQT_QTGUI_INCLUDE_DIR=/usr/include/qt4/QtGui …/

And the CC and CXX FLAGS in arm_cortex_a8_native.cmake were:
“-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-ftree-vectorize -fsingle-precision-constant”

I also tried without “-ftree-vectorize -fsingle-precision-constant” to
similar effect.

This is using a gnuradio build I pulled less than 6 hours ago. Can
anybody else with an E100 reproduce this error?

Thanks,
Sean

On 11/09/2011 03:18 AM, Nowlan, Sean wrote:

/tmp/ccAcWVL4.s: 37: Error: bad instruction vpadd.f32 d0,d16,d17' /tmp/ccAcWVL4.s: 38: Error: bad instructionvadd.f32 s16,s0,s1’
make[2]: ***
[gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o]
Error 1
make[1]: *** [gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/all]
Error 2
make: *** [all] Error 2

Can you try “make VERBOSE=1”? I’d like to see what the compiler command
line looks like. I am guessing it doesn’t have the flags enabling neon.

Philip

:

$ cmake
-DCMAKE_TOOLCHAIN_DIR=…/cmake/Toolchains/arm_cortex_a8_native.cmake
-DENABLE_GRC=OFF -DENABLE_GR_QTGUI=OFF
-DQT_QTCORE_INCLUDE_DIR=/usr/include/qt4/QtCore
-DQT_QTGUI_INCLUDE_DIR=/usr/include/qt4/QtGui …/

The all-important arm-neon flags were not set. See:

########################################################################

Toolchain file for building native on a ARM Cortex A8 w/ NEON

Usage: cmake -DCMAKE_TOOLCHAIN_FILE=

########################################################################

-Josh

Rookie mistake… Here I was thinking that those flags were in fact
set… Guess it’s not a good idea to start a build at 2am :slight_smile:

On 11/09/2011 02:57 PM, Nowlan, Sean wrote:

I tried it again (without the typo) and it failed in the same manner. For some
reason the C_FLAGS are not being picked up. Any ideas?

$cmake
-DCMAKE_TOOLCHAIN_FILE=/home/root/gnuradio/cmake/Toolchains/arm_cortex_a8_native.cmake
…/

$make VERBOSE=1

I dont know what to say, I just ran that command exactly.

Touched all of the dotprod files so they rebuild:
root@usrp-e1xx:~/src/gnuradio.git/gnuradio-core/src/lib/filter# touch
dotprod

And make VERBOSE=1 gives me: /usr/bin/cmake -E cmake_progress_report /home/root/src/gnuradio.git/build/CMakeF - Pastebin.com
So the flags are definitely there in this case.

-josh

What generates the various flags.make files? I had to edit these by hand
to put the correct flags in. I’m pretty sure I shouldn’t need to do
that.

I tried it again (without the typo) and it failed in the same manner.
For some reason the C_FLAGS are not being picked up. Any ideas?

$cmake
-DCMAKE_TOOLCHAIN_FILE=/home/root/gnuradio/cmake/Toolchains/arm_cortex_a8_native.cmake
…/

$make VERBOSE=1

[ 16%] Building C object
gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o
cd /home/root/gnuradio/build/gnuradio-core/src/lib && /usr/bin/gcc
-Dgnuradio_core_EXPORTS -DHAVE_NETDB_H -DHAVE_SYS_TIME_H
-DHAVE_SYS_TYPES_H -DHAVE_SYS_SELECT_H -DHAVE_SYS_SOCKET_H
-DHAVE_SYS_MMAN_H -DHAVE_SYS_IPC_H -DHAVE_SYS_SHM_H -DHAVE_SIGNAL_H
-DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DHAVE_BYTESWAP_H
-DHAVE_LINUX_PPDEV_H -DHAVE_UNISTD_H -DHAVE_MALLOC_H -DHAVE_SNPRINTF
-DHAVE_SIGACTION -DHAVE_SELECT -DHAVE_SYSCONF -DHAVE_GETPAGESIZE
-DHAVE_NANOSLEEP -DHAVE_GETTIMEOFDAY -DHAVE_POSIX_MEMALIGN -DHAVE_VALLOC
-DALIGNED_MALLOC=0 -DHAVE_PTHREAD_SIGMASK -DHAVE_SHM_OPEN -DHAVE_SINCOS
-DHAVE_SINCOSF -DHAVE_SINF -DHAVE_COSF -DHAVE_MMAP -O3 -DNDEBUG -fPIC
-I/home/root/gnuradio/gnuradio-core/src/lib/hier
-I/home/root/gnuradio/gruel/src/include
-I/home/root/gnuradio/build/gruel/src/include
-I/home/root/gnuradio/gnuradio-core/src/lib/runtime
-I/home/root/gnuradio/build/gnuradio-core/src/lib/general
-I/home/root/gnuradio/gnuradio-core/src/lib/general
-I/home/root/gnuradio/build/gnuradio-core/src/lib/gengen
-I/home/root/gnuradio/gnuradio-core/src/lib/gengen
-I/home/root/gnuradio/build/gnuradio-core/src/lib/filter
-I/home/root/gnuradio/gnuradio-core/src/lib/filter
-I/home/root/gnuradio/gnuradio-core/src/lib/missing
-I/home/root/gnuradio/gnuradio-core/src/lib/reed-solomon
-I/home/root/gnuradio/gnuradio-core/src/lib/viterbi
-I/home/root/gnuradio/gnuradio-core/src/lib/io
-I/home/root/gnuradio/gnuradio-core/src/lib/g72x
-I/home/root/gnuradio/build/gnuradio-core/src/lib/swig
-I/home/root/gnuradio/gnuradio-core/src/lib/swig -fvisibility=hidden
-Wsign-compare -o
CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o -c
/home/root/gnuradio/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.c
/tmp/ccx0f1Vx.s: Assembler messages:
/tmp/ccx0f1Vx.s:27: Error: bad instruction vmov.f32 q8,#0.0' /tmp/ccx0f1Vx.s:28: Error: bad instructionvmov.f32 q9,#0.0’
/tmp/ccx0f1Vx.s:31: Error: bad instruction vld1.32 {d0,d1,d2,d3},[r3]!' /tmp/ccx0f1Vx.s:32: Error: bad instructionvld1.32 {d4,d5,d6,d7},[r1]!’
/tmp/ccx0f1Vx.s:33: Error: bad instruction vmla.f32 q8,q0,q2' /tmp/ccx0f1Vx.s:34: Error: bad instructionvmla.f32 q9,q1,q3’
/tmp/ccx0f1Vx.s:36: Error: bad instruction vadd.f32 q8,q8,q9' /tmp/ccx0f1Vx.s:37: Error: bad instructionvpadd.f32 d0,d16,d17’
/tmp/ccx0f1Vx.s:38: Error: bad instruction vadd.f32 s16,s0,s1' make[2]: *** [gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/filter/dotprod_fff_armv7_a.c.o] Error 1 make[2]: Leaving directory/home/root/gnuradio/build’
make[1]: *** [gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/all]
Error 2
make[1]: Leaving directory `/home/root/gnuradio/build’
make: *** [all] Error 2

–Sean

On 11/09/2011 07:24 PM, Nowlan, Sean wrote:

What generates the various flags.make files? I had to edit these by hand to put
the correct flags in. I’m pretty sure I shouldn’t need to do that.

So the gnuradio install on this image, was built natively with that
toolchain file: files.ettus.com:/e1xx_images/e1xx-001/

In any case, you can manually specify those flags on the command line by
setting the same variable in the toolchain file (this was the only
purpose of having the toolchain file to begin with):

-DCMAKE_CXX_FLAGS:STRING=“-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-g” -DCMAKE_C_FLAGS:STRING=“-mcpu=cortex-a8 -mfpu=neon
-mfloat-abi=softfp -g”

Also mentionings of the flags here:
http://code.ettus.com/redmine/ettus/projects/usrpe1xx/wiki/FAQ

-josh