Redirect printf and Console to custom function
-
- Posts: 7
- Joined: Wed Oct 27, 2021 5:15 pm
Redirect printf and Console to custom function
Can I redirect/reroute printf functions and also all console messages to my own written functions? What exactly I need is to route them to my own software uart that I have written by myself. Why? 3 HW UARTS are very busy already doing their job and we need one more SW UART for getting messages from the processor.
Re: Redirect printf and Console to custom function
Search the forum, this has been asked a few times in the past.
-
- Posts: 7
- Joined: Wed Oct 27, 2021 5:15 pm
-
- Posts: 7
- Joined: Wed Oct 27, 2021 5:15 pm
Re: Redirect printf and Console to custom function
But does anybody know how to exactly redirect printf to my own function?
Re: Redirect printf and Console to custom function
quite some information provided here, but..
this is not for the real printf, which goes over vfs console file descriptors
this is all is for the ESP_LOGx facility..
hence again, the question:
is there an easy way to override the destination for printf (whatever is defined in sdkconfig) to, say, log in a buffer ?
I mean without messing with the vfs or trying to redirect or sth like that..
Any help is appreciated
this is not for the real printf, which goes over vfs console file descriptors
this is all is for the ESP_LOGx facility..
hence again, the question:
is there an easy way to override the destination for printf (whatever is defined in sdkconfig) to, say, log in a buffer ?
I mean without messing with the vfs or trying to redirect or sth like that..
Any help is appreciated
Who is online
Users browsing this forum: Baidu [Spider], MichaelS and 103 guests