# linuxkerneldev **Repository Path**: liunix61/linuxkerneldev ## Basic Information - **Project Name**: linuxkerneldev - **Description**: Visual Studio Code extension to help find documentation, device tree matching on device driver source code, by compatible strings - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-22 - **Last Updated**: 2021-01-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Embedded Linux Dev Tool to help find documentation and device tree matching on device driver source code, by device tree binding compatible strings. ## Requirements The extension, for now, works only on Linux systems and uses some packages for its correct operation. Before use you must install the following dependencies on your system: - bash - universal-ctags An important detail is to install universal-ctags and not exuberant-ctags. Because exuberant does not index device tree files. For a complete development experience for the Linux kernel development, during the installation of the extension, the following extensions will be required to be installed together: - [DeviceTree](https://marketplace.visualstudio.com/items?itemName=plorefice.devicetree) (syntax highlighting for device-tree .dts e .dtsi files) - [kconfig](https://marketplace.visualstudio.com/items?itemName=luveti.kconfig) (syntax highlighting for Kconfig files) ## Features All features of the extension can be accessed by clicking commands through the activity bar: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/extensionview.gif) In the next topics, I will describe each of the extension features. ### Device Tree Doc From Compatible In a device-tree file, ".dts" or ".dtsi", or in a device driver file ".c", mouse click on a "compatible" string and select the command. VS Code will open the corresponding documentation file for the compatible: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/devicetreetodocview.gif) This functionality can also be selected from the right click context menu: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/devicetreetodoccontext.gif) ### Device Driver From Compatible In a device-tree file, ".dts" or ".dtsi", mouse click on a "compatible" string and select the command. VS Code will match and open the code file, “.c”, from the driver that implements compatible: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/devicetreetodriver.gif) This functionality can also be selected from the right click context menu: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/devicetreetodrivercontext.gif) ### ARM/ARM64 dts/dtsi From Include In a device-tree file, “.dts” or “.dtsi”, mouse click on the string of a device-tree include and select the command. VS Code will open the corresponding file: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/dtsinclude.gif) This functionality can also be selected from the right click context menu: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/dtsincludecontext.gif) There are two options for this command, one for ARM and other for ARM64, because the devices-tree files for each of these archs are on different paths. ### Linux Include From Selected In ".c", ".dts" or ".dtsi" file, mouse click on an include string and select the command. VS Code will open the corresponding include: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/linuxinclude.gif) This functionality can also be selected from the right click context menu: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/linuxincludecontext.gif) ### Generate CTags Last but not least. This functionality generates a “.vscode-ctags” file in the root folder that has been opened. This file is the tag index generated by universal-ctags. This file is required to generate the project code navigation: - Jump to definition: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/ctagstodefinition.gif) - Code completion: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/ctagscodecomplete.gif) - Mouse hover tags: ![](https://raw.githubusercontent.com/microhobby/linuxkerneldev/master/docs/ctagshover.gif) The work here was only possible because of the [Exuberant CTags](https://marketplace.visualstudio.com/items?itemName=chriswheeldon.exuberant-ctags) extension, which I used as a base. Thanks Chris Wheeldon. ## Known Issues None yet. You can open issues on [Github repo](https://github.com/microhobby/linuxkerneldev/issues) ## Release Notes Check the [CHANGELOG.md](https://github.com/microhobby/linuxkerneldev/blob/master/CHANGELOG.md)