Implementation of the printf() function
Posted: Thu Dec 03, 2020 10:30 am
Hi,
Currently we are using the log output as main debug system on our ESP32 board.
We have some problems with it:
- Sometimes we loose bytes (not transmited ? error during the transmission to the USB Serial Dongle ? We don't really know)
- Sometimes we have some log messages that "cuts" other log messages
We see that ESP_LOGx() macros/functions call the vprintf() function.
We would like to investigate on vprintf() functions especially for the second problem.
We would like to debug in this function to know how the bytes are transmit to uart and to know if there are RTOS things during the process. (queue, semaphore, vTaskYield(), etc)
We found that the code used for this function is defined in newlib and it is provided to the espidf as a library that comes from https://github.com/espressif/newlib-esp32
We are currently debugging this problem with eclipse, GDB and QEMU. (with a substitute-path configured).
The debug works, but not as well, I think the library is not compiled with optimisation for debug because we can step into/step out but sometimes it jumps, it's not really accurate.
I don't find a lot of documentations to build newlib-esp32 on windows so i'm here to ask if someone can send me the compiled library with debugging options enabled or if you know how to build it on windows
Currently we are using the log output as main debug system on our ESP32 board.
We have some problems with it:
- Sometimes we loose bytes (not transmited ? error during the transmission to the USB Serial Dongle ? We don't really know)
- Sometimes we have some log messages that "cuts" other log messages
We see that ESP_LOGx() macros/functions call the vprintf() function.
We would like to investigate on vprintf() functions especially for the second problem.
We would like to debug in this function to know how the bytes are transmit to uart and to know if there are RTOS things during the process. (queue, semaphore, vTaskYield(), etc)
We found that the code used for this function is defined in newlib and it is provided to the espidf as a library that comes from https://github.com/espressif/newlib-esp32
We are currently debugging this problem with eclipse, GDB and QEMU. (with a substitute-path configured).
The debug works, but not as well, I think the library is not compiled with optimisation for debug because we can step into/step out but sometimes it jumps, it's not really accurate.
I don't find a lot of documentations to build newlib-esp32 on windows so i'm here to ask if someone can send me the compiled library with debugging options enabled or if you know how to build it on windows