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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

3,678 Views
keekis
Contributor I

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

Tags (1)
0 Kudos
Reply
15 Replies

2,756 Views
Yuri
NXP Employee
NXP Employee

Please use sbrth_lcb for the Quick start board

0 Kudos
Reply

2,756 Views
caoping
Contributor II

oh when i enter the Download Sourcery CodeBench for ARM EABI - Mentor Graphics,enter i can't find where to dowenload

"Download Sourcery G++ Lite 2011.03-42" ,

0 Kudos
Reply

2,756 Views
caohaifeng
Contributor IV

1.png

download G++ Lite, do not download CodeBench.

0 Kudos
Reply

2,756 Views
Yuri
NXP Employee
NXP Employee

Please use the recent available release of Sourcery G++ Lite.

0 Kudos
Reply

2,756 Views
yektaayduk
Contributor II

I'm also trying to use the OBDS ,the target names in code are not familiar to me.

sbrth_lcb ,sbrt_smd  which one is the Quick start board ?

0 Kudos
Reply

2,756 Views
HuiShao
Contributor I

Thanks! I have built and installed it into rootfs, it seems to be working fine.

0 Kudos
Reply

2,756 Views
mikhailgeister
Contributor I

Hi Hui Shao,

Were you able to build successfully OBDS for i.MX53 QSB board?  Did OBDS run fine on QSB w/o any modifications?
Please let me know as I need to understand if I could go this route.


Thanks,
Mikhail.

0 Kudos
Reply

2,756 Views
KarlLu
Contributor I

The code is compiled with the ARM-NONE-EABI GCC toolchain obtained here:

https://sourcery.mentor.com/sgpp/lite/arm/portal/subscription3053

Click on "Download Sourcery G++ Lite 2011.03-42" and download the Windows or Linux tar ball

or installer

0 Kudos
Reply

2,756 Views
HuiShao
Contributor I

Thanks! Karl. Any requirement for the specific version of that toolchain ?

0 Kudos
Reply

2,756 Views
KarlLu
Contributor I

you are using arm-none-linux-gnueabi-gcc but for OBDS building, you need to use arm-none-eabi-gcc.


0 Kudos
Reply

2,756 Views
caoping
Contributor II

hi,when download the software,and use the CodeSourcery,and modify

make.def content,which is in OBDS

modify

CC= arm-none-eabi-gcc

AS = arm-none-eabi-as

AR = arm-none-eabi-ar

LN = arm-none-eabi-ld

into

CC= /home/lucid/CodeSourcery/Sourcery_CodeBench_for_ARM_EABI/bin/arm-none-eabi-gcc

AS = /home/lucid/CodeSourcery/Sourcery_CodeBench_for_ARM_EABI/bin/arm-none-eabi-as

AR = /home/lucid/CodeSourcery/Sourcery_CodeBench_for_ARM_EABI/bin/arm-none-eabi-ar

LN = /home/lucid/CodeSourcery/Sourcery_CodeBench_for_ARM_EABI/bin/arm-none-eabi-ld

and run"make TARGET=mx53 BOARD=sbrth_lcb BOARD_VERSION=1",

and the  shell will display "

Build has completed.ELF file available in:

=>/home/lucid/Desktop/obds/output/mx53/bin"


and it will produce "diag-obds-mx53sbrth_lcb-rev1.bin" in the catalogue "/home/lucid/Desktop/obds/output/mx53/bin" ,the size of it is 619.2KB,and i flash it into SD,the Board can't boot,but when i flash "diag-obds-mx53sbrth_lcb-rev1.bin" in the catalogue"/home/lucid/Desktop/I201139_mx53_sbrth_lcb_release" with the same method,and the file size is 624.5KB,it boots ok ,i don't know why?

i use i.MX53 QSB board.


0 Kudos
Reply

2,755 Views
caoping
Contributor II

the compiler process is in  attachment file,but it can't run on Quick board.

0 Kudos
Reply

2,755 Views
HuiShao
Contributor I

hi  Kjell

 

Is your problem got resolved? Can you please share the solution?

 

I downloaded 201050_mx53_sbrth_lcb_release.zip from Freescale website but I am not sure if it is the one for QSB. Tried to build it but got simiar failure like yours.

 

Thanks in advance!

0 Kudos
Reply

2,755 Views
keekis
Contributor I

I forwarded the document I got from Freescale support.

It describes where to get the OBDS source and it worked for me without
any link segmentation fault.

0 Kudos
Reply

2,755 Views
Liranbenhaim
Contributor I
hi can you please tell me where can i find the obds source code i searched the web and freescale web site and didnt find it thanks liran liran@bna.co.il
0 Kudos
Reply