Commit Graph

5341 Commits

Author SHA1 Message Date
Paul Sokolovsky
3aa0f2eed3 extmod/vfs_fat_lexer: Make conditional on FatFs support enabled. 2016-03-03 14:08:27 +02:00
Paul Sokolovsky
453a2a3d7c extmod/vfs_fat: Add lexer, move from stmhal port for reuse. 2016-03-03 13:25:44 +02:00
Paul Sokolovsky
701c4152c1 tarvis: Unbreak build by ignoring lack of i386 arch in some repos.
For some reason, Travis now has Google Chrome PPA included in the builder
image, that lacks i386 arch, that leads to apt-get update error. So, ignore
it (this is not ideal as may lead to actual repo update failures to be missed,
leading to installation of old package, leading to weird errors; let's keep
that in mind).
2016-03-03 11:06:36 +02:00
Damien George
02ea74d8f5 esp8266: Add network.ifconfig(). 2016-03-02 23:04:21 +02:00
Damien George
1febaf3ac3 esp8266: Change "soft reboot" message to work with pyboard.py. 2016-03-02 22:58:48 +02:00
Damien George
d083d7d610 esp8266: Allow Makefile's PORT variable to be overridden. 2016-03-02 22:50:55 +02:00
Damien George
6f4357c28e esp8266: Enable math module. 2016-03-02 22:43:10 +02:00
Damien George
6d0629bddc esp8266: Enable float support, using 30-bit stuffed floats.
No complex numbers though.
2016-03-02 22:43:10 +02:00
Damien George
ecd1272d16 esp8266: Switch bignum implementation from long-long to mpz. 2016-03-02 22:43:10 +02:00
Damien George
3d1d92acfc mpy-cross: Give a more sensible error message when file doesn't exist. 2016-03-02 16:12:00 +00:00
Noah Rosamilia
6bb9d3ea3e docs/uctypes.rst: Fix typo (steamlined -> streamlined). 2016-03-02 00:25:10 +02:00
Paul Sokolovsky
dc320164d8 unix/modsocket: Add comment regarding close() error checking (which is none). 2016-03-02 00:20:48 +02:00
Damien George
4f72aa86bf py/qstrdefs: Add mkdir and remove qstrs for user-mountable filesystems. 2016-02-29 10:54:00 +00:00
Paul Sokolovsky
2740dd85f2 tests/vfs_fat_ramdisk: Add testcase for .rename(). 2016-02-29 01:24:18 +02:00
Paul Sokolovsky
e0821830b0 extmod/vfs_fat: Add .rename() method. 2016-02-29 01:23:53 +02:00
Paul Sokolovsky
09e363316f extmod/vfs_fat_misc: Fix cc3200 port build. 2016-02-29 01:15:19 +02:00
Paul Sokolovsky
9fb36af9af tests/vfs_fat_ramdisk: Allow to run in native mode (don't use "with"). 2016-02-29 01:03:32 +02:00
Paul Sokolovsky
08fed6992f extmod/vfs_fat_misc: Add func prototype for pedantic warnings. 2016-02-29 00:48:45 +02:00
Paul Sokolovsky
6ef65e70af extmod/vfs_fat: Add fat_vfs_import_stat(), reusable import stat routine.
Moved from stmhal.
2016-02-29 00:44:32 +02:00
Paul Sokolovsky
eaa96a7610 tests/vfs_fat_ramdisk: Add testcase for .mkdir(). 2016-02-29 00:06:44 +02:00
Paul Sokolovsky
bbe832a0b2 extmod/vfs_fat: Add .mkdir() method. 2016-02-29 00:03:20 +02:00
Paul Sokolovsky
6f469209e9 extmod/vfs_fat: Fix unused param warning/error. 2016-02-28 20:45:51 +02:00
Paul Sokolovsky
57425b648f tests/vfs_fat_ramdisk: Add testcase for .remove(). 2016-02-28 20:30:59 +02:00
Paul Sokolovsky
19749db7bf extmod/vfs_fat: Add .remove() method.
Based on stmhal implementation - rather small, so just duplicating.
2016-02-28 20:30:07 +02:00
Paul Sokolovsky
9c081b740b tests/vfs_fat_ramdisk: Add .listdir() testcase. 2016-02-28 17:19:12 +02:00
Paul Sokolovsky
cd6d189f48 extmod/vfs_fat: Move listdir() method from stmhal for reuse. 2016-02-28 17:17:24 +02:00
danicampora
8a18084571 cc3200: Update WiPy software version to 1.2.0 2016-02-27 00:19:53 +01:00
Damien George
ac23662550 unix: Enabled importing of persistent bytecode (.mpy files). 2016-02-25 10:12:30 +00:00
Damien George
476c15290d stmhal: Enabled importing of persistent bytecode (.mpy files). 2016-02-25 10:12:30 +00:00
Damien George
56f76b873a mpy-cross: Add new component, a cross compiler for MicroPython bytecode.
This component allows to generate .mpy files (pre compiled bytecode)
which can be executed within any MicroPython runtime/VM.
2016-02-25 10:12:21 +00:00
Damien George
ea23520403 py: Add MICROPY_DYNAMIC_COMPILER option to config compiler at runtime.
This new compile-time option allows to make the bytecode compiler
configurable at runtime by setting the fields in the mp_dynamic_compiler
structure.  By using this feature, the compiler can generate bytecode
that targets any MicroPython runtime/VM, regardless of the host and
target compile-time settings.

Options so far that fall under this dynamic setting are:
- maximum number of bits that a small int can hold;
- whether caching of lookups is used in the bytecode;
- whether to use unicode strings or not (lexer behaviour differs, and
  therefore generated string constants differ).
2016-02-25 10:05:46 +00:00
danicampora
57b96a7be2 docs: Correct machine.Timer code examples related to duty cycle. 2016-02-23 20:22:26 +01:00
danicampora
8e1fdf2eb3 docs: Add note on machine.Timer class regarding PWM output pins. 2016-02-23 19:53:59 +01:00
Damien George
28adab36c7 py/emitinlinethumb: Use qstrs instead of char* for names of asm ops.
Reduces code size by 112 bytes on Thumb2 arch, and makes assembler faster
because comparison can be a simple equals instead of a string compare.

Not all ops have been converted, only those that were simple to convert
and reduced code size.
2016-02-23 15:20:39 +00:00
Damien George
e9d1a94bf0 py/malloc: Provide a proper malloc-based implementation of realloc_ext. 2016-02-23 13:53:38 +00:00
Damien George
d6c558c0aa py/parse: Use m_renew_maybe to ensure that memory is shrunk in-place.
The chunks of memory that the parser allocates contain parse nodes and
are pointed to from many places, so these chunks cannot be relocated
by the memory manager.  This patch makes it so that when a chunk is
shrunk to fit, it is not relocated.
2016-02-23 13:44:29 +00:00
danicampora
add930c4b5 cc3200: Rename 'server' class to 'Server' for consistency. 2016-02-22 22:54:34 +01:00
danicampora
12547ce737 docs: Minor change to improve clarity in machine.Timer docs. 2016-02-22 19:16:30 +01:00
danicampora
cc7a4d7db2 tests/wipy: Correct machine test expected result. 2016-02-22 00:42:05 +01:00
danicampora
5148860332 tests: Skip uctypes and urandom tests not supported byt the WiPy. 2016-02-21 22:30:35 +01:00
danicampora
495e7cfebc cc3200: Improve robustness of WLAN during sleep modes. 2016-02-21 22:01:18 +01:00
danicampora
f5248a087a cc3200: Fix "debug" build. 2016-02-21 21:53:21 +01:00
danicampora
0d210a0be8 docs: Correct WiPy Timer docs. 2016-02-21 21:53:20 +01:00
danicampora
fe9620a2bd test/wipy: Add Timer class tests. 2016-02-21 21:53:20 +01:00
danicampora
73c9f85b4c cc3200: Simplify the Timer API and correct the documents.
Make the PWM duty cycle configurable from 0.00 to 100.00 by
accepting values from 0 to 10000.
Add automatic Pin assignment when operating in PWM mode.
2016-02-21 21:53:16 +01:00
danicampora
562bcffd3a cc3200: Improve robustness of the I2C driver.
When scanning for devices, try reading then writing. Increase the
timeout of the transactions from 10 to 20 ms.
2016-02-21 21:41:06 +01:00
danicampora
ed8db2e371 cc3200: Finally fix the Timer class API.
Properly calculate the period and the prescaler, this now allows to
set the PWM frequency down to 5Hz. Make Timer IDs go from 0 to 3.
Add the trigger definitions for the channel IRQ.
2016-02-21 21:41:06 +01:00
Damien George
53fec1ef48 README.md: Add link to micropython.org. 2016-02-17 23:01:49 +00:00
Damien George
40d8430ee3 py/vm: Add macros to hook into various points in the VM.
These can be used to insert arbitrary checks, polling, etc into the VM.
They are left general because the VM is a highly tuned loop and it should
be up to a given port how that port wants to modify the VM internals.

One common use would be to insert a polling check, but only done after
a certain number of opcodes were executed, so as not to slow down the VM
too much.  For example:

 #define MICROPY_VM_HOOK_COUNT (30)
 #define MICROPY_VM_HOOK_INIT static uint vm_hook_divisor = MICROPY_VM_HOOK_COUNT
 #define MICROPY_VM_HOOK_POLL if (--vm_hook_divisor == 0) { \
     vm_hook_divisor = MICROPY_VM_HOOK_COUNT;
     extern void vm_hook_function(void);
     vm_hook_function();
 }
 #define MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_POLL
 #define MICROPY_VM_HOOK_RETURN MICROPY_VM_HOOK_POLL
2016-02-17 09:02:19 +00:00
Alex March
69d9e7d27d py/repl: Check for an identifier char after the keyword.
- As described in the #1850.
- Add cmdline tests.
2016-02-17 08:56:15 +00:00