diff mbox series

[v2,1/3] fragments: add a 'devtool-ide-sdk' fragment

Message ID 20251228180935.2077478-2-adrian.freihofer@siemens.com
State Under Review
Headers show
Series fragments: add a 'devtool-ide-sdk' fragment | expand

Commit Message

AdrianF Dec. 28, 2025, 6:08 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

Add a configuration fragment that enables devtool ide-sdk workflow
for development and remote debugging.
The configuration is intended to streamline the development workflow
where developers can modify recipes with devtool and debug them
remotely on target devices using IDEs like VSCode.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 .../conf/fragments/yocto/devtool-ide-sdk.conf | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 meta/conf/fragments/yocto/devtool-ide-sdk.conf
diff mbox series

Patch

diff --git a/meta/conf/fragments/yocto/devtool-ide-sdk.conf b/meta/conf/fragments/yocto/devtool-ide-sdk.conf
new file mode 100644
index 0000000000..9b4b57f009
--- /dev/null
+++ b/meta/conf/fragments/yocto/devtool-ide-sdk.conf
@@ -0,0 +1,26 @@ 
+BB_CONF_FRAGMENT_SUMMARY = "Use devtool ide-sdk for development and remote debugging."
+BB_CONF_FRAGMENT_DESCRIPTION = "\
+This configuration enables the use of devtool ide-sdk. \
+Example usage: \
+  1. bitbake-config-build enable-fragment core/yocto/devtool-ide-sdk \
+     bitbake-config-build enable-fragment core/yocto/root-login-with-empty-password \
+  2. The recipe (my-recipe in this case) must be in IMAGE_INSTALL. \
+  3. Devtool modify --debug-build my-recipe \
+  4. devtool ide-sdk my-recipe core-image-full-cmdline --target root@192.168.7.2' \
+  5. runqemu snapshot \
+  6. code $BUILDDIR/workspace/sources/my-recipe \
+  7. Develop and debug the sources of my-recipe from VSCode remotely on the device. \
+"
+
+# Build the companion debug file system
+IMAGE_GEN_DEBUGFS = "1"
+
+# Optimize build time: with devtool ide-sdk the dbg tar is not needed
+# (if booting the target via NFS is not used for remote debugging)
+IMAGE_FSTYPES_DEBUGFS = ""
+
+# Without copying the binaries into roofs-dbg, GDB does not find all source files.
+IMAGE_CLASSES += "image-combined-dbg"
+
+# Remote debugging needs gdbserver on the target device
+IMAGE_INSTALL:append = " gdbserver"