So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By TrtyS
#90903 I recenty start messing with esp8266 in their RTOS SDK (because I want to finish one school project and I thing it would be cool if it will be in RTOS). But my code keeps crashing and I cant find out why.. :/ I am not new to microcontrollers but I know only a few thing about RTOS so thats why I post this into Newbie Corner.

After few failed attempts, i created this simple program and it gives the same error, it boots just fine, but crashes after while..

Program:
Code: Select all#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
 
void empty_task() {
    while(1) {
 
    }
}
 
void app_main() {
    xTaskCreate(
        empty_task,
        "Empty Task",
        1024,
        NULL,
        1,
        NULL
    );
}


Log:
Code: Select all ets Jan  8 2013,rst cause:2, boot mode:(3,6)
 
load 0x40100000, len 7040, room 16
tail 0
chksum 0xeb
load 0x3ffe8408, len 24, room 8
tail 0
chksum 0x02
load 0x3ffe8420, len 3312, room 8
tail 8
chksum 0x76
csum 0x76
I (44) boot: ESP-IDF v3.4-rc 2nd stage bootloader
I (44) boot: compile time 10:28:46
I (44) qio_mode: Enabling default flash chip QIO
I (51) boot: SPI Speed      : 80MHz
I (57) boot: SPI Mode       : QIO
I (63) boot: SPI Flash Size : 4MB
I (69) boot: Partition Table:
I (75) boot: ## Label            Usage          Type ST Offset   Length
I (86) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (98) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (109) boot:  2 factory          factory app      00 00 00010000 000f0000
I (121) boot: End of partition table
I (127) esp_image: segment 0: paddr=0x00010010 vaddr=0x40210010 size=0x13b78 ( 80760) map
0x40210010: _stext at ??:?
 
I (163) esp_image: segment 1: paddr=0x00023b90 vaddr=0x40223b88 size=0x05560 ( 21856) map
I (170) esp_image: segment 2: paddr=0x000290f8 vaddr=0x3ffe8000 size=0x003dc (   988) load
I (175) esp_image: segment 3: paddr=0x000294dc vaddr=0x40100000 size=0x00080 (   128) load
I (188) esp_image: segment 4: paddr=0x00029564 vaddr=0x40100080 size=0x04548 ( 17736) load
I (206) boot: Loaded app from partition at offset 0x10000
Task watchdog got triggered.
 
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Core 0 register dump:
PC      : 0x4021cca0  PS      : 0x00000030  A0      : 0x00000000  A1      : 0x3ffeb590 
0x4021cca0: empty_task at /home/user/Documents/esp8266/hello_world/main/main.c:38 (discriminator 1)
 
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000 
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x00000000 
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x00000000 
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000000  EXCCAUSE: 0x00000000 
 
Backtrace: 0x4021cca0:0x3ffeb590
0x4021cca0: empty_task at /home/user/Documents/esp8266/hello_world/main/main.c:38 (discriminator 1)


Am I missing something ?

Resources I found:
page 291: https://www.mouser.com/pdfdocs/esp-idf.pdf
https://docs.espressif.com/projects/esp ... ion-errors