Closed
Description
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Platform / Settings in IDE
Deleted because doesn't matter here (any of these should lead to the same result AFAIK, but happy to provide if necessary.)
Problem Description
interruptFunctional
in FunctionInterrupt
should probably have the ICACHE_RAM_ATTR
attribute set. Right now it appears the function is linked into the normal flash section. And because this is (always) called from an ISR that will fail.
Arduino/cores/esp8266/FunctionalInterrupt.cpp
Lines 14 to 26 in 9790e1c
MCVE Sketch
#include <Arduino.h>
#include <FunctionalInterrupt.h>
void setup() {
// doesn't work reliably, my guess the function is pre-cached somehow and so
// no interrupt for reading it into cache needs to be called?
// I don't have the experience to say.
attachInterrupt(D1, [](){}, CHANGE);
}
void loop() {}
Exception decode
See full stacktrace here: esphome/issues#61 (comment) (original report)
The important part is here:
[15:17:04]Exception (0):
WARNING Exception type: unknown
[15:17:04]epc1=0x4020a208 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
WARNING Decoded 0x4020a208: interruptFunctional(void*)
- Exception type 0 likely means the usual
ICACHE_RAM_ATTR
error. - epc1 is 0x4020a208 - not
0x4010C000
as seen here. - epc1 also gets decoded to
interruptFunctional
- so the error is likely there (I don't think the compiler can inline anything here)
Metadata
Metadata
Assignees
Labels
No labels