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:
STM32F767ZI STLink - 2 USB Ports
    On one side, plugging in the STLink USB port with the host computer is demonstrated by command lsusb.
1
$ lsusb
2
...
3
Bus 001 Device 005: ID 0483:374b STMicroelectronics ST-LINK/V2.1 (Nucleo-F103RB)
4
...
Copied!
If we had ST-Link successfully installed, we can also demonstrate its existance by command st-info --probe.
1
$ st-info --probe
2
Found 1 stlink programmers
3
serial: 303636454646333333303336343334
4
openocd: "\x30\x36\x36\x45\x46\x46\x33\x33\x33\x30\x33\x36\x34\x33\x34"
5
flash: 2097152 (pagesize: 2048)
6
sram: 524288
7
chipid: 0x0451
8
descr: F76xxx device
Copied!
    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:
1
17:57:31 **** Build of configuration Release for project F767ZI_Blinky ****
2
make all
3
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal.c
4
Invoking: GNU ARM Cross C Compiler
5
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal.o" "../system/src/stm32f7-hal/stm32f7xx_hal.c"
6
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal.c
7
8
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_cortex.c
9
Invoking: GNU ARM Cross C Compiler
10
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_cortex.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_cortex.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_cortex.o" "../system/src/stm32f7-hal/stm32f7xx_hal_cortex.c"
11
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_cortex.c
12
13
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_crc_ex.c
14
Invoking: GNU ARM Cross C Compiler
15
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_crc_ex.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_crc_ex.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_crc_ex.o" "../system/src/stm32f7-hal/stm32f7xx_hal_crc_ex.c"
16
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_crc_ex.c
17
18
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_dfsdm.c
19
Invoking: GNU ARM Cross C Compiler
20
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_dfsdm.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_dfsdm.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_dfsdm.o" "../system/src/stm32f7-hal/stm32f7xx_hal_dfsdm.c"
21
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_dfsdm.c
22
23
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_flash.c
24
Invoking: GNU ARM Cross C Compiler
25
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_flash.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_flash.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_flash.o" "../system/src/stm32f7-hal/stm32f7xx_hal_flash.c"
26
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_flash.c
27
28
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_gpio.c
29
Invoking: GNU ARM Cross C Compiler
30
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_gpio.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_gpio.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_gpio.o" "../system/src/stm32f7-hal/stm32f7xx_hal_gpio.c"
31
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_gpio.c
32
33
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_iwdg.c
34
Invoking: GNU ARM Cross C Compiler
35
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_iwdg.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_iwdg.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_iwdg.o" "../system/src/stm32f7-hal/stm32f7xx_hal_iwdg.c"
36
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_iwdg.c
37
38
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_jpeg.c
39
Invoking: GNU ARM Cross C Compiler
40
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_jpeg.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_jpeg.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_jpeg.o" "../system/src/stm32f7-hal/stm32f7xx_hal_jpeg.c"
41
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_jpeg.c
42
43
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_mdios.c
44
Invoking: GNU ARM Cross C Compiler
45
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_mdios.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_mdios.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_mdios.o" "../system/src/stm32f7-hal/stm32f7xx_hal_mdios.c"
46
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_mdios.c
47
48
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_pwr.c
49
Invoking: GNU ARM Cross C Compiler
50
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_pwr.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_pwr.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_pwr.o" "../system/src/stm32f7-hal/stm32f7xx_hal_pwr.c"
51
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_pwr.c
52
53
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_pwr_ex.c
54
Invoking: GNU ARM Cross C Compiler
55
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_pwr_ex.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_pwr_ex.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_pwr_ex.o" "../system/src/stm32f7-hal/stm32f7xx_hal_pwr_ex.c"
56
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_pwr_ex.c
57
58
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_rcc.c
59
Invoking: GNU ARM Cross C Compiler
60
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_rcc.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_rcc.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_rcc.o" "../system/src/stm32f7-hal/stm32f7xx_hal_rcc.c"
61
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_rcc.c
62
63
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_rcc_ex.c
64
Invoking: GNU ARM Cross C Compiler
65
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_rcc_ex.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_rcc_ex.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_rcc_ex.o" "../system/src/stm32f7-hal/stm32f7xx_hal_rcc_ex.c"
66
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_rcc_ex.c
67
68
Building file: ../system/src/stm32f7-hal/stm32f7xx_hal_smartcard_ex.c
69
Invoking: GNU ARM Cross C Compiler
70
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-bad-function-cast -Wno-conversion -Wno-sign-conversion -Wno-unused-parameter -Wno-sign-compare -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"system/src/stm32f7-hal/stm32f7xx_hal_smartcard_ex.d" -MT"system/src/stm32f7-hal/stm32f7xx_hal_smartcard_ex.o" -c -o "system/src/stm32f7-hal/stm32f7xx_hal_smartcard_ex.o" "../system/src/stm32f7-hal/stm32f7xx_hal_smartcard_ex.c"
71
Finished building: ../system/src/stm32f7-hal/stm32f7xx_hal_smartcard_ex.c
72
73
Building file: ../system/src/newlib/_cxx.cpp
74
Invoking: GNU ARM Cross C++ Compiler
75
arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu++11 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -MMD -MP -MF"system/src/newlib/_cxx.d" -MT"system/src/newlib/_cxx.o" -c -o "system/src/newlib/_cxx.o" "../system/src/newlib/_cxx.cpp"
76
Finished building: ../system/src/newlib/_cxx.cpp
77
78
Building file: ../system/src/newlib/_exit.c
79
Invoking: GNU ARM Cross C Compiler
80
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/newlib/_exit.d" -MT"system/src/newlib/_exit.o" -c -o "system/src/newlib/_exit.o" "../system/src/newlib/_exit.c"
81
Finished building: ../system/src/newlib/_exit.c
82
83
Building file: ../system/src/newlib/_sbrk.c
84
Invoking: GNU ARM Cross C Compiler
85
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/newlib/_sbrk.d" -MT"system/src/newlib/_sbrk.o" -c -o "system/src/newlib/_sbrk.o" "../system/src/newlib/_sbrk.c"
86
Finished building: ../system/src/newlib/_sbrk.c
87
88
Building file: ../system/src/newlib/_startup.c
89
Invoking: GNU ARM Cross C Compiler
90
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -DOS_INCLUDE_STARTUP_INIT_MULTIPLE_RAM_SECTIONS -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/newlib/_startup.d" -MT"system/src/newlib/_startup.d" -c -o "system/src/newlib/_startup.o" "../system/src/newlib/_startup.c"
91
Finished building: ../system/src/newlib/_startup.c
92
93
Building file: ../system/src/newlib/_syscalls.c
94
Invoking: GNU ARM Cross C Compiler
95
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/newlib/_syscalls.d" -MT"system/src/newlib/_syscalls.o" -c -o "system/src/newlib/_syscalls.o" "../system/src/newlib/_syscalls.c"
96
Finished building: ../system/src/newlib/_syscalls.c
97
98
Building file: ../system/src/newlib/assert.c
99
Invoking: GNU ARM Cross C Compiler
100
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/newlib/assert.d" -MT"system/src/newlib/assert.o" -c -o "system/src/newlib/assert.o" "../system/src/newlib/assert.c"
101
Finished building: ../system/src/newlib/assert.c
102
103
Building file: ../system/src/diag/Trace.c
104
Invoking: GNU ARM Cross C Compiler
105
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/diag/Trace.d" -MT"system/src/diag/Trace.o" -c -o "system/src/diag/Trace.o" "../system/src/diag/Trace.c"
106
Finished building: ../system/src/diag/Trace.c
107
108
Building file: ../system/src/diag/trace_impl.c
109
Invoking: GNU ARM Cross C Compiler
110
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/diag/trace_impl.d" -MT"system/src/diag/trace_impl.o" -c -o "system/src/diag/trace_impl.o" "../system/src/diag/trace_impl.c"
111
Finished building: ../system/src/diag/trace_impl.c
112
113
Building file: ../system/src/cortexm/_initialize_hardware.c
114
Invoking: GNU ARM Cross C Compiler
115
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/cortexm/_initialize_hardware.d" -MT"system/src/cortexm/_initialize_hardware.o" -c -o "system/src/cortexm/_initialize_hardware.o" "../system/src/cortexm/_initialize_hardware.c"
116
Finished building: ../system/src/cortexm/_initialize_hardware.c
117
118
Building file: ../system/src/cortexm/_reset_hardware.c
119
Invoking: GNU ARM Cross C Compiler
120
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/cortexm/_reset_hardware.d" -MT"system/src/cortexm/_reset_hardware.o" -c -o "system/src/cortexm/_reset_hardware.o" "../system/src/cortexm/_reset_hardware.c"
121
Finished building: ../system/src/cortexm/_reset_hardware.c
122
123
Building file: ../system/src/cortexm/exception_handlers.c
124
Invoking: GNU ARM Cross C Compiler
125
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/cortexm/exception_handlers.d" -MT"system/src/cortexm/exception_handlers.o" -c -o "system/src/cortexm/exception_handlers.o" "../system/src/cortexm/exception_handlers.c"
126
Finished building: ../system/src/cortexm/exception_handlers.c
127
128
Building file: ../system/src/cmsis/system_stm32f7xx.c
129
Invoking: GNU ARM Cross C Compiler
130
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/cmsis/system_stm32f7xx.d" -MT"system/src/cmsis/system_stm32f7xx.o" -c -o "system/src/cmsis/system_stm32f7xx.o" "../system/src/cmsis/system_stm32f7xx.c"
131
Finished building: ../system/src/cmsis/system_stm32f7xx.c
132
133
Building file: ../system/src/cmsis/vectors_stm32f767xx.c
134
Invoking: GNU ARM Cross C Compiler
135
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"system/src/cmsis/vectors_stm32f767xx.d" -MT"system/src/cmsis/vectors_stm32f767xx.o" -c -o "system/src/cmsis/vectors_stm32f767xx.o" "../system/src/cmsis/vectors_stm32f767xx.c"
136
Finished building: ../system/src/cmsis/vectors_stm32f767xx.c
137
138
Building file: ../src/BlinkLed.cpp
139
Invoking: GNU ARM Cross C++ Compiler
140
arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu++11 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -MMD -MP -MF"src/BlinkLed.d" -MT"src/BlinkLed.o" -c -o "src/BlinkLed.o" "../src/BlinkLed.cpp"
141
Finished building: ../src/BlinkLed.cpp
142
143
Building file: ../src/Timer.cpp
144
Invoking: GNU ARM Cross C++ Compiler
145
arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu++11 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -MMD -MP -MF"src/Timer.d" -MT"src/Timer.o" -c -o "src/Timer.o" "../src/Timer.cpp"
146
Finished building: ../src/Timer.cpp
147
148
Building file: ../src/_initialize_hardware.c
149
Invoking: GNU ARM Cross C Compiler
150
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"src/_initialize_hardware.d" -MT"src/_initialize_hardware.o" -c -o "src/_initialize_hardware.o" "../src/_initialize_hardware.c"
151
../src/_initialize_hardware.c: In function 'SystemClock_Config':
152
../src/_initialize_hardware.c:150:2: warning: #warning "Please check if the SystemClock_Config() settings match your board!" [-Wcpp]
153
#warning "Please check if the SystemClock_Config() settings match your board!"
154
^~~~~~~
155
Finished building: ../src/_initialize_hardware.c
156
157
Building file: ../src/_write.c
158
Invoking: GNU ARM Cross C Compiler
159
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -MMD -MP -MF"src/_write.d" -MT"src/_write.o" -c -o "src/_write.o" "../src/_write.c"
160
Finished building: ../src/_write.c
161
162
Building file: ../src/main.cpp
163
Invoking: GNU ARM Cross C++ Compiler
164
arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu++11 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -MMD -MP -MF"src/main.d" -MT"src/main.o" -c -o "src/main.o" "../src/main.cpp"
165
../src/main.cpp:113:2: warning: #warning "Unknown board, assume PA5, active high." [-Wcpp]
166
#warning "Unknown board, assume PA5, active high."
167
^~~~~~~
168
Finished building: ../src/main.cpp
169
170
Building file: ../src/stm32f7xx_hal_msp.c
171
Invoking: GNU ARM Cross C Compiler
172
arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -DOS_USE_SEMIHOSTING -DNDEBUG -DSTM32F767xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f7-hal" -std=gnu11 -Wno-missing-prototypes -Wno-missing-declarations -MMD -MP -MF"src/stm32f7xx_hal_msp.d" -MT"src/stm32f7xx_hal_msp.d" -c -o "src/stm32f7xx_hal_msp.o" "../src/stm32f7xx_hal_msp.c"
173
Finished building: ../src/stm32f7xx_hal_msp.c
174
175
Building target: F767ZI_Blinky.elf
176
Invoking: GNU ARM Cross C++ Linker
177
arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -g -T mem.ld -T libs.ld -T sections.ld -nostartfiles -Xlinker --gc-sections -L"../ldscripts" -Wl,-Map,"F767ZI_Blinky.map" --specs=nano.specs -o "F767ZI_Blinky.elf" ./system/src/stm32f7-hal/stm32f7xx_hal.o ./system/src/stm32f7-hal/stm32f7xx_hal_cortex.o ./system/src/stm32f7-hal/stm32f7xx_hal_crc_ex.o ./system/src/stm32f7-hal/stm32f7xx_hal_dfsdm.o ./system/src/stm32f7-hal/stm32f7xx_hal_flash.o ./system/src/stm32f7-hal/stm32f7xx_hal_gpio.o ./system/src/stm32f7-hal/stm32f7xx_hal_iwdg.o ./system/src/stm32f7-hal/stm32f7xx_hal_jpeg.o ./system/src/stm32f7-hal/stm32f7xx_hal_mdios.o ./system/src/stm32f7-hal/stm32f7xx_hal_pwr.o ./system/src/stm32f7-hal/stm32f7xx_hal_pwr_ex.o ./system/src/stm32f7-hal/stm32f7xx_hal_rcc.o ./system/src/stm32f7-hal/stm32f7xx_hal_rcc_ex.o ./system/src/stm32f7-hal/stm32f7xx_hal_smartcard_ex.o ./system/src/newlib/_cxx.o ./system/src/newlib/_exit.o ./system/src/newlib/_sbrk.o ./system/src/newlib/_startup.o ./system/src/newlib/_syscalls.o ./system/src/newlib/assert.o ./system/src/diag/Trace.o ./system/src/diag/trace_impl.o ./system/src/cortexm/_initialize_hardware.o ./system/src/cortexm/_reset_hardware.o ./system/src/cortexm/exception_handlers.o ./system/src/cmsis/system_stm32f7xx.o ./system/src/cmsis/vectors_stm32f767xx.o ./src/BlinkLed.o ./src/Timer.o ./src/_initialize_hardware.o ./src/_write.o ./src/main.o ./src/stm32f7xx_hal_msp.o
178
Finished building target: F767ZI_Blinky.elf
179
180
Invoking: GNU ARM Cross Create Flash Image
181
arm-none-eabi-objcopy -O ihex "F767ZI_Blinky.elf" "F767ZI_Blinky.hex"
182
Finished building: F767ZI_Blinky.hex
183
184
Invoking: GNU ARM Cross Print Size
185
arm-none-eabi-size --format=berkeley "F767ZI_Blinky.elf"
186
text data bss dec hex filename
187
8591 512 588 9691 25db F767ZI_Blinky.elf
188
Finished building: F767ZI_Blinky.siz
189
190
191
17:57:34 Build Finished (took 3s.375ms)
Copied!

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:
1
$ ls -ls /usr/local/bin/st*
2
16 -rwxr-xr-x 1 root root 14312 May 18 23:16 /usr/local/bin/st-flash
3
12 -rwxr-xr-x 1 root root 10216 May 18 23:16 /usr/local/bin/st-info
4
104 -rwxr-xr-x 1 root root 104960 May 18 23:16 /usr/local/bin/stlink-gui
5
52 -rwxr-xr-x 1 root root 51544 May 18 23:16 /usr/local/bin/st-util
Copied!
And, let's try out each ST tool one by one.

st-info

Tested in the above already, and its ONLY usage is:
1
$ st-info --probe
2
Found 1 stlink programmers
3
serial: 303636454646333333303336343334
4
openocd: "\x30\x36\x36\x45\x46\x46\x33\x33\x33\x30\x33\x36\x34\x33\x34"
5
flash: 2097152 (pagesize: 2048)
6
sram: 524288
7
chipid: 0x0451
8
descr: F76xxx device
Copied!

st-util

Let's have a look at how can we use st-util by help.
1
$ st-util --help
2
st-util - usage:
3
4
-h, --help Print this help
5
-V, --version Print the version
6
-vXX, --verbose=XX Specify a specific verbosity level (0..99)
7
-v, --verbose Specify generally verbose logging
8
-s X, --stlink_version=X
9
Choose what version of stlink to use, (defaults to 2)
10
-1, --stlinkv1 Force stlink version 1
11
-p 4242, --listen_port=1234
12
Set the gdb server listen port. (default port: 4242)
13
-m, --multi
14
Set gdb server to extended mode.
15
st-util will continue listening for connections after disconnect.
16
-n, --no-reset
17
Do not reset board on connection.
18
--semihosting
19
Enable semihosting support.
20
--serial <serial>
21
Use a specific serial number.
22
23
The STLINKv2 device to use can be specified in the environment
24
variable STLINK_DEVICE on the format <USB_BUS>:<USB_ADDR>.
Copied!
Then, we print out the version as:
1
$ st-util -V
2
st-util: invalid option -- 'V'
3
st-util 1.4.0-37-g065a475
4
2018-05-20T22:42:43 INFO common.c: Loading device parameters....
5
2018-05-20T22:42:43 INFO common.c: Device connected is: F76xxx device, id 0x10016451
6
2018-05-20T22:42:43 INFO common.c: SRAM size: 0x80000 bytes (512 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 2048 bytes
7
2018-05-20T22:42:43 INFO gdb-server.c: Chip ID is 00000451, Core ID is 5ba02477.
8
2018-05-20T22:42:43 INFO gdb-server.c: Chip clidr: 09000003, I-Cache: off, D-Cache: off
9
2018-05-20T22:42:43 INFO gdb-server.c: cache: LoUU: 1, LoC: 1, LoUIS: 0
10
2018-05-20T22:42:43 INFO gdb-server.c: cache: ctr: 8303c003, DminLine: 32 bytes, IminLine: 32 bytes
11
2018-05-20T22:42:43 INFO gdb-server.c: D-Cache L0: 2018-05-20T22:42:43 INFO gdb-server.c: f00fe019 LineSize: 8, ways: 4, sets: 128 (width: 12)
12
2018-05-20T22:42:43 INFO gdb-server.c: I-Cache L0: 2018-05-20T22:42:43 INFO gdb-server.c: f01fe009 LineSize: 8, ways: 2, sets: 256 (width: 13)
13
2018-05-20T22:42:43 INFO gdb-server.c: Listening at *:4242...
Copied!
Command stlink-gui will pop up a dialog automatically:
STLink Gui Initialization
Then we click on the Connect button:
STLink Gui Connecting with Board
After a while, we can see the data in tab Device Memory after the device is connected:
STLink Gui Connected
Then we click on No file and load the built .elf file F767ZI_Blinky.elf:
STLink Gui Load F767ZI_Blinky.elf
After loading F767ZI_Blinky.elf, we can see the data in tab F767ZI_Blinky.elf:
STLink Gui F767ZI_Blinky.elf Loaded
And now it's the time to flash the loaded file F767ZI_Blinky.elf down to board Nucleo-144 STM32F767ZI:
STLink Gui Flash F767ZI_Blinky.elf to Device
Flashing
STLink Gui Flashing
We also notice the situation change from within bash as follows:
1
$ Gtk-Message: 18:40:02.578: GtkDialog mapped without a transient parent. This is discouraged.
2
Flash page at addr: 0x08040000 erasedEraseFlash - Sector:0x5 Size:0x40000
3
enabling 32-bit flash writes
4
size: 32768
5
size: 32768
6
size: 32768
7
size: 32768
8
size: 32768
9
size: 32768
10
size: 32768
11
size: 32768
12
size: 27496
Copied!
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.
STLink Gui Flash F767ZI_Blinky.elf to Device
Finally, we can disconnect the device after flashing.
STLink Gui Disconnected
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.
1
$ arm-none-eabi-objcopy -S -O binary F767ZI_Blinky.elf F767ZI_Blinky.bin
Copied!
Afterwards, we investigate how to use st-flash :
1
$ st-flash --help
2
invalid command line
3
stlinkv1 command line: ./st-flash [--debug] [--reset] [--format <format>] [--flash=<fsize>] {read|write} /dev/sgX <path> <addr> <size>
4
stlinkv1 command line: ./st-flash [--debug] /dev/sgX erase
5
stlinkv2 command line: ./st-flash [--debug] [--reset] [--serial <serial>] [--format <format>] [--flash=<fsize>] {read|write} <path> <addr> <size>
6
stlinkv2 command line: ./st-flash [--debug] [--serial <serial>] erase
7
stlinkv2 command line: ./st-flash [--debug] [--serial <serial>] reset
8
Use hex format for addr, <serial> and <size>.
9
fsize: Use decimal, octal or hex by prefix 0xXXX for hex, optionally followed by k=KB, or m=MB (eg. --flash=128k)
10
Format may be 'binary' (default) or 'ihex', although <addr> must be specified for binary format only.
11
./st-flash [--version]
Copied!
We can also refer to st-flash documentation for more details.
Usage 1: Flash .bin file to device
1
$ st-flash write firmware.bin 0x8000000
Copied!
Usage 2: Read .bin from device (4096 bytes)
1
$ st-flash read firmware.bin 0x8000000 4096
Copied!
Erase firmware from device
1
$ st-flash erase
Copied!

Step 1: Erase Memory on Device

1
$ st-flash erase
2
st-flash 1.4.0-37-g065a475
3
2018-05-21T02:40:59 INFO common.c: Loading device parameters....
4
2018-05-21T02:40:59 INFO common.c: Device connected is: F76xxx device, id 0x10016451
5
2018-05-21T02:40:59 INFO common.c: SRAM size: 0x80000 bytes (512 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 2048 bytes
6
Mass erasing..............
Copied!

Step 2: Flash F767ZI_Blinky.bin to Nucleo-144 STM32F767ZI

1
$ st-flash write F767ZI_Blinky.bin 0x8000000
2
st-flash 1.4.0-37-g065a475
3
2018-05-21T02:47:51 INFO common.c: Loading device parameters....
4
2018-05-21T02:47:51 INFO common.c: Device connected is: F76xxx device, id 0x10016451
5
2018-05-21T02:47:51 INFO common.c: SRAM size: 0x80000 bytes (512 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 2048 bytes
6
2018-05-21T02:47:51 INFO common.c: Attempting to write 9108 (0x2394) bytes to stm32 address: 134217728 (0x8000000)
7
Flash page at addr: 0x08000000 erased
8
2018-05-21T02:47:51 INFO common.c: Finished erasing 1 pages of 32768 (0x8000) bytes
9
2018-05-21T02:47:51 INFO common.c: Starting Flash write for F2/F4/L4
10
2018-05-21T02:47:51 INFO flash_loader.c: Successfully loaded flash loader in sram
11
enabling 32-bit flash writes
12
size: 9108
13
2018-05-21T02:47:51 INFO common.c: Starting verification of write complete
14
2018-05-21T02:47:51 INFO common.c: Flash written and verified! jolly good!
Copied!

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:

1
$ st-util --semihosting
2
st-util 1.4.0-37-g065a475
3
2018-05-21T13:30:18 INFO common.c: Loading device parameters....
4
2018-05-21T13:30:18 INFO common.c: Device connected is: F76xxx device, id 0x10016451
5
2018-05-21T13:30:18 INFO common.c: SRAM size: 0x80000 bytes (512 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 2048 bytes
6
2018-05-21T13:30:18 INFO gdb-server.c: Chip ID is 00000451, Core ID is 5ba02477.
7
2018-05-21T13:30:18 INFO gdb-server.c: Chip clidr: 09000003, I-Cache: off, D-Cache: off
8
2018-05-21T13:30:18 INFO gdb-server.c: cache: LoUU: 1, LoC: 1, LoUIS: 0
9
2018-05-21T13:30:18 INFO gdb-server.c: cache: ctr: 8303c003, DminLine: 32 bytes, IminLine: 32 bytes
10
2018-05-21T13:30:18 INFO gdb-server.c: D-Cache L0: 2018-05-21T13:30:18 INFO gdb-server.c: f00fe019 LineSize: 8, ways: 4, sets: 128 (width: 12)
11
2018-05-21T13:30:18 INFO gdb-server.c: I-Cache L0: 2018-05-21T13:30:18 INFO gdb-server.c: f01fe009 LineSize: 8, ways: 2, sets: 256 (width: 13)
12
2018-05-21T13:30:18 INFO gdb-server.c: Listening at *:4242...
Copied!

arm-none-eabi-gdb

Tab 2:

1
$ arm-none-eabi-gdb F767ZI_Blinky.elf
2
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
3
Copyright (C) 2017 Free Software Foundation, Inc.
4
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
5
This is free software: you are free to change and redistribute it.
6
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
7
and "show warranty" for details.
8
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
9
Type "show configuration" for configuration details.
10
For bug reporting instructions, please see:
11
<http://www.gnu.org/software/gdb/bugs/>.
12
Find the GDB manual and other documentation resources online at:
13
<http://www.gnu.org/software/gdb/documentation/>.
14
For help, type "help".
15
Type "apropos word" to search for commands related to "word"...
16
Reading symbols from F767ZI_Blinky.elf...done.
Copied!
We then listen to the port 4242 specified in st-util.

Tab 2:

1
(gdb) target extended localhost:4242
2
Remote debugging using localhost:4242
3
Reset_Handler () at ../system/src/cortexm/exception_handlers.c:53
4
53 {
Copied!
Meanwhile, Tab 1 change a bit accordingly.

Tab 1:

1
2018-05-21T13:32:42 INFO gdb-server.c: Found 8 hw breakpoint registers
2
2018-05-21T13:32:42 INFO gdb-server.c: GDB connected.
Copied!
Then, we load the data from gdb.

Tab 2:

1
(gdb) load
2
Loading section .isr_vector, size 0x458 lma 0x8000000
3
Loading section .inits, size 0x2c lma 0x8000458
4
Loading section .text, size 0x30e6 lma 0x8000490
5
Loading section .data, size 0x1dc lma 0x8003578
6
Start address 0x80001f8, load size 14150
7
Transfer rate: 10 KB/sec, 3537 bytes/write.
Copied!
Tab 1 change accordingly at the same time.

Tab 1:

1
2018-05-21T13:48:22 INFO common.c: Attempting to write 32768 (0x8000) bytes to stm32 address: 134217728 (0x8000000)
2
Flash page at addr: 0x08000000 erased
3
2018-05-21T13:48:22 INFO common.c: Finished erasing 1 pages of 32768 (0x8000) bytes
4
2018-05-21T13:48:22 INFO common.c: Starting Flash write for F2/F4/L4
5
2018-05-21T13:48:22 INFO flash_loader.c: Successfully loaded flash loader in sram
6
enabling 32-bit flash writes
7
size: 32768
8
2018-05-21T13:48:22 INFO common.c: Starting verification of write complete
9
2018-05-21T13:48:23 INFO common.c: Flash written and verified! jolly good!
Copied!
Afterward, we continue in gdb.

Tab 2:

1
(gdb) continue
2
Continuing.
Copied!
Tab 1 change accordingly.
1
semihosting: unsupported call 0x15
2
main(argc=1, argv=[""]);
3
Hello ARM World!
4
semihosting: unsupported call 0xc
5
semihosting: unsupported call 0x9
6
System clock: 192000000 Hz
7
Second 1
8
Second 2
9
Second 3
10
Second 4
11
Second 5
12
Second 6
13
semihosting: unsupported call 0x18
Copied!
And, finally, let's have a look at the video of the Blinky example on our STM32F767ZI board.