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.

RTOS/AM5728: Custom resource table not in generated .elf file

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi,

I'm trying to include IPC support for the NIMU_BasicExample_evmAM572x_c66Example. I followed the instructions in "Adding IPC to an existing TI RTOS application on the DSP". Additional to that I had to allocate more memory for the different regions (I updated it in config.bld / and rsc_table_vayu_dsp.c). I had previously a compile error. When I check the generated .map it looks expected.

******************************************************************************
               TMS320C6x Linker Unix v8.2.2                    
******************************************************************************
>> Linked Thu Feb 14 17:06:04 2019

OUTPUT FILE NAME:   <NIMU_BasicExample_evmAM572x_c66xExampleProject_IPC.out>
ENTRY POINT SYMBOL: "ti_sysbios_family_c64p_Hwi0"  address: 95051400


MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill
----------------------  --------  ---------  --------  --------  ----  --------
  L2SRAM                00800000   00040000  00000000  00040000  RW X
  OCMC_RAM1             40300000   00080000  00000000  00080000  RW X
  OCMC_RAM2             40400000   00100000  00000000  00100000  RW X
  OCMC_RAM3             40500000   00100000  00000000  00100000  RW X
  EXT_CODE              95000000   00200000  00051330  001aecd0  RW X
  EXT_DATA              95200000   00500000  0013c724  003c38dc  RW  
  EXT_HEAP              95700000   00300000  00000000  00300000  RW  
  TRACE_BUF             9f000000   00060000  00008004  00057ffc  RW  
  EXC_DATA              9f060000   00010000  00000000  00010000  RW  
  PM_DATA               9f070000   00020000  00000000  00020000  RW X


SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
95000000    95000000    00000410   00000410    rw-
  95000000    95000000    00000410   00000410    rw- .resource_table
95000420    95000420    00050d20   00050d20    r-x
  95000420    95000420    00050d20   00050d20    r-x .text
95051400    95051400    00000200   00000200    r-x
  95051400    95051400    00000200   00000200    r-x .vecs
95200000    95200000    00130a48   00000000    rw-
  95200000    95200000    00120a48   00000000    rw- .far
  95320a48    95320a48    00010000   00000000    rw- .stack
95330a48    95330a48    0000839e   0000839e    r--
  95330a48    95330a48    0000839e   0000839e    r-- .const
95338de8    95338de8    0000252a   00000000    rw-
  95338de8    95338de8    0000252a   00000000    rw- .fardata
9533b314    9533b314    00000238   00000238    r--
  9533b314    9533b314    00000238   00000238    r-- .switch
9533b550    9533b550    00000234   00000000    rw-
  9533b550    9533b550    00000064   00000000    rw- .bss
  9533b5b4    9533b5b4    000001d0   00000000    rw- .neardata
9533b784    9533b784    00000024   00000000    r--
  9533b784    9533b784    00000024   00000000    r-- .rodata
9533b7a8    9533b7a8    00000064   00000064    rw-
  9533b7a8    9533b7a8    00000064   00000064    rw- .args
9533b810    9533b810    00000f20   00000f20    r--
  9533b810    9533b810    00000f20   00000f20    r-- .cinit
9f000000    9f000000    00008004   00000000    rw-
  9f000000    9f000000    00008004   00000000    rw- .tracebuf

Problem is, if I try to load it with remoteproc it tells me:

It gives me the error: "Failed to find resource table"

So I checked the generated file with readelf and got:

Elf file type is EXEC (Executable file)
Entry point 0x801971e0
There are 13 program headers, starting at offset 4946820

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000038 0x40300000 0x40300000 0x00000 0x01988 RW  0x8
  LOAD           0x000040 0x403019a0 0x403019a0 0x00860 0x00860 R E 0x20
  LOAD           0x000900 0x80000000 0x80000000 0x00000 0x1582c8 RW  0x80
  LOAD           0x000900 0x801582c8 0x801582c8 0x00018 0x00018 R   0x4
  LOAD           0x000920 0x801582e0 0x801582e0 0x48860 0x48860 R E 0x20
  LOAD           0x049180 0x801a0b40 0x801a0b40 0x00000 0x10000 RW  0x8
  LOAD           0x049180 0x801b0b40 0x801b0b40 0x04bd6 0x04bd6 R   0x8
  LOAD           0x04dd58 0x801b5718 0x801b5718 0x00000 0x025e8 RW  0x8
  LOAD           0x04dd58 0x801b7d00 0x801b7d00 0x00000 0x0001c R   0x4
  LOAD           0x04dd58 0x801b7d1c 0x801b7d1c 0x00214 0x00214 R   0x4
  LOAD           0x04e000 0x801b8000 0x801b8000 0x00200 0x00200 R E 0x400
  LOAD           0x04e200 0x801b8200 0x801b8200 0x00000 0x00120 RW  0x8
  LOAD           0x04e200 0x801b8320 0x801b8320 0x018c0 0x018c0 R   0x8

 Section to Segment mapping:
  Segment Sections...
   00     BOARD_IO_DELAY_DATA
   01     BOARD_IO_DELAY_CODE
   02     .far
   03     .const.1
   04     .text
   05     .stack
   06     .const.2
   07     .bss .neardata .fardata
   08     .rodata
   09     .switch
   10     .vecs
   11     .cio
   12     .cinit

This kind of doesn't make much sense to me. I have the .cfg entry to use the custom resource table as explained in the guide

/* Override the default resource table with my own */
var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
Resource.customTable = true;

Additionally I had first some linking errors before I increased the memory sizes.