-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
Resolution: DoneIssue is done internallyIssue is done internallyStatus: DoneIssue is done internallyIssue is done internally
Description
Environment
- Development Kit: [ESP32-DevKitC]
- Kit version (for WroverKit/PicoKit/DevKitC): [v1|v2|v3|v4]
- Module or chip used: [ESP32]
- IDF version: v3.2.3-105-g65db2bf87
- Build System: [PlatformIO]
- Compiler version: 1.22.0-80-g6c4433a5
- Operating System: [Windows]
- Power Supply: [external 5V]
Problem Description
IRAM_ATTR is ignored for templated function, like
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70435
Expected Behavior
IRAM_ATTR is considered.
Code to reproduce this issue
#include <Arduino.h>
template <typename Type>
class TestClass
{
public:
TestClass(Type value) :
m_value(value)
{
}
Type m_value;
Type IRAM_ATTR add(Type value) const _NOINLINE
{
return m_value + value;
}
};
static TestClass<int> myTest(5);
void setup()
{
}
void loop()
{
Serial.println(myTest.add(random(10)));
}
Debug Logs
Check via xtensa-esp32-elf-nm.exe
...
400e8710 W TestClass<int>::add(int) const
...
henrygab, dhebbeker and mickeyl
Metadata
Metadata
Assignees
Labels
Resolution: DoneIssue is done internallyIssue is done internallyStatus: DoneIssue is done internallyIssue is done internally