[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 

Guru Med Error after porting to ESP32 RSS feed
Forum Index » IoAbstraction & TaskManagerIO
Author Message
Rockclimber399


Joined: Jan 29, 2021
Messages: 4
Offline
Hey,

I'm assuming this is the right section for this because of the backtrace result. But it may belong in the arduino section.

So I had a fairly rough time porting my program from an ATMega to the ESP32, but finally (or so I thought) had it working. Now for some reason I'll randomly get this error while it is running:

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40101be2  PS      : 0x00060930  A0      : 0x800ea545  A1      : 0x3ffb1f10  
A2      : 0x3ffc2654  A3      : 0x00000000  A4      : 0x3ffc14e4  A5      : 0x00000001  
A6      : 0x00000000  A7      : 0x3ffb0060  A8      : 0x3f41036c  A9      : 0x00000000  
A10     : 0x3ffb8388  A11     : 0x11400000  A12     : 0x3ffc14e4  A13     : 0x00000001  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x800ea56d  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffc  

ELF file SHA256: 0000000000000000

Backtrace: 0x40101be2:0x3ffb1f10 0x400ea542:0x3ffb1f30 0x400ea5dd:0x3ffb1f50 0x400d1cb6:0x3ffb1f70 0x400d1bf2:0x3ffb1f90 0x400d3655:0x3ffb1fb0 0x40086df6:0x3ffb1fd0
  #0  0x40101be2:0x3ffb1f10 in onSwitchesInterrupt(unsigned char) at .pio\libdeps\REPTestOSV3\IoAbstraction\src/SwitchInput.cpp:267
  #1  0x400ea542:0x3ffb1f30 in TaskManager::dealWithInterrupt() at .pio\libdeps\REPTestOSV3\TaskManagerIO\src/TaskManagerIO.cpp:411
  #2  0x400ea5dd:0x3ffb1f50 in TaskManager::runLoop() at .pio\libdeps\REPTestOSV3\TaskManagerIO\src/TaskManagerIO.cpp:411
  #3  0x400d1cb6:0x3ffb1f70 in REPTestOS::runOS() at c:\users\benne\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\5.2.0/functional:1873
  #4  0x400d1bf2:0x3ffb1f90 in loop() at src/main.cpp:15
  #5  0x400d3655:0x3ffb1fb0 in loopTask(void*) at C:\Users\benne\.platformio\packages\framework-arduinoespressif32\cores\esp32/main.cpp:23
  #6  0x40086df6:0x3ffb1fd0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)


I'm not sure if this is enough to give you a direction to point me. I'm not currently using any of the Taskmanager/IoAbstraction interrupts in my software. From what I can tell in this, it seems like It sees an interrupt firing when it shouldn't be? I've been chasing my tail a while on this one!


Here is the code that is causing the error. It occurs once the test is running. First time doing a project this large...so my apologies for the lack of organization. smilie
https://github.com/rockclimber399/REPTestOSV3



davetcc


Joined: Jan 19, 2019
Messages: 420
Offline
So I had a fairly rough time porting my program from an ATMega to the ESP32


ESP32 is a true RTOS, so has a memory manager etc, it is far less forgiving of any memory access violations. We test tcMenu on ESP32 heavily because it's one of our main development boards. We know that the core works well on ESP32.

I'm not sure what version of tcMenu / IoAbstraction you are using, but it must be quite old, as even going back to 1.7 does not seem to line up. I would recommend upgrading, there are fixes for ESP32 on the latest versions of all the libraries. That would be :

* TaskManagerIO
* LiquidCrystalIO
* IoAbstraction
* and tcMenu

I'm not sure if this is enough to give you a direction to point me. I'm not currently using any of the Taskmanager/IoAbstraction interrupts in my software.


The crash is a load of an invalid memory location in the rotary encoder interrupt.

I recommend that you create a branch, remove as much code as possible from the sketch and first try the menu in isolation, comment out wifi and everything else. Check if you still see the crash. If you still see it, I'll try and debug that version with a hardware debugger.

Otherwise, keep bringing code back in until the board crashes again, and at that point, it will be evident what's wrong and we can try and help there, to see if there's an incompatibility with something that you are using.
 
Forum Index » IoAbstraction & TaskManagerIO
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.