Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

command line lenght limit on Windows

(1/5) > >>

Chun Jiu:
Hi guys, I have a new problem,

I compile an mbed os project, and always get an error when linking.

When I tried to find the cause of the error, I found that the tail of the link instruction was missing.

So I copied the error message and found that its length is just 65535,
so I guess the maximum length of this instruction buffer is 64KB.

However, there are tens of thousands of connection object files in mbed os,
so the length of the link instruction may be far more than 64KB.

Can this problem be solved?



stahta01:
One way to get around the line length limit is to use static libs.

So, group a number of files together and create an CB target to build a static library.
After doing this many times with all the files; you create another target that links several or all of the targets together.

Another was is to see if the Compiler being used support response files.

Tim S.

Chun Jiu:

--- Quote from: stahta01 on April 24, 2020, 06:07:09 am ---One way to get around the line length limit is to use static libs.

So, group a number of files together and create an CB target to build a static library.
After doing this many times with all the files; you create another target that links several or all of the targets together.

Another was is to see if the Compiler being used support response files.

Tim S.

--- End quote ---

Thank you for your reply,

This CBP project is automatically generated by the official tool provided by Mbed OS, and manual modification will be very difficult.

And according to the type of MCU, there are many changes in the compilation conditions, so it may not be easy to use a static library.

If CB can display the link instruction completely in the information window instead of truncating it, then I can copy and save it as a txt file, and then call it in the command window to solve it.

stahta01:
The command window is the source of the problem.

Tim S.

Chun Jiu:
Add content

This length limit is not a limitation of the Windows command line, but should be the maximum length limit of the CB instruction buffer.

Can the instruction buffer of CB be changed to solve this problem?

Navigation

[0] Message Index

[#] Next page

Go to full version