Commit Graph

12424 Commits

Author SHA1 Message Date
Damien George 95b2cb008e stm32/Makefile: Rename FLASH_ADDR/TEXT_ADDR to TEXT0_ADDR/TEXT1_ADDR.
To make it clearer that these addresses are both for firmware text and that
they have a prescribed ordering.
2018-03-27 21:20:04 +11:00
Damien George 7aec06ca9a stm32/boards: Allow boards to have finer control over the linker script.
This patch allows a particular board to independently specify the linker
scripts for 1) the MCU memory layout; 2) how the different firmware
sections are arranged in memory.  Right now all boards follow the same
layout with two separate firmware section, one for the ISR and one for the
text and data.  This leaves room for storage (filesystem data) to live
between the firmware sections.

The idea with this patch is to accommodate boards that don't have internal
flash storage and only need to have one continuous firmware section.  Thus
the common.ld script is renamed to common_ifs.ld to make explicit that it
is used for cases where the board has internal flash storage.
2018-03-27 21:17:48 +11:00
Damien George a6009a9e35 stm32/*bdev.c: Eliminate dependency on sys_tick_has_passed.
Explicitly writing out the implementation of sys_tick_has_passed makes
these bdev files independent of systick.c and more reusable as a general
component.  It also reduces the code size slightly.

The irq.h header is added to spibdev.c because it uses declarations in that
file (irq.h is usually included implicitly via mphalport.h but not always).
2018-03-27 20:38:57 +11:00
Damien George 6f1e857624 stm32/qspi: Don't take the address of pin configuration identifiers.
Taking the address assumes that the pin is an object (eg a struct), but it
could be a literal (eg an int).  Not taking the address makes this driver
more general for other uses.
2018-03-27 20:34:55 +11:00
Damien George 6b51eb22c8 stm32: Consolidate include of genhdr/pins.h to single location in pin.h.
genhdr/pins.h is an internal header file that defines all of the pin
objects and it's cleaner to have pin.h include it (where the struct's for
these objects are defined) rather than an explicit include by every user.
2018-03-27 20:25:24 +11:00
Scott Shawcroft 4517ab8ba4
Merge pull request #709 from jepler/core-class-superproperty
Make test core_class_superproperty.py succeed
2018-03-26 21:59:05 -07:00
Kattni 77938db8c8
Merge pull request #719 from tannewt/fix_i2c_hang
Fix I2C init hang when the SCL pin is pulled low.
2018-03-26 20:08:14 -04:00
Dan Halbert 4190aa2eed
Merge pull request #715 from jepler/array-operation-restrictions-bis
Remove 'O', 'P' support in arrays
2018-03-26 20:01:34 -04:00
Jeff Epler 047a4f59c5 This test now passes, make it run regularly 2018-03-26 18:47:06 -05:00
Scott Shawcroft cebcec5e63 Check for floating pins by pulling them low briefly before testing their values. 2018-03-26 16:32:16 -07:00
Jeff Epler 355bf8b553 Conditionally compile out nonstandard array/struct typecodes
.. defaulting to off for circuitpython-supported boards, on for others.

.. fixing up the tests that fail when it is turned off, so that they skip
instead of failing
2018-03-26 18:13:49 -05:00
Scott Shawcroft 25ba8ee489 Add an s because grammar. 2018-03-26 15:21:08 -07:00
Scott Shawcroft 37538fc0e7 Fix I2C init hang when the SCL pin is pulled low.
We added a check to make sure the pins are in a high state before
initing the bus. This leads to a friendly error message when someone
forgets to add the pull up resistors to their circuit.
2018-03-26 15:13:52 -07:00
Scott Shawcroft ea39f4378e
Merge pull request #698 from sommersoft/repl_fix
Fix 128 Character Max Paste Into REPL
2018-03-26 13:02:43 -07:00
sommersoft 9bd55cf4c7
minor cleanup 2018-03-26 08:14:37 -05:00
sommersoft 23009fdd63 future-proof for buffer size changes 2018-03-26 06:25:04 +00:00
Dan Halbert 8b6aeb9e19
Merge pull request #702 from jepler/issue689bis
correct typo in filename
2018-03-25 23:58:00 -04:00
Dan Halbert df731884a6
Merge pull request #708 from jepler/cpu-uid-nibbles
Don't lose half of the processor's serial number
2018-03-25 23:53:02 -04:00
Jeff Epler d57397f9c8 Remove an unneeded -Wno-error=lto-type-mismtach 2018-03-25 22:04:15 -05:00
Jeff Epler 74fefe45a4 super(): Do the same lookup tasks as regular getattr
.. in the presence of properties and descriptors
2018-03-25 15:11:40 -05:00
Jeff Epler 922b7c3131 Don't assume the type of the prop->proxy objects
This fixes a crash running the cpydiff/core_class_superproperty.py
test, but it does not fix the difference to cpython3.

Closes: #705
2018-03-25 15:11:30 -05:00
Jeff Epler c0029e1d97 Don't lose half of the processor's serial number
Before this change, `microcontroller.cpu.uid` returned values
where the top 4 bits of each byte were zero, because of
an incorrect bitmask used in this function.
2018-03-25 13:01:04 -05:00
Damien George b63cc1e9ef stm32/Makefile: Re-enable strict aliasing optimisation for ST HAL files.
The HAL requires strict aliasing optimisation to be turned on to function
correctly (at least for the SD card driver on F4 MCUs).  This optimisation
was recently disabled with the addition of H7 support due to the H7 HAL
having errors with the strict aliasing optimisation enabled.  But this is
now fixed in the latest stm32lib and so the optimisation can now be
re-enabled.

Thanks to @chuckbook for finding that there was a problem with the SD card
on F4 MCUs with the strict aliasing optimisation disabled.
2018-03-26 00:00:47 +11:00
Damien George 23f07b77e5 lib/stm32lib: Update library for fix to H7 SPI strict aliasing error. 2018-03-25 23:58:56 +11:00
Dan Halbert 31f5b6a238 WIP: simple working HID 2018-03-24 18:29:12 -04:00
Jeff Epler d80e54458d correct typo in filename 2018-03-24 10:44:24 -05:00
sommersoft 6205ed9a0c updated cdc_enabled; now more dynamic status return 2018-03-24 03:42:58 +00:00
sommersoft ef16109c5d updated with requested changes 2018-03-24 00:55:48 +00:00
Scott Shawcroft fa88446679
Merge pull request #697 from jepler/issue501
extmod/vfs_fat_file: Implement SEEK_CUR for non-zero offset.
2018-03-23 14:48:41 -07:00
Scott Shawcroft 8d376a3efb
Merge pull request #693 from jepler/issue236
Implement * and *= for array.array
2018-03-23 14:46:03 -07:00
sommersoft f237657e5e extended buffer check to usb_cdc_background 2018-03-23 18:41:27 +00:00
Dan Halbert ce8f7e69bf
Merge pull request #700 from adafruit/tannewt-patch-6
Update USB PID
2018-03-23 13:25:39 -04:00
Scott Shawcroft 63d826a52a
Update USB PID 2018-03-23 09:34:02 -07:00
sommersoft ccbe557e30 removed leftover debugging bits 2018-03-23 15:45:30 +00:00
sommersoft d434635822 add buffer check before triggering new usb read 2018-03-23 15:07:02 +00:00
Ayke van Laethem fa55b15ac6 extmod/vfs_fat_file: Implement SEEK_CUR for non-zero offset.
CPython doesn't allow SEEK_CUR with non-zero offset for files in text mode,
and uPy inherited this behaviour for both text and binary files.  It makes
sense to provide full support for SEEK_CUR of binary-mode files in uPy, and
to do this in a minimal way means also allowing to use SEEK_CUR with
non-zero offsets on text-mode files.  That seems to be a fair compromise.
2018-03-23 09:19:56 -05:00
Dan Halbert 261586518a
Merge pull request #694 from tannewt/feather_m4
Add Feather M4 Express support.
2018-03-23 09:16:10 -04:00
Jeff Epler cdb83b18ec Implement * and *= for array.array 2018-03-23 07:37:07 -05:00
Scott Shawcroft fd7dcff4e9 Add Feather M4 Express support.
* Also fixed detection of SPI flash chip to correct look in the 2+
spots.
* Added support for using QSPI in dual read mode.
2018-03-23 00:00:13 -07:00
Dan Halbert 00eacbf45e
Merge pull request #692 from tannewt/latest_m4
Add support for the Metro M4 Rev F and make the SPI flash code more robust
2018-03-22 22:01:33 -04:00
Scott Shawcroft 06b4c83f59 Add reminder to remove Saleae when going fast. 2018-03-22 17:44:44 -07:00
Scott Shawcroft 3bf4d69f67 Update Metro M4 to rev F and make flash reset on start. 2018-03-22 16:42:47 -07:00
Scott Shawcroft 0c4bbefdf0
Merge pull request #691 from jepler/issue689
Autocreate files that prevent MacOS indexing of the CIRCUITPYTHON dive
2018-03-22 10:28:41 -07:00
Scott Shawcroft f8bee74e8e
Merge pull request #690 from jepler/no-gitter
README: delete reference to gitter
2018-03-22 10:06:02 -07:00
Jeff Epler a7e3c74fed Autocreate files that prevent MacOS indexing of the CIRCUITPYTHON dive
.. the price of this appears to be about 112 bytes of flash and 12
bytes of RAM, according to the stats printed during the build.

It also uses up 4 directory entries (out of 128), but does not reduce
the number of blocks usable for storing file contents.

These are the same items noted in the Adafruit README for Trinket M0
as preventing MacOS indexing.

Closes: #689
2018-03-22 08:07:32 -05:00
Jeff Epler 9ddf60f8b4 CONTRIBUTING: delete reference to gitter 2018-03-21 21:35:07 -05:00
Jeff Epler edfc76be4d README: delete reference to gitter
"We don't use gitter anymore" -- the last message on
https://gitter.im/adafruit/circuitpython on February 18
2018-03-21 21:11:24 -05:00
Scott Shawcroft 9ab39eb2d2
Merge pull request #688 from jepler/atsamd-build-reqs
Better document build requirements and steps
2018-03-20 10:03:01 -07:00
Scott Shawcroft 286e342a9a
Merge pull request #686 from jepler/lto-type-diagnostic
Fix array vs pointer error in declaration of circuitpython_help_text
2018-03-20 10:01:28 -07:00
Scott Shawcroft 0f90f35606
Merge pull request #685 from jepler/uart-diagnostic
UART: Fix maybe-uninitialized diagnostic
2018-03-20 09:59:31 -07:00