Managed Linker Scripts not generating under Linux (but work fine under Windows)...?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Managed Linker Scripts not generating under Linux (but work fine under Windows)...?

ソリューションへジャンプ
2,583件の閲覧回数
np
Contributor IV

Our (multi-project) MCUXpresso build builds OK locally under Windows, so I'm now trying to get a remote Linux machine to build exactly the same code (so we can integrate it with Jenkins etc).

However, the problem is that even though the Linux machine imports all the projects OK and compiles all the C files OK, it is not generating the managed linker scripts, and so the final link stage is failing:

  • /arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: cannot open linker script file Plugin_IO_Debug.ld: No such file or directory
  • collect2: error: ld returned 1 exit status

If I look at the Linux Debug directory, I can see the autogenerated *.mk files, but no *.ld files:

  • makefile
  • plugin-digital-io-board.su
  • plugin-digital-io-hardware.d
  • subdir.mk
  • objects.mk
  • plugin-digital-io-config.d
  • plugin-digital-io-hardware.o
  • plugin-digital-io-board.d
  • plugin-digital-io-config.o
  • plugin-digital-io-hardware.su
  • plugin-digital-io-board.o
  • plugin-digital-io-config.su
  • sources.mk

By way of comparison, the same directory in the Windows build has three extra linker (*.ld) files:

  • 02/08/2021 10:02 5,771 Plugin_IO_Debug.ld
  • 02/08/2021 10:02 405 Plugin_IO_Debug_library.ld
  • 02/08/2021 10:02 1,425 Plugin_IO_Debug_memory.ld

So it appears that the Linux mcuxpressoide is failing to generate these additional linker files.

Is this a known problem with specific Linux versions of the MCXpresso IDE? We're currently using mcuxpressoide 11.1.0 (we're slow to upgrade because everyone on the team would need to advance to a new version at the same time).

PS: here is the mcuxpressoide command line we're using to launch a remote Linux build:

SWT_GTK3=0 UBUNTU_MENUPROXY=0 /usr/local/mcuxpressoide/ide/mcuxpressoide --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ~/workspace -import Callisto4Lib -import PlatformAPI -import PluginLib -import Plugin_IO -build Plugin_IO/Debug

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
2,573件の閲覧回数
np
Contributor IV
4 返答(返信)
2,574件の閲覧回数
np
Contributor IV

Finally, I think I found a support ticket where @mukelarvin  had run into this exact problem:

https://community.nxp.com/t5/MCUXpresso-IDE/Trouble-with-headless-build-on-Jenkins-SDK-location-and-...

2,568件の閲覧回数
np
Contributor IV

I think I have found the root cause of the problem. In <workspacename>/.metadata/.log, there is a message complaining about MCU Settings:

!ENTRY com.crt.log 4 -1 2021-08-02 11:26:50.633
!MESSAGE Exception
!STACK 0
java.lang.Exception: java.lang.InterruptedException
[stack trace]

!ENTRY com.crt.advproject 4 -1 2021-08-02 11:26:50.633
!MESSAGE Missing MCU setting for Plugin_IO
Use Project->Properties->MCU Settings to correct
No linker script created

So it seems that the real problem here is something to do with the SDK configuration under Linux.

 

 

0 件の賞賛
返信
2,568件の閲覧回数
np
Contributor IV

I have found some additional debug. The workspace error log file (in <myworkspacedirectory>/.metadata/.log) says:

!ENTRY com.crt.log 4 -1 2021-08-02 11:26:50.633
!MESSAGE Exception
!STACK 0
java.lang.Exception: java.lang.InterruptedException
[stack trace]

!ENTRY com.crt.advproject 4 -1 2021-08-02 11:26:50.633
!MESSAGE Missing MCU setting for Plugin_IO
Use Project->Properties->MCU Settings to correct
No linker script created

There's nothing clever whatsoever in the MCU settings for this project. So my actual problem here seems to be to do with installing / configuring the SDK under Linux.

0 件の賞賛
返信
2,580件の閲覧回数
np
Contributor IV

As an aside, the thing that MCUXpresso uses to generate .ld files is Apache Freemarker. I searched for "freemarker.jar", and found:

./mcuxpressoide-11.1.0_3209/ide/configuration/org.eclipse.osgi/4/0/.cp/freemarker.jar
./mcuxpressoide-11.1.0_3209/ide/configuration/org.eclipse.osgi/42/0/.cp/libs/fmpp/freemarker.jar

So it seems as though Freemarker is correctly installed here.

0 件の賞賛
返信