Linker won't run: "The system cannot execute the specified program"

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Linker won't run: "The system cannot execute the specified program"

跳至解决方案
2,074 次查看
mike1974
Contributor III

Building my project using KDS 2.0.0... when it gets to linker stage...

 

'Building target: M2.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "C:/M2/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"C:/M2/Project_Settings/Linker_Files" -Wl,-Map,"M2.map" -nanolibc -o "M2.elf"   ... ...

The system cannot execute the specified program.

make: *** [M2.elf] Error 1

 

Anyone seen this before, or know if there is a log somewhere which shows more details?

 

Thanks in advance,

 

Mike

标签 (1)
0 项奖励
回复
1 解答
1,693 次查看
BlackNight
NXP Employee
NXP Employee

Hi Mike,

yes, that limiation is a general Windows limitation, and documented in the release notes.

One workaround is to keep the path to the files/object files as short as possible.

Or to build some parts of the application as library (archive) and link with it.

The latest GNU ARM Eclipse plugins mention that there is a solution to that problem with using its own command interface, but I have not verified that one yet.

Erich

在原帖中查看解决方案

0 项奖励
回复
6 回复数
1,693 次查看
BlackNight
NXP Employee
NXP Employee

Hi Mike,

is that the complete command line from the console log, or something missing (...)? Could it be that your command line length exceeds 8192 characters?

Erich

0 项奖励
回复
1,693 次查看
mike1974
Contributor III

Hi Erich,

The complete command line is huge, there are a lot of .o files.   So yes, it certainly exceeds 8192 characters.  I was not aware of this limitation.  So if this is indeed the problem, the question is, how to get around it?

Thank you,

Mike

0 项奖励
回复
1,694 次查看
BlackNight
NXP Employee
NXP Employee

Hi Mike,

yes, that limiation is a general Windows limitation, and documented in the release notes.

One workaround is to keep the path to the files/object files as short as possible.

Or to build some parts of the application as library (archive) and link with it.

The latest GNU ARM Eclipse plugins mention that there is a solution to that problem with using its own command interface, but I have not verified that one yet.

Erich

0 项奖励
回复
1,694 次查看
mike1974
Contributor III

Thank you Erich, I believe another workaround is here:

Re: KSDK Linker Error - Command line too long

I'm going to try it.

Also I cannot do a "make clean" for the same reason I suppose (it says "filename or extension is too long.")

--Mike

1,694 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Michael,

Where does your project placed in ?  directly under the C or a workspace ?

And can your send your project ? I will check it on my side .


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,694 次查看
mike1974
Contributor III

Hi Alice,

The project is called "M2" and the project folder is located in C:\M2.  It is part of a workspace called "kds_workspace".  The folder for this workspace is located at C:\kds_workspace.

I'm not sure how I ended up with the project folder outside of the workspace folder, but I don't know if that matters.

Yes I will send it to you, how would you like me to do that?

Thanks,

Mike

0 项奖励
回复