Changing serial port speed causes full recompile?

a2retro
Posts: 56
Joined: Tue Dec 01, 2015 3:09 am

Changing serial port speed causes full recompile?

Postby a2retro » Wed Sep 28, 2016 1:27 pm

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.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Changing serial port speed causes full recompile?

Postby kolban » Wed Sep 28, 2016 3:31 pm

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).
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

a2retro
Posts: 56
Joined: Tue Dec 01, 2015 3:09 am

Re: Changing serial port speed causes full recompile?

Postby a2retro » Wed Sep 28, 2016 3:50 pm

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

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: Changing serial port speed causes full recompile?

Postby ESP_Sprite » Wed Sep 28, 2016 3:59 pm

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.

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Changing serial port speed causes full recompile?

Postby ESP_krzychb » Thu Dec 22, 2016 1:12 pm

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.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Changing serial port speed causes full recompile?

Postby WiFive » Thu Dec 22, 2016 1:39 pm

Maybe...

Code: Select all

make flash ESPPORT=COM3 ESPBAUD=115200 

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Changing serial port speed causes full recompile?

Postby ESP_krzychb » Thu Dec 22, 2016 5:09 pm

@WiFive, that's it - thanks a lot :D

flodis
Posts: 13
Joined: Mon Feb 26, 2018 5:09 am

Re: Changing serial port speed causes full recompile?

Postby flodis » Fri Mar 02, 2018 7:30 pm

I hope some compiler expert will come forward and tell us this was fixed way back in 1972.

Who is online

Users browsing this forum: No registered users and 160 guests