Limit to FLASHMEM usage?

TravisSmith

Active member
I have a large project (Link) which uses FLASHMEM quite a lot to limit RAM usage. All has been fine with it previously, but it seems like I've crossed some limit/threshold in its usage....

With the last function I added (below), it doesn't give me any compile errors and memory (RAM1, 2, and Flash) usage looks fine. However, the compiled binary does nothing in my Teensy 4.1. No initialization, USB, etc. No activity that I can detect. I have to use the program button to recover/load a new image.
Removing "FLASHMEM" from the function resolves the issue and everything runs normally.

Code:
FLASHMEM ATRespCode AT_ZSoftReset(char* CmdArg)
{
   Verbose = true;
   EchoOn = true;
   return ATRC_OK;
}

It's no big deal to remove FLASHMEM from this one, but it appears I've hit some limit as any other FLASHMEM function added causes the same issue. Not sure how that would be since there's much more flash space than RAM.
I'm using Arduino 2.3.2
Any thoughts? Thank you! :)
 
@TravisSmith: What TD version are you using (TD 1.59 is the latest that has been formally released, & TD 1.60b4 (0.60b4 for the newer IDE) is the latest beta version), & which compiler optimization setting are you using ?? There have been known problems with prior versions of TD when using certain optimization levels, all of which have certainly already been addressed/fixed in the latest version of TD.

Mark J Culross
KD5RXT
 
It would be very helpful if you could post your entire sketch for others to look at. Make sure to use the CODE tags (</>) right above where you compose your reply.

Mark J Culross
KD5RXT
 
Back
Top