This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8191 char command line length limit in Windows

Hi all,

In the process of switching from Keil uVision into arm Development Studio, and working with the mbed library, I was bitten by the 8191 chars command line length limit of Windows.

The mbed library contains many include folders and the resulting armclang command line including all such paths is well beyond the 8191 chars allowed by cmd.exe (now it is around ~20000 chars in length, and that for the baremetal profile of mbed), so it is truncated by the OS resulting in armclang refusing to compile a thing.

Has anyone coped with this?

For now I managed this using symlinks in the filesystem, a manual and error prone approach. I'm aware of the @file armclang option allowing armclang to get command line arguments from a file. Is there a way to force arm DS to use such mechanism? Any other approach?

Thanks and regards.

Parents
  • Hi

    My name is Stephen and I work at Arm.

    Arm DS does not have any built-in way to avoid the Windows line length limit, however, it is possible to add "@file" into the Eclipse project in the Miscellaneous options for the compiler - see screenshot.

    In this example, I've added a file more_options.txt, containing an extra option (a deliberately incorrect one, so that you can easily see that it has been read on the command line), into the root of the project, accessed as "@../more_options.txt"

    Alternatively, you can use "@file" within a hand-crafted makefile, called from the Eclipse project.

    Hope this helps

    Stephen

Reply
  • Hi

    My name is Stephen and I work at Arm.

    Arm DS does not have any built-in way to avoid the Windows line length limit, however, it is possible to add "@file" into the Eclipse project in the Miscellaneous options for the compiler - see screenshot.

    In this example, I've added a file more_options.txt, containing an extra option (a deliberately incorrect one, so that you can easily see that it has been read on the command line), into the root of the project, accessed as "@../more_options.txt"

    Alternatively, you can use "@file" within a hand-crafted makefile, called from the Eclipse project.

    Hope this helps

    Stephen

Children