Hi,
I’m trying to upload a simple code to test my ESP-01S. I use the blink example in platformio and the board esp01_1m in platformio.ini. I upload it and looks right but, it doesn’t run. However, the same code uploaded to an ESP-01 chip and it runs correctly. In the same way if I upload the code through the Arduino IDE and with the configuration that I detail to my ESP-01S it works correctly.
Would this board need any special configuration in IDE platform (VSC)?
Blink code in Platformio
#include <Arduino.h>
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
Content of platformio.ini
[env:esp01_1m]
platform = espressif8266
board = esp01_1m
framework = arduino
build_flags = -D LED_BUILTIN=2
Output upload task
Processing esp01_1m (platform: espressif8266; board: esp01_1m; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp01_1m.html
PLATFORM: Espressif 8266 > Espressif Generic ESP8266 ESP-01 1M
HARDWARE: ESP8266 80MHz 80KB RAM (1MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 28 compatible libraries
Scanning dependencies...
No dependencies
Retrieving maximum program size .pioenvs\esp01_1m\firmware.elf
Checking size .pioenvs\esp01_1m\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [=== ] 32.4% (used 26572 bytes from 81920 bytes)
PROGRAM: [=== ] 33.8% (used 257696 bytes from 761840 bytes)
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM7
Uploading .pioenvs\esp01_1m\firmware.bin
esptool.py v2.6
Serial port COM7
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: ec:fa:bc:ad:e7:e1
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 261856 bytes to 191270...
Wrote 261856 bytes (191270 compressed) at 0x00000000 in 16.9 seconds (effective 124.1 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Arduino IDE Code
#define LED 2
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);
}
Arduino output
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM7
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: ec:fa:bc:ad:e7:e1
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0320
Compressed 261856 bytes to 191265...
Writing at 0x00000000... (8 %)
Writing at 0x00004000... (16 %)
Writing at 0x00008000... (25 %)
Writing at 0x0000c000... (33 %)
Writing at 0x00010000... (41 %)
Writing at 0x00014000... (50 %)
Writing at 0x00018000... (58 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (75 %)
Writing at 0x00024000... (83 %)
Writing at 0x00028000... (91 %)
Writing at 0x0002c000... (100 %)
Wrote 261856 bytes (191265 compressed) at 0x00000000 in 16.9 seconds (effective 124.1 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Arduino settings