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

command line lenght limit on Windows

<< < (4/5) > >>

Chun Jiu:

--- Quote from: BlueHazzard on April 24, 2020, 09:12:29 pm ---Now, that i think about it. I somehow remember to have fixed a bug like this some time ago...
What version of codeblocks are you using? Have you tried the latest nightly?

--- End quote ---

Thank you,

This is a problem left over from the history of "Millennium Bug". The command line buffering of Windows starts from 2048, to 8192, 32768 ... Maybe it is now 65536.

Microsoft's suggestion is to pass the contents of the command line to it in a txt file, if it is indeed the problem.

https://support.microsoft.com/en-us/help/830473/command-prompt-cmd-exe-command-line-string-limitation

My codeblocks is the latest nightly, and its version number is  'build 12064'. Wondows 10 is 1909, 64bit.

Now there are two problems that need to be solved:

1. Previous command line length limitation.
2. The expected html log file does not appear. 

===================
How to reproduce this problem
===================

The Mbed OS is opensource's RTOS.

Note that this Mbed OS is about 1GB, and with the compiled object file, it may exceed 2GB.

1. Need to install python 2, pip, mbed-cli and its dependencies, and gnu gcc for arm.

    GNU Tools for Arm Embedded Processors 9-2019q4-major Release   
    https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm

2. Run cmd.exe to command line window, type command: pip install -U mbed-cli.
3. Go to the folder used for testing, type command: mbed new test-mbedos, it will download 1GB of content.
4. Go to the test-mbedos folder,  it is newly created by the mbed command.
5. Add a main.cpp file:

    #include "mbed.h"

    DigitalOut led1(LED1);

    #define SLEEP_TIME                  300 // (msec)

    int main()
    {
        int count = 0;
        while (true) {
            // Blink LED and wait 0.5 seconds
            led1 = !led1;
            wait_ms(SLEEP_TIME);
        }
    }

6. Then continue to enter the order: mbed export -i codeblocks -m  GD32_F450ZI

    D:\test\test-mbedos>mbed export -i codeblocks -m  GD32_F450ZI
    [mbed] Working path "D:\test\test-mbedos" (program)
    Scan: test-mbedos
   
    D:\test\test-mbedos>

7. If the installation of dependent packages(mbed-cli) fails, you need to delete their version numbers(in mbed-os/requirements.txt).
8. At this time, a CB project file was created (test-mbedos.cbp).
9. Set the path of gcc arm toolchain in CB to start compiling.

BlueHazzard:
Hi, thank your for the detailed description.


--- Quote ---1. Previous command line length limitation.
2. The expected html log file does not appear. 
--- End quote ---
I can reproduce nr 1 with a project i have created with the help of the following script on windows 7:


--- Code: ---activeProject <- GetProjectManager().GetActiveProject();

filename <- _T("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.cpp");

for(local i = 0; i < 500; i+=1)
{
    local thisFileName = _T(i.tostring()) + _T("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.cpp");
    local path =  activeProject.GetCommonTopLevelPath() + _T("src") + wxFILE_SEP_PATH + thisFileName;
    IO.WriteFileContents(path , _T("void func") + _T(i.tostring()) + _T("() {}") );
    print("create file: " + path)

    GetProjectManager().AddFileToProject(path, activeProject, 0);

    //activeProject.AddFile(activeProject.GetActiveBuildTarget(), path, true, true, 1);

}

activeProject.Save();


--- End code ---

The linking breaks the maximal command line length.
I am working on a solution and will post a patch. This probably will take some discussion, because it modifies the heart of c::b...

The second problem, i can not reproduce at the moment... I will first try to fix bug 1 and then i will look into 2)

Chun Jiu:

--- Quote ---I am working on a solution and will post a patch. This probably will take some discussion, because it modifies the heart of c::b...

The second problem, i can not reproduce at the moment... I will first try to fix bug 1 and then i will look into 2)

--- End quote ---

Thank you very much, looking forward to your good news :-)

BlueHazzard:
Here is a link to a patch, that adds the response files to codeblocks

https://sourceforge.net/p/codeblocks/tickets/953/


Chun Jiu:

--- Quote from: BlueHazzard on April 26, 2020, 11:22:05 am ---Here is a link to a patch, that adds the response files to codeblocks

https://sourceforge.net/p/codeblocks/tickets/953/

--- End quote ---

Thank you,

It seems that this part of the work is more complicated, I wait for the Nightly builds with this function to test.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version