Commit Graph

12048 Commits

Author SHA1 Message Date
iabdalkader
90bb98e83d stm32/dac: Add support for H7 MCUs.
Includes a fix for H7 DAC DMA requests.
2018-04-10 14:21:26 +10:00
Jeff Epler
cbf981f330 py/objgenerator: Check stack before resuming a generator.
This turns a hard crash in a recursive generator into a 'maximum recursion
depth exceeded' exception.
2018-04-10 14:06:26 +10:00
armink
6a693db71d extmod/re1.5: Fix compilecode.c compile problem on IAR tool chain.
The 2nd and 3rd args of the ternary operator are treated like they are in
the same expression and must have similar types.  void is not compatible
with int so that's why the compiler is complaining.
2018-04-10 13:54:22 +10:00
Damien George
cf31d384f1 py/stream: Switch stream close operation from method to ioctl.
This patch moves the implementation of stream closure from a dedicated
method to the ioctl of the stream protocol, for each type that implements
closing.  The benefits of this are:

1. Rounds out the stream ioctl function, which already includes flush,
   seek and poll (among other things).

2. Makes calling mp_stream_close() on an object slightly more efficient
   because it now no longer needs to lookup the close method and call it,
   rather it just delegates straight to the ioctl function (if it exists).

3. Reduces code size and allows future types that implement the stream
   protocol to be smaller because they don't need a dedicated close method.

Code size reduction is around 200 bytes smaller for x86 archs and around
30 bytes smaller for the bare-metal archs.
2018-04-10 13:41:32 +10:00
T S
8f11d0b532 docs/library/pyb.ADC.rst: Document new features for ADCAll. 2018-04-10 13:06:26 +10:00
Jeff Epler
1e9a27177c esp8266: Disable "strict aliasing" in compiler like in atmel-samd
This caused a fatal compiler diagnostic after #750.  This compiler
flag is already specified in the atmel-samd builds, so it makes
sense to do it here for the same reasons.
2018-04-09 22:23:39 -04:00
Scott Shawcroft
fd70383aa0 Fix rom qstr pool length. 2018-04-09 22:23:39 -04:00
Scott Shawcroft
3b511e503a Prevent a heap pointer from living on the stack longer than we need. 2018-04-09 22:23:39 -04:00
Jeff Epler
eb7d0e317a Create genhdr/ directory in time 2018-04-09 22:23:39 -04:00
Dan Halbert
a0cd94c184
Merge pull request #752 from jepler/esp8266-strict-aliasing
esp8266: Disable "strict aliasing" in compiler like in atmel-samd
2018-04-09 22:21:21 -04:00
Jeff Epler
c5d2a0da04 esp8266: Disable "strict aliasing" in compiler like in atmel-samd
This caused a fatal compiler diagnostic after #750.  This compiler
flag is already specified in the atmel-samd builds, so it makes
sense to do it here for the same reasons.
2018-04-09 21:17:26 -05:00
Dan Halbert
3883a9fb7a
Merge pull request #749 from tannewt/analyze_heap_dump
Fix rom qstr pool length.
2018-04-09 20:35:34 -04:00
Dan Halbert
d203d1c1cb
Merge pull request #750 from tannewt/parse_tree_memory
Prevent a heap pointer from living on the stack longer than we need.
2018-04-09 20:34:40 -04:00
Scott Shawcroft
7dd1d6afcc Prevent a heap pointer from living on the stack longer than we need. 2018-04-09 16:02:32 -07:00
Scott Shawcroft
619b0ec164 Fix rom qstr pool length. 2018-04-09 15:59:52 -07:00
Dan Halbert
e7b8b13186
Merge pull request #748 from jepler/genhdr-output-directory
Create genhdr/ directory in time
2018-04-09 14:48:21 -04:00
Jeff Epler
88bbe425db Create genhdr/ directory in time 2018-04-09 13:31:44 -05:00
Dan Halbert
aa8c262d14 add storage.erase_filesystem() to erase and reformat CIRCUITPY 2018-04-09 12:52:42 -04:00
Scott Shawcroft
4e053cea0d
Merge pull request #628 from sommersoft/super_status
Added Function To Check the Serial Connection From CircuitPython Layer
2018-04-08 22:06:09 -07:00
Scott Shawcroft
93e09e7ee5
Merge pull request #738 from dhalbert/3.0_hid
3.0 hid
2018-04-08 22:02:23 -07:00
Dan Halbert
1e87a785b9 Move CDC Comm back to Interface 0 for compat with Win7 drivers. 2018-04-08 15:59:19 -04:00
Dan Halbert
e7305ce15f update usb_descriptor again 2018-04-08 10:15:47 -04:00
Dan Halbert
726d5e52a3 Merge branch 'master' into 3.0_hid 2018-04-08 09:52:29 -04:00
Dan Halbert
32048cdeeb tools/usb_descriptor updates 2018-04-08 09:51:45 -04:00
Dan Halbert
a159b85340 Reorder composite device interfaces; fix report length bug 2018-04-08 09:33:02 -04:00
Scott Shawcroft
9672f3891e
Merge pull request #742 from jepler/esp8266-sdk-fixes
Adapt to incompatible changes in the ESP8266 SDK
2018-04-07 10:01:33 -07:00
Jeff Epler
d69ef6bfd3 esp8266/etshal: delete incorrect function prototypes
these are function prototypes not used in circuitpython.  The
declarations began to conflict with ones in the upstream SDK
at some point, so delete them.
2018-04-06 20:37:48 -05:00
Paul Sokolovsky
4982a3ad32 esp8266/esp8266_common.ld: Put .text of more libs into .irom0.text .
Recent vendor SDKs ship libs with code in .text section, which previously
was going into .irom0.text. Adjust the linker script to route these
sections back to iROM (follows upstream change).
2018-04-06 20:37:41 -05:00
sommersoft
cc644032ea Merge branch 'super_status' of https://github.com/sommersoft/circuitpython into super_status 2018-04-06 01:58:29 +00:00
sommersoft
d1974e0038 supervisor/Runtime: updated documentation for 'no disconnect' 2018-04-06 01:56:51 +00:00
Scott Shawcroft
8f3bf5faf6
Merge pull request #741 from jepler/samd-reset-modes
Samd reset modes
2018-04-05 10:39:51 -07:00
Jeff Epler
92853e611d RunMode: Fix repr(RunMode.BOOTLOADER) 2018-04-05 08:16:53 -05:00
Jeff Epler
fe6f5aaa70 atmel-samd: reset: reset() was always entering bootloader mode
.. set the dbl_tap word to a different special value unless
RUNMODE_BOOTLOADER was selected
2018-04-05 08:16:53 -05:00
Jeff Epler
d6cf5c6749 py/objstr: In find/rfind, don't crash when end < start. 2018-04-05 16:14:17 +10:00
Damien George
b9c78425a6 tests/micropython/extreme_exc.py: Allow to run without any emg exc buf. 2018-04-05 03:03:16 +10:00
Damien George
4caadc3c01 tests/micropython/extreme_exc.py: Fix test to run on more ports/configs. 2018-04-05 02:33:48 +10:00
Damien George
f1df86a017 py/objint: Simplify LHS arg type checking in int binary op functions.
The LHS passed to mp_obj_int_binary_op() will always be an integer, either
a small int or a big int, so the test for this type doesn't need to include
an "other, unsupported type" case.
2018-04-05 01:11:26 +10:00
Damien George
5995a199a3 tests/micropython: Add set of tests for extreme cases of raising exc's. 2018-04-05 01:06:40 +10:00
Damien George
1bfc774a08 tests/basics/string_compare.py: Add test with string that hashes to 0.
The string "Q+?" is special in that it hashes to zero with the djb2
algorithm (among other strings), and a zero hash should be incremented to a
hash of 1.
2018-04-05 01:04:38 +10:00
Damien George
22161acf47 tests/basics/class_super.py: Add tests for store/delete of super attr. 2018-04-05 01:03:57 +10:00
Damien George
7b7bbd0ee7 tests/basics: Add tests for edge cases of nan-box's 47-bit small int. 2018-04-05 00:59:49 +10:00
Scott Shawcroft
5939497218
Merge pull request #740 from jepler/reboot-bootloader
atmel-samd: Fix rebooting to bootloader
2018-04-03 22:35:39 -07:00
Damien George
dd48ccb1e3 tests/basics: Add test for subclassing an iterable native type. 2018-04-04 15:26:18 +10:00
Damien George
df02f5620a tests/basics/int_big1.py: Add test for big int in mp_obj_get_int_maybe. 2018-04-04 15:23:32 +10:00
Damien George
3f420c0c27 py: Don't include mp_optimise_value or opt_level() if compiler disabled.
Without the compiler enabled the mp_optimise_value is unused, and the
micropython.opt_level() function is not useful, so exclude these from the
build to save RAM and code size.
2018-04-04 14:24:03 +10:00
Damien George
323b5f7270 py/modsys: Don't compile getsizeof function if feature is disabled. 2018-04-04 14:23:25 +10:00
Damien George
a45a34ec31 tests/stress: Add test to verify the GC can trace nested objects. 2018-04-04 14:22:54 +10:00
Damien George
7d5c753b17 tests/basics: Modify int-big tests to prevent constant folding.
So that these tests test the runtime behaviour, not the compiler (which may
be executed offline).
2018-04-04 13:57:22 +10:00
Damien George
f684e9e1ab tests/basics/int_big1.py: Add test converting str with non-print chars. 2018-04-04 13:56:00 +10:00
Jeff Epler
5eb9f9d060 atmel-samd: Fix rebooting to bootloader
Commit efbf08266b moved _estack in order to ensure 8-byte alignment
of the stack, but the address of _bootloader_dbl_tap must remain
right at the end of SRAM.

I verified by reading the source that the 4-byte-aligned address is
used for all samd21 / samd51 boards in
adafruit/circuitpython@efbf08266b.  However, I only tested on
trinket_m0.

Closes: #739
2018-04-03 21:40:10 -05:00