arduino-esp32 icon indicating copy to clipboard operation
arduino-esp32 copied to clipboard

ESP32-DevKitM-1 Support?

Open K1rdro opened this issue 3 years ago • 36 comments

Hardware:

Board: ESP32-DevKitM-1 (ESP32-U4WDH) Core Installation version: 2.0.0-alpha1 IDE name: Arduino IDE Flash Frequency: 40Mhz PSRAM enabled: no Upload Speed: 115200 Computer OS: Windows 10

Description:

Is ESP32-DevkitM-1 (ESP32-U4WDH) supported? It's single core, so it gets the same error that the solo's were getting:

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

Sketch: (leave the backquotes for code formatting)

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(21, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(21, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(21, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Debug Messages:

13:33:33.159 -> ELF file SHA256: 0000000000000000
13:33:33.159 -> 
13:33:33.159 -> Rebooting...
13:33:33.159 -> ets Jul 29 2019 12:21:46
13:33:33.159 -> 
13:33:33.159 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:33:33.159 -> configsip: 188777542, SPIWP:0xee
13:33:33.159 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:33:33.159 -> mode:DIO, clock div:2
13:33:33.159 -> load:0x3fff0030,len:1252
13:33:33.159 -> load:0x40078000,len:12692
13:33:33.159 -> load:0x40080400,len:3100
13:33:33.159 -> entry 0x400805ec
13:33:33.253 -> E (118) cpu_start: Running on single core variant of a chip, but app is built with multi-core support.
13:33:33.253 -> E (118) cpu_start: Check that CONFIG_FREERTOS_UNICORE is enabled in menuconfig
13:33:33.300 -> 
13:33:33.300 -> abort() was called at PC 0x400825e9 on core 0
13:33:33.300 -> 
13:33:33.300 -> 
13:33:33.300 -> Backtrace:0x400d4c55:0x3ffe3b800x40087045:0x3ffe3ba0 0x4008c269:0x3ffe3bc0 0x400825e9:0x3ffe3c40 0x40078f6b:0x3ffe3c90  |<-CORRUPTED

K1rdro avatar May 14 '21 18:05 K1rdro

https://github.com/lbernstone/arduino-esp32-solo

lbernstone avatar May 14 '21 18:05 lbernstone

Yep, tried that, but I get a message back that it's an ESP32, not a single core.

K1rdro avatar May 14 '21 18:05 K1rdro

What is the error? If it is from esptool, you may be able to just update the tool.

lbernstone avatar May 14 '21 19:05 lbernstone

Sorry, my mistake. I was getting the 'ESP32, not single core' message when I was trying it with the C3 and S2 board options. I'd followed the instructions on yours, but I didn't see an option for the Solo in the board menu, and choosing the dev module gave the same issue as above. I may be doing something wrong, or or just didn't select the intended board?

K1rdro avatar May 14 '21 23:05 K1rdro

Hardware:

Board: ESP32-DevKitM-1 (ESP32-U4WDH)

Core Installation version: 2.0.0-alpha1

IDE name: Arduino IDE

Flash Frequency: 40Mhz

PSRAM enabled: no

Upload Speed: 115200

Computer OS: Windows 10

Description:

Is ESP32-DevkitM-1 (ESP32-U4WDH) supported? It's single core, so it gets the same error that the solo's were getting:


13:33:33.253 -> E (118) cpu_start: Running on single core variant of a chip, but app is built with multi-core support.

13:33:33.253 -> E (118) cpu_start: Check that CONFIG_FREERTOS_UNICORE is enabled in menuconfig

Sketch: (leave the backquotes for code formatting)


/*

  Blink



  Turns an LED on for one second, then off for one second, repeatedly.



  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO

  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to

  the correct LED pin independent of which board is used.

  If you want to know what pin the on-board LED is connected to on your Arduino

  model, check the Technical Specs of your board at:

  https://www.arduino.cc/en/Main/Products



  modified 8 May 2014

  by Scott Fitzgerald

  modified 2 Sep 2016

  by Arturo Guadalupi

  modified 8 Sep 2016

  by Colby Newman



  This example code is in the public domain.



  http://www.arduino.cc/en/Tutorial/Blink

*/



// the setup function runs once when you press reset or power the board

void setup() {

  // initialize digital pin LED_BUILTIN as an output.

  pinMode(21, OUTPUT);

}



// the loop function runs over and over again forever

void loop() {

  digitalWrite(21, HIGH);   // turn the LED on (HIGH is the voltage level)

  delay(1000);                       // wait for a second

  digitalWrite(21, LOW);    // turn the LED off by making the voltage LOW

  delay(1000);                       // wait for a second

}

Debug Messages:


13:33:33.159 -> ELF file SHA256: 0000000000000000

13:33:33.159 -> 

13:33:33.159 -> Rebooting...

13:33:33.159 -> ets Jul 29 2019 12:21:46

13:33:33.159 -> 

13:33:33.159 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

13:33:33.159 -> configsip: 188777542, SPIWP:0xee

13:33:33.159 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00

13:33:33.159 -> mode:DIO, clock div:2

13:33:33.159 -> load:0x3fff0030,len:1252

13:33:33.159 -> load:0x40078000,len:12692

13:33:33.159 -> load:0x40080400,len:3100

13:33:33.159 -> entry 0x400805ec

13:33:33.253 -> E (118) cpu_start: Running on single core variant of a chip, but app is built with multi-core support.

13:33:33.253 -> E (118) cpu_start: Check that CONFIG_FREERTOS_UNICORE is enabled in menuconfig

13:33:33.300 -> 

13:33:33.300 -> abort() was called at PC 0x400825e9 on core 0

13:33:33.300 -> 

13:33:33.300 -> 

13:33:33.300 -> Backtrace:0x400d4c55:0x3ffe3b800x40087045:0x3ffe3ba0 0x4008c269:0x3ffe3bc0 0x400825e9:0x3ffe3c40 0x40078f6b:0x3ffe3c90  |<-CORRUPTED

zhostik88 avatar May 28 '21 00:05 zhostik88

@K1rdro I had the same issue on Linux, then I merged arduino-esp32-solo with esp32/hardware/esp32/1.0.6/tools and now I have a watchdog rebooting my ESP32-DevKitM-1 because nothing's resetting the watchdog:

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:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4
E (10147) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (10147) task_wdt:  - IDLE0 (CPU 0)
E (10147) task_wdt: Tasks currently running:
E (10147) task_wdt: CPU 0: loopTask
E (10147) task_wdt: Aborting.
abort() was called at PC 0x400e0e47 on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008443b:0x3ffbe490 0x40084699:0x3ffbe4b0 0x400e0e47:0x3ffbe4d0 0x400830fe:0x3ffbe4f0 0x400d1c9d:0x3ffb1fb0 0x40085651:0x3ffb1fd0

Edit: Note that that log is from the SimpleBLE example.

RunningDroid avatar Jul 22 '21 20:07 RunningDroid

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 22 '21 00:09 stale[bot]

Tested again a few days ago with the current release. Still running into the same issues.

K1rdro avatar Sep 22 '21 17:09 K1rdro

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

stale[bot] avatar Sep 22 '21 17:09 stale[bot]

We might add support for single-core ESP32, but it is not on the roadmap yet.

me-no-dev avatar Sep 22 '21 21:09 me-no-dev

any new information on support for ESP32-SOLO-1?

bfaliszek avatar Nov 06 '21 16:11 bfaliszek

Following this issue

markingle avatar Apr 24 '22 11:04 markingle

Sneaky

sixtyfive avatar Apr 25 '22 09:04 sixtyfive

I'm also interested in single core support, for single-core ESP32-MINI-1 chips

ma-lalonde avatar May 17 '22 19:05 ma-lalonde

There are automated platform releases by the tasmota team for platformio. https://github.com/Jason2866/esp32-arduino-lib-builder/releases/. Look through the assets for the latest solo build and use that as the platform= in your env.

lbernstone avatar May 17 '22 21:05 lbernstone

Wow! Thanks @lbernstone! That's a really nice patch. I downloaded the Assets from the repository's release 841 (latest available), replaced my arduino-esp32 git folder (I use Arduino IDE on Ubuntu 20.04 and followed the manual installation guide), and that was it.

ma-lalonde avatar May 17 '22 22:05 ma-lalonde

It's not mine, any more. Thanks to @Jason2866

lbernstone avatar May 18 '22 01:05 lbernstone

Another option that works is to follow the build guide, which is very short and straightforward. For the ESP32-MINI-1 it was just a matter of adding CONFIG_FREERTOS_UNICORE=y to configs/defconfig.esp32. I haven't performed all unit tests

ma-lalonde avatar May 19 '22 21:05 ma-lalonde

@ma-lalonde correct, thats the only needed different entry in sdkconfig

Jason2866 avatar May 20 '22 05:05 Jason2866

Hello all users,

we discussed ESP32-DevKitm-1 Support internally and I'm sharing current state.


Be aware that this resolution can change in the future, mainly depending on Community requests.


From our perspective, it doesn't make a lot of sense to add official support for single core ESP32 SoCs now as it's the same board just like regular ESP32 and only difference is that the second core is "disabled". Single Core ESP32s are rarely used comparing to regular ESP32s (our view).

For now there are 2 options how to use Single Core ESP32:

1) Adding it into building process of Arduino-Lib-Builder

  • it was mentioned above by @ma-lalonde in this comment

2) Use Arduino as an ESP-IDF component


Let's us know if you use Single Core ESP32s more widely and you will really appreciate adding the official support. We are open to reconsider our resolution. 👍

VojtechBartoska avatar Jun 15 '22 14:06 VojtechBartoska

We (Tasmota project team) provide a inofficial Solo1 version (builded with Arduino Lib Builder. Based on core 2.0.3 Link to the framework and for Platformio a platform package Only needed Platformio entry:

platform = https://github.com/tasmota/platform-espressif32/releases/download/v.2.0.3/platform-espressif32-solo1-v.2.0.3.zip

Jason2866 avatar Jun 15 '22 14:06 Jason2866

I do the same as Jason at Connaxio, and the platformIO entry is just as simple. Our fork of arduino-esp32 supports single core on a separate branch. Could that be an option? A single core branch that is updated on each release? EDIT: or a single core release link, just like there is a "stable" and a "dev" link for Arduino IDE.

It seems silly to have multiple external third parties maintain what is basically the same repository and documentation. And, since I'm not sure that the differences are between the MINI and the SOLO, and I don't want to depend on a third party, here we are, both maintaining the same thing. Though I suspect there are many more build options that could be subject to debate. For example, task preemptivity.

My stance on the matter is that Arduino exists primarily for accessibility, not performance. If it were up to me, I'd make the Arduino default build support as many ICs as possible, while users seeking more performance, who may be more knowledgeable, should go through doing the custom builds. I don't think that's a popular opinion, however. ¯_(ツ)_/¯

Anyway, it's good to have an official response with the "good" options to solve that issue, so thanks Vojtech! I'll be able to provide some good answers and guides on my website.

ma-lalonde avatar Jun 15 '22 15:06 ma-lalonde

Please, official support will be greatly appreciated.

untergeek avatar Jun 15 '22 16:06 untergeek

The configuration capacity to have multiple board types only came about in v2.0. That was just over a year ago. The need was critical for the new devices, and so they were implemented first. Now I guess there is enough time to circle back and set things up for solo/pico. When I first started building those libraries, it was just a couple files, now it is pretty much the entire set of archive libraries. Patience, please.

lbernstone avatar Jun 15 '22 16:06 lbernstone

ESP32-Solo chips are not that easy to support in this Arduino repo (for now), precisely because the difference is one sdkconfig item. We are trying to figure out the best way to have the IDF libs portion separate elsewhere. Then we can easily add support for Solo or other weird variants/chips.

I do not agree that we need to support every chip that Espressif makes. Some chips do not make sense for Arduino, others are not widely used (like the Solo) to warrant hundreds more megabytes of libs in the repo. Still we are doing our best to make it easy for you to create your own build for the chip you want (using the lib-builder and abstracting as much as possible).

me-no-dev avatar Jun 16 '22 07:06 me-no-dev

Just to be sure we understand the terms used in this discussion: What is covered by the term "Solo"?

As far as I know, there are no chips using term "Solo" in their name: https://www.espressif.com/en/products/socs And on the modules, the term "Solo" seems to be used for a certain form factor, not really identifying the SoC/chip: https://www.espressif.com/en/products/modules

As per above link, Espressif distinguishes between the following series for their SoCs:

  • ESP32: All dual-core, except one single-core used in ESP32-SOLO-1 module (but SoC and module are NRND, so will likely disappear)
  • ESP32-S, with two "sub-series":
    • S2 (single-core, no BLE)
    • S3 (dual-core, with BLE)
  • ESP32-C, with two "sub-series":
    • C2 (RISC-V single core, up to 120 MHz)
    • C3 (RISC-V single core, up to 160 MHz, added features vs C2)
  • (And ESP8266, which is outside the scope here)

The modules using the SoCs have the same taxonomy.

When the term "Solo" is used in this thread, are we then in fact talking about ESP32-S and ESP32-C? Or is the term used on all single-core SoCs (and the modules using them)?

Our company is using two types of S2 modules in our projects (S2-SOLO and S2-MINI), and their programming is "the same". S2 was chosen as it seems to be the lowest consuming of the ESP32 modules available, and form factor (SOLO vs MINI) was chosen based on physical implementation restrictions. FWIW, we are currently using the "Tasmota build" (thank you to their team!).

ArnieO avatar Jun 16 '22 08:06 ArnieO

@ArnieO Solo is the old name for the single core ESP32. It is a binned version of otherwise dual-core chip. To support that variant of the same chip is the issue, not supporting other single-core chips with different names/features.

me-no-dev avatar Jun 16 '22 08:06 me-no-dev

The ESP32-U4WDH is the re-release of an SoC originally called ESP32-SOLO (circa 2018?). The Solo is no longer available, but the U4WDH and modules based on it can still be purchased new from Mouser. These are ESP32 devices. -S* and -C* are fully supported already. Screenshot from 2022-06-16 10-31-57

lbernstone avatar Jun 16 '22 08:06 lbernstone

@me-no-dev and @lbernstone : Thank you for your rapid clarification!

I understand then that the discussion concerns one SoC type used in one Espressif module type (ESP32-SOLO-1), both no longer manufactured. So the subject is very narrowed down compared to my initial impression due to the term "Solo". No worries then from my side if this chip/module is not officially supported.

ArnieO avatar Jun 16 '22 08:06 ArnieO

The ESP32 single core version is still available and used in commercial products. For example new "Shelly" devices. Thats why we (Tasmota) provide the framework, because Shelly devices are often bought to run with Tasmota as alternative cloud free firmware. In Xiaomi devices (smart lamps) there is often a OEM variant of the solo1. With replaced firmware this devices do work perfect cloud free too. Anyways we always will provide our own Tasmota framework for the ESP32 MCUs since we need (small IDF and Arduino) modifications to cover our needs.

Jason2866 avatar Jun 16 '22 09:06 Jason2866