2.5 Test On STM32F767ZI - Blinky
Finally, we come to test out some examples on board Nucleo-144 STM32F767ZI.
2.5.1 Plug in Nucleo-144 STM32F767ZI
We first plug in the board Nucleo-144 STM32F767ZI as follows:

On one side, plugging in the STLink USB port with the host computer is demonstrated by command lsusb.
If we had ST-Link successfully installed, we can also demonstrate its existance by command st-info --probe.
On the other side, plugging in the other USB port for Nucleo-144 STM32F767ZI will be demonstrated by our test code.
2.5.2 Create and Build Project
Similar to previous section, this time, we create a Blinky C/C++ project with board configuration STM32F7xx with Chip family STM32F767xx. And we can also have the project successfully built with Release configuration with the following output:
2.5.3 Flash Built .elf onto Nucleo-144 STM32F767ZI
As we mentioned in previous section, the NEWEST GNU MCU Eclipse QEMU does NOT support Nucleo-144 STM32F767ZI yet. Therefore, we are going to flash F767ZI_Blinky.elf directly onto Nucleo-144 STM32F767ZI for our test.
We first have a look at how many ST tools have been installed:
And, let's try out each ST tool one by one.
st-info
Tested in the above already, and its ONLY usage is:
st-util
Let's have a look at how can we use st-util by help.
Then, we print out the version as:
stlink-gui
Command stlink-gui will pop up a dialog automatically:

Then we click on the Connect button:

After a while, we can see the data in tab Device Memory after the device is connected:

Then we click on No file and load the built .elf file F767ZI_Blinky.elf:

After loading F767ZI_Blinky.elf, we can see the data in tab F767ZI_Blinky.elf:

And now it's the time to flash the loaded file F767ZI_Blinky.elf down to board Nucleo-144 STM32F767ZI:

Flashing

We also notice the situation change from within bash as follows:
After finishing flashing the data onto the device, we can even Export device memory into a particular file. Here, we can see, the data is successfully exported.

Finally, we can disconnect the device after flashing.

Clearly, stlink-gui is a GUI application to flash built .elf down to the device (a development board with some particular MCU).
st-flash
Unlike stlink-gui, st-flash is a command line application to flash built .bin down to the embedded device. But, we need firstly build .bin file out from .elf file. Here, we need to use the command arm-none-eabi-objcopy.
Afterwards, we investigate how to use st-flash :
We can also refer to st-flash documentation for more details.
Usage 1: Flash .bin file to device
Usage 2: Read .bin from device (4096 bytes)
Erase firmware from device
Step 1: Erase Memory on Device
Step 2: Flash F767ZI_Blinky.bin to Nucleo-144 STM32F767ZI
2.5.4 On-board Debugging
According to ST-Link Tutorial, we need to run commands both st-util and arm-none-eabi-gdb at the same time.
st-util
Tab 1:
arm-none-eabi-gdb
Tab 2:
We then listen to the port 4242 specified in st-util.
Tab 2:
Meanwhile, Tab 1 change a bit accordingly.
Tab 1:
Then, we load the data from gdb.
Tab 2:
Tab 1 change accordingly at the same time.
Tab 1:
Afterward, we continue in gdb.
Tab 2:
Tab 1 change accordingly.
And, finally, let's have a look at the video of the Blinky example on our STM32F767ZI board. 
Last updated