why is .c set to have -fno-inline-functions?
I think it is historical and probably meant to save space back then.
.c
files were converted to .cpp
files quite a time ago.
volatile int32_t lastmu = 0; // read only outside
void IRAM_ATTR isr(void) {
static int32_t currentmu = 0;
// do something with currentmu... not shown
if (somecondition) {
lastmu = currentmu;
currentmu = 0;
}
}
void init() {
attachInterrupt(digitalPinToInterrupt(somepin), isr, RISING);
}
void fetch() {
int32_t data = lastmu;
}
not shown
code
int32_t aaa = somevar;
might not be, depending on where somevar is stored
aaa
will be changed in a single cycle
somevar
[hostByName] request IP for: iop-monitor-server.tk
[hostByName] Host: iop-monitor-server.tk IP: 104.236.4.125
:ref 1
BSSL:_connectSSL: start connection
_iobuf_in: 0x3fff441c
_iobuf_out: 0x3fff8574
_iobuf_in_size: 16709
_iobuf_out_size: 597
[TRACE] TRACER: Entering new scope, at line 59, in function virtual void iop::CertStore::installCertStore(br_x509_minimal_context*), at file cert_store.cpp
[TRACE] TRACER: Free Stack 1988, Free DRAM 11552, Biggest DRAM Block 11280, Connection 1
[TRACE] TRACER: Leaving scope, at line 59, in function virtual void iop::CertStore::installCertStore(br_x509_minimal_context*), at file cert_store.cpp
BSSL:Installed certstore
:wr 226 0
:wrc 226 226 0
:ack 226
:rn 536
:rd 5, 536, 0
:rdi 536, 5
:rch 536, 536
:rd 85, 1072, 5
:rdi 531, 85
:rch 1072, 536
:rch 1608, 536
:rd 5, 2144, 90
:rdi 446, 5
:rd 2049, 2144, 95
:rdi 441, 441
:c 441, 536, 2144
:rdi 536, 536
:c 536, 536, 1608
:rdi 536, 536
:c 536, 536, 1072
:rdi 536, 536
:c0 536, 536
:rn 536
:rd 536, 536, 0
:rdi 536, 536
:c0 536, 536
:rn 536
:rd 536, 536, 0
:rdi 536, 536
:c0 536, 536
:rn 536
:rch 536, 536
:rd 914, 1072, 0
:rdi 536, 536
:c 536, 536, 1072
:rdi 536, 378
BSSL:_run_until: closed
BSSL:_wait_for_handshake: failed
BSSL:Couldn't connect. Error = 'Certificate is expired or not yet valid.'
BSSL:Couldn't connect. Error = 'Certificate is expired or not yet valid.'
pitem = getParameters(FPSTR(HTTP_CONFIG_HTML), useDefaults);
page += pitem; //this sometimes gets skipped!!!!!
page += FPSTR(HTTP_FORM_END);
page += FPSTR(HTTP_BACKBTN);
page += FPSTR(HTTP_END);
As further troubleshooting, here is my code and output. I had the problem when using getParamsOut() before, then I removed the params altogether to embed my HTML config directly into WM (not elegant, but easier to edit the HTML directly rather than build through params).
Sometimes pitem gets added in, then sometimes it doesn't!!! How can this be? I added size checks below to show that pitem is not empty but somehow doesn't get added to page via page += pitem
page += FPSTR(HTTP_FORM_WIFI_END);
pitem = getBwjohns4StoredHTML(FPSTR(HTTP_CONFIG_HTML), useDefaults);
Serial.print("Size of Pitem: ");
Serial.println(pitem.length());
Serial.print("Page Size Before: ");
Serial.println(page.length());
page += pitem;
Serial.print("Page Size After: ");
Serial.println(page.length());
page += FPSTR(HTTP_FORM_END);
page += FPSTR(HTTP_BACKBTN);
page += FPSTR(HTTP_END);
Then here is the output:
wm:[2] AP: -86 Deathstar
wm:[2] AP: -86 SpectrumSetup-18
wm:[2] AP: -87 SpectrumSetup-04
Size of Pitem: 7776
Page Size Before: 6230
Page Size After: 6230
wm:[2] <- Request redirected to captive portal
wm:[2] <- HTTP Root
wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root