VS Code re-enables 'freertos_unicore'

hayden0
Posts: 1
Joined: Tue Mar 12, 2024 1:00 pm

VS Code re-enables 'freertos_unicore'

Postby hayden0 » Tue Mar 12, 2024 1:27 pm

Hi all,
I'm trying to run two tasks on different cores but keep getting the error below. I can't work out what the error is but when I go into the sdkconfig I can see that 'FREERTOS_UNICORE' is enabled. Unfortunately, whenever I build the project or try to select another setting this is re-enabled. Is there another setting I have to change to stop this from being re-enabled?

Please see code and error message below.

ESP-IDF extension in VS Code
ESP32C3 (xiao esp32c3)

Code: Select all

#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_log.h"
#include "string.h"


void task1(void *arg)
{
    while(1)
    {
        vTaskDelay(500/ portTICK_PERIOD_MS);
    }
}
void task0(void *arg)
{
    while(1)
    {
        vTaskDelay(500/ portTICK_PERIOD_MS);
    }
}

void app_main(void)
{
    xTaskCreatePinnedToCore(task0, "task0", 1024 * 2, NULL, configMAX_PRIORITIES - 1, NULL,0);
    xTaskCreatePinnedToCore(task1, "task1", 1024 * 2, NULL, configMAX_PRIORITIES - 1, NULL,1);
}
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (76) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (83) boot: 2 factory factory app 00 00 00010000 00100000
I (91) boot: End of partition table
I (95) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=09d00h ( 40192) map
I (110) esp_image: segment 1: paddr=00019d28 vaddr=3fc8ae00 size=0122ch ( 4652) load
I (113) esp_image: segment 2: paddr=0001af5c vaddr=40380000 size=050bch ( 20668) load
I (124) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=16c10h ( 93200) map
I (143) esp_image: segment 4: paddr=00036c38 vaddr=403850bc size=05c30h ( 23600) load
I (152) boot: Loaded app from partition at offset 0x10000
I (152) boot: Disabling RNG early entropy source...
I (163) cpu_start: Unicore app
I (172) cpu_start: Pro cpu start user code
I (172) cpu_start: cpu freq: 160000000 Hz
I (173) cpu_start: Application information:
I (175) cpu_start: Project name: dmu31_logger
I (181) cpu_start: App version: 1
I (185) cpu_start: Compile time: Mar 12 2024 20:27:05
I (191) cpu_start: ELF file SHA256: e1bdea486...
I (197) cpu_start: ESP-IDF: v5.2.1
I (201) cpu_start: Min chip rev: v0.3
I (206) cpu_start: Max chip rev: v1.99
I (211) cpu_start: Chip rev: v0.4
I (216) heap_init: Initializing. RAM available for dynamic allocation:
I (223) heap_init: At 3FC8CFC0 len 00033040 (204 KiB): RAM
I (229) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (236) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (243) heap_init: At 50000010 len 00001FD8 (7 KiB): RTCRAM
I (250) spi_flash: detected chip: generic
I (254) spi_flash: flash io: dio
W (258) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (271) sleep: Configure to isolate all GPIO pins in sleep state
I (278) sleep: Enable automatic switching of GPIO sleep configuration
I (285) main_task: Started on CPU0
I (285) main_task: Calling app_main()

assert failed: xTaskCreatePinnedToCore freertos_tasks_c_additions.h:178 (( ( ( ( BaseType_t ) xCoreID ) >= 0 && ( ( BaseType_t ) xCoreID ) < 1 ) ? ( ( BaseType_t ) 1 ) : ( ( BaseType_t ) 0 ) ) == ( (
Core 0 register dump:
MEPC : 0x403806d0 RA : 0x40383a30 SP : 0x3fc8fcd0 GP : 0x3fc8b600
0x403806d0: panic_abort at C:/Users/H/esp/v5.2.1/esp-idf/components/esp_system/panic.c:472
0x40383a30: __ubsan_include at C:/Users/H/esp/v5.2.1/esp-idf/components/esp_system/ubsan.c:313

TP : 0x3fc86cf0 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000000 S1 : 0x0000007e A0 : 0x3fc8fd0c A1 : 0x3c0226b2
A2 : 0x0000007e A3 : 0x00000028 A4 : 0x00000001 A5 : 0x3fc8d000
A6 : 0x7a797877 A7 : 0x76757473 S2 : 0x00000007 S3 : 0x3fc8fea7
S4 : 0x3c022634 S5 : 0x3c0248e8 S6 : 0x00000000 S7 : 0x00000018
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
0x40380001: _vector_table at ??:?

MHARTID : 0x00000000

Stack memory:
3fc8fcd0: 0xa5a5a5a5 0xa5a5a5a5 0x3c026ff4 0x403897b8 0x3fc8b62c 0x3c026ff4 0x3fc8b63c 0x3c022718
0x403897b8: newlib_include_assert_impl at C:/Users/H/esp/v5.2.1/esp-idf/components/newlib/assert.c:93

3fc8fcf0: 0x3fc8b640 0x3fc8fd04 0x3fc8b644 0x3c022634 0x3fc8b910 0x00383731 0xa5a5a5a5 0x65737361
3fc8fd10: 0x66207472 0x656c6961 0x78203a64 0x6b736154 0x61657243 0x69506574 0x64656e6e 0x6f436f54
3fc8fd30: 0x66206572 0x72656572 0x5f736f74 0x6b736174 0x5f635f73 0x69646461 0x6e6f6974 0x3a682e73
3fc8fd50: 0x20383731 0x28202828 0x28202820 0x73614220 0x70795465 0x20745f65 0x43782029 0x4965726f
3fc8fd70: 0x20292044 0x30203d3e 0x20262620 0x20282028 0x65736142 0x65707954 0x2920745f 0x6f437820
3fc8fd90: 0x44496572 0x3c202920 0x29203120 0x28203f20 0x42202820 0x54657361 0x5f657079 0x20292074
3fc8fdb0: 0x20292031 0x2028203a 0x61422028 0x79546573 0x745f6570 0x30202920 0x29202920 0x203d3d20
3fc8fdd0: 0x00282028 0x00000000 0x00000000 0x00000000 0x00000000 0x3c0248e0 0x42007d38 0x00000800
0x42007d38: task1 at C:/Users/H/dmu31_logger/main/main.c:10

3fc8fdf0: 0x00000000 0x00000001 0x3c022000 0x403861d2 0x00000000 0x00000000 0x3c022000 0x40389510
0x403861d2: xTaskCreatePinnedToCore at C:/Users/H/esp/v5.2.1/esp-idf/components/freertos/esp_additions/freertos_tasks_c_additions.h:264
0x40389510: esp_log_write at C:/Users/H/esp/v5.2.1/esp-idf/components/log/log.c:227

3fc8fe10: 0x3fc90870 0x3fc90870 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8fe30: 0x00000000 0x00000000 0x3c022000 0x42007dac 0x3c021e10 0x0000011d 0xfe7fffff 0x4201620c
0x42007dac: app_main at C:/Users/H/dmu31_logger/main/main.c:28
0x4201620c: main_task at C:/Users/H/esp/v5.2.1/esp-idf/components/freertos/app_startup.c:209 (discriminator 13)

3fc8fe50: 0x00000000 0x00001388 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x40384688
0x40384688: vPortTaskWrapper at C:/Users/H/esp/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/port.c:258

3fc8fe70: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8fe90: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000150 0x3fc8fd60
3fc8feb0: 0x00000000 0x3fc8c1e8 0x3fc8c1e8 0x3fc8feac 0x3fc8c1e0 0x00000018 0x00000000 0x00000000
3fc8fed0: 0x3fc8feac 0x00000000 0x00000001 0x3fc8eea8 0x6e69616d 0x00000000 0x00000000 0x00000000
3fc8fef0: 0x3fc8fea0 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x3fc8d7ac 0x3fc8d814
3fc8ff10: 0x3fc8d87c 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x42004b3e
0x42004b3e: esp_cleanup_r at C:/Users/H/esp/v5.2.1/esp-idf/components/newlib/newlib_init.c:60

3fc8ff30: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8ff50: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8ff70: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8ff90: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8ffb0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8ffd0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc8fff0: 0x00000000 0x00000000 0x00000000 0x00000600 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc90010: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc90030: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc90050: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc90070: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc90090: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc900b0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5



ELF file SHA256: e1bdea486

Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806bc
0x403806bc: esp_restart_noos at C:/Users/H/esp/v5.2.1/esp-idf/components/esp_system/port/soc/esp32c3/system_internal.c:111

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1738
load:0x403cc710,len:0xb9c
load:0x403ce710,len:0x2e40
entry 0x403cc71a

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: VS Code re-enables 'freertos_unicore'

Postby ESP_Sprite » Wed Mar 13, 2024 2:26 am

How exactly are you disabling this setting?

Who is online

Users browsing this forum: No registered users and 16 guests