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: Multi-segmented application load to DSP

Part Number: AM5728

Tool/software: TI-RTOS

Hi,

I am currently working on an issue required by customer. We have TI RTOS running on DSP and tasks should somehow loaded be after the DSP already boots, already runing RTOS with some background housekeeping tasks. Real tasks are in a separate project and now I have an .out file of the RTOS and .out file of the tasks. Their memories don't overlap. There are quite a few approaches on doing this and 3 I could come up with0 are:

1. Make a single .out file from rtos.out and tasks.out and run it via remoteproc.

I used this wiki article:processors.wiki.ti.com/.../Combining_executable_files and failed to do so. I can't get the lnk.cmd right. or something. build fails whilst linking. BTW what is ROM image and how is it used in Sitara DSP ?

second approach is to use dynamic linking. Described in chapter 12 here: but this method seems outdated since tools and examples are from 2012, using ol'e SYSLINK. And I think that it colides with remoteproc and CMEM since they don't allow linux to do crumpets on the memory.

and last but not least to modify the remoteproc driver to load two images during probe function, by changing hardcoded link locations in /lib/firmware.

Could someone please say which path of three would be the best, and maybe some directions in the first case, since it seems the simplest (how to adjust the lnk.cmd to accomodate two files).

was anyone been able to do this sort of thing ?

Kind regards,

Nikola

  • The RTOS team have been notified. They will respond here.
  • Hello Nikola,

    Just to clarify, there are two separate projects and you are looking to load their .out files to the same core, right?

    Is combining the projects (taking the tasks from one and adding them to the other) so that you have one .out file an option?
  • Hi Sahin,

    yes that is right. And combining projects is unfortunately a no. The customer will be building the project with the tasks and will deliver the .out file. :(

    Thanks and kind regads,

    Nikola

  • Nikola,

    From our remoteproc developer regarding loading multiple .out files to a single core:

    "No, it is not possible. We do not support any dynamic loading of secondary libraries with in-kernel remoteproc infrastructure. "

    I'm still looking into whether combining the .out files is an option.
  • Hi Sahin,

    Thank you so much for your efforts. I have created a kernel driver which relies on remoteproc functions like rproc_get_by_phandle, rproc_load_segments which in theory should load .elf file to memory, only problem is DSP suspension before and waking it up after the .elf file of the tasks loads.  It would not change state and get kernel panic before I get to load memory segments. I am still working on this, and will give it a whirl for a week or so before giving this method up, but I think that combining .out files is a more viable and simple option. I will really appreciate if you could find something more about it.

    Thank you and regards,

    Nikola

  • Hi Nikola,

    I have some more info regarding combining .out files.

    Combining two .out files with both .out files having a TI-RTOS kernel & Tasks running would not work. If one of the .out files contains only functions, you can ask the customer to provide it as a library and link it, or they can provide it as a header file.

    If the binaries don't need to be run at the same time, remoteproc should be able to handle loading and running them consecutively.

    I hope this helps.
  • Hi Sahin,

    could you please describe in more detail how to load and run two binaries consecutively.

    Thank you very much!

    Kind regards,

    Nikola