Damien George
7b80d908bf
docs: Add RTD local_settings file, to add custom templates.
10 years ago
Damien George
9b561a7c0d
docs: Add custom CSS file, with code for admonition.
10 years ago
Paul Sokolovsky
4b60b45bfc
stmhal: gccollect.h is superfluous in many places.
10 years ago
Paul Sokolovsky
6aaccc484c
stmhal: Use gc_dump_info() function instead of adhoc code.
10 years ago
Paul Sokolovsky
bf19586c53
stmhal: Include MICROPY_HAL_H only if defined.
Helps other ports.
10 years ago
Damien George
6efa66f125
py: Remove unnecessary RULE_none and PN_none from parser.
10 years ago
Damien George
b47ea4eadd
py: Add blank and ident flags to grammar rules to simplify parser.
This saves around 100 bytes code space on stmhal, more on unix.
10 years ago
Damien George
4fd7c1a2ac
tools, pyboard.py: Write data to pyboard in chunks of 256 bytes.
This speeds up writes significantly.
10 years ago
Damien George
2870d85a11
py: Save a few code bytes in parser; make vars local where possible.
10 years ago
Paul Sokolovsky
978f4ca2e1
run-tests: Allow to run testuite against Windows build on Linux (using Wine).
Just adjust line-endings of micropython.exe output, the rest should be
handled by Wine (automagically on properly configured distro).
To run:
MICROPY_MICROPYTHON=../windows/micropython.exe ./run-tests
10 years ago
stijn
f5efefd5a0
windows: Correctly interpret skipped tests, enable uhashlib and ubinascii
10 years ago
Damien George
6d3ae569cf
docs: Add CPy diff note for print_exception; embellish sys.platform.
10 years ago
Damien George
2a3e2b9033
py: Add execfile function (from Python 2); enable in stmhal port.
Adds just 60 bytes to stmhal binary. Addresses issue #362 .
10 years ago
Paul Sokolovsky
8427c5b76c
unix/windows: Make sure that process exit code is portable 8-bit value.
This fixes FORCED_EXIT internal flag leaking into Windows exit code.
10 years ago
Damien George
f04329e93b
lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal.
acoshf, asinhf, atanhf were added from musl. mathsincos.c was
split up into its original, separate files (from newlibe-nano-2).
tan was added.
All of the important missing float functions are now implemented,
and pyboard now passes tests/float/math_fun.py (finally!).
10 years ago
Damien George
6936f4626c
tests: Get misc/print_exception and pyb/spi working on pyboard.
10 years ago
Paul Sokolovsky
c8b0229bc7
tests: sha256: skip test if uhashlib module is not available.
10 years ago
Gregory
5cf7ac7309
Fix leds.rst
N (mod 4) is 0..3
10 years ago
Paul Sokolovsky
9d944c7fb2
unix: Rename "time" module to "utime" to allow extensibility.
Name choosen per latest conventions and for compatibiity with stmhal port.
10 years ago
Damien George
9642846d71
docs: Define more clearly the behaviour of LED methods.
Addresses issue #1006 .
10 years ago
Paul Sokolovsky
0078561303
modffi: Support void (None) return value for Python callback functions.
10 years ago
Paul Sokolovsky
7a4765dbeb
tests: Add testcase for ffi callbacks.
10 years ago
Paul Sokolovsky
b62371e8fb
modffi: 64-bit cleanness (fixes actual bug in callback arg handling).
10 years ago
Paul Sokolovsky
c0bc3bd736
asmarm: Fix bug with encoding small negative ints using MVN instruction.
10 years ago
Paul Sokolovsky
83d27b0f0b
unix: Enable Thumb2 and ARM emitters by default on corresponding archs.
10 years ago
Paul Sokolovsky
138562ccd9
run-tests: Skip native/viper tests based on prefix.
Otherwise, new tests are forgotten to be added to explicit lists. Issue
found running on Debian/ARM.
10 years ago
Damien George
e181c0dc07
py: Fix optimised for-loop compiler so it follows proper semantics.
You can now assign to the range end variable and the for-loop still
works correctly. This fully addresses issue #565 .
Also fixed a bug with the stack not being fully popped when breaking out
of an optimised for-loop (and it's actually impossible to write a test
for this case!).
10 years ago
Damien George
7764f163fa
py: Fix label printing in showbc; print sp in vm trace.
10 years ago
Paul Sokolovsky
1ca28bd570
run-tests: Reset MICROPYPATH, to make sure tests use only builtin modules.
10 years ago
Paul Sokolovsky
dbc7854355
run-tests: PEP8 fix.
10 years ago
Paul Sokolovsky
f42b3c7599
tests: Activate recursive_data.py test, now that io.StringIO is available.
10 years ago
Damien George
5fba93a26b
tests: Add test for semantics of for-loop that optimisation can break.
10 years ago
Damien George
c33ce606cf
py: Fix a semantic issue with range optimisation.
Now you can assign to the range variable within the for loop and it will
still work.
Partially addresses issue #565 .
10 years ago
Damien George
f905145c6d
tests: Disable print_exception test when using native emitter.
10 years ago
Damien George
184182d14c
tests: Fix print_exception test and re-enable it on Travis CI.
Issue was with uPy: on local machine with micropython-lib installed, io
module is available. Not the case on Travis CI, where only _io module
is available in uPy.
10 years ago
Paul Sokolovsky
66a6caa307
run-tests: Skip print_exception.py on TravisCI, as it irreproducibly fails.
TODO: Figure out what's wrong on Travis.
10 years ago
Damien George
5318cc028a
py: Tidy up a few function declarations.
10 years ago
Damien George
7eb2317fa2
py: Remove static from definition of pfenv_printf.
It's used by stmhal, but not unix.
10 years ago
Damien George
969a6b37bf
py: Make functions static where appropriate.
10 years ago
Nikita Nazarenko
d51107927d
unix: add unlink function to os module
10 years ago
Damien George
4140e19c8a
tests: Fix print_exception.py to work on Travis CI.
10 years ago
Paul Sokolovsky
e8487ea1be
tests: Add test for print_exception() function.
10 years ago
Paul Sokolovsky
6c3fc74656
docs: Add sys.print_exception().
10 years ago
Damien George
b4fe6e28eb
py: Fix function type: () -> (void).
10 years ago
Damien George
78d702c300
py: Allow builtins to be overridden.
This patch adds a configuration option (MICROPY_CAN_OVERRIDE_BUILTINS)
which, when enabled, allows to override all names within the builtins
module. A builtins override dict is created the first time the user
assigns to a name in the builtins model, and then that dict is searched
first on subsequent lookups. Note that this implementation doesn't
allow deleting of names.
This patch also does some refactoring of builtins code, creating the
modbuiltins.c file.
Addresses issue #959 .
10 years ago
adminpete
e6e8ad8ab2
drivers, nrf24: Nonblocking send now uses send_start and send_done.
10 years ago
adminpete
706955976c
drivers, nrf24: Nonblocking send now done by generator.
10 years ago
Peter Hinch
5deceb842d
drivers, nrf24: Add nonblocking send option etc.
10 years ago
Damien George
b66a31c42c
stmhal: Allow SPI.init to specify prescaler directly; improve SPI docs.
10 years ago
Damien George
008251180d
stmhal: Enhance pyb.freq to configure bus (AHB, APB1, APB2) freqs.
This is useful if you need precise control over the speed of
peripherals (eg SPI clock).
10 years ago