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.

CCS/CCSTUDIO-SITARA: Preprocessor directives in assembly code

Part Number: CCSTUDIO-SITARA

Tool/software: Code Composer Studio

Hello,

I use CCSv6 with GNU compiler v4.9.3 (Linaro).

In my project I would like to call a function written in Assembler. The assemby routine contains some preprocessor directives like 'ifdef' 'endif',...

Unfortunately the expressions have no effect. If I set the appropriate define nothing happens. Can anybody tell me how to implement this preprocessor directives?

I read to set the directives with a preceding point e.g.: .ifdef. In addition there is a preprocessor flag to set. But until know I had no success.

Anybody an idea how to solve this problem?

Thank you in advance for your answers.

  • The TI ARM  assembler supports conditional directives like .if and .endif.  Please read about them in the ARM assembly tools manual.  Search for the section titled Directives that Enable Conditional Assembly. If you still have difficulty, please post a specific example of what you need to do.

    Thanks and regards,

    -George

  • Thank you for your reply.

    Finally I found a similar example inside the starterware of SDK.

    By comparing both files I realized that my filename ends with a lowercase letter.

    But it should be written with a capital letter --> *.S

    Do you know the differences between both variations?

  • What is your host system?  Windows or Linux?

    Thanks and regards,

    -George

  • Windows 7 (64)

  • Marc W. said:

    By comparing both files I realized that my filename ends with a lowercase letter.

    But it should be written with a capital letter --> *.S

    I experience the opposite.  A file extension of .s means the file is assembly code.  A file extension of .S means the file is C code.  Since that could cause confusion, I filed CODEGEN-3674 in the SDOWP system to have the compiler changed to to handle .S files as assembly code.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George