This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Simulink Processor in the Loop (PIL) verification on OMAP-L138 / C6748 - [serial] connectivity configuration

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Hi all,

I am using Simulink and various Mathworks products (Simulink coder, Embedded coder) to generate code from a model for the OMAP-L138 / C6748 (EVM board). Code generation and build process do work as well as the load, execute and run process can be automated via DSS from Simulink.

In order to verify that the executed code is working properly on the target I wanted to perform Processor in the Loop (PIL) verification.
[side note: I could not get SIL working, due to "portable word sizes", see https://uk.mathworks.com/matlabcentral/answers/279543-simulink-embedded-coder-sil-code-generation-for-ti-omap-l138-fails-for-portable-word-sizes ]

I set up a test harness model and included a simple reference model using the "Model" block twice: as normal model and in PIL configuration. Code generation is based on the "idelink_ert.tlc" (IDE Link ERT) system target file. Build format is set to "Makefile" approach, as I am using CCSv5.5. The toolchain is set using commands checkEnvSetup('ccsv5', 'omapl138', 'setup') and xmakefilesetup from the Matlab command line.

When I start the test harness model I get the following error:

### Connectivity configuration for referenced model "mysumdiff": Texas Instruments Code Composer Studio (IDE) ###

An error occurred while creating an instance of connectivity configuration class "ticcsext.pil.ConnectivityConfig". Check that this is a valid connectivity configuration class.

Caused by:

When the build format is "Makefile", PIL cannot use the IDE debugger to communicate with your target. If your target supports Serial Communication Interface (SCI) or TCP/IP, configure PIL to use those instead. See the documentation for more information.

What should I do? I think the build process needs the "Makefile" build format. Which documentation is meant to be referenced (no link is included in the error message)?

As SCI is mentioned, I stumbled across "Code Verification and Validation with PIL" here: http://uk.mathworks.com/help/supportpkg/texasinstrumentsc2000/examples/code-verification-and-validation-with-pil.html -- this is referring to the C2000 DSP family.

As the PIL preference group did not exist in my Matlab I tried to set those values manually (to see if I can get it working without the unknown documentation):

>> setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','COMPort','COM3')

>> setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','BaudRate',115200)

>> setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','enableserial',true)

This yields me a slightly different error message when starting the model:


An error occurred while creating an instance of connectivity configuration class "ticcsext.pil.ConnectivityConfigSerial". Check that this is a valid connectivity configuration class.

Caused by:
PIL simulation using serial communication interface is not supported for the following processor family: c64x+

This makes me wonder, because afaik C674x is not a subset of the C64x family.

Is there a working approach to get PIL working for OMAP-L138 or C6748?

The standard connectivity configuration (rtiostream) uses TCP/IP. I think this will not be applicable when only using the DSP (I don't want code overhead on the ARM). An alternative would be to use the Serial Communication Interface (SCI). Is this supported for the OMAP or the C6000 family or would I need to completely implement something on my own?

If using the SCI I would need a serial interface. The OMAP-L138 EVM board has an external serial adaptor. I also found that the embedded XDS100 includes a dual UART chip where in the reference design port A is used for JTAG and port B could be used for serial communication as well. Is port B on the evaluation board "wired" to some UART interface of the SoC or do I need to use the separate Sub-D9 connector with a separate USB/serial converter?

Thank you for your help.

Best regards,
Matthias

  • Dear Matthias,
    I don't have exposure on Matlab.
    [/quote]
    >> setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','COMPort','COM3')

    >> setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','BaudRate',115200)

    >> setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','enableserial',true)
    [/quote]

    OMAPL138 have upto 3 serial ports, UART0, UART1 and UART2, so , you could try UART2 which is console port for OMAPL138/C6748

    in.mathworks.com/.../parametric-audio-equalizer.html

    in.mathworks.com/.../code-verification-and-validation-with-pil.html

    You can check mathworks team.
  • Hi Mattias,

    CCS forum is the appropriate place for this query.
    If you are ok, we can move this query there.
  • Hi Shankari,
    of course, if the question is more appropriate there, I am fine with moving the query there.
    Thank you,
    Matthias
  • Hi Titus,

    thank you for your reply. I'd also like to use UART2 as this should be wired to a SUB-D9 connector on the OMAP-L138 EVM board. It is also used in UART Boot Mode and I already could test it today with the StarterWare UART echo application. Now the software integration will be the interesting part - I had hoped that this was already included.

    The hint in "Code Verification and Validation with PIL" to check "Hardware Implementation" pane was good.

    "No targets have been installed. To install a target, type 'supportPackageInstaller' in MATLAB."

    But: "Texas Instruments C6000" support package is already installed in version 15.2.0 (latest) and I don't know if there is a specific one for OMAP-L138 required as well. Or if I can expect a similar configuration pane to appear which lets me select a UART/SCI.


    For the "Parametric Audio Equalizer" link: the "Build action" parameter to "Create_Processor_In_the_Loop_project" is only available for for "Texas Instruments Code Composer Studio", not "Texas Instruments Code Composer Studio (makefile generation only)". The later one is my current approach. But independent of the setting I anyway get the following error:

    "Could not connect to the board specified in the Target Hardware Resources tab on the Coder Target pane in the Configuration Parameters dialog."

    Kind regards,
    Matthias