Core dump:Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)

azz-zza
Posts: 45
Joined: Tue Sep 17, 2019 2:58 am

Core dump:Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)

Postby azz-zza » Sat Oct 12, 2019 2:32 pm

Hello,
im at my wits end and would appreciate your guidance, please.
the following basic code falls with the core dump.

Code: Select all

#include <stdio.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include <unistd.h>
#include "esp_timer.h"
#include "esp_log.h"
#include "esp_sleep.h"
#include "sdkconfig.h"
#include "freertos/event_groups.h"
#include "driver/gpio.h"

#define BLUE_PIN GPIO_NUM_2

void CallBack(TimerHandle_t handle);

extern "C" void app_main(void) {
    xTimerHandle timerHndl1Sec;
    BaseType_t timerstarted;

    timerHndl1Sec = xTimerCreate(
                        "timer1Sec", /* name */
                        pdMS_TO_TICKS(1000), /* period/time */
                        pdTRUE, /* auto reload */
                        (void*)0, /* timer ID */
                        CallBack /* callback */
                    );

    gpio_pad_select_gpio(BLUE_PIN);
    gpio_set_direction(BLUE_PIN,GPIO_MODE_OUTPUT);
    gpio_set_level(BLUE_PIN,1);

    if (timerHndl1Sec !=NULL) {
        printf("Starting Timer");
        timerstarted = xTimerStart( timerHndl1Sec, 0 );
        if (timerstarted == pdPASS) {
            vTaskStartScheduler();
        };
    };

    if (timerHndl1Sec==NULL) {
        for(;;); /* failure! */
    };

};

void CallBack(TimerHandle_t handle) {
    printf("turning on and off");
//    gpio_set_level(BLUE_PIN, 1); /* toggle red LED */
//    usleep(2000);
//    gpio_set_level(BLUE_PIN, 0); /* toggle red LED */
};


And the output is

Code: Select all

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6104
load:0x40078000,len:8816
ho 0 tail 12 room 4
load:0x40080400,len:6412
entry 0x40080748
␛[0;32mI (30) boot: ESP-IDF 3.30202.190627 2nd stage bootloader␛[0m
␛[0;32mI (31) boot: compile time 01:51:22␛[0m
␛[0;32mI (31) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (36) boot: SPI Speed      : 40MHz␛[0m
␛[0;32mI (40) boot: SPI Mode       : DIO␛[0m
␛[0;32mI (44) boot: SPI Flash Size : 4MB␛[0m
␛[0;32mI (48) boot: Partition Table:␛[0m
␛[0;32mI (52) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (59) boot:  0 nvs              WiFi data        01 02 00009000 00006000␛[0m
␛[0;32mI (67) boot:  1 phy_init         RF data          01 01 0000f000 00001000␛[0m
␛[0;32mI (74) boot:  2 factory          factory app      00 00 00010000 00100000␛[0m
␛[0;32mI (82) boot: End of partition table␛[0m
␛[0;32mI (86) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x07924 ( 31012) map␛[0m
␛[0;32mI (105) esp_image: segment 1: paddr=0x0001794c vaddr=0x3ffbdb60 size=0x021dc (  8668) load␛[0m
␛[0;32mI (109) esp_image: segment 2: paddr=0x00019b30 vaddr=0x40080000 size=0x00400 (  1024) load␛[0m
␛[0;32mI (113) esp_image: segment 3: paddr=0x00019f38 vaddr=0x40080400 size=0x060d8 ( 24792) load␛[0m
␛[0;32mI (131) esp_image: segment 4: paddr=0x00020018 vaddr=0x400d0018 size=0x14120 ( 82208) map␛[0m
␛[0;32mI (160) esp_image: segment 5: paddr=0x00034140 vaddr=0x400864d8 size=0x05224 ( 21028) load␛[0m
␛[0;32mI (175) boot: Loaded app from partition at offset 0x10000␛[0m
␛[0;32mI (175) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (176) cpu_start: Pro cpu up.␛[0m
␛[0;32mI (179) cpu_start: Starting app cpu, entry point is 0x400810dc␛[0m
␛[0;32mI (171) cpu_start: App cpu up.␛[0m
␛[0;32mI (190) heap_init: Initializing. RAM available for dynamic allocation:␛[0m
␛[0;32mI (197) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM␛[0m
␛[0;32mI (203) heap_init: At 3FFC1130 len 0001EED0 (123 KiB): DRAM␛[0m
␛[0;32mI (209) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM␛[0m
␛[0;32mI (215) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM␛[0m
␛[0;32mI (222) heap_init: At 4008B6FC len 00014904 (82 KiB): IRAM␛[0m
␛[0;32mI (228) cpu_start: Pro cpu start user code␛[0m
␛[0;32mI (246) cpu_start: Starting scheduler on PRO CPU.␛[0m
␛[0;32mI (0) cpu_start: Starting scheduler on APP CPU.␛[0m
Guru Meditation Error: Core  0 panic'ed (Unhandled debug exception)
Debug exception reason: BREAK instr 
Core 0 register dump:
PC      : 0x40082674  PS      : 0x00000016  A0      : 0x40080306  A1      : 0x3ffb1c30  
A2      : 0x00000000  A3      : 0x00000005  A4      : 0x40086acb  A5      : 0x3ffb5080  
A6      : 0x00000000  A7      : 0x3ffc07b4  A8      : 0x00050023  A9      : 0x3ffc07b4  
A10     : 0x00000001  A11     : 0x00000000  A12     : 0x8008779c  A13     : 0x3ffb5070  
A14     : 0x00000003  A15     : 0x00060023  SAR     : 0x00000013  EXCCAUSE: 0x00000001  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  

Backtrace: 0x40082674:0x3ffb1c30 0x40080303:0x00000001

Rebooting...
ets Jun  8 2016 00:22:57




azz-zza
Posts: 45
Joined: Tue Sep 17, 2019 2:58 am

Re: Core dump:Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)

Postby azz-zza » Sat Oct 12, 2019 9:05 pm

after adding logging and err checking the error went away and the code started to work //faceplam

godzilla2
Posts: 19
Joined: Wed Apr 28, 2021 5:15 am

Re: Core dump:Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)

Postby godzilla2 » Tue Dec 20, 2022 10:19 am

To add to the conversation, I got this error when I was doing a modulo by zero.

uint32_t n = 1024 % count; // if count is zero... Unhandled debug exception

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: Core dump:Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)

Postby bidrohini » Tue Dec 20, 2022 2:50 pm

For guru meditation error, you can check the following links if you already have not. You can also raise this issue in github if needed.
viewtopic.php?t=19135
https://github.com/espressif/esp-idf/issues/8848

Who is online

Users browsing this forum: No registered users and 89 guests