I made this class myBluetooth with a BufferedSerial object. How do I initialize it?
class myBluetooth
{
BufferedSerial blutooth;
public:
myBluetooth();
};
This doesn’t work(in class definition): BufferedSerial blutooth(Tx,Rx);. It gives error unknown type name PA_9,PA_10 (Tx, Rx resolves to those using a macro). Neither can I initialize it in the constructor: blutooth = BufferedSerial(Tx,Rx). This gives the error: copy assignment is implicitly deleted.
Reason why I’m doing this: I want to make several programs and not compile mbed-os every time in mbed IDE(long story-power outage, I’m running on backup power). So I’m using classes for different examples. I thought this would be a perfect reason to use the online IDE but neither can I make mbed OS-6 work on the online IDE nor can I include string_view and bufferedserial.
Yes I already figured the second one would work. But now I can’t get std::string to work. Linker shows undefined symbol errors for __2swprintf, wcslen, wcstol, wcstoll, wcstoul, wcstoull, wmemchr, wmemcmp, wmemcpy, wmemmove , wmemset, __wcstod_int, __wcstof_int. (Works with nucleo-f446re, but not with f103rb).
The differentiation between F1 and F4 can be affected with the C library settings maybe. The F4 uses STD but F1 uses small one for reduction of code size because F1 targets are low memory targets usually.
Yes.
Also I do understand the memory limitations of the f103 family. Any old string manipulation functionality would do, no matter how primitive it is.
Nope. No matter how many different ways I try, std::string always give undefined symbol errors. I can, however, do std::string_view("Hello"); directly and that doesn’t have any problems. As soon as I try to define/manipulate(e.g. concatenate) strings, undefined symbol errors show up.
All these functions are the wide character variant while std::string should be the narrow char variant. I don’t know how the compiler could generate function calls for wide strings but it seems it does.