Hello Paul,
I got the following error message after run the command by following your instructions.
But I do find the dll file in the directory where gcc compiler is located.
Then, I added the directory to the “path” variable in system environment configuration. The GCC6.3 compiler can generate the “.mot” code now.
Thank you for your help.
John Yang
Senior Systems Engineer – Controls
Mobile phone: 248-916-8468
Office phone: 248-513-8968
Software Engineering
World Headquarters
21680 Haggerty Road
Northville, MI 48167
I switched to Matlab/Simulink 2016b and reinstalled the toolbox and reset the path, it gave me the same error. the weird thing is it adds a virtual drive for Matlab/Simulink after I clicked "Build Model" button in Simulink. I will remove other add-ons and redo it again.
Thanks,
From the attached log files it seems that it fails because of this command:
"C:\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-6.3-arm32-eabi/bin/arm-none-eabi-gcc" -c -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g -x assembler-with-cpp -o startup_S32K148.o startup_S32K148.s
Could you open the command line, go to
C:\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\S32_Examples\s32k14x\gpio\gpio_s32k148_mbd_rtw
folder and run the above command? We are interested in the output of the command and if you get any error dialog?
I don't think that -ID:\simulink\include\sf_runtime is the problem. We are not using that path in this command.
Hello Paul,
I got the following error message after run the command by following your instructions.
But I do find the dll file in the directory where gcc compiler is located.
Then, I added the directory to the “path” variable in system environment configuration. The GCC6.3 compiler can generate the “.mot” code now.
Thank you for your help.
John Yang
Senior Systems Engineer – Controls
Mobile phone: 248-916-8468
Office phone: 248-513-8968
Software Engineering
World Headquarters
21680 Haggerty Road
Northville, MI 48167
Hello john.yang@gentherm.com,
I can't reproduce your error; I have the same log as you do, but it moves beyond startup_S32K148.o. I compared the two and only the paths are different. The only one that is maybe strange is this one:
-ID:\simulink\include\sf_runtime
On my part, this is saved under the matlab installation folder, like this:
-IC:\MATLAB\R2017b\simulink\include\sf_runtime
I'd check if that folder exists on D disk.
Can you provide more information? I'd be helpful to know on what MATLAB you're using our toolbox, what is the exact path to GCC_S32K_TOOL environment variable - you can find it out by typing
getenv('GCC_S32K_TOOL')
in the MATLAB terminal (even-though it seems to be ok from the mk).
Can you also type
ver
in the MATLAB terminal and post its output ?
Thanks,
Razvan.
Hello Razvan,
My Matlab/Simulink is installed in the default directory "C:\Program Files\Matlab\R2017.
and the "sf_runtime" folder is in the following directory on my laptop
C:\Program Files\MATLAB\R2017b\simulink\include\sf_runtime
I installed NXP_MBDToolbox_S32K1xx in the following directory
C:\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx
I don't know why the GCC 6.3 compiler goes to "-ID:\Simulink\includes\sf_runtime". The "D" drive is the "S32K148EVB" connected to my laptop.
the weird thing is that GCC4.9 compiler goes to "-IE:\Simulink\includes\sf_runtime". but it completed building the ".mot" code.
the compiler info:
>> getenv('GCC_S32K_TOOL')
ans = 'C:\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-6.3-arm32-eabi'
My Matlab version info:
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.3.0.713579 (R2017b)
MATLAB License Number: 40548050
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.3 (R2017b)
Simulink Version 9.0 (R2017b)
Control System Toolbox Version 10.3 (R2017b)
Embedded Coder Version 6.13 (R2017b)
Fuzzy Logic Toolbox Version 2.3 (R2017b)
MATLAB Coder Version 3.4 (R2017b)
Model-Based Design Toolbox for S32K1xx Series Version 2018.R1 (R2016b-R2018a)
New Eagle RPG Builder Version 0.0.21
Raptor Version 2017b_0.2.1711 (3515_1711)
Simulink Coder Version 8.13 (R2017b)
Simulink Control Design Version 5.0 (R2017b)
Stateflow Version 9.0 (R2017b)
System Identification Toolbox Version 9.7 (R2017b)
Thanks,
Hello john.yang@gentherm.com,
Indeed there is something weird going on with that path; I'll try and reproduce it to see if that is why it fails.
The rest of the information looks good, everything is as it should be.
I'll get back to you with details after reproducing your issue.
Kind regards,
Razvan.
Hello john.yang@gentherm.com,
It seems it's still successful, even with that path modified in the makefile.
Can you try and reset the MATLAB path? For that you should go to MATLAB Home tab -> Set Path -> Default -> Save.
and then run the mbd_s32k_path script again, so you install the path for the toolbox over a fresh, default MATLAB path.
Note: this will remove additional toolboxes path, so you'll have to add them back later.
Kind regards,
Razvan.