Commit Graph

90 Commits

Author SHA1 Message Date
Dan Halbert
81581b345c Increase CPX stack size slightly 2019-12-16 17:25:22 -05:00
Dan Halbert
e11fabd5e0 moved nrf internal filesystem to just below bootloader 2019-12-12 14:57:23 -05:00
Dan Halbert
d9ca4c9a60 fix build failures 2019-12-10 22:39:44 -05:00
Dan Halbert
013c840862 working on all ports 2019-12-10 20:27:30 -05:00
Dan Halbert
d628d2a261 atmel-samd working 2019-12-06 15:18:20 -05:00
Dan Halbert
40434d6919 wip 2019-12-05 22:45:53 -05:00
Dan Halbert
1505da784f wip 2019-10-28 18:15:02 -04:00
Dan Halbert
7b79ac3739 Parameterize linker script 2019-10-20 23:50:12 -04:00
Dan Halbert
fbf166af1a enable MICROPY_CPYTHON_COMPAT for most builds except CIRCUITPY_SMALL_BUILD; remove a few other things to make fit 2019-03-20 14:36:24 -04:00
Dan Halbert
99da3b9646 Use critical section, not lock, in CharacteristicBuffer; use a root pointer for ble_drv list 2019-02-21 00:19:31 -05:00
Dan Halbert
97aeb1953b correct weak module links; samd module only in m4 ports; update libraries 2019-02-17 23:48:08 -05:00
Dan Halbert
7b3f7605b8 address @tannewt changes: move and rename common files; remove PORT_HEAP_SIZE 2019-02-15 20:32:32 -05:00
Dan Halbert
a345ef28f2 finish Makefile refactoring; nrf builds work 2019-02-15 18:55:10 -05:00
Dan Halbert
cf545cd477 WIP: fix issues with remaining atmel-samd builds 2019-02-15 09:52:45 -05:00
Dan Halbert
5154e0581e WIP: atmel-samd trinket build works 2019-02-15 00:28:20 -05:00
Scott Shawcroft
844c20106b
Turn off micropython.mem_info on SAMD to get ~1k back 2019-02-04 18:00:18 -08:00
Scott Shawcroft
601a910f4e
More improvements to Terminal:
* Fix Hallowing.
* Fix builds without displayio.
* Fix y bounds that appears as untrollable row of pixels.
* Add scrolling to TileGrid.
* Remove Sprite to save space. TileGrid is a drop in replacement.
2019-01-31 11:42:14 -08:00
Scott Shawcroft
1a1dbef992
Hook up the terminal based on the first display. 2019-01-31 11:42:14 -08:00
Scott Shawcroft
fb0970ec6e
Add terminalio 2019-01-31 11:42:13 -08:00
Scott Shawcroft
aaa644b223
Skip displayio on crickit builds and cpx build due to lack of space. 2019-01-22 18:49:37 -08:00
Scott Shawcroft
0cdbc004e6
Enable displayio on all Express boards. 2019-01-22 17:59:31 -08:00
Scott Shawcroft
a380865655
Merge remote-tracking branch 'adafruit/master' into HEAD 2019-01-22 14:02:07 -08:00
Scott Shawcroft
96e2c717fc
Fix build 2019-01-17 22:10:11 -08:00
Scott Shawcroft
6404aaf411
Fix up nrf and using board.SPI in FourWire 2019-01-17 18:19:07 -08:00
Scott Shawcroft
2d136d58bf
Fix other builds and hallowing 2019-01-17 14:45:29 -08:00
Scott Shawcroft
5277138c99
pyportal compiles and tweak blinka colors 2019-01-17 10:57:05 -08:00
Roy Hooper
ffe734edf7 Fresh combined checkin of _pixelbuf library. 2019-01-13 23:51:13 -05:00
Scott Shawcroft
b5e40f52c2
Add USB MIDI support for SAMD and nRF.
The API should be identical to using a UART for MIDI.

Fixes #672
2019-01-09 14:02:11 -08:00
Scott Shawcroft
801d9a5abc
Fix running the USB task on nRF.
It wasn't being run due to a rework done only on the atmel-samd port.
The rework itself isn't needed now that the heap check triggers safe
mode instead of throwing a Python exception. So, I've removed the
rework.
2018-12-07 16:11:21 -08:00
Scott Shawcroft
7ad2e6ace3
Add stack validity check and raise an error when it happens.
The backtrace cannot be given because it relies on the validity
of the qstr data structures on the heap which may have been
corrupted.

In fact, it still can crash hard when the bytecode itself is
overwritten. To fix, we'd need a way to skip gathering the
backtrace completely.

This also increases the default stack size on M4s so it can
accomodate the stack needed by ASF4s nvm API.
2018-12-04 23:26:04 -08:00
Scott Shawcroft
c47c495aca
Merge pull request #1329 from notro/oserror_errno
Support OSError subclasses and attributes
2018-11-27 22:35:54 -08:00
Jeff Epler
78972cc879 ports/atmel-samd: enable json module on M4 boards with lots of flash 2018-11-22 10:35:44 -06:00
Noralf Trønnes
704d0c606b samd51: Support more uerrno errno values
Use the default MICROPY_PY_UERRNO_LIST to give libraries access to all the errno values.
2018-11-13 22:07:05 +01:00
Scott Shawcroft
355abc835e
Fix output overflow and make help translatable 2018-11-09 16:41:08 -08:00
Scott Shawcroft
9d91111b1b
Move atmel-samd to tinyusb and support nRF flash.
This started while adding USB MIDI support (and descriptor support is
in this change.) When seeing that I'd have to implement the MIDI class
logic twice, once for atmel-samd and once for nrf, I decided to refactor
the USB stack so its shared across ports. This has led to a number of
changes that remove items from the ports folder and move them into
supervisor.

Furthermore, we had external SPI flash support for nrf pending so I
factored out the connection between the usb stack and the flash API as
well. This PR also includes the QSPI support for nRF.
2018-11-08 17:25:30 -08:00
Nick Moore
f6482699a0 Merge remote-tracking branch 'origin/master' into circuitpython/nickzoic/703-wiznet-5500-native 2018-10-25 12:20:50 +11:00
Scott Shawcroft
dc9d338612
Merge pull request #1167 from notro/cpython_stdlib
Support CPython standard library
2018-10-24 12:57:41 -07:00
Noralf Trønnes
d882ff6328 samd51: Set stack size to 8k
This is necessary in order to run unittest.
Heavy tests like those in the stdlib need 12-14k.
2018-10-24 19:33:01 +02:00
Noralf Trønnes
1b86e5fc83 samd51: Enable functionality to support CPython stdlib
This enables various things in order to support the CPython standard library.

MICROPY_PY_BUILTINS_NOTIMPLEMENTED:
Support NotImplemented for easy conversion of stdlib.
It doesn't do fallbacks though, only raises TypeError.

MICROPY_PY_COLLECTIONS_ORDEREDDICT:
collections.OrderedDict

MICROPY_PY_FUNCTION_ATTRS:
Support function.__name__ for use as key in the function attribute workaround.

MICROPY_PY_IO:
uio module: BytesIO, FileIO, StringIO, TextIOWrapper
Also add 'io' alias.

MICROPY_PY_REVERSE_SPECIAL_METHODS:
Support the __r*__ special methods.

MICROPY_PY_SYS_EXC_INFO:
sys.exc_info() used by unittest when collecting exceptions.

MICROPY_CPYTHON_COMPAT:
Some of the things it adds:

>>> object.__init__
<function>
>>> object.__new__
<function>
>>> object.__class__
<class 'type'>
>>> object().__class__
<class 'object'>
>>> object.__name__
'object'

>>> 'Hello'.encode()
b'Hello'
>>> b'Hello'.decode()
'Hello'

Named tuple field names from string:
namedtuple('Point', 'x y')
2018-10-24 19:33:01 +02:00
Noralf Trønnes
cec9a69a15 samd51: Make errno, os, and time module aliases
Add alias for uerrno so the user doesn't have to know about the
CircuitPython special names for the module.

Make os and time weak modules (aliases) making it possible to add
functionality to those modules written in python.

Example:
'import os' will now look in the path for an os module and if not found
it will import the builtin module. An os module written in python will
import the builtin module through its name prefixed with an underscore
(_os) following the C module naming practice in CPython.

Also right align the macro values to increase readability making it
easier to compare the values for samd21 and samd51. Even the longest
macro from py/mpconfig.h will fit with this alignment.
2018-10-24 19:31:53 +02:00
Nick Moore
aab28748bb Merge remote-tracking branch 'origin/master' into circuitpython/nickzoic/703-wiznet-5500-native 2018-10-11 14:19:10 +11:00
Scott Shawcroft
2b0356c61f
Disable framebuf by default on express builds. 2018-10-05 15:19:09 -07:00
Nick Moore
15b59bee1b change initialization method + mod_network names 2018-10-04 22:31:47 +10:00
Nick Moore
f9bda0ff93 Makefile & mpconfigport for atmel-samd with wiznet 2018-10-04 22:02:25 +10:00
Scott Shawcroft
121903b6ee
Tweaks based on feedback 2018-08-31 14:21:48 -07:00
Scott Shawcroft
6697544cdf
Introduce displayio to render graphics to displays.
It's designed to minimize RAM footprint by using Sprites to
represent objects on the screen. The object model also facilitates
partial screen updating which reduces the bandwidth needed to display.

This is all handled in C. Python simply manipulates the objects with
the ability to synchronize to frame timing.
2018-08-31 12:31:52 -07:00
Noralf Trønnes
11cbeb87ad ports/atmel-samd: Implement i2cslave.I2CSlave
This adds support for SAMD acting as a I2C slave in polled mode.
2018-08-16 17:20:49 +02:00
Scott Shawcroft
86d2154d71
Change file mode back. 2018-08-09 09:14:14 -07:00
Scott Shawcroft
94c5ceab36
Initial SAMR board revision. 2018-08-09 05:36:46 -07:00
Dan Halbert
498fec64e2 increase new dynamic stack size to a comfortable value for now 2018-08-03 22:35:20 -04:00