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:
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:
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
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.
Hi @biafra ,
this is how I use it:
https://mcuoneclipse.com/2024/05/21/building-eclipse-projects-with-custom-external-shell-scripts/
I hope this helps?
Erich
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