-
-
Notifications
You must be signed in to change notification settings - Fork 896
Open
Labels
ESP8266enhancementrelease-notesIssues that have information that should be included in the release notesIssues that have information that should be included in the release notes
Description
When compiling against arduino core 3.x, MySensors startup code seems to hang during startup, without producing any output.
What needs to be fixed in MySensors:
- MySensors takes over the startup code of a platform, which has changed significantly with core 3.
- Just updating the MySensors startup code to the core 3 version doesn't seem to work out of the box
- Interrupt handlers need to be defined using IRAM_ATTR instead of ICACHE_RAM_ATTR
- Implementation of MY_CRITICAL_SECTION needs reviewing
- Part of ESP8266 code is shared with ESP32 code; make sure this doesn't break
Quick hack to get things working again:
- MyHwHal.h
- Replace
#define IRQ_HANDLER_ATTR ICACHE_RAM_ATTR
by#define IRQ_HANDLER_ATTR IRAM_ATTR
- Replace
- MySensors.h
- Comment the line
#include "hal/architecture/ESP8266/MyMainESP8266.cpp"
- Comment the line
- Delete the file
MySensors/hal/architecture/ESP8266/MyMainESP8266.cpp
Change your sketch as follows:
void setup()
{
static bool runonce = true;
if (runonce)
{
runonce = false;
Serial.begin(MY_BAUD_RATE, SERIAL_8N1, MY_ESP8266_SERIAL_MODE, 1);
_begin();
}
// ...your regular setup() code...
}
void loop()
{
// ...your regular loop() code...
wait(0); // At start/end of loop, Important!
}
mfalkvidd, virtual-maker, dungdao191299, KooLru, peripi and 4 more
Metadata
Metadata
Assignees
Labels
ESP8266enhancementrelease-notesIssues that have information that should be included in the release notesIssues that have information that should be included in the release notes