MATLAB Toolchain to program MPC5744P Custom Hardware

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

MATLAB Toolchain to program MPC5744P Custom Hardware

841 Views
scbicer
Contributor I

Hello,

I am designing a custom hardware(MPC5744P) compliance with MATLAB Target Hardware. I bought a DEVKIT-MPC5744P. Thanks to On-Board Debugger(OpenSDA), I am able to directly program DEVKIT-MPC5744P from MATLAB Simulink via the "Build Model" button. As I understood, in this scenario, programming toolchain is;

  • MATLAB Simulink Model -> RAppID BootLoader Tool -> USB -> On-Board Debugger(MK20DX128VFM5) -> UART -> Target MCU(MPC5744P).

But I don't want to add the Onboard debugger to my custom hardware.

I programmed indirectly MPC5744P with this toolchain;

  • MATLAB Simulink Model -> Generated Source Code -> S32 Studio -> P/E micro Multilink Universal -> JTAG -> Target MCU(MPC5744P)

But I can not program directly MPC5744P via MATLAB Simulink without On-Board Debugger. I want to establish a toolchain like below scenarios to programming my custom hardware;

  1. MATLAB Simulink Model -> RAppID BootLoader Tool -> USB -> external On-Board Debugger(MK20DX128VFM5) -> UART/JTAG -> Target MCU(MPC5744P)
    • Does NXP have an external debugger with OpenSDA compliant DEVKIT-MPC5744P rev.E Schematic?
    • If we make our own On-Board Debugger(MK20DX128VFM5) for using externally, How can I find OpenSDA software(compliant DEVKIT-MPC5744P rev.E Schematic) to program own On-Board Debugger? Could you please share it?
  2. MATLAB Simulink Model -> RAppID BootLoader Tool -> USB -> external COTS Programmer/Debugger(P/E Micro etc.) -> JTAG -> Target MCU(MPC5744P)
    • Which COTS programmer/debugger is compliant with OpenSDA to program directly over MATLAB Simulink to my custom hardware via UART or JTAG?

Thanks in advance.

devkit-mpc5744p‌

custom hardware‌

opensda‌

rappid boot‌

from uart‌

jtag‌

usb-uart‌

0 Kudos
1 Reply

718 Views
mariuslucianand
NXP Employee
NXP Employee

Hello scbicer@gmail.com‌,

Thank you for your interest in using MBDT on your custom board!

First of all, the RappID Bootloader is a serial/UART bootloader that must be flashed with the S32DS using JTAG (for DevBoard the onboard OpenSDA is used as JTAG). Once the RappID Bootloader is flashed on the board, Matlab  sends the mot via Serial directly to the board.

For the scenarios you mentioned:

MATLAB Simulink Model -> RAppID BootLoader Tool -> USB -> external On-Board Debugger(MK20DX128VFM5) -> UART/JTAG -> Target MCU(MPC5744P)

  • Does NXP have an external debugger with OpenSDA compliant DEVKIT-MPC5744P rev.E Schematic?
  • If we make our own On-Board Debugger(MK20DX128VFM5) for using externally, How can I find OpenSDA software(compliant DEVKIT-MPC5744P rev.E Schematic) to program own On-Board Debugger? Could you please share it?

The role of the RAppID bootloader is to flash the .mot generated file on the board using UART/CAN. It is just a bootloader, not an actually debugger. On the Rev E board, when the RappID bootloader is used to deploy the mot on target, OpenSDA acts as an usual USB2Serial. So basically if you leave the  PB2/PB3 pins outside on your custom baord (please check the schematic before make the board) you can program the mcu using RappID Bootloader using any USB2Serial device. The same is applied for CAN too but there are other pins there.

The firmware from the OpenSDA can be found here PEmicro | Experts in Embedded tools for Flash Programming and Development 

MATLAB Simulink Model -> RAppID BootLoader Tool -> USB -> external COTS Programmer/Debugger(P/E Micro etc.) -> JTAG -> Target MCU(MPC5744P)

  • Which COTS programmer/debugger is compliant with OpenSDA to program directly over MATLAB Simulink to my custom hardware via UART or JTAG?

The mcu can be flashed without RappID Bootloader, by downloading directly the elf/mot file generated via JTAG from S32DS. Unfortunately, you can not download the generated code directly from Matlab via JTAG. But you can get the .elf from the generated code file and flash it using S32DS via JTAG. Any probe from the PEMicro can program the board.

Hope this helps,

Marius

0 Kudos