Commit Graph

4104 Commits

Author SHA1 Message Date
Daniel Campora
371f4ba6b3 cc3200: Wrap antenna_init0() with #if MICROPY_HW_ANTENNA_DIVERSITY. 2015-06-08 10:38:19 +02:00
Damien George
0aa5e75000 stmhal: Break immediately from USB CDC busy wait loop if IRQs disabled.
If IRQs are disabled then the USB CDC buffer will never be
drained/filled and the sys-tick timer will never increase, so we should
not busy wait in this case.
2015-06-07 23:48:07 +01:00
Daniel Campora
491c321720 cc3200: Re-config antenna selection when waking from suspended mode. 2015-06-07 13:28:47 +02:00
Daniel Campora
b4a41a8f70 cc3200: Add missing antenna diversity source files. 2015-06-07 00:42:40 +02:00
Daniel Campora
a3acaa000c cc3200: Add antenna selection feature to WLAN. 2015-06-07 00:06:27 +02:00
Paul Sokolovsky
098f5ae221 micropython-upip: Mark as binary file and re-commit. 2015-06-06 23:09:23 +03:00
Paul Sokolovsky
1406d9ccde upip: Upgrade to 0.5.3 to follow uctypes.struct() signature change. 2015-06-06 23:03:28 +03:00
Paul Sokolovsky
06e85ecfa6 docs/uctype: Update for constructor argument order changes.
Also, other small cleanups/improvements.
2015-06-06 22:58:04 +03:00
Paul Sokolovsky
1679696612 moductypes: Swap address and descriptor args in constructor.
Now address comes first, and args related to struct type are groupped next.
Besides clear groupping, should help catch errors eagerly (e.g. forgetting
to pass address will error out).

Also, improve args number checking/reporting overall.
2015-06-06 22:57:54 +03:00
Paul Sokolovsky
07408cbd1f unix: Make micropython -m <module> work for frozen modules.
This requires some special handling, which was previosuly applied only to
the main code path.
2015-06-06 00:10:58 +03:00
Damien George
d7192fe68c py: Expose KeyboardInterrupt in builtins module. 2015-06-05 10:46:22 +01:00
Damien George
3eece29807 docs: Change "Micro Python" to "MicroPython" in all places in docs. 2015-06-04 23:53:26 +01:00
Damien George
601cfea6a3 docs: Update license date range to include 2015. 2015-06-04 23:47:10 +01:00
Daniel Campora
7ca1bd314b docs: Generate a separate docs build for each port.
Using Damien's approach where conf.py and topindex.html are
shared by all ports.
2015-06-04 23:44:35 +01:00
Damien George
031278f661 unix: Allow to cat a script into stdin from the command line.
See issue #1306.
2015-06-04 23:42:45 +01:00
Paul Sokolovsky
9724a0538b windows/README: Add notes on running under Wine.
After enabling line editing support on Windows console, this is no longer
trivial.
2015-06-04 19:29:51 +03:00
stijn
87ad80edf9 windows: Implement the mp_hal_xxx functions and enable mp-readline 2015-06-04 19:22:13 +03:00
Damien George
567b349c2b py: Implement native multiply operation in viper emitter. 2015-06-04 14:00:29 +00:00
Damien George
4d9cad180d py: Implement implicit cast to obj for viper load/store index/value.
This allows to do "ar[i]" and "ar[i] = val" in viper when ar is a Python
object and i and/or val are native viper types (eg ints).

Patch also includes tests for this feature.
2015-06-04 11:52:16 +01:00
Daniel Campora
a3cf4ea2f6 cc3200: Do not kick the watchdog inside the idle task. 2015-06-04 10:13:55 +02:00
Daniel Campora
71f85cc330 cc3200: Close ftp and telnet server sockets if listening fails. 2015-06-04 10:13:53 +02:00
Damien George
53a8aeb6e7 stmhal: Fix slow SPI DMA transfers by removing wfi from DMA wait loop.
Addresses issue #1268.
2015-06-03 23:20:23 +01:00
Damien George
80f638fe19 tests: Add test for recursive iternext stack overflow. 2015-06-03 22:41:06 +01:00
Damien George
953c23b1bc py: Add stack check to mp_iternext, since it can be called recursively.
Eg, builtin map can map over a map, etc, and call iternext deeply.

Addresses issue #1294.
2015-06-03 22:19:41 +01:00
Damien George
181adc6a4e unix: Update .gitignore; now ignores coverage build. 2015-06-03 17:47:31 +01:00
Paul Sokolovsky
c36635c112 unix: Prepare upip frozen modules under build/. 2015-06-03 19:28:31 +03:00
Paul Sokolovsky
f8a39e3bb1 tools/make-frozen.py: Handle trailing slash in argument more reliably. 2015-06-03 19:28:31 +03:00
Damien George
0e6c89a5c8 tools: Add codestats.sh to compute code statistics such as size, speed. 2015-06-03 15:38:43 +00:00
Daniel Campora
cc20482aa9 cc3200: Add method to configure the servers timeout.
With network.server_timeout(secs) the timeout can be changed.
The default value is 300 secs. Minimmum accpeted is 5 secs.
Without params the function returns the current configured timeout.
2015-06-03 17:31:21 +02:00
Paul Sokolovsky
a546acda8c unix: Uncompress upip tarball to build directory. 2015-06-03 01:55:54 +03:00
Paul Sokolovsky
a32538bb66 esp8266: Do not call espconn_create in constructor of esp.socket.
Turns out this is supposed to be called only for UDP connections.

Patch by Josef Gajdusek.
2015-06-02 22:40:06 +03:00
Daniel Campora
2ffb6e1b15 cc3200: Fix 'MP_QSTR_sd' undeclared error when building for the LAUNCHXL. 2015-06-02 13:11:01 +02:00
Paul Sokolovsky
32ce72cb9e docs/uctypes: Typo fix. 2015-06-02 10:35:06 +03:00
Paul Sokolovsky
f8bce131c0 docs/uctypes: Fix API description errors.
"Structure class" is its descriptor, encoded as a dictionary. Then,
uctypes.struct() instantiates an actual object, and thus requires memory
address.
2015-06-02 10:30:01 +03:00
Paul Sokolovsky
0df20da4dd tools: Add upip 0.5.2 tarball.
So unix version, which now includes upip as a frozen module, can be built
without Internet connection.
2015-06-02 01:32:07 +03:00
Paul Sokolovsky
9456732b86 unix: Include upip as fronzen modules inside the standard interpreter.
MicroPython doesn't come with standard library included, so it is important
to be able to easily install needed package in a seamless manner. Bundling
package manager (upip) inside an executable solves this issue.

upip is bundled only with standard executable, not "minimal" or "fast"
builds.
2015-06-02 01:32:07 +03:00
Paul Sokolovsky
2fc1e64319 esp8266: Fix lost chars problem when block-xfering data (e.g., when pasting).
Pasting more or less sizable text into ESP8266 REPL leads to random chars
missing in the received input. Apparent cause is that using RTOS messages
to pass individual chars one by one is to slow and leads to UART FIFO
overflow. So, instead of passing chars one by one, use RTOS msg to signal
that input data is available in FIFO, and then let task handler to read
data directly from FIFO.

With this change, lost chars problem is gone, but the pasted text is
truncated after some position. At least 500 chars can be pasted reliably
(at 115200 baud), but 1K never pastes completely.
2015-06-01 23:57:19 +03:00
Dave Hylands
3ac2d06bd1 stmhal: Add support for UART5
I tested this on my CERB40 board and it seems to be working fine.
2015-06-01 00:14:46 +01:00
Paul Sokolovsky
18fda7b42f frozenmod: Include header with function prototypes. 2015-05-31 23:02:04 +03:00
Damien George
db52fd8e4d py: Wrap qstr defs in quotes to protect from C preprocessor.
This patch converts Q(abc) to "Q(abc)" to protect the abc from the
C preprocessor, then converts back after the preprocessor is finished.
So now we can safely put includes in mpconfig(port).h, and also
preprocess qstrdefsport.h (latter is now done also in this patch).

Addresses issue #1252.
2015-05-30 23:14:34 +01:00
Damien George
0ec8cf8e80 py/parsenum.c: Rename "raise" func to "raise_exc" to avoid name clash.
"raise" is a common word that was found to exist in a vendor's stdlib.
2015-05-30 23:13:16 +01:00
Damien George
4e4772bb5b py: Add further autodetection of endianess in mpconfig.h.
This patch was needed for gcc 4.4.
2015-05-30 23:12:30 +01:00
Damien George
26b512ea1b py: Get makeqstrdata.py and makeversionhdr.py running under Python 2.6.
These scripts should run under as wide a range of Python versions as
possible.
2015-05-30 23:11:16 +01:00
Josef Gajdusek
7d8edeff4e esp8266: Update to SDK version 1.1.0 (MIT-licensed).
1. Updated linker script, now user app appears to contain exception vector
table and oesn't work (faults) without it.
2. Commened out support for GPIO pulldown, which was removed in this SDK
version without clear explanation, but apparently because it was released
without proper validation, and now turns out it doesn't work as expected,
or there's a different function there.
2015-05-30 20:58:59 +03:00
Radomir Dopieralski
78ccb44a90 docs: Document esp module for ESP8266.
I document as much as I could guess from experiments and reading the
code for the ``esp`` module for the ESP8266 port of Micropython.

For now the tag has to be set manually with -t option when building,
when we have properly split documentation, there will be a separate
config file for esp8266 with that the tag "port_esp8266" set.

To build use:

make SPHINXOPTS="-t port_esp8266" html
2015-05-30 12:49:58 +01:00
stijn
278d22ce8f lib/mp-readline: Allow overriding implementation of cursor functions
Default implementation uses VT100-style sequences which are not implemented
by all terminals out there
2015-05-30 13:38:34 +03:00
stijn
9a522dda6e lib/mp-readline: Add implementation for deleting a character
xterm and others use the ESC[~3 sequence when pressing the delete key
2015-05-30 13:38:24 +03:00
stijn
100004eeaf unix: Print an extra newline to the output on ctrl-D
This assures the terminal prints it's prompt on a fresh line instead of
appending it to the uPy prompt after exit.
2015-05-30 13:38:17 +03:00
Paul Sokolovsky
6a664cb114 unix: minimal: Don't use readline support.
After switching to builtin readline support, "minimal" no longer builds, and
minimal doesn't really need readline support.
2015-05-30 13:13:43 +03:00
Paul Sokolovsky
51726b4d43 unix: Allow to override default sys.path value.
Using MICROPY_PY_SYS_PATH_DEFAULT macro define. A usecase is building a
distribution package, which should not have user home path by default in
sys.path. In such case, MICROPY_PY_SYS_PATH_DEFAULT can be defined on
make command-line (using CFLAGS_EXTRA).
2015-05-30 01:07:58 +03:00