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.

Creating variables in CCS

I have a question about creating Variables in CCS.

 

Case 1.

XDC_CG_ROOT     ${ROOT_DIR}\xdctools_3_24_03_33

  -> Okay

Case 2.

TEMP1     xdctools_3_24_03_33

XDC_CG_ROOT     ${ROOT_DIR}\${TEMP1}  -> Not okay( To create XDC_CG_ROOT variable, TEMP1 variable is used.)

 

Case 1 and case 2 seem that back-slash behaves differently even though same compiler is used.

Is there anyone who can explain above?

  • Can you check if it works if you use forward slashes instead of backward slashes for the paths when creating all your variables?
    I just tried a small test and it worked fine.

    So set the variables as follows:

    TEMP1          xdctools_3_24_03_33
    XDC_CG_ROOT     ${ROOT_DIR}/${TEMP1} 

  • Thank you for your comment.

    Yes, you are right.

    But the point is this.

    Case 1.
    XDC_CG_ROOT                 ${ROOT_DIR}\xdctools_3_24_03_33
     
    Case 2.
    TEMP1                                  xdctools_3_24_03_33
    XDC_CG_ROOT                    ${ROOT_DIR}\${TEMP1}

    -> case 1 and case2 use "same backward slash" but its behavior is different.
         So my customer wants to know why this happens?

    Thank you.

  • I am checking into this and will post an update when I have more information.

  • Thank you very much for your interest in this.

    Regards,

    Johnny

  • Johnny, 

    I don't really have an answer to why a single backslash gets lost in that case...Double backslash works in that same scenario.  But, just like Aarti, I would recommend using forward slashes always.

    Backslashes can cause problems, as both Gmake and the Windows command-line interpreter sometimes treat the backslash as an escape character.  For example, if your command includes a double-quoted path which ends in a backslash (e.g. --include_path="c:\temp\"), the Windows interpreter would treat the backslash as the escape character for the double-quote.

    Thanks,

    - Baltasar