1. 29 Sep, 2014 1 commit
  2. 23 Sep, 2014 1 commit
    • Damien George's avatar
      stmhal: Initialise stack pointer correctly. · eaaebf32
      Damien George authored
      Stack is full descending and must be 8-byte aligned.  It must start off
      pointing to just above the last byte of RAM.
      Previously, stack started pointed to last byte of RAM (eg 0x2001ffff)
      and so was not 8-byte aligned.  This caused a bug in combination with
      This patch also updates some debug printing code.
      Addresses issue #872 (among many other undiscovered issues).
  3. 15 Sep, 2014 1 commit
    • Damien George's avatar
      py: Move definition of mp_sys_exit to core. · b92cbe61
      Damien George authored
      sys.exit always raises SystemExit so doesn't need a special
      implementation for each port.  If C exit() is really needed, use the
      standard os._exit function.
      Also initialise mp_sys_path and mp_sys_argv in teensy port.
  4. 25 Aug, 2014 1 commit
  5. 16 Aug, 2014 1 commit
  6. 10 Aug, 2014 1 commit
  7. 04 Aug, 2014 2 commits
    • Damien George's avatar
      stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc. · ccacdf44
      Damien George authored
      Make a clearer distinction between init functions that must be done
      before any scripts can run (xxx_init0) and those that can be safely
      deferred (xxx_init).
      Fix bug initialising USB VCP exception.  Addresses issue #788.
      Re-order some init function to improve reliability of
    • Damien George's avatar
      Put call to qstr_init and mp_init_emergency_exc_buf in mp_init. · 8dbbbbc7
      Damien George authored
      qstr_init is always called exactly before mp_init, so makes sense to
      just have mp_init call it.  Similarly with
      mp_init_emergency_exception_buf.  Doing this makes the ports simpler and
      less error prone (ie they can no longer forget to call these).
  8. 31 Jul, 2014 1 commit
    • Damien George's avatar
      stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support. · 65dd7bc1
      Damien George authored
      Some important changes to the way the file system is structured on the
      1. 0: and 1: drive names are now replaced with POSIX inspired
      directories, namely /flash and /sd.
      2. Filesystem now supports the notion of a current working directory.
      Supports the standard Python way of manipulating it: os.chdir and
      3. On boot up, current directory is /flash if no SD inserted, else /sd
      if SD inserted.  Then runs boot.py and main.py from the current dir.
      This is the same as the old behaviour, but is much more consistent and
      flexible (eg you can os.chdir in boot.py to change where main.py is run
      4. sys.path (for import) is now set to '' (current dir), plus /flash
      and /flash/lib, and then /sd and /sd/lib if SD inserted.  This, along
      with CWD, means that import now works properly.  You can import a file
      from the current directory.
      5. os.listdir is fixed to return just the basename, not the full path.
      See issue #537 for background and discussion.
  9. 25 Jul, 2014 1 commit
    • Dave Hylands's avatar
      Add support for storing args during an exception raised by an irq. · 5b7fd20f
      Dave Hylands authored
      The user code should call micropython.alloc_emergency_exception_buf(size)
      where size is the size of the buffer used to print the argument
      passed to the exception.
      With the test code from #732, and a call to
      micropython.alloc_emergenncy_exception_buf(100) the following error is
      now printed:
      >>> import heartbeat_irq
      Uncaught exception in Timer(4) interrupt handler
      Traceback (most recent call last):
        File "0://heartbeat_irq.py", line 14, in heartbeat_cb
      NameError: name 'led' is not defined
  10. 20 Jul, 2014 1 commit
  11. 02 Jul, 2014 1 commit
  12. 30 Jun, 2014 2 commits
  13. 28 Jun, 2014 1 commit
  14. 27 Jun, 2014 1 commit
    • Paul Sokolovsky's avatar
      py: Move stack_ctrl_init() to mp_init(). · 8a96ebea
      Paul Sokolovsky authored
      As stack checking is enabled by default, ports which don't call
      stack_ctrl_init() are broken now (report RuntimeError on startup). Save
      them trouble and just init stack control framework in interpreter init.
  15. 26 Jun, 2014 1 commit
  16. 21 Jun, 2014 2 commits
  17. 19 Jun, 2014 1 commit
  18. 14 Jun, 2014 4 commits
  19. 24 May, 2014 1 commit
  20. 10 May, 2014 1 commit
  21. 03 May, 2014 2 commits
  22. 30 Apr, 2014 1 commit
  23. 26 Apr, 2014 1 commit
  24. 21 Apr, 2014 3 commits
    • Damien George's avatar
      stmhal: Make switch a class, to follow suit of all other modules. · 6125ba4a
      Damien George authored
      Instead of pyb.switch() as a function, it's more consistent (with
      respect to all the other modules and peripherals) to have
      pyb.Switch() create a switch object.  This then generalises to having
      multiple switches.  Call the object to get its state.  Use sw.callback
      to set the callback function for when the switch is pressed.
    • Damien George's avatar
      stmhal: Add Timer class: simple TIM control, incl callback on IRQ. · 7fdfa937
      Damien George authored
      Simple but functional timer control.  More sophistication will
      eventually be added, or for now just use direct register access :)
      Also added pyb.freq() function to get MCU clock frequencies.
    • Damien George's avatar
      stmhal: Rename USART to UART. · 75337003
      Damien George authored
      It's really a UART because there is no external clock line (and hence no
      synchronous ability, at least in the implementation of this module).
      USART should be reserved for a module that has "S"ynchronous capabilities.
      Also, UART is shorter and easier to type :)
  25. 19 Apr, 2014 3 commits
  26. 18 Apr, 2014 1 commit
    • Damien George's avatar
      stmhal: Big cleanup; merge gpio into Pin; make names consistent. · c66d86c5
      Damien George authored
      This is an attempt to clean up the Micro Python API on the pyboard.
      Gpio functionality is now in the Pin object, which seems more natural.
      Constants for MODE and PULL are now in pyb.Pin.  Names of some
      classes have been adjusted to conform to CamelCase.  Other
      miscellaneous changes and clean up here and there.
  27. 17 Apr, 2014 2 commits
  28. 16 Apr, 2014 1 commit