-
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
Make ESP8266 compatible with bare metal profile #12022
Conversation
@@ -272,14 +271,15 @@ bool ESP8266::reset(void) | |||
continue; | |||
} | |||
|
|||
_rmutex.lock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting this as PlatformMutex would be the right solution. Scratch that. RTOS Mutex is rendered out in brametal builds. This code should be kept.
@anttiylitokola, thank you for your changes. |
@@ -428,7 +428,6 @@ class ESP8266 { | |||
PinName _serial_rts; | |||
PinName _serial_cts; | |||
rtos::Mutex _smutex; // Protect serial port access | |||
rtos::Mutex _rmutex; // Reset protection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is _rmutex
removed while _smutex
can stay? I thought that "bare-metal" means "no RTOS", means no thread synchronisation mechanisms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I helped prepare this.
_rmutex
wasn't doing anything, as far as I can see. It was a remnant of the also-redundant condition variable bits for reset, which seemed to be imagining some other thread running OOB handlers.
The piece of code waiting for reset is inside _smutex
, so it all happens synchronously, blocking inside that code.
started CI |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@0xc0170 can we target for 5.15.1 ? cc: @JanneKiiskila |
@fabiomadu @adbridge - yes, we would need this in the soonest, if possible. |
@@ -30,7 +30,9 @@ | |||
#include "features/netsocket/WiFiAccessPoint.h" | |||
#include "features/netsocket/WiFiInterface.h" | |||
#include "platform/Callback.h" | |||
#if MBED_CONF_RTOS_PRESENT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? same MACRO guardian is already in that header file. And if the header file does not compile as such (includes rtos headers outside MACRO) those headers should be moved inside MBED_CONF_RTOS_PRESENT macro.
@0xc0170 No tests checked in this PR and no comment on Documentation? These should have been corrected before merging.... |
Any releases from 5.15 will be at the discretion of the project management as there are no 'planned' patch releases from this branch... |
@bulislaw FYI |
Lets pull it in the next patch. Low risk of breaking something. |
Ask for 5.15.1, @adbridge . |
Summary of changes
Make ESP8266 driver compatible with bare metal profile.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers
@yogpan01, @kjbracey-arm, @VeijoPesonen, @AnttiKauppila