diff --git a/README.md b/README.md index b3f2c8fa..c84cfc1f 100644 --- a/README.md +++ b/README.md @@ -1,115 +1,264 @@ -# BitBake recipe language support plugin for Visual Studio Code +# BitBake recipe language support in Visual Studio Code -[![vscode-bitbake CI/CD](https://github.com/yoctoproject/vscode-bitbake/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/yoctoproject/vscode-bitbake/actions/workflows/main.yml?query=branch%3Amain) +## Configuration -**For a description of the extension itself, please see [the client's README](./client/README.md)**. +Some advanced features of this extension will need to locate and run BitBake. It can be configured from VSCode's settings. -**It is also possible to use some features of the language server on other editors (Vim, ...). Follow [the server's README](./server/README.md)**. +To access the settings, you can navigate to **Files -> Preferences -> Settings** (or use the shortcut [**Ctrl+,**]). BitBake's settings are under **Extensions**. More options are available to tweak the extension's behavior. -The changelog for the extension can be found [here](./client/CHANGELOG.md). +Here's an example `settings.json` reflecting some default values to run bitbake on your host machine: +```json +{ + "bitbake.pathToBuildFolder": "${workspaceFolder}/build", + "bitbake.pathToEnvScript": "${workspaceFolder}/sources/poky/oe-init-build-env", + "bitbake.pathToBitbakeFolder": "${workspaceFolder}/sources/poky/bitbake", +} +``` -## Installing from [VS Code Extension Marketplace](https://marketplace.visualstudio.com/VSCode) +### BitBake Command wrappers -To install this extension from the VS Code Extension Marketplace, please follow [this guide](https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake). -For more information regarding the Extension Marketplace, please see the [official documentation](https://code.visualstudio.com/docs/editor/extension-gallery). +Various tools provide ways to automatically configure the BitBake environment, or even call it inside containers. The `bitbake.commandWrapper` option allows you to use them through this extension by wrapping around the bitbake invocation. +The resulting commands generated by this extension will be for example: +```shell + $ $commandWrapper "bitbake core-image-minimal" +``` +Or, if `pathToEnvScript` and `pathToBuildFolder` are defined: +```shell + $ $commandWrapper ". $pathToEnvScript $pathToBuildFolder && bitbake core-image-minimal" +``` +You can also control the directory from which they are started by using the `bitbake.workingDirectory` option as well as the shell environment variables with `bitbake.shellEnv`. -## Manual installation +Here are some examples using the most popular bitbake wrappers: +```json +{ + "bitbake.commandWrapper": "docker run --rm -v ${workspaceFolder}:${workspaceFolder} crops/poky --workdir=${workspaceFolder} /bin/bash -c", + "bitbake.pathToEnvScript": "${workspaceFolder}/sources/poky/oe-init-build-env", + "bitbake.pathToBitbakeFolder": "${workspaceFolder}/sources/poky/bitbake" +} +{ + "bitbake.commandWrapper": "kas shell -c", + "bitbake.workingDirectory": "${workspaceFolder}/yocto" +} +{ + "bitbake.commandWrapper": "cqfd run", + "bitbake.shellEnv": { + "CQFD_EXTRA_RUN_ARGS": "-e DISPLAY=:0 -v /tmp/.X11-unix:/tmp/.X11-unix" + } +} +{ "bitbake.commandWrapper": "${workspaceFolder}/build.sh --" } +``` -Manual installation takes place in two steps. The code must be installed via `npm` and subsequently built within Visual Studio Code. Before performing these steps, please ensure you have cloned this repository. +### Defining Multiple Configurations -### Commands +Sometimes it is necessary to build the same project with different distros or +machines configurations. You can define alternative settings for the extension +through the `bitbake.buildConfigurations` array. It can redefine any property +illustrated above, including command wrappers. You'll be able to switch between +them through the status bar at the bottom right. -To install the dependencies: -``` sh -npm install +```json +{ + "bitbake.buildConfigurations": [ + { + "name": "Machine 1", + "pathToBuildFolder": "${workspaceFolder}/build1" + }, + { + "name": "Machine 2", + "pathToBuildFolder": "${workspaceFolder}/build2" + } + ] +} ``` -To compile the typescript files: -``` sh -npm run compile -``` -To clean up the project (This deletes node_modules): -``` sh -npm run clean -``` -For more commands, refer to the `script` section in the root `package.json`. -## Debugging -Press `F5` or navigate to the debug section on the left of the VS Code and select the client or server to to launch the debug client. +![Configuration picker](images/config-picker.png) -## Testing +### Additional settings recommendations -BitBake and Yocto docs are required for some features to work. They need to be fetched before testing and development: -``` sh -npm run fetch:docs -``` -Similar for the command that fetches poky, it needs to be run before running the integration tests: -``` sh -npm run fetch:poky -``` -A wrapper npm script allows running several kinds of tests. To run all tests, use: -``` sh -npm test +If your workspace contains a Yocto build directory, some other extensions may +be hogging lots of resources to parse it's contents and stall your machine. Here are +some example settings to improve your experience (assuming your build directory +is called `build`). You can add them to your `settings.json` file, or your global +user settings. + +```json +{ + "files.watcherExclude": { + "**/build": true + }, + "search.exclude": { + "**/build": true + }, + "C_Cpp.files.exclude": { + "**/build": true + }, + "python.analysis.exclude": [ + "**/build" + ], + "git.repositoryScanIgnoredFolders": [ + "**/build" + ] +} ``` -All the tests mentionned are run in our GitHub CI. -### Linter tests +Note that the extension deactivates the "files.trimTrailingWhitespace" setting for +Python and Shell script, as it interferes with the functioning of features related +to embedded languages. -One can check coding style using -``` sh -npm run lint -``` -Install the recommended extensions to automatically fix linting errors when possible. +## Features + +### Syntax highlighting + +The extension provides syntax highlighting for BitBake recipes, classes, configuration and inc-files. Syntax highlighting also supports embedded languages inside BitBake recipes including inline Python variable expansion, shell code and Python code. + +The BitBake language is automatically detected based on the file extension: +[`.bb`, `.bbappend`, `.bbclass`]. [`.conf`, `.inc`] are also supported but may be used by other tools. + +![Syntax Hilighting](images/highlighting.png) + +### Context-based suggestions + +*CTRL+SPACE* may be used to provide suggestions. For example, typing `inherit` and pressing *CTRL+SPACE* provides the suggestion `inherit kernel`. Suggestions are context-based, only providing suggestions that apply to your specific layer configuration. + +The following suggestions are currently supported: + +* Keywords `inherit`, `require`, `include` and `export` +* Context-based suggestions for keywords `inherit`, `require` and `include` (provided by *language-server*) +* Context-based suggestions for all symbols within the include hierarchy + +![Directive-statements](images/directive-statements.gif) + +### Go to definition +*This feature requires to have properly [configured the extension](#setup-the-extension)* + +*CTRL and click* may be used to open the file associated with a class, inc-file, recipe or variable. If more than one definition exists, a list of definitions is provided. + +The go to definition feature currently behaves as follows: + +| Definition | Target(s) | +| --- | --- | +| class or inc-file | file | +| recipe | recipe definition and all bbappends | +| symbol | all symbols within the include hierarchy | + +![Go-to-definition](images/go-to-definition.gif) + +### Show definitions of BitBake's defined variables on hover +*This feature requires to have properly [configured the extension](#setup-the-extension)* + +Place your cursor over a variable. If it is a BitBake defined variable, then its definition from the documentation will be displayed. + +![Hover](images/hover-information.gif) -### Unit tests +### Other code suggestions +Overrides, variable flags, frequently-used task names and more. -Unit tests are powered by Jest. They allow mocking the behavior of VSCode -and other external libraries. They can individually be run with: -```sh -npm run jest +![Other-suggestions](images/other-suggestions.gif) + + +### BitBake tasks + +BitBake build tasks may be defined through the `tasks.json` file. They allow to build or a run any specific BitBake command on a set of recipes. This feature requires to have properly [configured the extension](#setup-the-extension). Learn how to use VSCode tasks [on the official Visual Studio Code documentation](https://code.visualstudio.com/docs/editor/tasks). + +Here's an example `tasks.json` configuration: +```json +{ + "tasks": [ + { + "label": "Build core-image-minimal", + "type": "bitbake", + "recipes": [ + "core-image-minimal" + ] + } + ] +} ``` -Unit tests are defined in the `__tests__` folders. -If you have installed the recommended extensions, you'll find launch and debug -tasks for the unit tests in the debug section of VSCode. +### BitBake commands + +The extension provides commands and shortcuts to run BitBake tasks. These commands are available in the command palette (`CTRL+SHIFT+P`) and in the editor's contextual menu. + +![Contextual menu](images/contextual-menu.png) + +### BitBake recipes view + +The extension provides a view to display the list of recipes in the current workspace. This view is available in the left panel. You can quickly navigate to a recipe's source or build it by clicking on it. + +![Recipe tree view](images/recipe-view.png) + +### Problems matcher + +By default, this extension will run BitBake in parse only mode in the background on file saves to identify syntax errors. They will be displayed in the problems panel. You can disable this feature through the extension's settings. + +![Problem matcher](images/problems.png) + +### BitBake status bar + +Bitbake parsing status is displayed in the status bar at the bottom of the screen. It will show wether the last BitBake run was successful or not. The BitBake server queues all BitBake commands and runs them sequentially. The status bar will show you if the extension is currently trying to access the bitbake server. -### Grammar tests +![Status bar](images/status-bar.gif) -See [the individual grammar tests README](client/test/grammars/README.md). +### Devtool and eSDK integration -### Integration tests +The recipe's contextual menu provides shortcuts to open new `devtool` and configure the eSDK on a recipe. +Start by right-clicking on a recipe in the recipe tree view, or in the editor's contextual menu and run the command `Bitbake: Devtool: Modify recipe`. +This feature allows you to modify the recipe's source code and rebuild it from within VSCode. +More information and `devtool` and the eSDK in Yocto's [Application Development and the Extensible SDK (eSDK)](https://docs.yoctoproject.org/sdk-manual/) -These tests allow running the BitBake extension in a live VSCode environment. -See [the individual integration tests README](integration-tests/README.md). +Once the workspace is set up, it will appear in the left panel. Use the contextual menu or the action buttons to build, update the recipe, or close ("reset") the workspace. -## Tree-sitter -This extension uses tree-sitter to parse the documents. The `.wasm` file used for creating the parser is generated from latest release at [here](https://github.com/amaanq/tree-sitter-bitbake). +![Devtool Workspace](images/devtool.png) -For more information about the tree-sitter and its CLI, Check out the offical [site](https://tree-sitter.github.io/tree-sitter/) and [npm page](https://www.npmjs.com/package/tree-sitter-cli) +Clicking on the workspace name will open the sources' workspace in a new window. You may edit the sources and generate patches in your Yocto recipes by following the devtool workflow described in [Yocto's documentation](https://docs.yoctoproject.org/sdk-manual/extensible.html#use-devtool-modify-to-modify-the-source-of-an-existing-component): + - Make changes to the sources + - Commit them in the local git repository + - Run the `Bitbake: Devtool: Update recipe` command to generate the patch and update the recipe -## Publishing +You can also set up the SDK for the recipe by running the `Bitbake: Devtool: Configure VSCode SDK` command. This will create `.vscode/settings.json`, `.vscode/tasks.json` and `.vscode/launch.json` configurations to cross-compile, deploy and debug the recipe on a target machine through SSH. You'll need to configure this extension's settings to match your target machine's configuration: + - `bitbake.sdkImage` + - `bitbake.sshTarget` -Publishing is automated via GitHub Actions and reserved to project maintainers. To publish a new version: - - Update all the `package.json` files with the new version number `X.Y.Z`. - - Document new changes in the `client/CHANGELOG.md` file. - - Make sure the `VSCE_PAT` secret is valid in the [GitHub repository settings](https://github.com/yoctoproject/vscode-bitbake/settings/secrets/actions). - - Make sure the `NODE_AUTH_TOKEN` secret is valid in the [GitHub repository settings](https://github.com/yoctoproject/vscode-bitbake/settings/secrets/actions). - - Update the main branch with the latest staging branch. - - Create a [new release on GitHub](https://github.com/yoctoproject/vscode-bitbake/releases/new) with a tag in the format `vX.Y.Z`. - - Admin approval is required to run the GitHub Action. +**Note:** This feature depends on poky versions 5.0 and above (`devtool ide-sdk` command). Some recipe classes may not be supported yet. At the time of writing, CMake and Meson recipes are supported. -The release will be published to the VS Code Marketplace automatically by the GitHub Action. Admin approval is required to run the GitHub Action, and the `VSCE_PAT` must be updated to match a valid token for the `yocto-project` Azure DevOps publisher. See: - - https://code.visualstudio.com/api/working-with-extensions/publishing-extension - - https://code.visualstudio.com/api/working-with-extensions/continuous-integration -The `NODE_AUTH_TOKEN` secret is used to push the language server package to the npm registry. The token must be linked to account with push permission on: - - https://www.npmjs.com/package/language-server-bitbake -The `VSX_PAT` secret is used for VS Codium / Open-VSX. Instructions: - - https://open-vsx.org/extension/yocto-project/yocto-bitbake +If your recipe's class is not supported, or you have an older version of poky, the `Bitbake: Devtool: Configure devtool fallback` command will add tasks to build and deploy the package through `devtool build/deploy-target`. Linting, debugging, testing and other advanced features will not be available in this mode. +### BitBake terminal profile + +If you need to run custom commands not covered by this extension like `devtool add`, `bitbake-layers`, ... +You can open an interactive BitBake terminal through the command `Bitbake: Open BitBake terminal`, the contextual menu on a recipe, or the "Launch Profile" button. This will open a new terminal with the BitBake environment set up. You can then run any BitBake command. + +![BitBake terminal profile](images/bitbake-terminal-profile.png) + +### Recipe scan +This extension can run bitbake commands to parse recipes through context menu, command palette, or whenever a certain managed file is saved. + +Upon saving `.bb`, `.bbappend` and `.inc` files, it runs `bitbake -e` against the corresponding recipe while `bitbake -p` is run for other saved files. The command `Bitbake: Scan recipe` triggers `bitbake -e`. + +You may toggle this behaviour through the setting `bitbake.parseOnSave`. + +The extension will receive additional information about the recipe from the `bitbake -e` command and provide more advanced features such as `Go to definition` for symbols with variable expansion (e.g., `require recipe_${PN}.bb`) and showing the final values of variables (values in the command output) on hover. + +### Toaster +Toaster users may start toaster through the **main context menu** -> **Bitbake** -> **Start toaster in browser**. It will open the web UI in the default browser. Toaster can also be stopped by the command `Bitbake: Stop Toaster`. + +> Note: Toaster requires additional packages and ports. It may not be compatible with all commandWrapper settings. Read the Toaster manual to configure them to have all the required dependencies. + +## Troubleshooting +See the [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) file. + +## Others +This extension currently doesn't provide linting and formatting. Users are advised to install other extensions that have these features. (e.g. [oelint-adv](https://marketplace.visualstudio.com/items?itemName=kweihmann.oelint-vscode)) + +This extension also doesn't support WKS files, you should find another extension such as [openembedded-kickstart](https://marketplace.visualstudio.com/items?itemName=wickscc.openembedded-kickstart) ## Contributing -Development of this extension happens on [GitHub](https://github.com/yoctoproject/vscode-bitbake). -Issues and pull requests are welcome. +### Reporting issues + +User feedback is very welcome on this [extension's repository](https://github.com/yoctoproject/vscode-bitbake). Please report any issues or feature requests you may have with a detailed description of the problem and the steps to reproduce it. + +### Contributing code -## Acknowledgements +Contributions are welcome! Please submit your contributions as pull requests on this [extension's repository](https://github.com/yoctoproject/vscode-bitbake) -* Syntax derived from https://github.com/mholo65/vscode-bitbake, which is licensed under the [MIT License](https://github.com/mholo65/vscode-bitbake/blob/master/LICENSE). +Instructions to build, test and debug the extension are available in the [README-DEVELOPER](./README-DEVELOPER.md). diff --git a/client/TROUBLESHOOTING.md b/TROUBLESHOOTING.md similarity index 100% rename from client/TROUBLESHOOTING.md rename to TROUBLESHOOTING.md diff --git a/client/README.md b/client/README.md deleted file mode 100644 index e1477d57..00000000 --- a/client/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# BitBake recipe language support in Visual Studio Code - -## Configuration - -Some advanced features of this extension will need to locate and run BitBake. It can be configured from VSCode's settings. - -To access the settings, you can navigate to **Files -> Preferences -> Settings** (or use the shortcut [**Ctrl+,**]). BitBake's settings are under **Extensions**. More options are available to tweak the extension's behavior. - -Here's an example `settings.json` reflecting some default values to run bitbake on your host machine: -```json -{ - "bitbake.pathToBuildFolder": "${workspaceFolder}/build", - "bitbake.pathToEnvScript": "${workspaceFolder}/sources/poky/oe-init-build-env", - "bitbake.pathToBitbakeFolder": "${workspaceFolder}/sources/poky/bitbake", -} -``` - -### BitBake Command wrappers - -Various tools provide ways to automatically configure the BitBake environment, or even call it inside containers. The `bitbake.commandWrapper` option allows you to use them through this extension by wrapping around the bitbake invocation. -The resulting commands generated by this extension will be for example: -```shell - $ $commandWrapper "bitbake core-image-minimal" -``` -Or, if `pathToEnvScript` and `pathToBuildFolder` are defined: -```shell - $ $commandWrapper ". $pathToEnvScript $pathToBuildFolder && bitbake core-image-minimal" -``` -You can also control the directory from which they are started by using the `bitbake.workingDirectory` option as well as the shell environment variables with `bitbake.shellEnv`. - -Here are some examples using the most popular bitbake wrappers: -```json -{ - "bitbake.commandWrapper": "docker run --rm -v ${workspaceFolder}:${workspaceFolder} crops/poky --workdir=${workspaceFolder} /bin/bash -c", - "bitbake.pathToEnvScript": "${workspaceFolder}/sources/poky/oe-init-build-env", - "bitbake.pathToBitbakeFolder": "${workspaceFolder}/sources/poky/bitbake" -} -{ - "bitbake.commandWrapper": "kas shell -c", - "bitbake.workingDirectory": "${workspaceFolder}/yocto" -} -{ - "bitbake.commandWrapper": "cqfd run", - "bitbake.shellEnv": { - "CQFD_EXTRA_RUN_ARGS": "-e DISPLAY=:0 -v /tmp/.X11-unix:/tmp/.X11-unix" - } -} -{ "bitbake.commandWrapper": "${workspaceFolder}/build.sh --" } -``` - -### Defining Multiple Configurations - -Sometimes it is necessary to build the same project with different distros or -machines configurations. You can define alternative settings for the extension -through the `bitbake.buildConfigurations` array. It can redefine any property -illustrated above, including command wrappers. You'll be able to switch between -them through the status bar at the bottom right. - -```json -{ - "bitbake.buildConfigurations": [ - { - "name": "Machine 1", - "pathToBuildFolder": "${workspaceFolder}/build1" - }, - { - "name": "Machine 2", - "pathToBuildFolder": "${workspaceFolder}/build2" - } - ] -} -``` - -![Configuration picker](doc/config-picker.png) - -### Additional settings recommendations - -If your workspace contains a Yocto build directory, some other extensions may -be hogging lots of resources to parse it's contents and stall your machine. Here are -some example settings to improve your experience (assuming your build directory -is called `build`). You can add them to your `settings.json` file, or your global -user settings. - -```json -{ - "files.watcherExclude": { - "**/build": true - }, - "search.exclude": { - "**/build": true - }, - "C_Cpp.files.exclude": { - "**/build": true - }, - "python.analysis.exclude": [ - "**/build" - ], - "git.repositoryScanIgnoredFolders": [ - "**/build" - ] -} -``` - -Note that the extension deactivates the "files.trimTrailingWhitespace" setting for -Python and Shell script, as it interferes with the functioning of features related -to embedded languages. - -## Features - -### Syntax highlighting - -The extension provides syntax highlighting for BitBake recipes, classes, configuration and inc-files. Syntax highlighting also supports embedded languages inside BitBake recipes including inline Python variable expansion, shell code and Python code. - -The BitBake language is automatically detected based on the file extension: -[`.bb`, `.bbappend`, `.bbclass`]. [`.conf`, `.inc`] are also supported but may be used by other tools. - -![Syntax Hilighting](doc/highlighting.png) - -### Context-based suggestions - -*CTRL+SPACE* may be used to provide suggestions. For example, typing `inherit` and pressing *CTRL+SPACE* provides the suggestion `inherit kernel`. Suggestions are context-based, only providing suggestions that apply to your specific layer configuration. - -The following suggestions are currently supported: - -* Keywords `inherit`, `require`, `include` and `export` -* Context-based suggestions for keywords `inherit`, `require` and `include` (provided by *language-server*) -* Context-based suggestions for all symbols within the include hierarchy - -![Directive-statements](doc/directive-statements.gif) - -### Go to definition -*This feature requires to have properly [configured the extension](#setup-the-extension)* - -*CTRL and click* may be used to open the file associated with a class, inc-file, recipe or variable. If more than one definition exists, a list of definitions is provided. - -The go to definition feature currently behaves as follows: - -| Definition | Target(s) | -| --- | --- | -| class or inc-file | file | -| recipe | recipe definition and all bbappends | -| symbol | all symbols within the include hierarchy | - -![Go-to-definition](doc/go-to-definition.gif) - -### Show definitions of BitBake's defined variables on hover -*This feature requires to have properly [configured the extension](#setup-the-extension)* - -Place your cursor over a variable. If it is a BitBake defined variable, then its definition from the documentation will be displayed. - -![Hover](doc/hover-information.gif) - -### Other code suggestions -Overrides, variable flags, frequently-used task names and more. - -![Other-suggestions](doc/other-suggestions.gif) - - -### BitBake tasks - -BitBake build tasks may be defined through the `tasks.json` file. They allow to build or a run any specific BitBake command on a set of recipes. This feature requires to have properly [configured the extension](#setup-the-extension). Learn how to use VSCode tasks [on the official Visual Studio Code documentation](https://code.visualstudio.com/docs/editor/tasks). - -Here's an example `tasks.json` configuration: -```json -{ - "tasks": [ - { - "label": "Build core-image-minimal", - "type": "bitbake", - "recipes": [ - "core-image-minimal" - ] - } - ] -} -``` - -### BitBake commands - -The extension provides commands and shortcuts to run BitBake tasks. These commands are available in the command palette (`CTRL+SHIFT+P`) and in the editor's contextual menu. - -![Contextual menu](doc/contextual-menu.png) - -### BitBake recipes view - -The extension provides a view to display the list of recipes in the current workspace. This view is available in the left panel. You can quickly navigate to a recipe's source or build it by clicking on it. - -![Recipe tree view](doc/recipe-view.png) - -### Problems matcher - -By default, this extension will run BitBake in parse only mode in the background on file saves to identify syntax errors. They will be displayed in the problems panel. You can disable this feature through the extension's settings. - -![Problem matcher](doc/problems.png) - -### BitBake status bar - -Bitbake parsing status is displayed in the status bar at the bottom of the screen. It will show wether the last BitBake run was successful or not. The BitBake server queues all BitBake commands and runs them sequentially. The status bar will show you if the extension is currently trying to access the bitbake server. - -![Status bar](doc/status-bar.gif) - -### Devtool and eSDK integration - -The recipe's contextual menu provides shortcuts to open new `devtool` and configure the eSDK on a recipe. -Start by right-clicking on a recipe in the recipe tree view, or in the editor's contextual menu and run the command `Bitbake: Devtool: Modify recipe`. -This feature allows you to modify the recipe's source code and rebuild it from within VSCode. -More information and `devtool` and the eSDK in Yocto's [Application Development and the Extensible SDK (eSDK)](https://docs.yoctoproject.org/sdk-manual/) - -Once the workspace is set up, it will appear in the left panel. Use the contextual menu or the action buttons to build, update the recipe, or close ("reset") the workspace. - -![Devtool Workspace](doc/devtool.png) - -Clicking on the workspace name will open the sources' workspace in a new window. You may edit the sources and generate patches in your Yocto recipes by following the devtool workflow described in [Yocto's documentation](https://docs.yoctoproject.org/sdk-manual/extensible.html#use-devtool-modify-to-modify-the-source-of-an-existing-component): - - Make changes to the sources - - Commit them in the local git repository - - Run the `Bitbake: Devtool: Update recipe` command to generate the patch and update the recipe - -You can also set up the SDK for the recipe by running the `Bitbake: Devtool: Configure VSCode SDK` command. This will create `.vscode/settings.json`, `.vscode/tasks.json` and `.vscode/launch.json` configurations to cross-compile, deploy and debug the recipe on a target machine through SSH. You'll need to configure this extension's settings to match your target machine's configuration: - - `bitbake.sdkImage` - - `bitbake.sshTarget` - -**Note:** This feature depends on poky versions 5.0 and above (`devtool ide-sdk` command). Some recipe classes may not be supported yet. At the time of writing, CMake and Meson recipes are supported. - -If your recipe's class is not supported, or you have an older version of poky, the `Bitbake: Devtool: Configure devtool fallback` command will add tasks to build and deploy the package through `devtool build/deploy-target`. Linting, debugging, testing and other advanced features will not be available in this mode. - -### BitBake terminal profile - -If you need to run custom commands not covered by this extension like `devtool add`, `bitbake-layers`, ... -You can open an interactive BitBake terminal through the command `Bitbake: Open BitBake terminal`, the contextual menu on a recipe, or the "Launch Profile" button. This will open a new terminal with the BitBake environment set up. You can then run any BitBake command. - -![BitBake terminal profile](doc/bitbake-terminal-profile.png) - -### Recipe scan -This extension can run bitbake commands to parse recipes through context menu, command palette, or whenever a certain managed file is saved. - -Upon saving `.bb`, `.bbappend` and `.inc` files, it runs `bitbake -e` against the corresponding recipe while `bitbake -p` is run for other saved files. The command `Bitbake: Scan recipe` triggers `bitbake -e`. - -You may toggle this behaviour through the setting `bitbake.parseOnSave`. - -The extension will receive additional information about the recipe from the `bitbake -e` command and provide more advanced features such as `Go to definition` for symbols with variable expansion (e.g., `require recipe_${PN}.bb`) and showing the final values of variables (values in the command output) on hover. - -### Toaster -Toaster users may start toaster through the **main context menu** -> **Bitbake** -> **Start toaster in browser**. It will open the web UI in the default browser. Toaster can also be stopped by the command `Bitbake: Stop Toaster`. - -> Note: Toaster requires additional packages and ports. It may not be compatible with all commandWrapper settings. Read the Toaster manual to configure them to have all the required dependencies. - -## Troubleshooting -See the [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) file. - -## Others -This extension currently doesn't provide linting and formatting. Users are advised to install other extensions that have these features. (e.g. [oelint-adv](https://marketplace.visualstudio.com/items?itemName=kweihmann.oelint-vscode)) - -This extension also doesn't support WKS files, you should find another extension such as [openembedded-kickstart](https://marketplace.visualstudio.com/items?itemName=wickscc.openembedded-kickstart) -## Contributing - -### Reporting issues - -User feedback is very welcome on this [extension's repository](https://github.com/yoctoproject/vscode-bitbake). Please report any issues or feature requests you may have with a detailed description of the problem and the steps to reproduce it. - -### Contributing code - -Contributions are welcome! Please submit your contributions as pull requests on this [extension's repository](https://github.com/yoctoproject/vscode-bitbake) - -Instructions to build, test and debug the extension are available in the [root README](../README.md). diff --git a/client/doc/overrides.gif b/client/doc/overrides.gif deleted file mode 100644 index 153f48d4..00000000 Binary files a/client/doc/overrides.gif and /dev/null differ diff --git a/client/doc/variable-flags.gif b/client/doc/variable-flags.gif deleted file mode 100644 index 36ee753b..00000000 Binary files a/client/doc/variable-flags.gif and /dev/null differ diff --git a/client/doc/yocto-tasks.gif b/client/doc/yocto-tasks.gif deleted file mode 100644 index 0d5261ce..00000000 Binary files a/client/doc/yocto-tasks.gif and /dev/null differ diff --git a/client/doc/bitbake-terminal-profile.png b/images/bitbake-terminal-profile.png similarity index 100% rename from client/doc/bitbake-terminal-profile.png rename to images/bitbake-terminal-profile.png diff --git a/client/doc/config-picker.png b/images/config-picker.png similarity index 100% rename from client/doc/config-picker.png rename to images/config-picker.png diff --git a/client/doc/contextual-menu.png b/images/contextual-menu.png similarity index 100% rename from client/doc/contextual-menu.png rename to images/contextual-menu.png diff --git a/client/doc/devtool.png b/images/devtool.png similarity index 100% rename from client/doc/devtool.png rename to images/devtool.png diff --git a/client/doc/directive-statements.gif b/images/directive-statements.gif similarity index 100% rename from client/doc/directive-statements.gif rename to images/directive-statements.gif diff --git a/client/doc/go-to-definition.gif b/images/go-to-definition.gif similarity index 100% rename from client/doc/go-to-definition.gif rename to images/go-to-definition.gif diff --git a/client/doc/highlighting.png b/images/highlighting.png similarity index 100% rename from client/doc/highlighting.png rename to images/highlighting.png diff --git a/client/doc/hover-information.gif b/images/hover-information.gif similarity index 100% rename from client/doc/hover-information.gif rename to images/hover-information.gif diff --git a/client/doc/other-suggestions.gif b/images/other-suggestions.gif similarity index 100% rename from client/doc/other-suggestions.gif rename to images/other-suggestions.gif diff --git a/client/doc/problems.png b/images/problems.png similarity index 100% rename from client/doc/problems.png rename to images/problems.png diff --git a/client/doc/recipe-view.png b/images/recipe-view.png similarity index 100% rename from client/doc/recipe-view.png rename to images/recipe-view.png diff --git a/client/doc/status-bar.gif b/images/status-bar.gif similarity index 100% rename from client/doc/status-bar.gif rename to images/status-bar.gif