Hello,
I see another bug in function
"void DRV_UART_printf(void* pContext, const char* pFormat, va_list arg);"
present in
"c:\ti\ind_comms_sdk_am243x_11_00_00_13\examples\industrial_comms\ethernetip_adapter_demo\drivers\uart\drv_uart.c"
This function SHOULD place data from the temporary buffer "tmpString[]" into the circular buffer "aOutStream" atomically, i.e., all or nothing.
In the case of a single write (memcpy), this condition is met. In the case of two writes, it actually happens that only the first part is executed and the rest could not fit, which is a bug.
As a fix, I propose the following solution for the condition of writing to the circular buffer. Please forward this code snippet to your development team.
I request identical behavior of this function, which will behave the same way when the buffer is circular and almost full - place all data or none (anytime)!
Regards,
Vit Triska
ethernetip_example_drv_uart_fixed_DRV_UART_printf.c