Closed jgamble-simple closed 2 years ago
I think the root cause is that behavior of some IDF drivers depends on CONIFG_SPIRAM_USE_MALLOC
Kconfig option. For example, if this option is enabled, Wi-Fi driver will use a slightly more complex code to allocate queues in internal RAM: https://github.com/espressif/esp-idf/blob/3e370c4296247b349aa3b9a0076c05b9946d47dc/components/esp_wifi/esp32/esp_adapter.c#L125-L153.
The authors of that code assumed that if CONFIG_SPIRAM_USE_MALLOC
is disabled, it means that malloc
only returns memory from internal RAM.
I think the solution for this problem is to enable CONIFG_SPIRAM_USE_MALLOC
by default — which is done in arduino-esp32 2.0.0 and later releases. There are some downsides to that, like increased heap usage, but there is work in progress to fix this issue.
@SuGlider PTAL on this related issue.
@jgamble-simple
Unfortunatelly 2.0.0 is not availble to PlaformIO at this moment. But it can be used with Arduino IDE.
I created a repository with a new Arduino Core 2.0.0 that can be tested.
It is part of modifications related to heap and binary allocation (#5630), and it also has CONIFG_SPIRAM_USE_MALLOC
enabled.
https://github.com/espressif/arduino-esp32/tree/mem-optimized
In order to install it as a separated board for testing, please follow the instructions from
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
The only difference here would be to clone mem-optimized branch
instead.
git clone -b mem-optimized https://github.com/espressif/arduino-esp32 esp32
In case it works fine for a number of users, we will commit it for the next ESP32 Arduino release. Please test it with your project and let me know.
@SuGlider
Actually, I figured out how to get arduino version 2.0.0 for the esp-idf by modifying my ini file:
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0
board = esp-wrover-kit
framework = arduino
So far it works with a couple tweaks to the existing code.....
So far it works
@igrr @jgamble-simple
Hi!
I've tried your solution and heap haven't increased compared to pre-2.0.0 version :(
CONFIG_SPIRAM_USE_MALLOC=y
is in sdkconfig by default in 2.0.0+, but getFreeHeap
shows 30k free after boot. Even less than with 1.0.5 version, which showed 65k free for the same firmware.
You still have to call heap_caps_malloc_extmem_enable(0);
which will enable the external heap for a malloc call.
The default is to make all malloc calls use internal heap. The argument is the smallest allocation that would still be allocated on internal heap.
Also I am not sure what the getFreeHeap
function returns, so I am not sure if that is supposed to reflect a larger heap.
@jgamble-simple
getFreeHeap
returns actually free DRAM and IRAM. Only DRAM accounts for heap.
In order to get an accurate free heap amount, please use heap_caps_get_free_size(MALLOC_CAP_8BIT)
For more information: hhttps://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/mem_alloc.html#memory-capabilities
In order to get an accurate free heap amount, please use
heap_caps_get_free_size(MALLOC_CAP_8BIT)
heap_caps_get_free_size(MALLOC_CAP_8BIT)
shows 4394040.
It looks like ssl_client.cpp
(WiFiClientSecure) uses getFreeHeap
(getHeapSize
shows 219044) :
[ssl_client.cpp:56] start_ssl_client(): Free internal heap before TLS 177812
...
[ssl_client.cpp:240] start_ssl_client(): Free internal heap after TLS 138528
and it fails when FreeHeap
is low. Does it mean that WiFiClientSecure (from arduino-esp32 2.0) uses only internal RAM and not PSRAM?
and it fails when
FreeHeap
is low. Does it mean that WiFiClientSecure (from arduino-esp32 2.0) uses only iternal RAM and not PSRAM?
WiFiClientSecure is using the hardware accelerated encryption functions. AFAIK, there is no way to use the PSRAM to feed/collect the hardware accelerator. There is a way to use DMA with the HW AES, so it might be possible to keep this off the heap, but that would be beyond my skills, and would likely need some changes in IDF.
Note that mbedTLS memory allocation policy can be configured, currently it is fixed to "internal RAM": https://github.com/espressif/esp32-arduino-lib-builder/blob/51a3ba2bcd1eaad61ff9d67de5cc93b5baeeb9f8/sdkconfig.esp32#L1152-L1155
Very interesting. I may have to play around with that at some point. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-mbedtls-mem-alloc-mode
Note that mbedTLS memory allocation policy can be configured, currently it is fixed to "internal RAM"
I've just checked it (framework-arduinoespressif32 0.0.0+sha.44c1198
):
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
# CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set
# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set
# CONFIG_MBEDTLS_DEBUG is not set
[ 26130][V][ssl_client.cpp:59] start_ssl_client(): Free internal heap before TLS 171639
...
[ 27635][V][ssl_client.cpp:294] start_ssl_client(): Free internal heap after TLS 132607
and
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
# CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set
# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set
# CONFIG_MBEDTLS_DEBUG is not set
[ 26141][V][ssl_client.cpp:59] start_ssl_client(): Free internal heap before TLS 171639
...
[ 27642][V][ssl_client.cpp:294] start_ssl_client(): Free internal heap after TLS 132607
Gives the same heap size...
@mrdc Could you please clarify where have you specified CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
? Did you rebuild arduino-esp32 libraries using arduino-lib-builder?
Could you please clarify where have you specified
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
?
Sure, here you go:\.platformio\packages\framework-arduinoespressif32@src-2567d2800cf655927e3f141014aee93c\tools\sdk\esp32\sdkconfig
Did you rebuild arduino-esp32 libraries using arduino-lib-builder?
Not yet, have to check first how to do it :)
@mrdc
Changes to sdkconfig
only take effect when the libraries are rebuilt and copied using the scripts from
https://github.com/espressif/esp32-arduino-lib-builder
Please check the latest Arduino release v2.0.1RC1 that makes more heap sapce available, reduces the binary size and keeps CONIFG_SPIRAM_USE_MALLOC
enabled.
Any update on this?
I am seeing what I think is the same issue on Arduino Core 2.0.1 AND 2.0.3-rc1.
Is anyone else? How sure are we that this is resolved?
Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
Core 0 register dump: PC : 0x40085382 PS : 0x00060c35 A0 : 0x80085454 A1 : 0x3ffbeb0c A2 : 0x3f8291cc A3 : 0xbad00bad A4 : 0x00060a23 A5 : 0x40094d7c A6 : 0x003fffff A7 : 0x3ffdb0dc A8 : 0x3ffbcfe0 A9 : 0x3ffbebfc A10 : 0x00000011 A11 : 0x00000000 A12 : 0x0000186a A13 : 0x00000000 A14 : 0x0000186a A15 : 0x00004000 SAR : 0x0000000f EXCCAUSE: 0x00000007 EXCVADDR: 0x00000000 LBEG : 0x400917e4 LEND : 0x400917fa LCOUNT : 0x00000000
Backtrace:0x4008537f:0x3ffbeb0c |<-CORRUPTED
0 0x4008537f:0x3ffbeb0c in esp_timer_stop at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/e
sp-idf/components/esp_timer/src/esp_timer.c:192
ELF file SHA256: 0000000000000000
I am 100% sure that it works on 2.0.0.... But I am not sure that it works on later versions, because I am still on 2.0.0 for my project @raphael-bmec-co
@jgamble-simple thanks for this. I will role back to 2.0.0 and see if I am still seeing the crash. Appreciate the prompt feedback.
Okay I have done days and days of testing on this and I am afraid it is 100% not working as detailed below.
This seems like a huge stability issue to me. Using BLE+WiFi+PSRAM is a base use case for secure IoT applications. Hopefully this is something that is resolvable. The fact that it was working on 1.0.6 is promising.
Can we reopen this issue or should I copy this across to a new issue?
Board: ESP32 Dev Module
Device: Chip is ESP32-D0WD-V3 (revision 3); Auto-detected Flash size: 16MB
Hardware Configuration: None
Version: 1.0.6; 2.0.0; 2.0.1; 2.0.2; 2.0.3-RC1
IDE Name: Arduino IDE AND CLion with PIO
OS: Windows 10
Flash frequency: 80 MHz
PSRAM enabled: Yes
Upload speed: 921600
Description
Using BLE
+ WiFi
+ heap_caps_malloc_extmem_enable(0)
causes a spontaneous crash when the AP is not found and also at other random times. The AP not found case is most easily replicated and is detailed below:
1.0.6: NO CRASH
2.0.0: Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
2.0.1: Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
2.0.2: Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
2.0.3-RC1: Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).
Sketch
#include <WiFi.h>
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
// Set to 1 to accelerate the crash. Set to zero to see a typical use case.
#define ACCELERATED_CRASH 1
// BLE defines.
#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"
void setup() {
// Comment this line and the crash does not happen.
heap_caps_malloc_extmem_enable(0);
// Serial.
Serial.begin(115200);
Serial.println("Starting BLE...");
// Minimum BLE simplified from example.
BLEDevice::init("Long name works now");
BLEServer *pServer = BLEDevice::createServer();
BLEService *pService = pServer->createService(SERVICE_UUID);
BLECharacteristic *pCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID,
BLECharacteristic::PROPERTY_READ |
BLECharacteristic::PROPERTY_WRITE
);
pCharacteristic->setValue("Hello World says Neil");
pService->start();
BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
pAdvertising->addServiceUUID(SERVICE_UUID);
BLEDevice::startAdvertising();
Serial.println("Started BLE");
// Minimum WiFi.
Serial.println("Starting WiFi connection attempt...");
WiFi.begin("missing network", "password");
Serial.print("Available heap:");
Serial.println(ESP.getFreeHeap());
}
void loop() {
// This causes a crash to happen faster and may be useful for debugging.
// However the crash will happen even without this block.
if(ACCELERATED_CRASH){
while(!WiFi.isConnected()){
log_i("Attempting connection...");
WiFi.begin("missing network", "password");
delay(100);
}
}
delay(1000);
Serial.println("Loop");
}
Potentially related issues: https://github.com/espressif/esp-idf/issues/5129 https://github.com/espressif/esp-idf/issues/5214 https://esp32.com/viewtopic.php?t=26875
@VojtechBartoska it seems like this may have it's root cause in the IDF according to these comments: https://github.com/espressif/esp-idf/issues/7249#issuecomment-1103830017
It seems like it may also be causing other issues with other components in the Arduino core.
Are you able to give me some picture of if patches to the IDF are propagated into the Arduino cores and how long this might take?
Thanks!
Hello, rough realistic timeline is 1st week of May fixed in IDF and sync to Arduino.
@VojtechBartoska thank you. We will follow-up early may to check on progress. Much appreciated.
I'm adding this issue to our Roadmap to keep eyes on it. :)
@VojtechBartoska thank you.
@Jason2866 I'm relying on your PIO packages. Thank you! Once this fix is implemented, will you be able to create a new PIO package?
@raphael-bmec-co If the patch is merged in IDF44 and you ping me i will do a build.
@Jason2866 Fantastic. Thank you!
@Jason2866 looks like they patched it a couple of days back: https://github.com/espressif/esp-idf/issues/7249#issuecomment-1110513248
Hopefully this sorts issues for a bunch of people.
Thanks again for doing the build.
@raphael-bmec-co You can use with
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3new.zip
platform_packages = https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/826/framework-arduinoespressif32-v4.4_work-b98c8476f2.tar.gz
Thanks @Jason2866
pio run
is failing with error:
Error: Could not find the package with 'esp32-arduino-lib-builder @ *' requirements for your system 'windows_amd64'
Ah, sorry correct is
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3new.zip
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/826/framework-arduinoespressif32-v4.4_work-b98c8476f2.tar.gz
Thanks @Jason2866
This compiles but I'm getting a crash loop:
rst:0x3 (SW_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DOUT, clock div:1 load:0x3fff0030,len:344 load:0x40078000,len:13328 load:0x40080400,len:3488 entry 0x400805d0 ets Jul 29 2019 12:21:46
I'll post this for the IDF guys too to see if it is their doing and do some more detailed debugging tomorrow, but please let me know if you have any ideas.
Hi @Jason2866
Okay I can't get anything at all to run. I have also tried several different flash modes and frequencies. Before I go back to the IDF guys, is there anything obviously wrong with the Arduino Core build? Are you able to get anything running? Apologies for adding work to your plate.
@raphael-bmec-co Tried latest build. All my devices with PSRAM do work and uses the PSRAM. ESP32, ESP32-S2 and ESP32-S3. We / i do not use PSRAM for "everything", since it is slower. We place only RAM consuming (not time critical) functions there. Imho it is a bad idea at all to place wifi task in PSRAM.
@Jason2866 I'll try a bit harder to see if I can get something running.
I'm assuming you ran your test with PIO and the platform
and platform_packages
you shared? I've got:
[env:esp32dev]
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3new.zip
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/826/framework-arduinoespressif32-v4.4_work-b98c8476f2.tar.gz
board = esp32dev
framework = arduino
upload_port = COM6
;BOARD OPTIONS
build_flags =
; Enable PSRAM.
; -DBOARD_HAS_PSRAM
; -mfix-esp32-psram-cache-issue
; Set cores.
; -DARDUINO_RUNNING_CORE=1
; -DARDUINO_EVENT_RUNNING_CORE=1
; -DCONFIG_ARDUINO_ISR_IRAM=0
; -DCONFIG_SPIRAM_USE_MALLOC=1
; Set comment level.
; None
;-DCORE_DEBUG_LEVEL=0
; Error
;-DCORE_DEBUG_LEVEL=1
; Warn
;-DCORE_DEBUG_LEVEL=2
; Info
-DCORE_DEBUG_LEVEL=3
; Debug
;-DCORE_DEBUG_LEVEL=4
; Verbose
;-DCORE_DEBUG_LEVEL=5
; Set frequency to 240MHz.
board_build.f_cpu = 240000000L
; Set partition scheme to https://github.com/espressif/arduino-esp32/tree/master/tools/partitions.
board_build.partitions = default_8MB.csv
; Set the flash size.
board_build.flash_size = 16MB
; Set flash mode.
board_build.flash_mode = qout
; Set flash frequency to 80MHz.
board_build.f_flash = 80000000L
; Set upload speed.
upload_speed = 2000000
monitor_filters = esp32_exception_decoder
monitor_port = COM6
monitor_speed = 115200
We don't have much choice on the PSRAM front. We need BLE and WiFi and we are using Google IoT core so we need WiFi secure. Without messing with sdkConfig and building our own Arduino Core, we have to put everything in PSRAM to get enough space for SSL. Unless I'm missing something here. If you know something I don't I'm all ears!
Thanks.
For reducing resources we do not use mbedtls and NimBLE from Arduino for Tasmota. Using a optimized BearSSL implementation and h2zero NimBLE (using lower resources too). So we are able to connect to AWS IoT (custom implementation) if wanted. In general using Bluetooth is a big resource "taker".
@Jason2866 I have narrowed the issue to the partition table selection. 'default.csv' works. default_16MB.csv
and default_8MB.csv
do not. I'll keep at it but please let me know if you know what is causing this.
I've seen this issue but I'm using a ESP32-D0WDQ5-V3 (revision 3)
We do not use any of the predefined partition schemes for Tasmota. May you try one of these. I have esp32 with 16MB and the do work (one of them was used for the tests above) with using our schemes
@Jason2866 nope that also isn't working. I noted in that esp32_8M.json that you seem to be using Arduino as a component? Is this the case? I am using the core only.
No, it is Arduino only used. Have you a example code which is failing? If your project fails, you have "somewhere" a issue. We use the flash space from devices > 4Mb for OTA and filesystem and have not encountered problems. No issues from Tasmota users either ever in github or in our Discord. Stability problems arrive only when BLE is heavily used.
May you try flashmode dout
and flash frequency 40
Mhz and 80
Mhz cpu clock.
I have seen some bad devices...
Okay I have testing on two different devices now one with 8MB flash and one with 16MB. Not working as detailed below. Not sure where to go to from here.
This is the trimmed down PIO file showing with partition files work and which don't:
[env:esp32dev]
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3new.zip platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/826/framework-arduinoespressif32-v4.4_work-b98c8476f2.tar.gz
board = esp32dev framework = arduino
build_flags = -DCORE_DEBUG_LEVEL=3
; Set frequency to 240MHz. board_build.f_cpu = 80000000L
; Set partition scheme to https://github.com/espressif/arduino-esp32/tree/master/tools/partitions. ;FAIL board_build.partitions = esp32_partition_app2944k_spiffs2M.csv ;FAIL board_build.partitions = app3M_fat9M_16MB.csv ;PASS board_build.partitions = default.csv ;FAIL board_build.partitions = default_16MB.csv ;FAIL board_build.partitions = default_8MB.csv ;PASS board_build.partitions = default_ffat.csv ;FAIL board_build.partitions = ffat.csv ;PASS board_build.partitions = huge_app.csv ;FAIL board_build.partitions = large_spiffs_16MB.csv ;PASS board_build.partitions = min_spiffs.csv ;PASS board_build.partitions = minimal.csv ;PASS board_build.partitions = no_ota.csv ;PASS board_build.partitions = noota_3g.csv ;PASS board_build.partitions = noota_3gffat.csv ;PASS board_build.partitions = noota_ffat.csv ;PASS board_build.partitions = rainmaker.csv
; Set the flash size. board_build.flash_size = 8MB ; Set flash mode. board_build.flash_mode = dout ; Set flash frequency to 80MHz. board_build.f_flash = 40000000L
monitor_filters = esp32_exception_decoder monitor_speed = 115200
This is the very simple sketch that I am testing with:
#include "Arduino.h"
void setup() {
log_e("setup");
}
void loop() {
log_e("loop");
vTaskDelay(1000);
}
reverting to:
platform = https://github.com/tasmota/platform-espressif32.git#v2.0.3rc1
They all work again. I think something is up with the Arduino Core build and/or the IDF?
Thats your problem
board_build.flash_size = 8MB
Board partition size and partition scheme have to fit together. You can NOT define board_build.flash_size
without having the coresponding correct partition scheme
Just do not use this setting! Define a custom partition scheme for your needs and use this!
All working with latest Arduino master :-)
Tried your test sketch with a M5 stack core2. No problem.
#include <Arduino.h>
#include <WiFi.h>
#include "esp_wifi.h"
#include "esp_heap_caps.h"
void setup() {
heap_caps_malloc_extmem_enable(0);
WiFi.begin("Jason_Home_WLAN", "xxxxx");
}
void loop() {
}
[env:m5stack-core2]
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.3rc1/platform-espressif32-2.0.3new.zip
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/826/framework-arduinoespressif32-v4.4_work-b98c8476f2.tar.gz
board = m5stack-core2
board_build.partitions = esp32_partition_app2944k_spiffs10M.csv
framework = arduino
;lib_deps = ArduinoJson
build_flags =
-DCORE_DEBUG_LEVEL=5
-DBOARD_HAS_PSRAM=1
-DCONFIG_ARDUINO_ISR_IRAM=1
-O3 -ffast-math
M5 stack core2 has no PSRAM bug, so fixes not needed.
[.....öÍm.umïÕ¡Õ2-hal-cpu.c:214] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 4][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 50][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 0 - WIFI_READY
[ 139][V][WiFiGeneric.cpp:283] _arduino_event_cb(): STA Started
[ 141][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 2 - STA_START
[ 141][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
[ 3921][V][WiFiGeneric.cpp:295] _arduino_event_cb(): STA Connected: SSID: Jason_Home_WLAN, BSSID: 88:c3:97:b1:1d:56, Channel: 4, Auth: WPA2_PSK
[ 3923][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 5334][V][WiFiGeneric.cpp:305] _arduino_event_cb(): STA Got New IP:192.168.2.168
[ 5335][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 5338][D][WiFiGeneric.cpp:914] _eventCallback(): STA IP: 192.168.2.168, MASK: 255.255.255.0, GW: 192.168.2.1
@SuGlider There is no issue
agreed that should match and I will remove it if not needed however even if it matches the boot loop still happens.
Taking a close look at the screenshot you send I noticed the sdk wasn't a 100% match. I took a closer look at the platform
and platform_packages
.
Changing the platform_packages
did not help.
Changing the platform
from platform-espressif32-2.0.3new.zip
to platform-espressif32-2.0.3.zip
(removing the new
) made the issue go away.
Does this make sense to you? Is this a valid setup to test IDF changes?
Also I am using platform_packages
release 826
but I see you are testing on 828
. Do both of these have the IDF patch in them?
The difference is just minor. 826 is from yesterday and 828 from today. I tested both. Both work.
And the 2.0.3new
versus 2.0.3
?
It is only a minor update of how Platformio is catching the packages. Not related to the build process
Hardware:
Board: Custom board based on ESP32-WROVER-E Core Installation version: 1.0.6 IDE name: Platform.io PSRAM enabled: yes Upload Speed: 230400 Computer OS: Windows 10 (Using wsl for uploading/platform.io)
Description:
Calling
heap_caps_malloc_extmem_enable(0)
causes a crash about 20% of the time when trying to connect to wifi, I have trimmed back my application to the bare min required to crash it. If I remove theheap_caps_malloc_extmem_enable
call then it works properly........Is this supposed to work? Or this crash expected?
Compiler Flags defined in platformio.ini:
Sketch:
Debug Messages: