Skip to content

Commit 49a360a

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents d7eb665 + 278fa0d commit 49a360a

File tree

130 files changed

+875
-53
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+875
-53
lines changed

Diff for: cores/esp32/Esp.cpp

+51-5
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
#include <soc/soc.h>
2727
#include <soc/efuse_reg.h>
2828
#include <esp_partition.h>
29-
#include <esp_ota_ops.h>
3029
extern "C" {
31-
#include <esp_image_format.h>
30+
#include "esp_ota_ops.h"
31+
#include "esp_image_format.h"
3232
}
33+
#include <MD5Builder.h>
3334

3435
/**
3536
* User-defined Literals
@@ -158,18 +159,63 @@ static uint32_t sketchSize(sketchSize_t response) {
158159
data.start_addr = running_pos.offset;
159160
esp_image_verify(ESP_IMAGE_VERIFY, &running_pos, &data);
160161
if (response) {
161-
return running_pos.size - data.image_len;
162+
return running_pos.size - data.image_len;
162163
} else {
163-
return data.image_len;
164+
return data.image_len;
164165
}
165166
}
166167

167168
uint32_t EspClass::getSketchSize () {
168169
return sketchSize(SKETCH_SIZE_TOTAL);
169170
}
170171

172+
String EspClass::getSketchMD5()
173+
{
174+
static String result;
175+
if (result.length()) {
176+
return result;
177+
}
178+
uint32_t lengthLeft = getSketchSize();
179+
180+
const esp_partition_t *running = esp_ota_get_running_partition();
181+
if (!running) {
182+
log_e("Partition could not be found");
183+
184+
return String();
185+
}
186+
const size_t bufSize = SPI_FLASH_SEC_SIZE;
187+
std::unique_ptr<uint8_t[]> buf(new uint8_t[bufSize]);
188+
uint32_t offset = 0;
189+
if(!buf.get()) {
190+
log_e("Not enough memory to allocate buffer");
191+
192+
return String();
193+
}
194+
MD5Builder md5;
195+
md5.begin();
196+
while( lengthLeft > 0) {
197+
size_t readBytes = (lengthLeft < bufSize) ? lengthLeft : bufSize;
198+
if (!ESP.flashRead(running->address + offset, reinterpret_cast<uint32_t*>(buf.get()), (readBytes + 3) & ~3)) {
199+
log_e("Could not read buffer from flash");
200+
201+
return String();
202+
}
203+
md5.add(buf.get(), readBytes);
204+
lengthLeft -= readBytes;
205+
offset += readBytes;
206+
}
207+
md5.calculate();
208+
result = md5.toString();
209+
return result;
210+
}
211+
171212
uint32_t EspClass::getFreeSketchSpace () {
172-
return sketchSize(SKETCH_SIZE_FREE);
213+
const esp_partition_t* _partition = esp_ota_get_next_update_partition(NULL);
214+
if(!_partition){
215+
return 0;
216+
}
217+
218+
return _partition->size;
173219
}
174220

175221
uint8_t EspClass::getChipRevision(void)

Diff for: cores/esp32/Esp.h

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class EspClass
9090
FlashMode_t magicFlashChipMode(uint8_t byte);
9191

9292
uint32_t getSketchSize();
93+
String getSketchMD5();
9394
uint32_t getFreeSketchSpace();
9495

9596
bool flashEraseSector(uint32_t sector);

Diff for: cores/esp32/esp32-hal-misc.c

+2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
#include "esp_partition.h"
2222
#include "esp_log.h"
2323
#include "esp_timer.h"
24+
#ifdef CONFIG_BT_ENABLED
2425
#include "esp_bt.h"
26+
#endif //CONFIG_BT_ENABLED
2527
#include <sys/time.h>
2628
#include "esp32-hal.h"
2729

Diff for: libraries/BLE

Diff for: libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void loop() {
5656

5757
switch (ret) {
5858
case HTTP_UPDATE_FAILED:
59-
Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s\n", httpUpdate.getLastError(), httpUpdate.getLastErrorString().c_str());
59+
Serial.printf("HTTP_UPDATE_FAILED Error (%d): %s\n", httpUpdate.getLastError(), httpUpdate.getLastErrorString().c_str());
6060
break;
6161

6262
case HTTP_UPDATE_NO_UPDATES:

Diff for: libraries/HTTPUpdate/src/HTTPUpdate.cpp

+39-12
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,31 @@ HTTPUpdate::~HTTPUpdate(void)
4949
HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& url, const String& currentVersion)
5050
{
5151
HTTPClient http;
52-
http.begin(client, url);
52+
if(!http.begin(client, url))
53+
{
54+
return HTTP_UPDATE_FAILED;
55+
}
5356
return handleUpdate(http, currentVersion, false);
5457
}
5558

5659
HTTPUpdateResult HTTPUpdate::updateSpiffs(WiFiClient& client, const String& url, const String& currentVersion)
5760
{
5861
HTTPClient http;
59-
http.begin(client, url);
62+
if(!http.begin(client, url))
63+
{
64+
return HTTP_UPDATE_FAILED;
65+
}
6066
return handleUpdate(http, currentVersion, true);
6167
}
6268

6369
HTTPUpdateResult HTTPUpdate::update(WiFiClient& client, const String& host, uint16_t port, const String& uri,
6470
const String& currentVersion)
6571
{
6672
HTTPClient http;
67-
http.begin(client, host, port, uri);
73+
if(!http.begin(client, host, port, uri))
74+
{
75+
return HTTP_UPDATE_FAILED;
76+
}
6877
return handleUpdate(http, currentVersion, false);
6978
}
7079

@@ -118,6 +127,8 @@ String HTTPUpdate::getLastErrorString(void)
118127
return "Verify Bin Header Failed";
119128
case HTTP_UE_BIN_FOR_WRONG_FLASH:
120129
return "New Binary Does Not Fit Flash Size";
130+
case HTTP_UE_NO_PARTITION:
131+
return "Partition Could Not be Found";
121132
}
122133

123134
return String();
@@ -170,8 +181,11 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient& http, const String& curren
170181
http.addHeader("x-ESP32-AP-MAC", WiFi.softAPmacAddress());
171182
http.addHeader("x-ESP32-free-space", String(ESP.getFreeSketchSpace()));
172183
http.addHeader("x-ESP32-sketch-size", String(ESP.getSketchSize()));
173-
// To do http.addHeader("x-ESP32-sketch-md5", String(ESP.getSketchMD5()));
174-
// Sketch MD5 is not supported by the core, but SHA256 is, so add a SHA256 instead
184+
String sketchMD5 = ESP.getSketchMD5();
185+
if(sketchMD5.length() != 0) {
186+
http.addHeader("x-ESP32-sketch-md5", sketchMD5);
187+
}
188+
// Add also a SHA256
175189
String sketchSHA256 = getSketchSHA256();
176190
if(sketchSHA256.length() != 0) {
177191
http.addHeader("x-ESP32-sketch-sha256", sketchSHA256);
@@ -229,14 +243,25 @@ HTTPUpdateResult HTTPUpdate::handleUpdate(HTTPClient& http, const String& curren
229243
if(len > 0) {
230244
bool startUpdate = true;
231245
if(spiffs) {
232-
// To do size_t spiffsSize = ((size_t) &_SPIFFS_end - (size_t) &_SPIFFS_start);
233-
// To do if(len > (int) spiffsSize) {
234-
// To do log_e("spiffsSize to low (%d) needed: %d\n", spiffsSize, len);
235-
// To do startUpdate = false;
236-
// To do }
246+
const esp_partition_t* _partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_SPIFFS, NULL);
247+
if(!_partition){
248+
_lastError = HTTP_UE_NO_PARTITION;
249+
return HTTP_UPDATE_FAILED;
250+
}
251+
252+
if(len > _partition->size) {
253+
log_e("spiffsSize to low (%d) needed: %d\n", _partition->size, len);
254+
startUpdate = false;
255+
}
237256
} else {
238-
if(len > (int) ESP.getFreeSketchSpace()) {
239-
log_e("FreeSketchSpace to low (%d) needed: %d\n", ESP.getFreeSketchSpace(), len);
257+
int sketchFreeSpace = ESP.getFreeSketchSpace();
258+
if(!sketchFreeSpace){
259+
_lastError = HTTP_UE_NO_PARTITION;
260+
return HTTP_UPDATE_FAILED;
261+
}
262+
263+
if(len > sketchFreeSpace) {
264+
log_e("FreeSketchSpace to low (%d) needed: %d\n", sketchFreeSpace, len);
240265
startUpdate = false;
241266
}
242267
}
@@ -366,6 +391,8 @@ bool HTTPUpdate::runUpdate(Stream& in, uint32_t size, String md5, int command)
366391
}
367392
}
368393

394+
// To do: the SHA256 could be checked if the server sends it
395+
369396
if(Update.writeStream(in) != size) {
370397
_lastError = Update.getError();
371398
Update.printError(error);

Diff for: libraries/HTTPUpdate/src/HTTPUpdate.h

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#define HTTP_UE_SERVER_FAULTY_MD5 (-105)
4343
#define HTTP_UE_BIN_VERIFY_HEADER_FAILED (-106)
4444
#define HTTP_UE_BIN_FOR_WRONG_FLASH (-107)
45+
#define HTTP_UE_NO_PARTITION (-108)
4546

4647
enum HTTPUpdateResult {
4748
HTTP_UPDATE_FAILED,

Diff for: libraries/WiFi/examples/WiFiClientEnterprise/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
|University|Board|Method|Result|
1919
|-------------|-------------| -----|------|
2020
|Technical University in Košice (Slovakia)|ESP32 Devkit v1|PEAP + MsCHAPv2|Working|
21-
|Technical University in Košice (Slovakia)|ESP32 DevKitc v4|PEAP + MsCHAPv2|Working|
21+
|Technical University in Košice (Slovakia)|ESP32 Devmodule v4|PEAP + MsCHAPv2|Working on 6th attempt in loop|
2222
|Slovak Technical University in Bratislava (Slovakia)|ESP32 Devkit v1|PEAP + MsCHAPv2|Working|
2323
|University of Antwerp (Belgium)|Lolin32|PEAP + MsCHAPv2|Working|
2424
|UPV Universitat Politècnica de València (Spain)|ESP32 Devmodule v4|PEAP + MsCHAPv2|Working|
@@ -27,7 +27,8 @@
2727
|Universidad de Granada (Spain)|Lolin D32 Pro|PEAP + MsCHAPv2|Working|
2828
|Universidad de Granada (Spain)|Lolin D32|PEAP + MsCHAPv2|Working|
2929
|Universidade Federal de Santa Catarina (Brazil)|xxx|EAP-TTLS + MsCHAPv2|Working|
30-
|University of Regensburg (Germany)|Lolin32|PEAP + MsCHAPv2|Working|
30+
|University of Central Florida (Orlando, Florida)|ESP32 Built-in OLED – Heltec WiFi Kit 32|PEAP + MsCHAPv2|Working|
31+
|Université de Montpellier (France)|NodeMCU-32S|PEAP + MsCHAPv2|Working|
3132

3233
# Common errors - Switch to Debug mode for Serial monitor prints
3334
|Error|Appearance|Solution|

Diff for: libraries/WiFi/src/WiFiClient.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ int WiFiClient::peek()
398398

399399
int WiFiClient::available()
400400
{
401+
if(!_rxBuffer)
402+
{
403+
return 0;
404+
}
401405
int res = _rxBuffer->available();
402406
if(_rxBuffer->failed()) {
403407
log_e("%d", errno);

Diff for: libraries/WiFi/src/WiFiGeneric.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static bool _start_network_event_task(){
9696
}
9797
}
9898
if(!_network_event_task_handle){
99-
xTaskCreatePinnedToCore(_network_event_task, "network_event", 4096, NULL, 2, &_network_event_task_handle, ARDUINO_RUNNING_CORE);
99+
xTaskCreatePinnedToCore(_network_event_task, "network_event", 4096, NULL, ESP_TASKD_EVENT_PRIO - 1, &_network_event_task_handle, ARDUINO_RUNNING_CORE);
100100
if(!_network_event_task_handle){
101101
log_e("Network Event Task Start Failed!");
102102
return false;

Diff for: libraries/WiFiClientSecure/src/WiFiClientSecure.cpp

+10-15
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,6 @@ size_t WiFiClientSecure::write(uint8_t data)
156156
int WiFiClientSecure::read()
157157
{
158158
uint8_t data = -1;
159-
160-
if(_peek >= 0){
161-
data = _peek;
162-
_peek = -1;
163-
return data;
164-
}
165-
166159
int res = read(&data, 1);
167160
if (res < 0) {
168161
return res;
@@ -186,7 +179,8 @@ size_t WiFiClientSecure::write(const uint8_t *buf, size_t size)
186179
int WiFiClientSecure::read(uint8_t *buf, size_t size)
187180
{
188181
int peeked = 0;
189-
if ((!buf && size) || (_peek < 0 && !available())) {
182+
int avail = available();
183+
if ((!buf && size) || avail <= 0) {
190184
return -1;
191185
}
192186
if(!size){
@@ -196,7 +190,8 @@ int WiFiClientSecure::read(uint8_t *buf, size_t size)
196190
buf[0] = _peek;
197191
_peek = -1;
198192
size--;
199-
if(!size || !available()){
193+
avail--;
194+
if(!size || !avail){
200195
return 1;
201196
}
202197
buf++;
@@ -206,23 +201,23 @@ int WiFiClientSecure::read(uint8_t *buf, size_t size)
206201
int res = get_ssl_receive(sslclient, buf, size);
207202
if (res < 0) {
208203
stop();
209-
return res;
204+
return peeked?peeked:res;
210205
}
211206
return res + peeked;
212207
}
213208

214209
int WiFiClientSecure::available()
215210
{
211+
int peeked = (_peek >= 0);
216212
if (!_connected) {
217-
return 0;
213+
return peeked;
218214
}
219215
int res = data_to_read(sslclient);
220-
if (res < 0 ) {
216+
if (res < 0) {
221217
stop();
222-
} else if(_peek >= 0) {
223-
res += 1;
218+
return peeked?peeked:res;
224219
}
225-
return res;
220+
return res+peeked;
226221
}
227222

228223
uint8_t WiFiClientSecure::connected()

Diff for: platform.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra
2222

2323
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
2424
compiler.sdk.path={runtime.platform.path}/tools/sdk
25-
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module"
25+
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp32-camera"
2626

2727
compiler.c.cmd=xtensa-esp32-elf-gcc
2828
compiler.c.flags=-std=gnu99 -Os -g3 -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
@@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
3535

3636
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
3737
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception
38-
compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lapp_update -lnghttp -lspiffs -lunity -lesp_https_server -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lstdc++
38+
compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lesp32-camera -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lapp_update -lnghttp -lspiffs -lunity -lesp_https_server -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lstdc++
3939

4040
compiler.as.cmd=xtensa-esp32-elf-as
4141

@@ -71,10 +71,10 @@ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor
7171
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
7272

7373
## Create archives
74-
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/arduino.ar" "{object_file}"
74+
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
7575

7676
## Combine gc-sections, archives, and objects
77-
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{build.path}/arduino.ar" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
77+
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
7878

7979
## Create eeprom
8080
recipe.objcopy.eep.pattern={tools.gen_esp32part.cmd} -q "{runtime.platform.path}/tools/partitions/{build.partitions}.csv" "{build.path}/{build.project_name}.partitions.bin"

0 commit comments

Comments
 (0)