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

lasal1989
Posts: 1
Joined: Tue Nov 12, 2019 6:23 pm

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

Postby lasal1989 » Mon Nov 18, 2019 9:32 am

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 !!!

Ritesh
Posts: 1123
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

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

Postby Ritesh » Mon Nov 18, 2019 6:48 pm

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.
Regards,
Ritesh Prajapati

slioulle
Posts: 1
Joined: Sun Dec 22, 2019 8:54 pm

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

Postby slioulle » 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

Ritesh
Posts: 1123
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

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

Postby Ritesh » Tue Dec 24, 2019 8:44 am

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.
Regards,
Ritesh Prajapati

Seraph999
Posts: 1
Joined: Thu Feb 06, 2020 5:16 am

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

Postby Seraph999 » Thu Feb 06, 2020 5:25 am

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

Who is online

Users browsing this forum: Bing [Bot], ESP_Sprite, realll and 24 guests