Unzip the downloaded archive to a temporary folder. When pressed, it sends the chip reset command specified in the Reset command field of the configuration settings.ĭownload PEmicro GDB Server for ARM devices - Eclipse Plugin (registration required). Notice the button on the left-hand bar of the Debugger tool window. Now your firmware running on-chip can be debugged using the entire set of CLion debug features, including Memory view, multi-threaded RTOS debug, and the Peripherals tab showing peripheral registers and bits. Upload the binary as specified by the Download option in the configuration settings. Start GDB client and connect to the GDB server. Wait until the configured startup delay time passes. Start GDB server with the specified environment. When you Debug this configuration, CLion performs a sequence of steps: Reset can be performed at different stages: Before or After flashing MCU ROM or writing to RAM, Always (both before and after), or Never.Īdvanced GDB Server Options | Startup delay: the amount of time CLion will wait after starting the GDB server before attempting to connect.ĭebug an Embedded GDB Server configuration Note that most GDB servers support several reset commands (refer to your vendor-specific documentation). It usually starts with monitor, and the rest of the line is passed to the GDB server directly. GDB Server args: provide the GDB server-specific arguments (for example, port number or board config file).Īdvanced GDB Server Options | Reset command: by default, this command is sent after flashing the MCU and also when you press during a debug session. GDB Server: specify the binary to be used as a GDB server. For more information about connecting to a remote target, refer to gdb documentation. 'target remote' args: provide the medium to carry debugging packets (serial line or an IP network using TCP or UDP). If there is no GDB configurations available, you can create a new one by clicking and selecting Embedded GDB Server in the Run/Debug Configurations dialog or by using the New Embedded Configuration wizardįrom here, you can configure the following settings: Go to Run | Edit Configurations and select the configuration that you want to edit. See the next procedure on how to adjust it.Īdjust the Embedded GDB Server configuration A new run/debug configuration for an embedded GDB server will be created with the necessary arguments for the specified server. For example, for the Segger JLink server, you can select a transport interface type, initial speed, and a device:Ĭlick Create. On the next wizard page, you can adjust the settings specific to the selected GDB server type. TCP/IP port: explicitly specify a port for the GDB server or leave this field empty to use a random one.Ĭlick Next. If updated: only upon the changes in the binary. Target and Executable binary: select the target to be built and the executable binary that will be downloaded to the device.ĭownload executable: specify when to download the executable binary to the target device:Īlways: every time you start a debug session. Use either the bundled GDB or your custom GDB binary. See more details in Set up the PEmicro GDB server.ĭebugger: select the GDB debugger, which will run on the CLion's side and connect to the remote GDB server. Location: specify the full path to the binary that will be used as a GDB server.įor STM32CubeIDE ST-LINK GDB Server, specify the path to the STM32CubeIDE binary.įor PE-Micro, specify the path to a platform-specific binary. CLion will automatically predefine necessary arguments for this server. GDB Server type: select the type of the GDB server. In the wizard that opens, set up the following: Select the Run | New Embedded Configuration action in the main menu. There is no need to launch it manually: the configuration will run the GDB server automatically when you start a debug session.Ĭreate an Embedded GDB Server configuration Make sure the selected GDB server is installed on your machine. Alternatively, you can use the MinGW / MinGW-w64 environment. On Windows, switch to the System toolchain (recommended). For more information, refer to Adjust the Embedded GDB Server configuration. To do this, add a new Embedded GDB Server configuration from the Run/Debug Configurations dialog. You can also create a run/debug configuration for any other debug probe software that complies with the GDB server protocol. ST-LINK_gdbserver (a part of STM32CubeIDE) St-util (open-source GDB server for ST-LINK debug probes) In CLion, you can quickly create configurations using the New Embedded Configuration wizard for the following GDB servers: To debug on-chip with a GDB server, you need to create a special run/debug configuration.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |