Build error at executing gmake

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

Build error at executing gmake

Jump to solution
2,428 Views
andreheinemans
Contributor II

Hi

I am trying to build a simulink model using the MCToolbox and program it onto a MPC564xL MCU.

At the building process there is a problem with execution of the 'gmake' command. The generated makefile (in this case DigitalIO_block_demo.mk) is using windows batch script as shell whereas the gmake executable seem to use the /bin/sh shell.

-- build output ----------
### Processing Template Makefile: F:\MCToolbox\rappid564xl\rappid564xl\rappid_564xl_cw.tmf
### Creating DigitalIO_block_demo.mk from F:\MCToolbox\rappid564xl\rappid564xl\rappid_564xl_cw.tmf
### Building DigitalIO_block_demo: .\DigitalIO_block_demo.bat
F:\MCToolbox\rappid564xl\Examples\DigitalIO_block_demo_rappid_rtw>set MATLAB=C:\Program Files\MATLAB\R2017a
F:\MCToolbox\rappid564xl\Examples\DigitalIO_block_demo_rappid_rtw>"C:\Program Files\MATLAB\R2017a\bin\win64\gmake" -f DigitalIO_block_demo.mk  ISPROTECTINGMODEL=NOTPROTECTING GENERATE_ERT_S_FUNCTION=0 INCLUDE_MDL_TERMINATE_FCN=0 COMBINE_OUTPUT_UPDATE_FCNS=1 MULTI_INSTANCE_CODE=0 INTEGER_CODE=0
clean
RELATIVE_PATH_TO_ANCHOR is ..
==== Removing object files from build directory ====
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
gmake: *** [clean] Error 258
---------------------------

The line in the makefile that troubles is: '@if exist *.o del *.o'.
When I replace it with 'rm -f *.o' and run DigitalIO_block_demo.bat then it builds perfectly. (I attached the original and the altered version of the makefile)

What could be the reason that 'gmake' does not interpret the commands as windows batch script commands? My colleage does not have this problem. I have installed MINGW/MSYS on my computer for other projects. Could it be that this interferes with this build process?

Kind regards,
Andre Heinemans

0 Kudos
1 Solution
2,073 Views
andreheinemans
Contributor II

Hi dumitru-daniel.popa‌,

Thanks for you response. The problem seems to be similar. I solved it by removing the MINGW directories from the PATH variable before I start MATLAB.

Kind regards

Andre

View solution in original post

2 Replies
2,073 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi andreheinemans‌,

Just recently we had another user complaining of something similar: https://community.nxp.com/message/955642?commentID=955642#comment-955642 

Pleas check here the solution for his problem: https://community.nxp.com/message/955642?commentID=955642#comment-955642 

Might not be suitable for you - but at least we can conclude if MINGW is the culprit.

Hope it helps!

Daniel

0 Kudos
2,074 Views
andreheinemans
Contributor II

Hi dumitru-daniel.popa‌,

Thanks for you response. The problem seems to be similar. I solved it by removing the MINGW directories from the PATH variable before I start MATLAB.

Kind regards

Andre