PelionIoT / mbed-trace

mbed trace library
Apache License 2.0
18 stars 15 forks source link

Add instructions on how to activate traces in mbed OS 5 #48

Closed janjongboom closed 7 years ago

janjongboom commented 8 years ago

In mbed_app.json add:

    "target_overrides": {
        "*": {
            "mbed-trace.enable": 1
        }
    }

And in main.cpp add:

#include "mbed-trace/mbed_trace.h"

void trace_printer(const char* str) {
    printf("%s\r\n", str);
}

int main() {
    mbed_trace_init();
    mbed_trace_print_function_set(trace_printer);
janjongboom commented 8 years ago

Fixed in #49

tommikas commented 8 years ago

Yep, this should definitely be covered in the readme. Thanks for pointing it out and making the PR.

ciarmcom commented 8 years ago

ARM Internal Ref: IOTSYST-1252

tommikas commented 7 years ago

Done in https://github.com/ARMmbed/mbed-trace/pull/50