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

makefiles: Select suitable terminal when stdio_rtt is used #18528

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Aug 30, 2022

Contribution description

When stdio_rtt is used, the default value of RIOT_TERMINAL (pyterm) with some PORT makes little sense -- the board won't be using that.

Instead, when stdio_rtt is detected, the selected PROGRAMMER is introspected, and the used to pick the corresponding terminal transport.

Testing procedure

  • Pick any board that is used with a debugger and usually runs serial stdio; I picked microbit-v2, and an example that has nice shell (eg. saul)
  • Add lines to the Makefile:
    USEMODULE += stdio_rtt
    
  • make -C examples/saul BOARD=microbit-v2 all flash term

(Note that this is identical to that of #18526 except that no RIOT_TERMINAL is set).

I've tried this with PROGRAMMER values of openocd and pyocd (for which RTT is not implemented, falling back to the pyterm default but issuing a warning); I'd appreciate if someone who uses JLink could test it with that too.

Issues/PRs references

Follow-up for #18526, based on a comment @benpicco left there.

@chrysn chrysn added the Area: build system Area: Build system label Aug 30, 2022
@chrysn chrysn requested review from benpicco and maribu August 30, 2022 08:59
@github-actions github-actions bot added the Area: tools Area: Supplementary tools label Aug 30, 2022
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. Code looks good to me. I cannot provide a test with jlink, but given that it works fine for OpenOCD and the code is analogous, I am very optimistic it would just work.

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Aug 30, 2022
@benpicco benpicco merged commit 62c8ac3 into RIOT-OS:master Aug 30, 2022
@chrysn chrysn deleted the rtt-auto-terminal branch August 30, 2022 14:05
@maribu maribu added this to the Release 2022.10 milestone Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

3 participants