Mbed printf statements make board hang

Hey there,
I got the redbearlab ble nano2 with mbed working on Platformio with Visualstudio.
As its not supported yet for mbed, i am using nrf52_dk as the target board / paltform.
Somehow using printf statements, my code wont run. Meanwhile compiling the same stuff with Atom or as an usual mbed project, it works fine. If im disabling the printf statements, then the platformio compiled code also works. Uploading etc works fine.
Does anyone can help me please?
Thanks in advance,
Philipp

I have experience with the issue and this board. The system seems to block when the USB UART buffer is full. Do pio device monitor to dump the data and let your board continue executing.

@cujomalainey ,
thanks for your fast response.
The problem is i cant evene make the code run because it stuck everytime i compile it with enabled print statements (i wrote a wrapper around printf to be able to define it “1” when i need some output (else i define it “0”)). I tried some atom compiled code (mbed compile -> GCC_ARM) and it works perfectly and shows the prints in the pio serial monitor. I guess there might be sth wrong with the build flags the pio assigns to the arm gcc compiler. I will take a look on this.
If you have something else in mind, i would be glad to hear it :smiley:
Yours,
Philipp