2018.R1 release GCC compiler issue and Simulink Build and flash problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

2018.R1 release GCC compiler issue and Simulink Build and flash problem

跳至解决方案
5,408 次查看
john_yang
Contributor II

Hi Razvan,

Sorry, I forgot attaching those 2 files.   and I have to start a new question here to be able to attach files. Here they are.  and the example is "gpio_s32k148.mdl".

Thanks,

John

1 解答
5,074 次查看
john_yang
Contributor II

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

在原帖中查看解决方案

9 回复数
5,074 次查看
john_yang
Contributor II

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,

0 项奖励
回复
5,074 次查看
paulvlase
NXP Employee
NXP Employee

Hi john.yang@gentherm.com‌,

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.

5,075 次查看
john_yang
Contributor II

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

5,073 次查看
constantinrazva
NXP Employee
NXP Employee

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.

0 项奖励
回复
5,073 次查看
john_yang
Contributor II

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,

0 项奖励
回复
5,074 次查看
constantinrazva
NXP Employee
NXP Employee

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.

0 项奖励
回复
5,074 次查看
constantinrazva
NXP Employee
NXP Employee

Hello john.yang@gentherm.com‌,

It seems it's still successful, even with that path modified in the makefile. 

0 项奖励
回复
5,074 次查看
constantinrazva
NXP Employee
NXP Employee

Can you try and reset the MATLAB path? For that you should go to MATLAB Home tab -> Set Path -> Default -> Save.

Capture.JPG

 

Untitled.png

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.

0 项奖励
回复
5,073 次查看
constantinrazva
NXP Employee
NXP Employee

P.S.: You can find the mbd_s32k_path.p script in 

C:\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code
0 项奖励
回复