1. 18 Apr, 2017 1 commit
  2. 12 Apr, 2017 1 commit
  3. 02 Apr, 2017 1 commit
  4. 01 Apr, 2017 1 commit
  5. 20 Mar, 2017 1 commit
  6. 22 Feb, 2017 1 commit
  7. 15 Feb, 2017 1 commit
  8. 09 Feb, 2017 1 commit
    • dmazzella's avatar
      py/objtype: Implement __delattr__ and __setattr__. · 18e65691
      dmazzella authored
      This patch implements support for class methods __delattr__ and __setattr__
      for customising attribute access.  It is controlled by the config option
      MICROPY_PY_DELATTR_SETATTR and is disabled by default.
      18e65691
  9. 03 Feb, 2017 1 commit
  10. 02 Feb, 2017 1 commit
  11. 30 Jan, 2017 2 commits
  12. 27 Jan, 2017 1 commit
    • Damien George's avatar
      extmod: Add generic VFS sub-system. · dcb9ea72
      Damien George authored
      This provides mp_vfs_XXX functions (eg mount, open, listdir) which are
      agnostic to the underlying filesystem type, and just require an object with
      the relevant filesystem-like methods (eg .mount, .open, .listidr) which can
      then be mounted.
      
      These mp_vfs_XXX functions would typically be used by a port to implement
      the "uos" module, and mp_vfs_open would be the builtin open function.
      
      This feature is controlled by MICROPY_VFS, disabled by default.
      dcb9ea72
  13. 22 Jan, 2017 2 commits
  14. 21 Dec, 2016 2 commits
  15. 15 Dec, 2016 1 commit
  16. 14 Dec, 2016 1 commit
  17. 09 Dec, 2016 3 commits
    • Damien George's avatar
      py: Add inline Xtensa assembler. · f76b1bfa
      Damien George authored
      This patch adds the MICROPY_EMIT_INLINE_XTENSA option, which, when
      enabled, allows the @micropython.asm_xtensa decorator to be used.
      
      The following opcodes are currently supported (ax is a register, a0-a15):
      
          ret_n()
          callx0(ax)
          j(label)
          jx(ax)
      
          beqz(ax, label)
          bnez(ax, label)
          mov(ax, ay)
          movi(ax, imm) # imm can be full 32-bit, uses l32r if needed
      
          and_(ax, ay, az)
          or_(ax, ay, az)
          xor(ax, ay, az)
          add(ax, ay, az)
          sub(ax, ay, az)
          mull(ax, ay, az)
      
          l8ui(ax, ay, imm)
          l16ui(ax, ay, imm)
          l32i(ax, ay, imm)
          s8i(ax, ay, imm)
          s16i(ax, ay, imm)
          s32i(ax, ay, imm)
          l16si(ax, ay, imm)
          addi(ax, ay, imm)
      
          ball(ax, ay, label)
          bany(ax, ay, label)
          bbc(ax, ay, label)
          bbs(ax, ay, label)
          beq(ax, ay, label)
          bge(ax, ay, label)
          bgeu(ax, ay, label)
          blt(ax, ay, label)
          bnall(ax, ay, label)
          bne(ax, ay, label)
          bnone(ax, ay, label)
      
      Upon entry to the assembly function the registers a0, a12, a13, a14 are
      pushed to the stack and the stack pointer (a1) decreased by 16.  Upon
      exit, these registers and the stack pointer are restored, and ret.n is
      executed to return to the caller (caller address is in a0).
      
      Note that the ABI for the Xtensa emitters is non-windowing.
      f76b1bfa
    • Damien George's avatar
      py: Allow inline-assembler emitter to be generic. · ad297a19
      Damien George authored
      This patch refactors some code so that it is easier to integrate new
      inline assemblers for different architectures other than ARM Thumb.
      ad297a19
    • Damien George's avatar
      py: Integrate Xtensa assembler into native emitter. · 8e5aced1
      Damien George authored
      The config option MICROPY_EMIT_XTENSA can now be enabled to target the
      Xtensa architecture with @micropython.native and @micropython.viper
      decorators.
      8e5aced1
  18. 20 Nov, 2016 1 commit
  19. 16 Nov, 2016 1 commit
    • Damien George's avatar
      py: Factor out persistent-code reader into separate files. · 6b239c27
      Damien George authored
      Implementations of persistent-code reader are provided for POSIX systems
      and systems using FatFS.  Macros to use these are MICROPY_READER_POSIX and
      MICROPY_READER_FATFS respectively.  If an alternative implementation is
      needed then a port can define the function mp_reader_new_file.
      6b239c27
  20. 03 Nov, 2016 1 commit
  21. 02 Nov, 2016 1 commit
  22. 30 Oct, 2016 1 commit
  23. 14 Oct, 2016 1 commit
  24. 05 Sep, 2016 1 commit
    • Delio Brignoli's avatar
      py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled. · e2ac8bb3
      Delio Brignoli authored
      This new config option allows to control whether MicroPython uses its own
      internal printf or not (if not, an external one should be linked in).
      Accompanying this new option is the inclusion of lib/utils/printf.c in the
      core list of source files, so that ports no longer need to include it
      themselves.
      e2ac8bb3
  25. 01 Sep, 2016 1 commit
  26. 26 Aug, 2016 1 commit
  27. 24 Aug, 2016 1 commit
  28. 07 Aug, 2016 2 commits
  29. 30 Jul, 2016 1 commit
  30. 21 Jul, 2016 2 commits
  31. 20 Jul, 2016 1 commit
    • Paul Sokolovsky's avatar
      py/gc: Implement GC running by allocation threshold. · 93e353e3
      Paul Sokolovsky authored
      Currently, MicroPython runs GC when it could not allocate a block of memory,
      which happens when heap is exhausted. However, that policy can't work well
      with "inifinity" heaps, e.g. backed by a virtual memory - there will be a
      lot of swap thrashing long before VM will be exhausted. Instead, in such
      cases "allocation threshold" policy is used: a GC is run after some number of
      allocations have been made. Details vary, for example, number or total amount
      of allocations can be used, threshold may be self-adjusting based on GC
      outcome, etc.
      
      This change implements a simple variant of such policy for MicroPython. Amount
      of allocated memory so far is used for threshold, to make it useful to typical
      finite-size, and small, heaps as used with MicroPython ports. And such GC policy
      is indeed useful for such types of heaps too, as it allows to better control
      fragmentation. For example, if a threshold is set to half size of heap, then
      for an application which usually makes big number of small allocations, that
      will (try to) keep half of heap memory in a nice defragmented state for an
      occasional large allocation.
      
      For an application which doesn't exhibit such behavior, there won't be any
      visible effects, except for GC running more frequently, which however may
      affect performance. To address this, the GC threshold is configurable, and
      by default is off so far. It's configured with gc.threshold(amount_in_bytes)
      call (can be queries without an argument).
      93e353e3
  32. 02 Jul, 2016 1 commit
  33. 28 Jun, 2016 1 commit