Paul Sokolovsky
ef23399e32
extmod/modutimeq: Copy of current moduheapq with timeq support for refactoring.
8 years ago
Rami Ali
1731868ae7
tests: Add tests to improve coverage of objarray.c.
8 years ago
Rami Ali
531c206e8b
tests: Add tests to improve coverage of runtime.c.
8 years ago
Damien George
46a6592f9a
py/emitglue: Refactor to remove assert(0), to improve coverage.
8 years ago
Damien George
e4af712125
py/objint: Rename mp_obj_int_as_float to mp_obj_int_as_float_impl.
And also simplify it to remove the check for small int. This can be done
because this function is only ever called if the argument is not a small
int.
8 years ago
Damien George
67f3edc10a
tests/import: Add a test which uses ... in from-import statement.
8 years ago
Paul Sokolovsky
9af73bda33
esp8266: Force relinking OTA firmware image if built after normal one.
8 years ago
Paul Sokolovsky
c1e94b77a4
esp8266/modesp: flash_user_start(): Support configuration with yaota8266.
It's pretty rough way to detect yaota8266 being used, but otherwise allows
to have a filesystem in such config.
8 years ago
Rami Ali
5d06a74303
tests/basics: Improve test coverage for generators.
8 years ago
Damien George
1e7a801e2d
tests/run-tests: For REPL tests make sure the REPL is exited at the end.
8 years ago
Damien George
7bbce4e213
tests/basics/set_pop: Improve coverage of set functions.
8 years ago
Damien George
b470f59892
tests/basics: Add test for builtin locals().
8 years ago
Damien George
d291007fea
tests/basics/builtin_dir: Add test for dir() of a type.
8 years ago
Damien George
49bf7617d0
tests/float/builtin_float_round: Test round() with second arg.
8 years ago
Damien George
7318949c46
py/modbuiltins: Remove unreachable code.
8 years ago
Damien George
0d32f1aeb3
esp8266: When doing GC be sure to trace the memory holding native code.
Native code can hold pointers to objects on the heap, eg constant objects
like big integers.
8 years ago
Rami Ali
5e1ccddc82
tests/basics: Improve mpz test coverage.
8 years ago
Paul Sokolovsky
91359c8690
tests/struct*: Make skippable.
8 years ago
Damien George
de9cd00b39
py/compile: Add an extra pass for Xtensa inline assembler.
It needs an extra pass to compute the size of the constant table for the
l32r instructions.
8 years ago
Paul Sokolovsky
bbd0d27a25
zephyr: Enable slice subscription.
Required for the testsuite.
8 years ago
Paul Sokolovsky
56a514c193
zephyr/uart_core: Access console UART directly instead of printk() hack.
This is required to avoid extra level of output "cooking" ("\r\r\n") and
make test infrastructure work. On the other hand, this breaks somewhat
Zephyr console abstraction.
8 years ago
Paul Sokolovsky
0c59c30fde
zephyr: Use core-provided keyboard exception object.
8 years ago
Paul Sokolovsky
724b82559d
zephyr/main: Initialize sys.path and sys.argv.
8 years ago
Mike Causer
87e426c7c7
esp8266: Add "erase" target to Makefile, to erase entire flash.
8 years ago
Damien George
48d81c6900
esp8266: Use core-provided keyboard exception object.
8 years ago
Damien George
a770ba147e
stmhal: Use core-provided keyboard exception object.
8 years ago
Damien George
d89cafd5c3
lib/utils/interrupt_char: Use core-provided mp_kbd_exception if enabled.
Ultimately all ports that use lib/utils/interrupt_char would enable
MICROPY_KBD_EXCEPTION, so this is an interim solution.
8 years ago
Damien George
7f1da0a03b
py: Add MICROPY_KBD_EXCEPTION config option to provide mp_kbd_exception.
Defining and initialising mp_kbd_exception is boiler-plate code and so the
core runtime can provide it, instead of each port needing to do it
themselves.
The exception object is placed in the VM state rather than on the heap.
8 years ago
Damien George
979ab4e126
stmhal/usb: Always use the mp_kbd_exception object for VCP interrupt.
There's no need to store a separate pointer to this object.
8 years ago
Damien George
f254cfd3c4
stmhal: Rename mp_const_vcp_interrupt to mp_kbd_exception.
mp_kbd_exception is now considered the standard variable name to hold the
singleton KeyboardInterrupt exception.
This patch also moves the creation of this object from pyb_usb_init() to
main().
8 years ago
Damien George
29b5879613
tools/pyboard.py: Refactor so target is not reset between scripts/cmd.
Previous to this patch pyboard.py would open a new serial connection to
the target for each script that was run, and for any command that was run.
Apart from being inefficient, this meant that the board was soft-reset
between scripts/commands, which precludes scripts from accessing variables
set in a previous one.
This patch changes the behaviour of pyboard.py so that the connection to
the target is created only once, and it's not reset between scripts or any
command that is sent with the -c option.
8 years ago
Damien George
1b02565316
stmhal/mpconfigport: Add weak-module links for io, collections, random.
8 years ago
Damien George
7081ea4119
tests/micropython: Get heapalloc_traceback test running on baremetal.
When printing exceptions from files sent to a target by pyboard.py the
filename in the exception is <stdin>, which differs to when running the
script on the PC. So we strip out the filename to make the outputs the
same on all targets (see also misc/print_exception.py test).
8 years ago
Lorenz Schmid
a5b3c7e7f9
docs/library/pyb.UART: Moved writechar doc to sit with other writes.
8 years ago
Lorenz Schmid
0caac94b98
docs/library/pyb.UART: Added clarification about timeouts.
8 years ago
Paul Sokolovsky
c16e7eae5e
zephyr: Implement soft reset feature.
8 years ago
Paul Sokolovsky
95fe7a40b3
zephyr: Support raw REPL.
8 years ago
Paul Sokolovsky
403c93053e
py/mpconfig.h: Enable MICROPY_PY_SYS_EXIT by default.
sys.exit() is an important function to terminate a program. In particular,
the testsuite relies on it to skip tests (i.e. any other functionality may
be disabled, but sys.exit() is required to at least report that properly).
8 years ago
Paul Sokolovsky
ee7ad7e8be
esp8266: Add "ota" target to produce firmware binary for use with yaota8266.
https://github.com/pfalcon/yaota8266 is a (WIP) OTA-enabled bootloader
which doesn't require reserving space 2x size of a firmware.
8 years ago
Damien George
e8f2db7da3
py/runtime: Zero out fs_user_mount array in mp_init.
There's no need to force ports to copy-and-paste this initialisation
code. If FSUSERMOUNT is enabled then this zeroing out must be done.
8 years ago
Damien George
e83f140463
py/mpz: Remove unreachable code in mpn_or_neg functions.
8 years ago
Rami Ali
9112b0b62b
tests/extmod: Improve modframebuf test coverage.
8 years ago
Damien George
0f408bc1ff
stmhal: Move PY_SYS_PLATFORM config from board to general config file.
It can be overridden by a board if needed.
8 years ago
Rami Ali
8001918a89
stmhal: Add STM32F769DISC board files.
With minor changes to adc.c and storage.c to support the F769.
8 years ago
Rami Ali
3dd04dee3e
stmhal/cmsis: Add CMSIS file stm32f769xx.h, V1.1.2.
8 years ago
Rami Ali
e9fbc555fc
stmhal: Add NUCLEO_F767ZI board, with openocd config for stm32f7.
8 years ago
Rami Ali
517f347f6f
stmhal/cmsis: Add CMSIS file stm32f767xx.h, V1.1.2.
8 years ago
Damien George
d9047d3c8a
py/builtinimport: Support importing packages from compiled .mpy files.
This patch ensures that __init__.mpy files are imported if their
containing directory is imported as a package.
8 years ago
Rami Ali
d22762017e
tests/extmod: Improve moductypes test coverage.
8 years ago
Damien George
a3c61004c2
py/binary: Do zero extension when storing a value larger than word size.
8 years ago