Page 1 of 1

Changing serial port speed causes full recompile?

Posted: Wed Sep 28, 2016 1:27 pm
by a2retro
When changing the baud for code download using make menuconfig is it expected that a full recompile will happen due to that change?

Edit : if you read all the other noise i originally had in this post then it was due to the module left in some weird state after having used it with openocd. After a full power off reset I am no those issues with MD5 mismatches but using compressed mode still does not work.

LD hello-world.elf
esptool.py v2.0-dev
Flashing project app to 0x10000...
esptool.py v2.0-dev
Connecting...
Uploading stub...
Calling 4009068c
Stub running...
Attaching SPI flash...
Configuring flash size...
Erasing flash...
Unc size 4112 comp size 2558 comp blocks 3

A fatal error occurred: Failed to enter compressed flash mode (result was 0xff, 0x0)
make: *** [/home/Glenn/src/esp-idf/components/esptool_py/Makefile.projbuild:28: flash] Error 2

Edit: 921600 upload works fine on silabs USB, 2MBaud does not connect. Compressed fails as above.

Re: Changing serial port speed causes full recompile?

Posted: Wed Sep 28, 2016 3:31 pm
by kolban
As a data point, I switched to using compression last night and it worked just fine for me. Some thoughts ...
  • The ESP-IDF is a moving platform. It is being worked upon continuously which means that one should really be downloading/refreshing the whole ESP-IDF project on a regular basis. If something isn't working properly, I reset my ESP-IDF before thinking further. I am not sure about the template projects ... those may also need to be checked. So if you find something isn't working for your environment but you are hearing reports of it working for others ... verify that y'all are on the same ESP-IDF. I am using the ESP-IDF from last night. Remember that there is also the possibility for regression ... meaning that what worked in earlier releases might not work in a later release.
  • My experience is that any change to the sdkconfig file (that appears to be the file modified by the swanky menu system) seems to cause a rebuild of the whole environment. While not optimal, at this time I'm okay with that. Trying to figure out what has to be recompiled because a configuration change was made in a configuration file verses recompile it all ... I'd rather we think about the core code than polish the periphery (at this time).

Re: Changing serial port speed causes full recompile?

Posted: Wed Sep 28, 2016 3:50 pm
by a2retro
kolban wrote:As a data point, I switched to using compression last night and it worked just fine for me. Some thoughts ...
  • I'd rather we think about the core code than polish the periphery (at this time).
I agree and was just asking to make sure it was the expected behavior. :D

Re: Changing serial port speed causes full recompile?

Posted: Wed Sep 28, 2016 3:59 pm
by ESP_Sprite
No clue on the compressed upload except 'it works here', sorry. Maybe try a lower baud rate?

Wrt a full recompile when you change anything in the menuconfig: Yep, that happens. Theoretically, it's possible to recompile only the bits that depend on whatever is changed (eg the Linux kernel does this), but that is a fairly hairy thing to get right, especially with the quite flexible build system we have and the three OSses we support. We may partially or completely solve this in the future, but for now, that's the way it is.

Re: Changing serial port speed causes full recompile?

Posted: Thu Dec 22, 2016 1:12 pm
by ESP_krzychb
I believe I saw the syntax of make flash that allows to override the serial port name setting done with make menuconfig. Unfortunately now I can not find it. It was something like:

Code: Select all

make flash -SERIAL_PORT COM4
Maybe the same override can be done for the upload speed. Does anybody recall such post? It was either here or esp-idf on GitHub. I believe it was posted by @ESP_Angus. I found it useful to load the same code to different board without need to recompile everything.

Re: Changing serial port speed causes full recompile?

Posted: Thu Dec 22, 2016 1:39 pm
by WiFive
Maybe...

Code: Select all

make flash ESPPORT=COM3 ESPBAUD=115200 

Re: Changing serial port speed causes full recompile?

Posted: Thu Dec 22, 2016 5:09 pm
by ESP_krzychb
@WiFive, that's it - thanks a lot :D

Re: Changing serial port speed causes full recompile?

Posted: Fri Mar 02, 2018 7:30 pm
by flodis
I hope some compiler expert will come forward and tell us this was fixed way back in 1972.