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.

HALCoGen SafetyLib example

Other Parts Discussed in Thread: HALCOGEN

Hello,

I'm trying to rum the HALCoGen Safety

  • Sorry, I don't what happened and the message was posted incompleted...

    I'm trying to run the HALCoGen Safety example for a TMS570LS04, without OS, but no success. I've followed the instructions explained in the HALCogEn help (some instructions are not too clear, though). After building I get 280 errors. I'm using HALCoGen 04.04.00 and CCS 6.1.0. Has anyone built correctly this example in this microcontroller or in another?

    Thank you
    Javier
  • Javier,

    Sorry for the trouble. I tried to create a project using the SafetyLib instructions in HALCoGen and got a ton of errors as well. I will ask the Safety Library team to comment.

    Regards,
    Sunil
  • Project 1:   

    for the RM57L is a safety lib / halcogen project.

    The biggest issue I ran into was with the stack allocation.  But this is taken care of by defining the stacks in the linker command file.


    If you're getting 100+ build errors it sounds like you are probably missing an include path - what type of errors are they?

  • Javier,

    The instructions in the HALCoGen example need to be updated to clearly state that the line:

    #define SL_REG_INIT_VAL 0

    needs to be moved on top of the #ifndef EXTERNAL_SP_INIT condition check inside sl_config.h

    Also, the instructions state to include "ALL" files from the folder "<SL installation path>\safety_library\source". This needs to be clarified to exclude the *KEIL* and *IAR* files if you are using CCS to build the project.

    Once this is corrected, the errors are all gone and the project builds fine.

    Sunil
  • Thank you Sunil and Anthony. The problem was the Keil and IAR files, as Sunil said, they don't have to be copied. I had already moved the #define line above the #ifndef by comparing the original sl_config.h with the file in the instructions, because they don't clear explain this.

    After this I built the project and still got 2 errors. The reason was the F021.h that couldn't be found, so I looked for it in my hard drive, found it in the F021 Flash API folder and added a line in the include search path of the project. This may have to be added to the instructions, step 2, something like:

    <F021 Flash API path>\include

    After this, no errors. Anyway, I still don’t know what I have to do in the Step 4; it says:

    Add the following in the SECTIONS block in the linker command file
    LOG_DATA : START( ulLOGStartAddr ), END( ulLOGEndAddr ) > RAM

    What is the “linker command file” and where is it? Sorry, I’m new in working with CCS.

    One last thing, there is no Step 5, I guess it is just a mistake and Step 6 is actually Step 5.

    Best regards
    Javier
  • Javier,

    The sys_link.cmd file is the linker command file. This file contains all the directives to the linker used during the build process.

    You can add the required line in the SECTIONS block as follows:

    SECTIONS
    {
    .intvecs : {} > VECTORS
    .text : {} > FLASH0
    .const : {} > FLASH0
    .cinit : {} > FLASH0
    .pinit : {} > FLASH0
    .bss : {} > RAM
    .data : {} > RAM
    .sysmem : {} > RAM

    /* USER CODE BEGIN (4) */
    LOG_DATA : START (ulLOGStartAddr ), END( ulLOGEndAddr ) > RAM
    /* USER CODE END */
    }

    You are right about the step5 being accidentally numbered as step6.