summaryrefslogtreecommitdiffstatshomepage
path: root/teensy
Commit message (Collapse)AuthorAge
* ports: Make new ports/ sub-directory and move all ports there.Damien George2017-09-06
| | | | | | This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
* all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George2017-08-30
| | | | This is to have consistency across the whole repository.
* all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George2017-08-21
|
* all: Raise exceptions via mp_raise_XXXJavier Candeira2017-08-13
| | | | | | | | - Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
* all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George2017-08-11
| | | | | $(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* all: Unify header guard usage.Alexander Steffen2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
* docs,teensy: Use the name MicroPython consistently in documentationAlexander Steffen2017-07-15
|
* teensy/Makefile: Include relevant sources in list for qstr extraction.Damien George2017-06-15
|
* stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.Damien George2017-06-15
| | | | | It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based on mp_hal functions.
* teensy: Provide dummy implementation of extint_register_pin.Damien George2017-06-15
|
* ports: Convert from using stmhal's input() to core provided version.Damien George2017-06-01
|
* all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George2017-04-01
| | | | | It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
* all: Use full path name when including mp-readline/timeutils/netutils.Damien George2017-03-31
| | | | | | | This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
* all/Makefile: Remove -ansi from GCC flags, its ignored anyway.Krzysztof Blazewicz2017-03-23
| | | | | | The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
* teensy/lexerfrozen: Make mp_lexer_new_from_file raise an exception.Damien George2017-03-14
|
* teensy/main: Remove unnecessary header includes.Damien George2017-02-17
|
* teensy: Convert to use builtin help function.Damien George2017-01-22
|
* all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky2017-01-04
| | | | | Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
* py/lexer: Provide generic mp_lexer_new_from_file based on mp_reader.Damien George2016-11-16
| | | | | | If a port defines MICROPY_READER_POSIX or MICROPY_READER_FATFS then lexer.c now provides an implementation of mp_lexer_new_from_file using the mp_reader_new_file function.
* py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.Damien George2016-10-21
| | | | | | | In order to have more fine-grained control over how builtin functions are constructed, the MP_DECLARE_CONST_FUN_OBJ macros are made more specific, with suffix of _0, _1, _2, _3, _VAR, _VAR_BETEEN or _KW. These names now match the MP_DEFINE_CONST_FUN_OBJ macros.
* teensy: Update to provide new mp_hal_pin_XXX functions following stmhal.Damien George2016-10-18
|
* py/vstr: Combine vstr_new_size with vstr_new since they are rarely used.Damien George2016-10-14
| | | | | | | Now there is just one function to allocate a new vstr, namely vstr_new (in addition to vstr_init etc). The caller of this function should know what initial size to allocate for the buffer, or at least have some policy or config option, instead of leaving it to a default (as it was before).
* all: Remove 'name' member from mp_obj_module_t struct.Damien George2016-09-22
| | | | One can instead lookup __name__ in the modules dict to get the value.
* Updated FROZEN_DIR support as per f28efa19713977a61395b19fec1fe501aeee4c0eDave Hylands2016-09-17
|
* py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled.Delio Brignoli2016-09-05
| | | | | | | | 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.
* teensy: Fix execution of frozen boot.py and main.pyDave Hylands2016-08-22
|
* ports: Remove typedef of machine_ptr_t, it's no longer needed.Damien George2016-08-15
| | | | | | This type was used only for the typedef of mp_obj_t, which is now defined by the object representation. So we can now remove this unused typedef, to simplify the mpconfigport.h file.
* cc3200, teensy: Remove broken malloc/free/realloc macro helpers.Damien George2016-08-02
| | | | | | These macros are broken and are anyway unused on these two ports. If they are ever needed in the future then their implementation can be taken from either stmhal (working macros in mpconfigport.h) or esp8266 (functions).
* teensy: Update the README with OSX specific information and tips.Georgia Reh2016-06-06
|
* cc3200, stmhal, teensy: Use pyhelp_print_obj function.Colin Hogben2016-04-25
| | | | | Update the help() implementations in the cc3200, stmhal and teensy ports to use the pyhelp_print_obj function.
* py: Add rules for automated extraction of qstrs from sources.Jan Čapek2016-04-16
| | | | | | | | | | | | | | | | | | | | | - add template rule that converts a specified source file into a qstring file - add special rule for generating a central header that contains all extracted/autogenerated strings - defined by QSTR_DEFS_COLLECTED variable. Each platform appends a list of sources that may contain qstrings into a new build variable: SRC_QSTR. Any autogenerated prerequisities are should be appened to SRC_QSTR_AUTO_DEPS variable. - remove most qstrings from py/qstrdefs, keep only qstrings that contain special characters - these cannot be easily detected in the sources without additional annotations - remove most manual qstrdefs, use qstrdef autogen for: py, cc3200, stmhal, teensy, unix, windows, pic16bit: - remove all micropython generic qstrdefs except for the special strings that contain special characters (e.g. /,+,<,> etc.) - remove all port specific qstrdefs except for special strings - append sources for qstr generation in platform makefiles (SRC_QSTR)
* py: Declare help, input, open builtins in core.Paul Sokolovsky2016-04-15
| | | | These are *defined* per-port, but why redeclare them again and again.
* py: Add ability to have frozen persistent bytecode from .mpy files.Damien George2016-04-13
| | | | | | | The config variable MICROPY_MODULE_FROZEN is now made of two separate parts: MICROPY_MODULE_FROZEN_STR and MICROPY_MODULE_FROZEN_MPY. This allows to have none, either or both of frozen strings and frozen mpy files (aka frozen bytecode).
* py/runtime: mp_stack_ctrl_init() should be called immediately on startup.Paul Sokolovsky2016-01-29
| | | | | | | | | Calling it from mp_init() is too late for some ports (like Unix), and leads to incomplete stack frame being captured, with following GC issues. So, now each port should call mp_stack_ctrl_init() on its own, ASAP after startup, and taking special precautions so it really was called before stack variables get allocated (because if such variable with a pointer is missed, it may lead to over-collecting (typical symptom is segfaulting)).
* py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George2016-01-11
| | | | | | | | The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
* lib/utils: Add pyexec_frozen_module to load and execute frozen module.Damien George2015-12-26
| | | | | | This is a convenience function similar to pyexec_file. It should be used instead of raw mp_parse_compile_execute because the latter does not catch and report exceptions.
* stmhal: uart.any() function now returns number of bytes available.Ryan Shaw2015-11-30
|
* lib/utils/printf: Move from stmhal/ .Paul Sokolovsky2015-11-10
| | | | | This file contains various MicroPython-specific helper functions, so isn't good fit for lib/libc/.
* lib/pyexec: Move header pyexec.h from stmhal directory.Damien George2015-11-09
|
* teensy: Switch over to using frozen modules instead of memzipDave Hylands2015-11-04
| | | | | | | | | I left memzip in for the time being, so you can choose in the Makefile whether to USE_FROZEN or USE_MEMZIP. It looks like using frozen saves about 2472 bytes (using my set of 15 python files), mostly due to overheads in the zip file format.
* lib/memzip: Factor out memzip from teensy/ into lib/memzip.Dave Hylands2015-11-04
|
* stmhal: pyexec.c is common module, move to lib/utils/ .Paul Sokolovsky2015-10-31
|
* all: Add py/mphal.h and use it in all ports.Damien George2015-10-31
| | | | | | py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
* teensy: Switch from HAL_* to mp_hal_* functions.Paul Sokolovsky2015-10-29
|
* Makefiles: Remove duplicate object files when linking.Paul Sokolovsky2015-10-24
| | | | | | | | | | | Scenario: module1 depends on some common file from lib/, so specifies it in its SRC_MOD, and the same situation with module2, then common file from lib/ eventually ends up listed twice in $(OBJ), which leads to link errors. Make is equipped to deal with such situation easily, quoting the manual: "The value of $^ omits duplicate prerequisites, while $+ retains them and preserves their order." So, just use $^ consistently in all link targets.
* teensy: Update to compile with latest changes to stmhal Pin class.Damien George2015-10-19
|
* all: Make netutils.h available to all ports by default.Paul Sokolovsky2015-10-19
| | | | | Generally, ports should inherit INC from py.mk, append to it, not overwrite it. TODO: Likely should do the same for other vars too.
* Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.Damien George2015-10-12
|
* py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.Paul Sokolovsky2015-10-11
|