<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Mark,<br>
    <br>
    the new build is in my edge directory:<br>
    <br>
    <a href="https://ovms.dexters-web.de/firmware/ota/v3.1/edge/">https://ovms.dexters-web.de/firmware/ota/v3.1/edge/</a><br>
    <br>
    Regards,<br>
    Michael<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 11.12.19 um 10:27 schrieb Michael
      Balzer:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2599ee78-bf0a-cfa9-1ec7-ffbd6de1e2cd@expeedo.de">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">Mark,<br>
        <br>
        I'll do a new build this afternoon.<br>
        <br>
        It's really nice we're getting more RAM on the fly.<br>
        <br>
        Btw, we will need a separate build config once they also fix the
        PSRAM bug on the core. The workaround eats some performance (not
        too much, but still).<br>
        <br>
        Regards,<br>
        Michael<br>
        <br>
        <br>
        Am 11.12.19 um 04:40 schrieb Mark Webb-Johnson:<br>
      </div>
      <blockquote type="cite"
        cite="mid:C342FFC0-FBC2-4E04-AF22-436E3C3642B9@webb-johnson.net">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <u class=""><b class="">Short story:</b></u>
        <div class=""><br class="">
        </div>
        <div class="">I suggest you set your development and production
          sdkconfig to:</div>
        <div class=""><br class="">
        </div>
        <blockquote style="margin: 0 0 0 40px; border: none; padding:
          0px;" class="">
          <div class=""><font class="" face="Andale Mono"><span
                style="font-style: normal; font-size: 14px;" class="">CONFIG_SPIRAM_TYPE_AUTO=y</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-style: normal; font-size: 14px;" class="">CONFIG_SPIRAM_TYPE_ESPPSRAM32=</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-style: normal; font-size: 14px;" class="">CONFIG_SPIRAM_SIZE=-1</span></font></div>
        </blockquote>
        <div class="">
          <div><br class="">
          </div>
          <div>If you prefer menus, you can find that in 'make
            menuconfig': Compont config / ESP32-specific / SPI RAM
            config / Type of SPI RAM chip in use. Set it to Auto-detect.</div>
          <div><br class="">
          </div>
          <div><u class=""><b class="">Long story:</b></u></div>
          <div><br class="">
          </div>
          <div>We previously used a hard-coded selection of "ESP-PSRAM32
            or IS25WP032”, but that won’t work with the new
            ESP32-WROVER-B modules we are now using (as Espressif have
            discontinued the 4MB versions). Those new modules have 8MB
            PSRAM and are "ESP-PSRAM64 or LY68L6400”. The auto-detect
            setting seems to work well, and can detect and support the
            installed PSRAM automatically.</div>
          <div><br class="">
          </div>
          <div>With this new setting, we get:</div>
          <div><br class="">
          </div>
        </div>
        <blockquote style="margin: 0 0 0 40px; border: none; padding:
          0px;" class="">
          <div class="">
            <div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class="">4MB PSRAM module:</span></font></div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class=""><br class="">
                  </span></font></div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class="">I (895) psram: This chip is ESP32-D0WD</span></font></div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class="">I (896) spiram: Found 32MBit SPI RAM device</span></font></div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class=""><br class="">
                  </span></font></div>
              <div>
                <div><font class="" face="Andale Mono"><span
                      style="font-style: normal; font-size: 14px;"
                      class="">8MB PSRAM module:</span></font></div>
                <div><font class="" face="Andale Mono"><span
                      style="font-style: normal; font-size: 14px;"
                      class=""><br class="">
                    </span></font></div>
                <div><font class="" face="Andale Mono"><span
                      style="font-style: normal; font-size: 14px;"
                      class="">I (882) psram: This chip is ESP32-D0WD</span></font></div>
                <div><font class="" face="Andale Mono"><span
                      style="font-style: normal; font-size: 14px;"
                      class="">I (882) spiram: Found 64MBit SPI RAM
                      device</span></font></div>
              </div>
            </div>
          </div>
        </blockquote>
        <div class="">
          <div><br class="">
          </div>
          <div>Without this auto-detect, OTA updating to our latest
            firmware will produce an endless loop:</div>
          <div><br class="">
          </div>
        </div>
        <blockquote style="margin: 0 0 0 40px; border: none; padding:
          0px;" class="">
          <div class="">
            <div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class="">I (882) psram: This chip is ESP32-D0WD</span></font></div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class="">E (882) spiram: Expected 4096KiB chip but
                    found 8192KiB chip. Bailing out..</span></font></div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class="">E (883) cpu_start: Failed to init external
                    RAM!</span></font></div>
              <div><font class="" face="Andale Mono"><span
                    style="font-style: normal; font-size: 14px;"
                    class="">abort() was called at PC 0x400817fc on core
                    0</span></font></div>
            </div>
          </div>
        </blockquote>
        <div class="">
          <div><br class="">
          </div>
          <div>Annoyingly, the bootloader code to detect a failure to
            load the OTA firmware doesn’t work, so it can’t fall back to
            factory.</div>
          <div><br class="">
          </div>
          <div>It can be recovered to factory using ESPTOOL:</div>
          <div><br class="">
          </div>
        </div>
        <blockquote style="margin: 0 0 0 40px; border: none; padding:
          0px;" class="">
          <div class="">
            <div><font class="" face="Andale Mono"><span
                  style="font-style: normal; font-size: 14px;" class="">esptool.py
                  --chip esp32 --port <path-to-serial-port> --baud
                  921600 --before default_reset --after hard_reset
                  write_flash -z --flash_mode dio --flash_freq 40m
                  --flash_size detect 0xd000 ota_data_initial.bin 0x8000
                  partitions.bin</span></font></div>
          </div>
        </blockquote>
        <div class="">
          <div><br class="">
          </div>
          <div>I have built an edge release based on this, and will
            leave for 24 hours. If ok, I will then move that to EAP and
            to MAIN at the weekend. This will be 3.2.008. We need to get
            this out ASAP, as recipients of the new modules may do an
            OTA update and have issues (so far only 1, and he recovered
            using esptool).</div>
          <div><br class="">
          </div>
          <div>@Michael: I suggest you follow with your server. Let me
            know the path to your new update (from SPIRAM branch) and I
            will test on the ESP32-WROVER-B 8MB module I have here.</div>
          <div><br class="">
          </div>
          <div>Regards, Mark.</div>
          <div><br class="">
            <blockquote type="cite" class="">
              <div class="">On 9 Dec 2019, at 9:42 PM, Mark Webb-Johnson
                <<a href="mailto:mark@webb-johnson.net" class=""
                  moz-do-not-send="true">mark@webb-johnson.net</a>>
                wrote:</div>
              <br class="Apple-interchange-newline">
              <div class="">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=UTF-8" class="">
                <div style="word-wrap: break-word; -webkit-nbsp-mode:
                  space; line-break: after-white-space;" class="">
                  <div class=""><br class="">
                  </div>
                  Our latest wifi-only modules are coming with
                  ESP-WROVER-B module, and that includes 8MB
                  PSRAM/SPIRAM (not 4MB, our standard so far). I have
                  had one report from the field that factory firmware
                  3.2.002 works fine, but 3.2.005 crashes on boot with
                  an error:
                  <div class=""><br class="">
                  </div>
                  <blockquote style="margin: 0 0 0 40px; border: none;
                    padding: 0px;" class="">
                    <div class=""><span style="color: rgb(85, 85, 85);
                        font-family: "open sans", arial,
                        "century gothic", sans-serif;
                        font-size: 13px; background-color: rgb(255, 255,
                        255);" class="">(824) psram: This chip is
                        ESP32-D0WD[[0m</span><br style="color: rgb(85,
                        85, 85); font-family: "open sans",
                        arial, "century gothic", sans-serif;
                        font-size: 13px;" class="">
                      <span style="color: rgb(85, 85, 85); font-family:
                        "open sans", arial, "century
                        gothic", sans-serif; font-size: 13px;
                        background-color: rgb(255, 255, 255);" class="">(824)
                        spiram: Expected 4096KiB chip but found 8192KiB
                        chip. Bailing out..</span></div>
                  </blockquote>
                  <div class=""><br class="">
                  </div>
                  <div class="">I see we have this in our sdkconfig:</div>
                  <div class=""><br class="">
                  </div>
                  <blockquote style="margin: 0 0 0 40px; border: none;
                    padding: 0px;" class="">
                    <div class="">
                      <div class="">Type of SPI RAM chip in use</div>
                      <div class=""> ( ) Auto-detect</div>
                      <div class=""> (X) ESP-PSRAM32 or IS25WP032</div>
                      <div class=""> ( ) ESP-PSRAM64 or LY68L6400</div>
                    </div>
                  </blockquote>
                  <br class="">
                  <div class="">Not sure when that appeared, but I guess
                    between 3.2.002 and 3.2.005.</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">The user experiencing this problem is
                    knowledgeable (he managed to recover back to
                    factory), so I am trying a 3.2.007 build with him,
                    with that setting set to auto-detect.</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">Regards, Mark.</div>
                  <div class=""><br class="">
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br class="">
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com" moz-do-not-send="true">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" moz-do-not-send="true">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="144">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
  </body>
</html>