esp-open-rtos/extras/rboot-ota
2016-04-07 20:29:28 +02:00
..
component.mk Rework component makefiles to have a default <component>_ROOT 2015-09-08 09:59:59 +10:00
license.txt Add missing MIT license for rboot-ota 2016-03-03 08:15:21 +11:00
ota-tftp.c Updated rboot to #75ca33b including the flash write bug. 2016-04-07 20:29:28 +02:00
ota-tftp.h ota_basic example, ota-tftp support: Add links to the new OTA wiki page 2016-02-08 16:58:31 +11:00
rboot-api.c Updated rboot to #75ca33b including the flash write bug. 2016-04-07 20:29:28 +02:00
rboot-api.h Updated rboot to #75ca33b including the flash write bug. 2016-04-07 20:29:28 +02:00
rboot-cache.S Working TFTP server based OTA updates 2015-08-05 14:10:14 +10:00
rboot-config.h Almost functional OTA support 2015-07-29 16:50:23 +10:00
rboot-integration.c Updated rboot to #75ca33b including the flash write bug. 2016-04-07 20:29:28 +02:00
rboot-integration.h Updated rboot to #75ca33b including the flash write bug. 2016-04-07 20:29:28 +02:00
rboot.h Updated rboot to #75ca33b including the flash write bug. 2016-04-07 20:29:28 +02:00
readme.txt Updated rboot to #75ca33b including the flash write bug. 2016-04-07 20:29:28 +02:00

*NOTE: This rboot-ota and the TFTP server ota-tftp.h are specific to esp-open-rtos. The below Makefile is from the upstream rboot-ota project and the rboot code is taken from #75ca33b.*

For more details on OTA in esp-open-rtos, see https://github.com/SuperHouse/esp-open-rtos/wiki/OTA-Update-Configuration


rBoot - User API and OTA support for rBoot on the ESP8266
---------------------------------------------------------
by Richard A Burton, richardaburton@gmail.com
http://richard.burtons.org/

See rBoot readme.txt for how to create suitable rom images to update OTA.

This provides a couple of simple APIs for getting rBoot config and one for over
the air updates (OTA):

  rboot_config rboot_get_config();
    Returns rboot_config (defined in rboot.h) allowing you to modify any values
    in it, including the rom layout.

  bool rboot_set_config(rboot_config *conf);
    Saves the rboot_config structure back to sector 2 of the flash, while
    maintaining the contents of the rest of the sector. You can use the rest of
    this sector for your app settings, as long as protect this structure when
    you do so.

  uint8 rboot_get_current_rom();
    Get the currently selected boot rom (the currently running rom, as long as
	you haven't changed it since boot).

  bool rboot_set_current_rom(uint8 rom);
    Set the current boot rom, which will be used when next restarted.

  bool rboot_ota_start(rboot_ota *ota);
    Starts an OTA. Pass it an rboot_ota structure with appropriate options. This
    function works very much like the SDK libupgrade code you may already be
	using, very few changes will be needed to switch to this.
    
    typedef struct {
        uint8 ip[4];
        uint16 port;
        uint8 *request;
        uint8 rom_slot;
        uint32 rom_addr;
        ota_callback callback;
    } rboot_ota;
    
    - ip is the ip of the OTA http server.
    - port is the server port (e.g. 80).
    - request is the http request to send.
    - rom_slot is the rom slot to write to (numbered from zero), or set to
      FLASH_BY_ADDR to flash by address instead of by rom slot.
    - rom_addr is the flash address to write to when using FLASH_BY_ADDR,
      otherwise it is ignored.
    - call back is the user code function to call on completion of OTA.