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.

Blanks in the source path

Hi,

I am using compilation flag --preproc_dependency to generate dependencies. My OS is Windows XP. All is alrigth and the output looks like this

arp_filtering.obj: C:\arkady\work\wl9_base\firmware\arp_filtering.c
arp_filtering.obj: 
C:\arkady\work\wl9_base\firmware\tx_descriptor_utils.h
	echo C:\arkady\work\wl9_base\firmware\arp_filtering.c 

Now, let's say that I need include to string.h from the "C:\Program Files\Texas Instruments\TMS470 Code Generation Tools 4.6.5\include". 
The output is not enclosed in quotes and further processing by make is going to fail
arp_filtering.obj: C:\Program Files\Texas Instruments\TMS470 Code Generation Tools 4.6.5\include\string.h
arp_filtering.obj: C:\arkady\work\wl9_base\firmware\arp_filtering.c
arp_filtering.obj: 
C:\arkady\work\wl9_base\firmware\tx_descriptor_utils.h
	echo C:\arkady\work\wl9_base\firmware\arp_filtering.c 

 

I think that in Linux the blanks should be escaped. what is the default behavior in Linux?

 

What I am missing?

 

Thank you, Arkady.

 

  • I agree that compiler output in this case is not useful.  I'm still not sure how to change it to make it work.  I've tried quotes, with no success.  Once I figure out how to change the output so make likes it, I'll file something in the SDOWP system.

    Thanks and regards,

    -George

  • Hi George,

    If you let me to put it blunty this is a bug in the compiler. Technically the path generated by the compiler is wrong.

    In case of Windows this is mandatory (?) to use quotes around the path if any further processing is going to happen. In case of Linux blanks should be escaped.

    My understanding is that this is not an issue for CCS. Does it use XML file and not makefile? I do not see any workaround besides writing a sed script (or perl, or python) and fix the paths.

    A side note. Why does TI compiler generate dependencies this way? Why not to use GNU style dependenices which look like a make rule. In the previous example

    arp_filtering.obj: "C:\Program Files\Texas Instruments\TMS470 Code Generation Tools 4.6.5\include\string.h"  \
    "C:\arkady\work\wl9_base\firmware\arp_filtering.c" \
    "C:\arkady\work\wl9_base\firmware\tx_descriptor_utils.h"
    
    Thank you, Arkady.

  • I filed SDSCM00039696 in the SDOWP system for this issue.  You can track it with the SDOWP link in my sig below.

    In my experiments, even on Windows, escaping the blanks with a backslash (\) solved it.  

    Arkady Miasnikov said:
    My understanding is that this is not an issue for CCS. Does it use XML file and not makefile?

    I'm not sure.  I'll have to ask for help on that.

    Arkady Miasnikov said:
    A side note. Why does TI compiler generate dependencies this way?

    Setting aside the spaces in the path issue, this works fine.  The idea is that, in a separate makefile written by hand, you have an entry like:

    arp_filtering.obj : 
    build command here

    Thanks and regards,

    -George 

  • The idea is that, in a separate makefile written by hand, you have an entry like

    You are right. This approach is more flexible than generating a full compilation rule like the one GNU CC creates.

     

    Thank you, Arkady.