Skip to content
New issue

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

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

Already on GitHub? # to your account

make/usb_board_reset: define {preflash,term}-delay when necessary #19617

Merged

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented May 18, 2023

Contribution description

When running make info-boards-supported in an application directory, I got several warning from make:

$ make -C examples/hello-world info-boards-supported --no-print-directory 
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:32: warning: overriding recipe for target 'preflash-delay'
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:32: warning: ignoring old recipe for target 'preflash-delay'
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:35: warning: overriding recipe for target 'term-delay'
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:35: warning: ignoring old recipe for target 'term-delay'
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:32: warning: overriding recipe for target 'preflash-delay'
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:32: warning: ignoring old recipe for target 'preflash-delay'
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:35: warning: overriding recipe for target 'term-delay'
/work/riot/RIOT/makefiles/tools/usb_board_reset.mk:35: warning: ignoring old recipe for target 'term-delay'
...

The warnings are also printed with the generate-Makefile.ci target.

It seems the usb_board_reset.mk is included several times which leads to the warning. The idea of this PR is to only define preflash-delay and term_delay when necessary, e.g when a related target is used (flash, flash-only => preflash-delay, term => term-delay).

Testing procedure

Issues/PRs references

This is the reason for #19616, I needed a board that is using a {preflash,term}-delay defined in usb_board_reset.mk.

@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 18, 2023
@github-actions github-actions bot added Area: build system Area: Build system Area: tools Area: Supplementary tools labels May 18, 2023
@riot-ci
Copy link

riot-ci commented May 18, 2023

Murdock results

✔️ PASSED

f25731e make/usb_board_reset: define {preflash,term}-delay when necessary

Success Failures Total Runtime
6930 0 6931 10m:25s

Artifacts

@aabadie
Copy link
Contributor Author

aabadie commented May 19, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented May 19, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 57555ca into RIOT-OS:master May 19, 2023
@aabadie aabadie deleted the pr/makefiles/usb_board_reset_avoid_make_warning branch May 20, 2023 12:47
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: build system Area: Build system Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants