Développement STM8 à partir de linux

Développement STM8 à partir de linux

Pile

2020/05/26

Introduction

Ce document présente les outils de développement STM8 disponibles sous Linux. Ces outils sont présentés dans l'ordre historique de mise en œuvre par l'auteur. Il est possible que des étapes préliminaires ne soient pas utiles.

Il est à noter que malgré le travail remarquable effectué par la communauté (sdcc, stm8flash, GNU...), nous ne sommes pas capable aujourd'hui (en mai 2020 et à notre connaissane) de debugger un programme chargé sur une cible. N'hésitez pas à nous informer info@veymont-tech.com dans le cas contraire, merci.

Liens intéressants

Outils en ligne de commande

SDCC

Installez les paquets:

  • sdcc (Compilateur C)
  • sdcc-doc (Documentation)
  • sdcc-libraries (Bibliothèques)
  • sdcc-ucsim (Simulateur de micro-contrôleur pour SDCC)

    ==STM8FLASH==

    Clonez le dépôt STM8, compilez le .

    ~/util/stm8flash/stm8flash-master$ make
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stlink.o stlink.c
    stlink.c: In function ‘stlink_read_and_cmp’:
    stlink.c:62:6: warning: unused variable ‘recv’ [-Wunused-variable]
      int recv = stlink_read(pgm, buf, count);
          ^~~~
    stlink.c: In function ‘stlink_swim_write_block’:
    stlink.c:484:7: warning: unused variable ‘r’ [-Wunused-variable]
       int r = libusb_bulk_transfer(pgm->dev_handle,
           ^
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stlinkv2.o stlinkv2.c
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o espstlink.o espstlink.c
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o main.o main.c
    main.c: In function ‘main’:
    main.c:424:3: warning: enumeration value ‘UNKNOWN’ not handled in switch [-Wswitch]
       switch(memtype) {
       ^~~~~~
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o byte_utils.o byte_utils.c
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o ihex.o ihex.c
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o srec.o srec.c
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o stm8.o stm8.c
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`    -c -o libespstlink.o libespstlink.c
    cc -g -O0 --std=gnu99 --pedantic -Wall `pkg-config --cflags libusb-1.0`  stlink.o stlinkv2.o espstlink.o main.o byte_utils.o ihex.o srec.o stm8.o libespstlink.o `pkg-config --libs libusb-1.0` -o stm8flash
    
    et installez le.
    ~/util/stm8flash/stm8flash-master$ sudo make install
    [sudo] Mot de passe de xxxx : 
    ~/util/openocd$ ./bootstrap
    + aclocal
    + libtoolize --automake --copy
    + autoconf
    + autoheader
    + automake --gnu --add-missing --copy
    configure.ac:26: installing './compile'
    configure.ac:37: installing './config.guess'
    configure.ac:37: installing './config.sub'
    configure.ac:16: installing './install-sh'
    configure.ac:16: installing './missing'
    Makefile.am:46: warning: wildcard $(srcdir: non-POSIX variable name
    Makefile.am:46: (probably a GNU make extension)
    Makefile.am: installing './INSTALL'
    Makefile.am: installing './depcomp'
    Makefile.am:23: installing './mdate-sh'
    Makefile.am:23: installing './texinfo.tex'
    Setting up submodules
    Sous-module 'jimtcl' (https://repo.or.cz/jimtcl.git) enregistré pour le chemin 'jimtcl'
    Sous-module 'src/jtag/drivers/libjaylink' (https://repo.or.cz/libjaylink.git) enregistré pour le chemin 'src/jtag/drivers/libjaylink'
    Sous-module 'tools/git2cl' (https://repo.or.cz/git2cl.git) enregistré pour le chemin 'tools/git2cl'
    Clonage dans '/home/pile/util/openocd/jimtcl'...
    Clonage dans '/home/pile/util/openocd/src/jtag/drivers/libjaylink'...
    Clonage dans '/home/pile/util/openocd/tools/git2cl'...
    Chemin de sous-module 'jimtcl' : '0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6' extrait
    Chemin de sous-module 'src/jtag/drivers/libjaylink' : 'f73ad5e667ae8b26a52b847c603fdadaabf302a6' extrait
    Chemin de sous-module 'tools/git2cl' : '8373c9f74993e218a08819cbcdbab3f3564bbeba' extrait
    Generating build system...
    libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
    libtoolize: copying file 'build-aux/config.guess'
    libtoolize: copying file 'build-aux/config.sub'
    libtoolize: copying file 'build-aux/install-sh'
    libtoolize: copying file 'build-aux/ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
    libtoolize: copying file 'm4/libtool.m4'
    libtoolize: copying file 'm4/ltoptions.m4'
    libtoolize: copying file 'm4/ltsugar.m4'
    libtoolize: copying file 'm4/ltversion.m4'
    libtoolize: copying file 'm4/lt~obsolete.m4'
    configure.ac:42: installing 'build-aux/ar-lib'
    configure.ac:37: installing 'build-aux/compile'
    configure.ac:30: installing 'build-aux/missing'
    Makefile.am: installing './INSTALL'
    libjaylink/Makefile.am: installing 'build-aux/depcomp'
    Bootstrap complete. Quick build instructions:
    ./configure ....
    
    mkdir -p /usr/local/bin/
    cp stm8flash /usr/local/bin/
    
    Attention, il existe plusieurs standards différents de ST-Link ( stlinkv1, stlinkv2_1 et stlinkv2_2), vous pouvez vérifier celui de votre adaptateur en appelant lsusb:

    ~/dev/stm8/ws_stm8s105c6/STM8S_StdPeriph_Lib/Project/My_Stm8S_blink$ lsusb
    ...
    Bus 002 Device 011: ID 0483:3744 STMicroelectronics STLINK Pseudo disk
    Bus 002 Device 012: ID 0483:3748 STMicroelectronics ST-LINK/V2
    ...
    
    La première ligne correspond à la carte sm8s-discovery qui utilise stlink v1 et le second à un stm8l-discovery qui est plus récente et utilise stlink_v2.

    Note: la définition 'STLINK Pseudo disk' empêche des logiciels comme OpenOcd d'utiliser StLink, il faut casser la définition associée dans l'usb de linux avec les commandes suivantes (cf. doc d'OpenOcd).

    $ modprobe -r usb-storage && modprobe usb-storage quirks=483:3744:i
    $ add "options usb-storage quirks=483:3744:i" to /etc/modprobe.conf 
    

    Il faut impérativement le préciser (-c stlink) ainsi que l'identifiant de la cible (-p stm8s105c6) que vous programmez dans la commande.
~/dev/stm8/ws_stm8s105c6/STM8S_StdPeriph_Lib/Project/My_Stm8S_blink$ stm8flash -c stlink -p stm8s105c6 -w blinky.ihx
Determine FLASH area
Due to its file extension (or lack thereof), "blinky.ihx" is considered as INTEL HEX format!
668 bytes at 0x8000... OK
Bytes written: 668

Première mise en œuvre de SDCC et stm8flash

On en profite pour récupérer un exemple de référence que l'on installe par exemple dans ~/dev/stm8/ws_stm8l152c6t6/blinky/

blinky.c  Makefile  README.md  stm8l.h  uart.c
~/dev/stm8/ws_stm8l152c6t6/blinky_200526$ make
sdcc -lstm8 -mstm8 --out-fmt-ihx   blinky.c
sdcc -lstm8 -mstm8 --out-fmt-ihx   uart.c
make: ***  Aucune règle pour fabriquer la cible « sp_test.ihx », nécessaire pour « 
~/util/openocd$ ./bootstrap
+ aclocal
+ libtoolize --automake --copy
+ autoconf
+ autoheader
+ automake --gnu --add-missing --copy
configure.ac:26: installing './compile'
configure.ac:37: installing './config.guess'
configure.ac:37: installing './config.sub'
configure.ac:16: installing './install-sh'
configure.ac:16: installing './missing'
Makefile.am:46: warning: wildcard $(srcdir: non-POSIX variable name
Makefile.am:46: (probably a GNU make extension)
Makefile.am: installing './INSTALL'
Makefile.am: installing './depcomp'
Makefile.am:23: installing './mdate-sh'
Makefile.am:23: installing './texinfo.tex'
Setting up submodules
Sous-module 'jimtcl' (https://repo.or.cz/jimtcl.git) enregistré pour le chemin 'jimtcl'
Sous-module 'src/jtag/drivers/libjaylink' (https://repo.or.cz/libjaylink.git) enregistré pour le chemin 'src/jtag/drivers/libjaylink'
Sous-module 'tools/git2cl' (https://repo.or.cz/git2cl.git) enregistré pour le chemin 'tools/git2cl'
Clonage dans '/home/pile/util/openocd/jimtcl'...
Clonage dans '/home/pile/util/openocd/src/jtag/drivers/libjaylink'...
Clonage dans '/home/pile/util/openocd/tools/git2cl'...
Chemin de sous-module 'jimtcl' : '0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6' extrait
Chemin de sous-module 'src/jtag/drivers/libjaylink' : 'f73ad5e667ae8b26a52b847c603fdadaabf302a6' extrait
Chemin de sous-module 'tools/git2cl' : '8373c9f74993e218a08819cbcdbab3f3564bbeba' extrait
Generating build system...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:42: installing 'build-aux/ar-lib'
configure.ac:37: installing 'build-aux/compile'
configure.ac:30: installing 'build-aux/missing'
Makefile.am: installing './INSTALL'
libjaylink/Makefile.am: installing 'build-aux/depcomp'
Bootstrap complete. Quick build instructions:
./configure ....
l ». Arrêt.

On arrive à flasher la stm8l-discovery, avec le paramètre -p stm8l152c6t6 .

~/dev/stm8/ws_stm8s105c6/blinky_200526$ stm8flash -c stlinkv2 -p stm8l152c6t6 -w blinky.ihx
Determine FLASH area
Due to its file extension (or lack thereof), "blinky.ihx" is considered as INTEL HEX format!
194 bytes at 0x8000... OK
Bytes written: 194

et la led clignote. Parfait.

Mise en œuvre d'un exemple fourni par ST

Pour rappel ST fournit des exemples compilables uniquement sur les chaînes de développement STVD (sous Windows seulement) avec Cosmic ou Raisonance ou IAR. Ces exemples reposent sur la librairie standardisée de périphériques (STM8S_StdPeriph_Lib) qui permet d'avoir du code facilement transférable d'un modèle de micro-contrôleur à un autre modèle.

On télécharge les exemples de référence ici.

~/util/STM8S_StdPeriph_Lib$ tree -L 3
.
├── _htmresc
│   └── logo.bmp
├── Libraries
│   └── STM8S_StdPeriph_Driver
│       ├── inc
│       ├── Release_Notes.html
│       ├── src
│       └── stm8s-a_stdperiph_drivers_um.chm
├── MCD-ST Liberty SW License Agreement V2.pdf
├── Project
│   ├── STM8S_StdPeriph_Examples
│   │   ├── ADC2
│   │   ├── AWU
│   │   ├── BEEP
│   │   ├── CAN
│   │   ├── CLK
│   │   ├── EXTI
│   │   ├── FLASH
│   │   ├── GPIO
│   │   ├── I2C
│   │   ├── ITC
│   │   ├── IWDG
│   │   ├── Library_Examples.html
│   │   ├── Release_Notes.html
│   │   ├── RST
│   │   ├── SPI
│   │   ├── TIM1
│   │   ├── TIM2
│   │   ├── TIM4
│   │   ├── TIM5
│   │   ├── UART1
│   │   └── WWDG
│   └── STM8S_StdPeriph_Template
│       ├── EWSTM8
│       ├── main.c
│       ├── readme.txt
│       ├── Release_Notes.html
│       ├── RIDE
│       ├── stm8s_conf.h
│       ├── stm8s_it.c
│       ├── stm8s_it.h
│       └── STVD
├── Release_Notes.html
├── stm8s-a_stdperiph_lib_um.chm
└── Utilities
    └── STM8S_EVAL
        ├── Common
        ├── Release_Notes.html
        ├── STM8-128_EVAL
        ├── stm8s_eval.c
        └── stm8s_eval.h

34 directories, 17 files

On remarque le plus important:

  • les librairies de périphériques ( inclusion et source): Libraries/STM8S_StdPeriph_Driver
  • les exemples fonctionnels pour chaque type de périphériques: Project/STM8S_StdPeriph_Examples

    ===Espace de travail=== On va prendre le plus simple /STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/GPIO/GPIO_Toggle dans un espace de développement (WorkShop) spécifique à ce modèle de micro-contrôleur, par exemple ~/dev/stm8/ws_stm8s105c6/.

    On y recopie les librairies de périphériques ~/dev/stm8/ws_stm8s105c6/Libraries/STM8S_StdPeriph_Driver. Ces librairies seront paramétrées et communes à tous les projets développés pour cette cible.

    ===Projet===

    Notre projet sera dans un répertoire spécifique de notre espace de travail par exemple ~/dev/stm8/ws_stm8s105c6/clignote/.

    On y recopie le modèle STM8S_StdPeriph_Template et les fichiers de GPIO_Toggle dans un répertoire de développement. En particulier on prend bien le main de GPIO__Toggle.

    On crée le Makefile à partir d'un exemples fourni dans la doc de sdcc (/usr/share/doc/sdcc-doc/examples ou autre).
# Makefile issu de /usr/share/doc/sdcc-doc/examples
# et adapté à un exemple de ST: STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/GPIO/GPIO_Toggle/
# utilisant la librairie standard de peripherique.
# Ce fichier est fourni tel quel, il n'y a aucun engagement de résultat
# 
OBJEXT=rel
CC = sdcc
MFLAGS = -V --debug -mstm8 -D__SDCC__ -I. -I../Libraries/STM8S_StdPeriph_Driver/inc
LFLAGS = -lstm8 --out-fmt-ihx 

OBJECTS = main.rel stm8s_it.rel stm8s_gpio.rel

all: clignote.ihx

%.$(OBJEXT): %.c
	$(CC) -c $(CFLAGS) $(MFLAGS) $<

main.rel : main.c
	$(CC) -c $(CFLAGS) $(MFLAGS) main.c

stm8s_it.rel : stm8s_it.c
	$(CC) -c $(CFLAGS) $(MFLAGS) stm8s_it.c

stm8s_gpio.rel : ../Libraries/STM8S_StdPeriph_Driver/src/stm8s_gpio.c
	$(CC) -c $(CFLAGS) $(MFLAGS) ../Libraries/STM8S_StdPeriph_Driver/src/stm8s_gpio.c

clignote.ihx: $(OBJECTS)
	$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS) -o clignote.ihx

blinky.bin: blinky.ihx
	makebin < blinky.ihx > blinky.bin

clean:
	rm -f core *~ #* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.o *.adb
		*.rst *.sym *.lnk *.lib *.bin *.lk obj/*

On y introduit les paramètres spécifiques au STM8, en particulier la définition du compilateur( SDCC) qui sert à modifier les librairies fournies. Le mieux est d'appliquer les patches fournis par la communauté, sinon a minima on modifie ceci.

C'est presque facile quand on l'a déjà fait!

Autre projet Tim1_7pwm

Avec le même processus de portage on arrive à générer nos signaux.

Tim1_7pwm

Les signaux des canaux 1 et 3 sont affectés par le dipositif TouchSensor de la carte qui utilise les PC1 et PC3.

Interruptions

Les interruptions du Stm8 apportent une trés grande efficacité aux applications temps réel.

Malheureusement le portage n'est pas immédiat car avec SDCC il faut que les traitants d'interruption soient décrits dans le fichier contenant le main() et ce avec une syntaxe trés particulière.

Par exemple, pour enregistrer un traitant d'interruption sur l'update du timer 2 il faut déclarer:

void tim2_upd_ovf_brk_irqhandler(void) __interrupt(19)
{
  TIM2_ClearITPendingBit(TIM2_IT_Update);
  GPIO_ToggleBits( LED_BL_PORT, LED_BL_PIN);
}

Le compilateur SDCC reconnait alors que l'on déclare le traitant d'interruption n°19 et place donc un appel à cette fonction dans la table des vecteurs d'interruption ( située à l'adresse 0x800 sur Stm8l15 par exemple).

Donc les fichiers stm8_it.c de chaque exemple ne doivent pas être inclus dans le projet, mais chacun des traitants actifs déclarés dans ce fichier doivent être recopiés à l'intérieur du main.c.

Outils avec une interface graphique

Deux environnements de développement graphiques sont disponibles aujourd'hui, Eclipse et Code:blocks; on va évaluer les deux solutions ci-aprés.

Eclipse

Mettez à jour votre version d'Eclipse et charger la dernière version de SDCC Sourceforge eclipse-sdcc.

Malheureusement cette version est ancienne et n'est compatible qu'avec une version ancienne d'eclipse (Neon 4.16 ). Si c'est votre cas il suffit de déposer les répertoires trouvés dans l'archive sous leurs répertoires respectifs "plugins" et "features" et de redémarrer eclipse.

Code::blocks

Code::blocks est un environnement de développement OpenSource développé en C++/wxWidgets, il est donc rapide, efficace et écologique.

Il dispose d'un mécanisme de greffon (plugin) puissant qui lui permet de s'adapter à différents environnements.

Paramètrage de Code::blocks

Téléchargez la dernière version de Code::Blocks (20.03 du 29 mars 2020 dans ce tutoriel) ainsi que la dernière version de SDCC.

Lancez Code::Blocks, sélectionnez "Settings / Compiler ...",

  • choisissez "Small Device C Compiler" dans le champ "Selected compiler" (tout en haut).
  • si vous ne travaillez qu'avec la cible Stm8, vous pouvez cliquer "Set as default",
  • sélectionnez l'onglet "Toolchain executables"
    • indiquez où est installé le compilateur "sdcc" dans "Compiler's installation directory" (par exemple /usr/bin),
    • dans le sous-onglet "Additional paths" vous pouvez préciser des chemins supplémentaires pour d'éventuels outils complémentaires.
  • dans l'onglet "Search directoies", mettez à jour les chemins d'inclusion ( ici rien car Sdcc est informé par ses paramètres) et de librairie ( rien ici aussi).

    ===Projet===

    On va créer un projet vide "File / New project ...", sélectionner "Empty project" et nommer le projet "Projet1".

    On modifie le projet,
  • "Project / Properties / Build targets", pour chaque cible "Build" et "Release" on définit le Type en "Native"
  • "Project / Build options.. / Compiler settings / Compiler Flags", sélectionnez "STMicroelectronics STM8 [-mstm8] comme "CPU target architecture",
  • "Project / Build options.. / Compiler settings / Other compiler options", précisez le modèle de micro-controleur par exemple "-pstm8l152c6t6" (sans les guillemets ;-)).
  • Project / Build options.. / Search directories" on précise pour tout le projet nos chemins de recherche "../Libraries/STM8L15x_StdPeriph_Driver/inc"
  • Project / Build options.. / Compiler settings" on precise pour tout le projet le define du compilateur "SDCC"
  • Project / Bild targets.. / Output filename" on precise le fichier de sortie avec l'extension "bin/Debug/my_program.ihx" et on décoche "Auto-generate filename prefix" et "Auto-generate filename extension".

    ===Fichier===

    On peut créer notre premier fichier dans lequel on met ceci:

    // Minimal sample on Stm8l-discovery
    // No licence
    // Grosrouge 2020
    
    #include "stm8l.h"
    // Green led PE7
    // Blue led PC7
    
    #define LED (1 << 7)
    
    int main() {
    	int d;
    	// Configure pins
    	PE_DDR = LED;
    	PE_CR1 = LED;
    	// Loop
    	do {
    		PE_ODR ^= LED;
    		for(d = 0; d < 16000; d++) { }
    	} while(1);
    }
    
    
    

    On compile et ça marche.

    Vous pouvez retrouver le projet ici.

OpenOCD

OpenOcd permet de debogueur certains stm8 depuis 2018. Experimentons à partir de ce site. Le plus important:

~/util/openocd$ openocd -h
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-04-11:58)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Open On-Chip Debugger
Licensed under GNU GPL v2
--help       | -h	display this help
--version    | -v	display OpenOCD version
--file       | -f	use configuration file <name>
--search     | -s	dir to search for config files and scripts
--debug      | -d	set debug level to 3
             | -d<n>	set debug level to <level>
--log_output | -l	redirect log output to file <name>
--command    | -c	run <command>

Notons que l'option -c permet d'ajoindre des commandes TCL complémentaires et -d qui permet d'avoir des traces détaillées.

USAGE EXAMPLES

Compiling with sdcc and debug info:

sdcc -mstm8 led.c --out-fmt-elf --all-callee-saves --debug --verbose --stack-auto --fverbose-asm  --float-reent --no-peep

launch openocd in a second shell:

openocd.exe -f interface/stlink.cfg -f target/stm8s105.cfg -c "init" -c "reset halt"

 

or if you prefer the generic stm8s configuration (for medium size flash stm8s)

openocd.exe -f interface/stlink.cfg -f target/stm8s.cfg -c "init" -c "reset halt"

Currently config files for stm8s003, stm8s105 and stm8l152 are available.

Then start gdb:

stm8-gdb test.elf --tui
start

or if you prefer to load manually:

stm8-gdb test.elf --tui
target extended-remote localhost:3333
load
break main
continue

En fait il faut installer la version la plus avancée d'openOcd à partir des sources

~/util$ git clone https://github.com/ntfreak/openocd.git
git clone https://github.com/ntfreak/openocd.git
Clonage dans 'openocd'...
remote: Enumerating objects: 105, done.
remote: Counting objects: 100% (105/105), done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 64789 (delta 63), reused 48 (delta 11), pack-reused 64684
Réception d'objets: 100% (64789/64789), 25.57 MiB | 1.01 MiB/s, fait.
Résolution des deltas: 100% (53187/53187), fait.
~/util$ cd openocd


~/util/openocd$ ./bootstrap
+ aclocal
+ libtoolize --automake --copy
+ autoconf
+ autoheader
+ automake --gnu --add-missing --copy
configure.ac:26: installing './compile'
configure.ac:37: installing './config.guess'
configure.ac:37: installing './config.sub'
configure.ac:16: installing './install-sh'
configure.ac:16: installing './missing'
Makefile.am:46: warning: wildcard $(srcdir: non-POSIX variable name
Makefile.am:46: (probably a GNU make extension)
Makefile.am: installing './INSTALL'
Makefile.am: installing './depcomp'
Makefile.am:23: installing './mdate-sh'
Makefile.am:23: installing './texinfo.tex'
Setting up submodules
Sous-module 'jimtcl' (https://repo.or.cz/jimtcl.git) enregistré pour le chemin 'jimtcl'
Sous-module 'src/jtag/drivers/libjaylink' (https://repo.or.cz/libjaylink.git) enregistré pour le chemin 'src/jtag/drivers/libjaylink'
Sous-module 'tools/git2cl' (https://repo.or.cz/git2cl.git) enregistré pour le chemin 'tools/git2cl'
Clonage dans '/home/pile/util/openocd/jimtcl'...
Clonage dans '/home/pile/util/openocd/src/jtag/drivers/libjaylink'...
Clonage dans '/home/pile/util/openocd/tools/git2cl'...
Chemin de sous-module 'jimtcl' : '0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6' extrait
Chemin de sous-module 'src/jtag/drivers/libjaylink' : 'f73ad5e667ae8b26a52b847c603fdadaabf302a6' extrait
Chemin de sous-module 'tools/git2cl' : '8373c9f74993e218a08819cbcdbab3f3564bbeba' extrait
Generating build system...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:42: installing 'build-aux/ar-lib'
configure.ac:37: installing 'build-aux/compile'
configure.ac:30: installing 'build-aux/missing'
Makefile.am: installing './INSTALL'
libjaylink/Makefile.am: installing 'build-aux/depcomp'
Bootstrap complete. Quick build instructions:
./configure ....

~/util/openocd$ ./configure
...
config.status: executing libtool commands

libjaylink configuration summary:
 - Package version ................ 0.2.0-git-f73ad5e
 - Library version ................ 0:0:0
 - Installation prefix ............ /usr/local
 - Building on .................... x86_64-pc-linux-gnu
 - Building for ................... x86_64-pc-linux-gnu

Enabled transports:
 - USB ............................ yes
 - TCP ............................ yes



OpenOCD configuration summary
--------------------------------------------------
MPSSE mode of FTDI based devices        yes (auto)
ST-Link Programmer                      yes (auto)
TI ICDI JTAG Programmer                 yes (auto)
Keil ULINK JTAG Programmer              yes (auto)
Altera USB-Blaster II Compatible        yes (auto)
Bitbang mode of FT232R based devices    yes (auto)
Versaloon-Link JTAG Programmer          yes (auto)
TI XDS110 Debug Probe                   yes (auto)
OSBDM (JTAG only) Programmer            yes (auto)
eStick/opendous JTAG Programmer         yes (auto)
Andes JTAG Programmer                   yes (auto)
USBProg JTAG Programmer                 yes (auto)
Raisonance RLink JTAG Programmer        yes (auto)
Olimex ARM-JTAG-EW Programmer           yes (auto)
CMSIS-DAP Compliant Debugger            no
Cypress KitProg Programmer              no
Altera USB-Blaster Compatible           no
ASIX Presto Adapter                     no
OpenJTAG Adapter                        no
SEGGER J-Link Programmer                yes (auto)


Compilons openOcd.

~/util/openocd$ sudo ./configure --prefix=/usr
...
libjaylink configuration summary:
 - Package version ................ 0.2.0-git-f73ad5e
 - Library version ................ 0:0:0
 - Installation prefix ............ /usr
 - Building on .................... x86_64-pc-linux-gnu
 - Building for ................... x86_64-pc-linux-gnu

Enabled transports:
 - USB ............................ yes
 - TCP ............................ yes



OpenOCD configuration summary
--------------------------------------------------
MPSSE mode of FTDI based devices        yes (auto)
ST-Link Programmer                      yes (auto)
TI ICDI JTAG Programmer                 yes (auto)
Keil ULINK JTAG Programmer              yes (auto)
Altera USB-Blaster II Compatible        yes (auto)
Bitbang mode of FT232R based devices    yes (auto)
Versaloon-Link JTAG Programmer          yes (auto)
TI XDS110 Debug Probe                   yes (auto)
OSBDM (JTAG only) Programmer            yes (auto)
eStick/opendous JTAG Programmer         yes (auto)
Andes JTAG Programmer                   yes (auto)
USBProg JTAG Programmer                 yes (auto)
Raisonance RLink JTAG Programmer        yes (auto)
Olimex ARM-JTAG-EW Programmer           yes (auto)
CMSIS-DAP Compliant Debugger            no
Cypress KitProg Programmer              no
Altera USB-Blaster Compatible           no
ASIX Presto Adapter                     no
OpenJTAG Adapter                        no
SEGGER J-Link Programmer                yes (auto)


~/util/openocd$ sudo make
...
~/util/openocd$ sudo make install exec-prefix=/usr

..

Et là on a bien nos configurations Stm8.

/usr/share/openocd/scripts$ ls target/stm8* -al
-rw-r--r-- 1 root root  185 juin   3 15:41 target/stm8l152.cfg
-rw-r--r-- 1 root root 1871 juin   3 15:41 target/stm8l.cfg
-rw-r--r-- 1 root root  161 juin   3 15:41 target/stm8s003.cfg
-rw-r--r-- 1 root root  203 juin   3 15:41 target/stm8s103.cfg
-rw-r--r-- 1 root root  121 juin   3 15:41 target/stm8s105.cfg
-rw-r--r-- 1 root root 1817 juin   3 15:41 target/stm8s.cfg

Testons

 /usr/local/bin/openocd -f interface/stlink-v2.cfg -f target/stm8s105.cfg -c "init" -c "reset halt"
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-03-15:38)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
Error: Debug adapter doesn't support 'swim' transport
/usr/local/bin/../share/openocd/scripts/target/stm8s.cfg:7: Error: 
in procedure 'script' 
at file "embedded:startup.tcl", line 26
at file "/usr/local/bin/../share/openocd/scripts/target/stm8s105.cfg", line 8
at file "/usr/local/bin/../share/openocd/scripts/target/stm8s.cfg", line 7
~/dev/stm8/ws_stm8l152c6t6$ 

Ici les fichiers de configuration sont définis dans /usr/local/share/openocd/. Dans la version la plus récente 'openocd il faut utilise interface/stlink.cfg quelque soit la version de l'interface utilisée.

Note: La commande "openocd -f interface/vsllink.cfg -c "transport select swd" -f target/lpc1768.cfg" est foinctionnelle sur certains sites.

~/util/openocd$ openocd -c "adapter list"
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-04-11:58)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
The following debug adapters are available:
1: ftdi
2: usb_blaster
3: ft232r
4: usbprog
5: jlink
6: vsllink
7: rlink
8: ulink
9: arm-jtag-ew
10: hla
11: osbdm
12: opendous
13: aice
14: xds110
15: st-link

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: Debug Adapter has to be specified, see "adapter driver" command

On essaye aussi

~/util/openocd$ openocd -c 'adapter driver st-link' -f target/stm8s105.cfg -c "init" -c "reset halt"
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-04-11:58)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Warn : Transport allowed "dapdirect_swd" 
Warn : Transport allowed "dapdirect_jtag" 
Warn : Transport allowed "swim" 
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst

Error: open failed

~/util/openocd$ openocd -c 'adapter driver st-link' -f target/stm8s105.cfg
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-04-11:58)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Warn : Transport allowed "dapdirect_swd" 
Warn : Transport allowed "dapdirect_jtag" 
Warn : Transport allowed "swim" 
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: open failed


Aprés moultes essais on a:

pile@vmt-l11:~/util/openocd$ sudo openocd -d -f interface/stlink.cfg -f target/stm8l152.cfg
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-11-18:03)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
User : 13 1 options.c:63 configuration_output_handler(): debug_level: 3
User : 14 1 options.c:63 configuration_output_handler(): 
Debug: 15 1 options.c:187 add_default_dirs(): bindir=/usr/local/bin
Debug: 16 2 options.c:188 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 17 2 options.c:189 add_default_dirs(): exepath=/usr/local/bin
Debug: 18 2 options.c:190 add_default_dirs(): bin2data=../share/openocd
Debug: 19 2 configuration.c:42 add_script_search_dir(): adding /home/pile/.openocd
Debug: 20 2 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/site
Debug: 21 2 configuration.c:42 add_script_search_dir(): adding /usr/local/bin/../share/openocd/scripts
Debug: 22 2 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/interface/stlink.cfg
Debug: 23 2 command.c:142 script_debug(): [adapter]
Debug: 24 2 command.c:142 script_debug(): [driver]
Debug: 25 2 command.c:142 script_debug(): [st-link]
Debug: 26 2 command.c:147 script_debug(): command - adapter driver st-link
Debug: 28 2 command.c:353 register_command_handler(): registering 'st-link'...
Debug: 29 2 command.c:353 register_command_handler(): registering 'st-link'...
Debug: 30 2 command.c:142 script_debug(): [st-link]
Debug: 31 2 command.c:142 script_debug(): [vid_pid]
Debug: 32 2 command.c:142 script_debug(): [0x0483]
Debug: 33 2 command.c:142 script_debug(): [0x3744]
Debug: 34 2 command.c:142 script_debug(): [0x0483]
Debug: 35 2 command.c:142 script_debug(): [0x3748]
Debug: 36 2 command.c:142 script_debug(): [0x0483]
Debug: 37 2 command.c:142 script_debug(): [0x374b]
Debug: 38 2 command.c:142 script_debug(): [0x0483]
Debug: 39 2 command.c:142 script_debug(): [0x374d]
Debug: 40 2 command.c:142 script_debug(): [0x0483]
Debug: 41 2 command.c:142 script_debug(): [0x374e]
Debug: 42 2 command.c:142 script_debug(): [0x0483]
Debug: 43 2 command.c:142 script_debug(): [0x374f]
Debug: 44 2 command.c:142 script_debug(): [0x0483]
Debug: 45 2 command.c:142 script_debug(): [0x3752]
Debug: 46 2 command.c:142 script_debug(): [0x0483]
Debug: 47 2 command.c:142 script_debug(): [0x3753]
Debug: 48 2 command.c:147 script_debug(): command - st-link vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753
Debug: 50 2 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/stm8l152.cfg
Debug: 51 2 configuration.c:97 find_file(): found /usr/local/bin/../share/openocd/scripts/target/stm8l.cfg
Debug: 52 2 command.c:142 script_debug(): [transport]
Debug: 53 2 command.c:142 script_debug(): [select]
Debug: 54 2 command.c:142 script_debug(): [swim]
Debug: 55 2 command.c:147 script_debug(): command - transport select swim
Warn : 56 2 transport.c:317 jim_transport_select(): Transport allowed "dapdirect_swd" 
Warn : 57 2 transport.c:317 jim_transport_select(): Transport allowed "dapdirect_jtag" 
Warn : 58 2 transport.c:317 jim_transport_select(): Transport allowed "swim" 
Debug: 59 2 swim.c:116 swim_transport_select(): swim_transport_select
Debug: 60 2 command.c:353 register_command_handler(): registering 'swim'...
Debug: 61 2 command.c:142 script_debug(): [swim]
Debug: 62 2 command.c:142 script_debug(): [newtap]
Debug: 63 2 command.c:142 script_debug(): [stm8l]
Debug: 64 2 command.c:142 script_debug(): [cpu]
Debug: 65 2 command.c:147 script_debug(): command - swim newtap stm8l cpu
Debug: 67 2 swim.c:82 handle_swim_newtap_command(): Creating new SWIM "tap", Chip: stm8l, Tap: cpu, Dotted: stm8l.cpu
Debug: 68 2 core.c:1488 jtag_tap_init(): Created Tap: stm8l.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 69 2 command.c:142 script_debug(): [target]
Debug: 70 2 command.c:142 script_debug(): [create]
Debug: 71 2 command.c:142 script_debug(): [stm8l.cpu]
Debug: 72 2 command.c:142 script_debug(): [stm8]
Debug: 73 2 command.c:142 script_debug(): [-chain-position]
Debug: 74 2 command.c:142 script_debug(): [stm8l.cpu]
Debug: 75 2 command.c:147 script_debug(): command - target create stm8l.cpu stm8 -chain-position stm8l.cpu
Debug: 76 2 target.c:1978 target_free_all_working_areas_restore(): freeing all working areas
Debug: 77 2 stm8.c:431 stm8_configure_break_unit(): hw breakpoints: numinst 2 numdata 2
Debug: 78 2 command.c:353 register_command_handler(): registering 'stm8'...
Debug: 79 2 command.c:353 register_command_handler(): registering 'stm8'...
Debug: 80 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 81 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 82 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 83 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 84 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 85 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 86 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 87 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 88 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 89 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 90 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 91 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 92 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 93 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 94 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 95 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 96 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 97 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 98 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 99 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 100 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 101 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 102 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 103 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 104 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 105 2 command.c:353 register_command_handler(): registering 'stm8l.cpu'...
Debug: 106 2 command.c:142 script_debug(): [stm8l.cpu]
Debug: 107 2 command.c:142 script_debug(): [configure]
Debug: 108 2 command.c:142 script_debug(): [-work-area-phys]
Debug: 109 2 command.c:142 script_debug(): [0x0]
Debug: 110 2 command.c:142 script_debug(): [-work-area-size]
Debug: 111 2 command.c:142 script_debug(): [0x400]
Debug: 112 2 command.c:142 script_debug(): [-work-area-backup]
Debug: 113 2 command.c:142 script_debug(): [1]
Debug: 114 2 command.c:147 script_debug(): command - stm8l.cpu configure -work-area-phys 0x0 -work-area-size 0x400 -work-area-backup 1
Debug: 115 2 target.c:1978 target_free_all_working_areas_restore(): freeing all working areas
Debug: 116 2 target.c:1978 target_free_all_working_areas_restore(): freeing all working areas
Debug: 117 2 target.c:1978 target_free_all_working_areas_restore(): freeing all working areas
Debug: 118 2 command.c:142 script_debug(): [stm8l.cpu]
Debug: 119 2 command.c:142 script_debug(): [configure]
Debug: 120 2 command.c:142 script_debug(): [-flashstart]
Debug: 121 2 command.c:142 script_debug(): [0x8000]
Debug: 122 2 command.c:142 script_debug(): [-flashend]
Debug: 123 2 command.c:142 script_debug(): [0xffff]
Debug: 124 2 command.c:142 script_debug(): [-eepromstart]
Debug: 125 2 command.c:142 script_debug(): [0x1000]
Debug: 126 2 command.c:142 script_debug(): [-eepromend]
Debug: 127 2 command.c:142 script_debug(): [0x13ff]
Debug: 128 2 command.c:147 script_debug(): command - stm8l.cpu configure -flashstart 0x8000 -flashend 0xffff -eepromstart 0x1000 -eepromend 0x13ff
Debug: 129 2 stm8.c:1991 stm8_jim_configure(): flashstart=00008000
Debug: 130 2 stm8.c:2010 stm8_jim_configure(): flashend=0000ffff
Debug: 131 2 stm8.c:2029 stm8_jim_configure(): eepromstart=00001000
Debug: 132 2 stm8.c:2048 stm8_jim_configure(): eepromend=000013ff
Debug: 133 2 command.c:142 script_debug(): [stm8l.cpu]
Debug: 134 2 command.c:142 script_debug(): [configure]
Debug: 135 2 command.c:142 script_debug(): [-optionstart]
Debug: 136 2 command.c:142 script_debug(): [0x4800]
Debug: 137 2 command.c:142 script_debug(): [-optionend]
Debug: 138 2 command.c:142 script_debug(): [0x487f]
Debug: 139 2 command.c:142 script_debug(): [-blocksize]
Debug: 140 2 command.c:142 script_debug(): [0x80]
Debug: 141 2 command.c:147 script_debug(): command - stm8l.cpu configure -optionstart 0x4800 -optionend 0x487f -blocksize 0x80
Debug: 142 2 stm8.c:2067 stm8_jim_configure(): optionstart=00004800
Debug: 143 2 stm8.c:2086 stm8_jim_configure(): optionend=0000487f
Debug: 144 2 stm8.c:1972 stm8_jim_configure(): blocksize=00000080
Debug: 145 2 command.c:142 script_debug(): [stm8l.cpu]
Debug: 146 2 command.c:142 script_debug(): [configure]
Debug: 147 2 command.c:142 script_debug(): [-enable_stm8l]
Debug: 148 2 command.c:147 script_debug(): command - stm8l.cpu configure -enable_stm8l
Debug: 149 2 stm8.c:2104 stm8_jim_configure(): enable_stm8l=00000001
Debug: 150 2 command.c:142 script_debug(): [adapter]
Debug: 151 2 command.c:142 script_debug(): [speed]
Debug: 152 2 command.c:142 script_debug(): [800]
Debug: 153 3 command.c:147 script_debug(): command - adapter speed 800
Debug: 155 3 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 156 3 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 157 3 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 158 3 command.c:142 script_debug(): [reset_config]
Debug: 159 3 command.c:142 script_debug(): [srst_only]
Debug: 160 3 command.c:147 script_debug(): command - reset_config srst_only
User : 162 3 options.c:63 configuration_output_handler(): srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
User : 163 3 options.c:63 configuration_output_handler(): 
Info : 164 3 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 165 3 server.c:311 add_service(): Listening on port 4444 for telnet connections
Debug: 166 3 command.c:142 script_debug(): [init]
Debug: 167 3 command.c:147 script_debug(): command - init
Debug: 169 3 command.c:142 script_debug(): [target]
Debug: 170 3 command.c:142 script_debug(): [init]
Debug: 171 3 command.c:147 script_debug(): command - target init
Debug: 173 3 command.c:142 script_debug(): [target]
Debug: 174 3 command.c:142 script_debug(): [names]
Debug: 175 3 command.c:147 script_debug(): command - target names
Debug: 176 3 command.c:142 script_debug(): [stm8l.cpu]
Debug: 177 3 command.c:142 script_debug(): [cget]
Debug: 178 3 command.c:142 script_debug(): [-event]
Debug: 179 3 command.c:142 script_debug(): [gdb-flash-erase-start]
Debug: 180 3 command.c:147 script_debug(): command - stm8l.cpu cget -event gdb-flash-erase-start
Debug: 181 3 command.c:142 script_debug(): [stm8l.cpu]
Debug: 182 3 command.c:142 script_debug(): [configure]
Debug: 183 3 command.c:142 script_debug(): [-event]
Debug: 184 3 command.c:142 script_debug(): [gdb-flash-erase-start]
Debug: 185 3 command.c:142 script_debug(): [reset init]
Debug: 186 3 command.c:147 script_debug(): command - stm8l.cpu configure -event gdb-flash-erase-start reset init
Debug: 187 3 command.c:142 script_debug(): [stm8l.cpu]
Debug: 188 3 command.c:142 script_debug(): [cget]
Debug: 189 3 command.c:142 script_debug(): [-event]
Debug: 190 3 command.c:142 script_debug(): [gdb-flash-write-end]
Debug: 191 3 command.c:147 script_debug(): command - stm8l.cpu cget -event gdb-flash-write-end
Debug: 192 3 command.c:142 script_debug(): [stm8l.cpu]
Debug: 193 3 command.c:142 script_debug(): [configure]
Debug: 194 3 command.c:142 script_debug(): [-event]
Debug: 195 3 command.c:142 script_debug(): [gdb-flash-write-end]
Debug: 196 3 command.c:142 script_debug(): [reset halt]
Debug: 197 3 command.c:147 script_debug(): command - stm8l.cpu configure -event gdb-flash-write-end reset halt
Debug: 198 3 command.c:142 script_debug(): [stm8l.cpu]
Debug: 199 3 command.c:142 script_debug(): [cget]
Debug: 200 3 command.c:142 script_debug(): [-event]
Debug: 201 3 command.c:142 script_debug(): [gdb-attach]
Debug: 202 3 command.c:147 script_debug(): command - stm8l.cpu cget -event gdb-attach
Debug: 203 3 command.c:142 script_debug(): [stm8l.cpu]
Debug: 204 3 command.c:142 script_debug(): [configure]
Debug: 205 3 command.c:142 script_debug(): [-event]
Debug: 206 3 command.c:142 script_debug(): [gdb-attach]
Debug: 207 3 command.c:142 script_debug(): [halt]
Debug: 208 3 command.c:147 script_debug(): command - stm8l.cpu configure -event gdb-attach halt
Debug: 209 3 target.c:1440 handle_target_init_command(): Initializing targets...
Debug: 210 3 command.c:353 register_command_handler(): registering 'target_request'...
Debug: 211 3 command.c:353 register_command_handler(): registering 'trace'...
Debug: 212 3 command.c:353 register_command_handler(): registering 'trace'...
Debug: 213 3 command.c:353 register_command_handler(): registering 'fast_load_image'...
Debug: 214 3 command.c:353 register_command_handler(): registering 'fast_load'...
Debug: 215 3 command.c:353 register_command_handler(): registering 'profile'...
Debug: 216 3 command.c:353 register_command_handler(): registering 'virt2phys'...
Debug: 217 3 command.c:353 register_command_handler(): registering 'reg'...
Debug: 218 3 command.c:353 register_command_handler(): registering 'poll'...
Debug: 219 3 command.c:353 register_command_handler(): registering 'wait_halt'...
Debug: 220 3 command.c:353 register_command_handler(): registering 'halt'...
Debug: 221 3 command.c:353 register_command_handler(): registering 'resume'...
Debug: 222 3 command.c:353 register_command_handler(): registering 'reset'...
Debug: 223 3 command.c:353 register_command_handler(): registering 'soft_reset_halt'...
Debug: 224 3 command.c:353 register_command_handler(): registering 'step'...
Debug: 225 3 command.c:353 register_command_handler(): registering 'mdd'...
Debug: 226 3 command.c:353 register_command_handler(): registering 'mdw'...
Debug: 227 3 command.c:353 register_command_handler(): registering 'mdh'...
Debug: 228 3 command.c:353 register_command_handler(): registering 'mdb'...
Debug: 229 3 command.c:353 register_command_handler(): registering 'mwd'...
Debug: 230 3 command.c:353 register_command_handler(): registering 'mww'...
Debug: 231 3 command.c:353 register_command_handler(): registering 'mwh'...
Debug: 232 3 command.c:353 register_command_handler(): registering 'mwb'...
Debug: 233 3 command.c:353 register_command_handler(): registering 'bp'...
Debug: 234 3 command.c:353 register_command_handler(): registering 'rbp'...
Debug: 235 3 command.c:353 register_command_handler(): registering 'wp'...
Debug: 236 3 command.c:353 register_command_handler(): registering 'rwp'...
Debug: 237 3 command.c:353 register_command_handler(): registering 'load_image'...
Debug: 238 3 command.c:353 register_command_handler(): registering 'dump_image'...
Debug: 239 3 command.c:353 register_command_handler(): registering 'verify_image_checksum'...
Debug: 240 3 command.c:353 register_command_handler(): registering 'verify_image'...
Debug: 241 3 command.c:353 register_command_handler(): registering 'test_image'...
Debug: 242 3 command.c:353 register_command_handler(): registering 'reset_nag'...
Debug: 243 3 command.c:353 register_command_handler(): registering 'ps'...
Debug: 244 3 command.c:353 register_command_handler(): registering 'test_mem_access'...
Debug: 245 3 stlink_usb.c:3702 stlink_dap_init(): stlink_dap_init()
Debug: 246 3 stlink_usb.c:2816 stlink_usb_open(): stlink_usb_open
Debug: 247 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x3744 serial: 
Debug: 248 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x3748 serial: 
Debug: 249 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x374b serial: 
Debug: 250 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x374d serial: 
Debug: 251 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x374e serial: 
Debug: 252 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x374f serial: 
Debug: 253 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x3752 serial: 
Debug: 254 3 stlink_usb.c:2830 stlink_usb_open(): transport: 5 vid: 0x0483 pid: 0x3753 serial: 
Info : 255 7 stlink_usb.c:1098 stlink_usb_version(): STLINK V2J0S6 (API v2) VID:PID 0483:3748
Debug: 256 8 stlink_usb.c:1320 stlink_usb_init_mode(): MODE: 0x01
Debug: 257 8 stlink_usb.c:1375 stlink_usb_init_mode(): MODE: 0x01
Debug: 258 8 stlink_usb.c:1434 stlink_usb_init_mode(): MODE: 0x03
Debug: 259 8 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 260 10 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 2, delaying 2000 microseconds
Debug: 261 12 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 3, delaying 4000 microseconds
Debug: 262 16 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 4, delaying 8000 microseconds
Debug: 263 24 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 264 25 core.c:1789 adapter_khz_to_speed(): have interface set up
Debug: 265 25 stm8.c:807 stm8_speed(): stm8_speed: 800
Debug: 266 25 stm8.c:813 stm8_speed(): writing B0 to SWIM_CSR (SAFE_MASK + SWIM_DM + HS:1)
Debug: 267 25 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 268 25 core.c:1789 adapter_khz_to_speed(): have interface set up
Info : 269 25 core.c:1565 adapter_init(): clock speed 800 kHz
Debug: 270 25 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 271 25 command.c:142 script_debug(): [transport]
Debug: 272 25 command.c:142 script_debug(): [init]
Debug: 273 25 command.c:147 script_debug(): command - transport init
Debug: 275 25 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 276 25 swim.c:125 swim_transport_init(): swim_transport_init
Debug: 277 25 stlink_usb.c:3748 stlink_dap_reset(): stlink_dap_reset(0)
Debug: 278 26 core.c:640 adapter_system_reset(): SRST line released
Debug: 279 26 command.c:142 script_debug(): [dap]
Debug: 280 26 command.c:142 script_debug(): [init]
Debug: 281 26 command.c:147 script_debug(): command - dap init
Debug: 283 26 arm_dap.c:106 dap_init_all(): Initializing all DAPs ...
Debug: 284 26 openocd.c:158 handle_init_command(): Examining targets...
Debug: 285 26 target.c:1628 target_call_event_callbacks(): target event 19 (examine-start) for core stm8l.cpu
Debug: 286 26 target.c:1628 target_call_event_callbacks(): target event 21 (examine-end) for core stm8l.cpu
Debug: 287 26 command.c:142 script_debug(): [flash]
Debug: 288 26 command.c:142 script_debug(): [init]
Debug: 289 26 command.c:147 script_debug(): command - flash init
Debug: 290 26 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 292 27 tcl.c:1327 handle_flash_init_command(): Initializing flash devices...
Debug: 293 27 command.c:142 script_debug(): [nand]
Debug: 294 27 command.c:142 script_debug(): [init]
Debug: 295 27 command.c:147 script_debug(): command - nand init
Debug: 296 28 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 298 29 tcl.c:498 handle_nand_init_command(): Initializing NAND devices...
Debug: 299 29 command.c:142 script_debug(): [pld]
Debug: 300 29 command.c:142 script_debug(): [init]
Debug: 301 29 command.c:147 script_debug(): command - pld init
Debug: 303 30 pld.c:206 handle_pld_init_command(): Initializing PLDs...
Info : 304 30 gdb_server.c:3492 gdb_target_start(): starting gdb server for stm8l.cpu on 3333
Info : 305 30 server.c:311 add_service(): Listening on port 3333 for gdb connections
Debug: 306 10511 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 307 16358 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 308 16560 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 309 16864 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 310 17369 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 311 17672 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 312 18278 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 313 18380 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 314 18784 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 315 19390 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 316 19392 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 317 19392 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 318 19494 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 319 19494 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 320 19596 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 321 19596 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 322 19698 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 323 19698 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 324 19800 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 325 19800 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 326 20908 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 327 21413 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 328 21918 stlink_usb.c:839 stlink_cmd_allow_retry(): stlink_cmd_allow_retry ERROR_WAIT, retry 1, delaying 1000 microseconds
Debug: 329 21919 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 330 21919 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 331 22021 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 332 22021 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 333 22123 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 334 22123 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 335 22225 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 336 22225 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
Debug: 337 22327 stlink_usb.c:722 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x4
Debug: 338 22327 stm8.c:848 stm8_poll(): stm8_read_dm_csrx failed retval=-4
^CDebug: 339 23294 server.c:609 sig_handler(): Terminating on Signal 2
Debug: 340 23294 command.c:142 script_debug(): [shutdown]
Debug: 341 23294 command.c:147 script_debug(): command - shutdown
User : 343 23295 server.c:742 handle_shutdown_command(): shutdown command invoked
Debug: 344 23295 target.c:1978 target_free_all_working_areas_restore(): freeing all working areas
Debug: 345 23295 stlink_usb.c:3737 stlink_dap_quit(): stlink_dap_quit()

En fait il faut que interface/stlink.cfg contienne:

adapter driver st-link
st-link vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753

Et ça va mieux.

Le debogage

Ce qui marche

La compilation

$ sdcc -mstm8 blinky.c -D__SDCC__ --all-callee-saves --debug --verbose --stack-auto --fverbose-asm  --float-reent --no-peep -lstm8 -oblinky.elf
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -D__SDCC__ -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_stm8 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /usr/bin/../share/sdcc/include/stm8 -isystem /usr/share/sdcc/include/stm8 -isystem /usr/bin/../share/sdcc/include -isystem /usr/share/sdcc/include  blinky.c 
sdcc: Generating code...
sdcc: Calling assembler...
sdcc: sdasstm8 -plosgffwy "blinky.asm"
sdcc: Calling linker...
sdcc: sdldstm8 -nf "blinky.lk"

Le debogage

pile@vmt-l11:~/dev/stm8/ws_stm8s105c6/blinky_200526$ stm8-gdb blinky.elf
GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=stm8-none-elf32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from blinky.elf...(no debugging symbols found)...done.
(gdb) start
No symbol table loaded.  Use the "file" command.
(gdb) target extended-remote localhost:3333
Remote debugging using localhost:3333
0x000080bc in ?? ()
(gdb) load
Loading section .sec1, size 0x80 lma 0x8000
Loading section .sec3, size 0x3 lma 0x8080
Loading section .sec2, size 0x1d lma 0x8083
Loading section .sec4, size 0x29 lma 0x80a0
Start address 0x0, load size 201
Transfer rate: 1 KB/sec, 50 bytes/write.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/pile/dev/stm8/ws_stm8s105c6/blinky_200526/blinky.elf 
Already connected to a remote target.  Disconnect? (y or n) y
Remote debugging using localhost:3333
0x00000000 in ?? ()
Loading section .sec1, size 0x80 lma 0x8000
Loading section .sec3, size 0x3 lma 0x8080
Loading section .sec2, size 0x1d lma 0x8083
Loading section .sec4, size 0x29 lma 0x80a0
Start address 0x0, load size 201
Transfer rate: 1 KB/sec, 50 bytes/write.
(gdb) quit
A debugging session is active.

	Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y
Detaching from program: /home/pile/dev/stm8/ws_stm8s105c6/blinky_200526/blinky.elf, Remote target
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.

mais pas le chargement des symboles:

Reading symbols from blinky.elf...(no debugging symbols found)...done.

Version la plus recente de SDCC

Installation a partir des sources; les pic14 et pic 16 demandent des ressources particulières non disponibles, on les retirent de la génération.

~/util/sdcc-4.0.0$ ./configure --disable-pic14-port --disable-pic16-port
~/util/sdcc-4.0.0$ make
~/util/sdcc-4.0.0$ sudo make install

Eventuellement désactiver la version par défaut de sdcc présente dans /usr/bin/.

Octobre

pile@vmt-l11:~/dev/stm8/ws_stm8s105c6/blinky_201005$ sdcc blinky.c -DSTM8S105 -mstm8 --out-fmt-elf --all-callee-saves --debug --verbose --stack-auto --fverbose-asm  --float-reent --no-peep -Iinc/
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -std=c11 -DSTM8S105 -Iinc/ -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_CHAR_UNSIGNED -D__SDCC_MODEL_MEDIUM -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=4_0_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=0 -D__SDCC_VERSION_PATCH=0 -D__SDCC_REVISION=11528 -D__SDCC_stm8 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem /usr/local/bin/../share/sdcc/include/stm8 -isystem /usr/local/share/sdcc/include/stm8 -isystem /usr/local/bin/../share/sdcc/include -isystem /usr/local/share/sdcc/include  blinky.c 
sdcc: Generating code...
sdcc: Calling assembler...
sdcc: sdasstm8 -plosgffwy "blinky.asm"
sdcc: Calling linker...
sdcc: sdldstm8 -nf "blinky.lk"

Dans un autre terminal on lance openocd.

pile@vmt-l11:~/dev/stm8/ws_stm8s105c6/blinky_201005$ openocd -f interface/stlink.cfg -f target/stm8s105.cfg -c "init" -c "reset halt"
Open On-Chip Debugger 0.10.0+dev-01267-g4c364b45-dirty (2020-06-11-18:03)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Warn : Transport allowed "dapdirect_swd" 
Warn : Transport allowed "dapdirect_jtag" 
Warn : Transport allowed "swim" 
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst

Info : STLINK V1J0S3 (API v1) VID:PID 0483:3744
Info : clock speed 800 kHz
Info : starting gdb server for stm8s.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, pc: 0x00006000
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, pc: 0x00006000
Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.

Et dans le premier terminal on peut lancer le débogage.

pile@vmt-l11:~/dev/stm8/ws_stm8s105c6/blinky_201005$ stm8-gdb blinky.elf
GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=stm8-none-elf32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from blinky.elf...done.
(gdb) p
The history is empty.
(gdb) l
1	//#include "stm8s.h"
2	#define PD_ODR *(unsigned char*)0x500F
3	#define PD_IDR *(unsigned char*)0x5010
4	#define PD_DDR *(unsigned char*)0x5011
5	#define PD_CR1 *(unsigned char*)0x5012
6	#define PD_CR2 *(unsigned char*)0x5013
7	
8	
9	
10	#define LED 0x01
(gdb) start
Temporary breakpoint 1 at 0x8024: file blinky.c, line 15.
Starting program: /home/pile/dev/stm8/ws_stm8s105c6/blinky_201005/blinky.elf 
Remote debugging using localhost:3333
0x00006000 in ?? ()
Loading section HOME, size 0x7 lma 0x8000
Loading section GSINIT, size 0x1a lma 0x8007
Loading section GSFINAL, size 0x3 lma 0x8021
Loading section CODE, size 0x23 lma 0x8024
Loading section SSEG, size 0x1 lma 0xffffffff
Start address 0x8007, load size 72
Transfer rate: 309 bytes/sec, 14 bytes/write.
(gdb) 
Temporary breakpoint 1, main () at blinky.c:15
15		PD_DDR = LED;
c
Continuing.
q
^C
Program received signal SIGINT, Interrupt.
0x0000803e in main () at blinky.c:20
20			for(d = 0; d < 1800; d++) { }
(gdb) s

^C
Program received signal SIGINT, Interrupt.
0x00008039 in main () at blinky.c:20
20			for(d = 0; d < 1800; d++) { }
(gdb) p d
$1 = 1517
(gdb) 

Et là ça marche!

Conclusion

On peut développer, c'est trés bien; et on peut déboguer.

Il reste à trouver les bons paramètres et les geler dans le Makefile.

Si vous savez faire sauter les derniers blocages, merci de me le communiquer je mettrais à jour ce document.