7 years, 6 months ago.

Turn off serial debug output

When compiling for the NRF52_DK target, it automatically claims P0.6 (amongst others) for serial debugging purposes. How do I configure the MBED online compiler as well as MBED-CLI to not claim these pins?

I tried setting NDEBUG in mbed_app.json as below but the compiled application locks up (no printf() statements are used although sprintf() is).

How can debugging be turned off in the online compiler?

{ "macros": [ "NDEBUG=1" ], "target_overrides": { "*": { "platform.stdio-flush-at-exit": false } } }

I haven't tested this, but it looks like the macro DEVICE_SERIAL could be set to 0 and a lot of the stdio serial init stuff will not be done. That might free up the pins.

posted by Graham S. 11 Jun 2017
Be the first to answer this question.