-
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
Fix serial stdio - add new get_stdio_serial() #2466
Conversation
This should fix #2454 |
62e488f
to
835cf1d
Compare
Fixing failures (the last rebased somehow squashed first 2 commits), will fix |
835cf1d
to
2e2d231
Compare
Serial& get_stdio_serial() | ||
{ | ||
static bool stdio_uart_inited = false; | ||
static Serial stdio_serial(STDIO_UART_TX, STDIO_UART_RX); |
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.
Unfortunately, C++ is very terrible at garbage-collecting globally-allocated non-pod objects. It may not be much of a concern here, since we expect almost all devices to have stdio, but if a device never calls a serial function, this static Serial
declaration will cause the entire serial codebase to get dragged into the final image.
This is what SingletonPtr
was trying to solve, but it unfortunately doesn't support non-default constructors.
If we want to avoid the class leak, we can use a static buffer with placement new. This also avoid multiple initialization flags introduced by the static constructor. It's ugly, but significantly reduces poorly-defined behaviour from my experience:
static bool stdio_inited = false;
static unsigned stdio_uart[(sizeof(Serial)+sizeof(unsigned)-1)/sizeof(unsigned)];
if (!stdio_inited) {
new (stdio_uart) Serial(STDIO_UART_TX, STDIO_UART_RX);
#if MBED_CONF_CORE_STDIO_BAUD_RATE
reinterpret_cast<Serial*>(stdio_uart)->baud(MBED_CONF_CORE_STDIO_BAUD_RATE);
#endif
stdio_inited = true;
}
return reinterpret_cast<Serial*>(stdio_uart);
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.
Unfortunately, C++ is very terrible at garbage-collecting globally-allocated non-pod objects. It may not be much of a concern here, since we expect almost all devices to have stdio, but if a device never calls a serial function, this static Serial declaration will cause the entire serial codebase to get dragged into the final image.
I am not certain this is a case. It's not in the local scope. I just tested both solutions, this solution and with placement new, the only difference for IAR was a static guard added for this one (as you noted, one static guards are present). I'll update it to the placement new, thanks for the tip, as it saves some memory (see my commit for more info)
@0xc0170 I don't believe that this can replace #2454 completely because greentea and utest are using |
We can gracefully deprecate // in PinNames.h
typedef enum {
USBTX = PB_10,
USBRX = PB_11,
} DeprecatedPinName;
// in Serial.h
MBED_DEPRECATED("`Serial pc(USBTX,USBRX)` is deprecated, please use stdio directly")
Serial(DeprecatedPinName tx, DeprecatedPinName rx)
: Serial((PinName)tx, (PinName)rx) {
}
Serial(PinName tx, PinName rx) {
bablabla;
} |
It needs to - we have to figure it out how to fix it once for all. We need to clean up the diff between Serial and RawSerial. I chose Serial here (I considered to return I would propose for greentea/utest to use RawSerial for now, but we dont garantee that they get initialazed properly , as it is now. The apps that use Serial pc(), should switch, and RawSerial will follow.
That could be, but as you noted takes lot of refactoring. Leets see if we can come up with something better. |
+1 for this! |
Would prefer we use SingletonPtr and update SerialBase (or the class name a cleanup resolves to) with an initialization list and default constructor. Maybe think about how deferring pin assignments (if needed) and allowing to change them. |
Adding a new function that is in a global scope, returns a reference to Serial object. There's one Serial stdio object, that is initialized once (uses conf baud rate if configured). An app should use this object to configure stdio peripheral.
This is not required for each HAL to do, as retarget contains all what is required. It defines serial singleton object, and should be initialized only once.
we do not need to check if stdio is initialized, retarget does that, thus invoke putc().
2e2d231
to
efea142
Compare
Use placement new for Serial with locking. Compare to scott mayer's singleton, as it was implemented, saves guard variable + code around guards (for IAR it's 4 bytes RAM and 96 bytes ROM - high optimization enabled).
49c272e
to
8db5b87
Compare
I fixed the bad rebase, changed to placement new as it saves some memory. I'll run some tests, was running KL25Z locally with IAR and uvision today.
I don't see any benefit for that pattern for this one. Serial and SerialBase would not make sense without pin arguments (leads to errors), plus One question still remains - RawSerial and Serial for stdio. Should we solve it within this PR. if yes, then how? I can't think of anything that is not breaking, thus would like to do it as a separate step. |
Probably not, since that's potentially an API-breaking change, so it deserves its own PR.
|
Note: as we are merging some new targets, there are conflicts, once this approved (at least two +1), I'll rebase, until then, conflicts are allowed :-) @bogdanm Thanks, thus you agree that this is fine as it is (having a function to return Ideas? |
Yup, returning a |
@0xc0170 For the reasons I specified above, we can't use We should probably be refactoring the tests that print in interrupts, but that will take non-trivial changes. In the meantime I wanted to solve #2454. When this is merged and the tests are refactored, then I can submit another PR to take advantage of this new API and actually share the stdio Serial instance. |
@bridadan I am aware of those, yes this does not cover all use cases. What we can do here, to add a comment/note to RawSerial, if that class is used for stdio, there's no guarantee for proper configuration of stdio, and state there that this new function should be used? |
* | ||
* @returns stdio object | ||
*/ | ||
Serial& get_stdio_serial(); |
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.
Small question, should this be a reference? This could confuse the ownership of the Serial object, and I'm not sure what the benefit is over Serial*
.
With Serial&
it's easy to accidentally do this:
void maximize_baud() {
Serial s = get_stdio_serial();
s.baud(96000000);
// s's destructor is called, possibly deinitializing serial
}
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 believe it should be a reference, a pointer might be NULL
, a reference is never null.
Your question leverage another one, why the Serial
class is copy constructible ?
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.
With Serial& it's easy to accidentally do this:
That's a user error, we can protect it as @pan- highlighted it's about copy ctor. I'll have a look at it
I don't know if it helps, but both |
It sounds like stdio needs to be interrupt safe, at least temporarily. Is it possible to avoid malloc / synchronization in printf when in interrupt context? |
@geky Yes it can, just assign a static buffer to the stream with |
How big buffer to allocate by default? As we have now the config, it could be configurable. What do you guys think about this? |
@0xc0170 if we're not proceeding with this for now lets close and reopen when a plan is in place for stdio UART. There are consequences for devices with one UART. |
…..d207f4d d207f4d Merge branch 'release_internal' into release_external d166c89 MPL: buffered max limit increased to 8k (ARMmbed#2482) 0f6666a Fixed Unit test's 1ff9b1d LLC drop a packet if FHSS shedule is not configured. 7cecc28 Fixed missing asynch trigle setup stop at if down process 7a8b2bf Wi-SUN fhss API default value setting fixes 164a370 Fixed coverity issues from management API 8b5b433 Corrected out of bounds access coverity warning (ARMmbed#2475) 4ffe6a1 Multicast forwarding is separated from the routing flag 30f4315 Wi-SUN discovery staten enter upxdate 083b84e Iotthd 4308 (ARMmbed#2473) fcc33d5 Removed time increment from NVM time read function on interface up 9c8e3af fhss_tx_handle update 5491a6b Fixed UFSI update print function (ARMmbed#2470) 86f64c5 FHSS WS: Check if BC schedule is stopped before computing timeout delay (ARMmbed#2469) a0b112a Corrected defects and coding style 2f4678a Corrected trace macro 5e96751 Distributed key storage NVM writes to longer time period 9b3891f FHSS WS: handle blocked interrupts (ARMmbed#2466) a792e83 Added validation at MAC ack buffer handler 2a465b2 DNS configuration lifetime validation git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: d207f4d
…9d9e24..715ae9a 715ae9a Merge remote-tracking branch 'origin/release_internal' into release_external 42c9807 Nanostak trace level configuration (ARMmbed#2489) 6f52171 Bug fix: socket reference count made 16-bit (ARMmbed#2490) f51669a Bug fix: Do not print UFSI drift when fixed channel is used (ARMmbed#2488) 18fa048 RPL DAO timeout update: 660e178 Clear debug traces. cbac0bb DIO init send block for node fed5d1c Created different MPL configuration based on network size 7ad7e81 Wi-SUN recovery and BR BSI update: d207f4d Merge branch 'release_internal' into release_external d166c89 MPL: buffered max limit increased to 8k (ARMmbed#2482) 0f6666a Fixed Unit test's 1ff9b1d LLC drop a packet if FHSS shedule is not configured. 7cecc28 Fixed missing asynch trigle setup stop at if down process 7a8b2bf Wi-SUN fhss API default value setting fixes 164a370 Fixed coverity issues from management API 8b5b433 Corrected out of bounds access coverity warning (ARMmbed#2475) 4ffe6a1 Multicast forwarding is separated from the routing flag 30f4315 Wi-SUN discovery staten enter upxdate 083b84e Iotthd 4308 (ARMmbed#2473) fcc33d5 Removed time increment from NVM time read function on interface up 9c8e3af fhss_tx_handle update 5491a6b Fixed UFSI update print function (ARMmbed#2470) 86f64c5 FHSS WS: Check if BC schedule is stopped before computing timeout delay (ARMmbed#2469) a0b112a Corrected defects and coding style 2f4678a Corrected trace macro 5e96751 Distributed key storage NVM writes to longer time period 9b3891f FHSS WS: handle blocked interrupts (ARMmbed#2466) a792e83 Added validation at MAC ack buffer handler 2a465b2 DNS configuration lifetime validation git-subtree-dir: connectivity/nanostack/sal-stack-nanostack git-subtree-split: 715ae9a
…..715ae9a 715ae9a Merge remote-tracking branch 'origin/release_internal' into release_external 42c9807 Nanostak trace level configuration (ARMmbed#2489) 6f52171 Bug fix: socket reference count made 16-bit (ARMmbed#2490) f51669a Bug fix: Do not print UFSI drift when fixed channel is used (ARMmbed#2488) 18fa048 RPL DAO timeout update: 660e178 Clear debug traces. cbac0bb DIO init send block for node fed5d1c Created different MPL configuration based on network size 7ad7e81 Wi-SUN recovery and BR BSI update: d207f4d Merge branch 'release_internal' into release_external d166c89 MPL: buffered max limit increased to 8k (ARMmbed#2482) 0f6666a Fixed Unit test's 1ff9b1d LLC drop a packet if FHSS shedule is not configured. 7cecc28 Fixed missing asynch trigle setup stop at if down process 7a8b2bf Wi-SUN fhss API default value setting fixes 164a370 Fixed coverity issues from management API 8b5b433 Corrected out of bounds access coverity warning (ARMmbed#2475) 4ffe6a1 Multicast forwarding is separated from the routing flag 30f4315 Wi-SUN discovery staten enter upxdate 083b84e Iotthd 4308 (ARMmbed#2473) fcc33d5 Removed time increment from NVM time read function on interface up 9c8e3af fhss_tx_handle update 5491a6b Fixed UFSI update print function (ARMmbed#2470) 86f64c5 FHSS WS: Check if BC schedule is stopped before computing timeout delay (ARMmbed#2469) a0b112a Corrected defects and coding style 2f4678a Corrected trace macro 5e96751 Distributed key storage NVM writes to longer time period 9b3891f FHSS WS: handle blocked interrupts (ARMmbed#2466) a792e83 Added validation at MAC ack buffer handler 2a465b2 DNS configuration lifetime validation git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 715ae9a
…..715ae9a 715ae9a Merge remote-tracking branch 'origin/release_internal' into release_external 42c9807 Nanostak trace level configuration (ARMmbed#2489) 6f52171 Bug fix: socket reference count made 16-bit (ARMmbed#2490) f51669a Bug fix: Do not print UFSI drift when fixed channel is used (ARMmbed#2488) 18fa048 RPL DAO timeout update: 660e178 Clear debug traces. cbac0bb DIO init send block for node fed5d1c Created different MPL configuration based on network size 7ad7e81 Wi-SUN recovery and BR BSI update: d207f4d Merge branch 'release_internal' into release_external d166c89 MPL: buffered max limit increased to 8k (ARMmbed#2482) 0f6666a Fixed Unit test's 1ff9b1d LLC drop a packet if FHSS shedule is not configured. 7cecc28 Fixed missing asynch trigle setup stop at if down process 7a8b2bf Wi-SUN fhss API default value setting fixes 164a370 Fixed coverity issues from management API 8b5b433 Corrected out of bounds access coverity warning (ARMmbed#2475) 4ffe6a1 Multicast forwarding is separated from the routing flag 30f4315 Wi-SUN discovery staten enter upxdate 083b84e Iotthd 4308 (ARMmbed#2473) fcc33d5 Removed time increment from NVM time read function on interface up 9c8e3af fhss_tx_handle update 5491a6b Fixed UFSI update print function (ARMmbed#2470) 86f64c5 FHSS WS: Check if BC schedule is stopped before computing timeout delay (ARMmbed#2469) a0b112a Corrected defects and coding style 2f4678a Corrected trace macro 5e96751 Distributed key storage NVM writes to longer time period 9b3891f FHSS WS: handle blocked interrupts (ARMmbed#2466) a792e83 Added validation at MAC ack buffer handler 2a465b2 DNS configuration lifetime validation git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 715ae9a
…..3183d87 3183d87 Merge branch 'release_internal' into release_external 9e27a77 Disabled BR IID verify from DODAG ID 33ac791 Merge pull request ARMmbed#2548 from PelionIoT/sync_with_mbed_os 6f8b282 compile out trace when not available 825373d Add SPDX license identifier to Arm files 3ec3bc6 fixed warnings: static method defined but not used ee34352 Check if RX channel needs to be updated when RX slot detected (ARMmbed#2540) d59dc5d Fix doxygen 1.8.17 warnings (ARMmbed#2546) 1e0beb3 Update unit tests to support Ubuntu 2020_04 LTS (ARMmbed#2545) b9b2ffd Fixed FHSS get retry period (ARMmbed#2543) a0bf6ae Check if RX channel needs to be updated after broadcast received (ARMmbed#2539) fde325e Wi-SUN Neighbour ARO registration failure handling update: 1e1f9c6 RPL dio Handler update: 0421502 Asynch message advertiment enable added to DAO done when disabled. 0374f74 Corrected memory leak on key storage allocation on low memory situation 23c2f7e Disable ASYNCH messages at enter Local repair state. c1df6b0 Added Poison_count check for First DIO time blocker. 944f934 Added channel mask size to FHSS configuration (ARMmbed#2536) 20e79e0 RPL Local repair disable clear advertised_dodag_membership_since_last_repair state 8a46380 Fix doxygen comments (ARMmbed#2534) fe06236 MAC ACK RX guarantee update 2388a80 MAC layer send ack allways when it requirement's 29b387b RPL dao dynamic timeout 00bbd02 Don't allow TX slot length go below allowed minimum (ARMmbed#2528) 8333faa Out of memory improvement to remove packets from routing 0a12aeb Support channel plan IDs 1, 2 and 5 with NA and BZ bands (ARMmbed#2526) ee4333d Wi-SUN Timing configuration is selected based on network size and data rate a5b2a26 WS: API to set PHY mode and Channel plan IDs as defined by FAN 1.1 (ARMmbed#2520) b86a044 Update nanostack v12.7.0 changelog (ARMmbed#2525) 35b95da Remove unnecessary files from release 0717432 Merge remote-tracking branch 'origin/release_internal' into release_external f68126b Adaptation layer MCPS confirmation handle update e483a07 Added OFDM configurations and FEC in RF config structure (ARMmbed#2513) b88abfa BUG fix: Fixed broken Brodcast MAC overflow handling 9cad478 Random early detection congestion API update 00aed73 Modified the Wi-SUN stack Latency estimates a bit slower 6b83d82 Remove periodic PAN version increase from Wi-SUN border router ef670e2 Integrated ReD congestion packet drop to Wi-SUN bootstrap interface. b956d9e Revert "Improved transmission in high traffic (ARMmbed#2511)" (ARMmbed#2512) 01749c2 Improved transmission in high traffic (ARMmbed#2511) 3158e96 Adaption layer queue trace update 5a32f4a Update changelog, random_early_detection_congestion_check nameupdate and minor comment fix. b818f12 Extented network status for support dropped tx congestion packet. 11c0763 Added new service Random early detection f2c358d Optimized medium NWK MPL parameters to 40 second multicast interval (ARMmbed#2508) c013bc7 Added traces to EAPOL TX failure c29ee94 Changed TLS return value to int32_t 501a2c8 Added trace for mbed TLS errors 9d7cd22 Updated change log 1290225 Corrected radius message memory allocation 7b1c596 Removed trace print's efb8393 Adaptation layer MCPS confirmation handle update ac1025e Bug Fix: Accept only next possible BSI for detect BR reboot and drop unkown's. 58f0e56 Updated change log 102e525 Nanostack now indicates connection down on RPL local repair start 395791d FHSS WS: Do not allow broadcast TX on unicast channel (ARMmbed#2501) 72f8ecb Updated changelog.md 2376208 Activated higher priority by traffic class CS6 for NS/NA and RPL, EAPOL/ DHCP Relay messages. afbe906 Adaptation layer update 13fb2bf Update CHANGELOG.md af81c48 DIO init TX filter update 13a872c Fix typos in github template (ARMmbed#2498) 1af20e1 Initial version of CHANGELOG (ARMmbed#2497) d9874ed Feature update: Improved MAC TX queue purge 6926442 Wi-SUN Aro registration temporary address registation bug fix. d3170ed Removed generic event and wrong trace info. 0db3486 Removed trace from place which is normal and not needed a080f18 Added debug tarce for dropped unsecured and MPL packets. 51cd564 Wi-SUN NS probe update: 579f756 Adaptation layer: Do not push CCA failed packet back to MAC (Wi-SUN) (ARMmbed#2487) 715ae9a Merge remote-tracking branch 'origin/release_internal' into release_external 42c9807 Nanostak trace level configuration (ARMmbed#2489) 6f52171 Bug fix: socket reference count made 16-bit (ARMmbed#2490) f51669a Bug fix: Do not print UFSI drift when fixed channel is used (ARMmbed#2488) 18fa048 RPL DAO timeout update: 660e178 Clear debug traces. cbac0bb DIO init send block for node fed5d1c Created different MPL configuration based on network size 7ad7e81 Wi-SUN recovery and BR BSI update: d207f4d Merge branch 'release_internal' into release_external d166c89 MPL: buffered max limit increased to 8k (ARMmbed#2482) 0f6666a Fixed Unit test's 1ff9b1d LLC drop a packet if FHSS shedule is not configured. 7cecc28 Fixed missing asynch trigle setup stop at if down process 7a8b2bf Wi-SUN fhss API default value setting fixes 164a370 Fixed coverity issues from management API 8b5b433 Corrected out of bounds access coverity warning (ARMmbed#2475) 4ffe6a1 Multicast forwarding is separated from the routing flag 30f4315 Wi-SUN discovery staten enter upxdate 083b84e Iotthd 4308 (ARMmbed#2473) fcc33d5 Removed time increment from NVM time read function on interface up 9c8e3af fhss_tx_handle update 5491a6b Fixed UFSI update print function (ARMmbed#2470) 86f64c5 FHSS WS: Check if BC schedule is stopped before computing timeout delay (ARMmbed#2469) a0b112a Corrected defects and coding style 2f4678a Corrected trace macro 5e96751 Distributed key storage NVM writes to longer time period 9b3891f FHSS WS: handle blocked interrupts (ARMmbed#2466) a792e83 Added validation at MAC ack buffer handler 2a465b2 DNS configuration lifetime validation git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 3183d87
…..3183d87 3183d87 Merge branch 'release_internal' into release_external 9e27a77 Disabled BR IID verify from DODAG ID 33ac791 Merge pull request ARMmbed#2548 from PelionIoT/sync_with_mbed_os 6f8b282 compile out trace when not available 825373d Add SPDX license identifier to Arm files 3ec3bc6 fixed warnings: static method defined but not used ee34352 Check if RX channel needs to be updated when RX slot detected (ARMmbed#2540) d59dc5d Fix doxygen 1.8.17 warnings (ARMmbed#2546) 1e0beb3 Update unit tests to support Ubuntu 2020_04 LTS (ARMmbed#2545) b9b2ffd Fixed FHSS get retry period (ARMmbed#2543) a0bf6ae Check if RX channel needs to be updated after broadcast received (ARMmbed#2539) fde325e Wi-SUN Neighbour ARO registration failure handling update: 1e1f9c6 RPL dio Handler update: 0421502 Asynch message advertiment enable added to DAO done when disabled. 0374f74 Corrected memory leak on key storage allocation on low memory situation 23c2f7e Disable ASYNCH messages at enter Local repair state. c1df6b0 Added Poison_count check for First DIO time blocker. 944f934 Added channel mask size to FHSS configuration (ARMmbed#2536) 20e79e0 RPL Local repair disable clear advertised_dodag_membership_since_last_repair state 8a46380 Fix doxygen comments (ARMmbed#2534) fe06236 MAC ACK RX guarantee update 2388a80 MAC layer send ack allways when it requirement's 29b387b RPL dao dynamic timeout 00bbd02 Don't allow TX slot length go below allowed minimum (ARMmbed#2528) 8333faa Out of memory improvement to remove packets from routing 0a12aeb Support channel plan IDs 1, 2 and 5 with NA and BZ bands (ARMmbed#2526) ee4333d Wi-SUN Timing configuration is selected based on network size and data rate a5b2a26 WS: API to set PHY mode and Channel plan IDs as defined by FAN 1.1 (ARMmbed#2520) b86a044 Update nanostack v12.7.0 changelog (ARMmbed#2525) 35b95da Remove unnecessary files from release 0717432 Merge remote-tracking branch 'origin/release_internal' into release_external f68126b Adaptation layer MCPS confirmation handle update e483a07 Added OFDM configurations and FEC in RF config structure (ARMmbed#2513) b88abfa BUG fix: Fixed broken Brodcast MAC overflow handling 9cad478 Random early detection congestion API update 00aed73 Modified the Wi-SUN stack Latency estimates a bit slower 6b83d82 Remove periodic PAN version increase from Wi-SUN border router ef670e2 Integrated ReD congestion packet drop to Wi-SUN bootstrap interface. b956d9e Revert "Improved transmission in high traffic (ARMmbed#2511)" (ARMmbed#2512) 01749c2 Improved transmission in high traffic (ARMmbed#2511) 3158e96 Adaption layer queue trace update 5a32f4a Update changelog, random_early_detection_congestion_check nameupdate and minor comment fix. b818f12 Extented network status for support dropped tx congestion packet. 11c0763 Added new service Random early detection f2c358d Optimized medium NWK MPL parameters to 40 second multicast interval (ARMmbed#2508) c013bc7 Added traces to EAPOL TX failure c29ee94 Changed TLS return value to int32_t 501a2c8 Added trace for mbed TLS errors 9d7cd22 Updated change log 1290225 Corrected radius message memory allocation 7b1c596 Removed trace print's efb8393 Adaptation layer MCPS confirmation handle update ac1025e Bug Fix: Accept only next possible BSI for detect BR reboot and drop unkown's. 58f0e56 Updated change log 102e525 Nanostack now indicates connection down on RPL local repair start 395791d FHSS WS: Do not allow broadcast TX on unicast channel (ARMmbed#2501) 72f8ecb Updated changelog.md 2376208 Activated higher priority by traffic class CS6 for NS/NA and RPL, EAPOL/ DHCP Relay messages. afbe906 Adaptation layer update 13fb2bf Update CHANGELOG.md af81c48 DIO init TX filter update 13a872c Fix typos in github template (ARMmbed#2498) 1af20e1 Initial version of CHANGELOG (ARMmbed#2497) d9874ed Feature update: Improved MAC TX queue purge 6926442 Wi-SUN Aro registration temporary address registation bug fix. d3170ed Removed generic event and wrong trace info. 0db3486 Removed trace from place which is normal and not needed a080f18 Added debug tarce for dropped unsecured and MPL packets. 51cd564 Wi-SUN NS probe update: 579f756 Adaptation layer: Do not push CCA failed packet back to MAC (Wi-SUN) (ARMmbed#2487) 715ae9a Merge remote-tracking branch 'origin/release_internal' into release_external 42c9807 Nanostak trace level configuration (ARMmbed#2489) 6f52171 Bug fix: socket reference count made 16-bit (ARMmbed#2490) f51669a Bug fix: Do not print UFSI drift when fixed channel is used (ARMmbed#2488) 18fa048 RPL DAO timeout update: 660e178 Clear debug traces. cbac0bb DIO init send block for node fed5d1c Created different MPL configuration based on network size 7ad7e81 Wi-SUN recovery and BR BSI update: d207f4d Merge branch 'release_internal' into release_external d166c89 MPL: buffered max limit increased to 8k (ARMmbed#2482) 0f6666a Fixed Unit test's 1ff9b1d LLC drop a packet if FHSS shedule is not configured. 7cecc28 Fixed missing asynch trigle setup stop at if down process 7a8b2bf Wi-SUN fhss API default value setting fixes 164a370 Fixed coverity issues from management API 8b5b433 Corrected out of bounds access coverity warning (ARMmbed#2475) 4ffe6a1 Multicast forwarding is separated from the routing flag 30f4315 Wi-SUN discovery staten enter upxdate 083b84e Iotthd 4308 (ARMmbed#2473) fcc33d5 Removed time increment from NVM time read function on interface up 9c8e3af fhss_tx_handle update 5491a6b Fixed UFSI update print function (ARMmbed#2470) 86f64c5 FHSS WS: Check if BC schedule is stopped before computing timeout delay (ARMmbed#2469) a0b112a Corrected defects and coding style 2f4678a Corrected trace macro 5e96751 Distributed key storage NVM writes to longer time period 9b3891f FHSS WS: handle blocked interrupts (ARMmbed#2466) a792e83 Added validation at MAC ack buffer handler 2a465b2 DNS configuration lifetime validation git-subtree-dir: features/nanostack/sal-stack-nanostack git-subtree-split: 3183d87
This is similar to what we already did in mbed-drivers (PR for the addition there ARMmbed/mbed-drivers#145).
I considered
SingletonPtr
object for this serial stdio but did not find any benefit, just more sugar around to get the same result, or? Additionally, the first commit cleans HAL targets, the memcpy of stdio objects.Replaces #2455 , an application should use this new method for stdio configuration.
Questions:
Serial pc(USBTX,USBRX)
? We could potentially deprecate it (somehow check that serial was already initialized, and a user is doing it for the same pins (might not work for each use case as sometimes stdio gets initalized later once used..), thus printf a warning that use a new method since v5.1.2 mbed-os version). ideas?@bridadan @bogdanm @sg- @geky @c1728p9