Hi all,
I'm trying to port my mapping/navigation engine to N950 and got some problems.
First, I've set up development environment under Ubuntu 10.04, downloaded SDK from repos,
created and compiled sample qt-hello application (it runs OK on device).
Next, I created .pro to compile and link test application using my engine.
NB: this engine have been hardly checked using valgrind under linux and runs well on
linux 32/64 bit, android etc.
NB: i'm using default compiler/linker flags from qt-hello to build my project.
gcc flags:
-pipe -g -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -fno-omit-frame-pointer --param=ssp-buffer-size=4 -fmessage-length=
0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=vfpv3 -mfloat-abi=softfp -D__SOFTFP__ -Wall -W -D_REENTRANT $(DEFINES)
While trying to run this application on a real device, I've got "bus error". After some investigations I found
that floating point related functions are not working properly (sin(1.047198) returns NaN e.g.)
If I change optimization flags to -O0, engine seems to work except floating operations (lot of NaN's. inf's, weird values).
NB: atof() doesn't seems to work correctly also, but after providing my own implementation this problem has been solved.
While running on device, valgrind says:
Invalid write of size 8 at 0x41260464: sincos (s_sincos.c:43)
Address 0x6d40084f is not stack'd, malloc'd or free'd.
So i can't understand the source of the problem. Is it in compiler flags (alignment/fpu/...) related, or it was incorrectly linked,
or something else?
BTW, I'm using firmware version 1.2011.34-2_PR_RM680
Thanks.

Reply With Quote

