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.

problem loading dsp application on DM8168 evm using syslink.

I made an xdc version of "Hello World" application and tried to load it with the syslink slaveloader app.

Below is the code and makefile I used:

prog.c

#include <xdc/runtime/System.h>

int main()
{
    System_printf("Hello World\n");

    return 0;
}

 

common.mak

XDCROOT := ~/ti-ezsdk_dm816x-evm_5_02_01_59/component-sources/xdctools_3_22_01_21
C6XTOOLS := ~/ti-ezsdk_dm816x-evm_5_02_01_59/dsp-devkit/cgt6x_7_2_3

RMCMD := rm

## --------build tools -------- ##
CONFIGURO := $(XDCROOT)/xs xdc.tools.configuro
LOADER := $(XDCROOT)/xs xdc.tools.loader
CC := $(C6XTOOLS)/bin/cl6x

## -------- build parameters -------- ##
CONFIG = cfgsite
TARGET = ti.targets.elf.C674
PLATFORM = ti.platforms.evmTI816X
PROGNAME = prog

## -------- all-rule -------- ##
all : $(PROGNAME).out

## -------- config-rule -------- ##
$(CONFIG)/linker.cmd $(CONFIG)/compiler.opt : $(PROGNAME).cfg
    $(CONFIGURO) -c $(C6XTOOLS) -t $(TARGET) -p $(PLATFORM) -o $(CONFIG) $(PROGNAME).cfg

## -------- compile-rule -------- ##
$(PROGNAME).obj : $(PROGNAME).c $(CONFIG)/compiler.opt
    $(CC) -@$(CONFIG)/compiler.opt -c -g -D_DEBUG=1 $(PROGNAME).c

## -------- link-rule -------- ##
$(PROGNAME).out : $(PROGNAME).obj $(CONFIG)/linker.cmd
    $(CC) -z -c $^ --dynamic -o $@ -l $(C6XTOOLS)/lib/rts6740_elf.lib -m $(PROGNAME).map

## -------- clean-rule -------- ##
clean :
    $(RMCMD) -rf $(CONFIG) *.obj *.out *.map

 

This is what I've got when I ran slaveloader:

Attached to slave procId 0.
BUG: Your driver calls ioremap() on system memory.  This leads
to architecturally unpredictable behaviour on ARMv6+, and ioremap()
will fail in the next kernel release.  Please fix your driver.
------------[ cut here ]------------
WARNING: at arch/arm/mm/ioremap.c:211 __arm_ioremap_pfn_caller+0x58/0x190()
Modules linked in: bufferclass_ti omaplfb pvrsrvkm ti81xxhdmi ti81xxfb vpss syslink ipv6
Backtrace:
[<c0046b44>] (dump_backtrace+0x0/0x110) from [<c0364b48>] (dump_stack+0x18/0x1c)
 r7:00000000 r6:c004a4e4 r5:c041cbc3 r4:000000d3
[<c0364b30>] (dump_stack+0x0/0x1c) from [<c0067d00>] (warn_slowpath_common+0x54/0x6c)
[<c0067cac>] (warn_slowpath_common+0x0/0x6c) from [<c0067d3c>] (warn_slowpath_null+0x24/0x2c)
 r9:00000002 r8:00000000 r7:bf07e8e4 r6:0008b000 r5:00002de0
r4:00000000
[<c0067d18>] (warn_slowpath_null+0x0/0x2c) from [<c004a4e4>] (__arm_ioremap_pfn_caller+0x58/0x190)
[<c004a48c>] (__arm_ioremap_pfn_caller+0x0/0x190) from [<c004a6a0>] (__arm_ioremap_caller+0x64/0x6c)
[<c004a63c>] (__arm_ioremap_caller+0x0/0x6c) from [<c005bfa0>] (omap_ioremap+0x60/0x64)
 r6:00000000 r5:00002de0 r4:8b000000
[<c005bf40>] (omap_ioremap+0x0/0x64) from [<bf07e8e4>] (MemoryOS_map+0x1e0/0x398 [syslink])
 r7:ca10b108 r6:00000000 r5:ca10b0a0 r4:d088d000
[<bf07e704>] (MemoryOS_map+0x0/0x398 [syslink]) from [<bf04d4d4>] (_ProcMgr_map+0x1cc/0x4a0 [syslink])
 r8:ca10b184 r7:ca10b108 r6:00000000 r5:06a85000 r4:ca10b184
[<bf04d308>] (_ProcMgr_map+0x0/0x4a0 [syslink]) from [<bf05b974>] (ElfLoaderTrgWrite_copy+0x13c/0x3a0 [syslink])
[<bf05b838>] (ElfLoaderTrgWrite_copy+0x0/0x3a0 [syslink]) from [<bf05ecf8>] (DLIF_copy+0x18/0x24 [syslink])
[<bf05ece0>] (DLIF_copy+0x0/0x24 [syslink]) from [<bf05d3c4>] (DLOAD_load+0x1e4/0xaa8 [syslink])
[<bf05d1e0>] (DLOAD_load+0x0/0xaa8 [syslink]) from [<bf05abc4>] (ElfLoader_load+0x270/0x330 [syslink])
[<bf05a954>] (ElfLoader_load+0x0/0x330 [syslink]) from [<bf04b2d0>] (Loader_load+0xec/0x164 [syslink])
[<bf04b1e4>] (Loader_load+0x0/0x164 [syslink]) from [<bf04f8f4>] (ProcMgr_load+0x21c/0x2f8 [syslink])
[<bf04f6d8>] (ProcMgr_load+0x0/0x2f8 [syslink]) from [<bf0519d4>] (ProcMgrDrv_ioctl+0xcb0/0x1dd8 [syslink])
[<bf050d24>] (ProcMgrDrv_ioctl+0x0/0x1dd8 [syslink]) from [<c00cbe68>] (vfs_ioctl+0x28/0x44)
 r8:beae0bc8 r7:00000007 r6:00000007 r5:cbdd3400 r4:00000000

... (skipped part of the output)

[<bf04d308>] (_ProcMgr_map+0x0/0x4a0 [syslink]) from [<bf05b974>] (ElfLoaderTrgWrite_copy+0x13c/0x3a0 [syslink])
[<bf05b838>] (ElfLoaderTrgWrite_copy+0x0/0x3a0 [syslink]) from [<bf05ecf8>] (DLIF_copy+0x18/0x24 [syslink])
[<bf05ece0>] (DLIF_copy+0x0/0x24 [syslink]) from [<bf05d3c4>] (DLOAD_load+0x1e4/0xaa8 [syslink])
[<bf05d1e0>] (DLOAD_load+0x0/0xaa8 [syslink]) from [<bf05abc4>] (ElfLoader_load+0x270/0x330 [syslink])
[<bf05a954>] (ElfLoader_load+0x0/0x330 [syslink]) from [<bf04b2d0>] (Loader_load+0xec/0x164 [syslink])
[<bf04b1e4>] (Loader_load+0x0/0x164 [syslink]) from [<bf04f8f4>] (ProcMgr_load+0x21c/0x2f8 [syslink])
[<bf04f6d8>] (ProcMgr_load+0x0/0x2f8 [syslink]) from [<bf0519d4>] (ProcMgrDrv_ioctl+0xcb0/0x1dd8 [syslink])
[<bf050d24>] (ProcMgrDrv_ioctl+0x0/0x1dd8 [syslink]) from [<c00cbe68>] (vfs_ioctl+0x28/0x44)
 r8:beae0bc8 r7:00000007 r6:00000007 r5:cbdd3400 r4:00000000
[<c00cbe40>] (vfs_ioctl+0x0/0x44) from [<c00cc578>] (do_vfs_ioctl+0x500/0x540)
[<c00cc078>] (do_vfs_ioctl+0x0/0x540) from [<c00cc610>] (sys_ioctl+0x58/0x7c)
[<c00cc5b8>] (sys_ioctl+0x0/0x7c) from [<c0042da0>] (ret_fast_syscall+0x0/0x30)
 r8:c0042f48 r7:00000036 r6:00008c58 r5:00000000 r4:00008d04
---[ end trace adb107de5444e5f4 ]---
Loaded file ./prog.out on slave procId 0.
Started slave procId 0.

I was able to build and successfully run syslink sample application, so it is not a tool chain issue.

I would highly appreciate if somebody could help me solve this problem.

 

Igor

  • Igor,

    This problem occurs when your slave executable memory map has an overlap with the Linux memory. To ensure that the Linux memory does not conflict with what you are reserving for the slave, you need to make sure that the mem=<> bootargs parameter is correctly set to reserve the required amount of memory for non-Linux usage.

    To understand the slave memory map, you can look at the memory map for the slave executable (check the map file) or the place where you are configuring the memory map. If you want a different memory map from the default in XDC (which you will, if you want to use it with Linux), you can either create your own platform (syslink/samples/rtos/platforms -- See the Platform.xdc file), or you can update config.bld file for the memory map.

    Regards,
    Mugdha