Simulink build error on fresh install

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

Simulink build error on fresh install

1,199 Views
Poley
Contributor V

Hi,

I am having issues with Simulink not building my model, I get a long list of errors. I have deleted and reinstalled to check if that work but I still get the same errors.

I have attached the full build log.

Thank you

Poley_0-1618238050179.png

 

0 Kudos
4 Replies

789 Views
mgriffith
Contributor I

I'm also getting the same warning, but my install path doesn't have any spaces:

Environment Variable GCC_S32K_TOOL was not explicitly set. The generated code will be compiled using the default GCC compiler C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\tools\gcc-6.3-arm32-eabi

I have been building just fine until today and now make is throwing the following error:

C:\Users\mgrif\Documents\eMatrix\Software\RNA_BMS\RNA_BMS\Projects\BMS\Software\BMS_KML_mbd_rtw>"C:\Program Files\MATLAB\R2021b\bin\win64\gmake" -f BMS_KML.mk COPY_MDLREF_INCLUDES=0 GENERATE_ERT_S_FUNCTION=0 INCLUDE_MDL_TERMINATE_FCN=1 COMBINE_OUTPUT_UPDATE_FCNS=1 MULTI_INSTANCE_CODE=0 INTEGER_CODE=0 OPTS="-DTID01EQ=0" Cleaning... RELATIVE_PATH_TO_ANCHOR is .. ==== Removing object files from build directory ==== | was unexpected at this time. gmake: *** [SetupFiles] Error 255

 

I also have a lot of other make related warnings:

Warning: Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in the template makefile C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf. The variables are no longer required. You can remove the variables.
Warning: Found legacy make variables |>S_FUNCTIONS<|, |>S_FUNCTIONS_OBJ<| in the template makefile C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf. The variables are no longer required. You can remove the variables.
Warning: Found legacy make variables |>SHARED_BIN_DIR<|, |>SHARED_LIB<|, |>SHARED_SRC<|, |>SHARED_SRC_DIR<| in the template makefile C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf. The variables are no longer required. You can remove the variables.
Warning: The following preprocessor macros
 MODEL_HAS_DYNAMICALLY_LOADED_SFCNS 
are specified in the component's build information (RTW.BuildInfo) but the specified template makefile
C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf 
 does not contain the token |>DEFINES_OTHER<|.
Warning: Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in the template makefile C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf. The variables are no longer required. You can remove the variables.
Warning: Found legacy make variables |>S_FUNCTIONS<|, |>S_FUNCTIONS_OBJ<| in the template makefile C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf. The variables are no longer required. You can remove the variables.
Warning: Found legacy make variables |>SHARED_BIN_DIR<|, |>SHARED_LIB<|, |>SHARED_SRC<|, |>SHARED_SRC_DIR<| in the template makefile C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf. The variables are no longer required. You can remove the variables.
Warning: The make variables |>COPY_DEST_DIR<|, |>GCC_TARGET_ASM_OPTS<|, |>GCC_TARGET_CC_OPTS<|, |>GCC_TARGET_LIB_OPTS<|, |>GCC_TARGET_LINK_OPTS<|, |>GHS_TARGET_ASM_OPTS<|, |>GHS_TARGET_CC_OPTS<|, |>GHS_TARGET_LIB_OPTS<|, |>GHS_TARGET_LINK_OPTS<|, |>IAR_TARGET_ASM_OPTS<|, |>IAR_TARGET_CC_OPTS<|, |>IAR_TARGET_LIB_OPTS<|, |>IAR_TARGET_LINK_OPTS<|, |>LINKER_FILE_NAME<|, |>MC_LIB_NAME<|, |>SDK_TARGET_MCU<|, |>TARGET_COMPILER<|, |>TARGET_FPU<|, |>TARGET_MCU<|, |>TARGET_MEMORY<|, |>TBX_SRCS<| are used in the template makefile C:\Users\mgrif\Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mbd_s32k.tmf, but they are not defined. You may have a mismatch between the system target file and the template makefile.

I would welcome any help. I don't understand why I have been able to build before. Could a change to my top level model cause this? 

 

Thank you,

Matt

 

0 Kudos

755 Views
mgriffith
Contributor I

Hey everyone,

Incase this helps someone I found out that the problem was I added a mbd_s32k_make_rtw_hook file.

My goal was to just add a hook that would throw an error if I was in the wrong directory when I started a build. The switch case for before make is just empty, so it shouldn't do anything, but evidently it somehow breaks something. If anyone know how to either fix this problem, or find another way to throw an error on wrong build directory it would be greatly appreciated. 

 

Matt

0 Kudos

1,179 Views
Poley
Contributor V

Hi @mariuslucianand 

Unfortunately changing to a directory with no spaces has not worked.

I have MATLAB and add on's installed on my drive now and get the build log attached still

Thanks

0 Kudos

1,186 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @Poley 

From the attached logged I've noticed that the toolbox has been installed in a path that contains some spaces:

 Warning:Environment Variable GCC_S32K_TOOL was not explicitly set. The generated code will be compiled using the default GCC compiler C:\Users\Matt P\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\tools\gcc-6.3-arm32-eabi

 So let's try installing the toolbox in a path without spaces like: "C:\MATLABAddOns"

You can specify to MATLAB which path to choose for toolbox installation by going to Preferences -> Add-Ons and type your desired path. Please use one with no spaces.

mariuslucianand_1-1618293835601.png

Hope this helps,

Marius

 

 

Tags (1)
0 Kudos