Some error occour when i using MDBT to open model!

cancel
Showing results for 
Search instead for 
Did you mean: 

Some error occour when i using MDBT to open model!

Jump to solution
242 Views
assangeye
Contributor I

000.png

i just build the environment to develop RT1062 with MBDT tool,but when open a model,this fault appear.i don't how to figure it out and can find nothing.

0 Kudos
1 Solution
39 Views
nxa11767
NXP Employee
NXP Employee

Hello,

Seeing now your screenshot with your workspace I've notice that the toolbox is installed in a location with spaces in its name. The JTAG download is using some windows bash scripts that don't perform correctly with spaces in its path. This should fix the download in via JTAG in FLASH memory.

When downloading via OpenSDA, the JLink is not used but the Integrated OpenSDA USB CMSIS Debug and Programming adapter. 

About importing in MCUX IDE, the toolbox has an option of exporting the project to make it buildable in MCUX IDE (meaning building all the links to the generated simulink folder, the .mex file used and the compilation/linker flags used from simulink). The option is available in Model Settings -> Hardware Implementation -> Target Hardware Resources-> User Paths, Export generated projects

 

nxa11767_0-1618387009978.png

As export option:

 - Simulink model folder - will just update the <model_name>Config project in the current location of your model, and in this way any change you do in the MCUX IDE will be seen in Simulink and the vice-versa.

- To local filesystem - choose another path to save the <mode_name>Config and <model_name>_ert_rtw folders.

When importing in the MCUIDE the <model_name>Config folder I recommend to not use copy project into workspace because some paths might break. After importing you can change the settings of the project from the MCUX IDE - like memory sizes, linker files etc, from project settings. Also for this export option is better if the toolbox or current location of the model is in a path without spaces.

 If you want to change from simulink memory sizes, you must change the linker files for the project. Those are found in the <model_name>Config/linker_files folders, flash or ram folder depending on the Target Memory selection.

 

BR,

Alexandra

 

View solution in original post

0 Kudos
18 Replies
221 Views
nxa11767
NXP Employee
NXP Employee

Hello assangeye

Is a problem caused by the mismatch on datetime settings between matlab and your system. 

Please see this post for a fix: https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/The-model-design-based-on-kV-Series-MCU-en... (similar issue we have also on the Kinetis V toolbox). (scroll down till the end of the post, and the latter post explains in detail for to fix it).

Regards,

Alexandra

 

 

0 Kudos
218 Views
assangeye
Contributor I

But,i also have question on building zhe model. I am using Matlab2019a,i open the evkmimxrt1060_gpio_interrupt-simulink model,when i build the model,some error occour,and i try to figure out it by change the setting with MCUX_CFG.I press the update button which is in block parameters,but it doesn't work?Now i can't run any model,how can i do it?001.png

0 Kudos
211 Views
nxa11767
NXP Employee
NXP Employee

You followed the steps from that post and restarted afterwards the matlab?

The problems you see in the model will get fixed once the datetime error is fixed. The block should see that the interrupts on GPIO5 are already enabled in the .mex file, but it gets that datetime error in the process.

Additionally, after you make the datetime settings in the matlab preferences and your system, run a script that in found in the root of the toolbox folder: mbd_imxrt_path.m.

Alexandra

0 Kudos
190 Views
assangeye
Contributor I

And is there any other guide book for us to create my own project,with MBDT.i want to develop our board with rt1061,so i want to know how to start a simulink project  which i can move to other disk in my computer?

0 Kudos
183 Views
nxa11767
NXP Employee
NXP Employee

Unfortunately in the toolbox quick start guide this scenario is not documented. But please see here attached a quick document with the steps to follow to create a Simulink model from scratch to be deployed on the IMXRT MCU. 

I hope this document will help you.

Best regards,

Alexandra

0 Kudos
151 Views
assangeye
Contributor I

Thanks for your early help,but there is a new problem,when i pin "M12",route to GPIO_AD_B1_03,and the signal is GPIO1_19.But i can't find the correct pin in my block setting.Is it a BUG?333.png

0 Kudos
140 Views
nxa11767
NXP Employee
NXP Employee

You need to specify in pins settings, in Configuration Tool, the direction: Input or Output.

The GPIO Output block will look for the pins configured with direction output in the Configuration tool. So in your case you should set Direction to Output, ctrl+s (to save the changes in configuration tool) and then press in simulink, in the GPIO Output block the Update button to see the changes.

BR,
Alexandra

0 Kudos
133 Views
assangeye
Contributor I

Thanks for help ,i have another question can i down the project via jlink? When i set jlink linking to board via SWD mode,and press build ,but it doesn't work.is there any other settings? i want to know what does this flash mean?is it mean RAM(addr:0x00000-0x20000)?becasue i have bootlaoder,and i need to know how to manage the memory to download files to the correct address.444.png

0 Kudos
121 Views
nxa11767
NXP Employee
NXP Employee

The target memory represents how the application will be linked: to run from FLASH , so the application will have addresses starting with 0x6000_0000 and will execute in place (XIP execution) or from internal OCRAM.

For using the JTAG option, you need to browse for JLink.exe instead of JFlash.exe (same Utility to be used if target memory is RAM).

 

BR,

Alexandra

0 Kudos
98 Views
assangeye
Contributor I

Thanks for your help,i can download program to MIMXRT2060-EVK with OPENSDA.But when i change to using JATG to download the program,it seem doesn't work.First of i change the model config,the i press the "Build,Deploy&Start" button.Is there any other settings?

55-1.png55-2.png

0 Kudos
77 Views
nxa11767
NXP Employee
NXP Employee

Hello,

 

In the build folder of the model, you'll find 2 files: script.jlink and program_board.log, Can you attach the two files?

If you switch to Flash as target memory and use JTAG as download is working ok?

Thanks,

Alexandra

0 Kudos
58 Views
assangeye
Contributor I

hello,

i follow your suggest to find this files,but i find nothing.

414-3.png

414-2.png

And i try to download file to SRAM,i also doesn't work.

414-1.png414-4.png

Finally,i read to RN file again,and i find this!Does it mean the modle doesn't support JTAG?

err.png

0 Kudos
49 Views
nxa11767
NXP Employee
NXP Employee

Hello,

 

If you change the Target Memory from SRAM to FLASH, like below:

nxa11767_0-1618381120699.png

is flashing of the application via JTAG?

The script.jlink and program_board.log are placed in the same location as the <model_name>_ert_rtw folder.

I did some tests on my side for JTAG download on SRAM memory (internal memory) and indeed there's an issue there, but we plan a fix for the incoming release of the toolbox (end of April).

BR,
Alexandra

0 Kudos
45 Views
assangeye
Contributor I

hello,

i follow your suggest again,and i can't find this 2 files.when i change openSDA to JTAG to download program ,it seems doesn't start jlink service and do not have anyother message window.

414-10.png414-11.png

what's more,when i import the project to MCUXpresso,and faild to build the project .So i doubt that if i choose the MBDT,i can't build to project with MCUXpresso anymore? But if i want to change the size of DTC or IDTC,how can i do that.

414-12.png

0 Kudos
40 Views
nxa11767
NXP Employee
NXP Employee

Hello,

Seeing now your screenshot with your workspace I've notice that the toolbox is installed in a location with spaces in its name. The JTAG download is using some windows bash scripts that don't perform correctly with spaces in its path. This should fix the download in via JTAG in FLASH memory.

When downloading via OpenSDA, the JLink is not used but the Integrated OpenSDA USB CMSIS Debug and Programming adapter. 

About importing in MCUX IDE, the toolbox has an option of exporting the project to make it buildable in MCUX IDE (meaning building all the links to the generated simulink folder, the .mex file used and the compilation/linker flags used from simulink). The option is available in Model Settings -> Hardware Implementation -> Target Hardware Resources-> User Paths, Export generated projects

 

nxa11767_0-1618387009978.png

As export option:

 - Simulink model folder - will just update the <model_name>Config project in the current location of your model, and in this way any change you do in the MCUX IDE will be seen in Simulink and the vice-versa.

- To local filesystem - choose another path to save the <mode_name>Config and <model_name>_ert_rtw folders.

When importing in the MCUIDE the <model_name>Config folder I recommend to not use copy project into workspace because some paths might break. After importing you can change the settings of the project from the MCUX IDE - like memory sizes, linker files etc, from project settings. Also for this export option is better if the toolbox or current location of the model is in a path without spaces.

 If you want to change from simulink memory sizes, you must change the linker files for the project. Those are found in the <model_name>Config/linker_files folders, flash or ram folder depending on the Target Memory selection.

 

BR,

Alexandra

 

View solution in original post

0 Kudos
36 Views
assangeye
Contributor I

hello,

First i buld the model,to generate files, next i press "Simulink model folder",i find it can't export,and matlab command occur error.what's more,i find the xxxxx.mex file is be deleted.

414-20.png414-21.png

And if i press "To local filesystem",it export succeed .Then i import to MCU.IDE,and build the project.it also occour an error.

414-22.png

0 Kudos
31 Views
nxa11767
NXP Employee
NXP Employee

Hi,

That's because of the spaces in the path. Can you install the toolbox in a path without spaces?

 

Alexandra

0 Kudos
10 Views
assangeye
Contributor I

Thanks for your help.i can work well now.

0 Kudos