Skip to content

Commit

Permalink
Fix output name of qpg_executable OTA (#17786)
Browse files Browse the repository at this point in the history
This always builds because it uses the wrong filename:

ninja: Entering directory `out/debug'
ninja explain: output build.ninja older than most recent input ../../third_party/connectedhomeip/third_party/qpg_sdk/qpg_executable.gni (1651007143800012937 vs 1651007267243517127)
[0/1] Regenerating ninja files
ninja explain: output lock_app.out.ota doesn't exist
ninja explain: lock_app.out.ota is dirty
[1/2] ACTION //:lock_app.out.ota(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)

Fix the filename (and squelch the output).
  • Loading branch information
mspang authored and pull[bot] committed Aug 4, 2023
1 parent a02f49c commit 4602457
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions third_party/qpg_sdk/qpg_executable.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")

import("${build_root}/toolchain/flashable_executable.gni")
import("${chip_root}/src/platform/device.gni")
import("${dir_pw_build}/python_action.gni")
import("qpg_sdk.gni")

# Run the generator script that takes a .HEX file and adds the OTA header to it.
Expand All @@ -41,7 +43,7 @@ template("gen_ota_header") {
"data_deps",
])

action(target_name) {
pw_python_action(target_name) {
outputs = [ ota_header_script_name ]

args = ota_header_options
Expand Down Expand Up @@ -94,8 +96,10 @@ template("qpg_executable") {

# If OTA requestor is enabled, generate OTA image from HEX
if (chip_enable_ota_requestor) {
ota_image_name = invoker.output_name + ".ota"

gen_ota_header("$executable_target_name.ota") {
ota_header_script_name = "${root_out_dir}/${executable_target_name}.ota"
ota_header_script_name = "${root_out_dir}/${ota_image_name}"
out_dir = rebase_path(root_out_dir, root_build_dir)
ota_header_generator = "${qpg_sdk_root}/Tools/ota/generate_ota_img.py"

Expand Down

0 comments on commit 4602457

Please sign in to comment.