How to get .mot file to install RAppID BL Tool

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

How to get .mot file to install RAppID BL Tool

20,033 Views
wangxuan
Contributor III

Hi:

I want to use the RAppID Bootloader tool on a Freescale microcontroller to program the code into the FLASH of the target EVB. I generated a kv4xf_adc_parallel_simult_mcd_rtw file in MATLAB / Simulink using the examples in the MCToolbox toolkit, but I will not use the RAppID Bootloader tool, nor the .mot file, so I can not fill Application file. Can you help me solve this problem?Thank you.

 

best regards

wangxuan

0 Kudos
Reply
10 Replies

19,329 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi wangxuan,

Ok, you installed the IAR in C drive but you still have spaces in the your paths. In case you do not want to modify the 8dot3 option in your Windows OS then you should avoid installing programs in default folder "Program Files".

Anyhow, my settings for Configuration Parameters are identical as yours. 

In addition, here is my settings for the IAR_TOOL system variable. As you can see on my case works fine even in paths that contains spaces

pastedImage_2.png

In my case if i run the command FSUTIL.EXE 8dot3name query C: into the cmd terminal i get:

pastedImage_3.png

Please run the same on your side and let us know the result.

Thank you!

Daniel

0 Kudos
Reply

19,329 Views
wangxuan
Contributor III

Dear Daniel,

Thank you for your help, I have successfully solved the problem of compilation error. I did this: all the installation path to remove the space and modify the environment variables, I think the Motor_Control_Toolbox_Manual_KV4x.pdf given in the previous approach is not very easy to use, as I have in the path with "" , And did not compile normally, so my personal experience is best not to add spaces in the installation path, eliminating the need for unnecessary trouble.

But as my screenshot shows, I did not download the program to the board, my question is if the Download interface selected OpenSDA, is not there no need to use the RappID BootLoader to guide the program to download it to the evaluation board. I still do not know if the .mot file can be dragged directly into the HVP-KV46F15 (G).

I also tried to leverage the RappID BootLoader but did not succeed either, "Loss Communication with CCP MCU. Please cycle power and try again." How can I solve the problem in your experience? Thanks for your help.

Best regards,

wangxuan

0 Kudos
Reply

19,329 Views
brunotremblay
Contributor III

Hello Wang Xuan,

I'm working with the FRDM-KV31F, Model-based design toolbox and Rappid BL and I have the same problem "Loss communication with CCP MCU". Did you found a fix for the communication problem?

Regards,

Bruno

0 Kudos
Reply

19,329 Views
wangxuan
Contributor III

Hi, Daniel,

Thank you for your reply, but I do not know why the model was not compiled successfully. I just built the example in MCToolbox, can not I experiment?

Can you help me solve this problem?Thank you.

best regards

wangxuan

0 Kudos
Reply

19,329 Views
Daniel_Popa
NXP Employee
NXP Employee

Can you tell me if you can build successfully the model attached below (kv4xf_adc_parallel_simult_ORIGINAL.mdl) ?

If i try to run your model i end up blocked in MATLAB command prompt with this message:

-dc switch
00001: %% SYSTLC: Motor Control Toolbox MKV4xF Code Generation Target \
TLC-DEBUG> >>

It looks like you have done some changes in the model and somehow you triggered a sort of MATLAB debugging stage for TLC files. 

If i type "continue" then the MATLAB tries to build the model with the Windows SDK compiler. Seems like you have tried to run a sort of SIL mode.

Also, type a "ver" in your MATLAB command prompt and show me what you get in terms of MATLAB versions.

Best regards,
Daniel

0 Kudos
Reply

19,329 Views
wangxuan
Contributor III

Dear Daniel,

My model did not change well, and I could not get it right. In the attachment I got the Simulink Build Console report and terms of MATLAB versions. What should I do to get the C code correctly and download it to the microcontroller?Here again thank you.

Best regards,

wangxuan

0 Kudos
Reply

19,329 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi wangxuan‌,

I did a little bit of digging and i was able to make your model (the one that you have attached here: https://community.nxp.com/servlet/JiveServlet/download/967567-1-412987/kv4xf_adc_parallel_simult.mdl... ) to generate the code correctly.

Here is what i've changed (in case someone else might be interested)

#1: disabled the Code Generation: Start TLC debugger when generation Code. That option should be unchecked otherwise the code generation will stop.

pastedImage_94.png

#2. Enabled the Verbose Build option to see the output of the code generation in the Simulink build console

pastedImage_97.png

#3 Disabled the "Enable PIL Mode Download" option - since you wish to generate the code and download it to the target for the real peripherals

pastedImage_99.png

#4: Covert the model back to "Stand Alone model" to make it compile with cross compiler toolchain for the CPU and Board you have selected

pastedImage_101.png

Now, after all these 4 modifications you should be able to see the *.elf and *.mot file generated.

pastedImage_102.png

Now, in respect with your issue of not being able to build the code successfully i think it is related with the paths on your PC

pastedImage_103.png

As i can see from your screenshot, it looks like the "Program Files" folder is NOT RECOGNIZED - and the make file looks for a folder that does not exists: "D:/Program"

I think you are in the same situation as the one described here:  Something wrong happens when starting SIL or PIL simulation 

Please try to apply the same workaround (https://community.nxp.com/thread/451367#comment-906759) - or at least avoid paths that contains spaces.

Hope it helps!

Daniel

0 Kudos
Reply

19,329 Views
wangxuan
Contributor III

Dear Daniel,

Thank you for detailed answers, but I still did not solve my problem, the model did not compile successfully downloaded using the IAR compiler to the MCU, I have tried to reinstall the IAR compiler to C drive, but it does not work, there are still pictures In the mistakes, I think it should be the environment variables are not set well, I can refer to the method you have set up, I would like to see how you fill out the Configuration Parameters: Target compiler Opts, thank you.

Best regards,

wangxuan

0 Kudos
Reply

19,329 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi wangxuan‌,

I looked over your zip file with the generated code. According with the MATLAB report you have a build error. The model was not compiled successfully.

pastedImage_1.png

Therefore, this is why you do not see the *.elf or *.mot files in the generated folder.

Please add here the Simulink Build Console report - perhaps we can figure out that is the cause of the build failure.

Thank you!

Daniel

0 Kudos
Reply

19,329 Views
wangxuan
Contributor III

Hi, Daniel,

Thank you for your reply, but I do not know why the model was not compiled successfully. I just built the example in MCToolbox, can not I experiment?

Can you help me solve this problem?Thank you.

best regards

wangxuan

0 Kudos
Reply