Command Line Exceeds Limit

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all. After adding to my project lwip (an example from asf), the compiler began to issue "Command Line Exceeds Limit".

My project and the example of the asf separately compiled without warning.

I don't use directly the command line.

What is this limitation? Limited number of files connected to the project ? Limit the length of file paths?

How to avoid this warning?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found a way to avoid warning: it is necessary to reduce the length of the path to the folder lwip-2.0.2.

Example httpserver works with my project.

There was another problem: lwip conflicts with the function sprintf (stdio.h).

When you output floating point numbers, outputs gibberish.

This occurs after calling the function netif_add.

Has anyone met with such problem?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The cause of this problem is insufficient of free RAM (11% free RAM).

After optimization of memory problem disappeared (23% free RAM).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just ran into this problem with my rather large project.  I manually updated from lwip-2.0.3 to lwip-2.1.2.  The latest lwip version has more underlying .c files (121 total .c files).  The "Command Line Exceeds Limit" error happens during the linking step.  In my case there are 217 object files to bring in, each file with a modest path length (217 files * modest path length = a really long command line!!).  All together the link command line now exceeds 8192 characters which is a Win10 limit.

 

A quick fix was to reduce the nested folders in my project.  Instead of <project>\lwip\lwip-2.1.2\...\<filename>.c it was reduced to <project>\lwip-2.1.2\...\<filename>.c, reducing the path to 121 files by 5 characters, in turn reducing the linker command line by 5*121=605 characters.  This was enough to temporarily work around the Win10 8192 command line limit problem.

 

A better fix is to change from a single Solution/single Project format in Atmel Studio, to a single Solution/multiple Project format.  I think I'll try building lwip-2.1.2 as it's own project ending in a .a library file, then link it to the original project, old school style :)