Develop and Debug Qt Applications on SMARC Modules with SimpleSwitch™

In this blog post, we’ll guide you through developing and debugging Qt applications directly on SMARC modules using SimpleSwitch™.

Embedded Software Sessions

Embedded Software Sessions

Prerequisites:

  • SimpleSwitch™ and compatible SMARC module
  • Qt Creator installed

1. Setting Up the Development Environment:

  • Log in to the SimpleSwitch™ platform and check the installed containers
  • Open a terminal and initiate a remote desktop connection (RDP) to your SMARC module.
  • Launch Qt Creator and navigate to Tools > Options.
  • Under Devices, you’ll find the currently connected devices (your local PC).
  • Under Kits, you’ll see a default kit for your computer.

2. Configuring the SMARC Module Kit:

  • Use the command QT Creator Kit Configurator to set up a new kit for your SMARC module.
  • Provide the following details:
    • IP Address:The IP address of your SMARC module (obtained from SimpleSwitch™).
    • Config Path:Path to the Qt Creator configuration files (usually ~/.config/QtProject/QtCreator.conf).
    • Name:A descriptive name for the kit (e.g., “i.MX8 M Plus Kit”).

3. Restarting Qt Creator and Verifying the Kit:

  • Restart Qt Creator to apply the changes.
  • Navigate to Tools > Options Under Devices, you should now see your newly configured SimpleSwitch™ module kit.
  • Check the Kitssection for details about the compiler, debugger, and make utilities used for cross-compiling for your SMARC module.

4. Creating and Configuring a Qt Project:

  • Create a new Qt project and select the SimpleSwitch™ kit during project creation.
  • By default, the deployment configuration might not be compatible with SimpleSwitch™.

5. Configuring the Project for SimpleSwitch™ Deployment:

  • Close Qt Creator and run the command QT Creator Project Configurator.
  • Provide the following details:
    • Kit Name:The name of the SimpleSwitch™ kit you created earlier.
    • Project Path:The path to your newly created Qt project.

6. Restarting Qt Creator and Verifying Deployment:

  • Restart Qt Creator.
  • Navigate to the Runsection of your project. You should see new deployment configurations

7. Building, Deploying, and Debugging:

  • Select the Debug configuration and click the green triangle icon.
  • Qt Creator will automatically build, deploy, and debug your application.
  • The debugger will stop at any breakpoints you set, allowing you to step through your code and inspect variables.
  • You should also see your application running on the remote desktop connected earlier.

8. Conclusion:

With SimpleSwitch™, you can efficiently develop and debug Qt applications directly on SMARC modules, saving time and effort. This method streamlines the development process, allowing you to build and test your applications directly on the target hardware.

We hope this blog post helps you get started with developing Qt applications on SMARC modules using SimpleSwitch™!