:::: MENU ::::

Mac OS에서 ESP8266 개발 환경

아두이노

1. Arduino > Preferences… 의 메뉴에서 추가적인 보드매니저 URLs에 다음의 링크를 입력한다.

http://arduino.esp8266.com/stable/package_esp8266com_index.json

2. 툴 > 보드 > 보드 매니저… 의 메뉴의 필터에 ESP를 입력 후 esp8266을 선택후 설치한다.

Sming

맥에서는 https://github.com/SmingHub/Sming/wiki/MacOS-Quickstart 이 링크의 내용대로 따라하면 별 무리가 없다. 즉 이클립스, 툴체인, ESP SDK를 설치하고 Sming core를 빌드한다.

이클립스의 환경설정에서 SMING_HOME, ESP_HOME 설정을 한다.

 

SmingFramework의 Makefile-project.mk파일에서 ESPTOOL2의 경로를 다음과 같이 수정한다.

ESPTOOL2 ?= /opt/esp-open-sdk/utils/esptool2

Makefile-macos.mk파일에서 ESPTOOL의 경로를 다음과 같이 수정하고, COM_PORT항목도 환경에 맞게 수정한다.

ESPTOOL ?= $(ESP_HOME)/utils/esptool.py

Basic_Blink 프로젝트의 Makefile-user.mk파일도 다음과 같이 수정한다.

# Local build configuration

## Parameters configured here will override default and ENV values.

## Uncomment and change examples:

## Add your source directories here separated by space

MODULES = app

EXTRA_INCDIR = include

## ESP_HOME sets the path where ESP tools and SDK are located.

## Windows:

# ESP_HOME = c:/Espressif

## MacOS / Linux:

ESP_HOME = /opt/esp-open-sdk

## SMING_HOME sets the path where Sming framework is located.

## Windows:

# SMING_HOME = c:/tools/sming/Sming

## MacOS / Linux

SMING_HOME = /opt/sming/Sming

## COM port parameter is reqruied to flash firmware correctly.

## Windows:

# COM_PORT = COM3

## MacOS / Linux:

COM_PORT = /dev/tty.usbserial-A50285BI

## Com port speed

COM_SPEED= 115200

## Configure flash parameters (for ESP12-E and other new boards):

SPI_MODE = dio

## SPIFFS options

#DISABLE_SPIFFS = 1

SPIFF_FILES = files

Sming 프레임워크 소스코드를 불러와서 라이브러리를 빌드

  • Eclipse 실행
  • [File -> Import -> General -> Existing Project into Workspace] 선택
  • [Select root directory] 에서 SmingFramework 프로젝트 폴더를 선택
  • 프로젝트에서 Build

Blink 예제 빌드 확인

  • [File -> Import -> General -> Existing Project into Workspace] 선택
  • [Select root directory] Basic_Blink 프로젝트 폴더선택
  • 프로젝트에서 Build

프로젝트 빌드가 성공하면 [프로젝트 폴더\out\firmware] 폴더안에 *.bin 파일들이 생긴다.

참고