{{ message }}
Reboot into UART download mode without external wiring or interaction#7854
Merged
Merged
Conversation
Collaborator
Contributor
Author
ccd5dbe to
af404b3
Compare
earlephilhower
requested changes
Feb 5, 2021
earlephilhower
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the explanation in the PR.
Overall seems like a fine idea and useful in some circumstances, but a little polish would help make it maintainable later on.
af404b3 to
256d87b
Compare
earlephilhower
approved these changes
Feb 9, 2021
earlephilhower
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the add'l comments and cleanup. LGTM!
earlephilhower
approved these changes
Feb 9, 2021
earlephilhower
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the cleanup and add'l comments. LGTM!
256d87b to
b113626
Compare
d-a-v
reviewed
Feb 16, 2021
d-a-v
approved these changes
Feb 16, 2021
d-a-v
left a comment
Collaborator
There was a problem hiding this comment.
LGTM.
Regular builds are unmodified according to a quick test when this new API is not used.
without any external wiring.
This patch introduces the new method
Esp.rebootIntoUartDownloadMode()
When the user calls this method the ESP8266 reboots into the UART
download mode. In this mode the user can use esptool.py to flash a new
firmware file. The following command was used to test it:
$ esptool.py --before no_reset --after soft_reset --chip esp8266 \
--port /dev/ttyUSB0 --baud 460800 write_flash 0x0 firmware.bin
The implementation is based on the original implementation in the
boot ROM. Some parts of the original implementation can be found in
[1]. This patch is a squashed and simplified version of [2]. The non
squashed version might be helpful in case of debugging issues.
[1] https://github.com/twischer/xtensa-subjects/blob/master/reversed/bootrom.c
[2] https://github.com/twischer/Arduino/tree/reboot_uart_download_full
Signed-off-by: Timo Wischer <twischer@freenet.de>
3ef1772 to
c7efc35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This patch introduces the new method
Esp.reboot_uart_dwnld().With this method the UART download mode can be selected by software only.
When the user calls this method the ESP8266 reboots into the UART
download mode. In this mode the user can use esptool.py to flash a new
firmware file.
This patch was tested with the following command:
The implementation is based on the original implementation in the
boot ROM. Some parts of the original implementation can be found in
https://github.com/twischer/xtensa-subjects/tree/reversed/reversed