Issue with partitions on ESP8266 RTOS SDK 3.4

101 views Asked by At

I am getting error when I run my esp8266 with the latest RTOS SDK. Actually using platformio I am trying to adapt the code was written for ESP32. I had lots of pieces modified but the one i struggling with is partitions

␛[0;32mI (30) boot: ESP-IDF 3.4.0+sha.519046b 2nd stage bootloader␛[0m
␛[0;32mI (31) boot: compile time 23:03:30␛[0m
␛[0;32mI (31) boot: SPI Speed      : 40MHz␛[0m
␛[0;32mI (34) boot: SPI Mode       : DIO␛[0m
␛[0;32mI (38) boot: SPI Flash Size : 4MB␛[0m
␛[0;32mI (42) boot: Partition Table:␛[0m
␛[0;32mI (46) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (53) boot:  0 nvs              WiFi data        01 02 00009000 00004000␛[0m
␛[0;32mI (60) boot:  1 otadata          OTA data         01 00 0000d000 00002000␛[0m
␛[0;32mI (68) boot:  2 phy_init         RF data          01 01 0000f000 00001000␛[0m
␛[0;32mI (75) boot:  3 ota_0            OTA app          00 10 00010000 000f0000␛[0m
␛[0;32mI (82) boot:  4 ota_1            OTA app          00 11 00110000 000f0000␛[0m
␛[0;32mI (90) boot:  5 device           unknown          40 00 00200000 00001000␛[0m
␛[0;32mI (97) boot:  6 stations         unknown          41 00 00201000 00010000␛[0m
␛[0;32mI (105) boot:  7 device1          unknown          42 00 00211000 00001000␛[0m
␛[0;32mI (112) boot:  8 hardware         WiFi data        01 02 00212000 00003000␛[0m
␛[0;32mI (119) boot:  9 �����1��)�       unknown          ff ff ffffffff ffffffff␛[0m
␛[0;32mI (127) boot: End of partition table␛[0m
␛[0;32mI (131) boot: No factory image, trying OTA 0␛[0m
␛[0;32mI (136) esp_image: segment 0: paddr=0x00010010 vaddr=0x40210010 size=0x7a878 (501880) map␛[0m
␛[0;32mI (145) esp_image: segment 1: paddr=0x0008a890 vaddr=0x4028a888 size=0x20a34 (133684) map␛[0m
␛[0;32mI (154) esp_image: segment 2: paddr=0x000ab2cc vaddr=0x3ffe8000 size=0x00aa0 (  2720) load␛[0m
␛[0;32mI (162) esp_image: segment 3: paddr=0x000abd74 vaddr=0x40100000 size=0x00080 (   128) load␛[0m
␛[0;32mI (171) esp_image: segment 4: paddr=0x000abdfc vaddr=0x40100080 size=0x057a4 ( 22436) load␛[0m
␛[0;32mI (180) boot: Loaded app from partition at offset 0x10000␛[0m
␛[0;32mI (198) Main: starting app_main()␛[0m
␛[0;32mI (199) Main: RAM left: 73900, Internal 0␛[0m
␛[0;31mE (201) Main: Running partition type 0 subtype 16 (offset 0x00010000)␛[0m
␛[0;31mE (204) eeprom: getDeviceSetting fails␛[0m
␛[0;32mI (209) Main: Partition init done...␛[0m
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x402163d2  PS      : 0x00000030  A0      : 0x402163cd  A1      : 0x3fff16d0  
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00000001  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x4024c978  A8      : 0x00000016  A9      : 0x00000090  
A10     : 0x4028d6ce  A11     : 0x64207469  A12     : 0x4028d1c4  A13     : 0x000120ac  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000001f  EXCCAUSE: 0x0000001c  

Backtrace: 0x402163d2:0x3fff16d0 0x4022670f:0x3fff16f0 

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x3ffe8008, len 24, room 16 
tail 8
chksum 0x06
load 0x3ffe8020, len 3340, room 0 
tail 12
chksum 0xec
ho 0 tail 12 room 4
load 0x40100000, len 7216, room 12 
tail 4
chksum 0xd7
csum 0xd7

It appears that partitions are there, but this code

void partitions_init(void)
{
    DEVICE = esp_partition_find_first(64,0,NULL);
    if (DEVICE == NULL) ESP_LOGE(TAG, "DEVICE Partition not found");
    STATIONS = esp_partition_find_first(65,0,NULL);
    if (STATIONS == NULL) ESP_LOGE(TAG, "STATIONS Partition not found");
    DEVICE1 = esp_partition_find_first(66,0,NULL);
    if (DEVICE1 == NULL) ESP_LOGE(TAG, "DEVICE1 Partition not found");
    muxDevice=xSemaphoreCreateMutex();
    g_device = getDeviceSettings();  // allocate one time for all
}

returns error. I am not sure, maybe my partitions.csv is not right,

# Espressif ESP8266 Partition Table
# Name,   Type, SubType, Offset,   Size
nvs,      data, nvs,     0x9000,   0x4000
otadata,  data, ota,     0xd000,   0x2000
phy_init, data, phy,     0xf000,   0x1000
ota_0,    0,    ota_0,   0x10000,  0xF0000
ota_1,    0,    ota_1,   0x110000, 0xF0000
# Ka-Radio partitions
device,   0x40,      ,   ,        0x1000
stations, 0x41,      ,   ,        0x10000
device1,  0x42,      ,   ,        0x1000
hardware, data, nvs  ,   ,        0x3000
#                END =   0x400000
0

There are 0 answers