Commit Graph
259 Commits
Author SHA1 Message Date
joluxer ba88358ed6 ESP8266: fix heap metric functions and add OOM diagnostics (#24777)
* ESP8266: fix ESP_getMaxAllocHeap() and ESP_getHeapFragmentation()

Both functions returned wrong values: ESP_getMaxAllocHeap() returned
ESP.getFreeHeap() (total free, not largest contiguous block);
ESP_getHeapFragmentation() read ummHeapInfo.maxFreeContiguousBlocks,
which is only valid immediately after a umm_info() heap walk.

Fix: cache the result of umm_max_block_size() in ESP_UpdateHeapMetrics().
The cache is refreshed once per second when SetOption130 is active, and
on demand in CmndStatus() before Status 4 is output. Both getter functions
read the cached value; the call site overhead is a single integer read.

umm_max_block_size() is unconditionally available (UMM_INFO is hardcoded
in the Arduino ESP8266 umm_malloc_cfg.h), so no build flags are required.

Status 4 (StatusMEM) gains two ESP8266-specific fields: MaxFreeBlock (KB)
and Frag (%).

* ESP8266: add heap OOM diagnostics, Status 4 fields, Status 44 dump

OOM event monitoring (requires UMM_INLINE_METRICS or UMM_STATS_FULL):
- ESP_HeapOomCheck(): called once per second; logs the OOM counter delta
  when the counter changes ("OOM: count N (+M)")
- ESP_HeapOomTest(): logs current OOM count on demand

Status 4 (StatusMEM) gains additional ESP8266-specific fields when the
corresponding build flags are active:
- OomCount: cumulative out-of-memory events (UMM_INLINE_METRICS or
  UMM_STATS_FULL)
- HeapLwm (KB): heap low-watermark since boot (UMM_STATS_FULL)
- MaxAllocSz (bytes): peak single allocation size (UMM_STATS_FULL)

Status 44 (ESP8266-only diagnostic command):
- Triggers umm_info(nullptr, true) to print a full heap block map to
  the serial console
- Calls ESP_HeapOomTest() to log the current OOM count
- Returns {"Status44":{"HeapDump":"serial"}}
- Status 44 is accepted regardless of MAX_STATUS

Build flags UMM_STATS_FULL and UMM_INLINE_METRICS can be enabled via
platformio_override.ini build_flags; documented in
platformio_override_sample.ini.
2026-05-25 17:25:04 +02:00
Jason2866 1754557741 Switch to Tasmota Arduino 3.3.8 for all builds (#24676) 2026-04-25 15:17:25 +02:00
Jason2866 7f9fdb7255 Platform 2026.03.50 to support IDF 55 (#24567) 2026-03-18 14:16:45 +01:00
Theo Arends 0e9246e428 Replace CRLF in LF 2026-02-13 11:24:01 +01:00
Jason2866 9d57238015 Platform 2026.02.30 Tasmota Arduino Core 3.1.10 based on IDF 5.3.4.20260127 (#24444) 2026-02-12 13:11:03 +01:00
s-hadinger f2006566d7 Extension Manager, replacing loading of Partition Wizard (#23955) 2025-09-27 17:20:34 +02:00
Jason2866 3eb6bf6c8e Add initial c5 support (#23804) 2025-08-20 21:51:23 +02:00
Jason2866 f320ca2982 Phase out of Tasmota espressif32 frameworks solo1 and ITEAD (#22315)
* Step 1 of phase out of special frameworks solo1 and ITEAD
2024-10-18 19:18:10 +02:00
Jason2866 db3d292cae Update Tasmota Arduino Core 3.0.2 based on IDF 5.2.2
- i2s fix
2024-07-13 13:45:01 +02:00
Jason2866 99374ae45b Tasmota Platform 2024.07.10 (#21745)
* Tasmota Platform 2024.07.10
* Update IDF 5.2.2 based Platform
2024-07-07 18:54:29 +02:00
Jason2866andChristian Baars b1422ff6b5 make Tasmota compatible for Arduino espressif32 based on IDF 5.2.2 (#21723)
Co-authored-by: Christian Baars <Baars@gmx.de>
2024-07-03 20:27:18 +02:00
Jason2866 c7ff6342d8 remove extensiom cdc from C3,C6,S3 variants (#21212) 2024-04-18 13:08:31 +02:00
Jason2866 f131db6d40 mv deprecated drivers / Pio clean up 2024-04-17 11:28:17 +02:00
Jason2866 04d7d188b3 house keeping 2024-04-16 16:10:59 +02:00
Jason2866 951fba99b1 Breaking: ESP32 Core 3.0.0 only support (#21180)
* Core 3.0.0 only

* rm Arduino30 settings

* rm lib ignore `NimBLE-Arduino`

* rm obsolete or duplicate env entrys
2024-04-15 11:39:48 +02:00
Jason2866 58f50045d9 Add the possibility to set global compile time settings (#20013) 2023-11-14 16:36:09 +01:00
Jason2866 6a86576dac add MI env (#19902)
* rename odroid ard3 env to tasmota32-psramfix_ard3
* add inbuilt JTAG debugger
* rm Homekit leftovers
* add MI env
2023-11-02 12:03:14 +01:00
Jason2866 6527442110 move core3 platform to platformio_tasmota32.ini (#19889)
* Update platformio_tasmota32.ini

* Update platformio_tasmota_core3_env_sample.ini

* Update platformio_tasmota_core3_env_sample.ini

* Update platformio_override_sample.ini

* Fix optical look

* Update platformio_tasmota_core3_env_sample.ini

* Update platformio_tasmota32.ini
2023-10-31 20:42:29 +01:00
Jason2866 53bd4635d9 move arduino30 default envs (#19885) 2023-10-31 13:35:58 +01:00
Jason2866 2b398d309e pio proper lib_ignore fix (#19742) 2023-10-14 20:30:48 +02:00
Jason2866 b5d1109163 rm obsolete partition schemes (#19713)
* rm obdolete partition schemes

* fix tasmota32-zbbrdgpro compile

* rm overseen partition scheme

* Special scheme needed for zbbrdgpro
2023-10-10 12:55:36 +02:00
Jason2866 7488ed03f0 Tasmota based on Arduino 3.0.0 (#19270) 2023-08-06 13:44:28 +02:00
Jason2866 2ffd4311c3 Enable more esp32 libs by default (#18821) 2023-06-08 13:01:24 +02:00
Jason2866 d7af0ae077 Platformio small clean up and updates (#18325)
* clean up and updates
* no core 3.x settings
2023-04-03 18:54:43 +02:00
Jason2866 71e14d62fe all scripts working (#18105)
* mv obj-dump.py
* add pre: and post: to scripts
2023-03-04 11:31:34 +01:00
Jason2866 2207d08cfa rm non existing env tasmota32-sensors 2023-01-31 11:41:41 +01:00
Jason2866 9fa29c4f39 rm upload_port defaults (#17443)
* rm upload_port defaults
2022-12-20 09:27:10 +01:00
Jason2866 29705c15af revert Platformio changes (#17433) 2022-12-18 17:56:24 +01:00
Barbudor ff02873af3 fix failure building cenv in linux (#17432) 2022-12-18 17:05:32 +01:00
blakadder c908dc289e remove manual upload port and switch to autodiscovery in platformio (#17427) 2022-12-17 21:52:12 +01:00
Jason2866 673966df09 Use latest devel IPv6 frameworks (#17396) 2022-12-14 17:12:27 +01:00
Theo Arends 711b1bb432 Update platformio_override_sample.ini 2022-12-13 15:02:01 +01:00
Jason2866 724b0342c7 Reduce Boards manifests
## Description:

by using the 4MB default safeboot partition scheme layout. Tasmota will increase the FS partition with
the new Autoresize feature introduced with PR #16838 #16842

So it is possible to reduce the boards mainifest since it is no more needed to have different ones for boards with different flash sizes. Added generic S3 Flash / PSRAM boards variants. Removed all S3 boards specific variants. Configuration is done via Autoconfig. For a few special use cases maybe an [env] needs to be defined. Examples for are in file `platformio_tasmota_cenv_sample.ini`

@s-hadinger @arendst @staars please test. Since it is a major change how the firmwares are build, there is maybe something i overlooked. So i do not check all below.

## Checklist:
  - [x] The pull request is done against the latest development branch
  - [x] Only relevant files were touched
  - [ ] Only one feature/fix was added per PR and the code change compiles without warnings
  - [ ] The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  - [ ] The code change is tested and works with Tasmota core ESP32 V.2.0.5
  - [x] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).

_NOTE: The code change must pass CI tests. **Your PR cannot be merged unless tests pass**_
2022-10-17 16:04:11 +02:00
Jason2866 6b1deb5e5e Revert "refac (#16845)" (#16846)
This reverts commit bc4fb77db0.
2022-10-17 15:38:30 +02:00
Jason2866 bc4fb77db0 refac (#16845)
* Update sensor.h

* Update esp_camera.h

* refactor boards manifests

* fix s3 safebooot env

* fix env
2022-10-17 15:37:26 +02:00
Jason2866 a6937977f9 changes One Platform 2022-09-24 17:36:06 +02:00
Jason2866 f9707217e6 Move DHT ESP32 lib to ESP32 lib 2022-08-09 11:46:25 +02:00
Theo Arends 1b701173d0 Rename usb to cdc 2022-06-07 16:37:10 +02:00
Theo Arends 7af1279b55 Add tasmota32s2usb 2022-06-07 12:52:44 +02:00
Jason2866 8314dc3dc7 add builds zbbrdgpro / NsPanel 2022-06-02 20:44:00 +02:00
Jason2866 793c1fedac add the new build env
in override example
2022-06-02 16:56:04 +02:00
Jason2866 89e2be4efe Retrigger Build 2022-05-13 10:36:01 +02:00
Jason2866 2b835b1bc9 adds option for flashing of extra *.bin files 2022-04-26 17:18:14 +02:00
Jason2866 621cb9545d Update devel Tasmota framework
to latest build based on IDF 4.4.1 and Arduino master .git from 24.04.2022
2022-04-24 16:22:31 +02:00
Jason2866 dccb39c43a enable SD_MMC 2022-04-19 12:26:25 +02:00
Jason2866 4f5a406221 Lib ignore 2022-02-27 14:46:03 +01:00
Jason2866 70e8d52c62 fix ethernet in dev core pre 2.0.3 2022-02-23 20:16:18 +01:00
Jason2866 f8e8857311 new pre core 2.0.3
wifi changes in IDF Serial fixes in Arduino
2022-02-17 16:46:14 +01:00
Jason2866 7e41b7742f pre core 2.0.3 2022-02-15 22:46:35 +01:00
Jason2866 d80ebd7017 add esp32 objdump 2022-01-07 22:35:22 +01:00