Kjell Erik Klevan

Segmentation fault when building the On-Board Diagnostics Suite (OBDS) for Freescale i.MX53 -blog archive

Discussion created by Kjell Erik Klevan on Nov 1, 2011
Latest reply on Apr 24, 2013 by caohaifeng

I am trying to build the OBDS for i.MX53 Quick Start Board using VmWare player with the VmWare image included in the start-up kit.

The compiling part seems to work fine using "make TARGET=mx53 BOARD=evk BOARD_VERSION=1".

However the linking part ends with a segmentation fault as shown in the trace below.

I would really appreciate some help here.

 

make[2]: Entering directory `/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init'
arm-none-linux-gnueabi-gcc  -mcpu=cortex-a8 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -mapcs -g -O0 -ffunction-sections -fdata-sections -fno-exceptions  -I/home/lucid/obds/201050_mx53_sbrth_lcb_release -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include/mx53/ -I.  -DMX53_EVK -DBOARD_VERSION1 -DSTANDALONE  -o /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/obj/init/main.o -c main.c
arm-none-linux-gnueabi-gcc  -mcpu=cortex-a8 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -mapcs -g -O0 -ffunction-sections -fdata-sections -fno-exceptions  -I/home/lucid/obds/201050_mx53_sbrth_lcb_release -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include/mx53/ -I.  -DMX53_EVK -DBOARD_VERSION1 -DSTANDALONE  -o /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/obj/init/sys.o -c sys.c
sys.c:137: warning: 'struct stat' declared inside parameter list
sys.c:137: warning: its scope is only this definition or declaration, which is probably not what you want
sys.c: In function '_write':
sys.c:183: warning: null argument where non-null required (argument 2)
sys.c:186: warning: null argument where non-null required (argument 2)
arm-none-linux-gnueabi-gcc  -mcpu=cortex-a8 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -mapcs -g -O0 -ffunction-sections -fdata-sections -fno-exceptions  -I/home/lucid/obds/201050_mx53_sbrth_lcb_release -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include/mx53/ -I.  -DMX53_EVK -DBOARD_VERSION1 -DSTANDALONE  -o /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/obj/init/version.o -c version.c
arm-none-linux-gnueabi-gcc  -mcpu=cortex-a8 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -mapcs -g -O0 -ffunction-sections -fdata-sections -fno-exceptions   -I/home/lucid/obds/201050_mx53_sbrth_lcb_release -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include/mx53/ -I.  -DMX53_EVK -DBOARD_VERSION1 -DSTANDALONE  -o /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/obj/init/vectors.o -c vectors.S
make[2]: Leaving directory `/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init'
arm-none-linux-gnueabi-ar -rucs /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/lib/libobds.a
make[1]: Leaving directory `/home/lucid/obds/201050_mx53_sbrth_lcb_release/src'
arm-none-linux-gnueabi-ar -rucs /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/lib/libobds.a
arm-none-linux-gnueabi-gcc -o /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/bin/diag-obds-mx53evk.elf /home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/main.c /home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/vectors.S /home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/sys.c /home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/version.c -mcpu=cortex-a8 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -mapcs -g -O0 -ffunction-sections -fdata-sections -fno-exceptions  -I/home/lucid/obds/201050_mx53_sbrth_lcb_release -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include -I/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/include/mx53/ -I.  -DMX53_EVK -DBOARD_VERSION1 -DSTANDALONE  -Wl,--whole-archive /home/lucid/obds/201050_mx53_sbrth_lcb_release/output/mx53/lib/libobds.a -Wl,--no-whole-archive   -nostartfiles -T /home/lucid/obds/201050_mx53_sbrth_lcb_release/src/mx53/mx53.ld
/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/sys.c:137: warning: 'struct stat' declared inside parameter list
/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/sys.c:137: warning: its scope is only this definition or declaration, which is probably not what you want
/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/sys.c: In function '_write':
/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/sys.c:183: warning: null argument where non-null required (argument 2)
/home/lucid/obds/201050_mx53_sbrth_lcb_release/src/init/sys.c:186: warning: null argument where non-null required (argument 2)
collect2: ld terminated with signal 11 [Segmentation fault]
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/../../../../arm-fsl-linux-gnueabi/bin/ld: BFD (GNU Binutils) 2.20.1.20100303 assertion fail /work/arm-toolchains/tmp/src/binutils-2.20.1/bfd/elf32-arm.c:12429
make: *** [bin] Error 1

Outcomes