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.

Compile error with safety diagnose lib

Other Parts Discussed in Thread: HALCOGEN

Dear Experts

I am using 1227 and safety diagnose lib (version:2.2.0), I include all the headers and I follow the steps required by halcogen example, but it failed building.

By the way, in the example doc:

Step 4:

Add the following in the SECTIONS block in the linker command file

LOG_DATA : START( ulLOGStartAddr ), END( ulLOGEndAddr ) > RAM

Step 6:

Copy the source code below into your sys_startup.c or replace sys_startup.c with this file.

The example file can also be found in the examples folder: ../HALCoGen/examples

the step 5 is missing

and my question is 

in   sl_asm_api_IAR.asm    the statements at the beginning has [E0002] Illegal mnemonic specified error  :

section .text_sl:CODE
    arm
    
    INCLUDE sl_asm_IAR.inc
   ; #include "sl_config.h"
    
    ;/**< Stack size for SVC mode */
    #define STACK_SIZE_MODE_SVC 1024u   

    ;/**< Stack size for FIQ mode */
    #define STACK_SIZE_MODE_FIQ 1024u   

    ;/**< Stack size for IRQ mode */
    #define STACK_SIZE_MODE_IRQ 1024u   

    ;/**< Stack size for ABT mode */
    #define STACK_SIZE_MODE_ABT 1024u   

    ;/**< Stack size for UND mode */
    #define STACK_SIZE_MODE_UND 1024u 

I have no idea what is wrong with it.

Many thanks 

Leo

  • Hi Leo,
    I have forwarded your post to our SafeTI library developer. They will get back to you shortly.
  • Are you compiling with the IAR compiler? Or the TI compiler in CCS?

    If not - don't include the IAR assembly file in your project. Same goes for the GHS version or the GCC version .. only include the CCS version.

    Assembly syntax is not as standard as C so there are different versions of the same file in the distribution.
  • Hi Anthony
    I am using CCS5.5 and the compiler version is TI v5.2.7. Is that ok for assembly file?
    Leo
  • Hi Anthony
    Now I only have errors on these three files:
    sl_asm_api_IAR.asm
    sl_asm_api_KEIL.asm
    sl_pmu_IAR.asm

    strangely, sl_asm_api.asm can pass the compiling.
    and I noticed that for example in sl_asm_api.asm
    .arm
    .include sl_asm.inc
    .cdecls C, LIST, "sl_config.h"

    but in sl_asm_api_IAR.asm
    the same statement has been written like this
    arm
    INCLUDE sl_asm_IAR.inc
    no dot before arm and include
    if they use same arm assembly language, why the statement is different?
    Maybe it is a silly question, I am a assembly language layman.
    Leo
  • Hi Leo

    Just exclude the following two files from build:
    sl_asm_api_IAR.asm
    sl_asm_api_KEIL.asm

    Reason: (already stated by Anthony) CCS uses TI compiler to compile the project, while the above two files are meant for IAR workbench compiler. Thus not to be included in build when using CCS. (The assembly language is same but the compilers are different. Assembly syntax is not as standard as C so there are different versions of the same file in the distribution)

    Tell me if that solves the issue.

    Thanks
    Vivs
  • Hi Vivs
    Sorry for the delay, it solved my issue. Thanks a lot.
    Leo