トップ 差分 一覧 ソース 検索 ヘルプ RSS ログイン

PRG-arduino-esp32

Arduino IDE のモジュール

https://github.com/espressif/arduino-esp32/tree/master/tools/sdk

# Linux 装置によっては
# pip install pyserial 
# を実効する事が必要?? ( Hexコードの書き込みに )
 install git wget make libncurses-dev flex bison gperf python python-serial ncurses-devel python2-future

インストール手順

環境設定に以下を追加
https://dl.espressif.com/dl/package_esp32_index.json
を追加
旧方法
1: GIT から zip でダウンロード
2: unzip で解凍
3: $HOME/Arduino/hardware/espressif/esp32/ 以下に 2) をコピー
4: cd~/Arduino/hardware/espressif/esp32/tools
5: ./get.py    もしくは python ./get.py を実行

esp-idf の場合PRG-espidf

https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html
git clone --recursive https://github.com/espressif/esp-idf.git
cd ./esp-idf
git submodule update --init

ボード設定

ボード: ESP32 Dev Module
Flash Frequency: 80MHz
Upload Speed: 921600
Core Debug Level: なし
書込み装置: USBasp

FIRMWARE Backup

./esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 read_flash 0x0000 4194304 ../esp32.bin

FIRMWARE Restore

./esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 write_flash 0x0000 ../esp32.bin

書き込みの手順

1. RESET + IO0を同時押し
2. RESETを離す
3. Arduino IDEの「書き込みボタン」を押す
esp-idfでの書き込み
  make flash
  make monitor
    ^] 

https://www.hirotakaster.com/weblog/esp32-s-and-arduino/

Wifi

WEP | work
WEP/ASE | does not work!!

Web sample

https://www.mgo-tec.com/blog-entry-esp-wroom-32-esp32-wifi-smartphone-led-switch.html

http://rikoubou.hatenablog.com/entry/2017/05/09/180847

赤外線

https://qiita.com/td2sk/items/4c0ef83bcc7e74e5e8d5

GIT

https://github.com/espressif/arduino-esp32

FUSEbit

> ./espefuse.py --port /dev/ttyUSB0 summary
espefuse.py v2.0.1
Connecting......
Security fuses:
FLASH_CRYPT_CNT        Flash encryption mode counter                     = 0 R/W (0x0)
FLASH_CRYPT_CONFIG     Flash encryption config (key tweak bits)          = 0 R/W (0x0)
CONSOLE_DEBUG_DISABLE  Disable ROM BASIC interpreter fallback            = 0 R/W (0x0)
ABS_DONE_0             secure boot enabled for bootloader                = 0 R/W (0x0)
ABS_DONE_1             secure boot abstract 1 locked                     = 0 R/W (0x0)
JTAG_DISABLE           Disable JTAG                                      = 0 R/W (0x0)
DISABLE_DL_ENCRYPT     Disable flash encryption in UART bootloader       = 0 R/W (0x0)
DISABLE_DL_DECRYPT     Disable flash decryption in UART bootloader       = 0 R/W (0x0)
DISABLE_DL_CACHE       Disable flash cache in UART bootloader            = 0 R/W (0x0)
BLK1                   Flash encryption key                              
 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W 
BLK2                   Secure boot key                                   
 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W 
BLK3                   Variable Block 3                                  
 = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W 

Efuse fuses:
WR_DIS                 Efuse write disable mask                          = 0 R/W (0x0)
RD_DIS                 Efuse read disablemask                            = 0 R/W (0x0)
CODING_SCHEME          Efuse variable block length scheme                = 0 R/W (0x0)
KEY_STATUS             Usage of efuse block 3 (reserved)                 = 0 R/W (0x0)

Config fuses:
XPD_SDIO_FORCE         Ignore MTDI pin (GPIO12) for VDD_SDIO on reset    = 0 R/W (0x0)
XPD_SDIO_REG           If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset   = 0 R/W (0x0)
XPD_SDIO_TIEH          If XPD_SDIO_FORCE & XPD_SDIO_REG, 1=3.3V 0=1.8V   = 0 R/W (0x0)
SPI_PAD_CONFIG_CLK     Override SD_CLK pad (GPIO6/SPICLK)                = 0 R/W (0x0)
SPI_PAD_CONFIG_Q       Override SD_DATA_0 pad (GPIO7/SPIQ)               = 0 R/W (0x0)
SPI_PAD_CONFIG_D       Override SD_DATA_1 pad (GPIO8/SPID)               = 0 R/W (0x0)
SPI_PAD_CONFIG_HD      Override SD_DATA_2 pad (GPIO9/SPIHD)              = 0 R/W (0x0)
SPI_PAD_CONFIG_CS0     Override SD_CMD pad (GPIO11/SPICS0)               = 0 R/W (0x0)
DISABLE_SDIO_HOST      Disable SDIO host                                 = 0 R/W (0x0)

Identity fuses:
MAC                    MAC Address                                       = xx:xx:xx:xx:xx:xx R/W 
CHIP_VERSION           Chip version                                      = 0 R/W (0x0)
CHIP_PACKAGE           Chip package identifier                           = 0 R/W (0x0)

Flash voltage (VDD_SDIO) determined by GPIO12 on reset (High for 1.8V, Low/NC for 3.3V).

BLE-HID

git clone https://github.com/bluekitchen/btstack.git
cd ./btstack
cd ./btstack/port/esp32
./integrate_btstack.py
cd ./example

PS4 コントローラを使う

https://github.com/felis/USB_Host_Shield_2.0
https://github.com/felis/USB_Host_Shield_2.0.git

bpi-bit faimware

https://github.com/BPI-STEAM
( webduino )
like this
( ./esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash --flash_mode qio --flash_size 32m 0x0 bootloader.bin 0x1000 my_app.bin)
( ./esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z --flash_mode dio --flash_freq 40m 0x1000 bit_BL_DIO_40M.bin 0x8000 bit_partitions.bin 0xe000 bit_boot_app0.bin 0x10000 bit_default.bin )

start addr 	descritption
0x1000 	bootloader.bin
0x8000 	partitions_singleapp.bin
0xe000 	boot_app0.bin
0x10000 	your app ( firmware.bin )

マルチタスク

https://www.mgo-tec.com/blog-entry-arduino-esp32-multi-task-dual-core-01.html

Tips

https://www.mgo-tec.com/blog-entry-esp-wroom-32-esp32-wifi-smartphone-led-switch.html

http://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html

http://esp-idf.readthedocs.io/en/latest/get-started/index.html#get-started-get-esp-idf

https://github.com/espressif/arduino-esp32#using-as-esp-idf-component

http://ht-deko.com/arduino/esp-wroom-32.html

http://www.espressif.com/en/products/hardware/esp32/resources

https://www.mgo-tec.com/blog-entry-esp32-devkitc-wroom32-wifi-websocket-cds.html

http://daiwa-c.blog.jp/tag/ESP-WROOM-32

KICAD

http://www.kicad-de-kiban.net/archives/esp32_2.htmlhttp://www.kicad-de-kiban.net/archives/esp32_7.html