astir13 / SoftRF

:airplane: Multifunctional, compatible DIY general aviation proximity awareness system; This branch is for the prime mkII version only, making it fully integratable in gliders with "other" legacy compatible equipment.
GNU General Public License v3.0
2 stars 0 forks source link

SoftRF cannot compile due to program memory full on ESP32: removed baro #12

Open VirusPilot opened 1 month ago

VirusPilot commented 1 month ago

I ran into the same issue with my fork and resolved it with selecting Partition Scheme -> Huge App (3MB no OTA/1MB SPIFFS). Linar still seems to compile with ESP32 version 1.0.5 while we compile with 2.0.17 which seems to consume much more memory. Moshe's fork is compiled with 2.0.3 which also needs less memory.

astir13 commented 1 month ago

Hey VirusPilot, thanks for the hint. Maybe the best solution would be to install 1.0.5 on the ESP?

VirusPilot commented 1 month ago

I can give it a try with my fork this evening. My experience so far was that the combination of ESP32 Arduino Release Version and Arduino Library versions is very sensitive.

astir13 commented 1 month ago

Yeah, maybe we shouldn't change your solution if it works :-) Did you verify v7 FLARM functionality already with the latest changes from Linar?

astir13 commented 1 month ago

"/Users/sp/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool" --chip esp32 --port "/dev/cu.usbserial-54760008741" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 "/private/var/folders/84/m7fv_6sn4dz6y1qp31pwzf_80000gn/T/arduino/sketches/32954CF997E5E4A8A91CA0ADC4E5D6C9/SoftRF.ino.bootloader.bin" 0x8000 "/private/var/folders/84/m7fv_6sn4dz6y1qp31pwzf_80000gn/T/arduino/sketches/32954CF997E5E4A8A91CA0ADC4E5D6C9/SoftRF.ino.partitions.bin" 0xe000 "/Users/sp/Library/Arduino15/packages/esp32/hardware/esp32/2.0.16/tools/partitions/boot_app0.bin" 0x10000 "/private/var/folders/84/m7fv_6sn4dz6y1qp31pwzf_80000gn/T/arduino/sketches/32954CF997E5E4A8A91CA0ADC4E5D6C9/SoftRF.ino.bin" esptool.py v4.5.1 Serial port /dev/cu.usbserial-54760008741 Connecting...... Chip is ESP32-D0WDQ6-V3 (revision v3.0) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 94:b5:55:c7:24:90 Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed.

A fatal error occurred: Unable to verify flash chip connection (Packet content transfer stopped (received 6 bytes)). Failed uploading: uploading error: exit status 2

VirusPilot commented 1 month ago

Yes, v7 FLARM works with latest upstream version.

VirusPilot commented 1 month ago

So back to ESP32 Arduino Release Version 1.0.5 - it did not compile right away, I am afraid it is too old. So I can try newer versions to see how memory footprint changes.

VirusPilot commented 1 month ago

So at least v2.0.3 (which is what Moshe's fork is using) seems to fit into the "Minimal SPIFFS" partition scheme, I haven't flashed that version yet:

Sketch uses 1725445 bytes (87%) of program storage space. Maximum is 1966080 bytes. Global variables use 60736 bytes (18%) of dynamic memory, leaving 266944 bytes for local variables. Maximum is 327680 bytes.