How to read ets_printf output from wake stub on a MacOS?

bfredo123
Posts: 9
Joined: Sat Oct 05, 2024 11:16 am

How to read ets_printf output from wake stub on a MacOS?

Postby bfredo123 » Sun Nov 17, 2024 3:51 pm

Hi,

I have seen several examples of wake-stub code calling ets_printf in order to output some text (thus, before the app_main function is called, and before the board has fully booted). I presume the authors of such code read the output text from the "idf.py monitor" command, running on a PC or on a Mac.

However, while the ESP32 (ESP32s3 in my case) is in deep-sleep, and also while running the wake stub, the USB MacOS device is not available, and "idf.py monitor" is disconnected from the board.

So, how to read that output text? Do I miss some basic element about this?

Many thanks for your help!

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: How to read ets_printf output from wake stub on a MacOS?

Postby ESP_Sprite » Mon Nov 18, 2024 2:38 am

It's not easy to do with the usb-serial-jtag (you could add a delay in the wakestub to wait for macos to detect the usb device again, but that's kinda janky) but an external USB-serial chip/board on U0TXD should show the message.

bfredo123
Posts: 9
Joined: Sat Oct 05, 2024 11:16 am

Re: How to read ets_printf output from wake stub on a MacOS?

Postby bfredo123 » Mon Nov 18, 2024 8:56 am

Many thanks!

Do you know if there is a watchdog active during the wake stub?
If I add a delay as you kindly suggest, I would like to make sure it does not trigger a watchdog reset or any other inconvenience.
If there is a watchdog, how long is the default delay, and what is this watchdog reference (register, ID, ...) if I want to extend it? (I have read the ESP32 tech ref and prog guide thoroughly without finding the answer).

Other question: my board (https://PowerFeather.dev) seems to connect USB to UART1, so I guess the printf goes to UART1 by default. How can I redirect printf to UART0? (FYI here is the schematics: https://forum.powerfeather.dev/d/10-sch ... -available)

Thank you again!

snutw_
Posts: 36
Joined: Wed Aug 21, 2024 1:48 pm

Re: How to read ets_printf output from wake stub on a MacOS?

Postby snutw_ » Mon Nov 18, 2024 9:18 am

CONFIG_ESP_INT_WDT or CONFIG_BOOTLOADER_WDT_TIME_MS?

bfredo123
Posts: 9
Joined: Sat Oct 05, 2024 11:16 am

Re: How to read ets_printf output from wake stub on a MacOS?

Postby bfredo123 » Mon Nov 18, 2024 10:00 am

Thank you so much!! I will try that!

(still interested for the other question! :) )

snutw_
Posts: 36
Joined: Wed Aug 21, 2024 1:48 pm

Re: How to read ets_printf output from wake stub on a MacOS?

Postby snutw_ » Mon Nov 18, 2024 5:15 pm

Eee CONFIG_ESP_CONSOLE_UART and CONFIG_ESP_CONSOLE_UART_NUM?

bfredo123
Posts: 9
Joined: Sat Oct 05, 2024 11:16 am

Re: How to read ets_printf output from wake stub on a MacOS?

Postby bfredo123 » Mon Nov 18, 2024 7:19 pm

Awesome, thank you again!

snutw_
Posts: 36
Joined: Wed Aug 21, 2024 1:48 pm

Re: How to read ets_printf output from wake stub on a MacOS?

Postby snutw_ » Tue Nov 19, 2024 6:46 am

There is a search feature in the Sdkconfig

Who is online

Users browsing this forum: No registered users and 62 guests