Last active
December 26, 2019 15:48
-
-
Save Naohiro2g/c385e77a327a2b79261e39798322a3a7 to your computer and use it in GitHub Desktop.
MacでESP32のLチカ(ESP-IDF版)2019-02-20 ref: https://qiita.com/naohiro2g/items/79c99eac5254be1d051d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo easy_install pip | |
sudo pip install pyserial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/esp | |
cd ~/esp | |
curl -O https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz | |
tar -xzf xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH | |
export IDF_PATH=~/esp/esp-idf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/esp | |
git clone --recursive https://github.com/espressif/esp-idf.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m pip install --user -r $IDF_PATH/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/esp | |
git clone https://github.com/espressif/esp-idf-template.git myapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/esp/myapp | |
make flash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls /dev/cu.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server:myapp tsuji$ make flash | |
Flashing binaries to serial port /dev/cu.SLAB_USBtoUART (app at offset 0x10000)... | |
esptool.py v2.0-beta1 | |
Connecting...... | |
Uploading stub... | |
Running stub... | |
Stub running... | |
Changing baud rate to 921600 | |
Changed. | |
Attaching SPI flash... | |
Configuring flash size... | |
Auto-detected Flash size: 4MB | |
Flash params set to 0x022f | |
Compressed 9504 bytes to 5656... | |
Wrote 9504 bytes (5656 compressed) at 0x00001000 in 0.1 seconds (effective 887.3 kbit/s)... | |
Hash of data verified. | |
Compressed 488048 bytes to 247504... | |
Wrote 488048 bytes (247504 compressed) at 0x00010000 in 5.1 seconds (effective 758.3 kbit/s)... | |
Hash of data verified. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server:myapp tsuji$ make flash | |
CC main.o | |
AR libmain.a | |
LD app-template.elf | |
esptool.py v2.0-beta1 | |
Flashing binaries to serial port /dev/cu.SLAB_USBtoUART (app at offset 0x10000)... | |
esptool.py v2.0-beta1 | |
Connecting........................................... | |
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header | |
make: *** [flash] Error 2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment