summaryrefslogtreecommitdiff
path: root/stmhal/pyexec.c
AgeCommit message (Collapse)Author
2014-10-26stmhal: Improve REPL control codes; improve pyboard.py script.Damien George
Improvements are: 2 ctrl-C's are now needed to truly kill running script on pyboard, so make CDC interface allow multiple ctrl-C's through at once (ie sending b'\x03\x03' to pyboard now counts as 2 ctrl-C's). ctrl-C in friendly-repl can now stop multi-line input. In raw-repl mode, use ctrl-D to indicate end of running script, and also end of any error message. Thus, output of raw-repl is always at least 2 ctrl-D's and it's much easier to parse. pyboard.py is now a bit faster, handles exceptions from pyboard better (prints them and exits with exit code 1), prints out the pyboard output while the script is running (instead of waiting till the end), and allows to follow the output of a previous script when run with no arguments.
2014-10-22stmhal: Don't return SystemExit value from parse_compile_execute.Damien George
There is no need, since we don't (currently) use the value.
2014-10-22Add pyb.hard_reset, and make sys.exit() or raise SystemExit do a soft reset.Dave Hylands
2014-10-05stmhal: Use mp_uint_t where appropriate.Damien George
Found these by compiling stmhal with mp_uint_t of type uint32_t instead of unsigned int. This actually makes a difference to the code, but just a curiosity.
2014-10-05py: Make compiler return a proper exception on SyntaxError.Damien George
2014-09-23py: Free non-interned strings in the parser when not needed.Damien George
mp_parse_node_free now frees the memory associated with non-interned strings. And the parser calls mp_parse_node_free when discarding a non-used node (such as a doc string). Also, the compiler now frees the parse tree explicitly just before it exits (as opposed to relying on the caller to do this). Addresses issue #708 as best we can.
2014-07-20stmhal: Fix REPL printing by cooking output sent to stdout_obj.Damien George
Recent changes to builtin print meant that print was printing to the mp_sys_stdout_obj, which was sending data raw to the USB CDC device. The data should be cooked so that \n turns into \r\n.
2014-07-02Merge branch 'teensy-new' of github.com:dhylands/micropython into ↵Damien George
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.
2014-06-27Change MCU name config micromux
2014-06-19Add MICROPY_HW_MICRO_NAME to boards configmux
2014-06-15Updated teensy to build.Dave Hylands
Refactored some stmhal files which are shared with teensy.
2014-05-10stmhal: Improve handling of out-of-memory in REPL.Damien George
Addresses issue #558, but it's likely that other out-of-memory errors could crash the pyboard. Reason is that qstrs use m_new and can raise an exception within the parser.
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-05-03Don't print git hash as well as git tag in banner.v1.0Damien George
2014-05-03py: Print tag/version/git describe in uPy banner.Damien George
2014-05-03stmhal: Remove #include <stdint.h> from mpconfigport.h.Damien George
Make include dependencies neater, and adheres to the coding convention that headers should not include headers.
2014-05-02unix,stmhal: Make "mpconfig.h" be first included, as other headers depend on it.Paul Sokolovsky
2014-04-17build: Simplify build directory layout by putting all headers in genhdr.Damien George
Any generated headers go in $(BUILD)/genhdr/, and are #included as 'genhdr/xxx.h'.
2014-04-16stmhal: Improve flash storage cache management.Damien George
Internal flash used for the filesystem is now written (from the cache) only after a 5s delay, or when a file is closed, or when the drive is unmounted from the host. This delay means that multiple writes can accumulate in the cache, and leads to less writes to the flash, making it last longer. It's implemented by a high-priority interrupt that takes care of flash erase and write, and flushing the cache. This is still only an interim solution for the flash filesystem. It eventually needs to be replaced with something that uses less RAM for the cache, something that can use more of the flash, and something that does proper wear levelling.
2014-04-08Improve REPL detecting when input needs to continue.Damien George
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.
2014-04-06py: Add option to compiler to specify default code emitter.Damien George
Also add command line option to unix port to select emitter.
2014-04-03Add the git version to the bannerDave Hylands
2014-04-03stmhal: Fix raw REPL so that it passes through more ASCII chars.Damien George
2014-03-30Rename rt_* to mp_*.Damien George
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.
2014-03-29stmhal: Factor out stdio and readline to separate files.Damien George
Adds readline_init() to clear readline history on soft reset. Addresses issue #387.
2014-03-24stmhal: Improve REPL CTRL commands.Damien George
2014-03-17stmhal: Add fatfs support, working with flash and SD card.Damien George
2014-03-15Add vstr_ins and vstr_cut_out; improve stmhal readline.Damien George
2014-03-15stmhal: Fix escape sequences in USB CDC input.Damien George
2014-03-15stmhal: Get USB CDC REPL working.Damien George
New USB HAL is quite a bit improved over previous one. Now has better callbacks and flow control. REPL over USB CDC now works as before, except for soft-reset (since USB driver uses malloc...).
2014-03-13stmhal - More systick cleanup. Fix HAL_DelayDave Hylands
2014-03-12REPl working on UART6 with STMHALDave Hylands