Multiple problems with Kinetis KV and i.MX RT Toolboxes

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

Multiple problems with Kinetis KV and i.MX RT Toolboxes

Jump to solution
4,071 Views
Maciek
Contributor V

We have the following problems with installation and use of the Toolboxes (we are new to the MCUXpresso tools):

Installation is done in default Matlab directory '...\Matlab Add-Ons' on Win10 pro and Matlab R2020b (fresh computer setup).

Starting from the KV Toolbox:

1. After 1 install, running 'path' script from toolbox directory returns multiple warnings/errors about not recognized 'Date/Time' format (saying only 'en-US' is accepted - my settings are for Poland).
After changing the system region and format to US - it runs without warnings. We didn't have such problems before with other NXP Toolboxes on Win7 pro.
2. I confirm all effects (exactly the same) as described in the series of posts "https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/MBDT-for-KVx-Series-MCUs-1-0-0-Build-failu..." a few days ago. Build errors (the same) and 'no connection' from 'Config Tools'. We installed Config Tools ver.8.1 separately and redirect the path in the model settings - and now it runs. Is it permanent problem with the Config Tools ver.9 (included with the Toolbox), or should we expect it to be fixed externally (NXP servers) and eventually return to ver.9 ? Should we worry about warning that configuration of the example was done in newer version of the tools and 'if saved some data may be lost...' ?

UPDATE: a few minutes after posting this message I've reopened Matlab and I see that all the content of the library is missing! No examples and no blocks in library catalogs (in Simulink library browser) are visible. However everything is ok in the Toolbox installation directory...

i.MX RT Toolbox:

1. First Installation (first try) - no problems/no warnings. Path script executed as expected. During first opening of the Simulink Library we got multiple warnings about the toolbox system object blocks. The whole listing (Matlab console output) is attached as 'Toolbox.txt' to this post.
2. Going to library browser - almost all RT1010 examples are missing from the library (library shows empty catalogs), only one utility block example is present. In RT1060 FlexIO SPI and FlexIO I2C examples are missing.
At the same time - the models are present in the installation catalog of the Toolbox. Some models are acompanied with Config Tools .mex files but others are not (gpio, memory, gpt...). Is it normal ?
3. After uninstalling the Toolbox (using uninstall from Add-Ons manager) - the paths are not removed from PATH matlab variable - generating multiple warnings at the subsequent matlab start. Do you have a script that automaticaly removes the appended paths in case of complete uninstall of the Toolbox ?
4. After the next installation (second try) - during running 'path' script from the Toolbox directory, we get a list of warnings listed in the attached 'path_warnings.txt' file.
5. Nothing changed in Simulink library behavior - the same as described in 1. and 2. How to make examples visible in the library ?
6. While opening model from catalog (not from library) - ('lpuart_poll' for rt1010) and trying to configure 'lpuart read' block, the Config Tools open but in the accompanied windows console window we get multiple warnings. The whole list (console window copy) is attached to this post as 'MCUXexpr_ConfigTools.txt'. We observe the same behavior with the Toolbox's Config Tools ver.8.1 and with the externally installed Config Tools (also ver.8.1) - after redirecting path in model settings.
At the same time NO such warnings are visible configuring blocks in Kinetis KV models (windows console doesn't even show) after redirecting path for Config Tools to external ver.8.1 (as described earlier).
Models seem to build fine... What are these warnigns about ? Should we ignore it ?

Regards

Maciek

0 Kudos
1 Solution
3,671 Views
nxa11767
NXP Employee
NXP Employee

Hi @Maciek,

I've been talking with mathworks about this and we found an workaround for this problem: in the installation path of the toolbox (e.g AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_KVx) there is a folder called resources. There is a file called java_classpath_entries.xml - remove the <path> entries from the file and restart the matlab. This should be done for both toolboxes.

We will have a permanent fix for this in the next release.

Best regards,

Alexandra

View solution in original post

11 Replies
3,721 Views
brianmckay
Contributor III

Hi Maciek

I am having someone at MathWorks look in to this. Might be an issue on our side; m=we may have a big or undocumented feature that is tripping up the NXP package.

-Brian

0 Kudos
4,044 Views
nxa11767
NXP Employee
NXP Employee

Hello Maciek,

See my answers below.

KVx Toolbox:

1. We use calls to matlab function datetime and that call has some issues. We'll look into this to fix it in next releases.

2. When v9.0 goes live I expect the MCUX Configuration Tool from the toolbox to work, but honestly I cannot guarantee that 100%, not until I try it on my side also - I will let you know. It should not be issues with compatibility - the Configuration tool is data driven and for Kinetis V processors I did not see changes while working back and forth on v8.1 and v9.
You can also try the solution proposed with using offline data - You go here: https://mcuxpresso.nxp.com/en/select_config_tools_data, select the processor you need - and then go to tools\MCUX_CFG_v9\bin\ open the CFG tool (tools.exe) and use the steps from here https://www.nxp.com/docs/en/user-guide/MCUXIDECTUG.pdf chapter 8.8.4 Importing data.

 

i.MX RT Toolbox:

1. About that warning, the audio block is using in simulation the Audio Toolbox. Can you try to install the AudioToolbox ? It should get rid of all the warnings.

2. We've seen the issue after releasing the toolbox and unfortunately we did not find yet the root cause. All the examples and blocks are present in mbd_imxrt_ec_toolbox.slx but the same library is not well displayed in the library browser. We'll have to sync with Mathworks to see what we are doing wrong.

About the .mex files - yes, is normal. We have a default .mex file for each of the supported processors These .mex files have a default peripherals configuration for all the peripherals that are supported in the toolbox. When the user will create a blank model for the IMXRT hardware, this mex file is the one that is used (will be copied next to the model renamed to <model_name>Config.mex)
When you open the models that don't have a .mex attached, you'll notice that a <mode_name>Config.mex file is being created next to the model. These examples are created to work with the default configuration I mentioned.
The other examples have a custom configuration for the used peripherals e.g configure multiple PWM channels or uses the communication peripherals in transfer mode or interrupts (default are set to be initialized in blocking mode).

3.  What's still left in the path?
4.  If you restore to default the matlab path (with restoredefaultpath) and then install the toolbox you still see the warnings?

5.  We'll investigate further the issue and let you know when we found a solution. Until then you can use the examples by accessing the mbd_imxrt_ec_toolbox.slx or mbd_imxrt_examples.slx or by browsing to the examples folder and opening the mdl.

6. You can ignore those errors, it will not affect the functionality of the Configuration Tool. In the KVx toolbox we made some small improvements in this area that will be merged also in the next release of i.MX RT. 

 

Best regards,

Alexandra

0 Kudos
4,010 Views
Maciek
Contributor V

Thanks @nxa11767  for your fast answer. Some problems are now clear - indeed we can use librarise themselves instead of Simulink Library browser...

First to answer your questions:
Ad 1. We don't have the license for Audio Toolbox so I can't check if the installation helps.
Ad 3. After doing 'uinstall' from Add-Ons manager (we have been uninstalling toolbox for i.MX RT) - all the paths related to i.MX RT were still present in path variable. This way each subsequent start of Matlab resulted in a long list of warnings about not existent catalogs...
Ad 4. We have done another 'clean' install (which I describe below) starting with i.MX RT (so the path wasn't populated with anything related to the toolboxes) - these particular warnings are gone - but we get a 'ton' of others...

Additionally we have noticed at some point that we have lost completely the Matlab 'help' system - we have contacted Mathworks support on Friday and waiting for their response. But in the meantime we have found that this loss of 'help' system is related to the toolbox (at least one of them: i.MX RT or KV) - please read my comments below...


We have been experimenting some more with the toolboxes and here are our observations:

1. Another fresh installation of Windows 10 pro (new disk) - we set the region to US and Date/Time format to English(United States) from the start
2. Fresh installation of Matlab tools R2020b. We changed the default Matlab Add-Ons folder to '.../Documents/Add-Ons' (path without spaces). Next we check that the 'help' system is working fine
3. We have installed some additional tools (like 'Arm Cortex-M support for embedded coder) and check 'help' system - again everything is ok.
4. We install i.MX RT toolbox and run 'path' script. Although the region and Date/Time are set as described abowe - we get long list of warnings and 'failures' - the whole listing is in
attached 'imxrt_path_setting.txt' file. You have addressed most of the complaints in your answer, but I have 3 questions:
- there are also warnings about system objects used in 'Video Library': does it mean that Video library also requires some additional toolbox-es ?
- does this mean that Audio and Video blocks (and examples) are useless without additional Mathworks toolboxes (and which) ? (we have licenses for all coders but not for Audio, Computer Vison etc.) If yes: can you supply blocks/libraries that are free from such dependencies (camera and audio capability are important features of the toolbox) ?
- does the multiple 'Failure in datetime.datetime...' at the end of this long list of warnings have any negative impact on the installation/functionality of the toolbox ? Or should it be ignored ?
Can you tell us what and where has to be changed in the System settings to remove them ?
5. Next we install kinetis KV toolbox and run it's 'path' script. The whole list of warning/failures is in the attached 'kv_path_setting.txt'. As you see the list is simular to the list for i.MX RT. Again:
- does the multiple 'Failure in datetime.datetime...' at the end of this long list of warnings have any negative impact on the installation/functionality of the toolbox ? Or should it be ignored ?
6. After opening library with blocks and examples directly (because Simulink library browser shows some models as 'empty catalogs' and others as catalogs containing actual blocks from the toolbox -
complete mess) we see that blocks and examples seem to be where they should.
7. Then after closing everything - we can't shut down Matlab. Application closing icon doesn't work. Writing 'exit' in command window results in 'busy' and Matlab stops responding. After 30-40 minutes we shut down the computer.
8. After restart, we start Matlab and first thing we notice is the loss of the Matlab 'help' system. Writing anything in the 'search' box in the upper right corner of Matlab window results in the listing in the command window that is attached in 'error_after_install.txt'. This is exactly the same error we have observed with the first installation (that I described above, in the first part of this post).

We can't check the toolbox functionality because we are still waiting for a few EVK kits that should be delivered next week. (2 for i.MX RT and 3 for kinetis KV). Right now we would be happy to have a recipe for error/malfunction free installation of the tools: what version of Matlab, System settings etc. should we use ?
We are installing everything from scratch on fresh/empty hard-drive - so there is small chance of some conflicting settings/configurations...

Regards
Maciek

0 Kudos
3,836 Views
nxa11767
NXP Employee
NXP Employee

Hi Maciek,

When doing uninstall of the i.MX RT toolbox do you have in path the KVx toolbox? And you see in the command window while uninstall process a lot of warning related to jar's are cannot be removed from static path - my recommendation here is to remove from the matlab path the KVx toolbox and then uninstall the i.MX RT one. Both toolboxes have MCUX Configuration Tool inside and matlab is adding some java jars' in its static path. I've tried this scenario on Matlab2020b - if I have the KVx toolbox in the path and uninstall the imxrt I'm reproducing the issue you mentioned that the toolbox is still in the path and get warnings at matlab open. To fix this, the next commands did the trick on my side:

restoredefaultpath
matlabrc
savepath

 

The warning that you see related to camera and sai objects while running the mbd_kvx_path is caused also by having the imxrt toolbox in path(matlab will try to load all the targets that it founds in its path).

You said that you changed the time format, but in the log I see a different datetime format than US? Did you changed also in the matlab preferences? Most of the issues seen afterwards are caused by not being able to create the targets because of that failure. To answer your question, yes - the datetime failures are affecting the functionality.

Only the audio functionality  requires an additional toolbox but that is needed only for simulation use case - the code generation part and running generated application on the MCU board will not be affected. We will look into another solution for this. (there was some other option that was removed from matlab and replaced by this one from the AudioToolbox).

I've seen also on my side (not always) warnings related to camera system - we will investigate those, but we did not see problems in functionality while running the camera examples.

That help issue it concerns me - I didn't reproduce it on my end. Do you see any warnings/errors being thrown?

To sum up

- make sure the datetime format is changed in Matlab preferences. This is to fix the datetime failures. If you see this failures then the functionality will be affected.

- at uninstall and install and run path script, make sure that the other toolbox(kvx or imxrt) is not in path (what I did to to right click on the root folder of the toolbox and remove from path)

Best regards,

Alexandra

0 Kudos
3,755 Views
Maciek
Contributor V

Hi @nxa11767,

has anyone looked at the problem of damaged matlab help search box after installation of the KV and/or i.MX RT toolboxes ?

I've done install/uninstall process a few times. Every time I install toolboxes the help search box starts to generate errors (as described earlier). And every time I uninstall both toolboxes - it goes back to normal.

Regards

Maciek

0 Kudos
3,736 Views
nxa11767
NXP Employee
NXP Employee

Hi Maciek,

I've investigated this and I suspect what is causing that problem: there is a conflict version for a jar file between what matlab is using and what is used by MCU Configuration Tool that comes with the toolbox. Matlab is adding the jars it founds in the installed toolboxes folder to its java static path at startup.

I wrote to Matlab asking for help on this. Using the commands that they suggested to you has no effect on my side - problem is still there.

Best regards,

Alexandra

0 Kudos
3,733 Views
Maciek
Contributor V

Hi @nxa11767,

that's what I was thinking. To be sure there are no conflicts with other packages I've done minimal installation. And I'm able to reproduce this problem each time after the following steps:

- install Windows 10 pro

- install newest Matlab 2020b (latest version from Mathworks site) with Mingw compiler

- install support package for Arm Cortex-M

- install i.MX RT toolbox and seth 'path'

After that the error always comes out. And after uninstall - it always goes back to normal.

I'm waiting for the solution...

Maciek

0 Kudos
3,672 Views
nxa11767
NXP Employee
NXP Employee

Hi @Maciek,

I've been talking with mathworks about this and we found an workaround for this problem: in the installation path of the toolbox (e.g AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_KVx) there is a folder called resources. There is a file called java_classpath_entries.xml - remove the <path> entries from the file and restart the matlab. This should be done for both toolboxes.

We will have a permanent fix for this in the next release.

Best regards,

Alexandra

3,664 Views
Maciek
Contributor V

Hi @nxa11767,

it works. Matlab search-box is functional now. 

I will mark this as a solution to this post. Please remember that there are still some unsolved issues:

- erratic 'installation experience' due to regional date/time settings 

- not functional toolbox library in Simulink library browser (at least the examples are not shown or not shown properly)

Regards

Maciek

0 Kudos
3,800 Views
Maciek
Contributor V

Hi @nxa11767,

Mathworks support hasn't much to add in regard the broken 'help' search-box. They propose to check:

>> restoredefaultpath

>> rehash toolboxcache

and if this not helps - reinstall Matlab.

It's not very helpful because we have toolboxes installed and we need the modified path. But I'm reporting to you anyway - maybe it will be helpful ? In any case - it looks like it is NXP Toolbox related problem - please see my post below (from yesterday).

Regards

Maciek

0 Kudos
3,831 Views
Maciek
Contributor V

Hi @nxa11767,

the log of warnings/errors while trying to use matlab 'help' search box is in the attached file 'error_after_install.txt'...

I can confirm that this problem is related to toolboxes !

After full uninstall of KV and i.MX RT -> search box in Matlab help does work again without problem !

From this state I have installed again i.MX RT toolbox -> this time path script executes without ANY warnings (I have no idea why). And immediately after this installation the 'help' search box does NOT work any more (warnings the same as before).

Maciek

0 Kudos