PlatformIO Community

Advise on setup


#1

I recently purchased a ESP32-DevKitC-S1 from Espressif. It contains ESP32-SOLO-1 which is a stripped down ESP32 module.

It seems that I cant get it to work (i.e upload and start program ).

This is my configuration:
[global]
lib_deps =
https://github.com/mozilla-iot/webthing-arduino.git
ArduinoJson

  [env:esp-dev]
  platform = espressif32
  board = esp32dev
  framework = arduino
  lib_deps =
      ${global.lib_deps}
      ESP Async WebServer
  lib_ignore =
        ArduinoMDNS
        WiFi101
  lib_ldf_mode = deep+

  monitor_speed = 115200
  monitor_port = com4

Have I missed some step here ?


#2

Your platformio.ini setup should look like this:

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200

Simple and functional.
If you need to include any library, just install them from library manager and include the relevant header into your project.


#3

Not working any better …

This is my code:
void setup(void){
Serial.begin(115200);
Serial.println("");
Serial.print(“Setup ready”);
}

  void loop(void){
      delay(500);
      Serial.print(".");
   }

This is the output from serial monitor:

   > Executing task in folder Test-uno: C:\.platformio\penv\Scripts\platformio.exe device monitor <

--- Miniterm on COM4  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7944
entry 0x40080310

I had expected:

    .
    .
    .

#4

Here is a simple project that work’s just fine:


#5

Stil not work for me… although I’ve copied your setup.

From the monitor window, the only difference I can see is

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

Your window says boot:0x1e

I don’t have a clue about what that means.

Is there some driver to load for the serial port or some firmware to flash to the card ?


#6

No. No firmware or driver needed.
Windows will install the drivers automatically once you connect the board to PC USB.
The program compiled from the code is the actual firmware.

The only difference is that i used a DOIT ESP32 Devkit with ESP32-wroom module on it.
This one use a standard (dual core) esp32 on it.
I think your module use some single core ESP32 variant.


#7

Yes, you are correct. My module is ESP32-SOLO-1

I am kind of lost here, kindly suggest next step for me to take, to get going with this development board…


#8

Can you get the board working the ESP-IDF? What settings do you have to change in ESP-IDF to make the board work?


#9

Never worked with ESP-IDF, can you give me a pointer ?


#10

Well ESP-IDF is also integrated in PIO, so you should try to configure and upload this example first: https://github.com/platformio/platform-espressif32/tree/master/examples/espidf-blink

For the native ESP-IDF start at https://github.com/espressif/esp-idf/ and remember to follow https://www.esp32.com/viewtopic.php?f=2&t=7307 (FreeRTOS on first core only in sdkconfig.h).


#11

Tanks,

When reading, I came across this

When using ESP32-DevKitC board with ESP32-SOLO-1 module, enable single core mode 
([CONFIG_FREERTOS_UNICORE](https://docs.espressif.com/projects/esp-idf/en/latest/api- 
reference/kconfig.html#config-freertos-unicore)) in menuconfig before flashing example applications.

Is it part of platformio,? how do I set it ?


#12

As https://dl.espressif.com/doc/esp-idf/latest/api-reference/kconfig.html says the resulting configuration from the kconfig program will be stored in the sdkconfig.h. When you create a PIO project with IDF as the framework you also get a default sdkconfig.h. In there search for FREERTOS_UNICORE and #define it to 1, or add it if it is not there.


#13

Is there a way to set this variable in Arduino framework??


#14

Yes.

You can do this in 2 ways:

  1. this should enable unicore for all builds:
    Go to C:\Users[your user].platformio\packages\framework-arduinoespressif32\tools\sdk\sdkconfig
    At line 472 you have “CONFIG_FREERTOS_UNICORE=”
    Set “CONFIG_FREERTOS_UNICORE=y”
    Save the sdkconfig file then build your project.

  2. this should configure unicore for current project:
    in platformio.ini env settings, add:
    “build_flags = -DCONFIG_FREERTOS_UNICORE=1”


#15

Old thread, but still not solved ( I’ve done other things for a while ).
REFRESH,
I have a ESP32-DevKitC-S1 board from Espressif. It contains ESP32-SOLO-1 which is a stripped down ESP32 module (Just one core )
I cant get it to work.

My configuration.

[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
build_flags = -DCONFIG_FREERTOS_UNICORE=1
monitor_speed = 115200

My code:

#include <Arduino.h>
void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
}
void loop() {
      delay(500);
      Serial.print(".");
}

The terminals shows following during upload process:

Building .pioenvs\esp-wrover-kit\firmware.bin
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   4.3% (used 14012 bytes from 327680 bytes)
PROGRAM: [==        ]  16.6% (used 217640 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, esptool, ftdi, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm- ......
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM4
Uploading .pioenvs\esp-wrover-kit\firmware.bin
Serial port COM4
Connecting.......
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Single Core
MAC: 24:0a:c4:85:cd:f4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 15088 bytes to 9755...
Wrote 15088 bytes (9755 compressed) at 0x00001000 in 0.1 seconds (effective 1058.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.0 seconds (effective 3510.9 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 13107.5 kbit/s)...
Hash of data verified.
Compressed 217776 bytes to 102879...
Wrote 217776 bytes (102879 compressed) at 0x00010000 in 1.7 seconds (effective 1005.3 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

The monitor shows the following:

Executing task in folder Test: C:\.platformio\penv\Scripts\platformio.exe device monitor <

--- Miniterm on COM4  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7944
entry 0x40080310

Output window shows the following:

Error: no handler found
Error: no handler found
Error: no handler found
Error: no handler found
Error: no handler found
Error: no handler found
Error: no handler found

The only thing I think is strange is ( during upload process )

Leaving...
Hard resetting via RTS pin...

So, anyone who can help ??


#16

Could you get it to work within the Arduino IDE? With which settings?


#17

I have not tested, but this must be wrong…

but I cant find any support for


#18

Hi

I changed board type, to esp32doit-devkit-v1 and now I have the following error.
What is menuconfig ?

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:9280
load:0x40080400,len:5860
entry 0x40080698
E (111) cpu_start: Running on single core chip, but application is built with dual core support.
E (111) cpu_start: Please enable CONFIG_FREERTOS_UNICORE option in menuconfig.
abort() was called at PC 0x400826e6 on core 0

Backtrace: 0x40085424:0x3ffe3be0 0x40085651:0x3ffe3c00 0x400826e6:0x3ffe3c20 0x40078f93:0x3ffe3c40 0x40078ff9:0x3ffe3c70 0x40079004:0x3ffe3ca0 0x400791a3:0x3ffe3cc0 0x400806ca:0x3ffe3df0 0x40007c31:0x3ffe3eb0 0x4000073d:0x3ffe3f20

#19

menuconfig (or rather make menuconfig) is the command you type in a ESP-IDF project will give you a terminal-UI to select ESP-IDF compilation options. This will ultimately create the sdkconfig file which has all the chosen macro values inside. See https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/kconfig.html

From the output it seems like CONFIG_FREERTOS_UNICORE wasn ot set? build_flags = -DCONFIG_FREERTOS_UNICORE is still in your platformio.ini?


#20

Yes it is,
Current config.

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
build_flags = -DCONFIG_FREERTOS_UNICORE=YES

Do I need to install the ESP-IDF although I am only using Arduino framework ??