Unknown type name uint16_t during code generation

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

Unknown type name uint16_t during code generation

Jump to solution
2,932 Views
raywu
Contributor I

I am using the S32k144 with the toolbox. I am getting this error during code generation. However when I try the GPIO_ISR example project in the toolbox that compiles no problem. I also have another project I worked on before using interrupts and that also compiles without issues. It only happens on new projects.

The program I'm trying to compile is a simple test problem. I have attached it below along with the error message.

I have installed the 4.1.0 hot patch 2 from this thread HotFix: MBD Toolbox S32K v4.1.0 

Edit:

I just tried removing and reinstalling the toolbox. The problem still occurs

0 Kudos
1 Solution
2,720 Views
mariuslucianand
NXP Employee
NXP Employee

Hello raywu@wayne.edu‌,

I'm curious, please go to the gpio example and test to see if the following gpio_isr_control_s32k144.mdl example successfully compile :smileygrin:

For the issue you have mentioned, let's try changing a header file and see if the issue is solved.

Please go to {Toolbox Intallation File}\src\mbdtbx_s32k14x\src\includes and replace the attached gpio_irq.h file.

Please go to {Toolbox Intallation File}\src\mbdtbx_s32k14x\src\c_library and replace the attached gpio_irq.c file.

Then try regenerating the code from your model and it should compile successfully.

Hope this helps,

Marius

View solution in original post

0 Kudos
6 Replies
2,720 Views
constantinrazva
NXP Employee
NXP Employee

Hello raywu@wayne.edu,

Can you share the model with us? The one that generates this issue? If you have proprietary code, you can strip it out and just let the minimum needed to generate this build error - this could help us reproduce it locally and find a solution quicker.

I would also like to know if you could share the output of the ver command, ran in MATLAB terminal.

Kind regards,

Razvan.

0 Kudos
2,720 Views
raywu
Contributor I

Hello mariuslucianandrei constantinrazvan.chivu

Thank you for the reply

The ver command outputs

-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.7.0.1319299 (R2019b) Update 5
MATLAB License Number: 521249
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 18363)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB                                                Version 9.7         (R2019b)       
Simulink                                              Version 10.0        (R2019b)       
AUTOSAR Blockset                                      Version 2.1         (R2019b)       
DSP System Toolbox                                    Version 9.9         (R2019b)       
Embedded Coder                                        Version 7.3         (R2019b)       
Image Processing Toolbox                              Version 11.0        (R2019b)       
MATLAB Coder                                          Version 4.3         (R2019b)       
Model-Based Design Toolbox for S32K1xx Series         Version 4.1.0       (R2017b-R2019a)
Signal Processing Toolbox                             Version 8.3         (R2019b)       
Simulink Coder                                        Version 9.2         (R2019b)       
Stateflow                                             Version 10.1        (R2019b)       
Statistics and Machine Learning Toolbox               Version 11.6        (R2019b)       
Symbolic Math Toolbox                                 Version 8.4         (R2019b) 

I have attached the generated code and the slx file at the top comment

0 Kudos
2,721 Views
mariuslucianand
NXP Employee
NXP Employee

Hello raywu@wayne.edu‌,

I'm curious, please go to the gpio example and test to see if the following gpio_isr_control_s32k144.mdl example successfully compile :smileygrin:

For the issue you have mentioned, let's try changing a header file and see if the issue is solved.

Please go to {Toolbox Intallation File}\src\mbdtbx_s32k14x\src\includes and replace the attached gpio_irq.h file.

Please go to {Toolbox Intallation File}\src\mbdtbx_s32k14x\src\c_library and replace the attached gpio_irq.c file.

Then try regenerating the code from your model and it should compile successfully.

Hope this helps,

Marius

0 Kudos
2,720 Views
raywu
Contributor I

mariuslucianandrei

Replacing the files solved the problem. Thank you for your help.

Was this due to installing the patch or another problem?

0 Kudos
2,720 Views
mariuslucianand
NXP Employee
NXP Employee

Hello raywu@wayne.edu‌,

The patch has nothing to do with this issue, we recommend installing the patches that we provide :smileygrin:. The issue appeared during the compiling process and it seems that the stdint.h header had so be moved between the two files that I have attached.

Hope this helps,

Marius!

0 Kudos
2,720 Views
mariuslucianand
NXP Employee
NXP Employee

Hello raywu@wayne.edu‌,

Can you please attach the model and the generated code? Probably is a setting that has to be applied to one of the Stateflow subsystem.

Hope this helps,

Marius

0 Kudos