Commit Graph

115 Commits

Author SHA1 Message Date
Scott Shawcroft a800a25e88 atmel-samd: Switch Metro M4 Express to SAMD51J19. (#351) 2017-10-19 22:39:16 -04:00
Scott Shawcroft 535c0059d7 atmel-samd: Turn on SAMD51 bootloader build layout. (#348) 2017-10-18 16:07:38 -04:00
Dan Halbert 3c54e2c03c TEMPORARY changes to get build to work on all boards. Make space on CPX; turn off -finline-limit 2017-10-12 21:54:38 -04:00
Dan Halbert fabaa2ec30 merge 2.x changes into master; touch up Makefile CFLAGS logic 2017-10-12 20:10:31 -04:00
Scott Shawcroft 80654779e1 atmel-samd: Add support for internal filesystems. (#311)
* atmel-samd: Add support for internal filesystems.

This allows us to re-enable `os`. `random` is also enabled because
it solely depends on `os`.

Fixes #266. Its also a pre-requisite for #260.

* atmel-samd: Update SAMD51 linker script comments and MICROPY_MAX_STACK_USAGE enabling.
2017-10-10 14:36:00 -04:00
Dan Halbert ef65ee78c5 Freeze libraries needed by adafruit_circuitplayground library into firmware.
This saves a lot of RAM. Fixes #287.
Also fixed compilation of frozen_mpy.c to use supplied make rule rather than
builtin rule (supplied rule suppresses printing out the gcc command line).
2017-10-08 10:54:46 -06:00
Dan Halbert c478c10923 Do not allow a *io object to be used after deinit().
Fixes #278, #277, #276, #275.
2017-10-03 12:07:17 -07:00
Radomir Dopieralski c2bb9e2eb5 Add board file for the hacked Trinket M0 Haxpress (#303)
Add a hacked Tinket M0 Haxpress board definition

Based on https://daveastels.com/2017/09/01/trinket-m0-express-hack/
2017-10-03 11:24:48 -07:00
Scott Shawcroft 0bbb7a8199 Add support for patching newer ASF4 code. (#292)
* atmel-samd: Support patching after updating ASF4.

This makes it possible to automatically fix newer code.

* atmel-samd: Update ASF4 to include flash APIs for SAMD51.

This is the first automatic update that has caused a few deletions
where code was previously copied instead of moved.

This is a prerequisite for #260.
2017-09-28 23:33:44 -04:00
Scott Shawcroft 6839fff313 Move to ASF4 and introduce SAMD51 support. (#258)
* atmel-samd: Remove ASF3. This will break builds.

* atmel-samd: Add ASF4 for the SAMD21 and SAMD51.

* Introduce the supervisor concept to facilitate porting.

The supervisor is the code which runs individual MicroPython VMs. By
splitting it out we make it more consistent and easier to find.

This also adds very basic SAMD21 and SAMD51 support using the
supervisor. Only the REPL currently works.

This begins the work for #178.
2017-09-22 21:05:51 -04:00
Jerry Needell 3ad01ddb04 Add Ananlog Pin aliases to trinket_m0 pins.c 2017-09-19 21:36:06 -07:00
Scott Shawcroft 17ec02a77d atmel-samd: Add SPI pin names to the Trinket. Fixes #213 (#217) 2017-08-31 15:05:43 -04:00
Dan Halbert c679c80c71 Modernize module and class static dicts; update freetouch 2017-08-27 15:02:50 -04:00
Dan Halbert ef61b5ecb5 Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.
cpx build compiles and loads and works in repl; test suite not run yet
esp8266 not tested yet
2017-08-25 22:17:07 -04:00
Scott Shawcroft 266be30777 atmel-samd: Introduce a nvm module for non-volatile byte-level memory access. (#203)
* atmel-samd: Introduce a nvm module for non-volatile byte-level memory access.

This allows for persisting small configuration values even when the file system
is read-only from CircuitPython.

Fixes #160

* Review feedback:
* Add tests.
* Fix non-zero index.
* Fix len()
2017-08-25 16:00:27 -04:00
Dan Halbert 74cfdeb316 Added ability to freeze multiple directories; freeze neopixel library in cpx build (#199)
Reworked frozen module support: clean up makefiles and handle multiple directories.
Modules to freeze are included as git submodules.

Add neopixel to circuitplayground express build.

Fixes #56
2017-08-23 11:05:59 -07:00
Scott Shawcroft 13cb4aa89d atmel-samd: Add support for a second flash chip so either may be used. 2017-08-03 13:44:31 -07:00
Scott Shawcroft 557ceded00 atmel-samd: Introduce audiobusio.PDMIn for recording audio from PDM
microphones.
2017-07-28 12:12:38 -07:00
Scott Shawcroft 3660023046 atmel-samd: Update README and add pinout tables that map MCU names
to names in the board module and explain pin capabilities.

Fixes #149
2017-07-13 16:05:24 -07:00
Scott Shawcroft 1e04e8ea1c atmel-samd: Reboot to bootloader when a 1200 baud serial connection is
closed. This is how Arduino triggers the bootloader.
2017-07-12 11:58:22 -07:00
Scott Shawcroft 09b80b10d1 atmel-samd: Add Trinket Rev D support. 2017-07-12 11:55:50 -07:00
Scott Shawcroft 94346d97ba atmel-samd: Add TX/RX and SCL/SDA pins names for Gemma M0. 2017-07-12 11:55:50 -07:00
Scott Shawcroft ffc37faadc atmel-samd: Update Gemma M0 USB device name. 2017-07-12 11:55:49 -07:00
Scott Shawcroft 309daaf5fc atmel-samd: Update Gemma M0 for release revision. 2017-07-12 11:55:49 -07:00
Scott Shawcroft 97df799e2c atmel-samd: Add IR_TX and IR_RX pin names for REMOTEOUT and REMOTEIN to the CircuitPlayground Express pins to match the silkscreen. 2017-07-12 11:55:49 -07:00
Scott Shawcroft a715bf6bac atmel-samd: Introduce board reset mechanic used on CircuitPlayground
Express to ensure the Neopixels are off after reloads.
2017-06-16 15:40:15 -07:00
Scott Shawcroft 3e23464b1e atmel-samd: Add user initiated safe mode and rework board.c for
board specific functionality.

Fixes #155
2017-06-16 14:55:53 -07:00
Scott Shawcroft b5f50fadf9 atmel-samd: Change Metro PID to 0x8014 so it doesn't conflict with Arduino's PID. 2017-06-06 16:18:34 -07:00
Scott Shawcroft 66c421f401 atmel-samd: Correct the USB PID of the CircuitPlayground Express. 2017-05-29 14:35:38 -07:00
robomike 517590a58a atmel-samd:renamed spi flash to confuse with the actual spi flash 2017-05-23 14:09:28 -04:00
Scott Shawcroft 7672bf7736 atmel-samd: Rename auto-reset to auto-reload to reduce confusion with physical reset buttons. 2017-05-12 16:45:38 -07:00
Scott Shawcroft e1a6f6d584 atmel-samd: Rework SPI flash defines for clarity.
Also add sector protection support for the SAMD Xplained board.
2017-05-12 14:47:39 -07:00
Scott Shawcroft 7ea76e0889 atmel-samd: Pin reset improvements.
* Reset SWD lines to SWD rather than GPIO. This makes OpenOCD happier.
* Default speaker enable lines to False for CircuitPlayground to prevent
  the speaker from buzzing when no sound is playing. Fixes #126
2017-05-12 13:14:01 -07:00
Nicholas H.Tollervey f3152571c6
Rename LEFT_BUTTON -> BUTTON_A, RIGHT_BUTTON -> BUTTON_B. 2017-05-11 14:48:17 +01:00
Scott Shawcroft 5ad426124b atmel-samd: Move heap objects into MICROPY_PORT_ROOT_POINTERS so they don't get garbage collected while we are using them. 2017-05-04 11:57:51 -07:00
Scott Shawcroft 6512ccf32e atmel-samd: Use DMA for user SPI.
Also replace use of PINMUX_DEFAULT with PINMUX_UNUSED to prevent any
accidental pin changes. This caused user SPI to break internal SPI
flash on the Feather M0 Express.

Fixes #100
2017-05-03 10:50:29 -07:00
Scott Shawcroft 24a5752f94 atmel-samd: Use DMA for SPI flash block transfers.
Fixes #99
2017-05-02 15:25:06 -07:00
Scott Shawcroft 58b9789d0c atmel-samd: Introduce audio sample playback via audioio.AudioOut. 2017-05-01 13:10:03 -07:00
Scott Shawcroft 30b8091df0 atmel-samd: Clean up leftovers from QTouch. 2017-05-01 11:32:15 -07:00
Scott Shawcroft 4ad22144b0 atmel-samd: Rename metro M0 Express and add NEOPIXEL pin. 2017-05-01 11:29:51 -07:00
Scott Shawcroft a9d25bfae4 atmel-samd: Update CircuitPlayground Express pins for Rev G. 2017-04-20 11:25:57 -07:00
Scott Shawcroft 8d0d5defc7 atmel-samd: Use LTO for all builds to get 5000 bytes back on express boards. 2017-04-18 09:44:04 -07:00
Scott Shawcroft 4a4f29b8f9 atmel-samd: Rework status LED implementation
* Track status pin use by user code separately so it can take over the pins and then give them back.
* Switch to hardware SPI for APA102 on Gemma and Trinket.
* Merge microcontroller/types.h into microcontroller/Pin.h to better match approach going forwards.
2017-04-12 15:24:50 -07:00
Scott Shawcroft 8505de1ced atmel-samd: rename cplay_m0_flash to circuitplayground_express and update for new rev (F). 2017-04-11 17:59:02 -07:00
Scott Shawcroft 3afa09b2fe atmel-samd: Update Feather M0 Express USB pid. 2017-03-27 20:30:02 +01:00
Scott Shawcroft be1ed7aae4 Change to official Feather M0 Express branding. 2017-03-27 19:45:44 +01:00
Scott Shawcroft d598c2a919 atmel-samd: Add USB HID mouse and keyboard support. 2017-02-27 15:43:58 +01:00
Scott Shawcroft 062fac1d43 atmel-samd: Use link time optimization to reduce code size of builds which
share space with the file system.

"Express" builds with SPI flash crash the compiler for some reason so its
currently disabled for them.
2017-02-26 01:00:33 +01:00
Scott Shawcroft 8584f5fece atmel-samd: Remove support for UART REPL from Arduino Zero. 2017-02-19 17:23:31 +01:00
Scott Shawcroft c81052a256 atmel-samd: Stop calibrating the crystal for Gemma and Trinket. We need the space for other code. 2017-02-19 14:11:24 +01:00