Commit Graph

12424 Commits

Author SHA1 Message Date
hathach 3d8bb96f75 update gitignore 2018-05-15 13:23:32 +07:00
Matt Wozniski 086bffb594 Update errno tests to match new expected behavior
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
2018-05-14 23:16:18 -04:00
Damien George cdaace1fdf esp32/modnetwork: Fix STA/AP activate/deactivate for new IDF API.
WIFI_MODE_NULL is no longer supported by the ESP IDF, instead one must use
esp_wifi_start/esp_wifi_stop.
2018-05-15 11:50:37 +10:00
Damien George c97607db5c py/nlrx86: Use naked attribute on nlr_push for gcc 8.0 and higher.
gcc 8.0 supports the naked attribute for x86 systems so it can now be used
here.  And in fact it is necessary to use this for nlr_push because gcc 8.0
no longer generates a prelude for this function (even without the naked
attribute).
2018-05-15 11:17:28 +10:00
Roy Hooper 06b6a10a5e switch autoreload to reloadexception 2018-05-14 17:44:50 -04:00
Roy Hooper 92b1cb5743 move reload exception to reload.c 2018-05-14 17:41:17 -04:00
Roy Hooper 698912633f Rename reload_next_character to reload_requested to make it match it's intended use 2018-05-14 17:00:38 -04:00
Roy Hooper 567f3e30a7 Initial implementation of supervisor.reload() 2018-05-14 16:57:50 -04:00
Dan Halbert d655e2194c
Merge pull request #833 from rhooper/master
Fix for Issue #770 - Provide a better error message when timers are s…
2018-05-14 16:36:43 -04:00
Scott Shawcroft 321f882b6c
Merge pull request #834 from khawley/docs-makefile-fixes
Cleaning up and fixing the docs generation Makefile and README instructions
2018-05-14 16:09:39 -04:00
Kattni 10054b2b02
Merge pull request #831 from wickedchicken/wickedchicken-patch-1
Add all boards with links to specific guides
2018-05-14 15:53:30 -04:00
Dan Halbert 1fde63b23e
Merge pull request #836 from bildzeitung/dmklein_uclxn
Renames ucollections -> collections
2018-05-14 15:46:50 -04:00
Kattni 27f2421e45
Merge pull request #832 from wickedchicken/wickedchicken-patch-2
Add links to CircuitPython guides and example code
2018-05-14 15:41:03 -04:00
Matt Wozniski 5833cbe6de Display human readable strings for common OSErrors
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
2018-05-14 15:12:40 -04:00
Matt Wozniski 0518cc1d94 Include uerrno for boards with external SPI flash
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
2018-05-14 15:12:35 -04:00
bildzeitung bf26ffbf56 Updated tests; removed try/catch for ucollections 2018-05-14 14:43:34 -04:00
bildzeitung a8cc4a1a62 Updated library source: ucollections -> collections 2018-05-14 14:33:50 -04:00
bildzeitung 2ff7148d09 Update docs s/ucollections/collections/g 2018-05-14 14:31:56 -04:00
Mike Stipicevic c43a75b115 Add links to CircuitPython guides and example code 2018-05-14 18:05:59 +00:00
Karin Hawley f9ae1ee172 Cleaning up and fixing the docs generation Makefile and README instructions
- moving Makefile to parent folder.  This resolves some of the weird path/build issues
- remove trace references to cpydiff and original file (no longer used anywhere)
- converting SOURCEDIR to a changeable variable, passed through all sphinx-build calls
- adding path to conf.py, in case it moves again
- making `-v` default with VERBOSE
- making `-E` default with FORCE
- creating BASEOPTS to store all the dirs, paths, and settings, passing them to sphinx-build in one long chain, instead of individually
- updating README to use the make command as default.  Also added text explaining some of the customization you can add into a make command
2018-05-14 11:02:25 -07:00
Roy Hooper a0954b9e11 Fix for Issue #770 - Provide a better error message when timers are still available. 2018-05-14 13:52:32 -04:00
Mike Stipicevic f004da1b37 Add all boards with links to specific guides 2018-05-14 17:36:12 +00:00
Scott Shawcroft ad82a2d08d
Merge pull request #830 from rhooper/master
Make python detection more robust
2018-05-14 09:14:36 -07:00
Roy Hooper 1661cbb6e1 Make python detection more robust and allow setting PYTHON2 and PYTHON3 to override python executables during build. 2018-05-14 11:19:19 -04:00
Damien George e6b66f1092 stm32/usb: Initialise cdc variable to prevent compiler warnings.
Some compilers cannot deduce that cdc will always be written before being
used.
2018-05-15 00:18:03 +10:00
Damien George 47ecbbbecb stm32/usb: Add ability to have 2x VCP interfaces on the one USB device.
This patch adds the configuration MICROPY_HW_USB_ENABLE_CDC2 which enables
a new USB device configuration at runtime: VCP+VCP+MSC.  It will give two
independent VCP interfaces available via pyb.USB_VCP(0) and pyb.USB_VCP(1).
The first one is the usual one and has the REPL on it.  The second one is
available for general use.

This configuration is disabled by default because if the mode is not used
then it takes up about 2200 bytes of RAM.  Also, F4 MCUs can't support this
mode on their USB FS peripheral (eg PYBv1.x) because they don't have enough
endpoints.  The USB HS peripheral of an F4 supports it, as well as both the
USB FS and USB HS peripherals of F7 MCUs.
2018-05-14 23:44:45 +10:00
Damien George 2e565cc0d4 stm32/usb: Change HID report funcs to take HID state, not usbdev state. 2018-05-14 17:04:43 +10:00
Damien George 91bca340ec stm32/usb: Change CDC tx/rx funcs to take CDC state, not usbdev state. 2018-05-14 16:55:04 +10:00
Damien George 68271a27e6 stm32/usb: Make CDC endpoint definitions private to core usbdev driver. 2018-05-14 16:53:45 +10:00
Damien George ed92d62326 stm32/usb: Combine HID lower-layer and interface state into one struct. 2018-05-14 16:34:31 +10:00
Damien George bf08a99ccd stm32/usb: Combine CDC lower-layer and interface state into one struct. 2018-05-14 16:15:58 +10:00
Damien George ed32284b70 stm32/usb: Use usbd_cdc_itf_t pointer directly in USB_VCP class. 2018-05-14 15:24:44 +10:00
Damien George fb25c81062 stm32/modpyb: Remove unused includes and clean up comments.
The documentation (including the examples) for elapsed_millis and
elapsed_micros can be found in docs/library/pyb.rst so doesn't need to be
written in full in the source code.
2018-05-14 14:01:50 +10:00
Damien George 88c26a48b4 stm32/pyb_i2c: Put pyb.I2C under MICROPY_PY_PYB_LEGACY setting.
When disabled, the pyb.I2C class saves around 8k of code space and 172
bytes of RAM.  The same functionality is now available in machine.I2C
(for F4 and F7 MCUs).

It is still enabled by default.
2018-05-14 13:53:46 +10:00
Damien George 92c5e2708d stm32/modpyb: Introduce MICROPY_PY_PYB_LEGACY config option for pyb mod.
This is enabled by default.  When it is disabled all legacy functions and
classes in the pyb module are excluded from the build.
2018-05-14 13:49:22 +10:00
Damien George a0f7b4c678 stm32/accel: Switch pyb.Accel to use new C-level I2C API. 2018-05-14 13:23:18 +10:00
Damien George ce824bb67e stm32/machine_i2c: Use new F4 hardware I2C driver for machine.I2C class.
And remove the old one based on ST code.
2018-05-14 13:22:12 +10:00
Damien George b21415ed4f stm32/i2c: Add new hardware I2C driver for F4 MCUs.
This driver uses low-level register access to control the I2C peripheral
(ie it doesn't rely on the ST HAL) and provides the same C-level API as the
existing F7 hardware driver.
2018-05-14 13:19:03 +10:00
Jerry Needell d9f1b1f5b7 remove #include py/nlr.h from I2C.c 2018-05-13 22:32:32 -04:00
Jerry Needell aa9309704b revise to use mp_raise_msg insead of nlr_raise.... 2018-05-13 22:21:05 -04:00
Peter D. Gray ca36645410 stm32/usbd_hid_interface: Address possible race condition vs. interrupt.
The USB IRQ may fire once USBD_HID_ClearNAK() is called and then change the
last_read_len value.
2018-05-14 12:08:34 +10:00
Peter D. Gray 1f1623d3b7 stm32/usbdev: Be honest about data not being written to HID endpoint.
USB_HID.send() should now return 0 if it could not send the report to the
host.
2018-05-14 12:01:27 +10:00
Jerry Needell d6c26942a5 add timeout keyword to I2C - for bitbangio - ignored for busio 2018-05-13 21:54:44 -04:00
Bas Wijnen 67e1a4f8be esp32: Update to latest ESP IDF version.
- Updated supported git hash to current IDF version.
- Added missing targets and includes to Makefile.
- Updated error codes for networking module.
- Added required constant to sdkconfig configuration.
2018-05-14 11:42:46 +10:00
Damien George 749b16174b py/mpstate.h: Adjust start of root pointer section to exclude non-ptrs.
This patch moves the start of the root pointer section in mp_state_ctx_t
so that it skips entries that are not pointers and don't need scanning.

Previously, the start of the root pointer section was at the very beginning
of the mp_state_ctx_t struct (which is the beginning of mp_state_thread_t).
This was the original assembler version of the NLR code was hard-coded to
have the nlr_top pointer at the start of this state structure.  But now
that the NLR code is partially written in C there is no longer this
restriction on the location of nlr_top (and a comment to this effect has
been removed in this patch).

So now the root pointer section starts part way through the
mp_state_thread_t structure, after the entries which are not root pointers.

This patch also moves the non-pointer entries for MICROPY_ENABLE_SCHEDULER
outside the root pointer section.

Moving non-pointer entries out of the root pointer section helps to make
the GC more precise and should help to prevent some cases of collectable
garbage being kept.

This patch also has a measurable improvement in performance of the
pystone.py benchmark: on unix x86-64 and stm32 there was an improvement of
roughly 0.6% (tested with both gcc 7.3 and gcc 8.1).
2018-05-13 22:53:28 +10:00
Scott Shawcroft ce5eae1c76
Merge pull request #761 from jepler/nrf-modules
nrf: Enable binascii, hashlib modules
2018-05-11 19:40:45 -07:00
Damien George aeaace0737 stm32/usbdev: Remove unused RxState variable, and unused struct. 2018-05-11 23:20:59 +10:00
Damien George 4b3c629067 .gitattributes: Remove special text handling of stm32 usbdev files. 2018-05-11 23:07:57 +10:00
Damien George abde0fa226 stm32/usbdev: Convert files to unix line endings.
Also remove trailing whitespace and convert tabs to spaces.
2018-05-11 23:03:52 +10:00
Jeff Epler 471fdae993 nrf: Enable binascii, hashlib modules
These modules would be very handy to have in order to implement a
more robust replacement for ampy.  It costs around 2KiB of text and
no data or bss.

'binascii' has base64 encoding, which can be used to create a fully
8-bit-clean transport above the slightly cooked serial connection of
these boards.

'hashlib' is a bit less critical, but I have found it handy to
be able to robustly checksum remote files.

I see this as only being useful on ports which don't have USB block
device support, so atmel-samd doesn't need it.  These modules are
already on esp8266 so I think nrf52 seems like the only one that
needs it.
2018-05-11 07:41:09 -05:00