I seem to have blown some memory constraint !
Posted: Tue Nov 28, 2017 5:52 am
I have a rather large program but it only claims to take up about 300K of memory. But if I add just one more line it starts putting out odd error messages or if it compiles, it does not operate properly. The program is too large to load here but I will show what to do to see the memory blow. Please get the program from ILikeTheInternet.com. It is the WeMoWX Master code and is in a ZIP file.
At line 1132, you will find the SendLogOK routine. This is copied and modified code and is perfectly valid.
If you uncomment line 1136, an erroneous error appears saying that a routine is not defined yet it is defined and used all over the program. Here is the line to uncomment:
AppendAndSendHTML is used multiple places and works just fine but when this line is uncommented, it claims it is not defined thus:
What is causing the compiler to suddenly believe that this routine is not there?
I have had problems, previously, when I got much over 60% usage of dynamic memory. I have put everything that I can into F macros and that saved some space. Some stuff won't go into them. Something about not having a helper. Not sure what that is about but there is not a lot of it, anyway. But I cannot imagine why the compiler would care, anyway, about "too much" dynamic memory being used.
All help and pointers on this appreciated. This error ends project development until it is solved.
Code: Select all
Sketch uses 320757 bytes (30%) of program storage space. Maximum is 1044464 bytes.
Global variables use 51176 bytes (62%) of dynamic memory, leaving 30744 bytes for local variables. Maximum is 81920 bytes.
At line 1132, you will find the SendLogOK routine. This is copied and modified code and is perfectly valid.
If you uncomment line 1136, an erroneous error appears saying that a routine is not defined yet it is defined and used all over the program. Here is the line to uncomment:
Code: Select all
// AppendAndSendHTML("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n", true, false);
AppendAndSendHTML is used multiple places and works just fine but when this line is uncommented, it claims it is not defined thus:
Code: Select all
'AppendAndSendHTML' was not declared in this scope
What is causing the compiler to suddenly believe that this routine is not there?
I have had problems, previously, when I got much over 60% usage of dynamic memory. I have put everything that I can into F macros and that saved some space. Some stuff won't go into them. Something about not having a helper. Not sure what that is about but there is not a lot of it, anyway. But I cannot imagine why the compiler would care, anyway, about "too much" dynamic memory being used.
All help and pointers on this appreciated. This error ends project development until it is solved.