1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

19 Commits

Author SHA1 Message Date
Earle F. Philhower, III
bbc14c0979
Use 32b loads to set print strings (#7545)
Instead of using either a series of etc_putc or setting a series of bytes
one by one, use a simple macro to define 32b constants to build up strings.

Saves ~30 bytes of program code in eboot for #6538 to work with.
2020-10-16 10:52:35 -07:00
Earle F. Philhower, III
cf1b8e067a Don't overwrite boot sector unless OTA changes it
There is a window where the eboot sector is erased and
unwritten/partially written.  If there's a power cycle at this time, the
chip will brick due to eboot being corrupted.

Avoid this by checking if the new eboot 4K sector is identical to the
one already in flash, and if so don't rewrite it.
2020-08-23 19:33:58 -07:00
Develo
c94d36d80e
Comment out verify step in eboot.c (#7468)
* Comment out verify step in eboot.c

Meant for #7458 , but still requires a recompiled eboot.elf.

* Rebuild eboot.elf from changed source

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-07-20 23:24:51 -04:00
Mike Nix
51daecc236
Xmc flash 2 (#7317)
* Remove unnecessary XMC support from eboot

eboot is always run with the flash access speed set to 20MHz, so
there is no need for special treatment of XMC chips.

* After eboot copies the new firmware into place, verify the copy.

If the data written to flash is as expected, the line cmp:0 will be displayed
after the usual @cp:0 from eboot.

* Disable interrupts during the precached part of _SPICommand()

For some reason this was an issue during the reboot after an OTA update.
2020-05-26 20:04:49 -04:00
david gauchard
ea879b6ef6
XMC in eboot: hotfix: disabling (#7277) 2020-05-07 15:32:16 +02:00
Mike Nix
9b41d9ac5e
XMC flash support - WIP (#6725)
* Move the spi vendor list from Esp.h to its own header in eboot.

* Fix ifdef issue with spi_vendors.h

* Add initFlashQuirks() for any chip specific flash initialization.

Called from user_init().

* namespace experimental for initFlashQuirks()

* Slow down flash access during eboot firmware copy

Part 1 - still some work to do

* Slow down flash access during eboot firmware copy on XMC chips

Part 2 - Identify the chip type.

Note: there may still be issues with the access speed change.
This is very much experimental.

* Commit eboot.elf

Co-authored-by: Develo <deveyes@gmail.com>
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-04-23 12:15:21 -04:00
Earle F. Philhower, III
9985a32914
Add documentation for compressed OTA, fix bug (#6924)
* Add documentation for compressed OTA, fix bug

Fixes #6923

Documents the user steps needed to do a compressed upload, and notes the
2-step process needed for deploying compressed uploads to the field for
the first time.

Fixes a bug in serial output formatting discovered by @AdrianEddy.

Adds additional contributors for uzlib, per @pfalcon.

* Update README for esptool.py, too
2019-12-20 09:22:10 -08:00
Earle F. Philhower, III
1d0bc5efdf
Allow GZIP compressed flash updates (#6820)
* Allow GZIP compressed flash updates

Modified the bootloader to be able to take stored updates in compressed
GZIP format (i.e. the output of "gzip -9 xxx.bin") and decompress them
on-the-fly to their final destination.  This can work for apps and for
filesystems (when used with the 2-step update option).

Allow eboot to be built using -Os/2 optimizations by fixing some portions
which failed when any optimizations were used.  Add -Wall and use data
and function sections to reduce size.  Use -Os to minimize size.

Remove obsolete esptool-ck calls to build a .ROM image, we don't use it.

Move all uninitted variables to RAM from IRAM, allowing 8-bit access.

Hook in @d-a-v and @pfalcon's uzlib port to actually do the
decompression.  Do not use any CRC checking which saves space.  Since we
have overwritten all of flash by the time we know id the CRC matches,
there's nothing we could have done anyway.

Adjust the Updater class to support GZIP files and not attempt to patch
them.

Bootloader builds to 0xd90 out of 0xfff bytes.

* Add @d-a-v's patch for httpupdate

https://github.com/esp8266/Arduino/pull/6820#pullrequestreview-326541014

* Update uzlib to point to pfalcon++

For now, because there are some self-test failures with @d-a-v's esp8266
branch (whose cool new features we don't actually use in eboot now)
start with pfalcon's 2.9 release and add the 2 patches (clcidx to code
from IRAM/RODATA, and the Windows test file renaming) needed to build
and run successfully.

* Add (c) notice for uzlib to README
2019-12-18 09:17:38 -08:00
Mike Nix
5b500e4e34 Move eboot_command_clear to after firmware copy. (#6823)
The eboot command was cleared from the rtc mem before the firmware copy
making it possible for a power failure during an OTA update to brick the
esp until the firmware was loaded via USB because of a partial firmware
copy that would never be restarted.

Moving the eboot_command_clear to after the copy ensures that any partial
copy is restarted at next power on.
2019-11-21 22:37:12 -03:00
Ivan Grokhotkov
32bd42b028 Store git version of the core in the compiled binary (#2099)
* Store git version of the core in the compiled binary

* Don't update version number when using boards manager package
2016-06-06 14:37:39 +08:00
Ivan Grokhotkov
8a3386bfbf Bootloader: don't touch RTC memory if it doesn't contain a valid command (#619) 2016-03-28 00:24:27 +03:00
Ivan Grokhotkov
91ca9ba75b Make sure WDT is re-enabled in eboot even in case of error (#517) 2015-07-23 16:39:56 +03:00
Ivan Grokhotkov
481cee6460 Disable WDT in eboot while copying new sketch (#517) 2015-07-23 16:34:11 +03:00
Ivan Grokhotkov
5763dbba3b Code review 2015-07-06 21:04:08 +03:00
John Doe
f3f500936d make eboot erase/read/write sector by sector
that makes possible having sketches with size up to the free size
2015-07-06 12:34:29 +03:00
Ivan Grokhotkov
73740d6e6d Clean up eboot 2015-06-05 14:07:35 +03:00
Ivan Grokhotkov
bdf24031eb Fix uboot startup 2015-06-01 13:33:56 +03:00
Ivan Grokhotkov
d5b578b161 reading eboot commands via RTC, flash erase/copy 2015-06-01 02:08:48 +03:00
Ivan Grokhotkov
48e0d44860 Add eboot 2015-05-29 19:27:03 +03:00