This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Kernel crash as Syslink loads DSP

Other Parts Discussed in Thread: SYSBIOS

I can use Syslink to load DSP example programs built using CCS on Windows.  

A project created from scratch (not derived from an example) crashes as shown below.

I need to know what is different or required that I am not aware of.

Also below is the first part of the .map file for each program.

The are using the same platform.  They are both set for elf output.

I was never able to find where the example project was specifying the code entry point.  I added the -e option to my project to make them match.

My program does not have any Syslink functions yet, but I'm not trying to run it, just load it.

This is on a DM8148 EVM

Thanks,

David

# ./slaveloader_debug load DSP sysBiosDemoPrj.out
Attached to slave procId 0.
Loading procId 0.
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c6234000
[00000000] *pgd=87308031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
last sysfs file: /sys/devices/virtual/syslinkipc/syslinkipc_FrameQ/dev
Modules linked in: ipv6 syslink
CPU: 0 Not tainted (2.6.37-ts-armv7l #1)
PC is at strlen+0x14/0x28
LR is at initialize_loaded_module+0x30/0x194 [syslink]
pc : [<c01af6b4>] lr : [<bf013a80>] psr: 80000013
sp : c730bce0 ip : c730bcf0 fp : c730bcec
r10: 00000000 r9 : c730bed8 r8 : cf66a000
r7 : 00000000 r6 : cf6c2000 r5 : cf6c8000 r4 : cf66a000
r3 : 00000000 r2 : 00000000 r1 : 00060000 r0 : 00000000
Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 86234019 DAC: 00000015
Process slaveloader_deb (pid: 175, stack limit = 0xc730a2e8)
Stack: (0xc730bce0 to 0xc730c000)
bce0: c730bd44 c730bcf0 bf013a80 c01af6ac c730bd1c c730bd00 bf01278c bf032eac
bd00: cf67d000 cf67d000 cf6c2000 cf67d000 c730bd2c c730bd20 bf016030 bf012730
bd20: 00000001 03046000 cf56b000 00000000 cf66a000 00000000 c730bdb4 c730bd48
bd40: bf014670 bf013a5c c730bd84 c730bd58 cf67d000 c00c271c 00000000 00000000
bd60: c730bd84 c730bd70 c6610880 cf67d000 cf67a000 c730bdcc c730bdb4 c730bd88
bd80: bf03399c cf6c2000 00000000 cf571000 03046000 cf56b000 00000000 00000000
bda0: c730bed8 00000000 c730bdfc c730bdb8 bf011a60 bf0145ac cf67a000 00000000
bdc0: 00000000 00000000 bf033c80 cf67d000 c730be0c cf56b000 00000000 00000000
bde0: cf67a000 c730bed8 cf67a000 00000000 c730be34 c730be00 bf0022d0 bf011804
be00: 00000000 c730bed8 00000000 00000000 cb253000 00000000 cf57d000 00000000
be20: 00000000 c730bed8 c730be74 c730be38 bf0069cc bf0021f0 00000000 c730bed8
be40: 00000000 00000000 00000013 00000000 bedcbc48 cf67a000 bedcbc48 bf0f9080
be60: c730a000 00000000 c730bf0c c730be78 bf0089a4 bf0067b8 00000000 c730bed8
be80: c730bea4 c730be90 00000000 60000013 c72be000 00000000 c730a000 00000012
bea0: 40f09000 00000000 c730bed4 c730beb8 c0063f64 c0063ed0 00000000 0485f000
bec0: cf57d000 bedcbf49 00000013 00000000 00000000 00000000 00000000 c7304000
bee0: c730bf18 c6d1b3c0 c730bf04 c6610200 bedcbc48 bedcbc48 00000007 00000000
bf00: c730bf74 c730bf10 c00d04b4 bf007e18 c72be000 00000012 386d47f8 10b07602
bf20: 00000002 c733f080 40f09000 c730bf70 00000000 00000012 c730a000 00000000
bf40: c730bf6c c730bf50 c00c30e8 c01d5a10 c6610200 bedcbc48 c020e0a2 00000007
bf60: 00000000 c730a000 c730bfa4 c730bf78 c00d0580 c00cffd4 c0396ecc 00000001
bf80: c733f094 bedcbc94 bedcbf40 00000000 00000036 c00437e8 00000000 c730bfa8
bfa0: c0043640 c00d0534 bedcbc94 bedcbf40 00000007 c020e0a2 bedcbc48 00000007
bfc0: bedcbc94 bedcbf40 00000000 00000036 bedcbc9c 00000000 00000000 bedcbc24
bfe0: 0000006c bedcbc00 00045c70 401e502c 60000010 00000007 876fe021 876fe421
Backtrace:
[<c01af6a0>] (strlen+0x0/0x28) from [<bf013a80>] (initialize_loaded_module+0x30/0x194 [syslink])
[<bf013a50>] (initialize_loaded_module+0x0/0x194 [syslink]) from [<bf014670>] (DLOAD_load+0xd0/0xa58 [syslink])
[<bf0145a0>] (DLOAD_load+0x0/0xa58 [syslink]) from [<bf011a60>] (ElfLoader_load+0x268/0x36c [syslink])
[<bf0117f8>] (ElfLoader_load+0x0/0x36c [syslink]) from [<bf0022d0>] (Loader_load+0xec/0x164 [syslink])
[<bf0021e4>] (Loader_load+0x0/0x164 [syslink]) from [<bf0069cc>] (ProcMgr_load+0x220/0x2fc [syslink])
[<bf0067ac>] (ProcMgr_load+0x0/0x2fc [syslink]) from [<bf0089a4>] (ProcMgrDrv_ioctl+0xb98/0x1c38 [syslink])
[<bf007e0c>] (ProcMgrDrv_ioctl+0x0/0x1c38 [syslink]) from [<c00d04b4>] (do_vfs_ioctl+0x4ec/0x560)
r8:00000000 r7:00000007 r6:bedcbc48 r5:bedcbc48 r4:c6610200
[<c00cffc8>] (do_vfs_ioctl+0x0/0x560) from [<c00d0580>] (sys_ioctl+0x58/0x7c)
r9:c730a000 r8:00000000 r7:00000007 r6:c020e0a2 r5:bedcbc48
r4:c6610200
[<c00d0528>] (sys_ioctl+0x0/0x7c) from [<c0043640>] (ret_fast_syscall+0x0/0x30)
r8:c00437e8 r7:00000036 r6:00000000 r5:bedcbf40 r4:bedcbc94
Code: e92dd800 e24cb004 e1a03000 e1a02003 (e4d31001)
---[ end trace 6638f72dafbae4fc ]---

First part of example app (loads)

******************************************************************************
TMS320C6x Linker PC v7.3.5
******************************************************************************
>> Linked Wed Jun 06 08:54:45 2012

OUTPUT FILE NAME: <messageQ_DSP.out>
ENTRY POINT SYMBOL: "ti_sysbios_family_c64p_Hwi0" address: 8b039c00


MEMORY CONFIGURATION

name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
OCMC 40300000 00020000 00000000 00020000 RW X
EXT_RAM 80000000 0a600000 00000000 0a600000 RW X
DDR2 8b000000 01ffdb00 00039dee 01fc3d12 RW X
HOST_DSP_NOTIFYMEM 8cffdb00 00002500 00000000 00002500 RW X
SR1 8d000000 00c00000 00c00000 00000000 RW X
SR0 8e000000 01000000 01000000 00000000 RW X

First part of my app (crashes kernel)

******************************************************************************
TMS320C6x Linker PC v7.3.1
******************************************************************************
>> Linked Mon Jun 11 14:38:40 2012

OUTPUT FILE NAME: <sysBiosDemoPrj.out>
ENTRY POINT SYMBOL: "ti_sysbios_family_c64p_Hwi0" address: 8b829000


MEMORY CONFIGURATION

name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
OCMC 40300000 00020000 00000000 00020000 RW X
EXT_RAM 80000000 0a600000 00000000 0a600000 RW X
DDR2 8b000000 01ffdb00 00829a0e 017d40f2 RW X
HOST_DSP_NOTIFYMEM 8cffdb00 00002500 00000000 00002500 RW X
SR1 8d000000 00c00000 00000000 00c00000 RW X
SR0 8e000000 01000000 00000000 01000000 RW X

  • In your .cfg script, make sure you have the following line:

        xdc.useModule ('ti.syslink.ipc.rtos.Syslink');

    That will ensure you get all the necessary linker flags (including the -e and the one I suspect you're missing, --dynamic).  If you're _really_ curious, you might peek at the ti/syslink/ipc/rtos/linkcmd.xdt file which is the script used to emit how these interesting linker flags when XDC's config step is run.

    Chris