Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Esp32 flashing #2613

Merged
merged 2 commits into from
Feb 7, 2023
Merged

Fix Esp32 flashing #2613

merged 2 commits into from
Feb 7, 2023

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Feb 6, 2023

This PR fixes a couple of problems related to ESP32 bootloader flashing.

The make sdk-configclean build target which currently does not full clear the SDK configuration information as expected.

The bootloader debug log may show the SHA-256 comparison failed message.
The reason for this is that, by default, esptool will auto-detect flash settings and overwrite those values in the bootloader header. Those settings are the mode, speed and flash size settings.

This behaviour is now disabled (by setting CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=n),
and the user-configured parameter values passed to the SDK.

This also fixes the problem for later versions of esptool (4+) which ignores auto-detect unless bootloader checksumming is also disabled. This results in boot failure as the flash chip size is usually too small (default is 2MB).

@what-the-diff
Copy link

what-the-diff bot commented Feb 6, 2023

  • Added the following lines to component.mk:
    $(Q) printf "\n# ESPTOOL (bootloader) settings\n" >> $@
    $(Q) echo "CONFIG_ESPTOOLPY_FLASHMODE_$(SPI_MODE)=y" >> $@
    $(Q) echo "CONFIG_ESPTOOLPY_FLASHFREQ_$(SPI_SPEED)M=y" >> $@

@slaff slaff added this to the 4.8.0 milestone Feb 6, 2023
@slaff slaff merged commit 309d438 into SmingHub:develop Feb 7, 2023
@mikee47 mikee47 deleted the fix/esp32-flashing branch February 7, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants