AnsweredAssumed Answered

NDSO-IIO compile failure & crash

Question asked by Ashish on Jun 6, 2012
Latest reply on Jun 6, 2012 by Aaronwu

We’re currently validating the IIO framework for ADSP-BF527 based TLL6527M platform. We’re using the AD7606 ADC connected to the SPI port of Blackfin. We were able to successfully capture the samples from the ADC using sysfs trigger. Next we want to use the ndso application for shipping the samples over the Ethernet interface. But compilation failed when trying to build the ndso application. See the log below:

 

Blackfin uClinux distro version: 2011R1-RC3

 

  1. NDSO compilation failure log:

make[5]: Entering directory `/home/ashish/Software/2011R1_sources/working-uclinux/blackfin-linux-dist_RC3/user/blkfin-apps/ndso'

 

for i in thttpd src_ndso_iio ; do make -C $i romfs || exit $? ; done

 

make[6]: Entering directory `/home/ashish/Software/2011R1_sources/working-uclinux/blackfin-linux-dist_RC3/user/blkfin-apps/ndso/thttpd'

 

romfs-inst.sh /bin/ndso

 

romfs-inst.sh -e CONFIG_USER_PPIFPGACGI -a "t_httpd &" /etc/rc

make[6]: Leaving directory `/home/ashish/Software/2011R1_sources/working-uclinux/blackfin-linux-dist_RC3/user/blkfin-apps/ndso/thttpd'

make[6]: Entering directory `/home/ashish/Software/2011R1_sources/working-uclinux/blackfin-linux-dist_RC3/user/blkfin-apps/ndso/src_ndso_iio'

romfs-inst.sh ndso /home/httpd/cgi-bin/ndso.cgi

 

cp: cannot create regular file `/home/ashish/Software/2011R1_sources/working-uclinux/blackfin-linux-dist_RC3/romfs/home/httpd/cgi-bin/ndso.cgi': No such file or directory

make[6]: *** [romfs] Error 1

make[6]: Leaving directory `/home/ashish/Software/2011R1_sources/working-uclinux/blackfin-linux-dist_RC3/user/blkfin-apps/ndso/src_ndso_iio'

 

 

  1. To rectify the error, /home/httpd/cgi-bin/ folder was created. After this the image was built successfully. We modified the makefile (blackfin-linux-dist_RC3/user/blkfin-apps/ndso/src_ndso_iio/Makefile) as follows to create the missing directory:

 

romfs:

     $(ROMFSINST) -d $(EXEC) /home/httpd/cgi-bin/ndso.cgi

 

The -d option creates directories of its not already present.

 

  1. Now it compiled fine, so we booted the kernel and ran ndso, but as we try to open the website, it crashes

 

root:/> ndso &

[1] 486 ndso

root:/> NULL pointer access

Deferred Exception context

CURRENT PROCESS:

COMM=ndso PID=486  CPU=0                                                       

TEXT = 0x02d50000-0x02d59ba0        DATA = 0x02bd2ba0-0x02bd39b0               

BSS = 0x02bd39b0-0x02d80000  USER-STACK = 0x02d9fec0                          

                                                                               

return address: [0x02d51f82]; contents of:                                     

0x02d51f60: 6007  912c  e51a 0021  9115  e12a 1138  5b11                    

0x02d51f70: 320e  9062  5c92 3042  4f18  5005 3228  e409                    

0x02d51f80: 0489 [a168] 67f8  b168  a128 5081  a0e8  cc04                    

0x02d51f90: 4220  b12a  0000 e120  012b  0901 1c10  b9fb                    

 

ADSP-BF527-0.2 500(MHz CCLK) 100(MHz SCLK) (mpu off)                           

Linux version 3.0.8-ADI-2011R1RC3_DEV_0_5_AG (ashish@ashish.tll) (gcc version 42

 

SEQUENCER STATUS:               Not tainted                                    

SEQSTAT: 00002027  IPEND: 0008 IMASK: ffff  SYSCFG: 0006                     

EXCAUSE   : 0x27

physical IVG3 asserted : <0xffa00710> { _trap + 0x0 }                        

RETE: <0x00000000> /* Maybe null pointer? */                                  

RETN: <0x02090000> /* kernel dynamic memory */                                

RETX: <0x00000480> /* Maybe fixed code section */                             

RETS: <0x02d51f52> [ /bin/ndso + 0x1f52 ]                                     

PC  : <0x02d51f82> [ /bin/ndso + 0x1f82 ]                                     

DCPLB_FAULT_ADDR: <0x00000014> /* Maybe null pointer? */                       

ICPLB_FAULT_ADDR: <0x02d51f82> [ /bin/ndso + 0x1f82 ]

PROCESSOR STATE:

R0 : 00000000    R1 : 00000000    R2 : 00000355    R3 : 0000ecac              

R4 : 01dba716    R5 : 00000000    R6 : 02d60004    R7 : 00000000              

P0 : 00000006    P1 : 02d60004    P2 : 00000000    P3 : 02bd3400              

P4 : 02d61140    P5 : 00000000    FP : 02d9bff0    SP : 0208ff24              

LB0: 02aec59f    LT0: 02aec59e    LC0: 00000000                               

LB1: 02b9e137    LT1: 02b9e136    LC1: 00000000                               

B0 : 00000137    L0 : 00000000    M0 : fffffffc    I0 : 02d9bbec              

B1 : 000000c0    L1 : 00000000    M1 : 00000001    I1 : 02da0d54              

B2 : 7ffff000    L2 : 00000000    M2 : 00001802    I2 : 00000003              

B3 : 00000000    L3 : 00000000    M3 : 0000005b    I3 : 00000007              

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000              

USP : 02d9bfe0  ASTAT: 02002001

 

Hardware Trace:

   0 Target : <0x00003fdc> { _trap_c + 0x0 }                                   

Source : <0xffa006a4> { _exception_to_level5 + 0xa4 } JUMP.L              

   1 Target : <0xffa00600> { _exception_to_level5 + 0x0 }                      

Source : <0xffa004b4> { _bfin_return_from_exception + 0x18 } RTX          

   2 Target : <0xffa0049c> { _bfin_return_from_exception + 0x0 }               

Source : <0xffa00558> { _ex_trap_c + 0x74 } JUMP.S                        

   3 Target : <0xffa004e4> { _ex_trap_c + 0x0 }                                

Source : <0xffa0076a> { _trap + 0x5a } JUMP (P4)                          

   4 Target : <0xffa00710> { _trap + 0x0 }                                     

FAULT : <0x02d51f82> [ /bin/ndso + 0x1f82 ] P0 = W[P5 + 5]               

Source : <0x02d51f7e> [ /bin/ndso + 0x1f7e ] R1 = [P1 + 0x24]             

   5 Target : <0x02d51f52> [ /bin/ndso + 0x1f52 ]                              

Source : <0x02d558b2> [ /bin/ndso + 0x58b2 ] RTS                          

   6 Target : <0x02d558a6> [ /bin/ndso + 0x58a6 ]                              

Source : <0x02b8ecd4> [ /lib/libc.so.0 + 0xecd4 ] RTS                     

   7 Target : <0x02b8eccc> [ /lib/libc.so.0 + 0xeccc ]                         

Source : <0x02b8ecbe> [ /lib/libc.so.0 + 0xecbe ] IF CC JUMP pcrel (BP)   

   8 Target : <0x02b8ecb6> [ /lib/libc.so.0 + 0xecb6 ]                         

Source : <0xffa00c58> { __common_int_entry + 0xcc } RTI                   

   9 Target : <0xffa00bf6> { __common_int_entry + 0x6a }                       

Source : <0xffa00fb0> { _evt_system_call + 0x64 } JUMP.S                  

  10 Target : <0xffa00fb0> { _evt_system_call + 0x64 }                         

Source : <0xffa008f6> { _system_call + 0xbe } RTS                         

  11 Target : <0xffa008f2> { _system_call + 0xba }                             

Source : <0xffa008e2> { _system_call + 0xaa } IF !CC JUMP pcrel           

  12 Target : <0xffa008d8> { _system_call + 0xa0 }                             

Source : <0xffa008c8> { _system_call + 0x90 } IF !CC JUMP pcrel           

  13 Target : <0xffa008a2> { _system_call + 0x6a }                             

Source : <0x00048678> { _sys_close + 0x28 } RTS                           

  14 Target : <0x00048670> { _sys_close + 0x20 }                               

Source : <0x000486dc> { _sys_close + 0x8c } IF !CC JUMP pcrel (BP)        

  15 Target : <0x000486c2> { _sys_close + 0x72 }                               

Source : <0x00048638> { _filp_close + 0x44 } RTS                          

Userspace Stack                                                                

Stack info:

SP: [0x02d9bfe0] <0x02d9bfe0> [ ndso + 0x1bfe0 ]                              

Memory from 0x02d9bfe0 to 02d9c000                                            

02d9bfe0:[02d9bffc] 02d52024  0000122c 02bd3400  02d9fde0  02d52ffe 02d60004 

Return addresses in stack:

 

A. Could you please look into this issue and suggest resolution

B. We are using the latest release distro 2011R1-RC3, should we move to the current 2011R1 head, has been any patches to fix ndso?

 

Regards,

Ashish

Outcomes