Simulink build error with example code

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

Simulink build error with example code

Jump to solution
5,237 Views
andyknitt
Contributor II

I am getting the following error when attempting to build:

arm-none-eabi-gcc: error: Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-6.3-arm32-eabi/arm-none-eabi/newlib: No such file or directory arm-none-eabi-gcc: error: nosys.specs: No such file or directory gmake: *** [adc_software_trigger_s32k14x.elf] Error 1 ### Build procedure for model: 'adc_software_trigger_s32k14x' aborted due to an error. Error(s) encountered while building "adc_software_trigger_s32k14x"

A full log is attached.  This is  when trying to build the examples in the Model-Based Design Toolbox for S32K1xx Series Version 2018.R1

Any assistance would be appreciated.

Thanks,

Andy 

0 Kudos
1 Solution
4,339 Views
constantinrazva
NXP Employee
NXP Employee

Hello andyknitt‌,

It seems I've sent you another version of the fix (not the final one) - sorry for that. Can you try with the file attached here?

Best regards,

Razvan.

View solution in original post

0 Kudos
12 Replies
1,864 Views
Nardi
Contributor I

Hi, I tried the solutions in the previous comments, but unfortunately I’m still having the same problem "Error(s) encountered while building Es1 " where "Es1" is the name of my scheme on simulink. 

Thanks 

Damiano Nardi

0 Kudos
4,337 Views
senolgulgonul
Contributor II

applying cumulative patch solves it.  thanks 

0 Kudos
4,337 Views
constantinrazva
NXP Employee
NXP Employee

Hello andyknitt‌,

I think this might be due to the fact that it can't find libwinpthread-1.dll in the path. To check if this is the cause, you could:

OPTION 1)

   Manually add to your PATH system variable the path to libwinpthread-1.dll

{Install Root}\NXP_MBDToolbox_S32K1xx\code\tools\gcc-6.3-arm32-eabi\bin

Note: after you've added this manually, you'll have to restart MATLAB (it has to reload the system variables). This change is permanent from this point onward.

OPTION 2)

   Set the PATH variable in MATLAB - note that this change is only made for the running instance; once you restart MATLAB or just open another instance, the changes won't be    visible and you'll have to re-run the command. The command should be 

setenv('PATH',[getenv('PATH'),';<_YOUR_PATH_TO_>\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-6.3-arm32-eabi\bin']);

Note: replace <_YOUR_PATH_TO_> with C:\My Documents\MATLAB\Add-Ons (if that is your path to the toolbox- at least that is what it looks like from the log you've attached).

As a test, I would suggest to try option 2 as it requires no restart needed, open the model and try and build it again. If it works, then go and apply step 1) to make it permanent. 

Please let us know if this does the trick or if you're still having trouble with it.

Kind regards,

Razvan.

0 Kudos
4,338 Views
andyknitt
Contributor II

I ran this:

>> setenv('PATH',[getenv('PATH'),';C:\My Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-6.3-arm32-eabi\bin'])

However, I am still getting the same build error.  A full build log is attached.

arm-none-eabi-gcc: error: Documents\MATLAB\Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\code\tools\gcc-6.3-arm32-eabi/arm-none-eabi/newlib: No such file or directory
arm-none-eabi-gcc: error: nosys.specs: No such file or directory
gmake: *** [lpuart_hello_world_s32k14x.elf] Error 1
### Build procedure for model: 'lpuart_hello_world_s32k14x' aborted due to an error.
0 Kudos
4,338 Views
constantinrazva
NXP Employee
NXP Employee

Hello andyknitt‌,

Could you replace the file attached here in the following path:

{Installation_ROOT}\code\mbdtbx_s32k14x\mbdtbx_s32k14x\mbd_s32k14.tmf

and try building it again?

There was an issue with escaping spaces in your path I didn't notice the first time.

Best regards,

Razvan.

0 Kudos
4,338 Views
andyknitt
Contributor II

Thanks. I tried that but am still getting a build error (slightly different I think). I think it may still be related to the escaping of characters, but not sure.

Full build log is attached.

Andy

0 Kudos
4,340 Views
constantinrazva
NXP Employee
NXP Employee

Hello andyknitt‌,

It seems I've sent you another version of the fix (not the final one) - sorry for that. Can you try with the file attached here?

Best regards,

Razvan.

0 Kudos
4,339 Views
hbgurdal
Contributor I

Hi Constantin Razvan Chivu,

I encountered the same error, but your suggestions did not solve my problem, can you help?
I'm downloading the error file below.

Thanks.

Hasan

0 Kudos
4,339 Views
constantinrazva
NXP Employee
NXP Employee

Hello hbgurdal@gmail.com‌,

Could you show me the output of the following command ran in MATLAB terminal?

getenv('GCC_S32K_TOOL')

Kind regards,

Razvan.

0 Kudos
4,339 Views
hbgurdal
Contributor I

C:\Users\Hasan Basri\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\tools\gcc-6.3-arm32-eabi

4,339 Views
constantinrazva
NXP Employee
NXP Employee

Hello hbgurdal@gmail.com‌,

Sorry for the late reply, I must have missed your reply - could you try to run this command in the MATLAB terminal and see if it works? Just try to build any example model.

setenv('GCC_S32K_TOOL', 'C:\Users\Hasan Basri\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\tools\gcc-6.3-arm32-eabi');

Please let us know if this fixes your issue.

Note: the setenv command only sets the GCC_S32K_TOOL variable during the lifetime of the MATLAB process in which you're running the command. So after restarting MATLAB, this new value will be lost - this is just for testing purpose.

Kind regards,

Razvan.

0 Kudos
4,339 Views
andyknitt
Contributor II

Thank you, that worked!

Andy

0 Kudos