Paul Sokolovsky
adfe4ff72a
esp8266: Support CFLAGS_EXTRA.
9 years ago
Damien George
54729247e1
minimal: Add enough code to run minimal build on STM32F4xx hardware.
Minimal support code for a Cortex-M CPU is added, along with set-up
code for an STM32F4xx MCU, including a UART for a REPL. Tested on
a pyboard. Code size is 77592 bytes.
9 years ago
Damien George
dd0a0f79d7
py/viper: Truncate viper integer args so they can be up to 32-bit.
9 years ago
Damien George
daa1a455c6
stmhal: Remove custom mod_machine_mem_get_{read,write}_addr functions.
They are no longer needed because stm constants can now be 32 bits wide.
9 years ago
Damien George
2621f8a340
stmhal: Make stm constants big ints when they don't fit in a small int.
Adds 924 bytes of code, but means that no more hacks and work-arounds are
needed due to large constants becoming negative.
9 years ago
Damien George
ea8be373a9
py/inlinethumb: Remove 30-bit restriction on movwt instruction.
movwt can now move a full 32-bit constant into a register.
9 years ago
Damien George
47dc5922ca
py/inlinethumb: Allow assembler to use big ints as args to instructions.
9 years ago
Damien George
22b2265053
py/parse: Improve constant folding to operate on small and big ints.
Constant folding in the parser can now operate on big ints, whatever
their representation. This is now possible because the parser can create
parse nodes holding arbitrary objects. For the case of small ints the
folding is still efficient in RAM because the folded small int is stored
inplace in the parse node.
Adds 48 bytes to code size on Thumb2 architecture. Helps reduce heap
usage because more constants can be computed at compile time, leading to
a smaller parse tree, and most importantly means that the constants don't
have to be computed at runtime (perhaps more than once). Parser will now
be a little slower when folding due to calls to runtime to do the
arithmetic.
9 years ago
Damien George
d6b31e4578
py: Change mp_obj_int_is_positive to more general mp_obj_int_sign.
This function returns the sign (-1, 0 or 1) of the integer object.
9 years ago
Damien George
93b3726240
py/parse: Optimise away parse node that's just parenthesis around expr.
Before this patch, (x+y)*z would be parsed to a tree that contained a
redundant identity parse node corresponding to the parenthesis. With
this patch such nodes are optimised away, which reduces memory
requirements for expressions with parenthesis, and simplifies the
compiler because it doesn't need to handle this identity case.
A parenthesis parse node is still needed for tuples.
9 years ago
Henrik Sölver
67f40fb237
docs: Include extra functions in time documentation for pyboard.
9 years ago
Damien George
1d191fdf03
docs: Add link from pyboard switch tutorial to ISR rules document.
9 years ago
Damien George
43cab7c283
py/modbuiltins: Fix access of mp_obj_t variable, wrap in MP_OBJ_TO_PTR.
9 years ago
Damien George
d4df8f4925
py/objstr: In str.format, handle case of no format spec for string arg.
Handles, eg, "{:>20}".format("foo"), where there is no explicit spec for
the type of the argument.
9 years ago
Paul Sokolovsky
824f83fd20
docs: Set author as 'Damien P. George and contributors'.
9 years ago
Paul Sokolovsky
275a0f25d3
docs: Fix readthedocs build by updating Latex params.
9 years ago
Paul Sokolovsky
ee7b8f32e3
tests/object_dict.py: Add test for obj.__dict__ .
9 years ago
stijn
3c014a67ea
py: Implement __dict__ for instances.
Note that even though wrapped in MICROPY_CPYTHON_COMPAT, it is not
fully compatible because the modifications to the dictionary do not
propagate to the actual instance members.
10 years ago
Dave Hylands
7281d95aee
py: Make dir report instance members
9 years ago
Antonin ENFRUN
b50030b1d0
tests/uctypes: Test item assignment for scalar arrays.
9 years ago
Antonin ENFRUN
26ed00118b
uctypes: Implement assignment for scalar array
9 years ago
Damien George
8212d97317
py: Use polymorphic iterator type where possible to reduce code size.
Only types whose iterator instances still fit in 4 machine words have
been changed to use the polymorphic iterator.
Reduces Thumb2 arch code size by 264 bytes.
9 years ago
Paul Sokolovsky
17f324b836
py/frozenmod: Store frozen module names together, to quickly scan them.
9 years ago
Damien George
1b0aab621b
py: Change struct and macro for builtin fun so they can be type checked.
9 years ago
Damien George
3d2daa2d03
py: Change exception traceback data to use size_t instead of mp_uint_t.
The traceback array stores qstrs and line numbers. qstrs are typed as
size_t, and line numbers should safely fit in size_t as well.
9 years ago
Damien George
ae4865efa1
unix/Makefile: Move include of mpconfigport.mk to before mkenv.mk.
So that if MICROPY_FORCE_32BIT is set mpconfigport.mk it influences
mkenv.mk.
9 years ago
Paul Sokolovsky
09630e48ce
unix/.gitignore: Ignore gcov files.
9 years ago
Paul Sokolovsky
98f7729848
unix/unix_mphal: Be sure to wrap dupterm code with MICROPY_PY_OS_DUPTERM.
9 years ago
Paul Sokolovsky
8fa9264430
unix/unix_mphal: Handle exceptions in call to dupterm's .read().
9 years ago
Paul Sokolovsky
467504da01
extmod/moduos_dupterm: Handle exceptions in call to dupterm's .write()
9 years ago
Paul Sokolovsky
30b7344eb0
extmod/moduos_dupterm: Make mp_uos_dupterm_tx_strn() function reusable.
Function to actually spool output terminal data to dupterm object.
9 years ago
Paul Sokolovsky
00ee84e1e1
py: Clean up instantiation of dupterm object.
To comply with already established scheme for extmod's.
9 years ago
Paul Sokolovsky
9bbfd5efd4
py/mpconfig: Make configuration of dupterm object reusable.
9 years ago
Paul Sokolovsky
ddea7cb702
extmod/moduos_dupterm: Make uos.dupterm() implementation reusable.
That's just function which sets/gets dup terminal object, and can be
easily reused across ports.
9 years ago
Paul Sokolovsky
0992588811
py/frozenmod: Make frozen module content be 0-terminated.
To allow simple zero-terminated lexers.
9 years ago
Damien George
ed584e2ffd
docs: Bump version to 1.5.2.
9 years ago
Damien George
64ececb72f
lib/libc/string0: Use uintptr_t instead of uint32_t.
This makes the code portable to non-32-bit architectures.
9 years ago
Dave Hylands
8c936edeb2
stmhal: Fix USB on the STM32F429DISC board
The USB REPL has been broken since commit 1be0fde45c
This patch allows the STM32F429DISC board (which uses the USB_HS PHY)
9 years ago
Damien George
6dde019d93
py/map: In map lookup, check for fixed map independent of ordered map.
It's possible to have a fixed map that is properly hashed (ie not
simply ordered).
9 years ago
Damien George
4bd95f8b44
tools: Add C middle-processor to make builtin tables proper hash tables.
9 years ago
Peter Hinch
521759ee18
docs: Add discussion on interrupt handlers incl uPy specific techniques.
9 years ago
Paul Sokolovsky
fb7b715b7b
extmod/modlwip: Use _ERR_BADF instead of magic number.
9 years ago
Paul Sokolovsky
bc25545fbb
extmod/modlwip: Avoid magic numeric values in memcpy().
9 years ago
Paul Sokolovsky
722fb2d251
extmod/modlwip: User proper field name and value names for socket state.
9 years ago
Paul Sokolovsky
43fecb0acb
esp8266/modesp: Allow to compile out proprietary espconn stuff.
9 years ago
Paul Sokolovsky
fff2dd2627
extmod/modlwip: Mark some lwip_socket_obj_t's fields as volatile.
Any fields changed by asynchronous callbacks must be volatile.
9 years ago
Paul Sokolovsky
a63d4a6cc2
extmod/modlwip: tcp_recv: Use more regular and responsive poll pattern.
Polling once in 100ms means dismal performance.
TODO: Propagate this pattern to other polling places.
9 years ago
Dave Hylands
0dce9a21ce
stmhal: Add struct qstr to block of qstrs needed for MICROPY_PY_STRUCT.
Otherwise build fails if uctypes is disabled.
9 years ago
Paul Sokolovsky
1e06e81b3d
windows: Propagate MICROPY_PY_OS_DUPTERM handling from unix port.
9 years ago
Paul Sokolovsky
2c1620ce1f
unix: Implement uos.dupterm(). Conditional on MICROPY_PY_OS_DUPTERM.
9 years ago