From 01ffe0eb9ec01ac4b1dab05aa17df9e470672be1 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Tue, 16 Dec 2025 18:31:36 +0000 Subject: [PATCH] more notes on expressif sdk --- ...th_Expressif_IoT_Development_Framework.md} | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) rename zk/{Expressif_IoT_Development_Framework.md => Programming_ESP32_with_Expressif_IoT_Development_Framework.md} (50%) diff --git a/zk/Expressif_IoT_Development_Framework.md b/zk/Programming_ESP32_with_Expressif_IoT_Development_Framework.md similarity index 50% rename from zk/Expressif_IoT_Development_Framework.md rename to zk/Programming_ESP32_with_Expressif_IoT_Development_Framework.md index 1c8160a..9811eec 100644 --- a/zk/Expressif_IoT_Development_Framework.md +++ b/zk/Programming_ESP32_with_Expressif_IoT_Development_Framework.md @@ -85,3 +85,75 @@ It should return something like: ``` 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... +```