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.
This also includes the EXTRA_IMAGE_FEATURES from root-login-with-exmpty-password.conf. Ideally there would be a possibility to define fragment dependencies, so that this fragment could just depend on that one instead of duplicating the content here. Signed-off-by: Adrian Freihofer <[email protected]> --- .../conf/fragments/yocto/devtool-ide-sdk.conf | 32 +++++++++++++++++++ 1 file changed, 32 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..4e09eb82a5 --- /dev/null +++ b/meta/conf/fragments/yocto/devtool-ide-sdk.conf @@ -0,0 +1,32 @@ +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. The recipe (my-recipe in this case) must be in IMAGE_INSTALL. \ + 2. Devtool modify --debug-build my-recipe \ + 3. devtool ide-sdk my-recipe core-image-full-cmdline --target [email protected]' \ + 4. runqemu snapshot \ + 5. code $BUILDDIR/workspace/sources/my-recipe \ + 6. 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" + +# SSH is mandatory, no password simplifies the usage +EXTRA_IMAGE_FEATURES += "\ + ssh-server-openssh \ + allow-empty-password \ + allow-root-login \ + empty-root-password \ +" + +# 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 (#228576): https://lists.openembedded.org/g/openembedded-core/message/228576 Mute This Topic: https://lists.openembedded.org/mt/116962329/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
