Paul Sokolovsky
394c536675
zephyr/prj_96b_carbon.conf: Re-enable networking on Carbon.
...
The original issue leading to crash on startup if no default network
interface was presented, was resolved some time ago.
Note that this enables generic networking subsystem, not networking
on Carbon.
2017-08-19 11:55:18 +03:00
Paul Sokolovsky
09b561f108
zephyr/modusocket: Update struct sockaddr family field name.
...
Was changed to "sa_family" for POSIX compatibility.
2017-08-19 11:45:21 +03:00
Alex Robbins
0aa1d3f447
docs/library/ubinascii: Update base64 docs.
...
This clarifies return values and the handling of invalid (e.g. newline)
characters.
Encoding conforms to RFC 3548, but decoding does not, as it ignores invalid
characters in base64 input. Instead, it conforms to MIME handling of base64
(RFC 2045).
Note that CPython doesn't document handling of invalid characters in
a2b_base64() docs:
https://docs.python.org/3/library/binascii.html#binascii.a2b_base64 , so
we specify it more explicitly than it, based on CPython's actual behavior
(with which MicroPython now compliant).
2017-08-17 09:25:51 +03:00
Alex Robbins
c89254fd0f
extmod/modubinascii: Rewrite mod_binascii_a2b_base64.
...
This implementation ignores invalid characters in the input. This allows
it to decode the output of b2a_base64, and also mimics the behavior of
CPython.
2017-08-17 09:25:51 +03:00
Damien George
025e5f2b33
py/binary: Change internal bytearray typecode from 0 to 1.
...
The value of 0 can't be used because otherwise mp_binary_get_size will let
a null byte through as the type code (intepreted as byterray). This can
lead to invalid type-specifier strings being let through without an error
in the struct module, and even buffer overruns.
2017-08-17 16:19:35 +10:00
Tony DiCola
c281b44cbd
Update docs README to mention requirement for recommonmark dependency.
2017-08-16 15:23:42 -07:00
stijn
e4ab404780
tools/mpy-tool.py: Fix missing argument in dump() function
...
This makes the -d commandline argument usable again.
Pass empty string as parent name as listing starts from the root.
2017-08-16 10:38:19 +02:00
Paul Sokolovsky
9404093606
zephyr/prj_base.conf: Enable CONFIG_INIT_STACKS.
...
As required for zephyr.stack_analyze().
2017-08-16 09:34:13 +03:00
Paul Sokolovsky
ad937c49aa
zephyr/modzephyr: Add current_tid() and stacks_analyze() functions.
...
current_tid() returns current thread ID. stacks_analyze() calls
k_call_stacks_analyze() which, with CONFIG_INIT_STACKS enabled,
will print stack usage for some well-known threads in the system.
2017-08-16 09:24:06 +03:00
Eric Poulsen
d5191edf7f
extmod/modussl_mbedtls.c: Add ussl.getpeercert() method.
...
Behaviour is as per CPython but only the binary form is implemented here.
A test is included.
2017-08-16 15:01:00 +10:00
Scott Shawcroft
e00b3190ed
Have the build script upload artifacts to Rosie when travis is building a pull request. ( #191 )
2017-08-15 18:45:27 -04:00
Stefan Naumann
ace9fb5405
py: Add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE.
...
It enables all the DEBUG_printf outputs in the py/ source code.
2017-08-15 11:53:36 +10:00
Bas van Sisseren
a14ce77b28
py/binary.c: Fix bug when packing big-endian 'Q' values.
...
Without bugfix:
struct.pack('>Q', 16)
b'\x00\x00\x00\x10\x00\x00\x00\x00'
With bugfix:
struct.pack('>Q', 16)
b'\x00\x00\x00\x00\x00\x00\x00\x10'
2017-08-15 11:33:43 +10:00
Javier Candeira
c127ace28a
docs/library/machine.RTC.rst: Fix typo.
2017-08-14 15:42:25 +10:00
Javier Candeira
35a1fea90b
all: Raise exceptions via mp_raise_XXX
...
- Changed: ValueError, TypeError, NotImplementedError
- OSError invocations unchanged, because the corresponding utility
function takes ints, not strings like the long form invocation.
- OverflowError, IndexError and RuntimeError etc. not changed for now
until we decide whether to add new utility functions.
2017-08-13 22:52:33 +10:00
Damien George
b6a3289564
tools/mpy-tool.py: Don't generate const_table if it's empty.
2017-08-12 22:26:18 +10:00
Scott Shawcroft
fab634e3ee
Turn on Rosie CI testing to test new builds on real hardware.
...
This introduces a skip_if module that can be used by tests to
determine when they should be skipped due to the environment.
Some tests have been split in order to have finer grained skip
control.
2017-08-11 17:16:13 -07:00
Paul Sokolovsky
bfc2092dc5
py/modsys: Initial implementation of sys.getsizeof().
...
Implemented as a new MP_UNARY_OP. This patch adds support lists, dicts and
instances.
2017-08-11 09:43:07 +03:00
Damien George
7d4a2f773c
all: Make use of $(TOP) variable in Makefiles, instead of "..".
...
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top
level of this repository.
2017-08-11 12:22:19 +10:00
Damien George
f9dfd8aa3b
minimal,esp8266,pic16bit: Remove unused stmhal include from Makefile.
2017-08-11 12:17:47 +10:00
Scott Shawcroft
f6a702538a
py: Pretend frozen files are stored under .frozen rather than the empty path.
...
This makes it clear when frozen modules are loaded as opposed to the empty path
which represents the current working directory. Furthermore, by splitting the two
apart this allows one to control in what order frozen modules are loaded.
This is a prerequisite for #56 .
2017-08-10 15:46:17 -07:00
Scott Shawcroft
5c32a5aa6a
py: Remove mpy-cross depend when making frozen mpy's because we don't know the state under which its being built. Instead, build it before running the subsequent make.
2017-08-10 15:44:47 -07:00
Scott Shawcroft
42156484ae
shared-bindings/atmel-samd: Fix and improve trigger duration timing on PulseIn.resume.
2017-08-10 11:55:34 -07:00
Paul Sokolovsky
63edc2e78b
zephyr/modusocket: Fully switch to native Zephyr sockets.
2017-08-09 15:08:27 +03:00
Damien George
3d25d9c7d9
py/objstr: Raise an exception for wrong type on RHS of str binary op.
...
The main case to catch is invalid types for the containment operator, of
the form str.__contains__(non-str).
2017-08-09 21:25:48 +10:00
Damien George
eb2784e8a2
py/objtuple: Allow to use inplace-multiplication operator on tuples.
2017-08-09 21:20:42 +10:00
Paul Sokolovsky
cb7ecda9f0
zephyr/modusocket: recv: Switch to native sockets.
2017-08-09 10:22:41 +03:00
Paul Sokolovsky
675ceb2dd9
zephyr/modusocket: send: Switch to native sockets.
2017-08-09 10:17:15 +03:00
Paul Sokolovsky
600f5afed3
zephyr/modusocket: bind, connect, listen, accept: Swtich to native sockets.
2017-08-08 12:32:08 +03:00
Scott Shawcroft
37c72adc0f
docs: Add link to SD card driver.
2017-08-07 17:55:39 -07:00
Scott Shawcroft
2e155bcc31
shared-bindings: Add stub documentation of storage.VfsFat so other docs can link to it.
2017-08-07 16:20:19 -07:00
Scott Shawcroft
509d5223ea
atmel-samd: Fix crash when fs mount fails and fix mounting internal flash. It was broken by the update to 1.9.1. Related to #82
2017-08-07 15:56:10 -07:00
Scott Shawcroft
6ace744667
esp8266: Introduce multiterminal
module for managing a secondary
...
serial connection such as WebREPL.
Fixes #181 .
2017-08-07 14:30:11 -07:00
Paul Sokolovsky
6c55cdafa3
zephyr/modusocket: socket, close: Switch to native Zephyr socket calls.
2017-08-07 21:41:03 +03:00
Paul Sokolovsky
642d9fd2a5
zephyr/modusocket: Allow to use socketized net_context in upstream.
...
Accesses recv_q, accept_q directly in net_context.
2017-08-07 21:36:57 +03:00
Paul Sokolovsky
4dc7c5649b
py/mkrules.mk: Show frozen modules sizes together with executable size.
...
This works for Unix and similar ports so far.
2017-08-06 15:43:21 +03:00
Dan Halbert
5d509ecace
Allow max stack checking to be used with -flto build by determining top
...
of stack in a different way.
2017-08-05 17:48:16 -07:00
Dan Halbert
91d4cdb476
Increase heap size at the expense of stack size, from 16k to 16k+4k.
2017-08-05 17:47:00 -07:00
Scott Shawcroft
13cb4aa89d
atmel-samd: Add support for a second flash chip so either may be used.
2017-08-03 13:44:31 -07:00
Scott Shawcroft
8f3c5ebdc8
atmel-samd: Clear the error bit after the known buffer overflow and be explicit about dst increase.
2017-08-03 13:44:31 -07:00
Paul Sokolovsky
ca582675e1
zephyr/Makefile: Explicitly define default target as "all".
...
For some reason, with the latest Zephyr master, running just "make" led
to executing Zephyr's "qemu" target.
2017-08-03 00:16:38 +03:00
Damien George
0f12082f5b
py,extmod,stmhal: Use "static inline" for funcs that should be inline.
...
"STATIC inline" can expand to "inline" if STATIC is defined to nothing, and
this case can lead to link errors.
2017-08-02 13:42:34 +10:00
brentru
c08cc4106b
added Gemma M0 to supported boards section on readme
2017-08-01 11:42:24 -07:00
Scott Shawcroft
1dfe277a15
docs: Tweak favicon setting so sphinx doesn't give an error locally.
2017-07-31 14:23:43 -07:00
Paul Sokolovsky
ee04525097
extmod/modlwip: Implement setsockopt(IP_ADD_MEMBERSHIP).
...
Allows to join multicast groups.
2017-07-31 22:38:37 +03:00
Alexander Steffen
55f33240f3
all: Use the name MicroPython consistently in comments
...
There were several different spellings of MicroPython present in comments,
when there should be only one.
2017-07-31 18:35:40 +10:00
Damien George
bbced3b4bb
extmod: Use MP_ROM_INT for int values in an mp_rom_map_elem_t.
2017-07-31 13:00:34 +10:00
Damien George
b62bb53d0e
py/modsys: Use MP_ROM_INT for int values in an mp_rom_map_elem_t.
2017-07-31 12:59:39 +10:00
Paul Sokolovsky
e6bb25317b
esp8266: Convert to mp_rom_map_elem_t.
2017-07-30 18:13:01 +03:00
Paul Sokolovsky
e3864b5907
esp8266/modesp: Remove unused constants: STA_MODE, etc.
...
WiFi mode selection happens on the level of individual interfaces.
2017-07-30 12:37:35 +03:00