adminpete
d6201fc4b7
py: In inline asm, vldr and vstr offsets now in bytes not words.
...
As per ARM convention.
2015-10-31 10:50:45 +00:00
omtinez
17c649da3d
py/makeversionhdr.py: Work with backslashes in paths.
...
This script may be called by Windows IDEs (e.g. Visual Studio) and be passed
paths with backslashes.
2015-10-30 11:34:53 +03:00
Paul Sokolovsky
e0d7740a22
extmod/modlwip: slip: Use stream protocol and be port-independent.
...
Based on the original patch by Galen Hazelwood:
https://github.com/micropython/micropython/pull/1517 .
2015-10-27 00:04:59 +03:00
Paul Sokolovsky
0dbd928cee
Makefiles: Remove duplicate object files when linking.
...
Scenario: module1 depends on some common file from lib/, so specifies it
in its SRC_MOD, and the same situation with module2, then common file
from lib/ eventually ends up listed twice in $(OBJ), which leads to link
errors.
Make is equipped to deal with such situation easily, quoting the manual:
"The value of $^ omits duplicate prerequisites, while $+ retains them and
preserves their order." So, just use $^ consistently in all link targets.
2015-10-24 15:46:53 +03:00
Damien George
22521ea9e2
py/nlrthumb: Make compatible with Cortex-M0 (ARMv6M instr set).
2015-10-20 13:26:34 +01:00
Damien George
04353cc85e
py: With obj repr "C", change raw str accessor from macro to function.
...
This saves around 1000 bytes (Thumb2 arch) because in repr "C" it is
costly to check and extract a qstr. So making such check/extract a
function instead of a macro saves lots of code space.
2015-10-20 12:38:54 +01:00
Damien George
183edefddd
py: Add object repr "C", where 30-bit floats are stuffed in obj word.
...
This new object representation puts floats into the object word instead
of on the heap, at the expense of reducing their precision to 30 bits.
It only makes sense when the word size is 32-bits.
2015-10-20 12:38:54 +01:00
Damien George
aedb859177
py: Make float representation configurable with object representation.
2015-10-20 12:35:40 +01:00
Damien George
7e359c648b
py: Move float e/pi consts to objfloat and make mp_obj_float_t private.
2015-10-20 12:35:17 +01:00
Damien George
aaef1851a7
py: Add mp_obj_is_float function (macro) and use it where appropriate.
2015-10-20 12:35:17 +01:00
Paul Sokolovsky
e0f5df579b
all: Make netutils.h available to all ports by default.
...
Generally, ports should inherit INC from py.mk, append to it, not
overwrite it. TODO: Likely should do the same for other vars too.
2015-10-19 18:32:42 +03:00
Paul Sokolovsky
8ee153f234
unix/modtime: Implement ticks_ms(), ticks_us() and ticks_diff().
...
All of these functions return positive small int, thus range is 2 bits less
than word size (30 bit on 32-bit systems, 62 bit on 64-bit systems).
2015-10-19 17:48:27 +03:00
Damien George
096d1e4512
py: Add lsl/lsr/asr opcode support to inline Thumb2 assembler.
2015-10-19 14:26:19 +01:00
Paul Sokolovsky
7799410950
py/stream: Allow to reuse is_nonblocking_error().
2015-10-18 15:39:33 +03:00
Damien George
035a0a2b6e
py: Add support for _ in REPL to hold last computed value.
...
Only available when MICROPY_CAN_OVERRIDE_BUILTINS is enabled.
2015-10-17 12:55:25 +01:00
Damien George
e813541e3f
py: Add option for inline assembler to support ARMv7-M instructions.
...
Cortex-M0, M0+ and M1 only have ARMv6-M Thumb/Thumb2 instructions. M3,
M4 and M7 have a superset of these, named ARMv7-M. This patch adds a
config option to enable support of the superset of instructions.
2015-10-16 22:08:57 +01:00
Damien George
4bf3f2d3c0
py: Fix with+for+return bug by popping for-iter when unwinding exc stack.
...
Addresses issue #1182 .
2015-10-15 17:48:28 +01:00
Damien George
4300c7dba2
py: Remove dependency on printf/fwrite in mp_plat_print.
...
See issue #1500 .
2015-10-15 00:05:55 +01:00
Damien George
d7e3b36a09
py/compile: Remove unnecessary label in compilation of for statement.
2015-10-14 15:51:12 +01:00
Damien George
fcce1483fa
py: Fix build of ARM native emitter due to recent viper changes.
...
Addresses #1510 .
2015-10-14 12:40:54 +01:00
Damien George
59a41e8fcd
py/qstr: Fix calc of qstr memory usage, due to new qstr chunk allocation.
2015-10-13 15:52:06 +01:00
Damien George
b8f9ac5411
py: Implement ptr32 load and store in viper emitter.
2015-10-13 00:50:17 +01:00
Damien George
3c9c3687d6
py: Add support to call __init__ from a builtin module on first import.
2015-10-12 13:46:01 +01:00
Paul Sokolovsky
408b74d74c
py: Allow to to build MicroPython as a static library.
...
The whole current port gets slurped into a static lib named
"libmicropython.a". Maybe that's not ideal, but at least something
to start with.
2015-10-12 15:32:06 +03:00
Damien George
fdfcee7b1e
py/parse: Make parser error handling cleaner, less spaghetti-like.
2015-10-12 12:59:18 +01:00