user47766: See bottom for solution.
I am trying to run the Arduino LiquidCrystal library example HelloWorld.ino on an ESP32. It seems like it never even executes the Setup() loop. The ESP resets after eight seconds and then repeats the cycle.
I have used character LCD many times before (with Arduino) but always using I2C. For the current design I am eliminating the I2C to parallel chip and I am instead driving the LCD directly from the ESP32. I am using 4 bit mode to reduce the number of pins required. I have connected Register select, Enable, and D4-D7. These details are not relevant since the ESP32 does not even run with the LiquidCrystal library.
I have looked at the library code and I didn't see anything that I thought would be a problem. But I am a hardware designer (for 36 years) and not a programmer. I use the Arduino IDE because it is quick and easy to test hardware.
The library code can be found here. https://github.com/arduino-libraries/LiquidCrystal/tree/master/src
This is what I get from the serial monitor.
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1240
load:0x40078000,len:13012
load:0x40080400,len:3648
entry 0x400805f8
ets Jun  8 2016 00:22:57

I tried the example code, and when that didn't work so I added a couple of serial print lines to the code. I am listing that below.
#include <LiquidCrystal.h>

const int rs = 26, en = 25, d4 = 16, d5 = 17, d6 = 18, d7 = 19;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  Serial.begin(115200);
  Serial.println("Start");
  
  lcd.begin(16, 2);
  lcd.print("hello, world!");
}

void loop() {
  delay(1000);
  
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);
  
  Serial.println(millis() / 1000);
}

Details that I didn't list above. I am powering the LCD from 5 volts. The LCD data/control lines are specified as VinLo = 0.55v and VinHi = 2.4 volts. Not that this matters since the code above never executes. I have used a Arduino Nano powered with 3.3 volts, running the above code, to confirm that the display actually works under these conditions. I really want this to work with an ESP32-C3. I tried that originally but switched to the ESP32 because it wasn't working with the code.
I hope someone can provide some guidance here. My other option is not using the library and writing my own code, which ends up being brute force and simplistic.
EDIT:
A big thanks to Majenko who was spot on. After removal of the call the code executed properly.

user4143: My guess:

the constructor calls LiquidCrystal::init().
LiquidCrystal::init() calls LiquidCrystal::begin().
LiquidCrystal::begin() uses delays.

Those delays may depend on things that aren't configured yet when the constructors are running, and lock up causing a WDT.
Remove the call to begin() in the LiquidCrystal::init() function and it should at least get past running the constructor so it gets to run the rest of your code.
Quite why they have that call in there is beyond me.  Rule number one of writing an Arduino library: never perform any operations more strenuous than assigning variables in the constructor as resources you may rely on may not have been initialized yet.

47766: <p>See bottom for solution.</p>
<p>I am trying to run the Arduino LiquidCrystal library example HelloWorld.ino on an ESP32. It seems like it never even executes the Setup() loop. The ESP resets after eight seconds and then repeats the cycle.</p>
<p>I have used character LCD many times before (with Arduino) but always using I2C. For the current design I am eliminating the I2C to parallel chip and I am instead driving the LCD directly from the ESP32. I am using 4 bit mode to reduce the number of pins required. I have connected Register select, Enable, and D4-D7. These details are not relevant since the ESP32 does not even run with the LiquidCrystal library.</p>
<p>I have looked at the library code and I didn't see anything that I thought would be a problem. But I am a hardware designer (for 36 years) and not a programmer. I use the Arduino IDE because it is quick and easy to test hardware.</p>
<p>The library code can be found here. <a href="https://github.com/arduino-libraries/LiquidCrystal/tree/master/src" rel="nofollow noreferrer">https://github.com/arduino-libraries/LiquidCrystal/tree/master/src</a></p>
<p>This is what I get from the serial monitor.</p>
<pre><code>rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1240
load:0x40078000,len:13012
load:0x40080400,len:3648
entry 0x400805f8
ets Jun  8 2016 00:22:57
</code></pre>
<p>I tried the example code, and when that didn't work so I added a couple of serial print lines to the code. I am listing that below.</p>
<pre><code>#include &lt;LiquidCrystal.h&gt;

const int rs = 26, en = 25, d4 = 16, d5 = 17, d6 = 18, d7 = 19;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  Serial.begin(115200);
  Serial.println(&quot;Start&quot;);
  
  lcd.begin(16, 2);
  lcd.print(&quot;hello, world!&quot;);
}

void loop() {
  delay(1000);
  
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);
  
  Serial.println(millis() / 1000);
}
</code></pre>
<p>Details that I didn't list above. I am powering the LCD from 5 volts. The LCD data/control lines are specified as VinLo = 0.55v and VinHi = 2.4 volts. Not that this matters since the code above never executes. I have used a Arduino Nano powered with 3.3 volts, running the above code, to confirm that the display actually works under these conditions. I really want this to work with an ESP32-C3. I tried that originally but switched to the ESP32 because it wasn't working with the code.</p>
<p>I hope someone can provide some guidance here. My other option is not using the library and writing my own code, which ends up being brute force and simplistic.</p>
<p><strong>EDIT:</strong></p>
<p>A <strong>big thanks</strong> to <strong>Majenko</strong> who was spot on. After removal of the call the code executed properly.</p>
 4143: <p>My guess:</p>
<ul>
<li>the constructor calls <code>LiquidCrystal::init()</code>.</li>
<li><code>LiquidCrystal::init()</code> calls <code>LiquidCrystal::begin()</code>.</li>
<li><code>LiquidCrystal::begin()</code> uses delays.</li>
</ul>
<p>Those delays may depend on things that aren't configured yet when the constructors are running, and lock up causing a WDT.</p>
<p>Remove the call to <code>begin()</code> in the <code>LiquidCrystal::init()</code> function and it should at least get past running the constructor so it gets to run the rest of your code.</p>
<p>Quite why they have that call in there is beyond me.  Rule number one of writing an Arduino library: <em>never perform any operations more strenuous than assigning variables in the constructor as resources you may rely on may not have been initialized yet.</em></p>
