In VSCode how do you set the -b parameter when esptool.py is called to set the baud rate?
It defaults to 115200 which is rather slow and I can't see where to change it.
How do you set the flashing baud rate in Visual Studio Code?
Re: How do you set the flashing baud rate in Visual Studio Code?
Don't worry, this is an easy fix... on VSC go to the bottom left corner settings gear icon (the bigger icon, not the one on the bottom bar), it will open a tab for settings. On the top search bar, "Search Settings" you can search baud then you'll be graced with Idf: Baud Rate where you can change this setting here.
Re: How do you set the flashing baud rate in Visual Studio Code?
Thanks but unfortunately that doesn't work.
In the configuration the only options for "baud" are "idf.py monitor baud rate" and "UART console baud rate".
If I change the idf.py monitor baud rate it flashes at 115200 but then switches to the higher rate for the monitor. The UART console baud rate has no effect.
In the configuration the only options for "baud" are "idf.py monitor baud rate" and "UART console baud rate".
If I change the idf.py monitor baud rate it flashes at 115200 but then switches to the higher rate for the monitor. The UART console baud rate has no effect.
- jgustavoam
- Posts: 165
- Joined: Thu Feb 01, 2018 2:43 pm
- Location: Belo Horizonte , Brazil
- Contact:
Re: How do you set the flashing baud rate in Visual Studio Code?
Hi,
With this command
idf.py
See this parameter :
-b, --baud INTEGER Baud rate for flashing. This option can be used at most once either globally, or for one subcommand.
With this command
idf.py
See this parameter :
-b, --baud INTEGER Baud rate for flashing. This option can be used at most once either globally, or for one subcommand.
Code: Select all
C:\Users\jgust\esp-idf>idf.py --help
Checking Python dependencies...
Python requirements from C:\Users\jgust\esp-idf\requirements.txt are satisfied.
Usage: C:\Users\jgust\esp-idf\tools\idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
ESP-IDF build management
Options:
-C, --project-dir PATH Project directory.
-B, --build-dir PATH Build directory.
-n, --no-warnings Disable Cmake warnings.
-v, --verbose Verbose build output.
--ccache / --no-ccache Use ccache in build. Disabled by default, unless IDF_CCACHE_ENABLE environment
variable is set to a non-zero value.
-G, --generator [Ninja|MinGW Makefiles]
CMake generator.
-D, --define-cache-entry TEXT Create a cmake cache entry. This option can be used at most once either globally, or
for one subcommand.
-b, --baud INTEGER Baud rate for flashing. This option can be used at most once either globally, or for
one subcommand.
-p, --port TEXT Serial port. This option can be used at most once either globally, or for one
subcommand.
--help Show this message and exit.
Commands:
all Aliases: build. Build the project.
app Build only the app.
app-flash Flash the app only.
bootloader Build only bootloader.
bootloader-flash Flash bootloader only.
clean Delete build output files from the build directory.
confserver Run JSON configuration server.
efuse_common_table Genereate C-source for IDF's eFuse fields.
efuse_custom_table Genereate C-source for user's eFuse fields.
encrypted-app-flash Flash the encrypted app only.
encrypted-flash Flash the encrypted project.
erase_flash Erase entire flash chip.
erase_otadata Erase otadata partition.
flash Flash the project.
fullclean Delete the entire build directory contents.
menuconfig Run "menuconfig" project configuration tool.
monitor Display serial output.
partition_table Build only partition table.
partition_table-flash Flash partition table only.
read_otadata Read otadata partition.
reconfigure Re-run CMake.
show_efuse_table Print eFuse table.
size Print basic size information about the app.
size-components Print per-component size information.
size-files Print per-source-file size information.
C:\Users\jgust\esp-idf>
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Re: How do you set the flashing baud rate in Visual Studio Code?
I noticed this in the tasks.json file:
So it's using the same for both flashing and monitoring. First thing would be to separate those two so that you don't have to run the monitor at the same speed as the flasher.
What's strange is that the config option affects the monitor baud rate but not the flasher baud rate... Unless it does affect the flasher and it's just that you can't flash faster than you can at 115200 baud due to the bootloader being slow or something. Maybe I can get a scope on there to see what the actual rate is.
Code: Select all
"command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} -b ${config:idf.baudRate} flash",
"command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} -b ${config:idf.baudRate} monitor",
Code: Select all
config:idf.baudRate
What's strange is that the config option affects the monitor baud rate but not the flasher baud rate... Unless it does affect the flasher and it's just that you can't flash faster than you can at 115200 baud due to the bootloader being slow or something. Maybe I can get a scope on there to see what the actual rate is.
Who is online
Users browsing this forum: No registered users and 10 guests