Bug with (Un)BufferedSerial API in Mbed Studio V1.4 for Artemis board using ARMC compiler

Hi Alain,

I have a project that i am keep updating for 2 years now. Actually the code base i wrote checks both for Mbed OS versions (5.x vs. 6.x) and determines which board is currently used (Artemis Thing Plus or MAX32630FTHR). For the Artemis i always use UnbuferredSerial for printing text on the console, with the MAX32630FTHR i prefer USBSerial since that has been reimplemented for that board, but need to fallback to printf for 5.x release on that board. So that code is somewhat complex.

However even this basic example fails on the Artemis board since upgrading to Mbed Studio V1.4. Tried several Mbed OS releases, that does not make any difference (however once i update to OS 6.9 i can not downgrade OS release anymore, this is new in Studio V1.4):

    #include "mbed.h"
    #include <cstring>

    #define SERIALBAUD 115200

    UnbufferedSerial pc(USBTX, USBRX, SERIALBAUD);
    char myBuffer[20] = {0};

    int main() {

      strcpy(myBuffer, "Hello World!\n");
      pc.write(&myBuffer, sizeof(myBuffer));

      while (1) {
        strcpy(myBuffer, "Wishing you ");
        pc.write(&myBuffer, sizeof(myBuffer));
        ThisThread::sleep_for(1000ms);

        strcpy(myBuffer, "a nice day!\n\n");
        pc.write(&myBuffer, sizeof(myBuffer));
        ThisThread::sleep_for(1000ms);
      }
      return 0;
    }

It actually returns a single ⸮ character that never changes. While if i build the same example for the MAX32630FTHR, it works as expected on the MAX32630FTHR even with Mbed Studio V1.4.

The same applies for BufferedSerial and even for good old printf. With Studio V1.3.1 and prior releases all these worked even on my Artemis board. I have only 1 such board but if the board was broken then most probably also other parts of my 1500+ lines of code would also fail.

My major problem is that i can not find a link for Studio V1.3.1 anywhere on the internet so i can not even downgrade until it gets fixed (or to rule out failure of my Artemis completely).

EDIT: forgot to mention i found this one before posting, so that is why i guess Studio V1.4 might be cuasing yet another issue on custom boards like the Artemis currently is.