Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix valgrind invocation when ENABLE_HOST_UARTID is defined #2537

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions Sming/Arch/Host/app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ $(TARGET_OUT_0): $(COMPONENTS_AR)
$(Q) cat $(FW_MEMINFO)

##@Tools
.PHONY: valgrind
valgrind: all ##Run the application under valgrind to detect memory issues. Requires `valgrind` to be installed on the host system.
$(Q) valgrind --track-origins=yes --leak-check=full \
$(foreach id,$(ENABLE_HOST_UARTID),echo '$(call RunHostTerminal,$(id))' >> $@;) \
$(TARGET_OUT_0) $(CLI_TARGET_OPTIONS) -- $(HOST_PARAMETERS)

.PHONY: valgrind
valgrind:
$(Q) RUN_COMMAND_PREFIX="valgrind --track-origins=yes --leak-check=full" $(MAKE) run

RUN_SCRIPT := $(FW_BASE)/run.sh

Expand All @@ -46,7 +44,7 @@ run: all $(RUN_SCRIPT) ##Run the application image
$(RUN_SCRIPT)::
$(Q) echo '#!/bin/bash' > $@; \
$(foreach id,$(ENABLE_HOST_UARTID),echo '$(call RunHostTerminal,$(id))' >> $@;) \
echo '$(TARGET_OUT_0) $(CLI_TARGET_OPTIONS) -- $(HOST_PARAMETERS)' >> $@; \
echo '$(RUN_COMMAND_PREFIX) $(TARGET_OUT_0) $(CLI_TARGET_OPTIONS) -- $(HOST_PARAMETERS)' >> $@; \
chmod a+x $@

##@Flashing
Expand Down