Commit Graph

9973 Commits

Author SHA1 Message Date
arturo182
381f47bfb0 nrf: Only support SD 132 v2.0.1 and v5.0.0 and SD 140 v6.0.0 2018-02-07 22:44:27 +01:00
arturo182
8bfdaa89b9 nrf: Remove SAMD mentions carried over while copying files 2018-02-07 22:44:27 +01:00
arturo182
05bd5d4ee6 nrf: Remove nRF51 boards and files, update README 2018-02-07 22:44:13 +01:00
arturo182
29ae4cdd1c nrf: Fix building pca10056 without SD 2018-02-07 22:41:26 +01:00
arturo182
47c8e20e5a nrf: Make sure to not use SD functions when SD not available 2018-02-07 22:41:20 +01:00
Kevin Townsend
9d191f7f9f
Merge pull request #589 from arturo182/nrf_gamepad
nrf: Implement ticks, add gamepad module and example
2018-02-07 22:17:05 +01:00
Scott Shawcroft
77c70c7e50
Merge pull request #598 from arturo182/comment_fix
shared-bindings: Fix incorrect code comments
2018-02-07 12:02:15 -08:00
arturo182
ff041caa52 shared-bindings: Fix incorrect code comments
Most likely caused by copy-paste.
2018-02-06 22:03:17 +01:00
Kevin Townsend
243279fdc3
Merge pull request #592 from arturo182/nrf_analogout
nrf: Cleanup AnalogOut and throw an exception in constructor
2018-02-06 21:31:07 +01:00
arturo182
021df5d3d3 nrf: Cleanup AnalogOut and throw an exception in constructor
The nRF MCUs do not support analog output. Throwing an exception
in the constructor will stop users from creating an instance of
the AnalogOut class.

In the future we can ifdef-out the whole class so it is not available
in the module at all.
2018-02-06 21:15:49 +01:00
Scott Shawcroft
6c5cb01b4a
Merge pull request #564 from deanm1278/master
DM: added write_readinto to bitbangio
2018-02-06 09:38:17 -08:00
Kevin Townsend
c433a82082
Merge pull request #573 from arturo182/master
nRF port improvements and pca10056 support
2018-02-06 15:26:40 +01:00
Scott Shawcroft
c33db95066
Merge pull request #582 from arturo182/gen_docs_name
docs: Update the name of the projects in generated docs
2018-02-05 12:39:42 -08:00
arturo182
668524b8e1 docs: Update the name of the projects in generated docs 2018-02-05 21:01:57 +01:00
arturo182
1de2ee6884 nrf: Implement ticks, add gamepad module and example 2018-02-05 20:48:25 +01:00
arturo182
76f5c01798 nrf: Get the port working on pca10056 (nRF52840) 2018-02-05 20:38:41 +01:00
dean
68309c3fac replace tabs with spaces 2018-02-05 10:44:29 -05:00
Scott Shawcroft
f4018bd6b6
Merge pull request #575 from arturo182/nrf_led
nrf: Fix missing LED GPIO initialization
2018-02-04 22:51:03 -08:00
arturo182
a64b5c84de nrf: Fix missing LED GPIO initialization
led_init was never called, which means the GPIOs were never set to
output and the LEDs didn't work.
2018-02-03 13:51:11 +01:00
arturo182
6731b47d5a nrf: Implement MCU temperature reading
If softdevice is available and enabled the SD function will be used,
otherwise use MCU registers.
2018-02-02 20:33:21 +01:00
arturo182
c6a542d166 nrf: Add SD 6.0.0-6.alpha to the download script 2018-02-02 20:31:47 +01:00
arturo182
fed9087274 nrf: Add flash section for fatfs for no SD pca10056 2018-02-02 20:31:47 +01:00
arturo182
616cbc6271 nrf: Use more generic header
It will include the mcu-specific header based on defines.
2018-02-02 20:31:47 +01:00
arturo182
d0b451be94 nrf: Use the right SPI registers on nRF52840 2018-02-02 20:31:47 +01:00
arturo182
a776c2a51c nrf: Fix errorneous indent
Otherwise we get the "recipe commences before first target" messsage.
2018-02-02 20:31:47 +01:00
Dan Halbert
7c6adaa661
Merge pull request #567 from tannewt/ignore_docs_dir
Ignore docs directory when freezing as well.
2018-02-01 05:50:01 -08:00
Scott Shawcroft
737178e0d2 Ignore docs directory when freezing as well.
conf.py for Sphinx will be moved here.
2018-01-31 11:10:50 -08:00
dean
0e13aba2fe DM: fix sytling 2018-01-30 17:45:04 -05:00
Scott Shawcroft
d556ce291f
Merge pull request #563 from dhalbert/3.0_cpx_circuitpy_fail
CPX: typo in mpconfigboard.h broke CIRCUITPY
2018-01-30 14:42:00 -08:00
dean
a7f72eb2d8 DM: added write_readinto to bitbangio 2018-01-30 17:18:57 -05:00
Dan Halbert
eb49359aec CPX: typo in mpconfigboard.h broke CIRCUITPY 2018-01-30 15:48:22 -05:00
Dan Halbert
6085599963
Merge pull request #560 from dhalbert/3.0_issue_464_spi_baud_rate
Correct computation of SPI baud rate register value, and allow for the value to be 0.
2018-01-30 12:09:12 -08:00
Dan Halbert
cc87363234 documentation: caution on SPI clock speed for SAMD21 2018-01-30 14:31:20 -05:00
Dan Halbert
64831f4e7d add SPI.frequency to nRF 2018-01-30 13:23:00 -05:00
Dan Halbert
e550b024c5 atmel-samd: Correct computation of SPI baud rate.
all: Add .frequency read-only property for busio.SPI to return actual frequency.

Fix esp8266/posix_helpers.c, which was not up to date for the new
long-lived/short-lived heap allocation scheme.
2018-01-30 12:08:41 -05:00
Dan Halbert
a1e279a9d8
Merge pull request #556 from python-ugame/ugame10-3.0
Update ugame port for the final ugame10 version
2018-01-29 13:35:06 -08:00
Dan Halbert
36ffd31712
Merge pull request #557 from python-ugame/stage-lib
Bring back the _stage library
2018-01-29 13:29:58 -08:00
Radomir Dopieralski
d595a03bbd Update ugame port for the final ugame10 version
There have been multiple uGame prototypes with differences in the pins
and other details. This updates the board definition to fit the final
uGame 10 design.
2018-01-29 22:19:09 +01:00
Radomir Dopieralski
189c62ac7d Bring back the _stage library
I have tested the _stage module, and it works fine, so I'm including it
in he sources again. It's still disabled by default in the
mpconfigport.h.
2018-01-29 21:24:46 +01:00
Dan Halbert
271c4bead6
Merge pull request #552 from tannewt/flexible_parser
Make parsing more memory flexible.
2018-01-24 18:50:26 -08:00
Scott Shawcroft
a1254f1255
Merge pull request #551 from dhalbert/3.0_double_word_stack_align
3.0 double word stack align
2018-01-24 18:27:22 -08:00
Scott Shawcroft
dff744558b Make parsing more memory flexible.
The parser attempts to allocate two large (~512 byte) chunks up
front. If it couldn't, then it would error out. This change will
cause it to try allocating half the previous attempt until its down
to two copies. This is ok upfront because later code checks bounds
and tries to extend the allocation if needed.
2018-01-24 18:22:20 -08:00
Dan Halbert
efbf08266b make _estack be double-word aligned 2018-01-24 19:24:36 -05:00
Dan Halbert
302ad40fb2 Revert "alloca seems buggy on M4"
This reverts commit 4b1e9d8f92.
2018-01-24 19:24:36 -05:00
Dan Halbert
5de29acbd2
Merge pull request #547 from tannewt/alloc_long_lived
Introduce a long lived section of the heap.
2018-01-24 16:21:38 -08:00
Scott Shawcroft
aa0ce98b3e Fix the initial state and polish a couple comments. 2018-01-24 14:13:26 -08:00
Scott Shawcroft
da330f0cab Polish up the heap analysis script and make it more CLI friendly.
It can now render the heap layout over a sequence of ram dumps.

The mpy analysis is also better at parsing mpy files.
2018-01-24 10:33:46 -08:00
Scott Shawcroft
416abe33ed Introduce a long lived section of the heap.
This adapts the allocation process to start from either end of the heap
when searching for free space. The default behavior is identical to the
existing behavior where it starts with the lowest block and looks higher.
Now it can also look from the highest block and lower depending on the
long_lived parameter to gc_alloc. As the heap fills, the two sections may
overlap. When they overlap, a collect may be triggered in order to keep
the long lived section compact. However, free space is always eligable
for each type of allocation.

By starting from either of the end of the heap we have ability to separate
short lived objects from long lived ones. This separation reduces heap
fragmentation because long lived objects are easy to densely pack.

Most objects are short lived initially but may be made long lived when
they are referenced by a type or module. This involves copying the
memory and then letting the collect phase free the old portion.

QSTR pools and chunks are always long lived because they are never freed.

The reallocation, collection and free processes are largely unchanged. They
simply also maintain an index to the highest free block as well as the lowest.
These indices are used to speed up the allocation search until the next collect.

In practice, this change may slightly slow down import statements with the
benefit that memory is much less fragmented afterwards. For example, a test
import into a 20k heap that leaves ~6k free previously had the largest
continuous free space of ~400 bytes. After this change, the largest continuous
free space is over 3400 bytes.
2018-01-24 10:33:46 -08:00
Scott Shawcroft
a5bfbbc12a
Merge pull request #548 from dhalbert/3.0_alloca_problem_issue_521
alloca seems buggy on M4
2018-01-24 09:04:31 -08:00
Dan Halbert
1e94c4240c undo removal of alloca in builtinimport.c 2018-01-23 23:47:44 -05:00