mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
make standalone compile
This commit is contained in:
10
Makefile
10
Makefile
@@ -17,8 +17,8 @@ MAKEFLAGS+="j "
|
|||||||
#TARGET := $(notdir $(CURDIR))
|
#TARGET := $(notdir $(CURDIR))
|
||||||
TARGET := emsesp
|
TARGET := emsesp
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := src src/* lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src src/devices lib/ArduinoJson/src lib/PButton lib/semver
|
SOURCES := src src/* lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src src/devices lib/ArduinoJson/src lib/PButton lib/semver lib/espMqttClient/src lib/espMqttClient/src/*
|
||||||
INCLUDES := src lib_standalone lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src lib/semver lib/* src/devices
|
INCLUDES := src lib_standalone lib/espMqttClient/src lib/espMqttClient/src/Transport lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src lib/semver lib/* src/devices
|
||||||
LIBRARIES :=
|
LIBRARIES :=
|
||||||
|
|
||||||
CPPCHECK = cppcheck
|
CPPCHECK = cppcheck
|
||||||
@@ -36,8 +36,8 @@ CXX_STANDARD := -std=c++11
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# Defined Symbols
|
# Defined Symbols
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
DEFINES += -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0 -DARDUINO
|
DEFINES += -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0
|
||||||
DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST
|
DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__
|
||||||
DEFINES += $(ARGS)
|
DEFINES += $(ARGS)
|
||||||
|
|
||||||
DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||||
@@ -79,7 +79,7 @@ CPPFLAGS += -g3
|
|||||||
CPPFLAGS += -Os
|
CPPFLAGS += -Os
|
||||||
|
|
||||||
CFLAGS += $(CPPFLAGS)
|
CFLAGS += $(CPPFLAGS)
|
||||||
CFLAGS += -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-unused-lambda-capture
|
CFLAGS += -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter
|
||||||
|
|
||||||
CXXFLAGS += $(CFLAGS) -MMD
|
CXXFLAGS += $(CFLAGS) -MMD
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ class MqttClient {
|
|||||||
#elif defined(ARDUINO_ARCH_ESP8266) && EMC_ESP8266_MULTITHREADING
|
#elif defined(ARDUINO_ARCH_ESP8266) && EMC_ESP8266_MULTITHREADING
|
||||||
std::atomic<bool> _xSemaphore = false;
|
std::atomic<bool> _xSemaphore = false;
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
std::mutex mtx;
|
// added mutable to compile EMS-ESP standalone
|
||||||
|
mutable std::mutex mtx;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8_t _rxBuffer[EMC_RX_BUFFER_SIZE];
|
uint8_t _rxBuffer[EMC_RX_BUFFER_SIZE];
|
||||||
@@ -131,9 +132,10 @@ class MqttClient {
|
|||||||
uint32_t timeSent;
|
uint32_t timeSent;
|
||||||
espMqttClientInternals::Packet packet;
|
espMqttClientInternals::Packet packet;
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
OutgoingPacket(uint32_t t, espMqttClientTypes::Error error, Args&&... args) :
|
OutgoingPacket(uint32_t t, espMqttClientTypes::Error error, Args &&... args)
|
||||||
timeSent(t),
|
: timeSent(t)
|
||||||
packet(error, std::forward<Args>(args) ...) {}
|
, packet(error, std::forward<Args>(args)...) {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
espMqttClientInternals::Outbox<OutgoingPacket> _outbox;
|
espMqttClientInternals::Outbox<OutgoingPacket> _outbox;
|
||||||
size_t _bytesSent;
|
size_t _bytesSent;
|
||||||
@@ -149,7 +151,8 @@ class MqttClient {
|
|||||||
bool _addPacket(Args &&... args) {
|
bool _addPacket(Args &&... args) {
|
||||||
espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS);
|
espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS);
|
||||||
espMqttClientInternals::Outbox<OutgoingPacket>::Iterator it = _outbox.emplace(0, error, std::forward<Args>(args)...);
|
espMqttClientInternals::Outbox<OutgoingPacket>::Iterator it = _outbox.emplace(0, error, std::forward<Args>(args)...);
|
||||||
if (it && error == espMqttClientTypes::Error::SUCCESS) return true;
|
if (it && error == espMqttClientTypes::Error::SUCCESS)
|
||||||
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +160,8 @@ class MqttClient {
|
|||||||
bool _addPacketFront(Args &&... args) {
|
bool _addPacketFront(Args &&... args) {
|
||||||
espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS);
|
espMqttClientTypes::Error error(espMqttClientTypes::Error::SUCCESS);
|
||||||
espMqttClientInternals::Outbox<OutgoingPacket>::Iterator it = _outbox.emplaceFront(0, error, std::forward<Args>(args)...);
|
espMqttClientInternals::Outbox<OutgoingPacket>::Iterator it = _outbox.emplaceFront(0, error, std::forward<Args>(args)...);
|
||||||
if (it && error == espMqttClientTypes::Error::SUCCESS) return true;
|
if (it && error == espMqttClientTypes::Error::SUCCESS)
|
||||||
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ int main(int argc __attribute__((unused)), char * argv[] __attribute__((unused))
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long millis() {
|
// unsigned long millis() {
|
||||||
return __millis;
|
// return __millis;
|
||||||
}
|
// }
|
||||||
|
|
||||||
int64_t esp_timer_get_time() {
|
int64_t esp_timer_get_time() {
|
||||||
return __millis;
|
return __millis;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
// #define IPAddress std::string
|
// #define IPAddress std::string
|
||||||
#define IPAddress String
|
// #define IPAddress String
|
||||||
|
|
||||||
#define ICACHE_FLASH_ATTR
|
#define ICACHE_FLASH_ATTR
|
||||||
#define ICACHE_RAM_ATTR
|
#define ICACHE_RAM_ATTR
|
||||||
@@ -171,7 +171,13 @@ extern NativeConsole Serial;
|
|||||||
extern ETHClass ETH;
|
extern ETHClass ETH;
|
||||||
extern WiFiClass WiFi;
|
extern WiFiClass WiFi;
|
||||||
|
|
||||||
unsigned long millis();
|
// unsigned long millis();
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
#include <chrono> // NOLINT [build/c++11]
|
||||||
|
#include <thread> // NOLINT [build/c++11] for yield()
|
||||||
|
#define millis() std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count()
|
||||||
|
#endif
|
||||||
|
|
||||||
int64_t esp_timer_get_time();
|
int64_t esp_timer_get_time();
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,11 @@ class ESP8266React {
|
|||||||
return _mqttClient;
|
return _mqttClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setWill(const char * will_topic) {
|
||||||
|
}
|
||||||
|
void onMessage(espMqttClientTypes::OnMessageCallback callback) {
|
||||||
|
}
|
||||||
|
|
||||||
StatefulService<DummySettings> * getNetworkSettingsService() {
|
StatefulService<DummySettings> * getNetworkSettingsService() {
|
||||||
return &_settings;
|
return &_settings;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <IPAddress.h>
|
||||||
|
|
||||||
#define WiFiMode_t wifi_mode_t
|
#define WiFiMode_t wifi_mode_t
|
||||||
#define WIFI_OFF WIFI_MODE_NULL
|
#define WIFI_OFF WIFI_MODE_NULL
|
||||||
|
|||||||
0
lib_standalone/avr/pgmspace.h
Normal file
0
lib_standalone/avr/pgmspace.h
Normal file
@@ -1,130 +0,0 @@
|
|||||||
#ifndef ESPMQTTCLIENT_H_
|
|
||||||
#define ESPMQTTCLIENT_H_
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
namespace espMqttClientTypes {
|
|
||||||
|
|
||||||
enum class DisconnectReason : uint8_t {
|
|
||||||
USER_OK = 0,
|
|
||||||
MQTT_UNACCEPTABLE_PROTOCOL_VERSION = 1,
|
|
||||||
MQTT_IDENTIFIER_REJECTED = 2,
|
|
||||||
MQTT_SERVER_UNAVAILABLE = 3,
|
|
||||||
MQTT_MALFORMED_CREDENTIALS = 4,
|
|
||||||
MQTT_NOT_AUTHORIZED = 5,
|
|
||||||
TLS_BAD_FINGERPRINT = 6,
|
|
||||||
TCP_DISCONNECTED = 7
|
|
||||||
};
|
|
||||||
const char * disconnectReasonToString(DisconnectReason reason);
|
|
||||||
|
|
||||||
enum class SubscribeReturncode : uint8_t { QOS0 = 0x00, QOS1 = 0x01, QOS2 = 0x02, FAIL = 0X80 };
|
|
||||||
const char * subscribeReturncodeToString(SubscribeReturncode returnCode);
|
|
||||||
|
|
||||||
enum class Error : uint8_t { SUCCESS = 0, OUT_OF_MEMORY = 1, MAX_RETRIES = 2, MALFORMED_PARAMETER = 3, MISC_ERROR = 4 };
|
|
||||||
const char * errorToString(Error error);
|
|
||||||
|
|
||||||
struct MessageProperties {
|
|
||||||
uint8_t qos;
|
|
||||||
bool dup;
|
|
||||||
bool retain;
|
|
||||||
uint16_t packetId;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef std::function<void(bool sessionPresent)> OnConnectCallback;
|
|
||||||
typedef std::function<void(DisconnectReason reason)> OnDisconnectCallback;
|
|
||||||
typedef std::function<void(uint16_t packetId, const SubscribeReturncode * returncodes, size_t len)> OnSubscribeCallback;
|
|
||||||
typedef std::function<void(uint16_t packetId)> OnUnsubscribeCallback;
|
|
||||||
typedef std::function<void(const MessageProperties & properties, const char * topic, const uint8_t * payload, size_t len, size_t index, size_t total)> OnMessageCallback;
|
|
||||||
typedef std::function<void(uint16_t packetId)> OnPublishCallback;
|
|
||||||
typedef std::function<size_t(uint8_t * data, size_t maxSize, size_t index)> PayloadCallback;
|
|
||||||
typedef std::function<void(uint16_t packetId, Error error)> OnErrorCallback;
|
|
||||||
|
|
||||||
} // namespace espMqttClientTypes
|
|
||||||
|
|
||||||
class espMqttClient {
|
|
||||||
public:
|
|
||||||
espMqttClient();
|
|
||||||
~espMqttClient();
|
|
||||||
|
|
||||||
espMqttClient & setKeepAlive(uint16_t keepAlive);
|
|
||||||
espMqttClient & setClientId(const char * clientId);
|
|
||||||
espMqttClient & setCleanSession(bool cleanSession);
|
|
||||||
espMqttClient & setMaxTopicLength(uint16_t maxTopicLength);
|
|
||||||
espMqttClient & setCredentials(const char * username, const char * password = nullptr);
|
|
||||||
espMqttClient & setWill(const char * topic, uint8_t qos, bool retain, const char * payload = nullptr, size_t length = 0) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
espMqttClient & setServer(IPAddress ip, uint16_t port);
|
|
||||||
espMqttClient & setServer(const char * host, uint16_t port);
|
|
||||||
|
|
||||||
espMqttClient & onConnect(espMqttClientTypes::OnConnectCallback callback) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
espMqttClient & onDisconnect(espMqttClientTypes::OnDisconnectCallback callback) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
espMqttClient & onSubscribe(espMqttClientTypes::OnSubscribeCallback callback) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
espMqttClient & onUnsubscribe(espMqttClientTypes::OnUnsubscribeCallback callback) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
espMqttClient & onMessage(espMqttClientTypes::OnMessageCallback callback) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
espMqttClient & onPublish(espMqttClientTypes::OnPublishCallback callback) {
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool connected() const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
void connect() {
|
|
||||||
}
|
|
||||||
void disconnect(bool force = false) {
|
|
||||||
}
|
|
||||||
uint16_t subscribe(const char * topic, uint8_t qos) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
uint16_t unsubscribe(const char * topic) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
uint16_t publish(const char * topic, uint8_t qos, bool retain, const char * payload = nullptr, size_t length = 0, bool dup = false, uint16_t message_id = 0) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char * getClientId() {
|
|
||||||
return "12";
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t getQueue() const {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool _connected;
|
|
||||||
bool _connectPacketNotEnoughSpace;
|
|
||||||
bool _disconnectOnPoll;
|
|
||||||
bool _tlsBadFingerprint;
|
|
||||||
uint32_t _lastClientActivity;
|
|
||||||
uint32_t _lastServerActivity;
|
|
||||||
uint32_t _lastPingRequestTime;
|
|
||||||
char _generatedClientId[18 + 1]; // esp8266-abc123 and esp32-abcdef123456
|
|
||||||
IPAddress _ip;
|
|
||||||
const char * _host;
|
|
||||||
bool _useIp;
|
|
||||||
uint16_t _port;
|
|
||||||
uint16_t _keepAlive;
|
|
||||||
bool _cleanSession;
|
|
||||||
const char * _clientId;
|
|
||||||
const char * _username;
|
|
||||||
const char * _password;
|
|
||||||
const char * _willTopic;
|
|
||||||
const char * _willPayload;
|
|
||||||
uint16_t _willPayloadLength;
|
|
||||||
uint8_t _willQos;
|
|
||||||
bool _willRetain;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
; override any settings with your own local ones in pio_local.ini
|
; override any settings with your own local ones in pio_local.ini
|
||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
default_envs = esp32_4M
|
; default_envs = esp32_4M
|
||||||
; default_envs = lolin_s3
|
; default_envs = lolin_s3
|
||||||
; default_envs = esp32_16M
|
; default_envs = esp32_16M
|
||||||
; default_envs = standalone
|
default_envs = standalone
|
||||||
|
|
||||||
extra_configs =
|
extra_configs =
|
||||||
factory_settings.ini
|
factory_settings.ini
|
||||||
@@ -20,7 +20,6 @@ core_build_flags =
|
|||||||
; -std=gnu++17
|
; -std=gnu++17
|
||||||
|
|
||||||
; core_unbuild_flags = -std=gnu++11
|
; core_unbuild_flags = -std=gnu++11
|
||||||
; core_unbuild_flags = -std=gnu++17
|
|
||||||
core_unbuild_flags =
|
core_unbuild_flags =
|
||||||
|
|
||||||
; my_build_flags is set in pio_local.ini
|
; my_build_flags is set in pio_local.ini
|
||||||
@@ -41,9 +40,12 @@ unbuild_flags =
|
|||||||
|
|
||||||
[espressi32_base]
|
[espressi32_base]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
; platform = espressif32@5.3.0
|
|
||||||
; platform = espressif32@5.2.0
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
build_flags = ${common.build_flags}
|
||||||
|
build_unflags = ${common.unbuild_flags}
|
||||||
|
extra_scripts =
|
||||||
|
pre:scripts/build_interface.py
|
||||||
|
scripts/rename_fw.py
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
@@ -62,7 +64,7 @@ check_flags =
|
|||||||
; build for GitHub Actions CI
|
; build for GitHub Actions CI
|
||||||
; the Web interface is built seperately
|
; the Web interface is built seperately
|
||||||
[env:ci]
|
[env:ci]
|
||||||
platform = espressif32@5.2.0
|
platform = espressif32
|
||||||
framework = arduino
|
framework = arduino
|
||||||
extra_scripts = scripts/rename_fw.py
|
extra_scripts = scripts/rename_fw.py
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
@@ -84,93 +86,63 @@ build_flags = ${common.build_flags} -O2
|
|||||||
build_unflags = ${common.unbuild_flags}
|
build_unflags = ${common.unbuild_flags}
|
||||||
|
|
||||||
[env:esp32_4M]
|
[env:esp32_4M]
|
||||||
platform = espressif32@5.2.0
|
extends = espressi32_base
|
||||||
framework = arduino
|
|
||||||
extra_scripts =
|
|
||||||
pre:scripts/build_interface.py
|
|
||||||
scripts/rename_fw.py
|
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
board_upload.flash_size = 4MB
|
board_upload.flash_size = 4MB
|
||||||
board_build.partitions = esp32_partition_4M.csv
|
board_build.partitions = esp32_partition_4M.csv
|
||||||
build_flags = ${common.build_flags} -Os
|
build_flags = ${common.build_flags} -Os
|
||||||
build_unflags = ${common.unbuild_flags}
|
|
||||||
|
|
||||||
[env:esp32_4Mplus]
|
[env:esp32_4Mplus]
|
||||||
extends = espressi32_base
|
extends = espressi32_base
|
||||||
extra_scripts =
|
|
||||||
pre:scripts/build_interface.py
|
|
||||||
scripts/rename_fw.py
|
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
board_upload.flash_size = 4MB
|
board_upload.flash_size = 4MB
|
||||||
board_build.partitions = esp32_asym_partition_4M.csv
|
board_build.partitions = esp32_asym_partition_4M.csv
|
||||||
build_flags = ${common.build_flags}
|
build_flags = ${common.build_flags}
|
||||||
build_unflags = ${common.unbuild_flags}
|
|
||||||
|
|
||||||
[env:esp32_16M]
|
[env:esp32_16M]
|
||||||
extends = espressi32_base
|
extends = espressi32_base
|
||||||
extra_scripts =
|
|
||||||
pre:scripts/build_interface.py
|
|
||||||
scripts/rename_fw.py
|
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
board_upload.flash_size = 16MB
|
board_upload.flash_size = 16MB
|
||||||
board_build.partitions = esp32_partition_16M.csv
|
board_build.partitions = esp32_partition_16M.csv
|
||||||
build_flags = ${common.build_flags}
|
build_flags = ${common.build_flags}
|
||||||
build_unflags = ${common.unbuild_flags}
|
|
||||||
|
|
||||||
[env:lolin_c3_mini]
|
[env:lolin_c3_mini]
|
||||||
extends = espressi32_base
|
extends = espressi32_base
|
||||||
extra_scripts =
|
|
||||||
pre:scripts/build_interface.py
|
|
||||||
scripts/rename_fw.py
|
|
||||||
board = lolin_c3_mini
|
board = lolin_c3_mini
|
||||||
board_upload.flash_size = 4MB
|
board_upload.flash_size = 4MB
|
||||||
board_build.partitions = esp32_asym_partition_4M.csv
|
board_build.partitions = esp32_asym_partition_4M.csv
|
||||||
build_flags = ${common.build_flags}
|
build_flags = ${common.build_flags}
|
||||||
build_unflags = ${common.unbuild_flags}
|
|
||||||
|
|
||||||
; lolin C3 mini v1 needs special wifi init.
|
; lolin C3 mini v1 needs special wifi init.
|
||||||
; https://www.wemos.cc/en/latest/c3/c3_mini_1_0_0.html#about-wifi
|
; https://www.wemos.cc/en/latest/c3/c3_mini_1_0_0.html#about-wifi
|
||||||
[env:lolin_c3_mini_v1]
|
[env:lolin_c3_mini_v1]
|
||||||
extends = espressi32_base
|
extends = espressi32_base
|
||||||
extra_scripts =
|
|
||||||
pre:scripts/build_interface.py
|
|
||||||
scripts/rename_fw.py
|
|
||||||
board = lolin_c3_mini
|
board = lolin_c3_mini
|
||||||
board_upload.flash_size = 4MB
|
board_upload.flash_size = 4MB
|
||||||
board_build.partitions = esp32_asym_partition_4M.csv
|
board_build.partitions = esp32_asym_partition_4M.csv
|
||||||
build_flags = ${common.build_flags} -DBOARD_C3_MINI_V1
|
build_flags = ${common.build_flags} -DBOARD_C3_MINI_V1
|
||||||
build_unflags = ${common.unbuild_flags}
|
|
||||||
|
|
||||||
[env:lolin_s2_mini]
|
[env:lolin_s2_mini]
|
||||||
extends = espressi32_base
|
extends = espressi32_base
|
||||||
extra_scripts =
|
|
||||||
pre:scripts/build_interface.py
|
|
||||||
scripts/rename_fw.py
|
|
||||||
board = lolin_s2_mini
|
board = lolin_s2_mini
|
||||||
board_upload.flash_size = 4MB
|
board_upload.flash_size = 4MB
|
||||||
board_build.partitions = esp32_asym_partition_4M.csv
|
board_build.partitions = esp32_asym_partition_4M.csv
|
||||||
build_flags = ${common.build_flags}
|
build_flags = ${common.build_flags}
|
||||||
build_unflags = ${common.unbuild_flags}
|
|
||||||
|
|
||||||
[env:lolin_s3]
|
[env:lolin_s3]
|
||||||
extends = espressi32_base
|
extends = espressi32_base
|
||||||
extra_scripts =
|
|
||||||
pre:scripts/build_interface.py
|
|
||||||
scripts/rename_fw.py
|
|
||||||
board = lolin_s3
|
board = lolin_s3
|
||||||
board_build.f_cpu = 240000000L
|
board_build.f_cpu = 240000000L
|
||||||
board_upload.flash_size = 16MB
|
board_upload.flash_size = 16MB
|
||||||
board_build.partitions = esp32_partition_16M.csv
|
board_build.partitions = esp32_partition_16M.csv
|
||||||
build_flags = ${common.build_flags} -O2
|
|
||||||
build_unflags = ${common.unbuild_flags}
|
|
||||||
board_upload.use_1200bps_touch = false
|
board_upload.use_1200bps_touch = false
|
||||||
board_upload.wait_for_upload_port = false
|
board_upload.wait_for_upload_port = false
|
||||||
|
build_flags = ${common.build_flags} -O2
|
||||||
|
|
||||||
; to build and run: pio run -e standalone -t exec
|
; to build and run: pio run -e standalone -t exec
|
||||||
[env:standalone]
|
[env:standalone]
|
||||||
platform = native
|
platform = native
|
||||||
build_flags =
|
build_flags =
|
||||||
-DARDUINO
|
|
||||||
-DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0
|
-DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0
|
||||||
-DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST
|
-DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST
|
||||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||||
@@ -185,6 +157,8 @@ build_src_flags =
|
|||||||
-I./lib/uuid-log/src
|
-I./lib/uuid-log/src
|
||||||
-I./lib/semver
|
-I./lib/semver
|
||||||
-I./lib/PButton
|
-I./lib/PButton
|
||||||
|
-I./lib/espMqttClient/src
|
||||||
|
-I./lib/espMqttClient/src/Transport
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
+<*>
|
+<*>
|
||||||
-<.git/>
|
-<.git/>
|
||||||
@@ -194,5 +168,7 @@ build_src_filter =
|
|||||||
+<../lib/uuid-log>
|
+<../lib/uuid-log>
|
||||||
+<../lib/semver>
|
+<../lib/semver>
|
||||||
+<../lib/PButton>
|
+<../lib/PButton>
|
||||||
|
+<../lib/espMqttClient/src>
|
||||||
|
+<../lib/espMqttClient/src/Transport>
|
||||||
lib_compat_mode = off
|
lib_compat_mode = off
|
||||||
lib_ldf_mode = off
|
lib_ldf_mode = off
|
||||||
|
|||||||
Reference in New Issue
Block a user