B4R Question ESP32 (WROOM) - Could a kind soul please assist

rabbitBUSH

Well-Known Member
Licensed User
So, I came across this From this posting

And, bear with me, from my no knowledge viewpoint I wanted to unpack what this all means . . .
Well, I think I have it, but am worried that if I misinterpret the explanation I would kill the ESP32 unit

#Flashing
For the ESP32-DevKitC, to flash programs from development environments, like Arduino IDE or B4R 1.8.0 (or higher).
Example B4R IDE:
* Pin IO0 (= GPIO0) to Ground * Compile and upload. Wait till message "waiting for download" in the B4R IDE Log Tab appears.
* Pin IO0 (= GPIO0) NOT to Ground
* Press BOOT button and hold down
* Press EN button (enable) and hold down
* Release BOOT button
* Release EN button


Above there are two parts, it would seem. I've done one in underline and the other in bold.

The bold matches what I had read and found has to be used for compile/upload to ESP32 (read it some time ago).

Its "header" is * Pin IO0 (= GPIO0) NOT to Ground

Then : The underlined one has the "header" * Pin IO0 (= GPIO0) to Ground

Question is : What does (=GPIO0) to ground? mean physically?

It looks like -> if this (GPIo0) is connected to ground then one does not have to do the BOOT / EN hold bit and it will write to the ESP32. I then presume that the bits in BOLD fall away and you don't have to do the BOOT/EN hold part anymore (not using B4R so even after the "waiting for download" appears doesn't come into it for me).

I've never seen that suggestion anywhere in the more formal Arduino fora. It seems to be saying loop a wire from GPIo0 to the GND rail. Not going to do that until some Guru can say that's right Dumbo. And, the B4R thing is irrelevant in the context I suppose, because, well, it wouldn't matter what IDE one is using, surely, its a physical connection. Which can go POEF..... {{Ahg >> anyway this is there at the top like Arduino IDE or B4R 1.8.0}}

The bit in bold above is a right PitB
 

emexes

Expert
Licensed User
I have an ESP32 WROOM with me right now. Nothing is connected to any of the pins, it's just connected to (and powered by) my laptop via a USB cable plugged into the ESP32 micro-USB socket.

If the large square ESP32 chip is away from me and the micro-USB socket is closest to me, then the leftside button is reset and the rightside button is the upload button.

In the Arduino IDE, I choose U to upload, which then does a compile first anyway, and when the Connecting......______...... starts appearing, I then press and hold the rightside upload button for a few seconds until it starts doing the upload, at which point I let go of the button and let it do its thing. It reboots automatically when it's finished loading.

My settings are:

1594482194893.png


and the terminal window for a compile, connect, upload and reboot looks like:

ESP32 terminal window program loading:
Serial port COM11
Connecting........_____....._____....._
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:6f:28:18:10:b0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...

Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4681.2 kbit/s)...
Hash of data verified.
Compressed 16832 bytes to 10888...

Writing at 0x00001000... (100 %)
Wrote 16832 bytes (10888 compressed) at 0x00001000 in 0.1 seconds (effective 982.9 kbit/s)...
Hash of data verified.
Compressed 194720 bytes to 97580...

Writing at 0x00010000... (16 %)
Writing at 0x00014000... (33 %)
Writing at 0x00018000... (50 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (83 %)
Writing at 0x00024000... (100 %)
Wrote 194720 bytes (97580 compressed) at 0x00010000 in 1.3 seconds (effective 1180.1 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...

Writing at 0x00008000... (100 %)
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.0 seconds (effective 1755.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
@emexes : Well what you describe in #2 is exactly the way I have to do it now. No blinking LED (excuse the pun). So I have it doing the uploads blah blah.

But that message I quoted had that other thing about connecting (?) GPIo0 to GND.

going to look at what @tigrot linked to in a moment, just finished some work with this thing to get it to talk to a database on my host site. that bit is going OK as much as can be expected since I just started an hour or so ago.
 
Last edited:
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
More or less the same...
Yup You still have to do the BOOT/EN button hold thing even using that tool......SUCKS

Still wondering about that bit in the posting which is in top of #1.
 
Upvote 0

emexes

Expert
Licensed User
what you describe in #2 is exactly the way I have to do it now
Yeah, that's why I wrote it. I remember all the dead ends I was lead down before it finally worked. āœŒ


that other thing about connecting (?) GPIo0 to GND
Life is too short. I assumed that one of the buttons must be doing that grounding for us.

get it to talk to
One useful bit of info is that stdout (and presumably stdin) are automatically/default connected to the serial-COM-port-over-USB. On my laptop, the ESP32 shows up as COM11:115200,N,8,1. Anything printf'd on the ESP32 is easily received by B4J using eg:

B4X:
Sub Process_Globals
    Private sp As Serial
    Private astream As AsyncStreams
End Sub

Sub AppStart (Form1 As Form, Args() As String)

    sp.Initialize("sp")
   
    Log(sp.ListPorts)
   
    sp.Open("COM11")
    sp.SetParams(115200, 8, 1, 0)
   
    astream.Initialize(sp.GetInputStream, sp.GetOutputStream, "astream")
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
Life is too short.
I have changed my to do list to the Will I Live Long Enough list.

It's irritating that arduino doesn't have this same "feature" so life much longer using those.
stdout (and presumably stdin)
This is tempting : is that the Smack Of LINUX I'm hearing?
COM11:115200,N,8,1
You might have seen another post from me trying to figure out where the ESP port had gone to. It showed up on COM5 as a virtual and around the back of the tower box. Took a bit of Esp to work it out Ā®ļøšŸ‘»

Haven't even begun to be brave enough to comprehend this stuff, nor to attempt to overcome the Javaphobia.
šŸ––šŸ˜·šŸ˜¬
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
Upvote 0

emexes

Expert
Licensed User
AWWW you're not that old are you?
I am that experienced. šŸ»

Can remember days before Linux. Before IBM PC. Before VAX VMS. Before Apple II and TRS-80 (just) and all their clones. But not before CP/M and S-100, although my high school used CP/M machines, as did my first paid programming job, and Turbo Pascal šŸ„° and CBASIC.

Still have my first computer book too, buried somewhere in the garage.

1594547405620.png
 
Last edited:
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
here's my laptop and notebook . . .

IMG_20200712_121619_resized_20200712_122611525.jpg

B-4-X :rolleyes:šŸ¤£

HEY I must take photo of the one that had, just, nothing, had to use TV, without that it had just an led (1920s version ticker-tape built-in), cassette tape, no printer, O wait, had a daisy-wheel that worked. Guess what! it worked on basic (whate ever flavour it was before hell froze over).

Gee must see if these things all still work even the XT in that's lying in the Man Drawer.
 
Last edited:
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
Upvote 0

emexes

Expert
Licensed User
Works ok here. Every now and again I doze off waiting while the Arduino compiler does its thing, I'm late pressing the button, and the connection establishment times out, but... that's not an Espressif problem. āœŒ
 
Last edited:
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
Upvote 0

tigrot

Well-Known Member
Licensed User
Longtime User
My first computer ever was a 360/120, no disk at all, only 5 tape units. One Task at a time, 80col punched cards. In 1972, one life ago. I started to program with RPG I, then Cobol 68. Since that days i have used about 25 languages and dialects, 10 Assembler's.
 
Last edited:
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
80col punched cards.
A friend once had a box of those, going down a flight of stairs, a student in a rush took his arm out, box ended at the bottom of the stairs.......
.
.
.
before the days of index edge holes, and the university didn't have a sorter.....We all still fall down laughing when we reminisce

I just put those two machines (#12) on the bathroom scale : they have a combined weight of

11.5KG
haaaaaaaaaaaaaaa.gif
 
Upvote 0
Top