VSCode Extension TCB Can be used with Embedded Linux Dev Extension for Device Tree Overlays?

Hi @matheus.tx!

I am working on a device tree overlay and using a TCB template for the VSCode Extension.

I have been unable to get the links and intellisense etc working for a custom device tree overlay.

In the workspace settings, the bindings point to the device-tree repository containing Toradex Overlays and dtsi’s. I have also rebuilt the Ctags and reloaded the window. but the intellisense and links do not seem to work.

Could you provide any insight on this? I apologize for directly tagging you. I have seen the youtube video but I can not seem to get it working. I am attaching the folder structure and workspace settings in case you require it for an answer.

image

  "ctags.languages": [
    "C",
    "C++",
    "Kconfig",
    "Make"
  ],
  "devicetree.bindings": [
    "${workspaceFolder}/device-trees",
  ]
// #include "device-trees/dts-arm64/imx8mm-verdin.dtsi" // this does not work as somehow the tcb task build cant find it
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

Best Regards.

Hi @geopaxpvtltd !

I forwarded your question to @matheus.tx.

He will check and answer back.

Best regards,

1 Like

Hey @geopaxpvtltd

did you also add the follow in your settings.json:

"kerneldev.experimental.newDtsEngine": true,

Let me know,

Best Regards,

2 Likes

Thank you! it starts working and gives suggestions along with reformatting etc.

But the suggestions are weird.

for example, with the following lines in the overlay, the provided suggestions are generic, that is, based on anything that contains similar keywords in all of the main directory. not essentially related to the verdin-imx8mm. I belive there is an issue with the project structure and the devicetree.bindings setting:

/dts-v1/;
/plugin/;

// #include "device-trees/dts-arm64/imx8mm-verdin.dtsi" // this does not work as somehow the tcb task build cant find it
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
   compatible = "toradex,verdin-imx8mm";
};

/* Verdin I2S_1 */
&sai2 {
   status = "okay";
};
  "ctags.languages": [
    "C",
    "C++",
    "Kconfig",
    "Make"
  ],
  "devicetree.bindings": [
    "${workspaceFolder}/device-trees",
    "${workspaceFolder}/linux/Documentation/devicetree/bindings"
  ],
  "kerneldev.experimental.newDtsEngine": true,

image

image

Sorry for the delay, I get some days off, carnival in Brazil.

Seems to me that the ctags are still working in the device tree. Try to remove the .vscode-ctags file in the root of your project, close and open the VS Code again.

Let me know.

Best Regards