1. 01 Apr, 2017 1 commit
  2. 31 Mar, 2017 3 commits
  3. 30 Mar, 2017 7 commits
  4. 29 Mar, 2017 3 commits
  5. 28 Mar, 2017 5 commits
  6. 24 Mar, 2017 1 commit
    • Damien George's avatar
      py/modbuiltins: For round() builtin use nearbyint instead of round. · 125eae1b
      Damien George authored
      The C nearbyint function has exactly the semantics that Python's round()
      requires, whereas C's round() requires extra steps to handle rounding of
      numbers half way between integers.  So using nearbyint reduces code size
      and potentially eliminates any source of errors in the handling of half-way
      Also, bare-metal implementations of nearbyint can be more efficient than
      round, so further code size is saved (and efficiency improved).
      nearbyint is provided in the C99 standard so it should be available on all
      supported platforms.
  7. 23 Mar, 2017 1 commit
  8. 22 Mar, 2017 3 commits
  9. 20 Mar, 2017 2 commits
    • Damien George's avatar
      stmhal/pendsv: Disable interrupts during a thread switch. · ebbaf7ee
      Damien George authored
      We can actually handle interrupts during a thread switch (because we always
      have a valid stack), but only if those interrupts don't access any of the
      thread state (because the state may not correspond to the stack pointer).
      So to be on the safe side we disable interrupts during the very short
      period of the thread state+stack switch.
    • Damien George's avatar
      stmhal: Enable micropython.schedule(). · a5159edc
      Damien George authored
      ExtInt, Timer and CAN IRQ callbacks are made to work with the scheduler.
      They are still hard IRQs by default, but one can now call
      micropython.schedule within the hard IRQ to schedule a soft callback.
  10. 10 Mar, 2017 3 commits
  11. 02 Mar, 2017 4 commits
  12. 17 Feb, 2017 1 commit
  13. 16 Feb, 2017 1 commit
    • Damien George's avatar
      py: Add iter_buf to getiter type method. · ae8d8675
      Damien George authored
      Allows to iterate over the following without allocating on the heap:
      - tuple
      - list
      - string, bytes
      - bytearray, array
      - dict (not dict.keys, dict.values, dict.items)
      - set, frozenset
      Allows to call the following without heap memory:
      - all, any, min, max, sum
      TODO: still need to allocate stack memory in bytecode for iter_buf.
  14. 15 Feb, 2017 2 commits
  15. 13 Feb, 2017 1 commit
  16. 08 Feb, 2017 1 commit
    • Damien George's avatar
      stmhal/Makefile: Drop use of -mabi=aapcs-linux; link libgcc by default. · 7ae9bee7
      Damien George authored
      The aapcs-linux ABI is not required, instead the default aapcs ABI is
      enough.  And using the default ABI means that the provided libgcc will now
      link with the firmware without warnings about variable vs fixed enums.
      Although the binary size increases by about 1k, RAM usage is slightly
      decreased.  And libgcc may prove useful in the future for things like
      long-long division.
  17. 07 Feb, 2017 1 commit