SDK Firmware Update clears boot sector

SpenZerX
Posts: 41
Joined: Thu Apr 16, 2015 9:30 pm
Location: Germany
Contact:

SDK Firmware Update clears boot sector

Postby SpenZerX » Fri Aug 26, 2016 1:40 am

Hi,

in some cases the SDK Firmware Update still clears the boot sector.
Its documentated in the debug-log

Devices are soft bricked then and need service.

May be a low memory problem?

Attached is a log.

Iam on latest SDK, non os.


sumlength = 470356
sec_block 115
...................................................................................................................upgrade_get_sum_disconcb 17608
erase sector=1 ok
erase sector=2 ok
erase sector=3 ok
erase sector=4 ok
erase sector=5 ok
erase sector=6 ok
erase sector=7 ok
erase sector=8 ok
erase sector=9 ok
erase sector=10 ok
erase sector=11 ok
erase sector=12 ok
erase sector=13 ok
erase sector=14 ok
erase sector=15 ok
erase sector=16 ok
erase sector=17 ok
erase sector=18 ok
.jso->NO Args!erase sector=19 ok
erase sector=20 ok
erase sector=21 ok
erase sector=22 ok
erase sector=23 ok
erase sector=24 ok
erase sector=25 ok
erase sector=26 ok
erase sector=27 ok
erase sector=28 ok
erase sector=29 ok
erase sector=30 ok
erase sector=31 ok
erase sector=32 ok
erase sector=33 ok
erase sector=34 ok
erase sector=35 ok
erase sector=36 ok
erase sector=37 ok
erase sector=38 ok
erase sector=39 ok
erase sector=40 ok
erase sector=41 ok
erase sector=42 ok
erase sector=43 ok
erase sector=44 ok
erase sector=45 ok
erase sector=46 ok
erase sector=47 ok
erase sector=48 ok
erase sector=49 ok
erase sector=50 ok
erase sector=51 ok
erase sector=52 ok
erase sector=53 ok
erase sector=54 ok
erase sector=55 ok
erase sector=56 ok
erase sector=57 ok
erase sector=58 ok
erase sector=59 ok
erase sector=0 ok

ALL=60 sectors erase ok!
erase sector=0 ok

ALL=1 sectors erase ok!
erase sector=0 ok

ALL=1 sectors erase ok!
erase sector=0 ok

ALL=1 sectors erase ok!
erase sector=0 ok

ALL=1 sectors erase ok!
erase sector=0 ok

ALL=1 sectors erase ok!
erase sector=0 ok

ALL=1 sectors erase ok!
erase sector=0 ok

ALL=1 sectors erase ok!
erase sector=68 ok

ALL=1 sectors erase ok!
erase sector=69 ok
erase sector=70 ok
upgrade_connect_cb
erase sector=10 ok
erase sector=72 ok
sumlength = 470356
upgrade file download start.
totallen = 2448
totallen = 3900
totallen = 5352
totallen = 6804
totallen = 8256
totallen = 9708
totallen = 11160
totallen = 12612
totallen = 14064
totallen = 15516
totallen = 16968
totallen = 18420
totallen = 19872
totallen = 21324
totallen = 22776
totallen = 24228
totallen = 25680
totallen = 27132
totallen = 28584
totallen = 30036
totallen = 31488
totallen = 32940
totallen = 34392
totallen = 35844
totallen = 37296
totallen = 38748
totallen = 40200
totallen = 41652
totallen = 43104
totallen = 44556
totallen = 46008
totallen = 47460
totallen = 48912
totallen = 50364
totallen = 51816
totallen = 53268
totallen = 54720
totallen = 56172
totallen = 57624
totallen = 59076
totallen = 60528
totallen = 61980
totallen = 63432
totallen = 64884
totallen = 66336
totallen = 67788
totallen = 69240
totallen = 70692
totallen = 72144
totallen = 73596
totallen = 75048
totallen = 76500
totallen = 77952
totallen = 79404
totallen = 80856
totallen = 82308
totallen = 83760
totallen = 85212
totallen = 86664
totallen = 88116
totallen = 89568
totallen = 91020
totallen = 92472
totallen = 93924
totallen = 95376
totallen = 96828
totallen = 98280
totallen = 99732
totallen = 101184
totallen = 102636
totallen = 104088
totallen = 105540
totallen = 106992
totallen = 108444
totallen = 109896
totallen = 111348
totallen = 112800
totallen = 114252
totallen = 115704
totallen = 117156
totallen = 118608
totallen = 120060
totallen = 121512
totallen = 122964
totallen = 124416
totallen = 125868
totallen = 127320
totallen = 128772
totallen = 130224
totallen = 131676
totallen = 133128
totallen = 134580
totallen = 136032
totallen = 137484
totallen = 138936
totallen = 140388
totallen = 141840
totallen = 143292
totallen = 144744
totallen = 146196
totallen = 147648
totallen = 149100
totallen = 150552
totallen = 152004
.jso->NO Args!totallen = 153456
totallen = 154908
totallen = 156360
totallen = 157812
totallen = 159264
totallen = 160716
totallen = 162168
totallen = 163620
totallen = 165072
totallen = 166524
totallen = 167976
totallen = 169428
totallen = 170880
totallen = 172332
totallen = 173784
totallen = 175236
totallen = 176688
totallen = 178140
totallen = 179592
totallen = 181044
totallen = 182496
totallen = 183948
totallen = 185400
totallen = 186852
totallen = 188304
totallen = 189756
totallen = 191208
totallen = 192660
totallen = 194112
totallen = 195564
totallen = 197016
totallen = 198468
totallen = 199920
totallen = 201372
totallen = 202824
totallen = 204276
totallen = 205728
totallen = 207180
totallen = 208632
totallen = 210084
totallen = 211536
totallen = 212988
totallen = 214440
totallen = 215892
totallen = 217344
totallen = 218796
totallen = 220248
totallen = 221700
totallen = 223152
totallen = 224604
totallen = 226056
totallen = 227508
totallen = 228960
totallen = 230412
totallen = 231864
totallen = 233316
totallen = 234768
totallen = 236220
totallen = 237672
totallen = 239124
totallen = 240576
totallen = 242028
totallen = 243480
totallen = 244932
totallen = 246384
totallen = 247836
totallen = 249288
totallen = 250740
totallen = 252192
totallen = 253644
totallen = 255096
totallen = 256548
totallen = 258000
totallen = 259452
totallen = 260904
totallen = 262356
totallen = 263808
totallen = 265260
totallen = 266712
totallen = 268164
totallen = 269616
totallen = 271068
totallen = 272520
totallen = 273972
totallen = 275424
totallen = 276876
totallen = 278328
totallen = 279780
totallen = 281232
totallen = 282684
totallen = 284136
totallen = 285588
totallen = 287040
totallen = 288492
totallen = 289944
totallen = 291396
totallen = 292848
totallen = 294300
totallen = 295752
totallen = 297204
totallen = 298656
totallen = 300108
totallen = 301560
totallen = 303012
totallen = 304464
totallen = 305916
totallen = 307368
totallen = 308820
totallen = 310272
totallen = 311724
totallen = 313176
totallen = 314628
totallen = 316080
totallen = 317532
totallen = 318984
totallen = 320436
totallen = 321888
totallen = 323340
totallen = 324792
totallen = 326244
totallen = 327696
totallen = 329148
totallen = 330600
totallen = 332052
totallen = 333504
totallen = 334956
totallen = 336408
totallen = 337860
totallen = 339312
totallen = 340764
totallen = 342216
totallen = 343668
totallen = 345120
totallen = 346572
totallen = 348024
totallen = 349476
totallen = 350928
totallen = 352380
totallen = 353832
totallen = 355284
totallen = 356736
totallen = 358188
totallen = 359640
totallen = 361092
totallen = 362544
totallen = 363996
totallen = 365448
totallen = 366900
totallen = 368352
totallen = 369804
totallen = 371256
totallen = 372708
totallen = 374160
totallen = 375612
totallen = 377064
totallen = 378516
totallen = 379968
totallen = 381420
totallen = 382872
totallen = 384324
totallen = 385776
totallen = 387228
totallen = 388680
totallen = 390132
totallen = 391584
totallen = 393036
totallen = 394488
totallen = 395940
totallen = 397392
totallen = 398844
totallen = 400296
totallen = 401748
totallen = 403200
totallen = 404652
totallen = 406104
totallen = 407556
totallen = 409008
totallen = 410460
totallen = 411912
totallen = 413364
totallen = 414816
totallen = 416268
totallen = 417720
totallen = 419172
totallen = 420624
totallen = 422076
totallen = 423528
totallen = 424980
totallen = 426432
totallen = 427884
totallen = 429336
totallen = 430788
totallen = 432240
totallen = 433692
totallen = 435144
totallen = 436596
totallen = 438048
.jso->NO Args!totallen = 439500
totallen = 440952
totallen = 442404
totallen = 443856
totallen = 445308
totallen = 446760
totallen = 448212
totallen = 449664
totallen = 451116
totallen = 452568
totallen = 454020
totallen = 455472
totallen = 456924
totallen = 458376
totallen = 459828
totallen = 461280
totallen = 462732
totallen = 464184
totallen = 465636
totallen = 467088
totallen = 468540
totallen = 469992
totallen = 470356
upgrade file download finished.
flash_crc = 644483266
img_crc = 644483266
upgrade_check
FW-Upd. - Success! Rebooting!
reboot to use1
state: 5 -> 0 (0)
rm 0
del if0
bcn 0
del if1
usl
FW-Upd. - DisConCb fired - cleanup

pratik

Re: SDK Firmware Update clears boot sector

Postby pratik » Fri Sep 02, 2016 10:27 am

Hello,

Are you sure you selected the correct flash memory map during all the steps of building and programming the firmware?
Which update function are you using? The one provided by Espressif for FOTA or a custom one?

SpenZerX
Posts: 41
Joined: Thu Apr 16, 2015 9:30 pm
Location: Germany
Contact:

Re: SDK Firmware Update clears boot sector

Postby SpenZerX » Sat Sep 03, 2016 4:10 am

Yes, i am using the code provided by Espressif for FOTA. (ESP SDK, but server code is my own - have you released any?)

Currently the problem is under observation.

I think its a bug in your SDK. If server response answer to the Firmware Query with method HEAD and/or GET comes to fast it produces boot sector erase (attached log).

I made changes now on server script. I added command 'System.Threading.Thread.Sleep(8000);' to my server script. Result is a delayed answer. And now it looks very promising that the problem is fixed.

Who is online

Users browsing this forum: No registered users and 1 guest