I’m pretty much a Newbie and still struggling with setting up a MBED project for my redbearlab ble nano 2 on Platform IO with Visual Studio code. As my project was built on Mbed Os 5, i cant use the Arduino framework.
My steps till now:
New Pio project ( board: nrf52-dk, framework: mbed)
my project builds without problems, i can even upload it. But after that, its not running and theres no way to debug (serial monitor, Pio Debugger, pyocd-gdbserver + arm-none-eabi-gdb)
Is there a softdevice missing maybe?
it would be great if someone could help me on that.
theres currently no support for mbed on blenano 2. At least when i tried to configure a project using blenano 2 as target, the wizzard allowed me just to select arduino framework.
Pio claims building and uploading succeeded, but there arent any messages visible on the serial monitor.
The serial monitor worked as i tested with some mbed code compiled with Atom (arm-gcc).
it uploads and runs just fine.
Nevertheless, using printf statements from mbed make the code stop. Accordingly it only works if i disable all my print statements / printf debugging by #define method.
#define NEED_CONSOLE_OUTPUT 0 //set zero to disable, use DEBUG(“some text\n”) instead printf("
#if NEED_CONSOLE_OUTPUT #define DEBUG(…) { printf(VA_ARGS); } //Defaults to stdio without having to wirte pcUart explicitly #else #define DEBUG(…) /* nothing / #endif /#if NEED_CONSOLE_OUTPUT */