From a1c4a1563b2eb67a4617a001380fd7bee9bf455c Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Fri, 3 Mar 2023 18:20:15 +0100 Subject: [PATCH] figments: mainloop: fix .noinit support on esp8266 --- lib/Figments/MainLoop.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Figments/MainLoop.cpp b/lib/Figments/MainLoop.cpp index 77e3121..dc8d76a 100644 --- a/lib/Figments/MainLoop.cpp +++ b/lib/Figments/MainLoop.cpp @@ -13,9 +13,11 @@ MainLoop::dispatch(const InputEvent& evt) m_eventBuf.insert(evt); } -//#ifdef BOARD_ESP32 +#ifndef __NOINIT_ATTR // Pre-defined on esp32 +#define __NOINIT_ATTR __attribute__ ((section (".noinit"))) +#endif + __NOINIT_ATTR const char* s_lastTaskName; -//#endif void MainLoop::dispatchSync(const InputEvent& evt)