1. 04 4月, 2020 1 次提交
    • D
      esp8266: Change from FAT to littlefs v2 as default filesystem. · e0905e85
      Damien George 提交于
      This commit changes the esp8266 boards to use littlefs v2 as the
      filesystem, rather than FAT.  Since the esp8266 doesn't expose the
      filesystem to the PC over USB there's no strong reason to keep it as FAT.
      Littlefs is smaller in code size, is more efficient in use of flash to
      store data, is resilient over power failure, and using it saves about 4k of
      heap RAM, which can now be used for other things.
      
      This is a backwards incompatible change because all existing esp8266 boards
      will need to update their filesystem after installing new firmware (eg
      backup old files, install firmware, restore files to new filesystem).
      
      As part of this commit the memory layout of the default board (GENERIC) has
      changed.  It now allocates all 1M of memory-mapped flash to the firmware,
      so the filesystem area starts at the 2M point.  This is done to allow more
      frozen bytecode to be stored in the 1M of memory-mapped flash.  This
      requires an esp8266 module with 2M or more of flash to work, so a new board
      called GENERIC_1M is added which has the old memory-mapping (but still
      changed to use littlefs for the filesystem).
      
      In summary there are now 3 esp8266 board definitions:
      - GENERIC_512K: for 512k modules, doesn't have a filesystem.
      - GENERIC_1M: for 1M modules, 572k for firmware+frozen code, 396k for
        filesystem (littlefs).
      - GENERIC: for 2M (or greater) modules, 968k for firmware+frozen code,
        1M+ for filesystem (littlefs), FAT driver also included in firmware for
        use on, eg, external SD cards.
      e0905e85
  2. 28 3月, 2020 1 次提交
  3. 25 3月, 2020 1 次提交
  4. 24 3月, 2020 3 次提交
  5. 22 3月, 2020 1 次提交
  6. 20 3月, 2020 1 次提交
  7. 10 3月, 2020 1 次提交
  8. 28 2月, 2020 2 次提交
  9. 13 2月, 2020 1 次提交
    • D
      py: Add mp_raise_msg_varg helper and use it where appropriate. · ad7213d3
      Damien George 提交于
      This commit adds mp_raise_msg_varg(type, fmt, ...) as a helper for
      nlr_raise(mp_obj_new_exception_msg_varg(type, fmt, ...)).  It makes the
      C-level API for raising exceptions more consistent, and reduces code size
      on most ports:
      
         bare-arm:   +28 +0.042%
      minimal x86:  +100 +0.067%
         unix x64:   -56 -0.011%
      unix nanbox:  -300 -0.068%
            stm32:  -204 -0.054% PYBV10
           cc3200:    +0 +0.000%
          esp8266:   -64 -0.010% GENERIC
            esp32:  -104 -0.007% GENERIC
              nrf:  -136 -0.094% pca10040
             samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
      ad7213d3
  10. 07 2月, 2020 2 次提交
  11. 31 1月, 2020 1 次提交
  12. 14 1月, 2020 1 次提交
    • J
      esp8266/modules: Fix AttributeError in _boot.py if flash not formatted. · c14ff619
      JensDiemer 提交于
      Prior to this commit, if the flash filesystem was not formatted then it
      would error: "AttributeError: 'FlashBdev' object has no attribute 'mount'".
      That is due to it not being able to detect the filesystem on the block
      device and just trying to mount the block device directly.
      
      This commit fixes the issue by just catching all exceptions.  Also it's not
      needed to try the mount if `flashbdev.bdev` is None.
      c14ff619
  13. 27 12月, 2019 1 次提交
  14. 20 12月, 2019 1 次提交
    • J
      extmod/webrepl: Move webrepl scripts to common place and use manifest. · 7ce1e0b1
      Jim Mussared 提交于
      Move webrepl support code from ports/esp8266/modules into extmod/webrepl
      (to be alongside extmod/modwebrepl.c), and use frozen manifests to include
      it in the build on esp8266 and esp32.
      
      A small modification is made to webrepl.py to make it work on non-ESP
      ports, i.e. don't call dupterm_notify if not available.
      7ce1e0b1
  15. 12 12月, 2019 1 次提交
  16. 11 11月, 2019 1 次提交
    • D
      extmod: Consolidate FAT FS config to MICROPY_VFS_FAT across all ports. · 799b6d1e
      Damien George 提交于
      This commit removes the Makefile-level MICROPY_FATFS config and moves the
      MICROPY_VFS_FAT config to the Makefile level to replace it.  It also moves
      the include of the oofatfs source files in the build from each port to a
      central place in extmod/extmod.mk.
      
      For a port to enabled VFS FAT support it should now set MICROPY_VFS_FAT=1
      at the level of the Makefile.  This will include the relevant oofatfs files
      in the build and set MICROPY_VFS_FAT=1 at the C (preprocessor) level.
      799b6d1e
  17. 07 11月, 2019 2 次提交
  18. 05 11月, 2019 1 次提交
  19. 29 10月, 2019 1 次提交
  20. 22 10月, 2019 1 次提交
    • D
      py: Automatically provide weak links from "foo" to "ufoo" module name. · d2384efa
      Damien George 提交于
      This commit implements automatic module weak links for all built-in
      modules, by searching for "ufoo" in the built-in module list if "foo"
      cannot be found.  This means that all modules named "ufoo" are always
      available as "foo".  Also, a port can no longer add any other weak links,
      which makes strict the definition of a weak link.
      
      It saves some code size (about 100-200 bytes) on ports that previously had
      lots of weak links.
      
      Some changes from the previous behaviour:
      - It doesn't intern the non-u module names (eg "foo" is not interned),
        which saves code size, but will mean that "import foo" creates a new qstr
        (namely "foo") in RAM (unless the importing module is frozen).
      - help('modules') no longer lists non-u module names, only the u-variants;
        this reduces duplication in the help listing.
      
      Weak links are effectively the same as having a set of symbolic links on
      the filesystem that is searched last.  So an "import foo" will search
      built-in modules first, then all paths in sys.path, then weak links last,
      importing "ufoo" if it exists.  Thus a file called "foo.py" somewhere in
      sys.path will still have precedence over the weak link of "foo" to "ufoo".
      
      See issues: #1740, #4449, #5229, #5241.
      d2384efa
  21. 21 10月, 2019 3 次提交
  22. 15 10月, 2019 2 次提交
  23. 10 10月, 2019 2 次提交
  24. 05 9月, 2019 1 次提交
  25. 04 9月, 2019 1 次提交
  26. 30 8月, 2019 1 次提交
  27. 21 8月, 2019 1 次提交
  28. 06 8月, 2019 1 次提交
  29. 03 7月, 2019 1 次提交
  30. 01 7月, 2019 2 次提交