kopia lustrzana https://github.com/martin-ger/esp_mqtt
cleanup makefile
rodzic
da4e128ddc
commit
d579c08765
34
Makefile
34
Makefile
|
@ -23,11 +23,8 @@ LD_SCRIPT = eagle.app.v6.ld
|
|||
FW_1 = 0x00000
|
||||
FW_2 = 0x40000
|
||||
|
||||
ifndef FLAVOR
|
||||
FLAVOR = release
|
||||
else
|
||||
FLAVOR = $(FLAVOR)
|
||||
endif
|
||||
FLAVOR ?= release
|
||||
|
||||
|
||||
#############################################################
|
||||
# Select compile
|
||||
|
@ -56,18 +53,8 @@ ifeq ($(OS),Windows_NT)
|
|||
CPP = xtensa-lx106-elf-cpp
|
||||
OBJCOPY = xtensa-lx106-elf-objcopy
|
||||
endif
|
||||
|
||||
ifndef COMPORT
|
||||
ESPPORT = com1
|
||||
else
|
||||
ESPPORT = $(COMPORT)
|
||||
endif
|
||||
|
||||
ifndef SDK_BASE
|
||||
SDK_BASE = c:/Espressif/ESP8266_SDK
|
||||
else
|
||||
SDK_BASE = $(SDK_BASE)
|
||||
endif
|
||||
ESPPORT ?= com1
|
||||
SDK_BASE ?= c:/Espressif/ESP8266_SDK
|
||||
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
||||
# ->AMD64
|
||||
endif
|
||||
|
@ -77,16 +64,9 @@ ifeq ($(OS),Windows_NT)
|
|||
else
|
||||
# We are under other system, may be Linux. Assume using gcc.
|
||||
# Can we use -fdata-sections?
|
||||
ifndef COMPORT
|
||||
ESPPORT = /dev/ttyUSB0
|
||||
else
|
||||
ESPPORT = $(COMPORT)
|
||||
endif
|
||||
ifndef SDK_BASE
|
||||
SDK_BASE = /esptools/esp-open-sdk/sdk
|
||||
else
|
||||
SDK_BASE = $(SDK_BASE)
|
||||
endif
|
||||
ESPPORT ?= /dev/ttyUSB0
|
||||
SDK_BASE ?= /esptools/esp-open-sdk/sdk
|
||||
|
||||
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
|
||||
AR = xtensa-lx106-elf-ar
|
||||
CC = xtensa-lx106-elf-gcc
|
||||
|
|
25
README.md
25
README.md
|
@ -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)
|
||||
|
||||
|
||||
|
||||
**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:**
|
||||
|
||||
Make sure to add PYTHON PATH and compile PATH to Eclipse environment variable if using Eclipse
|
||||
|
@ -16,8 +25,9 @@ mingw32-make clean
|
|||
#make
|
||||
mingw32-make SDK_BASE="c:/Espressif/ESP8266_SDK" FLAVOR="release" all
|
||||
#flash
|
||||
mingw32-make COMPORT="COM1" flash
|
||||
mingw32-make ESPPORT="COM1" flash
|
||||
```
|
||||
|
||||
for Mac or Linux:
|
||||
|
||||
```bash
|
||||
|
@ -28,18 +38,9 @@ make clean
|
|||
#make
|
||||
make SDK_BASE="c:/Espressif/ESP8266_SDK" FLAVOR="release" all
|
||||
#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**
|
||||
```c
|
||||
#include "ets_sys.h"
|
||||
|
@ -247,7 +248,7 @@ function setup() {
|
|||
|
||||
**Requried:**
|
||||
|
||||
esp_iot_sdk_v0.9.4_14_12_19
|
||||
SDK esp_iot_sdk_v0.9.4_14_12_19 or higher
|
||||
|
||||
**Authors:**
|
||||
[Tuan PM](https://twitter.com/TuanPMT)
|
||||
|
|
Ładowanie…
Reference in New Issue