From 6c2e5c1d24e4958f51d84596b9ade80542dd126b Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Mon, 4 Feb 2019 15:44:23 +0100 Subject: [PATCH] GDB: minimal configuration for stm32mp machine support --- recipes-devtools/gdb/files/gdbinit | 4 ++++ .../gdb/gdb-cross-canadian_%.bbappend | 19 +++++++++++++++++++ recipes-devtools/gdb/gdb-cross_%.bbappend | 19 +++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 recipes-devtools/gdb/files/gdbinit create mode 100644 recipes-devtools/gdb/gdb-cross-canadian_%.bbappend create mode 100644 recipes-devtools/gdb/gdb-cross_%.bbappend diff --git a/recipes-devtools/gdb/files/gdbinit b/recipes-devtools/gdb/files/gdbinit new file mode 100644 index 0000000..55a41f2 --- /dev/null +++ b/recipes-devtools/gdb/files/gdbinit @@ -0,0 +1,4 @@ +target remote :3333 +set arm fallback-mode thumb +monitor reset +monitor halt diff --git a/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend b/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend new file mode 100644 index 0000000..3a04bc7 --- /dev/null +++ b/recipes-devtools/gdb/gdb-cross-canadian_%.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/files:" + +#Add scripts for gdb/openocd/eclipse +SRC_URI_append_stm32mpcommon += " \ + file://gdbinit \ +" + +# Ref to yocto default conf at: +# openembedded-core/meta/recipes-devtools/gdb/gdb-common.inc +# We force activation of tui for the "layout" command. +EXTRA_OECONF_append_stm32mpcommon = " \ + --enable-tui \ +" + +do_install_append_stm32mpcommon() { + install -d ${D}/${bindir}/ + cp -a ${WORKDIR}/gdbinit ${D}/${bindir}/ +} + diff --git a/recipes-devtools/gdb/gdb-cross_%.bbappend b/recipes-devtools/gdb/gdb-cross_%.bbappend new file mode 100644 index 0000000..3a04bc7 --- /dev/null +++ b/recipes-devtools/gdb/gdb-cross_%.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend_stm32mpcommon := "${THISDIR}/files:" + +#Add scripts for gdb/openocd/eclipse +SRC_URI_append_stm32mpcommon += " \ + file://gdbinit \ +" + +# Ref to yocto default conf at: +# openembedded-core/meta/recipes-devtools/gdb/gdb-common.inc +# We force activation of tui for the "layout" command. +EXTRA_OECONF_append_stm32mpcommon = " \ + --enable-tui \ +" + +do_install_append_stm32mpcommon() { + install -d ${D}/${bindir}/ + cp -a ${WORKDIR}/gdbinit ${D}/${bindir}/ +} +