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.

Compiler/TMS320F28377D: Loadable software compilation

Part Number: TMS320F28377D

Tool/software: TI C/C++ Compiler

Hello,

A bit of context before I go into the questions:

In our project, we have architectured our software as follows:

    • Bootloader software
    • Dataloader software
    • Application software
    • Flash manager software

The bootloader software and the dataloader software are so-called resident software, and are obviously in the CPU Flash.

Meaning they are programmed thanks to an XDS200 probe during the manufacturing process.
The bootloader software performs basic initializations of the CPU (PLL, etc...) and then depending on a GPIO input either launch the dataloader software or the application software.

The application software is also in the CPU Flash but can be reprogrammed thanks to the dataloader software and a custom CAN bus dataloader we are developping.

The flash manager software (library in fact) is not in the CPU Flash, it is loaded in RAM at the beginning of the dataloading thanks to the dataloader software through the CAN bus and is in charge of performing the flash erase/program operations. We did not integrate that part into the dataloader software in order to avoid integrating the Flash API you provide into our operational code for certification reasons.

The flash manager library and the application software are loaded through the CAN bus, I did some tries and am planning to use hex2000 to convert the .out generated file into bytes data.

So now that I have explained the context, let's go into the questions part regarding the way to generate those software.

For the bootloader and dataloading software, basically they are the same software (the dataloader software being a function inside the bootloader software) so we this software in a normal way with the adequate with the main and the _cinit routines.

For our application software, we won't go back to the bootloader software from it so basically it will also be generated in a normal way. It means we run the startup routines again but that's not an issue as we won't go back.

However, where I am questioning myself is about the flash manager software.

This one is a set of functions that are called by the dataloader software through a function pointer call as we will know after generation where the function resides in memory, but:

  • It has no main function
  • It must not include the startup functions (_cinit...)
  • It must not be optimized as we want those functions to be kept

I read something about dynamic library in the TMS320C28x Optimizing C/C++ Compiler v18.1.0.LTS user guide which I think is the solution but I didn't find any option related to that in CSS nor explanation in the TMS320C28x Assembly Language Tools v18.1.0.LTS user guide pointed in the doc. Am I right thinking dynamic library would be the solution ?

How would I configure my css project in order to generate that library from my set of functions ?

Will it still be a .out convertible into an .hex file thanks to hex2000 ?

Best regards,

Clément

  • Clément Letonnelier said:
    I read something about dynamic library in the TMS320C28x Optimizing C/C++ Compiler v18.1.0.LTS user guide

    You probably mean this sentence ...

    The linker combines object files to create a static executable or dynamic object file.

    Unfortunately, this is incorrect.  The underlined phrase should not be present.  I'll file an entry to get that removed.

    Clément Letonnelier said:
    Am I right thinking dynamic library would be the solution ?

    Unfortunately, no.  The C28x compiler tools can only build a static library or executable.

    Thanks and regards,

    -George