Closed
Description
Board
nodemcu-32s
Device Description
no
Hardware Configuration
Uploading any code results in an error
Version
latest master (checkout manually)
IDE Name
Arduino IED
Operating System
Window 11
Flash frequency
PSRAM enabled
yes
Upload speed
default
Description
Uploading the code will directly prompt the following error
I can't find a place on the menu bar where I can change the upload speed. Can you tell me how to change the speed?
It's similar to this problem:#8320
Invalid FQBN: getting build properties for board esp32:esp32:nodemcu-32s: invalid value '460800' for option 'UploadSpeed'
Compilation error: Invalid FQBN: getting build properties for board esp32:esp32:nodemcu-32s: invalid value '460800' for option 'UploadSpeed'
Sketch
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Debug Message
Invalid FQBN: getting build properties for board esp32:esp32:nodemcu-32s: invalid value '460800' for option 'UploadSpeed'
Compilation error: Invalid FQBN: getting build properties for board esp32:esp32:nodemcu-32s: invalid value '460800' for option 'UploadSpeed'
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Activity
me-no-dev commentedon Jun 6, 2024
460800 is marked as compatible only with Linux and Mac. Have you tried the other baudrates?
wangzongming commentedon Jun 6, 2024
Yes, I don't see 460800 baud rate on the serial port.
I don't see an option to set the speed in the arduino IDE(v2.3.2).

I tried to modify the contents of this file
\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\boards.txt
But nothing worked.
wangzongming commentedon Jun 6, 2024
I can upload the code after I fall back to version 2.0.17.
But I want to use ESP_SR, it seems that need 3.0 to have this library.
wangzongming commentedon Jun 6, 2024
Version 3.0.0 also does not report errors.
me-no-dev commentedon Jun 6, 2024
You should be able to see menu options there. Not sure why you do not. What happens if you select "ESP32 Dev Module"?
me-no-dev commentedon Jun 6, 2024
This is on Mac
wangzongming commentedon Jun 6, 2024
There's no problem choosing this one. Thank you very much.🌹
Then I'll forget about the
nodemcu-32s
🤣me-no-dev commentedon Jun 6, 2024
@SuGlider can you check what you see about this board in IDE2.3.2 on Windows?
per1234 commentedon Jun 6, 2024
The issue should be reopened since it is not resolved.
Background
The platform's board definitions are configured to cause specific custom board option items to be displayed in the Tools > Upload Speed menu only when Arduino IDE/Arduino CLI is running on a certain operating system. They are doing this by controlling whether the option name property is defined using the OS-specific override feature:
https://arduino.github.io/arduino-cli/dev/platform-specification/#automatic-property-override-for-specific-os
Since the code in the
nodemcu-32s
board definition is a bit messy, it might be difficult to understand from studying it, so I'll provide a simplified example of the use of this technique. Let's say I have a definition for a board with IDfoo
, which has a custom option menubar
, with option itemspippo
,pluto
, andpaperino
. Normally it would look something like this:However, if I changed the board definition to this:
Linux users would see the following options in the Tools > Bar menu:
macOS users would see these
and Windows users would see this
Explanation
Prior to the regression in #9277, Linux and macOS users would see the following items in the Tools > Upload Speed menu when the "NodeMCU-32S" board was selected:
while Windows users would see the following items:
(note the presence of "256000" and "512000" items and absence of "460800")
That worked fine until #9277 made the Linux/macOS-exclusive
460800
option the default by moving it to the top of the list inboards.txt
. Arduino CLI automatically selects that default option regardless of operating system, which causes the board configuration to be invalid for Windows users since the use of OS-specific overrides in the460800
option name definition property causes that property to not be defined on Windows machines.Solution
A simple solution would be something like this:
However, I guess there is a reason why the board definitions are configured to prevent Windows users from selecting a 460800 upload speed, which the naive solution shown above would allow.
If so, the best solution will be to set the default to the closest cross-platform speed, which is 230400:
per1234 commentedon Jun 6, 2024
Note that the
nodemcu-32s.menu.UploadSpeed.230400.windows.upload.speed
property has absolutely no effect (it defines a property namedwindows.upload.speed
, which is not used anywhere). If the intention was to cause theupload.speed
property value to be set to256000
for Windows users, then it should have been written like this (the OS-specific override suffix must be placed at the end of the property name):and that property definition must be placed after the universal definition of the property so that it will work as an override:
per1234 commentedon Jun 8, 2024
@wangzongming @me-no-dev please reopen this valid, unresolved issue.
If I was confident in the validity of the solution I described in my previous comment, I would simply submit a pull request. However, I don't understand the reason why certain baud rates are only offered for specific operating systems so I don't think it would be responsible for me to do that.
So it will be important for this issue to be open so that the task of fixing the bug can be effectively tracked.
wangzongming commentedon Jun 8, 2024
Okay, I'm sure you can handle it. Thanks.
16 remaining items