ESP32:GURU冥想错误:Core 1 Panic' ED(Storeprohined)。例外没有得到治疗

发布于 2025-02-05 04:42:24 字数 1853 浏览 3 评论 0原文

我试图弄清楚为什么在串行显示器中弹出此错误。我试图找出问题的哪个区域。我很确定这是这个,因为如果我将其删除,则代码将运行。还有更多的模型,但几乎相同。唯一的区别是运行函数。但是我认为这不是问题。我单独尝试显示课程和时钟课程,他们起作用。

这是错误消息:

//error message
Backtrace:0x40086071:0x3ffb27700x400d215d:0x3ffb2780 0x400d1262:0x3ffb27a0 0x400d12ef:0x3ffb27c0 0x400d13fe:0x3ffb2800 0x400d4019:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
*!��␄Z�*␁����M�␎�Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40086074  PS      : 0x00060b30  A0      : 0x800d2160  A1      : 0x3ffb2770  
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00000400  A5      : 0x00000000  
A6      : 0x00ff0000  A7      : 0x00000040  A8      : 0x800d2dd4  A9      : 0x3ffb2740  
A10     : 0x3ffb27d5  A11     : 0x00000000  A12     : 0x0000000a  A13     : 0x00000001  
A14     : 0x00060320  A15     : 0x00000001  SAR     : 0x00000002  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000000  LBEG    : 0x40086074  LEND    : 0x4008607f  LCOUNT  : 0x0000003f  

// thats the ModeClock.h file
#ifndef MODE_CLOCK_H
#define MODE_CLOCK_H

#include <Arduino.h>

#include "Mode.h"
#include "Clock.h"
#include "Display.h"

class ModeClock : public Mode
{
private:
    Clock clock;
    Display display;

public:
    ModeClock(Clock c, Display d)
    {
        clock = c;
        display = d;
    }
    void run() override;
};

#endif

这是.h文件的.cpp文件

#include "ModeDate.h"

void ModeDate::run()
{

    display.displayText(clock.getClockDate());
    Serial.print(clock.getClockDate());
}

,也是由继承的类模式。

#define MODE_H
#ifdef MODE_H

class Mode
{
private:
    /* data */
public:
    void virtual run() = 0;
};
#endif

我读到它可能来自尝试访问无效的内存地址。如果您使用错误的指针,那可能会发生。但是我没有使用任何指针。请帮助我,我不知道该如何继续!我真的很感激每个技巧。

I am trying to figure out why this error is popping up in the serial monitor. I tried to figure out which area of the code is the problem. I am pretty sure that it is this one, because if I remove it the code runs. There are some more ModeClasses but they are almost the same. The only difference is the run function. But I don't think that this is the problem. Display class and Clock class I tried individually and they worked.

That's the error message:

//error message
Backtrace:0x40086071:0x3ffb27700x400d215d:0x3ffb2780 0x400d1262:0x3ffb27a0 0x400d12ef:0x3ffb27c0 0x400d13fe:0x3ffb2800 0x400d4019:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
*!��␄Z�*␁����M�␎�Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x40086074  PS      : 0x00060b30  A0      : 0x800d2160  A1      : 0x3ffb2770  
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00000400  A5      : 0x00000000  
A6      : 0x00ff0000  A7      : 0x00000040  A8      : 0x800d2dd4  A9      : 0x3ffb2740  
A10     : 0x3ffb27d5  A11     : 0x00000000  A12     : 0x0000000a  A13     : 0x00000001  
A14     : 0x00060320  A15     : 0x00000001  SAR     : 0x00000002  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000000  LBEG    : 0x40086074  LEND    : 0x4008607f  LCOUNT  : 0x0000003f  

// thats the ModeClock.h file
#ifndef MODE_CLOCK_H
#define MODE_CLOCK_H

#include <Arduino.h>

#include "Mode.h"
#include "Clock.h"
#include "Display.h"

class ModeClock : public Mode
{
private:
    Clock clock;
    Display display;

public:
    ModeClock(Clock c, Display d)
    {
        clock = c;
        display = d;
    }
    void run() override;
};

#endif

Here is the .cpp file for the .h file

#include "ModeDate.h"

void ModeDate::run()
{

    display.displayText(clock.getClockDate());
    Serial.print(clock.getClockDate());
}

And here also the class Mode that is getting inherited by.

#define MODE_H
#ifdef MODE_H

class Mode
{
private:
    /* data */
public:
    void virtual run() = 0;
};
#endif

I read that it could come from trying to access an invalid memory address. That could happen if you use a pointer wrong. But I'm not using any pointer. Please help me I don't know how to get on with it! I'm really thankful for every tip.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌生 2025-02-12 04:42:25

我只是将代码(这引起此错误)复制到Arduino Uno中的Loop()函数中。它对我来说很好。看起来有一些内存访问错误,也许是“ String str [5];或“字符串 *ptr;”。

I just copied my code (which was causing this error) into my loop() function in Arduino UNO. It works fine for me. looks there were some memory access error maybe "String str[5];" or "String *ptr;".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文