Connecting Bare Metal Devices

You can connect bare metal devices to a development host to run and debug applications on them from Qt Creator using GDB or a hardware debugger. This enables you to debug on small devices that are not supported by the generic remote Linux device plugin. However, if the device does not have Qt libraries, you need a fake Qt installation.

The bare metal device type accepts custom GDB commands that you specify in the device options. You can specify the commands to execute by default or the commands to execute when connecting to OpenOCD or ST-LINK Utility.

To connect bare metal devices:

  1. Select Help > About Plugins > Device Support > Bare Metal to enable the Bare Metal Device plugin.
  2. Restart Qt Creator to be able to use the plugin.
  3. Select Tools > Options > Devices > Bare Metal > Add > Default, OpenOCD, or ST-LINK Utility to specify connections to GDB servers or hardware debuggers:

    "Bare Metal options"

    1. In the Startup mode field, select the mode to start the GDB server or debugger in. The available modes depend on the server or debugger.
    2. In the Host field, select the host name and port number to connect to the GDB server or hardware debugger.
    3. In the Init commands field, enter the commands to execute when initializing the connection.
    4. In the Reset commands field, enter the commands to execute when resetting the connection.
    5. Select Apply to add the GDB server or debugger.
  4. Select Tools > Options > Devices > Add > Bare Metal Device > Start Wizard:
    1. In the GDB server provider field, select a GDB server or hardware debugger.
    2. Select Apply to add the device.
  5. Select Tools > Options > Kits > Add to add a kit for building applications and running them on bare metal devices:

    "Bare Metal Device kits"

    1. In the Name field, specify a name for the kit.
    2. In the Device type field, select Bare Metal Device.
    3. In the Device field, select the bare metal device for the kit.
    4. Select Apply to add the kit.
  6. Open a project for an application you want to develop for the device.
  7. Select Projects > Build & Run, and then select the kit for building the application and running it on the bare metal device specified in the kit.

    "Adding a bare metal kit for a project"

  8. Select Run to specify run settings.

    Usually, you can use the default settings.

© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.