eried / flipperzero-mayhem

Perfect companion for your Flipper Zero. ESP32 with WiFi, BT/BLE, micro-SD, camera+PSRAM, flashlight and extras: NRF24/CC1101, 3V/5V sensors
MIT License
496 stars 26 forks source link

update esp32_marauder to v0.13.10 #45

Closed runcom closed 1 month ago

runcom commented 1 month ago

there are probably a bunch of useless files as this is a fork, @eried let me know if you want me to get rid of them (like PreviousVersions and such) Also, this compiles cleanly against ESP32 Dev Module in Arduino IDE as usual but I can't test it out completely on my flipper/mayhem before next week unfortunately.

eried commented 1 month ago

Thanks! it was missing camera stuff but it should be kinda ready to start testing and release soon if it works ok

runcom commented 1 month ago

I'm now getting the following compiling:

/Users/user1/koding/flipperzero-mayhem/esp32cam_marauder/MotionDetection.ino:2:10: fatal error: eloquent_esp32cam.h: No such file or directory
 #include <eloquent_esp32cam.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: eloquent_esp32cam.h: No such file or directory

I have the library installed at version 1.1.2,

updating to the latest 2.7.7 tells me again I have no space (using ESP32 Dev Module or AI Thinker ESP32 cam don't work the same)

/Users/user1/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/2q/b_hxf6nn50ddy8s9s8prfvfh0000gn/T/arduino/sketches/EF35CDE55DCEC7F8DF8D89DE5D8D5621/esp32cam_marauder.ino.elf section `.iram0.text' will not fit in region `iram0_0_seg'
/Users/user1/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: IRAM0 segment data does not fit.
/Users/user1/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: region `iram0_0_seg' overflowed by 1344 bytes
collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1
eried commented 1 month ago

Strange, the I will test later on a fresh machine with latest everything to see how it goes, because on my current machine works ok

runcom commented 1 month ago

This is what I have rn (changing to 40MHz is the same also obviously, also changing the partition doesn't help either):

Screenshot 2024-05-27 at 16 12 55
runcom commented 1 month ago

alrighty, I narrowed it down to having Bluetooth enabled HAS_BT - if I comment that out it works, otherwise, no matter what board/combination etc I use, I always get that 1.3kb extra iram that doesn't make me compile 🤷

runcom commented 1 month ago

I've tried again on a fedora 40 machine, same error when BT is enabled - not sure, maybe it's some dependency specific version

eried commented 1 month ago

strange, because BT should be enabled tho

eried commented 1 month ago

I still havent had much time to poke around this BTW, I will post results after I do

runcom commented 1 month ago

strange, because BT should be enabled tho

right, the thing is when I disable it, it compiles cleanly :/ it's weird cause if I take the ESP32Marauder repo and compile with bluetooth it works just fine

runcom commented 1 month ago

@eried which version specifically are you using for NimBle and eloquent?

runcom commented 1 month ago

apart from not being able to compile&upload the latest code w/o removing BT, everything else seems to be working fine, having tested it on the official mayhem v2 hardware and a standalone ESP32-CAM. The compile thing is quite bothering tho :/ I really can't get it to compile for those extra kilobytes. I'll provide a list of versions for the installed libraries, maybe that helps cross-checking with you

eried commented 1 month ago

@eried which version specifically are you using for NimBle and eloquent?

Hi, im using latest of them.

runcom commented 4 weeks ago

Hi, im using latest of them.

ack, wondering if there's a way to dump libraries versions so I can cross check, so far, no luck :/

eried commented 4 weeks ago

I usually just click update when arduino ide prompts, but this time some changes in the camera messed up stuff, and the eloquent movement sensing also changed, so it would be smart to specify a version for next time in the build instructions, or move to plataformio where is built in

eried commented 4 weeks ago

Hi, im using latest of them.

ack, wondering if there's a way to dump libraries versions so I can cross check, so far, no luck :/

Ok, so I did some updates, and in the instructions: https://github.com/eried/flipperzero-mayhem/wiki/Compilation-of-the-firmware

And now it compiles for me, no errors, but I havent tested how it works on the board yet.

runcom commented 4 weeks ago

ack, I'll try that, by the way, if in the preferences you enhance logs, you'll see which library you're using

Using library FS at version 2.0.0 in folder: /home/amurdaca/.arduino15/packages/esp32/hardware/esp32/2.0.10/libraries/FS 
Using library LinkedList at version 1.3.3 in folder: /home/amurdaca/Arduino/libraries/LinkedList 
Using library SPIFFS at version 2.0.0 in folder: /home/amurdaca/.arduino15/packages/esp32/hardware/esp32/2.0.10/libraries/SPIFFS 
Using library WiFi at version 2.0.0 in folder: /home/amurdaca/.arduino15/packages/esp32/hardware/esp32/2.0.10/libraries/WiFi 
Using library ESP Async WebServer at version 1.2.3 in folder: /home/amurdaca/Arduino/libraries/ESPAsyncWebServer 
Using library AsyncTCP at version 1.1.4 in folder: /home/amurdaca/Arduino/libraries/AsyncTCP 
Using library DNSServer at version 2.0.0 in folder: /home/amurdaca/.arduino15/packages/esp32/hardware/esp32/2.0.10/libraries/DNSServer 
Using library ArduinoJson at version 7.0.4 in folder: /home/amurdaca/Arduino/libraries/ArduinoJson 
Using library SD_MMC at version 2.0.0 in folder: /home/amurdaca/.arduino15/packages/esp32/hardware/esp32/2.0.10/libraries/SD_MMC 
Using library Update at version 2.0.0 in folder: /home/amurdaca/.arduino15/packages/esp32/hardware/esp32/2.0.10/libraries/Update 
Using library Wire at version 2.0.0 in folder: /home/amurdaca/.arduino15/packages/esp32/hardware/esp32/2.0.10/libraries/Wire 
Using library NimBLE-Arduino at version 1.4.1 in folder: /home/amurdaca/Arduino/libraries/NimBLE-Arduino 
Using library EloquentEsp32cam at version 2.7.7 in folder: /home/amurdaca/Arduino/libraries/EloquentEsp32cam 
Using library quirc_lib in folder: /home/amurdaca/Arduino/libraries/quirc_lib (legacy)
Using library MicroNMEA at version 2.0.6 in folder: /home/amurdaca/Arduino/libraries/MicroNMEA 
Using library EspSoftwareSerial at version 8.1.0 in folder: /home/amurdaca/Arduino/libraries/EspSoftwareSerial 
Using library Adafruit NeoPixel at version 1.12.2 in folder: /home/amurdaca/Arduino/libraries/Adafruit_NeoPixel 

the above is what I'm using, when I get the error about iram

eried commented 4 weeks ago

Here is mine that compiled:

Using library FS at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\FS 
Using library LinkedList at version 1.3.3 in folder: E:\Documents\Arduino\libraries\LinkedList 
Using library SPIFFS at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\SPIFFS 
Using library WiFi at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\WiFi 
Using library Networking at version 1.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\Network 
Using library ESP Async WebServer at version 2.10.4 in folder: E:\Documents\Arduino\libraries\ESP_Async_WebServer 
Using library AsyncTCP at version 1.1.4 in folder: E:\Documents\Arduino\libraries\AsyncTCP 
Using library DNSServer at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\DNSServer 
Using library ESP32 Async UDP at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\AsyncUDP 
Using library ArduinoJson at version 7.0.4 in folder: E:\Documents\Arduino\libraries\ArduinoJson 
Using library SD_MMC at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\SD_MMC 
Using library Update at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\Update 
Using library Wire at version 2.0.0 in folder: C:\Users\erwin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\Wire 
Using library NimBLE-Arduino at version 1.4.1 in folder: E:\Documents\Arduino\libraries\NimBLE-Arduino 
Using library Adafruit NeoPixel at version 1.12.2 in folder: E:\Documents\Arduino\libraries\Adafruit_NeoPixel 
Using library EloquentEsp32cam at version 2.7.7 in folder: E:\Documents\Arduino\libraries\EloquentEsp32cam 
Using library quirc_lib in folder: E:\Documents\Arduino\libraries\quirc_lib (legacy)
Using library MicroNMEA at version 2.0.6 in folder: E:\Documents\Arduino\libraries\MicroNMEA 
Using library EspSoftwareSerial at version 8.1.0 in folder: E:\Documents\Arduino\libraries\EspSoftwareSerial 
runcom commented 4 weeks ago

what's the version of the esp32 espressif library? I'm using 2.0.10

nevermind, I see you're using latest 3.0.0

runcom commented 4 weeks ago

alrighty, I got it working now by using everything you're using :) now it compiles with HAS_BT too

eried commented 4 weeks ago

nice! let me know if everything runs ok. You think it would be better to specify the versions? which component was the culprit?

runcom commented 4 weeks ago

nice! let me know if everything runs ok. You think it would be better to specify the versions? which component was the culprit?

I think it was two things: the espressif version (I was using 2.x, you're using 3.0.0 and I updated) + the ESP web server, I was wrongly's using justcallmekoko's I think if we need specific versions we should specify them, but it seems "the latest" are working anyway, so no issue for now :)

eried commented 4 weeks ago

ok cool, I wish I didnt had to mod the esp web server, but it has a conflict with linkedlists -_-