eggfly / StickWatch

A DIY smart watch based on M5Stick of ESP32
https://item.taobao.com/item.htm?id=581055502939
Apache License 2.0
82 stars 37 forks source link

Sketch too big on M5Stick #5

Open kalon33 opened 4 years ago

kalon33 commented 4 years ago
Arduino: 1.8.10 (Linux), Board: "M5Stack-Core-ESP32, QIO, 80MHz, Default, 921600, None"
[...]
Using library SPI at version 1.0 in folder: /home/nicolas/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/SPI 
Using library Wire at version 1.0.1 in folder: /home/nicolas/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/Wire 
Using library U8g2 at version 2.27.6 in folder: /home/nicolas/Arduino/libraries/U8g2 
Using library WiFi at version 1.0 in folder: /home/nicolas/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/WiFi 
Using library HTTPClient at version 1.2 in folder: /home/nicolas/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/HTTPClient 
Using library WiFiClientSecure at version 1.0 in folder: /home/nicolas/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/WiFiClientSecure 
Using library Preferences at version 1.0 in folder: /home/nicolas/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/Preferences 
Using library BLE at version 1.0.1 in folder: /home/nicolas/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/BLE 
/home/nicolas/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-size -A /tmp/arduino_build_129923/StickWatch.ino.elf
Sketch uses 1913106 bytes (145%) of program storage space. Maximum is 1310720 bytes.

Global variables use 64192 bytes (19%) of dynamic memory, leaving 263488 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board M5Stack-Core-ESP32.

Could you please help me doing this? Currently Stickwatch is unusable on M5Stick :'(

sysdl132 commented 4 years ago

Arduino: 1.8.10 (Linux), Board: "M5Stack-Core-ESP32, QIO, 80MHz, DefaultLarge APP(No OTA), 921600, None" Don't use default!Use"Large APP No ota" setting.

sysdl132 commented 4 years ago

image

sysdl132 commented 4 years ago

it should be:

Compiling 'StickWatch' for 'M5Stack-Core-ESP32'
esptool.py v2.6
Program size: 1,776,962 bytes (used 85% of a 2,097,152 byte maximum) (72.91 secs)
Minimum Memory Usage: 60940 bytes (19% of a 327680 byte maximum)
kalon33 commented 4 years ago

Ok, I tested your solution and that worked, thanks a lot!

kalon33 commented 4 years ago

Do you have a good battery life with this?

sysdl132 commented 4 years ago

Yes.You can keep the screen on for 2 hours.(only low power required)

kalon33 commented 4 years ago

And is it possible to enhance battery life some way? I tested putting it to sleep but couldn't wake it without a reset, and not much battery life improvement...

kalon33 commented 4 years ago

I just tested and only got 35min battery life with the screen on :(

sysdl132 commented 4 years ago

You can just press the side button to wake it

sysdl132 commented 4 years ago

image