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.

Design for _c_int00 ?

Other Parts Discussed in Thread: TMS320F28335

We are developing code to be used in aircraft during flight.  To run on a TMS320F28335.

As a result all code needs a design against which it can be reviewed and tested.  This includes TI-supplied code, including BOOT ROM and _c_int00.

We have found suitable documentation for BOOT ROM, but not _for c_int00 as yet.

So, where can I find design or other documentation for _c_int00 ?

We particularly need this information for the section that does various mode settings (such as “C28MAP”) and the auto-initialization of global variables.  I have found general information about what is going on, but nothing that is really design  or requirements for the final code.

Regards,
Giles Robinson

  • Giles,

    I'm not 100% clear on what you really need, but there is no design spec for the _c_int00 function that I know of.  There is a high-level description of what _c_int00 function does in the C2000 C-Compiler User's Guide, SPRU514E, section 4.3.2.

    Do you realize however that the source code for this is available?  Is in in the rts library source archive, file boot.asm (which basically just pulls in boot28.inc and that is where all the source code is).  If you're using CCSv5, you'll find the archive here: C:\TI\ccsv5\tools\compiler\C2000_6.1.2\lib\rtssrc.zip  (or some other compiler version folder, e.g. C2000_6.1.1, etc.).

    The source code is commented, so this should help you.

    Regards,

    David

  • Hi David,

    We are developing safety-critical software to be used on aircraft during flight (hence DO-178B level A applies, if you are familiar with this standard).  As a result all software has to be verified against requirements and design, which means anything we write + any TI code used.  TI code used means BOOT ROM code and c_int00.

    I am using a cut-down version of the code in boot28.inc (to remove unused stuff like C++ constructor initialisation), which effectively leaves lines 89-116 doing some sort of mode setup, and lines 127-171 which initialises global variables.  In order for this to be reviewed and tested, we need requirements/design against which this can be done.

    Some of the code is clear, e.g. “C28OBJ  ; select C28x object mode”.  However other lines are not.  For example “SPM 0  ; set product shift to 0”.  I have not found spru430e that helpful, though this may be as I’m no assembler expert.

    Is there somewhere that the CINIT table is fully described?  What’s in the code is quite sparse.

    Regards

  • Giles,

    Giles Robnson said:

    I am using a cut-down version of the code in boot28.inc (to remove unused stuff like C++ constructor initialisation), which effectively leaves lines 89-116 doing some sort of mode setup, and lines 127-171 which initialises global variables.  In order for this to be reviewed and tested, we need requirements/design against which this can be done.

    Some of the code is clear, e.g. “C28OBJ  ; select C28x object mode”.  However other lines are not.  For example “SPM 0  ; set product shift to 0”.  I have not found spru430e that helpful, though this may be as I’m no assembler expert.

    You are right that lines 89-116 are doing CPU initialization.  'SPM 0' is configuring the product mode shifter (a shifter on the output of the multiplier in the CPU).  The commenting says it is configuring status bit fields that are NOT initialized at reset.  This isn't correct, at least not for SPM.  The product mode shifter is initialized at reset.  The boot.asm is pretty much just making sure everything is set to the reset defaults.  The thinking here is maybe someone did not start the C environment up from reset (e.g., maybe they ran some assembly code first, or maybe they ran a secondary bootloader first that did some checksums on the main application, and now they're starting the independent main application.  So, the boot.asm wants everything to be starting from a known state and cannot rely on reset defaults to be there).

    The .cinit table is being processed as described in the library source.  Specifically:

    ****************************************************************************
    *  PROCESS CINIT INITIALIZATION TABLE.  TABLE IS IN PROGRAM MEMORY IN THE  *
    *  FOLLOWING FORMAT:                                                       *
    *                                                                          *
    *       .word  <length of init data in words>                              *
    *       .word  or .long <address of variable to initialize>                *
    *       .word  <init data>                                                 *
    *       .word  ...

     

    The assembly code is just looping through the table and copying the values from .cinit to .ebss/.bss sections.  Someone just wrote it.  It is not complicated enough to require a design spec.

    I'm not sure what else I can add here.  I am going to move your forum thread to the C-Compiler forum.  The compiler guys have probably had questions about safety-critical certification before.  Perhaps they can provide more assistance.

    Regards,

    David

     

  • The TI compiler group is working on a safety qualification kit for the compiler focusing on standards such as IEC 61508 or ISO 26262. There are details on this wiki page: http://processors.wiki.ti.com/index.php/Compiler_Qualification_Kit. Regarding the run-time library code, the source is provided with a compiler package. The use of the source code is covered under the license provided with the compiler release. There is no documentation for the run time source that could be used to meet the aviation standard you mention.

  • If only "Someone just wrote it" were good enough for Certification Authorities - but quite rightly not.

    However, thanks to pointers above and more digging, I've managed to back-fill a design, working out what is going on + why it's needed.

    Regards.