how do disable os_printf output using RTOS-SDK?

ecl66
Posts: 4
Joined: Wed Aug 19, 2015 4:14 pm

how do disable os_printf output using RTOS-SDK?

Postby ecl66 » Wed Dec 09, 2015 1:58 am

Greetings to All,

Using the non-RTOS SDK, there is a function to disable os_printf output.

Unfortunately, this function doesn't work using the RTOS SDK: do you know any way to do so?

Many thanks,
Emmanuel

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: how do disable os_printf output using RTOS-SDK?

Postby ESP_Faye » Thu Dec 10, 2015 11:39 am

Hi,

Here is an example. But it will disable all logs, if something goes wrong, you can not track it by logs, we do not suggest it.

Code: Select all

void user_printf(char c)
{
   // do nothing here
}

os_install_putc1(user_printf);


Or you can define your own trace

Code: Select all

#ifdef USER_DEBUG
#define TRACE    printf
#else
#define TRACE
#endif


Thanks for your interest in ESP8266 !

ecl66
Posts: 4
Joined: Wed Aug 19, 2015 4:14 pm

Re: how do disable os_printf output using RTOS-SDK?

Postby ecl66 » Fri Dec 11, 2015 12:52 am

Thanks for your reply.

Actually another easy way was to redefine os_printf (within an #ifdef) and to comment out the original definition in esp_libc.h (also within an #ifdef).

best regards,

Who is online

Users browsing this forum: No registered users and 19 guests