Interestingly this compiles fine without changes using the offline mbed cli tool! I’m going to have a chat with our online compiler team. But including the header as stated above will work in the interim.
Also with both versions (online and desktop) of MbedStudio it is compiled fine and without including the header- MbedOS 6.1 Commit: a6207cadad0acd1876f436dc6baeddf46c42af06
The issue occur only with the Online compiler and it doesn’t matter what commit I use, from latests.
I have no luck with the solution (include the header) what you mentioned.
BTW same is for both new Serial APIs (UnbufferedSerial / BufferedSerial).
I’m investigating with the tools / online compiler team to try and get to the bottom of the issue. I’ll provide an update once we work out what the problem is.
I’ve further investigated and had discussions with the tools team.
The online IDE was primarily designed for pre-6.0 versions of mbed-os. This means that additional steps may be required in order to get some of the 6.x based examples to work.
Please try the following steps:
Import example
When the pop up window appears, check the ‘update all libraries to latest versions’ and import
Once the example has loaded , click on the project name, then select ‘revisions’ from the toolbar
When the revision list comes up, highlight the version you wish to use (latest being v6.1 branch) and then click ‘switch’ from the toolbar
Hello,
How do I set “SERIAL_RESERVED_CHAR_MATCH” in BufferedSerial.
int read (uint8_t *buffer, int length, const event_callback_t &callback, int event=SERIAL_EVENT_RX_COMPLETE, unsigned char char_match=SERIAL_RESERVED_CHAR_MATCH)
Hello,
I was wondering if " SERIAL_RESERVED_CHAR_MATCH" would give me the same functionality of MODSERIAL as in serialport.autoDetectChar(‘\r’);
BR
Pramod
Thank you, you share your example. But the RawSerial is deprecated in the MbedOS 6 and was removed. So if you want to use latest MbedOS, the RawSerial is not recommanded.
You can found that at end of APIs list or in the release note for the MbedOS 6.
This topic is about the issue around the new APIs (UnbufferedSerial/BufferedSerial) what are not usable in some revisions. How was wrote above, that was caused because MbedOS6 was released but Mbed tools were not 100% ready for it or something like that.
BR, Jan
Hello Jaydeep,
Thanks for responding, but my issue was whether BufferedSerial in OS6.x supports SERIAL_RESERVED_CHAR_MATCH, this feature is available in MODSERIAL.
MODSERIAL does not comile in OS6.x hence my issue.
Thanks all the same
Pramod
using the Online Compiler for the FRDM-KL25Z.
The line
static BufferedSerial serial_port(USBTX, USBRX);
produces
Error: Unknown type name ‘BufferedSerial’ in “main.cpp”, Line: 15, Col: 8
I have updated mbed-os to 6.3.0
What is the problem? It seems odd that a basic, frequently used API is broken. Hopefully, someone can help.