-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Enable flow control in Greentea #6660
Conversation
Flow control is enabled in Greentea for targets that has console-uart-flow-control set.
/morph build |
@marcuschangarm Confirming, this was needed because local testing for the #6547 wasn't working, correct? |
Build : SUCCESSBuild number : 1780 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 1422 |
/morph export-build |
This is pretty grim. Trying to use a serial port both through stdin/stdout, and through a separate And this defeats buffering if set with Can't you just make greentea use stdout? putc/getc, rather than greentea_serial->putc/getc? |
Also, we have platforms that don't use serial for the console, right? We've just done the console redirection for that, and this bypasses it. The greentea client code in principle should work on something other than serial ports. |
@kjbracey-arm This is not related to the patch, however good question! I tracked where this serial console was added, in the original greentea client ARMmbed/greentea-client@ff62371 - main drive to have it in interrupt context. This can be fixed |
Okay, that looks like there was quite a specific requirement to do this raw IRQ-context output. That's now possible as of mbed OS 5.8 by cooperating with mbed_retarget.cpp - you can now do
That is interrupt safe as long as the underlying console is, and the default non-buffered case ( |
Exporter Build : FAILUREBuild number : 1423 |
/morph export-build |
@studavekar Pipe closed failure , please review |
Test : SUCCESSBuild number : 1590 |
Exporter Build : SUCCESSBuild number : 1430 |
@marcuschangarm Could you answer @kjbracey-arm's questions? |
I think refactoring Greentea is out of scope of this PR which only adds flow control to the serial connection already present. |
I'd agree - this patch is safe enough as a fix, as it only activates with a newly-added flag. Messing with it further wouldn't be, so let's just raise an issue for the awkward serial port use. |
Description
Flow control is enabled in Greentea for targets that has
console-uart-flow-control set.
Pull request type
[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change