Using os-printf in ESP8266 IoT-SDK

Sysprogs forums Forums VisualGDB Using os-printf in ESP8266 IoT-SDK

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7021
    mfkfx
    Participant

    Hello again,

    I’m trying to send a simple text over UART.
    I added the “Peripheral Drivers (IoT)” in Properties -> Frameworks. Why can’t I use os_printf(“hello”);?
    There is a define is osapi.h:

    #define os_printf os_printf_plus

    The error is: ‘os_printf_plus’ was not declared in this scope.

    Do I have to add a library in Properties -> Makefile settings -> Library Directories ?

    Thank you very much for your help!

    Regards

     

    #7025
    support
    Keymaster

    Hi,

    It looks like the Espressif guys forgot to declare this function in their SDK. Please feel free to add the following declaration to espmissingincludes.h and include the file from your projects:

    int os_printf_plus(const char *format, ...)  __attribute__ ((format (printf, 1, 2)));
    #7031
    mfkfx
    Participant

    Thank you very much!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.