1. 28 Aug, 2024 5 commits
  2. 26 Aug, 2024 6 commits
  3. 22 Aug, 2024 4 commits
  4. 20 Aug, 2024 10 commits
  5. 19 Aug, 2024 4 commits
  6. 16 Aug, 2024 7 commits
    • Elvis Pfützenreuter's avatar
    • Matt Trentini's avatar
    • Angus Gratton's avatar
      esp32: Remove the increased stack limit margin for ESP32-C3. · b6a3aa10
      Angus Gratton authored
      The extra limit for C3 dates from 68235148 which added C3 support.
      Measuring the minimum stack margins that can pass the stress tests I
      measured 768 bytes for ESP32-S3 and 512 bytes for ESP32-C3 on ESP-IDF
      V5.2.2 and similar on V5.0.4. i.e. The ESP32-C3 actually needs less stack
      margin not more!
      
      I think the extra margin for ESP32-C3 probably arose from:
      
      1. Some toolchain inefficiency in the IDF V4.x RISC-V compiler codegen,
      that has since been improved.
      
      OR
      
      2. The race condition that was fixed in e3955f42 where sometimes the limit
      wasn't set correctly at all. This seems to trigger more on C3, presumably
      some timing artifact, and I'd believe that some binaries might be more
      susceptible than others due to random factors.
      
      OR
      
      3. Commit 6007f3e2 which enabled custom
      NLR handling for ESP32-C3.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      b6a3aa10
    • Angus Gratton's avatar
      esp32: Fix Python cstack size for bluetooth irq callbacks. · 6565b3cb
      Angus Gratton authored
      This value should have been adjusted when the new cstack API was adopted in
      e3955f42, as otherwise the stack limit is too small especially on
      ESP32-C3 where the stack limit was 6144 - 2048 - 2048.
      
      Some extra margin is needed for bluetooth irq because invoke_irq_handler()
      isn't a top-level task function, NimBLE calls through multiple layers
      first. Measuring this overhead on IDF V5.2.2 (by putting an abort() in
      invoke_irq_handler() and then measuring the stack size) yielded 672 bytes
      on ESP32-S3 and 612 bytes on ESP32-C3, similar to the size reported in
      cd66aa05.
      
      Sticking with 1024 bytes for added safety margin. This means on Xtensa the
      total margin for the BLE task stays the same (2048 bytes) as before
      switching to cstack.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      6565b3cb
    • Alessandro Gatti's avatar
      esp32/mphalport: Print debug strings even before the GIL is ready. · 0b75e180
      Alessandro Gatti authored
      If verbose debugging is enabled there is some stdout output happening
      before the GIL is ready (for example, GC initialisation), and the code
      assumed that no string printing occurred before the interpreter was fully
      initialised.  Printing long strings would operate without holding the GIL,
      which would crash if string output would happen too early in the startup
      process.
      
      This commit addresses that issue, making sure verbose debugging output will
      work even before the interpreter is fully initialised (as if it is not yet
      ready there's no GIL to take care of).
      
      Also, the threshold that would indicate whether a string is "long" (and
      thus requiring a GIL release/lock operation) or not was hardcoded to 20
      bytes.  This commit makes that configurable, maintaining 20 bytes as a
      default.
      
      Fixes issue #15408.
      Signed-off-by: default avatarAlessandro Gatti <a.gatti@frob.it>
      0b75e180
    • Matt Trentini's avatar
      esp32/boards: Remove BLE from list of features for ESP32-S2. · 09207885
      Matt Trentini authored
      Fixes issue #15618.
      Signed-off-by: default avatarMatt Trentini <matt.trentini@gmail.com>
      09207885
    • Angus Gratton's avatar
      esp32: Restore ESP32-C3 brownout detector settings to IDF defaults. · e71a324c
      Angus Gratton authored
      Commit a66bd7a4 added the
      ESP32_GENERIC_C3_USB board (now merged with ESP32_GENERIC_C3) and changed
      the brownout detector from the default level 7 (~2.51V) to level 4
      (~2.92V).
      
      Raising the level again seems to fix random BOD resets on some of the
      cheaper ESP32-C3 dev boards (that likely skimp on power supply
      capacitance).
      
      Specifically, this change prevents random resets running multi_bluetooth
      tests on ESP32-C3 "SuperMini" board.
      
      Also removed from the LOLIN_C3_MINI board as it seems this config is a copy
      of the generic one.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      e71a324c
  7. 14 Aug, 2024 4 commits