summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-02-11 23:06:38 +0700
committerhathach <[email protected]>2026-02-11 23:30:14 +0700
commitcec0ee53f60ed28d7c324f40cbebd0b677d94eb1 (patch)
tree1683fd1ab08af0e7cea377f8865845e3ec0918f9
parent8c9901c31892e9213acc52538cc56c7cb24883b0 (diff)
make membrowse command more visible
-rw-r--r--.github/workflows/build_util.yml1
-rw-r--r--hw/bsp/family_support.cmake20
2 files changed, 10 insertions, 11 deletions
diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml
index 1a119b132..595129443 100644
--- a/.github/workflows/build_util.yml
+++ b/.github/workflows/build_util.yml
@@ -83,6 +83,7 @@ jobs:
env:
MEMBROWSE_API_KEY: ${{ secrets.MEMBROWSE_API_KEY }}
run: |
+ # if code-changed is false --> there is no elf -> membrowse target upload with --indetical flag
BUILD_PY_ARGS="-s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }}"
python tools/build.py $BUILD_PY_ARGS --target examples-membrowse-upload -j 1 ${{ matrix.arg }}
shell: bash
diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake
index 80ebb7bef..0130fb656 100644
--- a/hw/bsp/family_support.cmake
+++ b/hw/bsp/family_support.cmake
@@ -316,35 +316,33 @@ for symbol in $ld_symbols; do \
ld_defs=\"$ld_defs --def $symbol\"; \
done; \
ld_defs=\"$(echo \"$ld_defs\" | xargs)\"")
-
- set(MEMBROWSE_CMD
+ set(MEMBROWSE_PREPARE_CMD
"if [ -f \"${TARGET_ELF_PATH}\" ]; then \
${MEMBROWSE_LD_SCRIPTS_CMD}; \
${MEMBROWSE_LD_DEFS_CMD}; \
- echo ld_scripts=\"$ld_scripts\"; \
- echo ld_defs=\"$ld_defs\"; \
if [ \"$MEMBROWSE_UPLOAD\" = \"1\" ]; then \
- ${MEMBROWSE_EXE} report ${OPTION} \"${TARGET_ELF_PATH}\" \"$ld_scripts\" $ld_defs --upload --github --target-name ${FAMILY}/${BOARD}/${TARGET} --api-key $ENV{MEMBROWSE_API_KEY}; \
+ MEMBROWSE_CMD=\"${MEMBROWSE_EXE} report ${OPTION} \\\"${TARGET_ELF_PATH}\\\" \\\"$ld_scripts\\\" $ld_defs --upload --github --target-name ${FAMILY}/${BOARD}/${TARGET} --api-key $ENV{MEMBROWSE_API_KEY}\"; \
else \
- ${MEMBROWSE_EXE} report ${OPTION} \"${TARGET_ELF_PATH}\" \"$ld_scripts\" $ld_defs; \
+ MEMBROWSE_CMD=\"${MEMBROWSE_EXE} report ${OPTION} \\\"${TARGET_ELF_PATH}\\\" \\\"$ld_scripts\\\" $ld_defs\"; \
fi; \
else \
if [ \"$MEMBROWSE_UPLOAD\" = \"1\" ]; then \
- ${MEMBROWSE_EXE} report ${OPTION} --identical --upload --github --target-name ${FAMILY}/${BOARD}/${TARGET} --api-key $ENV{MEMBROWSE_API_KEY}; \
+ MEMBROWSE_CMD=\"${MEMBROWSE_EXE} report ${OPTION} --identical --upload --github --target-name ${FAMILY}/${BOARD}/${TARGET} --api-key $ENV{MEMBROWSE_API_KEY}\"; \
else \
- ${MEMBROWSE_EXE} report ${OPTION} --identical; \
+ MEMBROWSE_CMD=\"${MEMBROWSE_EXE} report ${OPTION} --identical\"; \
fi; \
-fi")
+fi; \
+echo \"$MEMBROWSE_CMD\"")
add_custom_target(${TARGET}-membrowse
DEPENDS ${TARGET}
- COMMAND ${CMAKE_COMMAND} -E env MEMBROWSE_UPLOAD=0 bash -lc "${MEMBROWSE_CMD}"
+ COMMAND ${CMAKE_COMMAND} -E env MEMBROWSE_UPLOAD=0 bash -lc "${MEMBROWSE_PREPARE_CMD}; eval \"$MEMBROWSE_CMD\""
VERBATIM
)
set_property(TARGET ${TARGET}-membrowse PROPERTY FOLDER ${TARGET})
add_custom_target(${TARGET}-membrowse-upload
- COMMAND ${CMAKE_COMMAND} -E env MEMBROWSE_UPLOAD=1 bash -lc "${MEMBROWSE_CMD}"
+ COMMAND ${CMAKE_COMMAND} -E env MEMBROWSE_UPLOAD=1 bash -lc "${MEMBROWSE_PREPARE_CMD}; eval \"$MEMBROWSE_CMD\""
VERBATIM
)