Weekend caught me here, but I now did a test and System.freeMemory() reports free memory to be 17296. This is after removing a 10k buffer that we suspect to be related to the problem. The error still persists with this much free memory though.
I’ve gone back in our GIT repository and found that the error started occurring late April. At this point in time our freemem reported 23704 bytes and the compilation stats were like this:
text | data | bss | dec | hex | filename |
---|---|---|---|---|---|
74220 | 2124 | 27028 | 103372 | 193cc | /workspace/target/workspace.elf |
On purpose, our code does very little dynamic allocation. If we remove features in our firmware so that we approach 21Kb free memory, it’ll start to work. With 20448 bytes, it still exhibits the problem, so it looks like there’s a limit somewhere near that number in our case. Does that fit with what you’ve found @bsatrom?
This is the compilation output at the point in time when things start working:
text | data | bss | dec | hex | filename |
---|---|---|---|---|---|
80716 | 2144 | 29500 | 112360 | 1b6e8 | /workspace/target/workspace.elf |