Paul Sokolovsky
a7752a4540
run-tests: Elaborate python3 command override capabilities.
11 years ago
Damien George
e8208a7f02
py: Make False and True act like 0 and 1 for integer arithmetic.
11 years ago
Damien George
d7aadcfe1b
py: Allow dict constructor to take keyword arguments.
11 years ago
Damien George
36f0ee1a54
py: Remove mp_obj_less (use mp_binary_op(MP_BINARY_OP_LESS..) instead).
11 years ago
Damien George
bd17e1b3ae
unix: Allocate more heap memory by default on 64 bit machines.
Pointers are 2x bigger on 64 bit machines, so we should allocate twice
the memory to have a comparable heap size.
11 years ago
Damien George
9b1599c663
Merge pull request #422 from dhylands/str-modulo
Str modulo
11 years ago
Damien George
af27259439
py: Enable optimisation of multiplying 2 small ints in compiler.
11 years ago
Damien George
28390340e5
tests: Make rge-sm.py use less memory (integration step increased).
In addition to memory allocation failure, other problem was that 10**17
was overflowing. Now passes.
11 years ago
Damien George
ecf5b77123
py: This time, real proper overflow checking of small int power.
Previous overflow test was inadequate.
11 years ago
Damien George
6902eeda25
py: Add m_malloc_fail function to handle memory allocation error.
A malloc/realloc fail now throws MemoryError.
11 years ago
Paul Sokolovsky
072cf022e0
tests/file-with: Add testcase which failed for @dpgeorge .
Works on x86.
11 years ago
Dave Hylands
6756a37a77
Implements most of str.modulo
The alternate form for floating point doesn't work yet.
The %(name)s form doesn't work yet.
11 years ago
Dave Hylands
bf7d690e36
Add the git version to the banner
11 years ago
Damien George
5bf565e353
py: Handle small int power overflow correctly.
11 years ago
Damien George
4b34c76fd6
Changes to get unix/ port compiling on Cygwin.
11 years ago
Damien George
3996611c1b
stmhal: Add home/end cursor support in readline.
Home/end work in picocom and screen (different codes in those 2
programs). Also, CTRL-A (for non-empty liny) and CTRL-E act as
home/end.
11 years ago
mux
4f7e9f5c44
Implement del
11 years ago
Damien George
3269cf2f93
Merge pull request #419 from pfalcon/stmhal-file-streams
stmhal: Reimplement file support using stream protocol API.
11 years ago
Damien George
2309369291
tests: Allow to run tests on pyboard.
To run the tests on the pyboard you need to set the "test_on_pyboard"
variable to "True", and also have tools/pyboard.py available for import
(easiest is to symlink to it).
11 years ago
Damien George
d71fc37af7
tools: Improve reading back from pyboard.
11 years ago
Damien George
57ad7aa66b
stmhal: On soft reset, if in raw REPL mode, don't run main.py.
11 years ago
Damien George
0e49642965
tools: pyboard.py can now execute a file remotely!
11 years ago
Damien George
d8b47d3e02
stmhal: Fix raw REPL so that it passes through more ASCII chars.
11 years ago
Damien George
769b23a9c6
stmhal: Add powf, logf, log2f, log10f.
11 years ago
Damien George
aba9f51fef
stmhal: #undef log2f if it's defined.
11 years ago
Paul Sokolovsky
6693e6c506
README: ARM Linux is supported.
Retested again on Ubuntu 12.04 armhf running in chroot on Samsung
ARM Chromebook (Cortex-A15).
11 years ago
Paul Sokolovsky
1d4d9ddd9e
stmhal: Reimplement file support using stream protocol API.
This adds readline(), readall(), etc. methods. Also other fixes to make
Python API compliant and "with" support.
11 years ago
Paul Sokolovsky
34e1199b3a
run-tests: Allow to override python3 command to use via environment var.
11 years ago
Paul Sokolovsky
c61ce96590
unix file: Implement context manager protocol (for "with" statement).
11 years ago
Paul Sokolovsky
98a627dc03
py: Add "io" module.
So far just includes "open" function, which should be supplied by a port.
TODO: Make the module #ifdef'ed.
11 years ago
Damien George
8270e3853d
py: More robust int conversion and overflow checking.
11 years ago
Damien George
a58a7aefbd
Merge pull request #417 from pfalcon/unix-enable-gc
unix: Enable GC.
11 years ago
Damien George
cc7085c1ce
Merge branch 'fix-format-int' of github.com:dhylands/micropython into dhylands-fix-format-int
Conflicts:
py/objstr.c
11 years ago
Dave Hylands
22fe4d7344
Fix str.format to work with {:f/g/e} and ints
Also fix objstr.c to compile when floats disabled.
11 years ago
Damien George
c322c5f07f
py: Fix regress for printing of floats and #if.
Also change formating modifier in test script (it still passes with
original format though).
11 years ago
Damien George
a05f5dd952
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
e90eefc84b
stmhal: Fix servo object; add fpclassify to math functions.
11 years ago
Paul Sokolovsky
78e8e30c87
unix: Enable GC.
GC support for "unix" port was implemented some time ago, but still not
enabled.
11 years ago
Paul Sokolovsky
ad1bac63f7
tests/string-format: Add test for formatting ints with float format.
Fail currently.
11 years ago
Paul Sokolovsky
e807fa8d60
gc: Uses uint defined in misc.h.
11 years ago
Paul Sokolovsky
d440dc0513
unix: Use argv[0] for command name in usage.
11 years ago
Paul Sokolovsky
a55a5469c3
unix: Support #if-able impl-specific cmdline options.
For example, we still build w/o GC enabled, so cannot really set heap size.
11 years ago
Paul Sokolovsky
d4e7e06d7f
unix: Properly recognize and report when script on cmdline not found.
Previosuly just silently exited.
11 years ago
Damien George
094d450003
py: Wrap compile_scope_inline_asm in #if; remove comment from misc.h.
11 years ago
Damien George
70f33cde48
py: Fix up so that it can compile without float.
11 years ago
Damien George
af6edc61bd
py: Enable a jump optimisation in the compiler.
11 years ago
Damien George
882b363564
py: Move to Python 3.4.0 compatibility.
Very little has changed. In Python 3.4 they removed the opcode
STORE_LOCALS, but in Micro Python we only ever used this for CPython
compatibility, so it was a trivial thing to remove. It also allowed to
clean up some dead code (eg the 0xdeadbeef in class construction), and
now class builders use 1 less stack word.
Python 3.4.0 introduced the LOAD_CLASSDEREF opcode, which I have not
yet understood. Still, all tests (apart from bytecode test) still pass.
Bytecode tests needs some more attention, but they are not that
important anymore.
11 years ago
Damien George
929a675a3d
Change test scripts to use python3; bytecode tests use python3.4.
I upgraded to Python 3.4.0, so needed to make these changes. Hopefully
the tests still run with Python 3.3.x (the scripts use python3 so are
agnostic as to the subversion).
Bytecode tests are tightly coupled to the Python version, and now some
fail against Python 3.4.
11 years ago
Damien George
4d4a7f5354
Merge branch 'pip-micropy' of github.com:pfalcon/micropython into pfalcon-pip-micropy
11 years ago
Damien George
a12be917a4
stmhal: Add timer module; move servo PWM from TIM2 to TIM5.
As per issue #257 , servo is better on TIM5 because TIM2 is connected to
more GPIO.
11 years ago