Undefined function 'ert_make_rtw_hook'

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

Undefined function 'ert_make_rtw_hook'

2,738 Views
marcuslim
NXP Employee
NXP Employee

Hi,

I was following the QSG and testing the Hello World as shown in section 2.3.

However when I press the "build" icon, I have the following error:

Build 
1
Clear
11:46 AM Elapsed: 8 sec
The call to mbd_s32k14_make_rtw_hook, during the entry hook generated the following error: Undefined function 'ert_make_rtw_hook' for input arguments of type 'struct'. The build process will terminate as a result.
Caused by:
  • Undefined function 'ert_make_rtw_hook' for input arguments of type 'struct'.
Component:Simulink | Category:Block diagram error
Labels (1)
Tags (2)
0 Kudos
12 Replies

2,393 Views
constantinrazva
NXP Employee
NXP Employee

Hello marcuslim‌,

Can you open the Options menu from that model and go to Code generation tab? I'd like to know what is selected as System target file. It should be mbd_s32k14.tlc. Something different might trigger such an error.

Kind regards,

Razvan.

0 Kudos

2,393 Views
marcuslim
NXP Employee
NXP Employee

Hi Razvan,

Please see the screen shot:

Kind Regards,

Marcus Lim

0 Kudos

2,393 Views
marcuslim
NXP Employee
NXP Employee

Hi Razvan,

Any comments?

Regards,

Marcus

0 Kudos

2,393 Views
paulvlase
NXP Employee
NXP Employee

Hi marcuslim‌,

Can you check if you have Embedded Coder toolbox? You can run ver command in the Matlab console to list all Matlab toolboxes installed.

0 Kudos

2,393 Views
constantinrazva
NXP Employee
NXP Employee

Hello marcuslim‌,

First of all, please confirm that you have embedded coder toolbox - as Paul asked. I think it's impossible that you do not have that toolbox, having the code generation options available and the build model button, but just to make sure.

Secondly, as I can not reproduce in my setup your problem, I will be sending you a file for you to replace and send me back the output after you build a model. Maybe I can figure out what is wrong this way, on your setup.

Kind regards,

Razvan.

0 Kudos

2,393 Views
constantinrazva
NXP Employee
NXP Employee

Hello marcuslim‌,

I have attached here a file for you to change, but first make a backup of the file you currently have, so you can revert it back later. You can just rename it with _backup.

Replace the following file:

{MBDT_ROOT_DIR}\mbdtbx_s32k14x\mbdtbx_s32k14x\mbd_s32k14_make_rtw_hook.m

After replacing this file, please run a model and give me the output from Diagnostic Viewer.

Note: to open Diagnostic Viewer, just click the View button - you can find it center-down from in your model, as highlighted here:

pastedImage_3.png

Save that output in a .txt file and put it here. 

Kind regards,

Razvan.

0 Kudos

2,392 Views
marcuslim
NXP Employee
NXP Employee

Thanks!

I contacted Matlab and they provided me the Embedded Coder where they missed it. I have successful installed it.

0 Kudos

2,392 Views
constantinrazva
NXP Employee
NXP Employee

Hello marcuslim‌,

So just to be clear, now you have everything working?

KR,

Razvan.

0 Kudos

2,392 Views
marcuslim
NXP Employee
NXP Employee

Hi Razvan,

Sad to say, no…

Still having error per my last diagnostic info.

Kind Regards,

Marcus Lim

0 Kudos

2,392 Views
constantinrazva
NXP Employee
NXP Employee

Hello marcuslim‌,

I see no diagnostic file - only immage001.gif file. Could you please check and re-upload ?

Kind regards,

Razvan.

0 Kudos

2,392 Views
marcuslim
NXP Employee
NXP Employee

Hi Razvan,

Thanks for your guide !

After checking further, with the license file updated, the last mentioned error is gone.

It is now settled.

Thanks once again!

Kind Regards,

Marcus Lim

0 Kudos

2,392 Views
constantinrazva
NXP Employee
NXP Employee

Hello marcuslim‌,

Glad to see it working!

Kind regards,

Razvan.

0 Kudos