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.

ARM-CGT: How to verbose of --cmd_file ...

Expert 1965 points
Part Number: ARM-CGT

The compiler (& linker) does not by default process the options inside --cmd_file=..  verbosely, it doesn't show /print anything from it contents.

Is there way to make it print everything it gets from those files ?

Say, I have 10 x --define inside my cmd, I would like to see that it actually processes those flags, and log its output. Same as if I would do on command line --define=.... --define=..   x N times.

  • Consider using the compiler option --preproc_macros.  It creates a text file with the same name as the source file, with the extension changed to .pp.  It shows all of the #define symbols for the build of that file.  This includes symbols predefined by the compiler, symbols defined on the command line, and symbols defined inside the file.  

    Here is an example.

    C:\examples>type file.c
    #define INSIDE_THE_FILE 200
    
    C:\examples>armcl --preproc_macros --preproc_with_compile --define=CMD_LINE=100 file.c
    
    C:\examples>type file.pp
    [... skip many lines ...]
    #define _OPTIMIZE_FOR_SPACE 1
    #define CMD_LINE 100
    #define _INLINE 1
    #define INSIDE_THE_FILE 200     /* file.c */

    The option --preproc_with_compile causes the build to complete normally.  This avoids the default behavior of all the preprocessing options, including --preproc_macros, to stop the build right after preprocessing.

    Thanks and regards,

    -George