summaryrefslogtreecommitdiffstatshomepage
path: root/teensy/main.c
Commit message (Collapse)AuthorAge
* stmhal: Make pybstdio usable by other ports, and use it.Damien George2015-02-13
| | | | | Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
* py: Change vstr_null_terminate -> vstr_null_terminated_str, returns str.Damien George2015-01-29
|
* py: Change vstr so that it doesn't null terminate buffer by default.Damien George2015-01-28
| | | | | | | | | This cleans up vstr so that it's a pure "variable buffer", and the user can decide whether they need to add a terminating null byte. In most places where vstr is used, the vstr did not need to be null terminated and so this patch saves code size, a tiny bit of RAM, and makes vstr usage more efficient. When null termination is needed it must be done explicitly using vstr_null_terminate.
* py: Put all global state together in state structures.Damien George2015-01-07
| | | | | | This patch consolidates all global variables in py/ core into one place, in a global structure. Root pointers are all located together to make GC tracing easier and more efficient.
* teensy: Prefix includes with py/; remove need for -I../py.Damien George2015-01-01
|
* teensy: Enable 8-byte stack alignment for IRQ Handlers.Dave Hylands2014-09-28
|
* py: Move definition of mp_sys_exit to core.Damien George2014-09-15
| | | | | | | | 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.
* Add support for selecting pin alternate functions from python.Dave Hylands2014-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converts generted pins to use qstrs instead of string pointers. This patch also adds the following functions: pyb.Pin.names() pyb.Pin.af_list() pyb.Pin.gpio() dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results. pyb.Pin now takes kw args. pyb.Pin.__str__ now prints more useful information about the pin configuration. I found the following functions in my boot.py to be useful: ```python def pins(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin))) def af(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin.af_list()))) ```
* Follow rename of readline_init to readline_init0 on teensyDave Hylands2014-08-04
|
* Put call to qstr_init and mp_init_emergency_exc_buf in mp_init.Damien George2014-08-04
| | | | | | | 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).
* Fix teensy to work with the latest tree.Dave Hylands2014-08-02
|
* Add core files and use same toolchain as stmhalDave Hylands2014-07-14
|
* Fix teensy to build on latest tree.Dave Hylands2014-07-14
| | | | | Put #include of mpconfig.h before misc.h Replace uses of ARRAY_SIZE with MP_ARRAY_SIZE
* Rename machine_(u)int_t to mp_(u)int_t.Damien George2014-07-03
| | | | See discussion in issue #50.
* Merge branch 'teensy-new' of github.com:dhylands/micropython into ↵Damien George2014-07-02
|\ | | | | | | | | | | | | | | | | | | | | | | dhylands-teensy-new Conflicts: stmhal/pin_named_pins.c stmhal/readline.c Renamed HAL_H to MICROPY_HAL_H. Made stmhal/mphal.h which intends to define the generic Micro Python HAL, which in stmhal sits above the ST HAL.
| * Updated teensy to build.Dave Hylands2014-06-15
|/ | | | Refactored some stmhal files which are shared with teensy.
* Improve REPL detecting when input needs to continue.Damien George2014-04-08
| | | | | | | | Full CPython compatibility with this requires actually parsing the input so far collected, and if it fails parsing due to lack of tokens, then continue collecting input. It's not worth doing it this way. Not having compatibility at this level does not hurt the goals of Micro Python.
* Add uPy welcome message to UNIX and Windows ports; update Teensy port.Damien George2014-04-07
| | | | Partly addresses issue #154.
* py: Add option to compiler to specify default code emitter.Damien George2014-04-06
| | | | Also add command line option to unix port to select emitter.
* py: Change nlr_jump to nlr_raise, to aid in debugging.Damien George2014-04-05
| | | | | | This does not affect code size or performance when debugging turned off. To address issue #420.
* Rename rt_* to mp_*.Damien George2014-03-30
| | | | | | | Mostly just a global search and replace. Except rt_is_true which becomes mp_obj_is_true. Still would like to tidy up some of the names, but this will do for now.
* Implement proper exception type hierarchy.Damien George2014-02-15
| | | | | | | | | | | | | | 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.
* Remove mp_obj_new_exception_msg_1_arg and _2_arg.Damien George2014-02-12
|
* Updated teensy to work with latest on masterDave Hylands2014-02-10
| | | | Added analogRead, analogWriteXxx and servo support for teensy.
* Add source file name and line number to error messages.Damien George2014-01-18
| | | | | Byte code has a map from byte-code offset to source-code line number, used to give better error messages.
* Added memzip filesystem support for teensyDave Hylands2014-01-11
| | | | | | | | | | | | | | You can now append a zipfile (containining uncomressed python sources) to the micropython.hex file. Use MEMZIP_DIR=directory when you call make, or set that in your environment to include a different tree of source files. Added sample /boot.py, /src/main.py, /test.py and /src/test.py files. Added run command so that you can execute scripts from REPL (until import is implemented). Added build directory to .gitignore
* Update teemsy/Makefile to use py.mkDave Hylands2014-01-08
| | | | I also fixed main.c to compile with the new str lexer
* Move lexerstr to main py directory (everyone uses it).Damien George2014-01-08
|
* Updated teensy to use common code from stm directory.Dave Hylands2014-01-08
| | | | Updated mconfigport.h to enable GC
* Initial support for Teensy 3.1Dave Hylands2014-01-06