From: Adrian Freihofer <[email protected]>

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 <[email protected]>
---
 .../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 --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..ca0269543b
--- /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 
[email protected]' \
+  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. \
+\
+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 = "" \
+"
+
+# Build the companion debug file system
+IMAGE_GEN_DEBUGFS = "1"
+
+# 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"
-- 
2.52.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#228659): 
https://lists.openembedded.org/g/openembedded-core/message/228659
Mute This Topic: https://lists.openembedded.org/mt/116996289/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to