RappID_BL error - Unable to download generated code from simulink

cancel
Showing results for 
Search instead for 
Did you mean: 

RappID_BL error - Unable to download generated code from simulink

Jump to solution
3,225 Views
raghurajappa
Contributor IV

Hi,

I used simulink + embedded coder to generate code for MPC5643L using the MotorControl Toolbox available from NXP. Now the code generation was successful. But after this I am unable to proceed further to program the micro controller with this generated code. Attaching an image of the error. The RAppID BL tool does not work as intended. 

It is also important to note that I DO NOT know how to use the RAppID and I could not also find a step by step tutorial on how to use it. Any help in this direction will be useful. 

SUmmary - I would like to understand how to use the RAppID BL and Simulink to program the microcontroller. I also tried to open the RAppID BL as a standalone application and get this error (attached) and cannot proceed further. At this moment, I am trying to use the serial communication port. 

1 Solution
688 Views
raghurajappa
Contributor IV

The err log lines include,

"can_simple_block.c", line 58: warning (etoa:1643): narrowing or signed-to-unsigned type conversion found: unsigned int to unsigned char
"can_simple_block.c", line 115: warning (etoa:1606): conditional expression or part of it is always true/false
"can_simple_block.c", line 116: warning (etoa:1522): statement not reached
"can_simple_block.c", line 153: warning (etoa:1606): conditional expression or part of it is always true/false
"can_simple_block.c", line 154: warning (etoa:1522): statement not reached
"can_simple_block.c", fatal error (etoa:1635): License error: Unknown LMAPI error

So I see it's a license error. But I have downloaded the evaluation. I think I will contact WindRiver first to help me with this. If the problem still persists, then I will write back to you. For now, I see the problem. But thank you for helping me get to this issue :smileyhappy: 

View solution in original post

17 Replies
688 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi raghurajappa‌,

Here is a video recording about RAppID bootloader: Overview of RAppID Bootloader|NXP 

The MBD Toolbox is bundled with this RAppID application just to be self contained. You can download a newer version of the RAppID from here: RAppID Initialization for Power Architecture|NXP 

Your errors looks like something related with the OS, perhaps some missing Microsoft Redistributables packages. Try to get a newer version and check if you can open it. I'm using Win7 and have no issues with that.

Thanks to paulvlase

The error is cause due to missing COM port. Please make sure you at least one COM port enabled in the Device Manager/Ports (COM&LPT)

Hope this helps!

Daniel

0 Kudos
688 Views
raghurajappa
Contributor IV

Could you please help me understand better? I basically have vector CANcaseXL connected to my computer and it is setup correctly (image attached below)

rappidBL_Error1.pngrappidBL_downloadpage.png.

There are two problems I face at this moment.

1. But when I use simulink to generate code, the generation is successful BUT after this the RappID application does not open. Nothing happens after the code is generated. Ideally I expect the generated code to be compiled (I have DIAB compiler installed) and then the RappID BL application to open and program the microcontroller. This is the first problem.
2. Now as an alternative I am trying to open RappID BL application.exe (standalone) and then trying to program (first even testing the connection does not work) the microcontroller with some test applications. I am not sure what the problem is and that's what is troubling me. So both ways (standalone as well as integrated with simulink) I am stuck without much progress. 

Also the RappID BL application does consist of newer software for the MPC564xL series of controllers (image attached just above).

Thank you for your support. :smileyhappy: 

0 Kudos
688 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi raghurajappa‌,

1. But when I use simulink to generate code, the generation is successful BUT after this the RappID application does not open. Nothing happens after the code is generated. Ideally I expect the generated code to be compiled (I have DIAB compiler installed) and then the RappID BL application to open and program the microcontroller. 

Please select "Download Code After Build" option in the PIL/BAM Setup within the "RAppID_564xL_Config" This works only if you connect the MCU with the Host PC via UART. Application download via CAN is not supported in the Simulink.

pastedImage_2.png

2. Now as an alternative I am trying to open RappID BL application.exe (standalone) and then trying to program (first even testing the connection does not work) the microcontroller with some test applications. I am not sure what the problem is and that's what is troubling me. So both ways (standalone as well as integrated with simulink) I am stuck without much progress. 

Have you set the board correctly ? Please have a look here: where to look for MPC564xL.rbf file ? 

Then, please refer to chapter 2.9 Enabling Vector Hardware from RAppIDBL_UserManual.pdf. Some additional information here: https://community.nxp.com/message/898475 

Hope this helps!

Daniel

0 Kudos
688 Views
raghurajappa
Contributor IV

Hi Daniel,

As always, thank you for your support. After your comments, I do have another question that I would like to confirm. 

I would like to use Simulink on one PC to generate code (and HEX file) and another PC somewhere else to flash this hex file to the microcontroller. But from what you explain, it looks like Simulink will not generate hex file without the hardware connected. Is this true? In my folder structures also I could not locate any hex files that I could use separately in my IDE. I did this as an alternative where I can use Simulink to generate hex files, then take these hex files into the CodeWarrior IDE (or FreeMaster) and use JTAG to program these. But I could not find the hex files. Please help me with whether my understanding is correct or wrong? 

0 Kudos
688 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi raghurajappa

I would like to use Simulink on one PC to generate code (and HEX file) and another PC somewhere else to flash this hex file to the microcontroller. But from what you explain, it looks like Simulink will not generate hex file without the hardware connected. Is this true?

This use-case it is perfectly supported by the Simulink. You can have the MATLAB/Simulink + NXP Toolbox on one computer and generate all the C/H/makefile/elf/mot files into a folder called ***_rtw that is placed in the current MATLAB path.

Inside this folder you can find all the generated files.

pastedImage_2.png

 In my folder structures also I could not locate any hex files that I could use separately in my IDE. I did this as an alternative where I can use Simulink to generate hex files, then take these hex files into the CodeWarrior IDE (or FreeMaster) and use JTAG to program these. But I could not find the hex files.

By default the toolbox is configured to generate the *.elf and *.mot files

pastedImage_5.png

ELF is the standard DWARF format file that can be used in any IDE. You can use this file to load the application in the MCU with the available Debugger (that is DWARF compliant) via JTAG.

The hex file is special format that could be generated (by default the toolbox generates the mot file format) via 2 different approaches:

#1: starting from ELF you could use jfrey‌ suggestion as here: https://community.nxp.com/thread/452609#comment-910812 

#2: you could modify the toolbox makefiles to generate hex instead of mot as per paulvlase‌ suggestion: https://community.nxp.com/thread/452609#comment-912694 

Hope this helps!

Best regards,
Daniel

0 Kudos
688 Views
raghurajappa
Contributor IV

Hi Daniel,

I tried it with the exact same example. Attaching the screenshot. I cannot find .elf/.mot files in there. rappidBL_error2.png

Everything else is the same. I have not configured FreemasterSetup or CCPSetup in the "Block Parameters" tab. But I find the generated code and everything else in there :smileyhappy: 

0 Kudos
688 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi raghurajappa‌,

Have you configured the DIAB compiler ?

Here is my folder with the same setting as yours. Please find it attached.

Also, can you share your build log file, eventually as txt file ?

Here is how mine looks like:

pastedImage_1.png

Best regards,
Daniel

0 Kudos
688 Views
raghurajappa
Contributor IV

I was about you send you this information :smileyhappy: and you asked for it. It looks like the compile/link error exists but I could not figure out what the problem is. Does it have to do with the VLE enable option? If yes, how do I switch it off?? diagnostic_view_error.png

0 Kudos
688 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi raghurajappa‌,

Supposing you have not changed the mdl example (here's mine for reference with 2017a) the only other difference i see is the DIAB compiler version (i'm using the 5.9.6.3)

If the error still persists and you can't upgrate to a newer version of DIAB perhaps you could give a try to CW for MCU 10.7

Best regards,

Daniel

0 Kudos
688 Views
raghurajappa
Contributor IV

I think I found the answer to question 2 - document to get RappID up and running. But I still didn't find an answer to question 1 :smileyhappy:. Hopefully you'll help me with that. 

688 Views
dumitru-daniel_
NXP Employee
NXP Employee

We can't really fix the error. We use only the binary of RAppID_BL.exe

The only way to avoid that error is to have at least one valid communication port - and that will make the RAppID behaves normally (without complaining about CommCombo)

688 Views
raghurajappa
Contributor IV

Hey Daniel,

Just when I thought it was all fine, I get this error from RappID.

So I have reached a point where I can generate elf and mot files from Simulink. But to use the RappID BL either standalone or integrated, I get this error - screenshot shown here. 

Please note I have not yet connected the hardware to the UART. But even before I can do anything, this error pops up. Even when I do connect the hardware, the same error persists. So two things

rappidBL_error3.png

1. How can I fix this error? (ofcourse) 

2. Is there a document on how to use the RappID to get it up and running? I ask this because my UART interface does not get detected. If this problem is linked to the RappID error then it's alright but I am also making a guess that the problem occurs because UART device driver isn't there.  

0 Kudos
688 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi raghurajappa‌,

Please note I have not yet connected the hardware to the UART

Please make sure you have at least one COM Port enabled and available on your PC. You should connect it to the board and power on the board. After that you'll have the RAppID BL running ok.

pastedImage_1.png

Best regards,

Daniel

0 Kudos
688 Views
raghurajappa
Contributor IV

Ok, so again my understanding was wrong. So it's not USB (PC) to UART (SCI on my evaluation motherboard) interface, but COM (PC) to UART(SCI on my evaluation motherboard) ? Ok, that makes things more clear now. 

0 Kudos
689 Views
raghurajappa
Contributor IV

The err log lines include,

"can_simple_block.c", line 58: warning (etoa:1643): narrowing or signed-to-unsigned type conversion found: unsigned int to unsigned char
"can_simple_block.c", line 115: warning (etoa:1606): conditional expression or part of it is always true/false
"can_simple_block.c", line 116: warning (etoa:1522): statement not reached
"can_simple_block.c", line 153: warning (etoa:1606): conditional expression or part of it is always true/false
"can_simple_block.c", line 154: warning (etoa:1522): statement not reached
"can_simple_block.c", fatal error (etoa:1635): License error: Unknown LMAPI error

So I see it's a license error. But I have downloaded the evaluation. I think I will contact WindRiver first to help me with this. If the problem still persists, then I will write back to you. For now, I see the problem. But thank you for helping me get to this issue :smileyhappy: 

View solution in original post

229 Views
Amr_Awny
Contributor I

I would Like to know How did u resolved that issue

0 Kudos
688 Views
paulvlase
NXP Employee
NXP Employee

Hi raghurajappa

For Diab all compile errors are redirect to err.log file. You can find there the actual error.

Can you attach this file? It is in the rtw folder with the generated files.

0 Kudos