Installing the ESP32 Arduino Core - cchamchi/ESP32 GitHub Wiki

์•„๋ž˜ ์‚ฌ์ดํŠธ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ๋งŒ๋“ค์–ด ์กŒ์Šต๋‹ˆ๋‹ค.

https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide#installing-the-esp32-arduino-core

ESP32์˜ Tensilica์ฝ”์–ด pair๋Š” ARM๋˜๋Š” AVR์ด ์•„๋‹Œ Xtensal ๊ธฐ๋ฐ˜์˜ ์ฝ”์–ด์ž…๋‹ˆ๋‹ค. ๋‹คํ–‰ํžˆ๋„, ์•„์ง๋„ ESP32์šฉ์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” GNU์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ์žˆ์–ด ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์ด ๋Œ€ํญ ๊ฐœ์„ ๋  ์ˆ˜ ์žˆ๋‹ค! ๋ณธ ์ž์Šต์„œ์˜ ๋‚˜๋จธ์ง€ ๋ถ€๋ถ„์—์„œ๋Š” ESP32์ง€์›์„ ๋ฐ›๋Š” ์•„๋ฅด ๋’ค๋…ธ IDE์˜ ์„ค์ •์— ๋Œ€ํ•ด ์„ค๋ช…ํ•˜๊ณ , Wi-Fi๊ฐ€์šฉ ๋งˆ์ดํฌ๋กœ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ์ฒ˜์Œ ์ ‘ํ•˜๋Š”๋ฐ ํ•„์š”ํ•œ ๊ฐ„๋‹จํ•œ ์˜ˆ์ œ ์Šค์ผ€์น˜๋ฅผ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

๋ณต์žกํ•œ ์˜ค๋ฒ„ ํ—ค๋“œ๋ฅผ ์ถ”์ƒํ™”ํ•จ์— ์žˆ์–ด, ESP32์šฉ ์•„๋‘์ด๋…ธ IDE๋Š” ๋ช‡๊ฐ€์ง€ ๊ธฐ๋Šฅ์— ์•ก์„ธ์Šค ํ• ์ˆ˜๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ESP32์šฉ ๊ณ ๊ธ‰ ํˆด์ฒด์ธ์„ ์ง์ ‘ ์„ค์น˜ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด Espressif's esp-idf GitHub repository ๋ฅผ ์ถ”์ฒœํ•ฉ๋‹ˆ๋‹ค. IoT DevelopmentFramework์˜ ์ค„์ž„๋ง์ธ esp-idf๋Š” ESP32์šฉ SDK(SoftwareDevelopmentKit)์ž…๋‹ˆ๋‹ค.

Installing the ESP32 Core

Espressifโ€™์˜ ๊ณต์‹ ESP32 Arduino core๋Š” ์—ฌ๊ธฐ์— host๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. GitHub. ์•„์ง Arduino board manager install ์€ ์ œ๊ณต๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. (it should be coming soon), ํ•˜์ง€๋งŒ ์„ค์น˜ ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.simple set of installation directions

Windows

Clone or Download the Core

ESP32 board definitions์„ ์ธ์Šคํ†จ ํ•˜๊ธฐ ์œ„ํ•ด์„œ esp32-arduino repository๋ฅผ ๋‹ค์šด๋กœ๋“œ ํ•˜์—ฌ Arduino sketchbook directory์— โ€œhardware/espressif/esp32โ€ํด๋”๋ฅผ ๋งŒ๋“ค๊ณ  ๋ณต์‚ฌํ•˜์—ฌ์•ผ ํ•ฉ๋‹ˆ๋‹ค.esp32-arduino repository๋ฅผ ๋‹ค์šด๋กœ๋“œํ•˜๋Š” ๋ฐฉ๋ฒ•์€ git command line tool์„ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ Github์—์„œ ์ง์ ‘ ๋‹ค์šด๋กœ๋“œ ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์„œ๋Š” ์ ‘๊ทผํ•˜๊ธฐ ์‰ฌ์šด ํ›„์ž๋กœ ์„ค๋ช…ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

Github์—์„œ ์ง์ ‘ ๋‹ค์šด๋กœ๋“œํ•˜๊ธฐ ์œ„ํ•ด arduino-esp-master.zip๋ฅผ ํด๋ฆญํ•˜์„ธ์š”.(or click โ€œDownloadโ€ > โ€œDownload ZIPโ€ on the GitHub page), ๊ทธ๋ฆฌ๊ณ  unzipํ•œํ›„์— Arduino sketchbook directory์— ์žˆ๋Š” โ€œhardware/espressif/esp32โ€์— ๋ณต์‚ฌ ํ•ฉ๋‹ˆ๋‹ค.

<์ฃผ์˜> arduino-esp-master ๋ผ๋Š” ํด๋” ๋ฐ‘์— ์žˆ๋Š” ๋‚ด์šฉ์„ โ€œhardware/espressif/esp32โ€์— ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค. 

Install the Xtensa and ESP32 Tools

๋‹ค์Œ ๋‹จ๊ณ„๋Š” Xtensa GNU compiler collection (GCC)์„ ์ธ์Šคํ†จํ•ฉ๋‹ˆ๋‹ค. Windows users can run get.exe, found in the โ€œesp32/toolsโ€ ํด๋”์— ์žˆ๋Š” get.exe๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

Arduino Example: Blink

With the ESP32 Arduino core installed, youโ€™re ready to begin programming. If you havenโ€™t already, plug the ESP32 Thing into your computer using a micro-B USB cable.

Once the board is plugged in (and drivers installed), it should be assigned a unique port identifier. On Windows machines, this will be something like โ€œCOM#โ€, and on Macs or Linux computers it will come in the form of โ€œ/dev/tty.usbserial-XXXXXX.โ€

Select the Board and Port

Once the ESP32 Arduino core is installed, you should see an โ€œSparkFun ESP32 Thingโ€ option under your โ€œToolsโ€ > โ€œBoardโ€ menu. Select that.

Then select your ESP32 Thingโ€™s serial port under the โ€œToolsโ€ > โ€œPortโ€ menu.

You can also select the โ€œUpload Speedโ€. 921600 baud โ€“ the fastest selectable rate โ€“ will get the code loaded onto your ESP32 the fastest, but may fail to upload once-in-a-while. (Itโ€™s still way worth it for the speed increase!)

Loading Blink

To make sure your toolchain and board are properly set up, weโ€™ll upload the simplest of sketches โ€“ Blink! The LED attached to GPIO 5 is perfect for this test. Plus, with the ESP32 attached to your computer, itโ€™s a good time to test out serial. Copy and paste the example sketch below, into a fresh Arduino sketch:

int ledPin = 5;

void setup()
{
    pinMode(ledPin, OUTPUT);
    Serial.begin(115200);
}

void loop()
{
    Serial.println("Hello, world!");
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(500);
}