Commit Graph

4947 Commits

Author SHA1 Message Date
Alex March
34472302d6 lib/fatfs: Unify fatfs configuration.
- A single ffcon.h file to configure fatfs settings across ports.
- A single diskio.h file with common drive definitions.
- Removed now reduntand ffconf_template.h.
2015-11-08 22:21:17 +00:00
Paul Sokolovsky
6e68a68d18 unix/gccollect: Fallback to setjmp-based register fetching automatically.
Now, if we build for an architecture which doesn't have dedicated support
for getting registers for GC scanning, fallback to setjmp-based method
automatically. It's still possible to force setjmp-based implementation
on archs with dedicated support (e.g. for testing, or for peculiar calling
conventions/optimizations).
2015-11-08 16:05:33 +02:00
Dave Hylands
57e00ef262 stmhal: Fix RTC code to work on the F7 2015-11-07 09:42:26 -08:00
Dave Hylands
7f3c0d1ea8 py: Clear finalizer flag when calling gc_free.
Currently, the only place that clears the bit is in gc_collect.
So if a block with a finalizer is allocated, and subsequently
freed, and then the block is reallocated with no finalizer then
the bit remains set.

This could also be fixed by having gc_alloc clear the bit, but
I'm pretty sure that free is called way less than alloc, so doing
it in free is more efficient.
2015-11-07 14:26:11 +00:00
Dave Hylands
41b688e25f stmhal: Print more information at HardFault time. 2015-11-07 13:59:00 +00:00
Paul Sokolovsky
89f2ddd2d0 tools/pyboard.py: Don't add terminating \x04 character to stdout output. 2015-11-07 13:48:35 +00:00
Damien George
b7ca945877 lib/mp-readline: Make it easy to exit auto-indent mode by pressing enter.
This patch allows you to stop auto-indent by pressing enter on a second
blank line.  Easier than having to use backspace, and prevents new users
from getting stuck in auto-indent mode.
2015-11-07 13:07:43 +00:00
Paul Sokolovsky
e6dccaf18e tools/pyboard.py: Make -c (inline Python code) option compatible with python2. 2015-11-07 12:16:11 +03:00
Tony Abboud
ae58035573 stmhal: Add missing regex property for parsing header comments 2015-11-06 23:32:55 +00:00
Damien George
8b8d189bc0 py: Adjust object repr C (30-bit stuffed float) to reduce code size.
This patch adds/subtracts a constant from the 30-bit float representation
so that str/qstr representations are favoured: they now have all the high
bits set to zero.  This makes encoding/decoding qstr strings more
efficient (and they are used more often than floats, which are now
slightly less efficient to encode/decode).

Saves about 300 bytes of code space on Thumb 2 arch.
2015-11-06 23:25:10 +00:00
T S
8f7ff854b0 stmhal/rtc: LSx oscillator is only initialized upon initial power up.
Initial power up also includes VBAT.

If LSE is configured but fails to start, LSI is used until next full power
cycle.  Also handles STM32F7xx variant.
2015-11-06 22:00:34 +00:00
Paul Sokolovsky
8bfa11b138 minimal: Clarify comments. 2015-11-07 00:30:08 +03:00
danicampora
8cee03b118 cc3200: Force SSL method to be TLSV1.
The default setting of using the "highest" method available doesn't
work with some servers like Microsoft Azure. TLSV1 seems to work with
pretty much any server.
2015-11-06 00:12:13 +01:00
danicampora
1673e19cb9 cc3200: Make telnet server ignore NULL characters.
This fixes paste mode (Ctrl-E) which was not working for the
telnet REPL.
2015-11-05 21:42:58 +01:00
Galen Hazelwood
af3e45419c extmod/lwip: Change void pointers to unions, include new mphal.h file 2015-11-04 23:24:04 +03:00
Dave Hylands
53ea2b5ce2 teensy: Switch over to using frozen modules instead of memzip
I left memzip in for the time being, so you can choose in
the Makefile whether to USE_FROZEN or USE_MEMZIP.

It looks like using frozen saves about 2472 bytes (using my
set of 15 python files), mostly due to overheads in the
zip file format.
2015-11-04 14:21:21 +00:00
Dave Hylands
074d713bfb lib/memzip: Factor out memzip from teensy/ into lib/memzip. 2015-11-04 14:21:10 +00:00
Dave Hylands
a9f3030371 docs: Add docs about REPL paste-mode and Control-C 2015-11-03 23:28:53 +00:00
Dave Hylands
98fb0bf68a docs: Move instructions on generating the documentation to docs/README.md 2015-11-03 23:28:27 +00:00
Dave Hylands
040f6f6711 minimal: Add an explicit comment on the gchelper.s line in the Makefile. 2015-11-04 00:57:35 +03:00
Mike Bryant
1bfa6ae6e4 README: Fix typo in package name. 2015-11-04 00:54:56 +03:00
Damien George
dde0c204e7 lib/pyexec: For paste mode use "Ctrl" as the name of the key, not "CTRL". 2015-11-03 00:33:56 +00:00
stijn
c76fe77f42 windows: Update build instructions in the README
- use correct 'mingw-w64' package name
- small grammar fixes
- modify Cygwin build instructions to use that same compiler as well: the
  original mingw is stuck at gcc v4.7 and does not seem to be updated anymore
- make it clear thet uPy also builds using Visual Studio versions > 2013
2015-11-02 23:23:09 +00:00
Henrik Sölver
35e7d9c0f1 stmhal/can: Fix a bug in filter handling.
Reported here: http://forum.micropython.org/viewtopic.php?f=2&t=845
2015-11-02 23:09:49 +00:00
Paul Sokolovsky
06f70973f7 unix/unix_mphal: Typo fix in comment. 2015-11-03 00:36:46 +03:00
Dave Curtis
32b3549cce stmhal: Add symbolic #defines for interrupt levels in irq.h. 2015-11-01 23:23:39 +00:00
danicampora
056cb288d9 cc3200: Remove includes of rom.h (must be included via rom_map.h). 2015-11-01 23:33:12 +01:00
danicampora
f67d06194f cc3200: Fix SPI clock divider calculation. 2015-11-01 23:33:12 +01:00
Paul Sokolovsky
d0601b0a1f extmod/re1.5: Workaround issue with mingw32-gcc 4.2.1. 2015-11-01 02:39:01 +03:00
Paul Sokolovsky
aeadf7607d windows/README: Deprecate mingw32, suggest using mingw64.
Ubuntu's mingw32 has gcc 4.2.1, which is rather old and has incorrect
non-initialized variable analysis which produces warnings, which
per MicroPython default settings get turned into errors.
2015-11-01 01:05:33 +03:00
Paul Sokolovsky
aee704ebe1 extmod/modure: Make sure that errors in regexps are caught early. 2015-11-01 00:38:22 +03:00
Paul Sokolovsky
7cce2f664c extmod/re1.5: Update to 0.8.
Contains implementation of ?: (non-capturing groups), ?? (non-greedy ?),
as well as much improved robustness, and edge cases and error handling by
Amir Plivatsky (@ampli).
2015-11-01 00:38:00 +03:00
Paul Sokolovsky
000a12783c cc3200: Use common pyexec.c . 2015-10-31 20:20:04 +03:00
Paul Sokolovsky
4deb4936d5 extmod/modlwip: socket->incoming changed by async callbacks, must be volatile.
Otherwise for code like:

while (socket->incoming == NULL) {
    LWIP_DELAY(100);
}

a compiler may cache it in a register and it will be an infinite loop.
2015-10-31 19:51:23 +03:00
Paul Sokolovsky
0ec51441de stmhal: pyexec.c is common module, move to lib/utils/ . 2015-10-31 19:35:10 +03:00
Damien George
731f359292 all: Add py/mphal.h and use it in all ports.
py/mphal.h contains declarations for generic mp_hal_XXX functions, such
as stdio and delay/ticks, which ports should provide definitions for.  A
port will also provide mphalport.h with further HAL declarations.
2015-10-31 19:14:30 +03:00
Paul Sokolovsky
0bd3f3291d tests/base/struct1.py: Add test for repetition counters. 2015-10-31 18:55:31 +03:00
Paul Sokolovsky
2b080cf599 py/modstruct: Support repetition counters for all types, not just string.
This makes format specifiers ~ fully compatible with CPython.

Adds 24 bytes for stmhal port (because previosuly we had to catch and report
it's unsupported to user).
2015-10-31 18:47:08 +03:00
Damien George
f705cb5f7a stmhal: Update PYBv3 and PYBv4 pin defs to include MMA pins, and others. 2015-10-31 11:14:15 +00:00
stijn
24b03561bd tests: Make sure test output has \r\n line-ends when running on Windows
This is the case already when using just subprocess.check_output, but in
the special cases (cmdline, meminfo, ...) the carriage return gets lost
during output processing so restore it in the end.
This fixes the micropython/meminfo.py test on Windows.
2015-10-31 14:11:19 +03:00
stijn
bd9f850e85 windows: Use write() instead of fwrite() to avoid out-of-order output.
This fixes the basics/exception_chain.py test, also see #1500 for more
info and [4300c7d] where the same change was done for the other ports.
2015-10-31 14:10:13 +03:00
adminpete
d6201fc4b7 py: In inline asm, vldr and vstr offsets now in bytes not words.
As per ARM convention.
2015-10-31 10:50:45 +00:00
Dave Hylands
165734522e stmhal: f7: Fix recent RTC change to build on F7. 2015-10-30 23:40:00 +00:00
Paul Sokolovsky
3833d3846d README: Adjust suggested path for generated docs. 2015-10-31 01:32:48 +03:00
Paul Sokolovsky
43efb46328 docs/library/index.rst: Minimally adapt for unix port. 2015-10-31 01:15:25 +03:00
Paul Sokolovsky
c6bc5b69c2 docs: Actually add unix port indexes, so docs for it could be generated. 2015-10-31 01:00:03 +03:00
Peter Hinch
3819634469 stmhal: Make RTC init skip startup if LTE is already enabled and ready.
This prevents the loss of RTC time when exiting from standby mode, since
the RTC is paused while it is being re-inited and this loses about 120ms.

Thanks to @chuckbook for the patch.
2015-10-30 13:13:42 +00:00
Dave Hylands
b83d0b35e9 stmhal: Add define for UNIQUE_ID address (differs per MCU) 2015-10-30 12:53:14 +00:00
Dave Hylands
823a961ecc stmhal: Enable sdcard on STM32F7DISC board. 2015-10-30 12:05:14 +00:00
omtinez
3510499a9e windows: Call _set_output_format() only on Visual Studio versions 2013 or lower.
Since VS2015, float formatting is C standard compliant by default:
https://msdn.microsoft.com/en-us/library/bb531344(v=vs.140).aspx
2015-10-30 11:37:58 +03:00