1. 30 Mar, 2014 4 commits
  2. 29 Mar, 2014 1 commit
    • Damien George's avatar
      py: Free unique_code slot for outer module. · d1e443d0
      Damien George authored
      Partly (very partly!) addresses issue #386.  Most importantly, at the
      REPL command line, each invocation does not now lead to increased memory
      usage (unless you define a function/lambda).
  3. 27 Mar, 2014 1 commit
  4. 26 Mar, 2014 2 commits
  5. 23 Mar, 2014 1 commit
  6. 18 Feb, 2014 1 commit
    • Dave Hylands's avatar
      Add pin mapping code. · 51dabac0
      Dave Hylands authored
      This commit also introduces board directories and moves board
      specific config into the appropriate board directory.
      boards/stm32f4xx-af.csv was extracted from the STM32F4xx datasheet
      and hand-tweaked.
      make-pins.py takes boards/stm32f4xx-af.csv, boards/stm32f4xx-prefix.c,
      and boards/BOARD-NAME/pins.csv as input and generates the file
      The generated pin file for PYBOARD4 looks like this:
      The generated pins file includes all of the supported alternate
      functions, and includes upsupported alternate functions as comments.
      See the commnet block at the top of stm/pin_map.c for details on
      how to use the pin mapper.
      I also went ahead and modified stm/gpio.c to use the pin mapper.
  7. 15 Feb, 2014 1 commit
    • Damien George's avatar
      Implement proper exception type hierarchy. · c5966128
      Damien George authored
      Each built-in exception is now a type, with base type BaseException.
      C exceptions are created by passing a pointer to the exception type to
      make an instance of.  When raising an exception from the VM, an
      instance is created automatically if an exception type is raised (as
      opposed to an exception instance).
      Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper.
      Handling of parse error changed to match new exceptions.
      mp_const_type renamed to mp_type_type for consistency.
  8. 13 Feb, 2014 1 commit
  9. 04 Feb, 2014 1 commit
    • Paul Sokolovsky's avatar
      Implement support for sys.path when loading modules. · e11b17c2
      Paul Sokolovsky authored
      sys.path is not initialized by rt_init(), that's left for platform-specific
      startup code. (For example, bare metal port may have some hardcoded defaults,
      and let user change sys.path directly; while port for OS with environment
      feature can take path from environment). If it's not explicitly initialized,
      modules will be imported only from a current directory.
  10. 02 Feb, 2014 1 commit
  11. 01 Feb, 2014 1 commit
    • Paul Sokolovsky's avatar
      Implement default function arguments (for Python functions). · 90750029
      Paul Sokolovsky authored
      TODO: Decide if we really need separate bytecode for creating functions
      with default arguments - we would need same for closures, then there're
      keywords arguments too. Having all combinations is a small exponential
      explosion, likely we need just 2 cases - simplest (no defaults, no kw),
      and full - defaults & kw.
  12. 24 Jan, 2014 1 commit
  13. 22 Jan, 2014 1 commit
  14. 18 Jan, 2014 1 commit
    • Damien George's avatar
      Make VM stack grow upwards, and so no reversed args arrays. · 20006dbb
      Damien George authored
      Change state layout in VM so the stack starts at state[0] and grows
      upwards.  Locals are at the top end of the state and number downwards.
      This cleans up a lot of the interface connecting the VM to C: now all
      functions that take an array of Micro Python objects are in order (ie no
      longer in reverse).
      Also clean up C API with keyword arguments (call_n and call_n_kw
      replaced with single call method that takes keyword arguments).  And now
      make_new takes keyword arguments.
      emitnative.c has not yet been changed to comply with the new order of
      stack layout.
  15. 13 Jan, 2014 1 commit
  16. 11 Jan, 2014 1 commit
  17. 04 Jan, 2014 1 commit
    • Damien George's avatar
      Split qstr into pools, and put initial pool in ROM. · eb7bfcb2
      Damien George authored
      Qstr's are now split into a linked-list of qstr pools.  This has 2
      benefits: the first pool can be in ROM (huge benefit, since we no longer
      use RAM for the core qstrs), and subsequent pools use m_new for the next
      pool instead of m_renew (thus avoiding a huge single table for all the
      Still would be better to use a hash table, but this scheme takes us part
      of the way (eventually convert the pools to hash tables).
      Also fixed bug with import.
      Also improved the way the module code is referenced (not magic number 1
  18. 03 Jan, 2014 1 commit
    • Damien George's avatar
      Basic implementation of import. · 66028ab6
      Damien George authored
      import works for simple cases.  Still work to do on finding the right
      script, and setting globals/locals correctly when running an imported
  19. 21 Dec, 2013 1 commit
    • Damien's avatar
      Change object representation from 1 big union to individual structs. · d99b0528
      Damien authored
      A big change.  Micro Python objects are allocated as individual structs
      with the first element being a pointer to the type information (which
      is itself an object).  This scheme follows CPython.  Much more flexible,
      not necessarily slower, uses same heap memory, and can allocate objects
      Also change name prefix, from py_ to mp_ (mp for Micro Python).
  20. 17 Dec, 2013 2 commits
  21. 11 Dec, 2013 1 commit
  22. 10 Dec, 2013 1 commit
  23. 26 Nov, 2013 1 commit
  24. 03 Nov, 2013 2 commits
  25. 02 Nov, 2013 4 commits
  26. 24 Oct, 2013 1 commit
  27. 23 Oct, 2013 2 commits
  28. 22 Oct, 2013 2 commits
  29. 19 Oct, 2013 1 commit