Problem with internal builder

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with internal builder

577 Views
biafra
Senior Contributor I

Hi everyone,

 

I'm facing a problem with MCUXpresso 11.9.1.

For some reasons in building my project I need to do some other things when I compile, so I created a script that do all I need (build + other things).

In the MCU C Compiler section I set my script as command builder. The script is located in the same folder as the project:

biafra_0-1716198206882.png

My scripts is working fine: when I build my project using the external builder, every project file is built using my script and the linker process is executed fine.

The problem arises when I need to build a single file: I launch the Build Selected File(s) command and I receive some error messages.

The first time I launched the command the message was:

 

Info: Internal Builder is used for build
"..\\mybuild.sh" -D__REDLIB__ [...] -o "source\\MIMXRT1064_Project.o" "..\\source\\MIMXRT1064_Project.c" 
Cannot run program "..\mybuild.sh": Launching failed

Error: Program "..\mybuild.sh" not found in PATH
PATH=[C:\nxp\MCUXpressoIDE_11.9.1_2170\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.9.1.202402080819\tools\bin;C:\nxp\MCUXpressoIDE_11.9.1_2170\ide\plugins\com.nxp.mcuxpresso.tools.win32_11.9.1.202402080819\buildtools\bin;C:\nxp\MCUXpressoIDE_11.9.1_2170\ide\plugins\com.nxp.mcuxpresso.tools.bin.win32_11.9.1.202402080819\binaries\;C:/nxp/MCUXpressoIDE_11.9.1_2170/ide//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.7.v20230425-1502/jre/bin/server;C:/nxp/MCUXpressoIDE_11.9.1_2170/ide//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.7.v20230425-1502/jre/bin; [...] C:\nxp\MCUXpressoIDE_11.9.1_2170\ide]

 

Reading the error message I've found that the script folder wasn't in the PATH. So I modified the PATH environment variable to include that folder:

biafra_5-1716199414759.pngbiafra_4-1716199393840.png

With these settings I receive a different message:

 

Info: Internal Builder is used for build
"C:\\...\\MIMXRT1064_Project\\mybuild.sh" -D__REDLIB__ [...] -o "source\\MIMXRT1064_Project.o" "..\\source\\MIMXRT1064_Project.c" 
Cannot run program "C:\...\MIMXRT1064_Project\mybuild.sh": Launching failed

 

I receive the same error messages if I use the internal bulder in the global build process.

 

So it seems that the problem is bound to the internal builder.

Does anyone can help me in making the single file build process work?

 

Many thanks

Biafra

 

3 Replies

77 Views
Martin_McKelvie
Contributor I

Hi, I have had the same problem with this version of MCUXpresso (ie V11.9.1). Perhaps this exists with others versions too (???). Anyway, I have 6 commands as part of my Post-build steps. These all worked fine when I was using the External Builder. However, I had to move to the Internal Builder due to a requirement to include a code coverage tool. When I hopped to the Internal builder my source compiled and linked OK but the post build steps failed. I saw a "Problem Occurred" popup with an "Empty Command" comment in the details. I tracked that to the post build process and found that a single command would work fine but any further commands would cause an error. 

I played with the definition of the commands and what I found was that multiple commands are auto separated by the IDE with semi-colons. However, the separation is actually space + semi-colon + space i.e. " ; ". These extra spaces seem to cause a problem with the internal builder. Perhaps they are being seen as "Empty Commands" and hence the error.

So, my solution was to just create a single long line of my commands in a text editor with just the semi-colon between them. Then cut and paste this into the Post-build steps edit window as a single line. This stops the IDE from adding the extra spaces and hence stops the Empty Command issue.

Obviously there is a problem with the IDE and/or builder but at least this works for me.

As mentioned earlier the external builder was fine with the spaces.

Hope that helps.

 

Cheers.

535 Views
ErichStyger
Specialist I

530 Views
biafra
Senior Contributor I

Hi @ErichStyger,

 

Many thanks for your useful article.

In your article you say "One solution is to escape such characters". This would be the best solution for me, but I don't know how to do it. Can you give me some advice about it?

 

Many Thanks

Biafra