Hello,
I just purchased a S32K3X4EVB-T172 EVal board. I tried to run the example "code s32k3xx_dio_s32ct". It compiles correctly, though, can't load into the board. The same board I could make it work with a simiular example directly from NXP DS.
I also changed the Hardware part to "S32K344-Q172". It is the same. It gives the error "Runtime error 216 at 6BEBA7AE". Then the following message:
And this log:
"
C:\Users\amaknouninejad\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K3xx\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
GNU gdb (GDB build.sh rev=g0219b1f s=F930 Earmv7nGDB (BLD = 1701)) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from C:/Users/amaknouninejad/OneDrive - Anduril 365 Gov/MATLAB/ExamplesVer14/S32K3_Examples/dio/s32k3xx_dio_s32ct.elf...
Remote debugging using tcp:localhost:7224
0x00000000 in ?? ()
Loading section .pflash, size 0x24018 lma 0x400000
Loading section .ARM.exidx, size 0x8 lma 0x424018
Loading section .sram_data, size 0x1b0 lma 0x424020
Loading section .non_cacheable_data, size 0x10 lma 0x4241d0
Remote communication error. Target disconnected.: Not a directory."
Could you please help me what is wrong, and how I can make it right?
Hi Dragos,
I'm using MATLAB R2024b, with NXP add on 1.4. I tried NXP add on 1.7 at first, but the MATLAB example codes do not work with 1.7. It asked me to downgrade to 1.4. So did I.
My NXP DS is ver 3.6.1.
I appreciate your help.
Thanks,
Ali
Hi,
Firstly, please ensure that there is only one toolbox in your MATLAB path—the one you intend to use. This helps prevent potential issues where files might be inadvertently loaded from an unintended toolbox.
Secondly, could you please elaborate on what you meant by saying that the example codes do not work with version 1.7.0? This will help us better understand the issue you are reporting.
Best regards,
Dragos
Hi, @alimaknouni,
Could you please let us know which versions of the toolbox and MATLAB you are currently using, so we can attempt to reproduce the error on our side?
Additionally, we have recently released a new version of the S32K3 toolbox, version 1.7.0. If you are not already using it, we recommend upgrading and trying to download the code to the hardware board again.
Best regards,
Dragos
Hello,
I don't know why my previous replies are not posted here.
I'm repeating.
I have installed MATLAB R2025a with add on 1.7, and MATLAB R2024b with add on 1.4.
If I try to open any MATLAB NXP example with MATLAB 2025a, add-on 1.7, I get the following error.
Actually, if I just ignore this and continue running the code, it will compile, and even load into the MCU and run correctly!
Could you please clarify with this? Can we focus on resolving this? For now, I will continue using the embedded coder with this alarm until we find what is going on.
Thanks,
Ali
Hello,
The error you get is due to the fact that MBD Toolbox for BMS is working only with MBD Toolbox for S32K3 1.4.x version. It is not compatible with S32K3 1.7.0 version.
To solve that error, you can do the following:
1. Do a backup of the modified examples (if any) from the toolbox.
2. Uninstall all toolboxes, on both MATLAB R2025a and MATLAB R2024b.
3. Modify the addons default installation path for each MATLAB version you have installed. Please use a short name and without whitespaces. It must be unique for each MATLAB version you have.
e.g.: MATLAB R2024b default path : "C:\MATLAB\Addons\Toolboxes\R2024b"
MATLAB R2025a default path: "C:\MATLAB\Addons\Toolboxes\R2025a".
To change the default installation folder follow these instruction:
4. Install again the NXP MBD Toolboxes you need for each MATLAB version.
In your case, the problem is that both MATLAB version have the same installation folder and even though you installed a toolbox in a R2024b, it is also available in R2025a. The S32K3 1.4.x checks for other S32K3 toolboxes and it detects that the 1.70 is installed, hence the error.
Let me know if this solution fixes your problem.
Best regards,
Sorin Bancila
Hi Sorina,
Thanks for your explanations.
Actually, in the beginning I only installed MATLAB R2025a, and Add-on Ver 1.7. Though, it was giving the compatibility issue.
Therefore, I'm not sure if re-installing add-ons would solve this problem.
Is there any other way to resolve this?
Thanks,
Ali