I using the example code of rtos_upgrade_demo.zip which i have downloaded int forum, which i have attached it.
http://bbs.espressif.com/viewtopic.php?f=7&t=865&p=2950&hilit=RTOS+FOTA#p2950
i am successfully generating the user1.bin and user2.bin by using the example code and i have flashed it by using the "esptool" by commend
Code: Select all
esptool.py --port /dev/ttyUSB0 write_flash 0x00000 ESP8266_RTOS_SDK-master/bin/boot_v1.5.bin 0x3FC000 ESP8266_RTOS_SDK-master/bin/esp_init_data_default.bin 0x3FE000 ESP8266_RTOS_SDK-master/bin/blank.bin 0x01000 ESP8266_RTOS_SDK-master/bin/upgrade/user1.4096.new.4.bin
i have also add the "system_get_flash_size_map()" in the code to check the flash size map in "user_init()" function.
Code: Select all
void ICACHE_FLASH_ATTR
user_init(void)
{
printf("In blinkenTask ...\n");
printf("Flash map value : %d\n",system_get_flash_size_map());
The output of the function is always "0" which is from rtos documentation.
For "0" it is "FLASH_SIZE_4M_MAP_256_256 Flash size : 4Mbits. Map : 256KBytes + 256KBytes"
enum flash_size_map
{
FLASH_SIZE_4M_MAP_256_256 Flash size : 4Mbits. Map : 256KBytes + 256KBytes -- 0
FLASH_SIZE_2M Flash size : 2Mbits. Map : 256KBytes
FLASH_SIZE_8M_MAP_512_512 Flash size : 8Mbits. Map : 512KBytes + 512KBytes
FLASH_SIZE_16M_MAP_512_512 Flash size : 16Mbits. Map : 512KBytes + 512KBytes
FLASH_SIZE_32M_MAP_512_512 Flash size : 32Mbits. Map : 512KBytes + 512KBytes
FLASH_SIZE_16M_MAP_1024_1024 Flash size : 16Mbits. Map : 1024KBytes + 1024KBytes
FLASH_SIZE_32M_MAP_1024_1024 Flash size : 32Mbits. Map : 1024KBytes + 1024KBytes
}
Is there is any way to generate the boot.bin for the Flash size 4096KB( 512KB+ 512KB).
Also i am able to download the user2.bin in the device from my local server and the my code uses the function
"spi_flash_write(addr, buffer, len)" to write the user2.bin in the memory address starts from "0x81000" as per the documentation to flash the file of size 4096KB( 512KB+ 512KB).. The spi_flash_write fails because the esp8266 device is in the (256kb + 256kb) flash mode, as we have flashed the boot.v1.5.bin.


what is the proper way to generate user1.bin, user2.bin. and boot.bin of flash size of 4096KB( 512KB+ 512KB), . Also when we make the project it only generates the corresponding user bin files only it is not generating the boot.bin files
bin crc: 767d457e
Support boot_v1.2 and +
Generate user1.4096.new.4.bin successully in BIN_PATH
boot.bin------------>0x00000
user1.4096.new.4.bin--->0x01000
!!!
Thanks in advance..


