- 25 Jul, 2014 1 commit
-
-
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: ```python >>> 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 ```
-
- 19 Jul, 2014 1 commit
-
-
Damien George authored
With unicode enabled, this patch allows reading a fixed number of characters from text-mode streams; eg file.read(5) will read 5 unicode chars, which can made of more than 5 bytes. For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If there are lots of non-ASCII chars in a stream, then it needs multiple reads of the underlying object. Adds a new test for this case. Enables unicode support by default on unix and stmhal ports.
-
- 03 Jul, 2014 1 commit
-
-
Damien George authored
See discussion in issue #50.
-
- 28 Jun, 2014 1 commit
-
-
Damien George authored
Unicode is disabled by default for now, since FileIO.read(n) is currently not implemented for text-mode files, and this is an often function.
-
- 16 Jun, 2014 1 commit
-
-
Dave Hylands authored
Refactored some stmhal files which are shared with teensy.
-
- 11 Jun, 2014 1 commit
-
-
Damien George authored
Also now returns correct POSIX errno when an IO operation fails. Addresses issues #516 and #676.
-
- 08 Jun, 2014 1 commit
-
-
Damien George authored
-
- 01 Jun, 2014 1 commit
-
-
Damien George authored
This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion.
-
- 24 May, 2014 1 commit
-
-
Damien George authored
Now of the form MICROPY_PY_*. See issue #35.
-
- 21 May, 2014 1 commit
-
-
Damien George authored
MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
-
- 11 May, 2014 2 commits
-
-
Damien George authored
For consistency with MICROPY_MOD_SYS_STDFILES, etc.
-
Damien George authored
-
- 10 May, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 03 May, 2014 3 commits
-
-
Damien George authored
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/.
-
Damien George authored
-
Damien George authored
Make include dependencies neater, and adheres to the coding convention that headers should not include headers.
-
- 17 Apr, 2014 1 commit
-
-
Damien George authored
On stmhal, computed gotos make the binary about 1k bigger, but makes it run faster, and we have the room, so why not. All tests pass on pyboard using computed gotos.
-
- 13 Apr, 2014 2 commits
-
-
Damien George authored
Available via sys.std{in,out,err}. Basic reading and writing supported. Even sys.stdin.readline!
-
Damien George authored
Should address issue #475.
-
- 10 Apr, 2014 1 commit
-
-
Damien George authored
Also contains raw memory read/write functions, read8, read16, read32, write8, write16, write32. Can now do: stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13) This turns on the red LED. With the new constant folding, the above constants for the GPIO address are actually compiled to constants (and the addition done) at compile time. For viper code and inline assembler, this optimisation will make a big difference. In the inline assembler, using these constants would not be possible without this constant folding.
-
- 05 Apr, 2014 2 commits
-
-
Damien George authored
Finishes addressing issue #424. In the end this was a very neat refactor that now makes things a lot more consistent across the py code base. It allowed some simplifications in certain places, now that everything is a dict object. Also converted builtins tables to dictionaries. This will be useful when we need to turn builtins into a proper module.
-
Damien George authored
-
- 25 Mar, 2014 1 commit
-
-
Damien George authored
Comes with some refactoring of code and renaming of files. All modules are now named mod*.[ch].
-
- 24 Mar, 2014 1 commit
-
-
Damien George authored
-
- 22 Mar, 2014 1 commit
-
-
Damien George authored
-
- 17 Mar, 2014 1 commit
-
-
Damien George authored
-
- 15 Mar, 2014 1 commit
-
-
Damien George authored
Either not needed anymore, or defined in the board/_hal_conf.h file.
-
- 14 Mar, 2014 1 commit
-
-
Dave Hylands authored
Tweaked a couple of the USB files to compile if neither dev nor host was defined. Tested on netduiono plus 2 and stm32f4discovery boards
-
- 13 Mar, 2014 1 commit
-
-
Dave Hylands authored
-
- 10 Mar, 2014 2 commits
-
-
Damien George authored
MICROPY_ENABLE_FLOAT is automatically set in mpconfig.h if MICROPY_FLOAT_IMPL is set to a non-zero value.
-
Dave Hylands authored
-
- 08 Mar, 2014 1 commit
-
-
Damien George authored
mp_module_obj_t can now be put in ROM. Configuration of float type is now similar to longint: can now choose none, float or double as the implementation. math module has basic math functions. For STM port, these are not yet implemented (they are just stub functions).
-
- 22 Feb, 2014 2 commits
-
-
mux authored
-
Damien George authored
Some functionality is still missing (eg and, or, bit shift), and some things are buggy (eg subtract).
-
- 18 Feb, 2014 1 commit
-
-
Dave Hylands authored
This commit also introduces board directories and moves board specific config into the appropriate board directory. boards/stm32f4xx-af.csv was extracted from the STM32F4xx datasheet and hand-tweaked. make-pins.py takes boards/stm32f4xx-af.csv, boards/stm32f4xx-prefix.c, and boards/BOARD-NAME/pins.csv as input and generates the file build/pins_BOARD_NAME.c The generated pin file for PYBOARD4 looks like this: https://gist.github.com/dhylands/9063231 The generated pins file includes all of the supported alternate functions, and includes upsupported alternate functions as comments. See the commnet block at the top of stm/pin_map.c for details on how to use the pin mapper. I also went ahead and modified stm/gpio.c to use the pin mapper.
-
- 11 Feb, 2014 2 commits
-
-
Damien George authored
For some reason, STM port, while it's 32 bit, needs %lu and %ld for printing machine_uint_t and machine_int_t.
-
Paul Sokolovsky authored
Note: none of these functions are used by STM port, so they're provided to have parity with pre gc refactor status quo, and in case they will be needed in the future by some extension writers.
-
- 06 Feb, 2014 1 commit
-
-
Damien George authored
-
- 04 Feb, 2014 1 commit
-
-
Dave Hylands authored
This also fixes up the IRQ for the PYBOARD4 USERSW although I was unable to test that functionality.
-
- 26 Jan, 2014 1 commit
-
-
Damien George authored
-