Page 1 of 1
No printf output
Posted: Sun Feb 16, 2025 11:43 am
by Lancsrick
Hi all, I assume I'm doing something stupid but I can't figure it out at the minute. Using Espressif-IDE, DOIT Devkit v1 ESP32. Whilst my program runs absolutely fine I can't get any printf output to the terminal - I get all the flash and boot information but then it stops at the green line below - could someone put me out of my misery please? Thanks.

- Screenshot 2025-02-16 114306.png (33.53 KiB) Viewed 1506 times
Re: No printf output
Posted: Sun Feb 16, 2025 2:16 pm
by Lancsrick
To add some more information:
- I've confirmed the monitor is at 115200
- I've tried different usb ports and cables (all flash fine, all give no serial output)
- I've tried manually resetting the board with the terminal running
Re: No printf output
Posted: Sun Feb 16, 2025 6:20 pm
by Lancsrick
It's this block of code below that's causing the problem, but I don't know why. Switched to VS Code to ensure there was no environment issue going on that I couldn't find.
Code: Select all
/*gpio_config_t io_conf1;
io_conf1.intr_type = GPIO_INTR_DISABLE;//disable interrupt
io_conf1.mode = GPIO_MODE_INPUT;
io_conf1.pin_bit_mask = (1ULL<<1);//bit mask of the pins that you want to set,e.g. GPIO 1
io_conf1.pull_down_en = GPIO_PULLDOWN_ENABLE;//enable pull-down mode
io_conf1.pull_up_en = GPIO_PULLUP_DISABLE;//disable pull-up mode
esp_err_t error1=gpio_config(&io_conf1);//configure GPIO with the given settings
if(error1!=ESP_OK){
printf("error configuring GPIO1 \n");
}
#define BUTTON_RED_DOG1 GPIO_NUM_1 */
This is run at the start of app_main. Similar blocks exist for numerous other pins but seem to cause no issue.
Re: No printf output
Posted: Sun Feb 16, 2025 10:44 pm
by nopnop2002
GPIO1 is UART0 TX, so if you use it for another purpose, standard output will no longer be output.
Re: No printf output
Posted: Mon Feb 17, 2025 4:16 pm
by Lancsrick
Perfect, thanks!