Matlab module building error

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

Matlab module building error

2,104 Views
dsytj88
Contributor II

Hello,

I try to build ADC_Read(in lesson 3) module,but during the buliding,one message box will be occured,but I can't

open this message box.Without closing the message box,the building process will be running all the time,I have attached the log file,could you please check and give me some support?

I checked the port is right.

Thank you

Best regards

david

Original Attachment has been moved to: ADC_Read.txt.zip

0 Kudos
15 Replies

1,537 Views
dsytj88
Contributor II

Hi,Both

Thank you for your fast reply,several minutes ago the message box problem has been resolved by re-installing the tool.

now I can see the message box,after clicking it,programming will be started,but the programming is not sucessfully,please see the attached file for detailed info.

I use USB serial line to connect between development board and PC.

Best regards

David

0 Kudos

1,537 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi David, 

Ok - glad to see we are making progress :-)

Now this issue is simple to fix: you need to program the RBF (RAppID Bootloader Flash algorithm) on the board. Only after this file is burned into the flash memory the proper communication bridge between Matlab and MCU will be establish.

Please watch the steps in this video: starting with minute 2.02 @ Video Link : 7766 

Note: The good news is that you need to go over this setup only once

You are very close to run your first application on this board.

Best regards,
Daniel

0 Kudos

1,538 Views
dsytj88
Contributor II

Hi,Daniel

I try to re-programme RBF,and in Console,I see the log file as belows:

Connection from "127.0.0.1" via 127.0.0.1
Copyright 2012 P&E Microcomputer Systems,Inc.
Command Line :C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\pegdbserver_power_console -device=MPC5744P -startserver -singlesession -serverport=7224 -interface=USBMULTILINK -speed=5000 -port=USB1 -confi

CMD>RE

Initializing.
Target has been RESET and is active.
CMD>CM C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\gdi\P&E\freescale_mpc5744p_1x32x616k_cflash.pcp

Initializing.
Initialized.

;version 1.02, 08/01/2012, Copyright P&E Microcomputer Systems, www.pemicro.com [5744P_2464k]

;device Freescale, MPC5744P, 1x32x616k, desc=CFlash

;begin_cs device=$00F98000, length=$00268000, ram=$40000000

Loading programming algorithm ...

WARNING - Selected .PCP file has been modified. CRC16 = $1599
Done.
CMD>EM

Erasing.
Module has been erased.
CMD>PM

Programming.
Processing Object File Data ...
                               
.
Programmed.
CMD>VC
Verifying object file CRC-16 to device ranges ...
   block 00F98000-00F98007 ...
Ok.
   block 00F98010-00F996D1 ...
Ok.
   block 00F996D4-00F9A11B ...
Ok.
   Checksum Verification Successful. (Cumulative CRC-16=$3BE9)
CMD>RE

Initializing.
Target has been RESET and is active.

Starting reset script (C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\gdi\P&E\s32e200_mpc574xp.mac) ...
REM This script is compatible with MPC574xP devices.                                                                                                                                                   
REM Initialize all of the Main SRAM - 384KB                                                                                                                                                            
Initializing RAM from $40000000 to $4005FFFF.
Reset script (C:\Freescale\S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.3.3.201605241936\win32\gdi\P&E\s32e200_mpc574xp.mac) completed.
 It seems everything is fine,but when I try to programme the module,it shows me the same error as what I mentioned yesterday.
I checked the S32 debug page,only one abnormal thing found,after clicking pwerpc-eabivle-gdb(sub menu in debug page),I see these words:
GNU gdb (GDB) 7.8.2
Copyright (C) 2014 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-mingw32 --target=powerpc-eabivle".
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".
monitor preserve0 0
monitor selectcore 0
No symbol table is loaded.  Use the "file" command.
continue
Continuing.
Do you have the similar problem before?
Thank you
Best regards
David
0 Kudos

1,538 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi David,

How did you configured the serial port from the MATLAB Toolbox. Can you attach a snapshot with Download settings panel from Configuration Block ?

It should be something like this:

1.JPG

Best regards,

Daniel

0 Kudos

1,538 Views
dsytj88
Contributor II

Hi,Daniel

I checked the configuration which is as the same as yours.

even I try to use the tool in matlab tool box directly,the error is the same,please see picture as belows:

ApplicationProgrammingError.png

by the way,I didn't see abnormal case for driver or something else.

Best regards

David

0 Kudos

1,538 Views
dumitru-daniel_
NXP Employee
NXP Employee

David, 

That is quite strange!

So - when you have flashed the RBF file that succeeded  - you have used the same USB Open SDA interface on your board - or you have used the JTAG port ?

I'm trying to figure out if the UART works on your custom board.

Best regards,
Daniel 

0 Kudos

1,538 Views
dsytj88
Contributor II

Hi,Daniel

after flashing RBF file with OSJTAG,I changed another device DTECH(USB-Serial line) to programme application S/W.

Best regards

David

0 Kudos

1,538 Views
dumitru-daniel_
NXP Employee
NXP Employee

OK - but how do we know that DTECH works ?

Have you been able to validate the Serial communication with the board yet ?

If something is wrong with that then the Matlab has no means to to connect with the board via UART.

Here is how i should test it:

#1: I would take the uart_model_pnt.mdl from the Toolbox example and build it. No download to target - just to get the elf.

#2: Using S32DS and JTAG i would flash this elf into the target (similar with what you have done with RBF file). Keep in mind that this will overwrite the RBF so later on you will need to reprogram it back.

#3: then reset the board and connect to the UART with any COM sniffer and try to sent a character

If you get that character back (if you are allow to sent a new one) then it meas the UART work.

1.JPG

#4: check with an oscilloscope that we get both RX TX signals when this happens.

To make the test more realistic i would modify this demo project to sent continuously from target to the Host PC a string of DATA just to make sure the UART is stable.

Hope this helps!

Daniel 

0 Kudos

1,538 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi David, 

The log file seems to be fine - i mean the executable file is created. 

Can you attach a screenshot image with the message box you said it blocking you ? Perhaps we can figure it out what it is.

Thank you!

Daniel

0 Kudos

1,538 Views
dsytj88
Contributor II

Hi,Daniel

I have attached this picture in this message.

the message box indicates to do some operation,but the problem is:

the message box can't restored,and I can't click Ok button.

Please see the messsage box in the file.

Best regards

david

0 Kudos

1,538 Views
paulvlase
NXP Employee
NXP Employee

Hi dsytj88@126.com‌,

Can you check if there is any exception/error/warning in the Matlab Console window?

Try to select the dialog window from the Taskbar and hit 'Enter'. The default option is 'Yes' so it should proceed with the download of the application.

The requirement for downloading the application is to have MPC5744P.rbf (from C:\MBDToolboxtools\BootLoader\RBF_Files) flashed on the board. You can use the S32 Design Studio for Power Architecture to download this .rbf image.

0 Kudos

1,538 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi David, 

That message box tells you to restart the board in order to program the application into the MCU memory. Prior of that you need to program the RBF file into the MCU memory in order to do the handshake between Matlab and BAM algorithm (ADC programming video starting with minute 2.20) 

Nonetheless, since you are saying that you can control the Message Box Window - i think this might have something to do with your Windows OS: i see that you are using Windows 10. Can you choose a different theme in your OS ?

One workaround would be download the application manually to the board using the RAppID_BL.exe application from {MBD Toolbox install folder}\mbdtbx_MPC574xP\tools\BootLoader

In this case you should disable the "Enable Download after build" and "BAM request delay" from Simulink model properties.

In the mean time - i will try to figure it out why the dialog box created from Matlab does not work on some Windows 10 OS.

Hope this helps!

Daniel

0 Kudos

1,538 Views
dsytj88
Contributor II

Hi,Daniel

Since I use USB serial line for communication between development board and PC,the seperate programming by RAppID_BL.exe is failed,I see this tool is supported with XCP protocal,that means I need to use CAN bus for communication,but now I don't have this tool.

for the bootloader programming,it's fine.

In win10 operation system,I have to find out the reason why the message box can't be operated in my PC.even I try to change the theme in my laptop,it doesn't work,do you have any progress?

Best regards

David

0 Kudos

1,538 Views
paulvlase
NXP Employee
NXP Employee

The MBD Toolbox is running RAppID_BL.exe to download the built application to the board, but you can download the generated .mot file manually. It supports both UART and CAN communications. You find it in C:\MBDToolbox\MPC574xP\tools\BootLoader.

I don't understand what problems you had with it. You have to select from 'Comm Mode' dropdown 'Serial Port'.

RAppID_BL.jpg

In my case the serial port (over USB converter) is COM31.

Set 'MCU Part No:' to 'MPC574xP', 'BAM Status' to 'Enabled', and check 'Default Password'.

Select the generated .mot file and press the 'Start Boot Loader' button.

0 Kudos

1,538 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi David, 

You have separate Serial communication between the development board and the PC ? What is that for ?

Can you disconnect that and leave only the Model Based Design Toolbox and/or RAppID_BL.exe to communicate via USB with the development board ?

On my side so progress so far with the failure. On our test machine with Win10 is working. 

Can you tell me your Matlab version ?

Thank you!

Daniel

0 Kudos