はじめに
人間(僕だけ?)と言うのは実に怠け者です。ボタンを押しながら電源入れる(とかリセットする)とか複数のボタンを順番に押すとブートモードになってUART(とかUSB)からMPUに書き込めるってのは御約束の儀式(様式美)ですがRTSやCTSを使ってノータッチ(無詠唱)で書き込める経験をしちゃうとやめられません。世の中にはCH340とかFT232を使ったUARTがいっぱいあってオートブートモードに対応した板も多く売られています。という事はそれだけのニーズがあるからこそでもあります。しかしながら世相の影響などで近年は物価高騰や入手困難が続くようになっております。庶民としては板付きより少しでも安い生石を買ってきて何とかしたいと思うのもまた自然の摂理かと存じます。MPU(CPU)だけではなく同じことがUSB-UARTブリッジを含めた電子系パーツ全般に言えます。生石同士だと大差ないのですが板付きだとCH340x(秋月なら500円~、aitendoなら売り切れ)よりCH552P(秋月なら110円+USBソケット代)の方が安価な状況を鑑みるとUSBaspにも使えるCH552Pを踏み台にするのが合理的と判断しました。その上 CH552P(ソフト) で組めば例のトランジスタとかFETをクロスさせる回路とか要らないしね。
用意するもの
結果的には"CH55 ESP"でググると https://github.com/diodep/ch55x_esp を見つけたので著者に感謝を捧げつつ download して make します。
$ make
sdcc -c -V -mmcs51 --model-small --xram-size 0x0300 --xram-loc 0x0100 --code-size 0x2800 -I/c/Users/2ru/source/repos/ch55x_esp/ch554_sdcc/examples/../include -DFREQ_SYS=24000000 --opt-code-speed main.c
+ ""C:\msys64\mingw64\bin\sdcpp.exe" -nostdinc -Wall -std=c11 -I"C:/Users/2ru/source/repos/ch55x_esp/ch554_sdcc/examples/../include" -D"FREQ_SYS=24000000" --obj-ext=.rel -D__SDCC_CHAR_UNSIGNED -D__SDCC_MODEL_SMALL -D__SDCC_OPTIMIZE_SPEED -D__SDCC_FLOAT_REENT -D__SDCCCALL=0 -D__SDCC=4_5_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=0 -DSDCC=450 -D__SDCC_REVISION=15242 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__SIZEOF_FLOAT__=4 -D__SIZEOF_DOUBLE__=4 -D__SDCC_BITINT_MAXWIDTH=64 -isystem "C:\msys64\mingw64\bin\..\share\sdcc\include\mcs51" -isystem "C:\msys64\mingw64\bin\..\share\sdcc\include" -xc "main.c" "
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:16: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:22: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:23: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:24: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:27: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:28: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:29: warning 283: function declarator with no prototype
main.c:103: warning 283: function declarator with no prototype
main.c:117: warning 283: function declarator with no prototype
main.c:144: warning 283: function declarator with no prototype
main.c:161: warning 283: function declarator with no prototype
main.c:320: warning 158: overflow in implicit constant conversion
main.c:728: warning 283: function declarator with no prototype
main.c:824: syntax error: token -> '1' ; column 46
main.c:15: fatal error: when writing output to : Broken pipe
15 |
|
compilation terminated.
subprocess error 1
make: *** [../ch554_sdcc/examples/Makefile.include:42: main.rel] エラー 1
アレ~っ、SYNTAXエラーが出てますね。
エラーの出てる824行を
void Uart0_ISR(void) __interrupt (INT_NO_UART0) __using(1) __naked
に書き換えて再度makeします。
$ make
sdcc -c -V -mmcs51 --model-small --xram-size 0x0300 --xram-loc 0x0100 --code-size 0x2800 -I/c/Users/2ru/source/repos/ch55x_esp/ch554_sdcc/examples/../include -DFREQ_SYS=24000000 --opt-code-speed main.c
+ ""C:\msys64\mingw64\bin\sdcpp.exe" -nostdinc -Wall -std=c11 -I"C:/Users/2ru/source/repos/ch55x_esp/ch554_sdcc/examples/../include" -D"FREQ_SYS=24000000" --obj-ext=.rel -D__SDCC_CHAR_UNSIGNED -D__SDCC_MODEL_SMALL -D__SDCC_OPTIMIZE_SPEED -D__SDCC_FLOAT_REENT -D__SDCCCALL=0 -D__SDCC=4_5_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=0 -DSDCC=450 -D__SDCC_REVISION=15242 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__SIZEOF_FLOAT__=4 -D__SIZEOF_DOUBLE__=4 -D__SDCC_BITINT_MAXWIDTH=64 -isystem "C:\msys64\mingw64\bin\..\share\sdcc\include\mcs51" -isystem "C:\msys64\mingw64\bin\..\share\sdcc\include" -xc "main.c" "
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:16: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:22: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:23: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:24: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:27: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:28: warning 283: function declarator with no prototype
c:\users\2ru\source\repos\ch55x_esp\ch554_sdcc\include\debug.h:29: warning 283: function declarator with no prototype
main.c:103: warning 283: function declarator with no prototype
main.c:117: warning 283: function declarator with no prototype
main.c:144: warning 283: function declarator with no prototype
main.c:161: warning 283: function declarator with no prototype
main.c:320: warning 158: overflow in implicit constant conversion
main.c:728: warning 283: function declarator with no prototype
main.c:1082: warning 283: function declarator with no prototype
main.c:1094: warning 283: function declarator with no prototype
main.c:1095: warning 278: return type of function omitted, assuming int
+ ""C:\msys64\mingw64\bin\sdas8051.exe" -plosgffw "main.rel" "main".asm"
sdcc -c -V -mmcs51 --model-small --xram-size 0x0300 --xram-loc 0x0100 --code-size 0x2800 -I/c/Users/2ru/source/repos/ch55x_esp/ch554_sdcc/examples/../include -DFREQ_SYS=24000000 --opt-code-speed ../ch554_sdcc/include/debug.c
+ ""C:\msys64\mingw64\bin\sdcpp.exe" -nostdinc -Wall -std=c11 -I"C:/Users/2ru/source/repos/ch55x_esp/ch554_sdcc/examples/../include" -D"FREQ_SYS=24000000" --obj-ext=.rel -D__SDCC_CHAR_UNSIGNED -D__SDCC_MODEL_SMALL -D__SDCC_OPTIMIZE_SPEED -D__SDCC_FLOAT_REENT -D__SDCCCALL=0 -D__SDCC=4_5_0 -D__SDCC_VERSION_MAJOR=4 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=0 -DSDCC=450 -D__SDCC_REVISION=15242 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__SIZEOF_FLOAT__=4 -D__SIZEOF_DOUBLE__=4 -D__SDCC_BITINT_MAXWIDTH=64 -isystem "C:\msys64\mingw64\bin\..\share\sdcc\include\mcs51" -isystem "C:\msys64\mingw64\bin\..\share\sdcc\include" -xc "../ch554_sdcc/include/debug.c" "
../ch554_sdcc/include/debug.h:16: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.h:22: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.h:23: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.h:24: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.h:27: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.h:28: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.h:29: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:27: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:147: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:161: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:193: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:239: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:253: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:265: warning 283: function declarator with no prototype
../ch554_sdcc/include/debug.c:280: warning 283: function declarator with no prototype
+ ""C:\msys64\mingw64\bin\sdas8051.exe" -plosgffw "debug.rel" "debug".asm"
sdcc main.rel debug.rel -V -mmcs51 --model-small --xram-size 0x0300 --xram-loc 0x0100 --code-size 0x2800 -I/c/Users/2ru/source/repos/ch55x_esp/ch554_sdcc/examples/../include -DFREQ_SYS=24000000 --opt-code-speed -o usb_ft232bm.ihx
+ ""C:\msys64\mingw64\bin\sdld.exe" -nf "usb_ft232bm.lk""
objcopy -I ihex -O binary usb_ft232bm.ihx usb_ft232bm.bin
packihx usb_ft232bm.ihx > usb_ft232bm.hex
packihx: read 148 lines, wrote 271: OK.
出来あがった usb_ft232bm.hex(気持ちは分かるけどねぇ~) をWCHISPStudioでCH552Pに焼きます

配線
| AE-QFN16-DIP-CH552P | AE-ESP32-WROOM-32E-MINI | |
|---|---|---|
| TXD0 = P3.1(9pin) | ~~~> | RX |
| RXD0 = P3.0(10pin) | <--- | TX |
| GND = GND(0pin) | ---- | GND |
| TXD1 = P1.7(6pin) | RTS~~> | IO0(19pin) |
| CAP1 = P1.0(8pin) | DTR~~> | EN(2pin) |
皆さんがトランジスタ/FETをクロスで組んでる回路はmain.cの337~380行にかけてのコードで実装されているので不要です。ただし面倒なんでCH552Pは5VのままESP32は3.3Vで行きます。レベルコンバータの買い置きが無かったのとフォトカプラ並べるのが面倒だったんで僕は10kΩと10KΩx2の分圧回路を3組とESP32からCH552Pの戻りは直結にしちゃいました。
(以下、2026.01.13追記)
CH552Pの電源電圧は3.3~5Vなので3.3V駆動にしちゃえばESP32と直結できるかもしれません。そのうち試してみたいと思います。
(以下、2026.01.14追記)
その後、データーシートの確認と実証実験を行いました。CH552PのUSB通信はVPP=5Vから内部レギュレータで3.3Vを作る事により動作しているためUSB通信を成立させるためにはVPP=5Vが必須です。結果としてUARTやGPIOは5VレベルになるのでESP32等の3.3Vマイコンとつなぐ場合はレベルコンバータが必須です。
書き込みテスト
CH552Pはボーレートのクロック分周の都合で高速域は誤差が大きくなります。安全運転のためArduino IDEを立ち上げたらツール→Upload Speed→115200bpsにボーレート設定して偽JJYプログラムを書き込んでみます。
C:\Users\2ru\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.1.0/esptool.exe" --chip esp32 --port "COM14" --baud 115200 --before default-reset --after hard-reset write-flash -z --flash-mode keep --flash-freq keep --flash-size keep 0x1000 "C:\Users\2ru\AppData\Local\arduino\sketches\1265600A096E427FBE620E55B6ED0C53/esp32_NTP2JJY.ino.bootloader.bin" 0x8000 "C:\Users\2ru\AppData\Local\arduino\sketches\1265600A096E427FBE620E55B6ED0C53/esp32_NTP2JJY.ino.partitions.bin" 0xe000 "C:\Users\2ru\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.5/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\2ru\AppData\Local\arduino\sketches\1265600A096E427FBE620E55B6ED0C53/esp32_NTP2JJY.ino.bin"
esptool v5.1.0
Serial port COM14:
Connecting....
Connected to ESP32 on COM14:
Chip type: ESP32-D0WD-V3 (revision v3.1)
Features: Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref calibration in eFuse, Coding Scheme None
Crystal frequency: 40MHz
MAC: xx:xx:xx:xx:xx:xx
Uploading stub flasher...
Running stub flasher...
Stub flasher running.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000effff...
Compressed 25184 bytes to 16080...
Writing at 0x00001000 [ ] 0.0% 0/16080 bytes...
Writing at 0x00007260 [==============================] 100.0% 16080/16080 bytes...
Wrote 25184 bytes (16080 compressed) at 0x00001000 in 1.8 seconds (111.8 kbit/s).
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000 [ ] 0.0% 0/146 bytes...
Writing at 0x00008c00 [==============================] 100.0% 146/146 bytes...
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (346.4 kbit/s).
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000 [ ] 0.0% 0/47 bytes...
Writing at 0x00010000 [==============================] 100.0% 47/47 bytes...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (710.7 kbit/s).
Hash of data verified.
Compressed 915632 bytes to 589133...
Writing at 0x00010000 [ ] 0.0% 0/589133 bytes...
Writing at 0x0001c45c [ ] 2.8% 16384/589133 bytes...
Writing at 0x00026232 [> ] 5.6% 32768/589133 bytes...
Writing at 0x0003390e [=> ] 8.3% 49152/589133 bytes...
Writing at 0x0003c59d [==> ] 11.1% 65536/589133 bytes...
Writing at 0x00042289 [===> ] 13.9% 81920/589133 bytes...
Writing at 0x000477e8 [====> ] 16.7% 98304/589133 bytes...
Writing at 0x0004ca2b [====> ] 19.5% 114688/589133 bytes...
Writing at 0x00051ff0 [=====> ] 22.2% 131072/589133 bytes...
Writing at 0x00057596 [======> ] 25.0% 147456/589133 bytes...
Writing at 0x0005c764 [=======> ] 27.8% 163840/589133 bytes...
Writing at 0x00061de1 [========> ] 30.6% 180224/589133 bytes...
Writing at 0x00067479 [=========> ] 33.4% 196608/589133 bytes...
Writing at 0x0006cc60 [=========> ] 36.2% 212992/589133 bytes...
Writing at 0x00072512 [==========> ] 38.9% 229376/589133 bytes...
Writing at 0x000777a3 [===========> ] 41.7% 245760/589133 bytes...
Writing at 0x0007ca80 [============> ] 44.5% 262144/589133 bytes...
Writing at 0x0008236f [=============> ] 47.3% 278528/589133 bytes...
Writing at 0x000879c3 [==============> ] 50.1% 294912/589133 bytes...
Writing at 0x0008d385 [==============> ] 52.8% 311296/589133 bytes...
Writing at 0x00092feb [===============> ] 55.6% 327680/589133 bytes...
Writing at 0x0009887a [================> ] 58.4% 344064/589133 bytes...
Writing at 0x0009de22 [=================> ] 61.2% 360448/589133 bytes...
Writing at 0x000a373d [==================> ] 64.0% 376832/589133 bytes...
Writing at 0x000a9204 [===================> ] 66.7% 393216/589133 bytes...
Writing at 0x000aec5f [===================> ] 69.5% 409600/589133 bytes...
Writing at 0x000b43f6 [====================> ] 72.3% 425984/589133 bytes...
Writing at 0x000b9d86 [=====================> ] 75.1% 442368/589133 bytes...
Writing at 0x000bfcec [======================> ] 77.9% 458752/589133 bytes...
Writing at 0x000c5897 [=======================> ] 80.7% 475136/589133 bytes...
Writing at 0x000cb110 [========================> ] 83.4% 491520/589133 bytes...
Writing at 0x000d3fb5 [========================> ] 86.2% 507904/589133 bytes...
Writing at 0x000d981b [=========================> ] 89.0% 524288/589133 bytes...
Writing at 0x000deb36 [==========================> ] 91.8% 540672/589133 bytes...
Writing at 0x000e4387 [===========================> ] 94.6% 557056/589133 bytes...
Writing at 0x000e9ee9 [============================> ] 97.3% 573440/589133 bytes...
Writing at 0x000ef8b0 [==============================] 100.0% 589133/589133 bytes...
Wrote 915632 bytes (589133 compressed) at 0x00010000 in 53.8 seconds (136.2 kbit/s).
Hash of data verified.
Hard resetting via RTS pin...
バッチリですね。
CH552Pだと分周レジスタの都合でESP32とネゴれるレートが限られます。仕上げにスピードテストをしてみます。
"C:\Users\wan2r\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.1.0/esptool.exe" --chip esp32 --port "COM17" --baud 1500000 --before default-reset --after hard-reset write-flash -z --flash-mode keep --flash-freq keep --flash-size keep 0x1000 "C:\Users\wan2r\AppData\Local\arduino\sketches\1265600A096E427FBE620E55B6ED0C53/esp32_NTP2JJY.ino.bootloader.bin" 0x8000 "C:\Users\wan2r\AppData\Local\arduino\sketches\1265600A096E427FBE620E55B6ED0C53/esp32_NTP2JJY.ino.partitions.bin" 0xe000 "C:\Users\wan2r\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.6/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\2ru\AppData\Local\arduino\sketches\1265600A096E427FBE620E55B6ED0C53/esp32_NTP2JJY.ino.bin"
esptool v5.1.0
Serial port COM17:
Connecting.....
Connected to ESP32 on COM17:
Chip type: ESP32-D0WD-V3 (revision v3.1)
Features: Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref calibration in eFuse, Coding Scheme None
Crystal frequency: 40MHz
MAC: xx:xx:xx:xx:xx:xx
Uploading stub flasher...
Running stub flasher...
Stub flasher running.
Changing baud rate to 1500000...
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000effff...
Compressed 25184 bytes to 16076...
Writing at 0x00001000 [ ] 0.0% 0/16076 bytes...
Writing at 0x00007260 [==============================] 100.0% 16076/16076 bytes...
Wrote 25184 bytes (16076 compressed) at 0x00001000 in 0.5 seconds (390.3 kbit/s).
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000 [ ] 0.0% 0/146 bytes...
Writing at 0x00008c00 [==============================] 100.0% 146/146 bytes...
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (508.2 kbit/s).
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000 [ ] 0.0% 0/47 bytes...
Writing at 0x00010000 [==============================] 100.0% 47/47 bytes...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (738.1 kbit/s).
Hash of data verified.
Compressed 916800 bytes to 589825...
Writing at 0x00010000 [ ] 0.0% 0/589825 bytes...
Writing at 0x0001c4b8 [ ] 2.8% 16384/589825 bytes...
Writing at 0x0002633b [> ] 5.6% 32768/589825 bytes...
Writing at 0x0003389f [=> ] 8.3% 49152/589825 bytes...
Writing at 0x0003c6bc [==> ] 11.1% 65536/589825 bytes...
Writing at 0x000423ea [===> ] 13.9% 81920/589825 bytes...
Writing at 0x000478c6 [===> ] 16.7% 98304/589825 bytes...
Writing at 0x0004caef [====> ] 19.4% 114688/589825 bytes...
Writing at 0x000520b9 [=====> ] 22.2% 131072/589825 bytes...
Writing at 0x00057674 [======> ] 25.0% 147456/589825 bytes...
Writing at 0x0005c7bb [=======> ] 27.8% 163840/589825 bytes...
Writing at 0x00061eb7 [========> ] 30.6% 180224/589825 bytes...
Writing at 0x000674f5 [========> ] 33.3% 196608/589825 bytes...
Writing at 0x0006cc6e [=========> ] 36.1% 212992/589825 bytes...
Writing at 0x00072588 [==========> ] 38.9% 229376/589825 bytes...
Writing at 0x0007783a [===========> ] 41.7% 245760/589825 bytes...
Writing at 0x0007caca [============> ] 44.4% 262144/589825 bytes...
Writing at 0x00082429 [=============> ] 47.2% 278528/589825 bytes...
Writing at 0x00087a77 [=============> ] 50.0% 294912/589825 bytes...
Writing at 0x0008d47f [==============> ] 52.8% 311296/589825 bytes...
Writing at 0x00093095 [===============> ] 55.6% 327680/589825 bytes...
Writing at 0x0009893b [================> ] 58.3% 344064/589825 bytes...
Writing at 0x0009deb6 [=================> ] 61.1% 360448/589825 bytes...
Writing at 0x000a37b5 [==================> ] 63.9% 376832/589825 bytes...
Writing at 0x000a92ad [==================> ] 66.7% 393216/589825 bytes...
Writing at 0x000aece0 [===================> ] 69.4% 409600/589825 bytes...
Writing at 0x000b44da [====================> ] 72.2% 425984/589825 bytes...
Writing at 0x000b9e5f [=====================> ] 75.0% 442368/589825 bytes...
Writing at 0x000bfd9b [======================> ] 77.8% 458752/589825 bytes...
Writing at 0x000c5984 [=======================> ] 80.6% 475136/589825 bytes...
Writing at 0x000cb137 [=======================> ] 83.3% 491520/589825 bytes...
Writing at 0x000d4078 [========================> ] 86.1% 507904/589825 bytes...
Writing at 0x000d98ff [=========================> ] 88.9% 524288/589825 bytes...
Writing at 0x000dec43 [==========================> ] 91.7% 540672/589825 bytes...
Writing at 0x000e4496 [===========================> ] 94.4% 557056/589825 bytes...
Writing at 0x000e9ef3 [============================> ] 97.2% 573440/589825 bytes...
Writing at 0x000efd40 [============================> ] 100.0% 589824/589825 bytes...
Writing at 0x000efd40 [==============================] 100.0% 589825/589825 bytes...
Wrote 916800 bytes (589825 compressed) at 0x00010000 in 9.4 seconds (779.8 kbit/s).
Hash of data verified.
Hard resetting via RTS pin...
僕の条件では1.5Mbpsが上限でした。オーバーヘッドのせいだと思いますが750Kbpsを超えると実効値はたいして上がらないのでヨシとしています。ついでに自分の使ってるボード(僕の場合は秋月のAE-ESP32-WROOM-32E-MINIを使用なのでC:\Users\ユーザー名\AppData\Local\Arduino15\packages\esp32\hardware\esp32\バージョン番号\boards.txtの1956行目あたり)に
esp32.menu.UploadSpeed.1500000=1500000
esp32.menu.UploadSpeed.1500000.upload.speed=1500000
いう風に自分の環境で通る上限のボーレートを入れておくと便利だと思います。
まとめ
一番時間を要したのはファームウェア(先人の叡智)を見つけ出す事で1週間以上かかってます。配線ミスして(5V3.3V問題があるんでビビり(確認し)ながらやったんで)数時間を要しましたが良い経験です。ピンの初期化が悪いんじゃないかとかアレコレ悩み勉強(大概、先人が正しいの法則)させていただきました。110円でこれだけできれば僕的には満足です。思わず追加で3枚買っちゃいました。最低賃金が1000円を超える時代に於いて(更には買いに行く運賃なり通販なら送料を加えても)費用対効果を鑑みてリーズナブルな方法を選んでいただけたらと思います。
