Getting started with ESP32-DevKitM-1 - how to configure IDE for single core?

JanKok
Posts: 1
Joined: Wed Sep 01, 2021 3:12 pm

Getting started with ESP32-DevKitM-1 - how to configure IDE for single core?

Postby JanKok » Wed Sep 01, 2021 10:10 pm

I'm trying to use an ESP32-DevKitM-1 board with Arduino IDE 2.0.0-beta.9 (which works pretty well with ARM and AVR-based boards and has some great new program development features) on Windows 10. I used the Board Manager to install the esp32 by Espressif Systems Version 2.0.0 package and selected ESP32 Dev Module as my board. I'm able to compile a simple Hello world program and the upload appears to succeed (I get "upload complete" message in the Output window) even when I don't press the BOOT or RST buttons.

My problem is, if I switch to the Serial Monitor window, I see these rebooting messages over and over:

Code: Select all

ELF file SHA256: 0000000000000000

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1240
load:0x40078000,len:13012
load:0x40080400,len:3648
entry 0x400805f8
E (104) cpu_start: Running on single core variant of a chip, but app is built with multi-core support.
E (105) cpu_start: Check that CONFIG_FREERTOS_UNICORE is enabled in menuconfig

abort () was called at PC 0x40082601 on core 0
Backtrace:0x400d8d15:0x3ffe3b800x40087a01:0x3ffe3ba0 0x4008c7ed:0x3ffe3bc0 0x40082601:0x3ffe3c40 0x40078f0e:0x3ffe3c90 |<-CORRUPTED
I saw in the Tools menu that there are two items, Events Run On and Arduino Runs On, that allow selecting either Core 0 or Core 1. Both items are initially set to Core 1, and the output shown above is with both set to Core 1. If I change Arduino Runs On to Core 0, everything is the same except that E (105) changes to E (104). Changing Events Run On to Core 0 seems to make no difference.

I also tried the ESP32 Blinker example. The results were similar, except the last few lines of output were:

Code: Select all

E (96) cpu_start: Running on single core variant of a chip, but app is built with multi-core support.
E (97) cpu_start: Check that CONFIG_FREERTOS_UNICORE is enabled in menuconfig

abort () was called at PC 0x40082525 on core 0

Backtrace:0x400d4c55:0x3ffe3b800x40086d6d:0x3ffe3ba0 0x4008ba65:0x3ffe3bc0 0x40082525:0x3ffe3c40 0x40078f0e:0x3ffe3c90 |<-CORRUPTED
What do I need to do to make the IDE and board work normally?

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: Getting started with ESP32-DevKitM-1 - how to configure IDE for single core?

Postby chegewara » Sun Sep 26, 2021 6:55 pm

You have option in "tools" menu to run arduino on core0/1. The same option is for events, so remember to change it too.

hobbsac
Posts: 3
Joined: Fri Oct 08, 2021 3:34 am

Re: Getting started with ESP32-DevKitM-1 - how to configure IDE for single core?

Postby hobbsac » Fri Oct 08, 2021 3:35 am

Were you able to solve this? I am having the exact same issue.

Kirdro
Posts: 1
Joined: Mon Nov 08, 2021 9:47 pm

Re: Getting started with ESP32-DevKitM-1 - how to configure IDE for single core?

Postby Kirdro » Mon Nov 08, 2021 9:52 pm

I submitted an issue on the arduino-esp32 about this a while ago. It looks like it's been added to the "To-Do" list.
https://github.com/espressif/arduino-esp32/issues/5183

florinbaciu
Posts: 3
Joined: Wed Feb 08, 2023 2:19 pm

Re: Getting started with ESP32-DevKitM-1 - how to configure IDE for single core?

Postby florinbaciu » Wed Feb 08, 2023 2:25 pm

(Running on single core variant of a chip, but app is built with multi-core support) it says in verbose.
Maybe this is why the application keeps restarting..
Try to put this code above everything before #include the following:

#if CONFIG_FREERTOS_UNICORE
#define ARDUINO_RUNNING_CORE 0
#else
#define ARDUINO_RUNNING_CORE 1
#endif

and in setup function :
xTaskCreatePinnedToCore(
Task1, "Task1", 5000 // Stack size, NULL, 1, NULL, ARDUINO_RUNNING_CORE); ------>>>>>> ARDUINO_RUNNING_CORE

Who is online

Users browsing this forum: No registered users and 47 guests