Modify the system to run a custom application

The default application that the reference image starts is the ADAS example application. You can change the configuration to start a different example application or a custom one that you built.

To do so, you can use the existing SLM and sensor configuration files, after you have uploaded your application to the NXP iMX8QM-MEK:

  1. Copy the SLM configuration file that uses sensor configuration close to what you want. You might need to modify the configuration to match your purposes; see the Configure cameras and sensors on the reference image topic for more information. For example, if you created an application to use a single camera, copy slm-config-platform-single_cam.xml to replace slm-config-platform.xml:
    # cp slm-config-platform-single_cam.xml slm-config-platform.xml
  2. Modify the adas_example component in the slm-config-platform.xml file to start your application instead of the ADAS example application, using vi on the target. Alternatively, you can modify the configuration file if you're connected using the QNX Momentics IDE.
    Change this:
    ...
    ...
    <SLM:component name="adas_example">
        <SLM:command>/base/usr/bin/adas_example</SLM:command>
        <SLM:args>-c /base/etc/system/config/adas_finger_count.conf -b</SLM:args>
        <SLM:depend>sensor</SLM:depend>
        <SLM:stop stop="signal">SIGTERM</SLM:stop>
    </SLM:component>
    ...
    ...
    to:
    ...
    ...
    <SLM:component name="adas_example">
        <SLM:command>/base/usr/bin/mycustomcamera</SLM:command>
        <SLM:depend>sensor</SLM:depend>
        <SLM:stop stop="signal">SIGTERM</SLM:stop>
    </SLM:component>
    ...
    ...
    Note: In this case, there are no parameters for the application and the binary is called mycustomcamera.