From bc06a08844af7aa0a487f6fa012c35449cb0920a Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 24 Oct 2020 19:04:14 +0200 Subject: [PATCH] boards/nucleo-l552ze-q: add notes in doc about patched openocd --- boards/nucleo-l552ze-q/doc.txt | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/boards/nucleo-l552ze-q/doc.txt b/boards/nucleo-l552ze-q/doc.txt index 74394eea4e..e958b13443 100644 --- a/boards/nucleo-l552ze-q/doc.txt +++ b/boards/nucleo-l552ze-q/doc.txt @@ -5,14 +5,30 @@ ## Flashing the device -The ST Nucleo-L552ZE-Q board includes an on-board ST-LINK V2.1 programmer. The -easiest way to program the board is to use OpenOCD. Once you have installed -OpenOCD (look [here](https://github.com/RIOT-OS/RIOT/wiki/OpenOCD) for -installation instructions), you can flash the board simply by typing +The ST Nucleo-L552ZE-Q board includes an on-board ST-LINK programmer and can be +flashed using OpenOCD. +@note The upstream version of OpenOCD doesn't contain yet support for this board, +so the source code version from http://openocd.zylin.com/#/c/5510 +must be built to be able to flash this board (adapt the configure command with +your preferred installation directory): + +``` +$ git clone https://git.code.sf.net/p/openocd/code openocd +$ cd openocd +$ git fetch http://openocd.zylin.com/openocd refs/changes/10/5510/5 && git checkout FETCH_HEAD +$ ./bootstrap +$ ./configure --prefix= +$ make -j +$ sudo make install +``` + +Once the patched OpenOCD is built and installed, you can flash the board simply +by typing ``` make BOARD=nucleo-l552ze-q flash ``` + and debug via GDB by simply typing ``` make BOARD=nucleo-l552ze-q debug