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.

RTSC/XDCtools: How do multiple cfg files mix in a library/application setup?

Other Parts Discussed in Thread: SYSBIOS

Hello,

How do the codes generated from multiple .cfg files mix in an application build?

What will happen if the .cfg of a library includes some settings which are inconsistent to the settings in my app or another library used? Especially: Will I see some warning or error if, e.g., I choose different HAL implementations for the *Proxy components?

Context:

  • I am developing a SYS/BIOS-based application which uses "a lot of" third-party libraries (e.g., TI Industrial SDK components) and some home-made libraries. The application and some of the libraries build upon example projects from different vendors.
  • The application itself and several library projects each include an own .cfg file.
  • For the present app, I am using XDCtools 3.31.3.43_core, CCS 6.1.3, ISDK 2.1.2.1, SYS/BIOS 6.42.3.35

Thanks in advance,

Benedikt

  • Hi Benedikt,

    You should have only one .cfg file in your project.  Can you take the .cfg that comes with the library and incorporate it into your app's .cfg?  Are the libraries building with a .cfg file included?  If so, you could take it out of the library build.

    Best regards,

    Janet

  • Hi Janet,

    Thankyou for this information. I am going to try this out.


    Additionally, if cfg files are not relevant/allowed for library builds, I would suggest that the .cfg files are removed from the library source projects delivered with the TI packages (e.g., ISDK). I found some app.cfg files in library source directories

    • sysbios_ind_sdk_2.1.1.2/sdk/board/app.cfg
    • sysbios_ind_sdk_2.1.1.2/sdk/os_drivers/sys_bios_driver_am335x.cfg / sysbios_ind_sdk_2.1.1.2/sdk/os_drivers/sys_bios_driver_am437x.cfg
    • some subdirectories of
      sysbios_ind_sdk_2.1.1.2/sdk/protocols/

    If I understand you well, the cfg files of the numerous example projects next to the directories listed above are applications, so the cfg files of these are in the right place.

  • Hi Benedikt,

    It may be that the library requires something that the app must configure.  Can you post one of your library .cfg files?

    Best regards,

    Janet

  • Hi Janet,

    I have attached one of the two cfg files delivered in the os_drivers directory of the ISDK 2.1.1.2 (CCS project name: sys_bios_driver)

    Best regards,

    Benedikt

    2388.sys_bios_driver_am335x.cfg

  • Hi Benedikt,

    It looks like this library doesn't need anything special, except maybe a large heap and system stack size.  You may want to make sure the app's .cfg file has a heap and stack size with values greater than or equal to what's in the library .cfg file:

    /*
     * The BIOS module will create the default heap for the system.
     * Specify the size of this default heap.
     */
    BIOS.heapSize = 0x10000;

    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x8000;

    Best regards,

        Janet

  • Hello Janet,

    1. Thankyou for the hints on this example. Could you please point me to some guideline/HowTo I can apply to libraries in general? Should I just use the union of all RTSC feature sets, taking the maximum (or the sum?) of countable resources like RAM/ROM?
    2. I tried out what you suggested before, building the ISDK sub-library "board_support" without its cfg file "app.cfg" (actually, I renamed the cfg file into app.DONT_cfg so CCS apparently didn't find it, and deleted all build artifact directories).
      Sadly, the build did not pass. Obviously, a compiler configuration file generated from the cfg is needed for each compile step. See the following log for more detail: 7635.build_board_support_without_cfg.log
    3. As a consequence, I cannot just discard the library cfg, so there must be some procedure to merge the cfg files of libraries with the one used for application and linking. I have skimmed through the documentation of RTSC (aka XDCtools), but it is pretty extensive and generic, so I may have missed something. What I found mostly dealed with creating a single RTSC package/bundle and using it inside a "simple" application but not how to combine several libraries.

    Again, thanks for your efforts,

    Benedikt

  • Hi Benedikt,

    I'm not familiar with the Industrial SDK, so I installed it to have a look at it.  It looks like the project for os_drivers is a RTSC static library, .  I was able to build that project as is, but when I tried to exclude the .cfg files from the build, I got the same error as you, that the compiler.opt could not be found (this files is generated from a .cfg file).  I'm not sure why the ISDK is including .cfg files with their libraries.  Maybe so the app won't need one?  You may want to post this question on the device forum:

    I couldn't find any information in the ISDK Getting Started Guide or User's Guide about this either.  One thing you could try is to create a new os_driver project as a static library, and not a RTSC static library.  You'd have to get all the compiler options from the original project and the generated compiler.opt file.

    Best regards,

    Janet

  • Hi Janet,

    janet said:
    I'm not familiar with the Industrial SDK, so I installed it to have a look at it.  It looks like the project for os_drivers is a RTSC static library, .  I was able to build that project as is, but when I tried to exclude the .cfg files from the build, I got the same error as you, that the compiler.opt could not be found (this files is generated from a .cfg file).  I'm not sure why the ISDK is including .cfg files with their libraries.  Maybe so the app won't need one? 

    Thanks for reproducing the situation. I need RTSC configuration in my application (or I need it within some other libraries, which wouldn't solve my problem either).

    janet said:
    I couldn't find any information in the ISDK Getting Started Guide or User's Guide about this either.

    These documents were also part of what I have examined before. When writing to this forum, I actually hoped you could get some additional information from the ISDK team. I will post the question to the device forum as you suggested.

    janet said:
    One thing you could try is to create a new os_driver project as a static library, and not a RTSC static library.  You'd have to get all the compiler options from the original project and the generated compiler.opt file.

    I do not want to generate/configure a new library out of the ISDK sources "from scratch" as this would cancel many of the benefits of using a manufacturer-supplied HW/OS integration library.

    Best regards,

    Benedikt

  • Janet,
    based on the info from the Sitara thread are you able to provide more generic advice here?
    I assume it will take some time until industrial sw changes.

    regards,
    Frank
  • Hi,
    We generally discourage posting a new question to an old closed thread because the person who answered before may no longer be available, and also it will allow whomever is currently assigned to monitor the forum to respond to you more quickly. For these reasons, I suggest you start a new thread with your question and reference this thread.

    Thank you
  • Dear Mr. Guinto,

    I would like to confirm that I am still listening to this thread. Frank Walzer has posted his question after we discussed the topic yesterday.

    Further answers to this thread are highly appreciated.

    Best regards,

    Benedikt