Running exported makefile under Windows

I can compile my code in VisualDSP++ but when I exported my makefile using "Project Options->Export Makefile..." and tried to run it under a Windows XP command prompt (i.e, cmd.exe) I get the following error:

     set PATH=C:\Program Files\Analog Devices\VisualDSP 5.0;%PATH%

     gmake-378 -f tmm_export.mak tmm_Debug

     "Linking..."

     'C:/Program\' is not recognized as an internal or external command,operable program or batch file.
     gmake-378: *** [Debug/tmm.dxe] Error 1

This would appear to be due to the fact that I am running under Windows instead of UNIX because the tmm_export.mak file replaces

     ADI_DSP=C:\Program Files\Analog Devices\VisualDSP 5.0

with

     VDSP=C:Program\ Files/Analog\ Devices/VisualDSP\ 5.0

(replacing backslashes with slashes and spaces with backslash-space) which is what I assume is causing cmd.exe to choke.

Are there any environment variables or arguments to cmd.exe that I need to set to get gmake to run from cmd.exe? Can someone point me to the documentation which describes how to do this? How does the IDDE run the tmm.mak file properly?

I am using VisualDSP++ 5.0.6.0, IDDE 8.0.6.76 (Feb 12, 2009) under Windows XP Pro service pack 3.


  • Hi Lloyd,

    I have not been able to reproduce the behaviour you are seeing - I exported a makefile from VisualDSP++ 5.0 Update 6 (and Update 7) and used the command line:

    gmake-378 -f NewProject_export.mak NewProject_Debug

    Consistent with what you report below, my makefile replaced the:

    C:\Program Files\Analog Devices\VisualDSP 5.0 Update 6

    with

    C:/Program\ Files/Analog\ Devices/VisualDSP\ 5.0\ Update 6

    on the command line.

    Prior to the "Linking..." message, there should be messages of calls to the compiler, assembler, etc; is the text below a full listing of the output from the call to gmake? If not, were the calls to the compiler successful? What path did these use?

    Are you able to provide a copy of the project and/or makefile? If you are unable to post it publicly, please contact us via private support using the link below, and include a link to this forum topic in your submission:

    http://www.analog.com/processors/support

    regards,

    Craig.

  • Hi,

    that's interesting that it's only happening in this project, and only at the linking step - not the earlier compiler calls. Can you take a look in the makefile, locate the "@echo "Linking..."" line, and compare the following call, which should be the final call to ccblkfn.exe, to the final call in the simple project that works. One thing to be on the look out for is mis-matched quotes in the command line, that could be confusing gmake.

    If possible, can you post the final ccblkfn.exe call from the failing makefile.

    thanks,

    Craig.

  • The compiler did work, it is just the final link that has the problem. I will have to see about sending you a copy of my project/makefile as I don't want to post it here (it is pretty big so I would like to try to simplify it before I send it to you privately).

    I tried building a new project, like you did, which has only a single file source file in it and the "Linking..." step worked. I am beginning to wonder if the problem is related to the size of my project.

    I ran gmake with -d to print out debugging information and got the following (NewProject.dxe is the target) as the linking step.

    C:/Program\ Files/Analog\ Devices/VisualDSP\ 5.0/ccblkfn.exe .\Debug\ExceptionHa
    ndler-BF536.doj .\Debug\main.doj .\Debug\VDK.doj -T .\VDK-BF536.ldf -L .\Debug -
    add-debug-libpaths -flags-link -od,.\Debug -o .\Debug\NewProject.dxe -proc ADSP-
    BF536 -flags-link -MD_ADI_THREADS -si-revision 0.2 -flags-link
    CreateProcess(C:\Program Files\Analog Devices\VisualDSP 5.0\ccblkfn.exe,"C:/Prog
    ram Files/Analog Devices/VisualDSP 5.0/ccblkfn.exe" .\Debug\ExceptionHandler-BF5
    36.doj .\Debug\main.doj .\Debug\VDK.doj -T .\VDK-BF536.ldf -L .\Debug -add-debug
    -libpaths -flags-link -od,.\Debug -o .\Debug\NewProject.dxe -proc ADSP-BF536 -fl
    ags-link -MD_ADI_THREADS -si-revision 0.2 -flags-link,...)

    I then ran gmake with -d on the project that does not link (tmm.dxe is the target) and got the following as the linking step:

    C:/Program\ Files/Analog\ Devices/VisualDSP\ 5.0/ccblkfn.exe .\Debug\ALA.doj .\D
    ebug\blackfin_tmm_hardware.doj .\Debug\dhcp_settings.doj .\Debug\dns.doj .\Debug
    \ExceptionHandler-BF536.doj .\Debug\FFT.doj .\Debug\general.doj .\Debug\host.doj
    .\Debug\HOST_listener.doj .\Debug\HOST_mbt.doj .\Debug\HOST_omron.doj .\Debug\H
    OST_tcpip.doj .\Debug\ID.doj .\Debug\inet_utilities.doj .\Debug\lwip_sysboot_thr
    eadtype.doj .\Debug\mu_compress_packed.doj .\Debug\mu_expand_packed.doj .\Debug\
    NTP_client.doj .\Debug\RTP.doj .\Debug\sdp.doj .\Debug\settings.doj .\Debug\SIP.
    doj .\Debug\sip_authentication.doj .\Debug\SIP_dialog.doj .\Debug\SIP_ict.doj .\
    Debug\SIP_ist.doj .\Debug\SIP_nict.doj .\Debug\SIP_nist.doj .\Debug\SIP_registra
    tion.doj .\Debug\SIP_tcp.doj .\Debug\SIP_tcp_listener.doj .\Debug\sip_util.doj .
    \Debug\SWITCH.doj .\Debug\SWITCH_reporting.doj .\Debug\SYSLOG.doj .\Debug\tftp_c
    lient.doj .\Debug\tmm_basiccrt.doj .\Debug\tmm_cplbtab.doj .\Debug\tmm_heaptab.d
    oj .\Debug\tmm_settings.doj .\Debug\upgrade.doj .\Debug\VDK.doj .\Debug\voip.doj
    .\Debug\WAV.doj .\Debug\wav_files.doj .\Debug\web_functions.doj .\Debug\web_mai
    n.doj Debug\webrom.doj .\Debug\xml.doj .\Debug\xml_files.doj .\Debug\xml_io.doj
    -T .\tmm.ldf -map .\Debug\tmm.map.xml -L .\Debug -flags-link -MD__cplusplus,-MDU
    SER_CRT="tmm_basiccrt.doj",-MDUSE_CACHE,-MDUSE_INSTRUCTION_CACHE,-MDUSER_CPLBTAB
    =".\Debug\\tmm_cplbtab.doj" -add-debug-libpaths -flags-link -MDUSE_CACHE -flags-
    link -od,.\Debug -o .\Debug\tmm.dxe -proc ADSP-BF536 -flags-link Kervdkbf536d.dl
    b,liblwIPbf536d.dlb,Tcpipbf536d.dlb,../../../Flash\ Programmer/bf536/Debug/adi_m
    29w320e.dlb,../../../Ethernet\ Driver/bf536/Debug/adi_ks8993.dlb,../../../webser
    ver/bf536/Debug/libwebsvr.dlb,../../../sip/bf536/Debug/sip.dlb -si-revision 0.2
    -flags-link
    'C:/Program\' is not recognized as an internal or external command,
    operable program or batch file.

  • Thanks for your help Craig. Here is the one tmm_export.mak that fails:

    $(VDSP)/ccblkfn.exe .\Debug\ALA.doj .\Debug\blackfin_tmm_hardware.doj .\Debug\dhcp_settings.doj .\Debug\dns.doj .\Debug\ExceptionHandler-BF536.doj .\Debug\FFT.doj .\Debug\general.doj .\Debug\host.doj .\Debug\HOST_listener.doj .\Debug\HOST_mbt.doj .\Debug\HOST_omron.doj .\Debug\HOST_tcpip.doj .\Debug\ID.doj .\Debug\inet_utilities.doj .\Debug\lwip_sysboot_threadtype.doj .\Debug\mu_compress_packed.doj .\Debug\mu_expand_packed.doj .\Debug\NTP_client.doj .\Debug\RTP.doj .\Debug\sdp.doj .\Debug\settings.doj .\Debug\SIP.doj .\Debug\sip_authentication.doj .\Debug\SIP_dialog.doj .\Debug\SIP_ict.doj .\Debug\SIP_ist.doj .\Debug\SIP_nict.doj .\Debug\SIP_nist.doj .\Debug\SIP_registration.doj .\Debug\SIP_tcp.doj .\Debug\SIP_tcp_listener.doj .\Debug\sip_util.doj .\Debug\SWITCH.doj .\Debug\SWITCH_reporting.doj .\Debug\SYSLOG.doj .\Debug\tftp_client.doj .\Debug\tmm_basiccrt.doj .\Debug\tmm_cplbtab.doj .\Debug\tmm_heaptab.doj .\Debug\tmm_settings.doj .\Debug\upgrade.doj .\Debug\VDK.doj .\Debug\voip.doj .\Debug\WAV.doj .\Debug\wav_files.doj .\Debug\web_functions.doj .\Debug\web_main.doj Debug\webrom.doj .\Debug\xml.doj .\Debug\xml_files.doj .\Debug\xml_io.doj -T .\tmm.ldf -map .\Debug\tmm.map.xml -L .\Debug -flags-link -MD__cplusplus,-MDUSER_CRT="tmm_basiccrt.doj",-MDUSE_CACHE,-MDUSE_INSTRUCTION_CACHE,-MDUSER_CPLBTAB=".\Debug\\tmm_cplbtab.doj" -add-debug-libpaths -flags-link -MDUSE_CACHE -flags-link -od,.\Debug -o .\Debug\tmm.dxe -proc ADSP-BF536 -flags-link Kervdkbf536d.dlb,liblwIPbf536d.dlb,Tcpipbf536d.dlb,../../../Flash\ Programmer/bf536/Debug/adi_m29w320e.dlb,../../../Ethernet\ Driver/bf536/Debug/adi_ks8993.dlb,../../../webserver/bf536/Debug/libwebsvr.dlb,../../../sip/bf536/Debug/sip.dlb -si-revision 0.2 -flags-link

    Rather than using the tmm_export.mak file to build from cmd.exe, I tried using tmm.mak (the automatically generated makefile when running from within the IDDE). That did not fail when I ran the gmake. Here is its command line (I have attached both makefiles).

    $(VDSP)/ccblkfn.exe .\Debug\ALA.doj .\Debug\blackfin_tmm_hardware.doj .\Debug\dhcp_settings.doj .\Debug\dns.doj .\Debug\ExceptionHandler-BF536.doj .\Debug\FFT.doj .\Debug\general.doj .\Debug\host.doj .\Debug\HOST_listener.doj .\Debug\HOST_mbt.doj .\Debug\HOST_omron.doj .\Debug\HOST_tcpip.doj .\Debug\ID.doj .\Debug\inet_utilities.doj .\Debug\lwip_sysboot_threadtype.doj .\Debug\mu_compress_packed.doj .\Debug\mu_expand_packed.doj .\Debug\NTP_client.doj .\Debug\RTP.doj .\Debug\sdp.doj .\Debug\settings.doj .\Debug\SIP.doj .\Debug\sip_authentication.doj .\Debug\SIP_dialog.doj .\Debug\SIP_ict.doj .\Debug\SIP_ist.doj .\Debug\SIP_nict.doj .\Debug\SIP_nist.doj .\Debug\SIP_registration.doj .\Debug\SIP_tcp.doj .\Debug\SIP_tcp_listener.doj .\Debug\sip_util.doj .\Debug\SWITCH.doj .\Debug\SWITCH_reporting.doj .\Debug\SYSLOG.doj .\Debug\tftp_client.doj .\Debug\tmm_basiccrt.doj .\Debug\tmm_cplbtab.doj .\Debug\tmm_heaptab.doj .\Debug\tmm_settings.doj .\Debug\upgrade.doj .\Debug\VDK.doj .\Debug\voip.doj .\Debug\WAV.doj .\Debug\wav_files.doj .\Debug\web_functions.doj .\Debug\web_main.doj Debug\webrom.doj .\Debug\xml.doj .\Debug\xml_files.doj .\Debug\xml_io.doj -T .\tmm.ldf -map .\Debug\tmm.map.xml -L .\Debug -flags-link -MD__cplusplus,-MDUSER_CRT=ADI_QUOTEtmm_basiccrt.dojADI_QUOTE,-MDUSE_CACHE,-MDUSE_INSTRUCTION_CACHE,-MDUSER_CPLBTAB=ADI_QUOTE.\Debug\\tmm_cplbtab.dojADI_QUOTE -add-debug-libpaths -flags-link -MDUSE_CACHE -flags-link -od,.\Debug -o .\Debug\tmm.dxe -proc ADSP-BF536 -flags-link Kervdkbf536d.dlb,liblwIPbf536d.dlb,Tcpipbf536d.dlb,../../../Flash\ Programmer/bf536/Debug/adi_m29w320e.dlb,../../../Ethernet\ Driver/bf536/Debug/adi_ks8993.dlb,../../../webserver/bf536/Debug/libwebsvr.dlb,../../../sip/bf536/Debug/sip.dlb -si-revision 0.2 -flags-link -MM

    The main difference is the ADI_QUOTE replaces double quotes in the working makefile. So I went into the tmm_export.mak file and changed the double quotes on the linker line to ADI_QUOTE and tried running from the command line. And it worked!

    Interesting...

    attachments.zip
  • LloydE wrote:

    The main difference is the ADI_QUOTE replaces double quotes in the working makefile. So I went into the tmm_export.mak file and changed the double quotes on the linker line to ADI_QUOTE and tried running from the command line. And it worked!

    Interesting...

    Hi Lloyd,

    good find regarding the ADI_QUOTE usage in the IDDE makefile. I've taken a look through our bug tracking database and believe you are hitting an issue we have seen before. I will add this thread's details to the bug in our database, so that a post will be placed here when VisualDSP++ is updated to address this issue.

    Unfortunately, for now, the workaround is to replace the double-quotes in the MDUSER_CRT and MDUSER_CPLBTAB filenames in the command line with ADI_QUOTE.

    Craig