I’m using Teensy 3.2 and cannot build my teensy code due to two warnings resulting in an error 1 return.
Warning 1 - .pio/build/teensy31/firmware.elf section .text' will not fit in region FLASH’
Warning 2 - region `FLASH’ overflowed by 86948 bytes
Error - collect2: error: ld returned 1 exit status
From what I read it basically means that the file is too large but my src folder is 40129 bytes and Teensy 3.2 flash size is 262144 bytes as it is written in the platforms/teensy/boards/teensy31.json file.Even the build begins with >Verbose mode can be enabled via -v, --verbose
optionCONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy31.htmlPLATFORM: Teensy (4.16.0) > Teensy 3.1 / 3.2HARDWARE: MK20DX256 72MHz, 64KB RAM, 256KB FlashDEBUG: Current (jlink) External (jlink)PACKAGES:- framework-arduinoteensy @ 1.156.0 (1.56)- toolchain-gccarmnoneeabi @ 1.50401.190816 (5.4.1)
The src folder is a cpp file (with setup and loop functions) + 4 header files surrounding it with functions used in the cpp file. Also, the 2 warnings in the .h files are unrelated to the issue.Tree for more clarity