Alex March
d02f3a57f4
extmod/vfs_fat: Add file and directory checks for remove and rmdir.
8 years ago
Radomir Dopieralski
eaef6b5324
extmod/machine_i2c: Use writes not reads in i2c.scan().
As per discussion in #2449 , using write requests instead of read requests
for I2C.scan() seems to support a larger number of devices, especially
ones that are write-only. Even a read-only I2C device has to implement
writes in order to be able to receive the address of the register to read.
8 years ago
Peter Hinch
9e1dec1818
docs/reference: Add constrained.rst doc.
It contains detailed information about writing scripts to run efficiently
on microcontrollers (and other constrained systems).
8 years ago
Paul Sokolovsky
39968aaaff
extmod/uzlib: Update to upstream v2.1.
Adds check that LZ offsets fall into the sliding dictionary used. This
catches a case when uzlib.DecompIO with a smaller dictionary is used
to decompress data which was compressed with a larger dictionary.
Previously, this would lead to producing invalid data or crash, now
an exception will be thrown.
8 years ago
Damien George
6dff3df501
py/objint: Use size_t for arguments that measure bytes/sizes.
8 years ago
Damien George
8bb7d958f1
py: Factor duplicated function to calculate size of formatted int.
8 years ago
Damien George
df3e5d2b2f
py/mpz: Use assert to verify mpz does not have a fixed digit buffer.
8 years ago
Damien George
48874942f0
py/mpz: In divmod, replace check for rhs!=0 with assert.
The check for division by zero is made by the caller of this function.
8 years ago
Damien George
5e22afce41
tests: Improve test coverage of py/compile.c.
8 years ago
Damien George
e49153fb98
py/compile: Remove unreachable code.
8 years ago
Damien George
7f0e563de3
tests/micropython: Add test for micropython.opt_level() function.
8 years ago
Damien George
7dc2345715
py/modmicropython: Add micropython.opt_level([value]) function.
This allows to get/set at runtime the optimisation level of the compiler.
8 years ago
Paul Sokolovsky
93c76d2b06
zephyr: Add Ctrl+C handling.
8 years ago
Paul Sokolovsky
1b76f88e7a
zephyr/zephyr_getchar: Add support for Ctrl+C handling.
Patch on top of upstream Zephyr console helpers.
8 years ago
Paul Sokolovsky
aa7828f822
zephyr/main: Execute main.py frozen module on boot, if available.
8 years ago
Paul Sokolovsky
7e3b21ec54
zephyr: Enable frozen modules support.
8 years ago
Paul Sokolovsky
b3a65791b1
zephyr: Enable stack checking and micropython.mem_info().
8 years ago
Paul Sokolovsky
ac70119779
zephyr: Add README.
8 years ago
daniel
a181340ad8
docs/wipy: Correct deep sleep current figure.
8 years ago
Daniel Thompson
5a699a7017
zephyr: Use recently added "make outputexports" Zephyr target.
The outputexpors target, which exports Zephyr environment variables, was
recently added to Zephyr. By exploiting this feature we can hugely simplify
the build system, improving robustness at the same time.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
8 years ago
Paul Sokolovsky
244b02f744
zephyr/Makefile: Automatically derive target-specific CFLAGS.
By tricking Zephyt arch Makefiles compute them for us (not just for
Zephyr). This make potentially break as Zephyr evolves.
8 years ago
Daniel Thompson
cbc0bf6fec
zephyr: Support extra make targets
The two variables, GENERIC_TARGETS and CONFIG_TARGETS come, respectively,
from the the lists shown during "make help" and "make kconfig-help".
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
8 years ago
Daniel Thompson
2ea52cb045
zephyr: Automatically derive ARCH.
Currently to compile for anything that except ARCH=x86 we have to
provide ARCH via the environment or make arguments. We can do better
than that!
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
8 years ago
Paul Sokolovsky
7df9f313c6
zephyr: Switch to microkernel, required for network to work in background.
8 years ago
Paul Sokolovsky
9ad5032164
zephyr: Add zephyr_getchar module to handle console input.
From https://github.com/pfalcon/zephyr_getchar .
8 years ago
Paul Sokolovsky
9d9efc0c5a
zephyr: Initial Zephyr RTOS port, Zephyr part.
8 years ago
Paul Sokolovsky
cff9f02cd7
zephyr: Initial Zephyr RTOS port, MicroPython part.
8 years ago
Paul Sokolovsky
fa5ac678fc
examples/network/http_client*: Use \r\n line-endings in request.
8 years ago
Paul Sokolovsky
3dabaae47d
tests/io/bytesio_ext: Add test for readinto().
8 years ago
Paul Sokolovsky
d22a04d9c4
py/objstringio: Add readinto() method.
Also, drop deprecated (as for MicroPython) readall() method.
8 years ago
Paul Sokolovsky
49e140488d
tests/io/write_ext: Add description comment.
8 years ago
Paul Sokolovsky
3b3612c65b
esp8266: Make neopixel support configurable.
To save iRAM.
8 years ago
Damien George
dc43508cc2
extmod/vfs_fat_file: Use MP_Exxx errno constants.
8 years ago
Damien George
016dba0e98
unix: Use common RAISE_ERRNO macro from mphalport.h.
8 years ago
Damien George
503089ea9d
unix: Use mp_raise_OSError helper function.
8 years ago
Damien George
23a568240d
esp8266: Use mp_raise_OSError helper function.
8 years ago
Damien George
a2bfcbe029
stmhal: Use mp_raise_OSError helper function.
8 years ago
Damien George
e3d29996b3
driver/dht: Use mp_raise_OSError helper function.
8 years ago
Damien George
75af908c0e
extmod: Use mp_raise_OSError helper function.
8 years ago
Damien George
06d0083468
extmod/modlwip: Use mp_raise_OSError helper function.
Reduces esp8266 code size by about 230 bytes.
8 years ago
Damien George
620c4c32bf
extmod/vfs_fat: Use mp_raise_OSError helper function.
8 years ago
Damien George
3a0a771730
py: Add mp_raise_OSError(errno) helper function.
This is an often used code pattern, and its use reduces code size of the
core by about 100 bytes.
8 years ago
dmanso
0363e1d7b5
esp8266: Add FLASH_MODE,FLASH_SIZE options for make deploy target.
Added options to make deploy so it can be used for ESP8266 boards with
other flash configurations. For example NodeMCU DEVKIT V1.0 can now use:
$ make FLASH_MODE=dio FLASH_SIZE=32m deploy
8 years ago
Alex March
00c1fc6d77
docs/uos: Add uos.statvfs() documentation.
8 years ago
Damien George
82af4d6749
tests: Improve coverage of struct with test for non-compliant behaviour.
8 years ago
Damien George
dffa383b06
py/modstruct: Remove unreachable code, and add comment about CPy diff.
The deleted code is unreachable because calcsize_items guarantees that
num_items corresponds to how many items there are in fmt to unpack.
8 years ago
Alex March
9fdba0e09c
tests/extmod/uzlib: Test adaptive huffman tree for tinflate coverage.
8 years ago
Damien George
056da75a8a
esp8266: Make PY_UHASHLIB_SHA1 config depend on PY_USSL and SSL_AXTLS.
SHA1 can only be supported if ussl module is compiled in, and it uses
axtls.
8 years ago
Damien George
0bb3c7d3b7
stmhal: Enable machine.time_pulse_us() function.
8 years ago
Dave Hylands
c08f50bcf7
stmhal: Disable network and usocket for ESPRUINO_PICO
8 years ago