Question: Getting the error message " Command Line Too Long " from a TI compiler/assembler/linker.

Answer: DOS restricts the length of the command line to a total of 128 characters. The 128 character restriction also exists for the command lines that the compiler shell invokes for calling the other tools (optimizer, code generator...). When these command lines are generated, the entire path is included for the executable(ie. c:\tools\rel460\ac30.exe ...).

Example this will show the problem:


       cl30 -v40 -c -qq -mi -o -g -mn -DNDEBUG -If:/dwg/src/predist/memc
            -If:/dwg/src/predist/memreg -If:/dwg/src/predist/dac mainint.c

Solution:

  • More options can be included if you run the tools from the directory where they exist or if you try to minimize the length of the path to the executable files.
  • Use the C_OPTIONS environment variable. However this might not solve the problem in the case of a very long command line. Example (C_OPTIONS solution) below... (for C3x/C4x compiler but the same concept is applicable to all compilers)
  • If it's the linker that is sending the error messages, move options to the linker command file.

Batch file


        @echo off
        set a_dir=f:/dwg/src/predist/memc;f:/dwg/src/predist/memreg
        set c_dir=f:/dwg/src/predist/dac mainint.c
        set c_option= -c -v40 -qq -mi -o -g -mn -DNDEBUG
        CL30
        cls

Device: TMS320C4x
Category: TI Tools
Detail: Code Generation Tools
Detail2: General
Title: Command Line Too Long
Source: Case from TMS320 Hotline
Date: 4/30/98
GenId: a2

© Copyright 1998 Texas Instruments Incorporated. All rights reserved.
Trademarks, Important Notice!