Closed as not planned
Description
Describe the problem
With arduino ide 2.0 rc9.1 it is not possible to upload sketches, but arduino ide 2.0 rc9.0 can upload sketches.
To reproduce
Development board: esp 8266 (using CH340)
Development board type: NodeMCU 1.0 (ESP-12E Module)
Port: COM 8
Code used:
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266WebServer.h>
const char webpage[] = R"=====(
<!DOCTYPE html>
<html lang="en">
<style type="text/css">
</style>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div><h2>
anjian: <span id="aj">0</span>
</h2>
</div>
<script>
setInterval(function()
{
getData();
}, 2000);
function getData() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("aj").innerHTML =
this.responseText;
}
};
xhttp.open("GET", "/", true);
xhttp.send();
}
</script>
</body>
</html>
)=====";
ESP8266WiFiMulti wifiMulti;
ESP8266WebServer esp8266_server(80);
void setup() {
Serial.begin(300);
wifiMulti.addAP("xxx", "xxxxxxxx");
wifiMulti.run();
Serial.println('\n');
Serial.print("Connected to ");
Serial.println(WiFi.SSID());
Serial.print("IP address:\t");
Serial.println(WiFi.localIP());
esp8266_server.begin();
esp8266_server.on("/", handleRoot);
esp8266_server.on("date", handleRoot);
esp8266_server.onNotFound(handleNotFound);
Serial.println("HTTP esp8266_server started");
}
char c[2] = "0";
void loop() {
esp8266_server.handleClient();
int x = 3;
int y = 3;
byte a = 0;
byte b = 0;
byte y1[4] = { 16, 5, 4, 2 }; //1234
byte y2[4] = { 14, 12, 13, 3 };//5678
pinMode(16, OUTPUT);
pinMode(5, OUTPUT);
pinMode(4, OUTPUT);
pinMode(2, OUTPUT);
digitalWrite(16, LOW);
digitalWrite(5, LOW);
digitalWrite(4, LOW);
digitalWrite(2, LOW);
pinMode(14, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);
pinMode(13, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
while (x >= 0) {
if (digitalRead(y2[x]) == 0) {
a = y2[x];
pinMode(16, INPUT_PULLUP);
pinMode(5, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
pinMode(y2[x], OUTPUT);
digitalWrite(y2[x], LOW);
while (y >= 0) {
if (digitalRead(y1[y]) == 0) {
b = y1[y];
break;
}
y--;
}
break;
}
x--;
}
switch (a) {
case 14:
switch (b) {
case 16:
c[0] = 'D';
break;
case 5:
c[0] = '#';
break;
case 4:
c[0] = '0';
break;
case 2:
c[0] = '*';
break;
}
break;
case 12:
switch (b) {
case 16:
c[0] = 'C';
break;
case 5:
c[0] = '9';
break;
case 4:
c[0] = '8';
break;
case 2:
c[0] = '7';
break;
}
break;
case 13:
switch (b) {
case 16:
c[0] = 'B';
break;
case 5:
c[0] = '6';
break;
case 4:
c[0] = '5';
break;
case 2:
c[0] = '4';
break;
}
break;
case 3:
switch (b) {
case 16:
c[0] = 'A';
break;
case 5:
c[0] = '3';
break;
case 4:
c[0] = '2';
break;
case 2:
c[0] = '1';
break;
}
}
delay(200);
}
void handleRoot() {
esp8266_server.send(200, "text/plain", c);
}
void handleNotFound(){
esp8266_server.send(404, "text/plain", "404: Not found");
}
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 272632 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27449 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
DATA : 1500 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 1064 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 26056 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 302645 bytes (28%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28620 bytes (34%) of dynamic memory, leaving 53300 bytes for local variables. Maximum is 81920 bytes.
Failed uploading: uploading error: exit status 1Traceback (most recent call last):
File "C:\Users\46143\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/upload.py", line 66, in <module>
esptool.main(cmdline)
File "C:/Users/46143/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "C:/Users/46143/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 271, in __init__
self._port = serial.serial_for_url(port)
File "C:/Users/46143/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/pyserial\serial\__init__.py", line 90, in serial_for_url
instance.open()
File "C:/Users/46143/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/pyserial\serial\serialwin32.py", line 64, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'COM8': PermissionError(13, '�ܾ����ʡ�', None, 5)
esptool.py v3.0
Serial port COM8
Expected behavior
Upload error: Failed uploading: uploading error: exit status 1
Arduino IDE version
Version: 2.0.0-rc9.1 Date: 2022-08-02T13:32:29.119Z CLI Version: 0.25.1 [436f0bb9] Copyright © 2022 Arduino SA
Operating system
Windows
Operating system version
Windows 11 22621.317(Professional workstations)
Additional context
The latest nightly build does not have this problem。Can you update the next version?
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details