I'm encountering a really stupid problem at the moment i really cannot wrap my head around.
The Project is a PlatformIO project, here is the platformio.ini:
- [env:esp32cam]
- platform = espressif32
- board = esp32cam
- framework = arduino
- monitor_speed = 115200
- lib_deps =
- IRremoteESP8266
- Adafruit NeoPixel
- ArduinoJson
- PubSubClient
- EEPROM
- NeoPixelBus
- build_flags =
- -D MQTT_MAX_PACKET_SIZE=512
- -D MQTT_KEEPALIVE=5
- -D ARDUINOJSON_USE_LONG_LONG=1
Learning more about C++, i decided to properly structure the project, moving method implementations to .cpp files. After a few Files i ran into the following error:
Code: Select all
/Users/jklink/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32cam/firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
/Users/jklink/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/Users/jklink/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 4896 bytes
It reappears when splitting up ANY other file.
What kinda wonders me is that after building the project it displays the following message:
RAM: [==== ] 37.0% (used 121328 bytes from 327680 bytes)
Flash: [=== ] 27.1% (used 852254 bytes from 3145728 bytes)
esptool.py v2.6
The RAM usage looks all good there.
The PlatformIO Home Inspection Tool tells me there are 100% (347.9kb) RAM used, but only 22% Flash.
There is not a single additional line Code written, so the compiled code should not be longer than the original one only stored in .h Files.
The complete src directory has a size of 246kb.
Has anyone a suggestion how to handle that?
Thanks in advance,
J. Klink