Page 1 of 1

Can't change the baud rate for flashing the ESP32 in eclipse

Posted: Mon Nov 18, 2019 9:32 am
by lasal1989
I have setup Eclipse for ESP-IDF according to the getting started guide.
everything working fine.
Only problem is I cant flash the device.
Please check the following output from eclipse.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
[1/3] Performing build step for 'bootloader'
ninja: no work to do.
esptool.py -p COM5 -b 460800 --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000
partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 blink.bin
esptool.py v2.9-dev
Serial port COM5
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header
Adding "flash"'s dependency "all" to list of commands with default set of options.
Executing action: all (aliases: build)
Running ninja in directory e:\esp_ws\blink\build
Executing "ninja all"...
Executing action: flash
Running esptool.py in directory e:\esp_ws\blink\build
Executing "C:\espressif\.espressif\python_env\idf4.1_py3.7_env\Scripts\python.exe C:\esp-idf\components/esptool_py/esptool/esptool.py -p COM5 -b 460800 --after hard_reset write_flash @flash_project_args"...
esptool.py failed with exit code 2
------------------------------------------------------------------------------------------------------------------------------------------------------------------
according to above out put the flashing baud rate is 460800.
I need to change it to 115200.
But I can't find where to change
Please help !!!

Re: Can't change the baud rate for flashing the ESP32 in eclipse

Posted: Mon Nov 18, 2019 6:48 pm
by Ritesh
Hello,

Go to menuconfig of ESP32 flash operation in which you can find baudrate, flash size along with other parameter selections from which you can change it as per requirements.

Still let me know if you find any difficulties for that.

Re: Can't change the baud rate for flashing the ESP32 in eclipse

Posted: Sun Dec 22, 2019 9:16 pm
by slioulle
hello
in my case, no serial flash baud rate setting in sdkconfig : only "serial monitor" baud rate...

It should exist a cleaner manner but not an expert of menuconfig syntax
=> I changed the default serial flash baud rate in "<esp-idf directory>\tools\idf_py_actions\serial_ext.py" :

baud_rate = {
"names": ["-b", "--baud"],
"help": "Baud rate.",
"scope": "global",
"envvar": "ESPBAUD",
"default": 460800, <------- replaced this value by 115200 solved my flashing issues from eclipse
}

Hope this can be helpful to someone

Re: Can't change the baud rate for flashing the ESP32 in eclipse

Posted: Tue Dec 24, 2019 8:44 am
by Ritesh
slioulle wrote:
Sun Dec 22, 2019 9:16 pm
hello
in my case, no serial flash baud rate setting in sdkconfig : only "serial monitor" baud rate...

It should exist a cleaner manner but not an expert of menuconfig syntax
=> I changed the default serial flash baud rate in "<esp-idf directory>\tools\idf_py_actions\serial_ext.py" :

baud_rate = {
"names": ["-b", "--baud"],
"help": "Baud rate.",
"scope": "global",
"envvar": "ESPBAUD",
"default": 460800, <------- replaced this value by 115200 solved my flashing issues from eclipse
}

Hope this can be helpful to someone
Great.

Thanks for providing updates for same.

Re: Can't change the baud rate for flashing the ESP32 in eclipse

Posted: Thu Feb 06, 2020 5:25 am
by Seraph999
Thank you slioulle , I was reverse-engineering the hard coded value and knew it was somewhere. You saved me and my computer search time. Not sure why it was considered such a genius idea to hard code a non standard baud ??

https://developer.gemalto.com/tutorial/ ... to-modules