From 700f9b7e9043801375fd673396f4d4634ae2fb15 Mon Sep 17 00:00:00 2001 From: andylinpersonal Date: Fri, 7 Jun 2024 05:15:45 +0800 Subject: [PATCH] feat(ulp): Generate compile_commands.json for ulp targets This commit adds the generation of the compile_command.json file for ULP and LP core apps. Merges https://github.com/espressif/esp-idf/pull/13926 --- components/ulp/project_include.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/ulp/project_include.cmake b/components/ulp/project_include.cmake index b3e35dca96..b6134042ff 100644 --- a/components/ulp/project_include.cmake +++ b/components/ulp/project_include.cmake @@ -58,7 +58,8 @@ function(ulp_embed_binary app_name s_sources exp_dep_srcs) SOURCE_DIR ${idf_path}/components/ulp/cmake BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${app_name} INSTALL_COMMAND "" - CMAKE_ARGS -DCMAKE_GENERATOR=${CMAKE_GENERATOR} + CMAKE_ARGS -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + -DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FLAG} -DULP_S_SOURCES=$ -DULP_APP_NAME=${app_name}