cleanup makefile

develop
Tuan PM 2015-02-15 21:44:39 +07:00
rodzic da4e128ddc
commit d579c08765
2 zmienionych plików z 20 dodań i 39 usunięć

Wyświetl plik

@ -23,11 +23,8 @@ LD_SCRIPT = eagle.app.v6.ld
FW_1 = 0x00000 FW_1 = 0x00000
FW_2 = 0x40000 FW_2 = 0x40000
ifndef FLAVOR FLAVOR ?= release
FLAVOR = release
else
FLAVOR = $(FLAVOR)
endif
############################################################# #############################################################
# Select compile # Select compile
@ -56,18 +53,8 @@ ifeq ($(OS),Windows_NT)
CPP = xtensa-lx106-elf-cpp CPP = xtensa-lx106-elf-cpp
OBJCOPY = xtensa-lx106-elf-objcopy OBJCOPY = xtensa-lx106-elf-objcopy
endif endif
ESPPORT ?= com1
ifndef COMPORT SDK_BASE ?= c:/Espressif/ESP8266_SDK
ESPPORT = com1
else
ESPPORT = $(COMPORT)
endif
ifndef SDK_BASE
SDK_BASE = c:/Espressif/ESP8266_SDK
else
SDK_BASE = $(SDK_BASE)
endif
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
# ->AMD64 # ->AMD64
endif endif
@ -77,16 +64,9 @@ ifeq ($(OS),Windows_NT)
else else
# We are under other system, may be Linux. Assume using gcc. # We are under other system, may be Linux. Assume using gcc.
# Can we use -fdata-sections? # Can we use -fdata-sections?
ifndef COMPORT ESPPORT ?= /dev/ttyUSB0
ESPPORT = /dev/ttyUSB0 SDK_BASE ?= /esptools/esp-open-sdk/sdk
else
ESPPORT = $(COMPORT)
endif
ifndef SDK_BASE
SDK_BASE = /esptools/esp-open-sdk/sdk
else
SDK_BASE = $(SDK_BASE)
endif
CCFLAGS += -Os -ffunction-sections -fno-jump-tables CCFLAGS += -Os -ffunction-sections -fno-jump-tables
AR = xtensa-lx106-elf-ar AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc CC = xtensa-lx106-elf-gcc

Wyświetl plik

@ -2,6 +2,15 @@
========== ==========
This is MQTT client library for ESP8266, port from: [MQTT client library for Contiki](https://github.com/esar/contiki-mqtt) (thanks) This is MQTT client library for ESP8266, port from: [MQTT client library for Contiki](https://github.com/esar/contiki-mqtt) (thanks)
**Features:**
* Support subscribing, publishing, authentication, will messages, keep alive pings and all 3 QoS levels (it should be a fully functional client).
* Support multiple connection (to multiple hosts).
* Support SSL connection (max 1024 bit key size)
* Easy to setup and use
**Compile:** **Compile:**
Make sure to add PYTHON PATH and compile PATH to Eclipse environment variable if using Eclipse Make sure to add PYTHON PATH and compile PATH to Eclipse environment variable if using Eclipse
@ -16,8 +25,9 @@ mingw32-make clean
#make #make
mingw32-make SDK_BASE="c:/Espressif/ESP8266_SDK" FLAVOR="release" all mingw32-make SDK_BASE="c:/Espressif/ESP8266_SDK" FLAVOR="release" all
#flash #flash
mingw32-make COMPORT="COM1" flash mingw32-make ESPPORT="COM1" flash
``` ```
for Mac or Linux: for Mac or Linux:
```bash ```bash
@ -28,18 +38,9 @@ make clean
#make #make
make SDK_BASE="c:/Espressif/ESP8266_SDK" FLAVOR="release" all make SDK_BASE="c:/Espressif/ESP8266_SDK" FLAVOR="release" all
#flash #flash
make COMPORT="COM1" flash make ESPPORT="COM1" flash
``` ```
**Features:**
* Support subscribing, publishing, authentication, will messages, keep alive pings and all 3 QoS levels (it should be a fully functional client).
* Support multiple connection (to multiple hosts).
* Support SSL connection (max 1024 bit key size)
* Easy to setup and use
**Usage** **Usage**
```c ```c
#include "ets_sys.h" #include "ets_sys.h"
@ -247,7 +248,7 @@ function setup() {
**Requried:** **Requried:**
esp_iot_sdk_v0.9.4_14_12_19 SDK esp_iot_sdk_v0.9.4_14_12_19 or higher
**Authors:** **Authors:**
[Tuan PM](https://twitter.com/TuanPMT) [Tuan PM](https://twitter.com/TuanPMT)