Hi Karlo

Did you already gave devtool ide-sdk a try? It's documented
here: 
https://docs.yoctoproject.org/sdk-manual/extensible.html#devtool-ide-sdk-configures-ides-for-the-extensible-sdk.
[1]

The idea is to provide an easy to use command which can generate an IDE
configuration similar to what your repository provides. I think, in
comparison to the configuration in your repository the generated
configuration files have some advantages:
- For cmake and meson the generated configuration allows to by-pass
bitbake. It's about calling cmake/meson and ninja/make directly. This
is much quicker and comes with much better IDE integration than calling
bitbake or devtool does.
- Calling "devtool build" is the fallback mode for recipes which are
not based on cmake or meson. That means devtool ide-sdk should work
very similar as your static configuration does e.g. for u-boot or arm
trusted firmware. Supporting other build tools than cmake or meson is
on my too long ToDo list.

devtool ide-sdk supports VSCode as well as generic script based IDEs.
For VSCode devtool ide-sdk recommends some extensions, depending on the
recipe type. For details you might want to look at the lines
after 
https://git.yoctoproject.org/poky/tree/scripts/lib/devtool/ide_plugins/ide_code.py#n160.
[2] I guess we could also offer a more open source only configuration
as an option. In general different IDEs are supported via plugins. This
would also allow to have a vscode and a vscodium plugin where the
vscode plugin recommends closed and open plugins and the vscodium
plugin recommends only open plugins.

So far there is no support for openocd e.g. for kernel or u-boot. But
this would be a very nice improvement for devtool ide-sdk. Devtool ide-
sdk could be extended to support the u-boot or the kernel recipes in a
more advanced way as your static configuration already does. For a
generic approach to generate an openocd configuration there should
probably be one part of the configuration which is defined per machine
and one part which is generated per recipe (u-boot or kernel).


Please be aware that if you have VSCode installed and do ". oe-init-
build-env" a .vscode/settings.json file gets generated (check is
here: https://git.yoctoproject.org/poky/tree/oe-init-build-env#n52, the
generator script is
here: https://git.yoctoproject.org/poky/tree/scripts/oe-setup-vscode).
[3] This is conflicting with the recommendation of copying a
settings.json file from your repository. But when using VSCode with
Yocto, it's very important to configure some plugins indexers to not
index the build folder. Otherwise VSCode keeps your CPU busy until it
gets terminated by an OOM exception.

In general, I think that copying a static configuration for VSCode
should not become the new recommended way for Yocto since we already
have a more generic, more convenient and more extendable implementation
in place. I'm interested in your opinion about devtool ide-sdk and I'm
happy to support you with contributions to devtool ide-sdk e.g. for
openocd. 

Thank you for sharing this!
Regards,
Adrian



On Fri, 2024-10-18 at 09:21 -0700, karlo.strize.linux via
lists.yoctoproject.org wrote:
> Hi,
>  
> I have created the instructions for setting up Visual Studio Code
> (VSCodium) for a 100% open source IDE experience that supports full
> code indexing, autocompletion and debugging:
> https://github.com/kstrize/embedded_ide
>  
> On my first Yocto project, I couldn't find a beginner friendly IDE
> setup.
> I was mainly interested in indexation of the Linux kernel, u-boot and
> arm-trusted-firmware and being able to debug it.
> At the end I don't know how beginner friendly it really is, but I'm
> posting it here if anyone finds use for it or if anyone has feedback
> to improve it.
>  
> Best regards,
> Karlo
> 
> 
> 


[1] 
https://docs.yoctoproject.org/sdk-manual/extensible.html#devtool-ide-sdk-configures-ides-for-the-extensible-sdk.
    
https://docs.yoctoproject.org/sdk-manual/extensible.html#devtool-ide-sdk-configures-ides-for-the-extensible-sdk
[2] 
https://git.yoctoproject.org/poky/tree/scripts/lib/devtool/ide_plugins/ide_code.py#n160.
    
https://git.yoctoproject.org/poky/tree/scripts/lib/devtool/ide_plugins/ide_code.py#n160
[3] https://git.yoctoproject.org/poky/tree/scripts/oe-setup-vscode).
    https://git.yoctoproject.org/poky/tree/scripts/oe-setup-vscode
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64050): https://lists.yoctoproject.org/g/yocto/message/64050
Mute This Topic: https://lists.yoctoproject.org/mt/109085158/21656
Mute #github:https://lists.yoctoproject.org/g/yocto/mutehashtag/github
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to