From 8fb5b00f8d76321ee4f3a7938cadfcddb7f00cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Tue, 10 Jun 2025 17:58:50 +0200 Subject: [PATCH] doc: develop: tools: update "Generate compile commands" section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarify that commands should be run from `zephyr` folder. Fixes zephyrproject-rtos/zephyr#90074 Signed-off-by: Benjamin Cabé --- doc/develop/tools/vscode.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/develop/tools/vscode.rst b/doc/develop/tools/vscode.rst index b3f0781b1c8..3fe92de5a0b 100644 --- a/doc/develop/tools/vscode.rst +++ b/doc/develop/tools/vscode.rst @@ -45,13 +45,15 @@ Generate compile commands In order to support code navigation and linting capabilities, you must compile your project once to generate the :file:`compile_commands.json` file that will provide the C/C++ extension with the -required information (ex. include paths): +required information (ex. include paths). You may do it from VS Code embedded terminal; select +:menuselection:`Terminal --> New Terminal` from the top menu or the command palette +(:kbd:`Ctrl+Shift+P`), then type: + +.. code-block:: console + + $ cd zephyr + $ west build -p always -b native_sim/native/64 - .. zephyr-app-commands:: - :zephyr-app: samples/basic/blinky - :board: native_sim/native/64 - :goals: build - :compact: Configure the C/C++ extension *****************************