No printf output

Lancsrick
Posts: 39
Joined: Mon Apr 10, 2023 5:48 pm

No printf output

Postby Lancsrick » Sun Feb 16, 2025 11:43 am

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
Screenshot 2025-02-16 114306.png (33.53 KiB) Viewed 1200 times

Lancsrick
Posts: 39
Joined: Mon Apr 10, 2023 5:48 pm

Re: No printf output

Postby Lancsrick » Sun Feb 16, 2025 2:16 pm

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

Lancsrick
Posts: 39
Joined: Mon Apr 10, 2023 5:48 pm

Re: No printf output

Postby Lancsrick » Sun Feb 16, 2025 6:20 pm

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.

nopnop2002
Posts: 153
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: No printf output

Postby nopnop2002 » Sun Feb 16, 2025 10:44 pm

Code: Select all

io_conf1.pin_bit_mask = (1ULL<<1)
GPIO1 is UART0 TX, so if you use it for another purpose, standard output will no longer be output.

Lancsrick
Posts: 39
Joined: Mon Apr 10, 2023 5:48 pm

Re: No printf output

Postby Lancsrick » Mon Feb 17, 2025 4:16 pm

Perfect, thanks!

Who is online

Users browsing this forum: No registered users and 117 guests