SDK-dat/AI-SDK-dat/AI-SDK-dat.md
... ...
@@ -0,0 +1,29 @@
1
+
2
+# AI-SDK-dat
3
+
4
+promote
5
+
6
+
7
+
8
+
9
+- PSRAM == no
10
+- use freertos == yes -- good to avoid memory leak
11
+- webserver == yes
12
+- use SPIFFS == yes
13
+
14
+## hardware
15
+
16
+amera type = OV2640
17
+
18
+- pin definitions
19
+
20
+add hardware I2C SSD1306 OLED display, address 0x3C, SCL is pin 13 and SDA is pin 15
21
+
22
+add hardware I2C BMP280, address 0x76, SCL is pin 13 and SDA is pin 15
23
+
24
+another task to read bmp280 data and print by OLED display
25
+
26
+add GPIO 33 and GPIO4, when capture image, both LED trigger to blink twice
27
+
28
+
29
+
SDK-dat/ESP-SDK-dat/ESP-SDK-dat.md
... ...
@@ -2,12 +2,24 @@
2 2
3 3
4 4
5
-# ESP32-SDK
5
+# ESP-SDK-dat
6 6
7
-- [[ESP-dat]] - [[ESP32-SDK-dat]] - [[ESP8266-SDK-dat]]
7
+- [[ESP-dat]] - [[ESP-SDK-dat]] - [[ESP32-SDK-dat]] - [[ESP8266-SDK-dat]]
8 8
9 9
- [[SPIFFS-dat]]
10 10
11
+- [[script-based-SDK-dat]] - [[circuitpython-dat]]
12
+
13
+- [[flash-download-tool-dat]] - [[esptool-dat]]
14
+
15
+- [[arduino-ide-dat]] - [[platformio-dat]] - [[arduino-esp32-dat]] - [[arduino-esp8266-dat]]
16
+
17
+- [[esp-idf-dat]]
18
+
19
+- [[openOCD-dat]]
20
+
21
+- [[freertos-dat]]
22
+
11 23
12 24
## Official SDK
13 25
SDK-dat/ESP-SDK-dat/ESP32-SDK-dat/ESP32-SDK-dat.md
... ...
@@ -1,14 +1,12 @@
1 1
# ESP32-SDK-dat
2 2
3
+- [[ESP-SDK-dat]]
3 4
4 5
5
-- [[esp-idf-dat]] - [[ESP-dat]]
6
+- [[ESP32-debug-log-dat]]
6 7
7
-- [[flash-download-tool-dat]] - [[esptool-dat]]
8 8
9
-- [[ESP32-debug-log-dat]]
10 9
11
-- [[SPIFFS-dat]]
12 10
13 11
## other reference
14 12
SDK-dat/ESP-SDK-dat/ESP32-compiler-error-dat/ESP32-compiler-error-dat.md
... ...
@@ -0,0 +1,35 @@
1
+
2
+# ESP32-compiler-error-dat
3
+
4
+ rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
5
+ configsip: 0, SPIWP:0xee
6
+ clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
7
+ mode:DIO, clock div:1
8
+ load:0x3fff0030,len:4888
9
+ load:0x40078000,len:16456
10
+ load:0x40080400,len:4
11
+ load:0x40080404,len:3476
12
+ entry 0x400805b4
13
+ ESP32-CAM Simple Image Capture to SPIFFS
14
+ E (6) SPIFFS: mount failed, -10025
15
+ E (122) task_wdt: esp_task_wdt_reset(705): task not found
16
+ E (122) task_wdt: esp_task_wdt_reset(705): task not found
17
+ E (128) task_wdt: esp_task_wdt_reset(705): task not found
18
+ E (157) task_wdt: esp_task_wdt_reset(705): task not found
19
+ E (158) task_wdt: esp_task_wdt_reset(705): task not found
20
+ E (158) task_wdt: esp_task_wdt_reset(705): task not found
21
+ E (185) task_wdt: esp_task_wdt_reset(705): task not found
22
+ E (186) task_wdt: esp_task_wdt_reset(705): task not found
23
+
24
+
25
+ "C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2411/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-858a988d-v1\\esp32/flags/cpp_flags" -Wall -Wextra -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"esp32\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:esp32:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=0,EraseFlash=all,JTAGAdapter=default,ZigbeeMode=default\"" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=0 -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-858a988d-v1\\esp32/flags/defines" "-IE:\\Git-category\\Git-Arduino\\Arduino-ESP32\\BSP\\ESP\\ESP1000-ESP32-tori\\rtos-cam-web-2" -iprefix "C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-858a988d-v1\\esp32/include/" "@C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-858a988d-v1\\esp32/flags/includes" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-858a988d-v1\\esp32/qio_qspi/include" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\cores\\esp32" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\variants\\esp32" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\libraries\\FS\\src" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\libraries\\LittleFS\\src" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\libraries\\WiFi\\src" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\libraries\\Network\\src" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\libraries\\WebServer\\src" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\libraries\\Wire\\src" "-Ie:\\Git-category\\Git-Arduino\\Arduino-ESP32\\libraries\\Adafruit_GFX_Library" "-Ie:\\Git-category\\Git-Arduino\\Arduino-ESP32\\libraries\\Adafruit_SSD1306" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.1\\libraries\\SPI\\src" "-Ie:\\Git-category\\Git-Arduino\\Arduino-ESP32\\libraries\\Adafruit_BMP280_Library" "-Ie:\\Git-category\\Git-Arduino\\Arduino-ESP32\\libraries\\Adafruit_Unified_Sensor" "-Ie:\\Git-category\\Git-Arduino\\Arduino-ESP32\\libraries\\Adafruit_BusIO" "@C:\\Users\\Administrator\\AppData\\Local\\arduino\\sketches\\058F81B8D9D12F158C24DA0778C64AEF/build_opt.h" "@C:\\Users\\Administrator\\AppData\\Local\\arduino\\sketches\\058F81B8D9D12F158C24DA0778C64AEF/file_opts" "C:\\Users\\Administrator\\AppData\\Local\\arduino\\sketches\\058F81B8D9D12F158C24DA0778C64AEF\\sketch\\rtos-cam-web-2.ino.cpp" -o "C:\\Users\\Administrator\\AppData\\Local\\arduino\\sketches\\058F81B8D9D12F158C24DA0778C64AEF\\sketch\\rtos-cam-web-2.ino.cpp.o"
26
+ In file included from e:\Git-category\Git-Arduino\Arduino-ESP32\libraries\Adafruit_BMP280_Library/Adafruit_BMP280.h:26,
27
+ from E:\Git-category\Git-Arduino\Arduino-ESP32\BSP\ESP\ESP1000-ESP32-tori\rtos-cam-web-2\rtos-cam-web-2.ino:30:
28
+ e:\Git-category\Git-Arduino\Arduino-ESP32\libraries\Adafruit_Unified_Sensor/Adafruit_Sensor.h:191:3: error: conflicting declaration 'typedef struct sensor_t sensor_t'
29
+ 191 | } sensor_t;
30
+ | ^~~~~~~~
31
+ In file included from C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-858a988d-v1\esp32/include/espressif__esp32-camera/driver/include/esp_camera.h:71,
32
+ from E:\Git-category\Git-Arduino\Arduino-ESP32\BSP\ESP\ESP1000-ESP32-tori\rtos-cam-web-2\rtos-cam-web-2.ino:19:
33
+ C:\Users\Administrator\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-858a988d-v1\esp32/include/espressif__esp32-camera/driver/include/sensor.h:259:3: note: previous declaration as 'typedef struct _sensor sensor_t'
34
+ 259 | } sensor_t;
35
+ | ^~~~~~~~
... ...
\ No newline at end of file
SDK-dat/ESP-SDK-dat/esptool-dat/esptool-dat.md
... ...
@@ -19,6 +19,25 @@ or python2 == pip install esptool
19 19
20 20
## basic usage
21 21
22
+
23
+### erase ESP32
24
+
25
+ Connected to ESP32 on COM7:
26
+ Chip type: ESP32-D0WDQ6 (revision v1.0)
27
+ Features: Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref
28
+ calibration in eFuse, Coding Scheme None
29
+ Crystal frequency: 40MHz
30
+ MAC: 10:52:1c:69:53:a8
31
+
32
+ Stub flasher running.
33
+
34
+ Flash memory erased successfully in 6.4 seconds.
35
+
36
+ Hard resetting via RTS pin...
37
+
38
+
39
+### erase
40
+
22 41
first erase the entire flash using:
23 42
24 43
esptool erase_flash
SDK-dat/arduino-dat/Arduino-IDE-DAT/arduino-IDE-DAT.md
... ...
@@ -7,6 +7,7 @@
7 7
8 8
https://github.com/arduino/arduino-ide
9 9
10
+- [[platformio-dat]] - [[arduino-cli-dat]]
10 11
11 12
## Library list
12 13
SDK-dat/arduino-dat/arduino-cli-dat/arduino-cli-dat.md
... ...
@@ -0,0 +1,73 @@
1
+
2
+# arduino-cli-dat
3
+
4
+
5
+https://github.com/arduino/arduino-cli
6
+
7
+https://arduino.github.io/arduino-cli/1.2/getting-started/
8
+
9
+
10
+install on windows
11
+
12
+https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip
13
+
14
+- [[win-sys-env]]
15
+
16
+Create a configuration file and a new sketch:
17
+
18
+ $ arduino-cli config init
19
+ Config file written: /home/luca/.arduino15/arduino-cli.yaml
20
+
21
+ $ arduino-cli sketch new MyFirstSketch
22
+ Sketch created in: /home/luca/MyFirstSketch
23
+
24
+
25
+install boards
26
+
27
+ arduino-cli board list
28
+ arduino-cli core list
29
+ arduino-cli core install arduino:samd
30
+ arduino-cli board listall mkr
31
+
32
+ C:\Users\Administrator>arduino-cli core list
33
+ ID Installed Latest Name
34
+ arduino:avr 1.8.6 1.8.6 Arduino AVR Boards
35
+ DxCore:megaavr 1.5.11 1.5.11 DxCore
36
+ esp32:esp32 3.2.1 3.2.1 esp32
37
+ esp8266:esp8266 3.1.2 3.1.2 ESP8266 Boards (3.1.2)
38
+ megaTinyCore:megaavr 2.6.10 2.6.10 megaTinyCore
39
+
40
+board manager
41
+
42
+ board_manager:
43
+ additional_urls:
44
+ - https://arduino.esp8266.com/stable/package_esp8266com_index.json
45
+ - https://arduino.esp8266.com/stable/package_esp8266com_index.json
46
+ - file:///absolute/path/to/your/package_nrf52832_index.json
47
+
48
+search and udpate
49
+
50
+ $ arduino-cli core update-index
51
+ Updating index: package_index.json downloaded
52
+ Updating index: package_esp8266com_index.json downloaded
53
+ Updating index: package_nrf52832_index.json
54
+ Updating index: package_index.json downloaded
55
+
56
+ $ arduino-cli core search esp8266
57
+ ID Version Name
58
+ esp8266:esp8266 2.5.2 esp8266
59
+
60
+compile and upload
61
+
62
+ arduino-cli compile --fqbn arduino:samd:mkr1000 MyFirstSketch
63
+ arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:samd:mkr1000 MyFirstSketch
64
+
65
+
66
+ arduino-cli compile --fqbn arduino:samd:mkr1000 0220-BMx280_I2C
67
+
68
+
69
+## library
70
+
71
+arduino-cli lib search debouncer
72
+
73
+arduino-cli lib install FTDebouncer
SDK-dat/freertos-dat/freertos-dat.md
... ...
@@ -0,0 +1,46 @@
1
+
2
+# freertos-dat
3
+
4
+| Feature / RTOS | FreeRTOS | Zephyr RTOS | ThreadX (Azure RTOS) | Bare-Metal (No RTOS) |
5
+| ----------------------- | --------------------------------- | ---------------------------------------- | ---------------------------------- | ------------------------------ |
6
+| **License** | MIT (Permissive, Free) | Apache 2.0 (Permissive, Free) | Microsoft EULA (Free, but limited) | None |
7
+| **Footprint** | Very Small (<10 KB) | Medium (~50–100 KB) | Small (~10–20 KB) | Very Small |
8
+| **Real-Time** | Yes (preemptive, deterministic) | Yes (configurable RT, preemptive) | Yes (deterministic RTOS) | Depends on implementation |
9
+| **Ease of Use** | Simple API, easy learning curve | More complex, powerful config system | Easy API, good documentation | Full control but more effort |
10
+| **Hardware Support** | Very wide (ARM, RISC-V, etc.) | Very wide + device trees | Good (mainly ARM, RISC-V, x86) | Manual per-device work |
11
+| **Task Management** | Yes (tasks, priorities) | Yes (threads, priorities, SMP) | Yes (threads, priorities) | Manual state machine |
12
+| **Synchronization** | Semaphores, mutexes, queues | Semaphores, FIFOs, message queues | Semaphores, mutexes, event flags | Manual implementation |
13
+| **File System Support** | External (e.g., FatFs) | Native FS (e.g., LittleFS, FatFS) | With Azure FileX | Manual or third-party |
14
+| **Networking** | External (e.g., lwIP) | Native (TCP/IP stack, 6LoWPAN) | Azure NetX Duo (IPv4/IPv6) | External, complex to integrate |
15
+| **Power Management** | Basic, user-implemented | Advanced (built-in PM framework) | Good (some MCU-specific features) | Manual |
16
+| **Security/IoT** | AWS IoT support (via Amazon RTOS) | Secure boot, crypto, OTA, TLS | Azure IoT support, TLS, OTA | Manual, very limited |
17
+| **Trace & Debug** | Tools: SystemView, Tracealyzer | Zephyr logging & tracing | NetX, ThreadX tracing tools | Manual logging |
18
+| **Community Support** | Huge, mature ecosystem | Growing fast, backed by Linux Foundation | Good, backed by Microsoft | None (solo dev) |
19
+
20
+simple example 1
21
+
22
+ #include "FreeRTOS.h"
23
+ #include "task.h"
24
+ #include <stdio.h>
25
+
26
+ void vTask1(void *pvParameters) {
27
+ while (1) {
28
+ printf("Task 1 running\n");
29
+ vTaskDelay(pdMS_TO_TICKS(1000)); // Delay 1000 ms
30
+ }
31
+ }
32
+
33
+ void vTask2(void *pvParameters) {
34
+ while (1) {
35
+ printf("Task 2 running\n");
36
+ vTaskDelay(pdMS_TO_TICKS(2000)); // Delay 2000 ms
37
+ }
38
+ }
39
+
40
+ int main(void) {
41
+ xTaskCreate(vTask1, "Task1", 128, NULL, 1, NULL);
42
+ xTaskCreate(vTask2, "Task2", 128, NULL, 1, NULL);
43
+
44
+ vTaskStartScheduler(); // Start FreeRTOS
45
+ while (1);
46
+ }
... ...
\ No newline at end of file
SDK-dat/openOCD-dat/openOCD-dat.md
... ...
@@ -2,6 +2,16 @@
2 2
# openOCD-dat
3 3
4 4
5
+## ESP32 arduino
6
+
7
+
8
+### 1. 🔌 Check Hardware Connections
9
+- Verify JTAG wiring: `TDI`, `TDO`, `TCK`, `TMS`, `GND`, and `3.3V`.
10
+- Ensure ESP32 board is powered.
11
+- Use a reliable USB cable and avoid USB hubs.
12
+
13
+
14
+
5 15
## STM32 Linux
6 16
7 17
### Debugger OpenOCD
SDK-dat/platformIO-dat/platformIO-dat.md
... ...
@@ -1,4 +1,22 @@
1 1
2 2
# platform-io-dat
3 3
4
-https://w.electrodragon.com/w/PlatformIO
... ...
\ No newline at end of file
0
+https://w.electrodragon.com/w/PlatformIO
1
+
2
+platformio project structure:
3
+
4
+
5
+ your_project/
6
+ ├── .pio/ # PlatformIO build system directory (auto-generated)
7
+ ├── .vscode/ # VS Code configuration (if using VS Code)
8
+ ├── include/ # Header files (.h)
9
+ │ └── your_header.h
10
+ ├── lib/ # Custom libraries
11
+ │ └── your_library/
12
+ │ ├── your_library.cpp
13
+ │ └── your_library.h
14
+ ├── src/ # Source files (.cpp or .ino)
15
+ │ └── main.cpp # Main program entry
16
+ ├── test/ # Unit tests
17
+ │ └── test_main.cpp
18
+ ├── platformio.ini # PlatformIO project configuration file
... ...
\ No newline at end of file
SDK-dat/script-based-SDK-dat/script-based-SDK-dat.md
... ...
@@ -0,0 +1,16 @@
1
+
2
+# script-based-SDK-dat
3
+
4
+- [[script-based-SDK]]
5
+
6
+
7
+- [[circuitpython-dat]]
8
+
9
+- [[micropython-dat]] - [[python-dat]]
10
+
11
+- [[luat-dat]] - [[nodemcu-dat]]
12
+
13
+
14
+## ref
15
+
16
+- [[sdk-dat]]
... ...
\ No newline at end of file
SDK-dat/script-based-SDK/script-based-SDK.md
... ...
@@ -1,6 +0,0 @@
1
-
2
-# script-based-SDK
3
-
4
-- [[script-based-SDK]]
5
-
6
-- [[micropython-dat]] - [[python-dat]]
... ...
\ No newline at end of file