more notes on expressif sdk

This commit is contained in:
Thomas Bishop 2025-12-16 18:31:36 +00:00
parent 7f8cff044c
commit 01ffe0eb9e

View file

@ -85,3 +85,75 @@ It should return something like:
``` ```
crw-rw---- 1 root uucp 188, 0 Dec 15 17:57 /dev/ttyUSB0 crw-rw---- 1 root uucp 188, 0 Dec 15 17:57 /dev/ttyUSB0
``` ```
> `/dev/ttyUSB*` is the serial port. The `c` access permission stands for
> 'character' since serial ports send data one byte at a time and a byte is a
> character
### Compile
```sh
idf.py build
```
### Flash to the device
```sh
idf.py -p /dev/ttyUSB0 monitor
```
Example output:
```
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: d4:e9:f4:bd:d2:b4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x00036fff...
Flash will be erased from 0x00008000 to 0x00008fff...
SHA digest in image updated
Compressed 26240 bytes to 16502...
Writing at 0x000075e4... (100 %)
Wrote 26240 bytes (16502 compressed) at 0x00001000 in 0.7 seconds (effective 304.9 kbit/s)...
Hash of data verified.
Compressed 156096 bytes to 85495...
Writing at 0x000348a3... (100 %)
Wrote 156096 bytes (85495 compressed) at 0x00010000 in 2.2 seconds (effective 564.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 632.0 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Done
```
### Monitor program execution
Use
```sh
idf.py -p /dev/ttyUSB0 monitor
```
To monitor to execution of the program running on the device.
The 'Hello World' example just logs some specs and then restarts in a loop.
```
Hello world!
This is esp32 chip with 2 CPU core(s), WiFi/BTBLE, silicon revision v3.1, 2MB external flash
Minimum free heap size: 306072 bytes
Restarting in 10 seconds...
```