Debugging code for board Mini64SER6 using Eclipse IDE and GDB server

Hello , today we continue to describe the process of writing and debugging code in Eclipse.

gdb

 

You can download ST-Link gdbserver from distribution Atollic TrueStudio or download  here.

After you need to unzip the folder to the server in a convenient place for you and remember the way.

If you have not installed the driver for ST-Link it must be installed before installing the server.

Proceed to GDB debug server click Help-> Install New Software

GDB1

 

GDB2

 

GDB3

 

Then go to Run-> External Tools-> External Tools Configurations and create a new configuration GDB server.

 

GDB4

In the Location field, the path to the GDB server in the Arguments field are keys with which it will run.
-e: Enable persistent mode.
-d: Enable SWD debug mode.

Save the adjustment and begin to build the project.

Go to the menu Run-> Debug Configurations and create a new configuration debug the project.

GDB5

 

In the GDB Command field navigate to the GDB clients, field target port Port number to which to will connect GDB client, ST-Link gdbserver running on port 61234.

GDB6

Then go to Startup tab and configure the options start, much like in the screenshot.

GDB7

This setting debugger can be considered complete and you can begin to setup our project.

 

To run our testing need to make some changes to the project that we generated in the previous article.

#define BLINK_PORT GPIOB // Yellow LED port
#define BLINK_PIN 1// Yellow LED pin
#define BLINK_RCC_BIT RCC_APB2Periph_GPIOB//Yellow LED port clock control

 

This is settings for port and pin of the yellow LED Mini64SER6.

ST-link connects to the board via  SWD interface toMini64SER6.

Starting the server.

GDB8

 

Start debugging the project.

GDB10

 

 

Now you can start the program.

Thank you for attention wait for new articles.

Useful link : http://we.easyelectronics.ru/STM32/otladka-stm32-v-srede-eclipsegcc.html

Leave a Reply