summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml59
-rw-r--r--.gitmodules2
-rw-r--r--Makefile2
-rw-r--r--README.rst13
-rw-r--r--docs/shared_bindings_matrix.py6
m---------lib/tinyusb0
-rw-r--r--locale/ID.po236
-rw-r--r--locale/circuitpython.pot236
-rw-r--r--locale/de_DE.po236
-rw-r--r--locale/en_US.po236
-rw-r--r--locale/en_x_pirate.po236
-rw-r--r--locale/es.po239
-rw-r--r--locale/fil.po236
-rw-r--r--locale/fr.po239
-rw-r--r--locale/it_IT.po239
-rw-r--r--locale/ko.po236
-rw-r--r--locale/pl.po239
-rw-r--r--locale/pt_BR.po236
-rw-r--r--locale/zh_Latn_pinyin.po239
-rw-r--r--mpy-cross/.gitignore7
-rw-r--r--mpy-cross/Makefile82
-rw-r--r--mpy-cross/Makefile.static5
-rw-r--r--mpy-cross/Makefile.static-mingw6
-rw-r--r--mpy-cross/Makefile.static-raspbian8
-rw-r--r--mpy-cross/fmode.c49
-rw-r--r--mpy-cross/fmode.h37
-rw-r--r--mpy-cross/main.c6
-rw-r--r--mpy-cross/mpy-cross.mk81
-rw-r--r--ports/atmel-samd/audio_dma.c4
-rw-r--r--ports/atmel-samd/boards/capablerobot_usbhub/board.c7
-rw-r--r--ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk4
-rw-r--r--ports/atmel-samd/boards/capablerobot_usbhub/pins.c5
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express/board.c12
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h4
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_crickit/board.c12
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h4
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_displayio/board.c12
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h4
-rw-r--r--ports/atmel-samd/boards/ndgarage_ndbit6/board.c39
-rw-r--r--ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.h32
-rw-r--r--ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.mk15
-rw-r--r--ports/atmel-samd/boards/ndgarage_ndbit6/pins.c39
-rw-r--r--ports/atmel-samd/boards/openbook_m4/board.c107
-rw-r--r--ports/atmel-samd/boards/openbook_m4/mpconfigboard.h28
-rw-r--r--ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk14
-rw-r--r--ports/atmel-samd/boards/openbook_m4/pins.c71
-rw-r--r--ports/atmel-samd/boards/pybadge/board.c2
-rw-r--r--ports/atmel-samd/boards/pybadge/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pybadge_airlift/board.c2
-rw-r--r--ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pygamer/board.c2
-rw-r--r--ports/atmel-samd/boards/pygamer/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/pygamer_advance/board.c2
-rw-r--r--ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/seeeduino_xiao/board.c39
-rw-r--r--ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.h20
-rw-r--r--ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.mk13
-rw-r--r--ports/atmel-samd/boards/seeeduino_xiao/pins.c54
-rw-r--r--ports/atmel-samd/common-hal/audioio/AudioOut.c23
-rw-r--r--ports/atmel-samd/common-hal/nvm/ByteArray.c4
-rw-r--r--ports/atmel-samd/supervisor/port.c8
-rw-r--r--ports/cxd56/supervisor/port.c8
-rw-r--r--ports/mimxrt10xx/Makefile42
-rw-r--r--ports/mimxrt10xx/background.c3
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1011/board.c16
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1011/flash_config.c122
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h11
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk15
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1062/board.c16
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1062/flash_config.c122
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h8
-rw-r--r--ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk15
-rw-r--r--ports/mimxrt10xx/boards/imxrt1010_evk/board.c16
-rw-r--r--ports/mimxrt10xx/boards/imxrt1010_evk/flash_config.c121
-rw-r--r--ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h17
-rw-r--r--ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk16
-rw-r--r--ports/mimxrt10xx/boards/imxrt1010_evk/pins.c30
-rw-r--r--ports/mimxrt10xx/boards/imxrt1020_evk/board.c39
-rw-r--r--ports/mimxrt10xx/boards/imxrt1020_evk/flash_config.c122
-rw-r--r--ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.h14
-rw-r--r--ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.mk8
-rw-r--r--ports/mimxrt10xx/boards/imxrt1020_evk/pins.c84
-rw-r--r--ports/mimxrt10xx/boards/imxrt1060_evk/board.c39
-rw-r--r--ports/mimxrt10xx/boards/imxrt1060_evk/flash_config.c122
-rw-r--r--ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h14
-rw-r--r--ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.mk8
-rw-r--r--ports/mimxrt10xx/boards/imxrt1060_evk/pins.c128
-rw-r--r--ports/mimxrt10xx/boards/mimxrt1011-bootloader-external-flash.ld106
-rw-r--r--ports/mimxrt10xx/boards/mimxrt1011-external-flash.ld123
-rw-r--r--ports/mimxrt10xx/boards/mimxrt1062-bootloader-external-flash.ld106
-rw-r--r--ports/mimxrt10xx/boards/teensy40/board.c39
-rw-r--r--ports/mimxrt10xx/boards/teensy40/board.ld1
-rw-r--r--ports/mimxrt10xx/boards/teensy40/flash_config.c126
-rw-r--r--ports/mimxrt10xx/boards/teensy40/mpconfigboard.h18
-rw-r--r--ports/mimxrt10xx/boards/teensy40/mpconfigboard.mk8
-rw-r--r--ports/mimxrt10xx/boards/teensy40/pins.c87
-rw-r--r--ports/mimxrt10xx/common-hal/microcontroller/__init__.c6
-rw-r--r--ports/mimxrt10xx/linking/chip_family/MIMXRT1011.ld2
-rw-r--r--ports/mimxrt10xx/linking/chip_family/MIMXRT1021.ld2
-rw-r--r--ports/mimxrt10xx/linking/chip_family/MIMXRT1062.ld2
-rw-r--r--ports/mimxrt10xx/linking/common.ld154
-rw-r--r--ports/mimxrt10xx/linking/flash/AT25SF128A.ld1
-rw-r--r--ports/mimxrt10xx/linking/flash/IS25LP064A.ld1
-rw-r--r--ports/mimxrt10xx/linking/flash/IS25WP064A.ld1
-rw-r--r--ports/mimxrt10xx/linking/flash/W25Q16JV.ld1
-rw-r--r--ports/mimxrt10xx/linking/flash/W25Q64JV.ld1
-rw-r--r--ports/mimxrt10xx/mpconfigport.h12
-rw-r--r--ports/mimxrt10xx/mpconfigport.mk17
-rw-r--r--ports/mimxrt10xx/mphalport.c2
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/clocks.c31
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.c4
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/clocks.c341
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c218
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h43
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.c128
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.h129
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/clocks.c28
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c2
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h2
-rw-r--r--ports/mimxrt10xx/peripherals/mimxrt10xx/pins.h2
-rw-r--r--ports/mimxrt10xx/reset.c2
-rw-r--r--ports/mimxrt10xx/reset.h2
m---------ports/mimxrt10xx/sdk0
-rw-r--r--ports/mimxrt10xx/supervisor/flexspi_nor_flash_ops.c9
-rw-r--r--ports/mimxrt10xx/supervisor/internal_flash.c10
-rw-r--r--ports/mimxrt10xx/supervisor/port.c252
-rw-r--r--ports/mimxrt10xx/supervisor/usb.c4
-rwxr-xr-xports/nrf/Makefile29
-rw-r--r--ports/nrf/background.c2
-rw-r--r--ports/nrf/boards/aramcon_badge_2019/board.c40
-rw-r--r--ports/nrf/boards/aramcon_badge_2019/mpconfigboard.h31
-rw-r--r--ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk14
-rw-r--r--ports/nrf/boards/aramcon_badge_2019/pins.c34
-rw-r--r--ports/nrf/boards/circuitplayground_bluefruit/board.c3
-rw-r--r--ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h2
-rw-r--r--ports/nrf/boards/clue_nrf52840_express/pins.c5
-rw-r--r--ports/nrf/boards/ohs2020_badge/board.c99
-rw-r--r--ports/nrf/boards/ohs2020_badge/mpconfigboard.h57
-rw-r--r--ports/nrf/boards/ohs2020_badge/mpconfigboard.mk10
-rw-r--r--ports/nrf/boards/ohs2020_badge/pins.c18
-rw-r--r--ports/nrf/boards/particle_argon/mpconfigboard.mk4
-rw-r--r--ports/nrf/boards/particle_boron/mpconfigboard.mk4
-rw-r--r--ports/nrf/boards/particle_xenon/mpconfigboard.mk4
-rw-r--r--ports/nrf/common-hal/_bleio/Adapter.c6
-rw-r--r--ports/nrf/common-hal/_bleio/Characteristic.c1
-rw-r--r--ports/nrf/common-hal/_bleio/Connection.c84
-rw-r--r--ports/nrf/common-hal/_bleio/Connection.h12
-rw-r--r--ports/nrf/common-hal/_bleio/__init__.c1
-rw-r--r--ports/nrf/common-hal/_bleio/__init__.h6
-rw-r--r--ports/nrf/common-hal/_bleio/bonding.c309
-rw-r--r--ports/nrf/common-hal/_bleio/bonding.h85
-rw-r--r--ports/nrf/common-hal/neopixel_write/__init__.c18
-rw-r--r--ports/nrf/common-hal/nvm/ByteArray.c14
-rw-r--r--ports/nrf/mpconfigport.h3
-rw-r--r--ports/nrf/peripherals/nrf/nvm.c49
-rw-r--r--ports/nrf/peripherals/nrf/nvm.h5
-rw-r--r--ports/nrf/supervisor/port.c8
-rw-r--r--ports/stm32f4/supervisor/port.c10
-rw-r--r--py/emitnative.c1
-rwxr-xr-xpy/gc.c4
-rw-r--r--py/gc.h2
-rw-r--r--py/map.c4
-rw-r--r--py/mpstate.c3
-rw-r--r--py/obj.c3
-rw-r--r--py/objdict.c5
-rw-r--r--py/objfun.c4
-rwxr-xr-xpy/qstr.c4
-rw-r--r--py/runtime.c8
-rw-r--r--py/runtime.h10
-rw-r--r--py/sequence.c5
-rw-r--r--py/vm.c4
-rw-r--r--py/vmentrytable.h4
-rw-r--r--shared-bindings/_bleio/Adapter.c25
-rw-r--r--shared-bindings/_bleio/Adapter.h14
-rw-r--r--shared-bindings/_bleio/Characteristic.c3
-rw-r--r--shared-bindings/_bleio/PacketBuffer.c4
-rw-r--r--shared-module/audiomixer/Mixer.c377
-rw-r--r--shared-module/audiomixer/MixerVoice.c6
-rw-r--r--shared-module/audiomixer/MixerVoice.h2
-rwxr-xr-xsupervisor/linker.h42
-rw-r--r--supervisor/port.h6
-rw-r--r--supervisor/shared/board.c49
-rw-r--r--supervisor/shared/board.h38
-rw-r--r--supervisor/shared/filesystem.c2
-rwxr-xr-xsupervisor/shared/memory.c7
-rw-r--r--supervisor/shared/safe_mode.c3
-rw-r--r--supervisor/shared/safe_mode.h1
-rwxr-xr-xsupervisor/shared/stack.c7
-rw-r--r--supervisor/shared/tick.c8
-rw-r--r--supervisor/supervisor.mk1
-rw-r--r--tools/build_board_info.py3
m---------tools/uf20
192 files changed, 7507 insertions, 1334 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0f45328c5..50fafdc7f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -22,7 +22,8 @@ jobs:
python-version: 3.5
- name: Install deps
run: |
- sudo apt-get install -y gettext librsvg2-bin
+ sudo apt-get install -y eatmydata
+ sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64
pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml
- name: Versions
run: |
@@ -66,6 +67,54 @@ jobs:
run: python3 -u ci_new_boards_check.py
working-directory: tools
+ - name: Build mpy-cross.static-raspbian
+ run: make -C mpy-cross -j2 -f Makefile.static-raspbian
+ - uses: actions/upload-artifact@v1.0.0
+ with:
+ name: mpy-cross.static-raspbian
+ path: mpy-cross/mpy-cross.static-raspbian
+
+ - name: Build mpy-cross.static
+ run: make -C mpy-cross -j2 -f Makefile.static
+ - uses: actions/upload-artifact@v1.0.0
+ with:
+ name: mpy-cross.static-amd64-linux
+ path: mpy-cross/mpy-cross.static
+
+ - name: Build mpy-cross.static-mingw
+ run: make -C mpy-cross -j2 -f Makefile.static-mingw
+ - uses: actions/upload-artifact@v1.0.0
+ with:
+ name: mpy-cross.static-x64-windows
+ path: mpy-cross/mpy-cross.static.exe
+
+ mpy-cross-mac:
+ runs-on: macos-latest
+ steps:
+ - name: Dump GitHub context
+ env:
+ GITHUB_CONTEXT: ${{ toJson(github) }}
+ run: echo "$GITHUB_CONTEXT"
+ - name: Install deps
+ run: |
+ brew link --force gettext
+ - name: Versions
+ run: |
+ gcc --version
+ python3 --version
+ msgfmt --version
+ - uses: actions/checkout@v1
+ with:
+ submodules: true
+ - name: CircuitPython version
+ run: git describe --dirty --always --tags
+ - name: Build mpy-cross
+ run: make -C mpy-cross -j2
+ - uses: actions/upload-artifact@v1.0.0
+ with:
+ name: mpy-cross-macos-catalina
+ path: mpy-cross/mpy-cross
+
build-arm:
runs-on: ubuntu-16.04
needs: test
@@ -73,6 +122,7 @@ jobs:
fail-fast: false
matrix:
board:
+ - "aramcon_badge_2019"
- "arduino_mkr1300"
- "arduino_mkrzero"
- "arduino_nano_33_ble"
@@ -112,6 +162,8 @@ jobs:
- "hallowing_m0_express"
- "hallowing_m4_express"
- "imxrt1010_evk"
+ - "imxrt1020_evk"
+ - "imxrt1060_evk"
- "itsybitsy_m0_express"
- "itsybitsy_m4_express"
- "itsybitsy_nrf52840_express"
@@ -126,6 +178,9 @@ jobs:
- "metro_nrf52840_express"
- "mini_sam_m4"
- "monster_m4sk"
+ - "ndgarage_ndbit6"
+ - "ohs2020_badge"
+ - "openbook_m4"
- "particle_argon"
- "particle_boron"
- "particle_xenon"
@@ -145,6 +200,7 @@ jobs:
- "pyruler"
- "robohatmm1_m4"
- "sam32"
+ - "seeeduino_xiao"
- "serpente"
- "shirtty"
- "snekboard"
@@ -160,6 +216,7 @@ jobs:
- "stm32f411ve_discovery"
- "stm32f412zg_discovery"
- "stringcar_m0_express"
+ - "teensy40"
- "teknikio_bluebird"
- "trellis_m4_express"
- "trinket_m0"
diff --git a/.gitmodules b/.gitmodules
index 44fc818c8..cb36ad4c4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -110,4 +110,4 @@
url = https://github.com/adafruit/Adafruit_MP3
[submodule "ports/mimxrt10xx/sdk"]
path = ports/mimxrt10xx/sdk
- url = https://github.com/arturo182/MIMXRT10xx_SDK
+ url = https://github.com/adafruit/MIMXRT10xx_SDK
diff --git a/Makefile b/Makefile
index d7127b517..7eff665c0 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(BASEOPTS)
-TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/nrf py shared-bindings shared-module supervisor
+TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/mimxrt10xx ports/nrf ports/stm32f4 py shared-bindings shared-module supervisor
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext stubs
diff --git a/README.rst b/README.rst
index 03116be88..51db41a8b 100644
--- a/README.rst
+++ b/README.rst
@@ -94,13 +94,12 @@ Differences from `MicroPython <https://github.com/micropython/micropython>`__
CircuitPython:
-- includes ports for MicroChip SAMD21 (Commonly known as M0 in Adafruit
- product names) and SAMD51 (M4).
-- supports only SAMD21, SAMD51, and nRF52840 ports.
-- tracks MicroPython's releases (not master).
-- floats (aka decimals) are enabled for all builds.
-- error messages are translated into 10+ languages.
-- does not support concurrency within Python (including interrupts and threading). Some concurrency
+- Supports native USB on all boards, allowing file editing without special tools.
+- Supports only SAMD21, SAMD51, nRF52840, CXD56, STM32F4 and i.MX RT ports.
+- Tracks MicroPython's releases (not master).
+- Floats (aka decimals) are enabled for all builds.
+- Error messages are translated into 10+ languages.
+- Does not support concurrency within Python (including interrupts and threading). Some concurrency
is achieved with native modules for tasks that require it such as audio file playback.
Behavior
diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py
index 6e0fc34bd..e327d6ec6 100644
--- a/docs/shared_bindings_matrix.py
+++ b/docs/shared_bindings_matrix.py
@@ -185,7 +185,7 @@ def get_excluded_boards(base):
board_is_excluded = True
# check if module is specifically disabled for this board
- re_pattern = "CIRCUITPY_{}\s=\s(\w)".format(module.upper())
+ re_pattern = r"CIRCUITPY_{}\s=\s(\w)".format(module.upper())
find_module = re.search(re_pattern, contents)
if not find_module:
if base[module]["default_value"].isdigit():
@@ -204,9 +204,7 @@ def get_excluded_boards(base):
]):
check_dependent_modules[module] = base[module]["default_value"]
else:
- if (find_module.group(1) == "0" and
- find_module.group(1) != base[module]["default_value"]):
- board_is_excluded = True
+ board_is_excluded = find_module.group(1) == "0"
if board_is_excluded:
if board_chip in base[module]["excluded"]:
diff --git a/lib/tinyusb b/lib/tinyusb
-Subproject dda4c9a94b509238faa7b5ab5b9464c1d2e63ff
+Subproject 1f95f439e11f519e69d75a4a8b7b9f28eaf5060
diff --git a/locale/ID.po b/locale/ID.po
index e6d19cc2c..6bdb0d4c0 100644
--- a/locale/ID.po
+++ b/locale/ID.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -273,6 +273,7 @@ msgstr "Semua timer untuk pin ini sedang digunakan"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -283,6 +284,12 @@ msgstr "Semua timer sedang digunakan"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "fungsionalitas AnalogOut tidak didukung"
@@ -296,6 +303,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "pin yang dipakai tidak mendukung AnalogOut"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Send yang lain sudah aktif"
@@ -410,6 +418,7 @@ msgid "Cannot delete values"
msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "Tidak bisa mendapatkan pull pada saat mode output"
@@ -442,6 +451,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
"Tidak dapat melakukan reset ke bootloader karena tidak ada bootloader yang "
@@ -463,6 +474,10 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr "tidak dapat mendapatkan ukuran scalar secara tidak ambigu"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr ""
@@ -519,25 +534,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "Tidak dapat menginisialisasi UART"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr ""
@@ -545,6 +588,14 @@ msgstr ""
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC sudah digunakan"
@@ -571,6 +622,10 @@ msgstr ""
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -587,6 +642,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Channel EXTINT sedang digunakan"
@@ -636,11 +692,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Gagal untuk mengalokasikan buffer RX"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -654,7 +712,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -671,14 +729,14 @@ msgstr ""
msgid "File exists"
msgstr ""
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -693,10 +751,22 @@ msgstr ""
msgid "Group full"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "operasi I/O pada file tertutup"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "operasi I2C tidak didukung"
@@ -723,20 +793,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "%q pada tidak valid"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Frekuensi PWM tidak valid"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr ""
@@ -745,7 +841,7 @@ msgstr ""
msgid "Invalid bits per value"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr "Ukuran buffer tidak valid"
@@ -773,6 +869,14 @@ msgstr ""
msgid "Invalid format chunk size"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr ""
@@ -799,7 +903,9 @@ msgstr "Pin untuk channel kanan tidak valid"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Pin-pin tidak valid"
@@ -831,6 +937,10 @@ msgstr ""
msgid "Invalid wave file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr "LHS dari keyword arg harus menjadi sebuah id"
@@ -876,10 +986,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -889,6 +1007,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip"
@@ -897,11 +1016,23 @@ msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip"
msgid "No DMA channel found"
msgstr "tidak ada channel DMA ditemukan"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Tidak pin RX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Tidak ada pin TX"
@@ -930,6 +1061,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr "Tidak ada dukungan hardware untuk pin"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -997,12 +1132,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)"
@@ -1032,6 +1174,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr ""
@@ -1040,6 +1199,10 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr ""
@@ -1082,6 +1245,14 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr "SDA atau SCL membutuhkan pull up"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr ""
@@ -1121,6 +1292,10 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1194,6 +1369,26 @@ msgstr ""
msgid "Tuple or struct_time argument required"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr ""
@@ -1275,7 +1470,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Baudrate tidak didukung"
@@ -1800,7 +1995,7 @@ msgstr "argumen keyword ekstra telah diberikan"
msgid "extra positional arguments given"
msgstr "argumen posisi ekstra telah diberikan"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
@@ -1910,6 +2105,7 @@ msgid "incorrect padding"
msgstr "lapisan (padding) tidak benar"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index keluar dari jangkauan"
@@ -2303,6 +2499,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "Muncul dari PulseIn yang kosong"
@@ -2509,7 +2706,8 @@ msgstr ""
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "tx dan rx keduanya tidak boleh kosong"
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index 085101ff1..35cd63edd 100644
--- a/locale/circuitpython.pot
+++ b/locale/circuitpython.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -271,6 +271,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -281,6 +282,12 @@ msgstr ""
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr ""
@@ -294,6 +301,7 @@ msgid "AnalogOut not supported on given pin"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr ""
@@ -405,6 +413,7 @@ msgid "Cannot delete values"
msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr ""
@@ -434,6 +443,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
@@ -453,6 +464,10 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr ""
@@ -509,25 +524,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr ""
@@ -535,6 +578,14 @@ msgstr ""
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr ""
@@ -560,6 +611,10 @@ msgstr ""
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -576,6 +631,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr ""
@@ -625,11 +681,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -643,7 +701,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -660,14 +718,14 @@ msgstr ""
msgid "File exists"
msgstr ""
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -682,10 +740,22 @@ msgstr ""
msgid "Group full"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr ""
@@ -712,20 +782,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr ""
@@ -734,7 +830,7 @@ msgstr ""
msgid "Invalid bits per value"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr ""
@@ -762,6 +858,14 @@ msgstr ""
msgid "Invalid format chunk size"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr ""
@@ -788,7 +892,9 @@ msgstr ""
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr ""
@@ -820,6 +926,10 @@ msgstr ""
msgid "Invalid wave file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr ""
@@ -865,10 +975,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -878,6 +996,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr ""
@@ -886,11 +1005,23 @@ msgstr ""
msgid "No DMA channel found"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr ""
@@ -919,6 +1050,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -985,12 +1120,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr ""
@@ -1018,6 +1160,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr ""
@@ -1026,6 +1185,10 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr ""
@@ -1066,6 +1229,14 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr ""
@@ -1105,6 +1276,10 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1178,6 +1353,26 @@ msgstr ""
msgid "Tuple or struct_time argument required"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr ""
@@ -1259,7 +1454,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr ""
@@ -1776,7 +1971,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
@@ -1886,6 +2081,7 @@ msgid "incorrect padding"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2278,6 +2474,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
@@ -2483,7 +2680,8 @@ msgstr ""
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index f38a03689..8fa78d64e 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@@ -273,6 +273,7 @@ msgstr "Alle timer für diesen Pin werden bereits benutzt"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -283,6 +284,12 @@ msgstr "Alle timer werden benutzt"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "AnalogOut-Funktion wird nicht unterstützt"
@@ -296,6 +303,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "AnalogOut ist an diesem Pin nicht unterstützt"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Ein anderer Sendevorgang ist schon aktiv"
@@ -409,6 +417,7 @@ msgid "Cannot delete values"
msgstr "Kann Werte nicht löschen"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "Pull up im Ausgabemodus nicht möglich"
@@ -438,6 +447,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "Kann '/' nicht remounten when USB aktiv ist"
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr "Reset zum bootloader nicht möglich da bootloader nicht vorhanden"
@@ -457,6 +468,10 @@ msgstr "Übertragung ohne MOSI- und MISO-Pins nicht möglich."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "sizeof scalar kann nicht eindeutig bestimmt werden"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Kann nicht ohne MOSI-Pin schreiben."
@@ -513,25 +528,53 @@ msgstr "Beschädigte .mpy Datei"
msgid "Corrupt raw code"
msgstr "Beschädigter raw code"
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "Konnte UART nicht initialisieren"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "Konnte first buffer nicht zuteilen"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "Konnte second buffer nicht zuteilen"
@@ -539,6 +582,14 @@ msgstr "Konnte second buffer nicht zuteilen"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC wird schon benutzt"
@@ -564,6 +615,10 @@ msgstr "Die Zielkapazität ist kleiner als destination_length."
msgid "Device in use"
msgstr "Gerät in Benutzung"
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr "Display muss einen 16 Bit Farbraum haben."
@@ -580,6 +635,7 @@ msgstr "Drive mode wird nicht verwendet, wenn die Richtung input ist."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "EXTINT Kanal ist schon in Benutzung"
@@ -629,11 +685,13 @@ msgstr "Kommando nicht gesendet."
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Mutex konnte nicht akquiriert werden. Status: 0x%04x"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Konnte keinen RX Buffer allozieren"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -647,7 +705,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr "Verbindung nicht erfolgreich: timeout"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -664,16 +722,16 @@ msgstr ""
msgid "File exists"
msgstr "Datei existiert"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
"Die aufgezeichnete Frequenz liegt über der Leistungsgrenze. Aufnahme "
"angehalten."
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -688,10 +746,22 @@ msgstr "Gruppe schon benutzt"
msgid "Group full"
msgstr "Gruppe voll"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "Lese/Schreibe-operation an geschlossener Datei"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "I2C-operation nicht unterstützt"
@@ -720,20 +790,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Ungültiger %q pin"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr "Ungültige BMP-Datei"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Ungültige PWM Frequenz"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Ungültiges Argument"
@@ -742,7 +838,7 @@ msgstr "Ungültiges Argument"
msgid "Invalid bits per value"
msgstr "Ungültige Bits pro Wert"
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr "Ungültige Puffergröße"
@@ -770,6 +866,14 @@ msgstr "Ungültige Datei"
msgid "Invalid format chunk size"
msgstr "Ungültige format chunk size"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Ungültige Anzahl von Bits"
@@ -796,7 +900,9 @@ msgstr "Ungültiger Pin für rechten Kanal"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Ungültige Pins"
@@ -828,6 +934,10 @@ msgstr "Ungültige Anzahl von Stimmen"
msgid "Invalid wave file"
msgstr "Ungültige wave Datei"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr "LHS des Schlüsselwortarguments muss eine id sein"
@@ -874,10 +984,18 @@ msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
"Die Startverzögerung des Mikrofons muss im Bereich von 0,0 bis 1,0 liegen"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr "Muss eine %q Unterklasse sein."
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -887,6 +1005,7 @@ msgid "No CCCD for this Characteristic"
msgstr "Kein CCCD für diese Charakteristik"
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Kein DAC im Chip vorhanden"
@@ -895,11 +1014,23 @@ msgstr "Kein DAC im Chip vorhanden"
msgid "No DMA channel found"
msgstr "Kein DMA Kanal gefunden"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Kein RX Pin"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Kein TX Pin"
@@ -928,6 +1059,10 @@ msgstr "Keine Hardwareunterstützung am clk Pin"
msgid "No hardware support on pin"
msgstr "Keine Hardwareunterstützung an diesem Pin"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr "Kein Pulldown Widerstand am Pin; 1Mohm wird vorgeschlagen"
@@ -1000,12 +1135,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False."
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Zugang verweigert"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Pin hat keine ADC Funktionalität"
@@ -1035,6 +1177,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr "Pull wird nicht verwendet, wenn die Richtung output ist."
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "Die RTC-Kalibrierung wird auf diesem Board nicht unterstützt"
@@ -1043,6 +1202,10 @@ msgstr "Die RTC-Kalibrierung wird auf diesem Board nicht unterstützt"
msgid "RTC is not supported on this board"
msgstr "Eine RTC wird auf diesem Board nicht unterstützt"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr "Bereich außerhalb der Grenzen"
@@ -1083,6 +1246,14 @@ msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n"
msgid "SDA or SCL needs a pull up"
msgstr "SDA oder SCL brauchen pull up"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr "Abtastrate muss positiv sein"
@@ -1122,6 +1293,10 @@ msgstr "Die Stackgröße sollte mindestens 256 sein"
msgid "Stream missing readinto() or write() method."
msgstr "Stream fehlt readinto() oder write() Methode."
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1197,6 +1372,26 @@ msgstr "Zurückverfolgung (jüngste Aufforderung zuletzt):\n"
msgid "Tuple or struct_time argument required"
msgstr "Tuple- oder struct_time-Argument erforderlich"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "USB beschäftigt"
@@ -1280,7 +1475,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Baudrate wird nicht unterstützt"
@@ -1805,7 +2000,7 @@ msgstr "Es wurden zusätzliche Keyword-Argumente angegeben"
msgid "extra positional arguments given"
msgstr "Es wurden zusätzliche Argumente ohne Keyword angegeben"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "Die Datei muss eine im Byte-Modus geöffnete Datei sein"
@@ -1916,6 +2111,7 @@ msgid "incorrect padding"
msgstr "padding ist inkorrekt"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index außerhalb der Reichweite"
@@ -2316,6 +2512,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader muss displayio.Palette oder displayio.ColorConverter sein"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop von einem leeren PulseIn"
@@ -2524,7 +2721,8 @@ msgstr "tupel/list hat falsche Länge"
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "tx und rx können nicht beide None sein"
diff --git a/locale/en_US.po b/locale/en_US.po
index 136d0699d..df73627e6 100644
--- a/locale/en_US.po
+++ b/locale/en_US.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -271,6 +271,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -281,6 +282,12 @@ msgstr ""
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr ""
@@ -294,6 +301,7 @@ msgid "AnalogOut not supported on given pin"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr ""
@@ -405,6 +413,7 @@ msgid "Cannot delete values"
msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr ""
@@ -434,6 +443,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
@@ -453,6 +464,10 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr ""
@@ -509,25 +524,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr ""
@@ -535,6 +578,14 @@ msgstr ""
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr ""
@@ -560,6 +611,10 @@ msgstr ""
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -576,6 +631,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr ""
@@ -625,11 +681,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -643,7 +701,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -660,14 +718,14 @@ msgstr ""
msgid "File exists"
msgstr ""
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -682,10 +740,22 @@ msgstr ""
msgid "Group full"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr ""
@@ -712,20 +782,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr ""
@@ -734,7 +830,7 @@ msgstr ""
msgid "Invalid bits per value"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr ""
@@ -762,6 +858,14 @@ msgstr ""
msgid "Invalid format chunk size"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr ""
@@ -788,7 +892,9 @@ msgstr ""
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr ""
@@ -820,6 +926,10 @@ msgstr ""
msgid "Invalid wave file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr ""
@@ -865,10 +975,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -878,6 +996,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr ""
@@ -886,11 +1005,23 @@ msgstr ""
msgid "No DMA channel found"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr ""
@@ -919,6 +1050,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -985,12 +1120,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr ""
@@ -1018,6 +1160,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr ""
@@ -1026,6 +1185,10 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr ""
@@ -1066,6 +1229,14 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr ""
@@ -1105,6 +1276,10 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1178,6 +1353,26 @@ msgstr ""
msgid "Tuple or struct_time argument required"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr ""
@@ -1259,7 +1454,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr ""
@@ -1776,7 +1971,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
@@ -1886,6 +2081,7 @@ msgid "incorrect padding"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2278,6 +2474,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
@@ -2483,7 +2680,8 @@ msgstr ""
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr ""
diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po
index 81e05f7dc..58fdf9f70 100644
--- a/locale/en_x_pirate.po
+++ b/locale/en_x_pirate.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n"
@@ -273,6 +273,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -283,6 +284,12 @@ msgstr ""
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr ""
@@ -296,6 +303,7 @@ msgid "AnalogOut not supported on given pin"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Belay that! thar be another active send"
@@ -409,6 +417,7 @@ msgid "Cannot delete values"
msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr ""
@@ -438,6 +447,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
@@ -457,6 +468,10 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr ""
@@ -513,25 +528,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr ""
@@ -539,6 +582,14 @@ msgstr ""
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr ""
@@ -564,6 +615,10 @@ msgstr ""
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -580,6 +635,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Avast! EXTINT channel already in use"
@@ -629,11 +685,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -647,7 +705,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -664,14 +722,14 @@ msgstr ""
msgid "File exists"
msgstr ""
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -686,10 +744,22 @@ msgstr ""
msgid "Group full"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr ""
@@ -716,20 +786,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Avast! %q pin be invalid"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr ""
@@ -738,7 +834,7 @@ msgstr ""
msgid "Invalid bits per value"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr ""
@@ -766,6 +862,14 @@ msgstr ""
msgid "Invalid format chunk size"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr ""
@@ -792,7 +896,9 @@ msgstr "Belay that! Invalid pin for starboard-side channel"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr ""
@@ -824,6 +930,10 @@ msgstr ""
msgid "Invalid wave file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr ""
@@ -869,10 +979,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -882,6 +1000,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Shiver me timbers! There be no DAC on this chip"
@@ -890,11 +1009,23 @@ msgstr "Shiver me timbers! There be no DAC on this chip"
msgid "No DMA channel found"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr ""
@@ -923,6 +1054,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -989,12 +1124,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Belay that! Th' Pin be not ADC capable"
@@ -1022,6 +1164,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr ""
@@ -1030,6 +1189,10 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr ""
@@ -1070,6 +1233,14 @@ msgstr "Runnin' in safe mode! Nay runnin' saved code.\n"
msgid "SDA or SCL needs a pull up"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr ""
@@ -1109,6 +1280,10 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1182,6 +1357,26 @@ msgstr ""
msgid "Tuple or struct_time argument required"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr ""
@@ -1263,7 +1458,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr ""
@@ -1780,7 +1975,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
@@ -1890,6 +2085,7 @@ msgid "incorrect padding"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2282,6 +2478,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
@@ -2487,7 +2684,8 @@ msgstr ""
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr ""
diff --git a/locale/es.po b/locale/es.po
index a8f6afb2a..6521921a9 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -275,6 +275,7 @@ msgstr "Todos los timers para este pin están siendo utilizados"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -285,6 +286,12 @@ msgstr "Todos los timers en uso"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "Funcionalidad AnalogOut no soportada"
@@ -298,6 +305,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "El pin proporcionado no soporta AnalogOut"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Otro envío ya está activo"
@@ -411,6 +419,7 @@ msgid "Cannot delete values"
msgstr "No se puede eliminar valores"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "No puede ser pull mientras este en modo de salida"
@@ -440,6 +449,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "No se puede volver a montar '/' cuando el USB esta activo."
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr "No se puede reiniciar a bootloader porque no hay bootloader presente."
@@ -459,6 +470,10 @@ msgstr "No se puede transmitir sin pines MOSI y MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "No se puede obtener inequívocamente sizeof escalar"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "No se puede escribir sin pin MOSI."
@@ -515,25 +530,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "No se puede inicializar la UART"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "No se pudo asignar el primer buffer"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "No se pudo asignar el segundo buffer"
@@ -541,6 +584,14 @@ msgstr "No se pudo asignar el segundo buffer"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC ya está siendo utilizado"
@@ -566,6 +617,10 @@ msgstr "Capacidad de destino es mas pequeña que destination_length."
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -582,6 +637,7 @@ msgstr "Modo Drive no se usa cuando la dirección es input."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "El canal EXTINT ya está siendo utilizado"
@@ -631,11 +687,13 @@ msgstr "Fallo enviando comando"
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "No se puede adquirir el mutex, status: 0x%08lX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Ha fallado la asignación del buffer RX"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -649,7 +707,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -666,14 +724,14 @@ msgstr ""
msgid "File exists"
msgstr "El archivo ya existe"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr "Falló la escritura"
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr "Frecuencia capturada por encima de la capacidad. Captura en pausa."
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -688,10 +746,22 @@ msgstr ""
msgid "Group full"
msgstr "Group lleno"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "Operación I/O en archivo cerrado"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "operación I2C no soportada"
@@ -720,20 +790,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Pin %q inválido"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr "Archivo BMP inválido"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Frecuencia PWM inválida"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Argumento inválido"
@@ -742,7 +838,7 @@ msgstr "Argumento inválido"
msgid "Invalid bits per value"
msgstr "Inválido bits por valor"
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr "Tamaño de buffer inválido"
@@ -770,6 +866,14 @@ msgstr "Archivo inválido"
msgid "Invalid format chunk size"
msgstr "Formato de fragmento de formato no válido"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Numero inválido de bits"
@@ -796,7 +900,9 @@ msgstr "Pin inválido para canal derecho"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "pines inválidos"
@@ -828,6 +934,10 @@ msgstr "Cuenta de voces inválida"
msgid "Invalid wave file"
msgstr "Archivo wave inválido"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr "LHS del agumento por palabra clave deberia ser un identificador"
@@ -873,10 +983,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr "Debe de ser una subclase de %q"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -886,6 +1004,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "El chip no tiene DAC"
@@ -894,11 +1013,23 @@ msgstr "El chip no tiene DAC"
msgid "No DMA channel found"
msgstr "No se encontró el canal DMA"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Sin pin RX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Sin pin TX"
@@ -927,6 +1058,10 @@ msgstr "Sin soporte de hardware en el pin clk"
msgid "No hardware support on pin"
msgstr "Sin soporte de hardware en pin"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -999,12 +1134,19 @@ msgstr ""
"PWM frecuencia no esta escrito cuando el variable_frequency es falso en "
"construcion"
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Permiso denegado"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Pin no tiene capacidad ADC"
@@ -1034,6 +1176,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr "Pull no se usa cuando la dirección es output."
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "Calibración de RTC no es soportada en esta placa"
@@ -1042,6 +1201,10 @@ msgstr "Calibración de RTC no es soportada en esta placa"
msgid "RTC is not supported on this board"
msgstr "RTC no soportado en esta placa"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
#, fuzzy
msgid "Range out of bounds"
@@ -1084,6 +1247,14 @@ msgstr "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n"
msgid "SDA or SCL needs a pull up"
msgstr "SDA o SCL necesitan una pull up"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr "Sample rate debe ser positivo"
@@ -1123,6 +1294,10 @@ msgstr "El tamaño de la pila debe ser de al menos 256"
msgid "Stream missing readinto() or write() method."
msgstr "A Stream le falta el método readinto() o write()."
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1196,6 +1371,26 @@ msgstr "Traceback (ultima llamada reciente):\n"
msgid "Tuple or struct_time argument required"
msgstr "Argumento tuple o struct_time requerido"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "USB ocupado"
@@ -1277,7 +1472,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Baudrate no soportado"
@@ -1808,7 +2003,7 @@ msgstr "argumento(s) por palabra clave adicionales fueron dados"
msgid "extra positional arguments given"
msgstr "argumento posicional adicional dado"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "el archivo deberia ser una archivo abierto en modo byte"
@@ -1918,6 +2113,7 @@ msgid "incorrect padding"
msgstr "relleno (padding) incorrecto"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index fuera de rango"
@@ -2317,6 +2513,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop de un PulseIn vacío"
@@ -2525,7 +2722,8 @@ msgstr "tupla/lista tiene una longitud incorrecta"
msgid "tuple/list required on RHS"
msgstr "tuple/lista se require en RHS"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "Ambos tx y rx no pueden ser None"
@@ -2850,6 +3048,9 @@ msgstr "paso cero"
#~ msgid "Flash erase failed to start, err 0x%04x"
#~ msgstr "Falló el iniciar borrado de flash, err 0x%04x"
+#~ msgid "Flash write failed"
+#~ msgstr "Falló la escritura"
+
#~ msgid "Flash write failed to start, err 0x%04x"
#~ msgstr "Falló el iniciar la escritura de flash, err 0x%04x"
diff --git a/locale/fil.po b/locale/fil.po
index 3c1d13fa8..69d7e169a 100644
--- a/locale/fil.po
+++ b/locale/fil.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@@ -275,6 +275,7 @@ msgstr "Lahat ng timers para sa pin na ito ay ginagamit"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -285,6 +286,12 @@ msgstr "Lahat ng timer ginagamit"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "Hindi supportado ang AnalogOut"
@@ -298,6 +305,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "Hindi supportado ang AnalogOut sa ibinigay na pin"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Isa pang send ay aktibo na"
@@ -412,6 +420,7 @@ msgid "Cannot delete values"
msgstr "Hindi mabura ang values"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "Hindi makakakuha ng pull habang nasa output mode"
@@ -442,6 +451,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "Hindi ma-remount '/' kapag aktibo ang USB."
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr "Hindi ma-reset sa bootloader dahil walang bootloader."
@@ -461,6 +472,10 @@ msgstr "Hindi maaaring ilipat kapag walang MOSI at MISO pin."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Hindi puedeng hindi sigurado ang get sizeof scalar"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Hindi maaring isulat kapag walang MOSI pin."
@@ -518,25 +533,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "Hindi ma-initialize ang UART"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "Hindi ma-iallocate ang first buffer"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "Hindi ma-iallocate ang second buffer"
@@ -544,6 +587,14 @@ msgstr "Hindi ma-iallocate ang second buffer"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "Ginagamit na ang DAC"
@@ -572,6 +623,10 @@ msgstr ""
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -588,6 +643,7 @@ msgstr "Drive mode ay hindi ginagamit kapag ang direksyon ay input."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Ginagamit na ang EXTINT channel"
@@ -639,11 +695,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Nabigong ilaan ang RX buffer"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -657,7 +715,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -674,14 +732,14 @@ msgstr ""
msgid "File exists"
msgstr "Mayroong file"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -696,10 +754,22 @@ msgstr ""
msgid "Group full"
msgstr "Puno ang group"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "I/O operasyon sa saradong file"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "Hindi supportado ang operasyong I2C"
@@ -728,20 +798,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Mali ang %q pin"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr "Mali ang BMP file"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Mali ang PWM frequency"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Maling argumento"
@@ -750,7 +846,7 @@ msgstr "Maling argumento"
msgid "Invalid bits per value"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr "Mali ang buffer size"
@@ -778,6 +874,14 @@ msgstr "Mali ang file"
msgid "Invalid format chunk size"
msgstr "Mali ang format ng chunk size"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Mali ang bilang ng bits"
@@ -804,7 +908,9 @@ msgstr "Mali ang pin para sa kanang channel"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Mali ang pins"
@@ -836,6 +942,10 @@ msgstr "Maling bilang ng voice"
msgid "Invalid wave file"
msgstr "May hindi tama sa wave file"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr "LHS ng keyword arg ay dapat na id"
@@ -881,10 +991,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr "Ang delay ng startup ng mikropono ay dapat na nasa 0.0 hanggang 1.0"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -894,6 +1012,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Walang DAC sa chip"
@@ -902,11 +1021,23 @@ msgstr "Walang DAC sa chip"
msgid "No DMA channel found"
msgstr "Walang DMA channel na mahanap"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Walang RX pin"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Walang TX pin"
@@ -935,6 +1066,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr "Walang support sa hardware ang pin"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -1005,12 +1140,19 @@ msgid ""
msgstr ""
"PWM frequency hindi writable kapag variable_frequency ay False sa pag buo."
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Walang pahintulot"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Ang pin ay walang kakayahan sa ADC"
@@ -1040,6 +1182,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr "Pull hindi ginagamit kapag ang direksyon ay output."
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "RTC calibration ay hindi supportado ng board na ito"
@@ -1048,6 +1207,10 @@ msgstr "RTC calibration ay hindi supportado ng board na ito"
msgid "RTC is not supported on this board"
msgstr "Hindi supportado ang RTC sa board na ito"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
#, fuzzy
msgid "Range out of bounds"
@@ -1090,6 +1253,14 @@ msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n"
msgid "SDA or SCL needs a pull up"
msgstr "Kailangan ng pull up resistors ang SDA o SCL"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr "Sample rate ay dapat positibo"
@@ -1129,6 +1300,10 @@ msgstr "Ang laki ng stack ay dapat na hindi bababa sa 256"
msgid "Stream missing readinto() or write() method."
msgstr "Stream kulang ng readinto() o write() method."
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1202,6 +1377,26 @@ msgstr "Traceback (pinakahuling huling tawag): \n"
msgid "Tuple or struct_time argument required"
msgstr "Tuple o struct_time argument kailangan"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "Busy ang USB"
@@ -1284,7 +1479,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Hindi supportadong baudrate"
@@ -1822,7 +2017,7 @@ msgstr "dagdag na keyword argument na ibinigay"
msgid "extra positional arguments given"
msgstr "dagdag na positional argument na ibinigay"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "file ay dapat buksan sa byte mode"
@@ -1933,6 +2128,7 @@ msgid "incorrect padding"
msgstr "mali ang padding"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index wala sa sakop"
@@ -2331,6 +2527,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop mula sa walang laman na PulseIn"
@@ -2540,7 +2737,8 @@ msgstr "mali ang haba ng tuple/list"
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "tx at rx hindi pwedeng parehas na None"
diff --git a/locale/fr.po b/locale/fr.po
index df189306c..a9124679f 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n"
@@ -278,6 +278,7 @@ msgstr "Tous les timers pour cette broche sont utilisés"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -288,6 +289,12 @@ msgstr "Tous les timers sont utilisés"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "Fonctionnalité AnalogOut non supportée"
@@ -302,6 +309,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "'AnalogOut' n'est pas supporté sur la broche indiquée"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Un autre envoi est déjà actif"
@@ -416,6 +424,7 @@ msgid "Cannot delete values"
msgstr "Impossible de supprimer les valeurs"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "Ne peut être tiré ('pull') en mode 'output'"
@@ -446,6 +455,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "'/' ne peut être remonté quand l'USB est actif."
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
"Ne peut être redémarré vers le bootloader car il n'y a pas de bootloader."
@@ -466,6 +477,10 @@ msgstr "Pas de transfert sans broches MOSI et MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Impossible d'obtenir la taille du scalaire sans ambigüité"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Impossible d'écrire sans broche MOSI."
@@ -523,25 +538,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "L'UART n'a pu être initialisé"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "Impossible d'allouer le 1er tampon"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "Impossible d'allouer le 2e tampon"
@@ -549,6 +592,14 @@ msgstr "Impossible d'allouer le 2e tampon"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC déjà utilisé"
@@ -575,6 +626,10 @@ msgstr "La capacité de destination est plus petite que 'destination_length'."
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -591,6 +646,7 @@ msgstr "Le mode Drive n'est pas utilisé quand la direction est 'input'."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Canal EXTINT déjà utilisé"
@@ -642,11 +698,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Echec de l'obtention de mutex, err 0x%04x"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Echec de l'allocation du tampon RX"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -660,7 +718,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -677,14 +735,14 @@ msgstr ""
msgid "File exists"
msgstr "Le fichier existe"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr "L'écriture de la flash échoué"
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr "La fréquence capturée est au delà des capacités. Capture en pause."
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -699,10 +757,22 @@ msgstr ""
msgid "Group full"
msgstr "Groupe plein"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "opération d'E/S sur un fichier fermé"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "opération sur I2C non supportée"
@@ -731,21 +801,47 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Broche invalide pour '%q'"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, fuzzy
msgid "Invalid BMP file"
msgstr "Fichier BMP invalide"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Fréquence de PWM invalide"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Argument invalide"
@@ -754,7 +850,7 @@ msgstr "Argument invalide"
msgid "Invalid bits per value"
msgstr "Bits par valeur invalides"
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
#, fuzzy
msgid "Invalid buffer size"
msgstr "Longueur de tampon invalide"
@@ -784,6 +880,14 @@ msgstr "Fichier invalide"
msgid "Invalid format chunk size"
msgstr "Taille de bloc de formatage invalide"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Nombre de bits invalide"
@@ -810,7 +914,9 @@ msgstr "Broche invalide pour le canal droit"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Broches invalides"
@@ -843,6 +949,10 @@ msgstr "Nombre de voix invalide"
msgid "Invalid wave file"
msgstr "Fichier WAVE invalide"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr "La partie gauche de l'argument nommé doit être un identifiant"
@@ -888,10 +998,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr "Le délais au démarrage du micro doit être entre 0.0 et 1.0"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -901,6 +1019,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Pas de DAC sur la puce"
@@ -909,11 +1028,23 @@ msgstr "Pas de DAC sur la puce"
msgid "No DMA channel found"
msgstr "Aucun canal DMA trouvé"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Pas de broche RX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Pas de broche TX"
@@ -942,6 +1073,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr "Pas de support matériel pour cette broche"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -1019,12 +1154,19 @@ msgstr ""
"La fréquence de PWM n'est pas modifiable quand variable_frequency est False "
"à la construction."
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Permission refusée"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "La broche ne peut être utilisée pour l'ADC"
@@ -1053,6 +1195,23 @@ msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger."
msgid "Pull not used when direction is output."
msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'."
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "étalonnage de la RTC non supportée sur cette carte"
@@ -1061,6 +1220,10 @@ msgstr "étalonnage de la RTC non supportée sur cette carte"
msgid "RTC is not supported on this board"
msgstr "RTC non supportée sur cette carte"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
#, fuzzy
msgid "Range out of bounds"
@@ -1103,6 +1266,14 @@ msgstr "Mode sans-échec! Le code sauvegardé n'est pas éxecuté.\n"
msgid "SDA or SCL needs a pull up"
msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
#, fuzzy
msgid "Sample rate must be positive"
@@ -1143,6 +1314,10 @@ msgstr "La pile doit être au moins de 256"
msgid "Stream missing readinto() or write() method."
msgstr "Il manque une méthode readinto() ou write() au flux."
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1217,6 +1392,26 @@ msgstr "Trace (appels les plus récents en dernier):\n"
msgid "Tuple or struct_time argument required"
msgstr "Argument de type tuple ou struct_time nécessaire"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "USB occupé"
@@ -1303,7 +1498,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Débit non supporté"
@@ -1848,7 +2043,7 @@ msgstr "argument(s) nommé(s) supplémentaire(s) donné(s)"
msgid "extra positional arguments given"
msgstr "argument(s) positionnel(s) supplémentaire(s) donné(s)"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "le fichier doit être un fichier ouvert en mode 'byte'"
@@ -1958,6 +2153,7 @@ msgid "incorrect padding"
msgstr "espacement incorrect"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index hors gamme"
@@ -2364,6 +2560,7 @@ msgstr ""
"pixel_shader doit être un objet displayio.Palette ou displayio.ColorConverter"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "'pop' d'une entrée PulseIn vide"
@@ -2574,7 +2771,8 @@ msgstr "tuple/liste a une mauvaise longueur"
msgid "tuple/list required on RHS"
msgstr "tuple ou liste requis en partie droite"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "tx et rx ne peuvent être 'None' tous les deux"
@@ -2912,6 +3110,9 @@ msgstr "'step' nul"
#~ msgid "Flash erase failed to start, err 0x%04x"
#~ msgstr "Echec du démarrage de l'effacement de la flash, err 0x%04x"
+#~ msgid "Flash write failed"
+#~ msgstr "L'écriture de la flash échoué"
+
#~ msgid "Flash write failed to start, err 0x%04x"
#~ msgstr "Echec du démarrage de l'écriture de la flash, err 0x%04x"
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 3a6a71006..6164f6cf8 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@@ -274,6 +274,7 @@ msgstr "Tutti i timer per questo pin sono in uso"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -284,6 +285,12 @@ msgstr "Tutti i timer utilizzati"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "funzionalità AnalogOut non supportata"
@@ -297,6 +304,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "AnalogOut non supportato sul pin scelto"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Another send è gia activato"
@@ -412,6 +420,7 @@ msgid "Cannot delete values"
msgstr "Impossibile cancellare valori"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "non si può tirare quando nella modalita output"
@@ -442,6 +451,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "Non è possibile rimontare '/' mentre l'USB è attiva."
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
"Impossibile resettare nel bootloader poiché nessun bootloader è presente."
@@ -462,6 +473,10 @@ msgstr "Impossibile trasferire senza i pin MOSI e MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Impossibile ricavare la grandezza scalare di sizeof inequivocabilmente"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Impossibile scrivere senza pin MOSI."
@@ -519,25 +534,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "Impossibile inizializzare l'UART"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "Impossibile allocare il primo buffer"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "Impossibile allocare il secondo buffer"
@@ -545,6 +588,14 @@ msgstr "Impossibile allocare il secondo buffer"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC già in uso"
@@ -572,6 +623,10 @@ msgstr "La capacità di destinazione è più piccola di destination_length."
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -588,6 +643,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Canale EXTINT già in uso"
@@ -639,11 +695,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Impossibile allocare buffer RX"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -657,7 +715,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -674,14 +732,14 @@ msgstr ""
msgid "File exists"
msgstr "File esistente"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr "Impostazione di Flash fallito"
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -696,10 +754,22 @@ msgstr ""
msgid "Group full"
msgstr "Gruppo pieno"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "operazione I/O su file chiuso"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "operazione I2C non supportata"
@@ -728,20 +798,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Pin %q non valido"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr "File BMP non valido"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Frequenza PWM non valida"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Argomento non valido"
@@ -750,7 +846,7 @@ msgstr "Argomento non valido"
msgid "Invalid bits per value"
msgstr "bits per valore invalido"
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
#, fuzzy
msgid "Invalid buffer size"
msgstr "lunghezza del buffer non valida"
@@ -780,6 +876,14 @@ msgstr "File non valido"
msgid "Invalid format chunk size"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Numero di bit non valido"
@@ -806,7 +910,9 @@ msgstr "Pin non valido per il canale destro"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Pin non validi"
@@ -839,6 +945,10 @@ msgstr "Tipo di servizio non valido"
msgid "Invalid wave file"
msgstr "File wave non valido"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr ""
@@ -885,10 +995,18 @@ msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
"Il ritardo di avvio del microfono deve essere nell'intervallo tra 0.0 e 1.0"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -898,6 +1016,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Nessun DAC sul chip"
@@ -906,11 +1025,23 @@ msgstr "Nessun DAC sul chip"
msgid "No DMA channel found"
msgstr "Nessun canale DMA trovato"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Nessun pin RX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Nessun pin TX"
@@ -939,6 +1070,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr "Nessun supporto hardware sul pin"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -1014,12 +1149,19 @@ msgstr ""
"frequenza PWM frequency non è scrivibile quando variable_frequency è "
"impostato nel costruttore a False."
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Permesso negato"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Il pin non ha capacità di ADC"
@@ -1049,6 +1191,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "calibrazione RTC non supportata su questa scheda"
@@ -1057,6 +1216,10 @@ msgstr "calibrazione RTC non supportata su questa scheda"
msgid "RTC is not supported on this board"
msgstr "RTC non supportato su questa scheda"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
#, fuzzy
msgid "Range out of bounds"
@@ -1099,6 +1262,14 @@ msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n"
msgid "SDA or SCL needs a pull up"
msgstr "SDA o SCL necessitano un pull-up"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
#, fuzzy
msgid "Sample rate must be positive"
@@ -1140,6 +1311,10 @@ msgstr "La dimensione dello stack deve essere almeno 256"
msgid "Stream missing readinto() or write() method."
msgstr "Metodi mancanti readinto() o write() allo stream."
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1213,6 +1388,26 @@ msgstr "Traceback (chiamata più recente per ultima):\n"
msgid "Tuple or struct_time argument required"
msgstr "Tupla o struct_time richiesto come argomento"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "USB occupata"
@@ -1295,7 +1490,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "baudrate non supportato"
@@ -1823,7 +2018,7 @@ msgstr "argomento nominato aggiuntivo fornito"
msgid "extra positional arguments given"
msgstr "argomenti posizonali extra dati"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
@@ -1934,6 +2129,7 @@ msgid "incorrect padding"
msgstr "padding incorretto"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "indice fuori intervallo"
@@ -2338,6 +2534,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader deve essere displayio.Palette o displayio.ColorConverter"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop sun un PulseIn vuoto"
@@ -2547,7 +2744,8 @@ msgstr "tupla/lista ha la lunghezza sbagliata"
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "tx e rx non possono essere entrambi None"
@@ -2869,6 +3067,9 @@ msgstr "zero step"
#~ msgid "Flash erase failed to start, err 0x%04x"
#~ msgstr "Iniziamento di Cancellamento di Flash fallito, err 0x%04x"
+#~ msgid "Flash write failed"
+#~ msgstr "Impostazione di Flash fallito"
+
#~ msgid "Flash write failed to start, err 0x%04x"
#~ msgstr "Iniziamento di Impostazione di Flash dallito, err 0x%04x"
diff --git a/locale/ko.po b/locale/ko.po
index d8c9cbfba..ee4800626 100644
--- a/locale/ko.po
+++ b/locale/ko.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -273,6 +273,7 @@ msgstr "핀의 모든 타이머가 사용 중입니다"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -283,6 +284,12 @@ msgstr "모든 타이머가 사용 중입니다"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr ""
@@ -296,6 +303,7 @@ msgid "AnalogOut not supported on given pin"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr ""
@@ -409,6 +417,7 @@ msgid "Cannot delete values"
msgstr "값을 삭제할 수 없습니다"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr ""
@@ -438,6 +447,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr ""
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
@@ -457,6 +468,10 @@ msgstr ""
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr ""
@@ -513,25 +528,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr ""
@@ -539,6 +582,14 @@ msgstr ""
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC가 현재 사용 중입니다"
@@ -564,6 +615,10 @@ msgstr ""
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -580,6 +635,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr ""
@@ -629,11 +685,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -647,7 +705,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -664,14 +722,14 @@ msgstr ""
msgid "File exists"
msgstr ""
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -686,10 +744,22 @@ msgstr ""
msgid "Group full"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr ""
@@ -716,20 +786,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr ""
@@ -738,7 +834,7 @@ msgstr ""
msgid "Invalid bits per value"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr ""
@@ -766,6 +862,14 @@ msgstr "파일이 유효하지 않습니다"
msgid "Invalid format chunk size"
msgstr "형식 청크 크기가 잘못되었습니다"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "비트 수가 유효하지 않습니다"
@@ -792,7 +896,9 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "핀이 유효하지 않습니다"
@@ -824,6 +930,10 @@ msgstr ""
msgid "Invalid wave file"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr ""
@@ -869,10 +979,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -882,6 +1000,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr ""
@@ -890,11 +1009,23 @@ msgstr ""
msgid "No DMA channel found"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr ""
@@ -923,6 +1054,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -989,12 +1124,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr ""
@@ -1022,6 +1164,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr ""
@@ -1030,6 +1189,10 @@ msgstr ""
msgid "RTC is not supported on this board"
msgstr ""
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr ""
@@ -1070,6 +1233,14 @@ msgstr ""
msgid "SDA or SCL needs a pull up"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr ""
@@ -1109,6 +1280,10 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1182,6 +1357,26 @@ msgstr ""
msgid "Tuple or struct_time argument required"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr ""
@@ -1264,7 +1459,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr ""
@@ -1781,7 +1976,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
@@ -1891,6 +2086,7 @@ msgid "incorrect padding"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2283,6 +2479,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
@@ -2488,7 +2685,8 @@ msgstr ""
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr ""
diff --git a/locale/pl.po b/locale/pl.po
index 6a16b2437..6a009357d 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n"
@@ -272,6 +272,7 @@ msgstr "Wszystkie timery tej nóżki w użyciu"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -282,6 +283,12 @@ msgstr "Wszystkie timery w użyciu"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "AnalogOut jest niewspierane"
@@ -295,6 +302,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "AnalogOut niewspierany na tej nóżce"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Wysyłanie jest już w toku"
@@ -408,6 +416,7 @@ msgid "Cannot delete values"
msgstr "Nie można usunąć"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "Nie ma podciągnięcia w trybie wyjścia"
@@ -437,6 +446,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "Nie można przemontować '/' gdy USB działa."
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr "Nie można zrestartować -- nie ma bootloadera."
@@ -456,6 +467,10 @@ msgstr "Nie można przesyłać bez nóżek MOSI i MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Wielkość skalara jest niejednoznaczna"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Nie można pisać bez nóżki MOSI."
@@ -512,25 +527,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "Ustawienie UART nie powiodło się"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "Nie udała się alokacja pierwszego bufora"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "Nie udała się alokacja drugiego bufora"
@@ -538,6 +581,14 @@ msgstr "Nie udała się alokacja drugiego bufora"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC w użyciu"
@@ -563,6 +614,10 @@ msgstr "Pojemność celu mniejsza od destination_length."
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -579,6 +634,7 @@ msgstr "Tryb sterowania nieużywany w trybie wejścia."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Kanał EXTINT w użyciu"
@@ -628,11 +684,13 @@ msgstr ""
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Nie udało się uzyskać blokady, błąd 0x$04x"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Nie udała się alokacja bufora RX"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -646,7 +704,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -663,14 +721,14 @@ msgstr ""
msgid "File exists"
msgstr "Plik istnieje"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr "Zapis do flash nie powiódł się"
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr "Uzyskana częstotliwość jest niemożliwa. Spauzowano."
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -685,10 +743,22 @@ msgstr ""
msgid "Group full"
msgstr "Grupa pełna"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "Operacja I/O na zamkniętym pliku"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "Operacja I2C nieobsługiwana"
@@ -717,20 +787,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Zła nóżka %q"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr "Zły BMP"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Zła częstotliwość PWM"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Zły argument"
@@ -739,7 +835,7 @@ msgstr "Zły argument"
msgid "Invalid bits per value"
msgstr "Zła liczba bitów wartości"
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr "Zła wielkość bufora"
@@ -767,6 +863,14 @@ msgstr "Zły plik"
msgid "Invalid format chunk size"
msgstr "Zła wielkość fragmentu formatu"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Zła liczba bitów"
@@ -793,7 +897,9 @@ msgstr "Zła nóżka dla prawego kanału"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Złe nóżki"
@@ -825,6 +931,10 @@ msgstr "Zła liczba głosów"
msgid "Invalid wave file"
msgstr "Zły plik wave"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr "Lewa strona argumentu nazwanego musi być nazwą"
@@ -870,10 +980,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr "Opóźnienie włączenia mikrofonu musi być w zakresie od 0.0 do 1.0"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -883,6 +1001,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Brak DAC"
@@ -891,11 +1010,23 @@ msgstr "Brak DAC"
msgid "No DMA channel found"
msgstr "Nie znaleziono kanału DMA"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Brak nóżki RX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Brak nóżki TX"
@@ -924,6 +1055,10 @@ msgstr ""
msgid "No hardware support on pin"
msgstr "Brak sprzętowej obsługi na nóżce"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -990,12 +1125,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Nie można zmienić częstotliwości PWM gdy variable_frequency=False."
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Odmowa dostępu"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Nóżka nie obsługuje ADC"
@@ -1023,6 +1165,23 @@ msgstr "Dowolny klawisz aby uruchomić konsolę. CTRL-D aby przeładować."
msgid "Pull not used when direction is output."
msgstr "Podciągnięcie nieużywane w trybie wyjścia."
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "Brak obsługi kalibracji RTC"
@@ -1031,6 +1190,10 @@ msgstr "Brak obsługi kalibracji RTC"
msgid "RTC is not supported on this board"
msgstr "Brak obsługi RTC"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr "Zakres poza granicami"
@@ -1071,6 +1234,14 @@ msgstr "Uruchomiony tryb bezpieczeństwa! Zapisany kod nie jest uruchamiany.\n"
msgid "SDA or SCL needs a pull up"
msgstr "SDA lub SCL wymagają podciągnięcia"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr "Częstotliwość próbkowania musi być dodatnia"
@@ -1110,6 +1281,10 @@ msgstr "Stos musi mieć co najmniej 256 bajtów"
msgid "Stream missing readinto() or write() method."
msgstr "Strumień nie ma metod readinto() lub write()."
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1183,6 +1358,26 @@ msgstr "Ślad wyjątku (najnowsze wywołanie na końcu):\n"
msgid "Tuple or struct_time argument required"
msgstr "Wymagana krotka lub struct_time"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "USB Zajęte"
@@ -1264,7 +1459,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Zła szybkość transmisji"
@@ -1785,7 +1980,7 @@ msgstr "nadmiarowe argumenty nazwane"
msgid "extra positional arguments given"
msgstr "nadmiarowe argumenty pozycyjne"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "file musi być otwarte w trybie bajtowym"
@@ -1895,6 +2090,7 @@ msgid "incorrect padding"
msgstr "złe wypełnienie"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "indeks poza zakresem"
@@ -2288,6 +2484,7 @@ msgstr ""
"pixel_shader musi być typu displayio.Palette lub dispalyio.ColorConverter"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "pop z pustego PulseIn"
@@ -2494,7 +2691,8 @@ msgstr "krotka/lista ma złą długość"
msgid "tuple/list required on RHS"
msgstr "wymagana krotka/lista po prawej stronie"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "tx i rx nie mogą być oba None"
@@ -2768,6 +2966,9 @@ msgstr "zerowy krok"
#~ msgid "Flash erase failed to start, err 0x%04x"
#~ msgstr "Nie udało się rozpocząć kasowania flash, błąd 0x%04x"
+#~ msgid "Flash write failed"
+#~ msgstr "Zapis do flash nie powiódł się"
+
#~ msgid "Flash write failed to start, err 0x%04x"
#~ msgstr "Nie udało się rozpocząć zapisu do flash, błąd 0x%04x"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 7fb8fe9d7..0d6592201 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -274,6 +274,7 @@ msgstr "Todos os temporizadores para este pino estão em uso"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -284,6 +285,12 @@ msgstr "Todos os temporizadores em uso"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "Funcionalidade AnalogOut não suportada"
@@ -297,6 +304,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "Saída analógica não suportada no pino fornecido"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Outro envio já está ativo"
@@ -409,6 +417,7 @@ msgid "Cannot delete values"
msgstr "Não é possível excluir valores"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr ""
@@ -439,6 +448,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "Não é possível remontar '/' enquanto o USB estiver ativo."
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr ""
@@ -458,6 +469,10 @@ msgstr "Não é possível transferir sem os pinos MOSI e MISO."
msgid "Cannot unambiguously get sizeof scalar"
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Não é possível ler sem um pino MOSI"
@@ -515,25 +530,53 @@ msgstr ""
msgid "Corrupt raw code"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "Não foi possível inicializar o UART"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "Não pôde alocar primeiro buffer"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "Não pôde alocar segundo buffer"
@@ -541,6 +584,14 @@ msgstr "Não pôde alocar segundo buffer"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "DAC em uso"
@@ -567,6 +618,10 @@ msgstr ""
msgid "Device in use"
msgstr ""
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr ""
@@ -583,6 +638,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "Canal EXTINT em uso"
@@ -634,11 +690,13 @@ msgstr "Falha ao enviar comando."
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Falha ao alocar buffer RX"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -652,7 +710,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -669,14 +727,14 @@ msgstr ""
msgid "File exists"
msgstr "Arquivo já existe"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr ""
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -691,10 +749,22 @@ msgstr ""
msgid "Group full"
msgstr "Grupo cheio"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "Operação I/O no arquivo fechado"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "I2C operação não suportada"
@@ -721,20 +791,46 @@ msgstr ""
msgid "Insufficient encryption"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Pino do %q inválido"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr "Arquivo BMP inválido"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Frequência PWM inválida"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Argumento inválido"
@@ -743,7 +839,7 @@ msgstr "Argumento inválido"
msgid "Invalid bits per value"
msgstr ""
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
#, fuzzy
msgid "Invalid buffer size"
msgstr "Arquivo inválido"
@@ -773,6 +869,14 @@ msgstr "Arquivo inválido"
msgid "Invalid format chunk size"
msgstr "Tamanho do pedaço de formato inválido"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Número inválido de bits"
@@ -799,7 +903,9 @@ msgstr "Pino inválido para canal direito"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Pinos inválidos"
@@ -832,6 +938,10 @@ msgstr "certificado inválido"
msgid "Invalid wave file"
msgstr "Aqruivo de ondas inválido"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr ""
@@ -877,10 +987,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -890,6 +1008,7 @@ msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Nenhum DAC no chip"
@@ -898,11 +1017,23 @@ msgstr "Nenhum DAC no chip"
msgid "No DMA channel found"
msgstr "Nenhum canal DMA encontrado"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Nenhum pino RX"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Nenhum pino TX"
@@ -931,6 +1062,10 @@ msgstr "Sem suporte de hardware no pino de clock"
msgid "No hardware support on pin"
msgstr "Nenhum suporte de hardware no pino"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -1000,12 +1135,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Permissão negada"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "O pino não tem recursos de ADC"
@@ -1034,6 +1176,23 @@ msgstr ""
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "A calibração RTC não é suportada nesta placa"
@@ -1042,6 +1201,10 @@ msgstr "A calibração RTC não é suportada nesta placa"
msgid "RTC is not supported on this board"
msgstr "O RTC não é suportado nesta placa"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr ""
@@ -1083,6 +1246,14 @@ msgstr "Rodando em modo seguro! Não está executando o código salvo.\n"
msgid "SDA or SCL needs a pull up"
msgstr "SDA ou SCL precisa de um pull up"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr ""
@@ -1122,6 +1293,10 @@ msgstr "O tamanho da pilha deve ser pelo menos 256"
msgid "Stream missing readinto() or write() method."
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1195,6 +1370,26 @@ msgstr ""
msgid "Tuple or struct_time argument required"
msgstr ""
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "USB ocupada"
@@ -1276,7 +1471,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Taxa de transmissão não suportada"
@@ -1798,7 +1993,7 @@ msgstr "argumentos extras de palavras-chave passados"
msgid "extra positional arguments given"
msgstr "argumentos extra posicionais passados"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
@@ -1908,6 +2103,7 @@ msgid "incorrect padding"
msgstr "preenchimento incorreto"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "Índice fora do intervalo"
@@ -2300,6 +2496,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr ""
@@ -2507,7 +2704,8 @@ msgstr ""
msgid "tuple/list required on RHS"
msgstr ""
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "TX e RX não podem ser ambos"
diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po
index 9f1c0ea5b..d3ecc630c 100644
--- a/locale/zh_Latn_pinyin.po
+++ b/locale/zh_Latn_pinyin.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-01-07 14:31-0800\n"
+"POT-Creation-Date: 2020-01-18 11:56-0800\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
"Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n"
@@ -273,6 +273,7 @@ msgstr "Cǐ yǐn jiǎo de suǒyǒu jìshí qì zhèngzài shǐyòng"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/nrf/common-hal/pulseio/PulseOut.c shared-bindings/pulseio/PWMOut.c
#: shared-module/_pew/PewPew.c
@@ -283,6 +284,12 @@ msgstr "Suǒyǒu jìshí qì shǐyòng"
msgid "Already advertising."
msgstr ""
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+msgid "AnalogIn not supported on given pin"
+msgstr ""
+
+#: ports/cxd56/common-hal/analogio/AnalogOut.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr "Bù zhīchí AnalogOut gōngnéng"
@@ -296,6 +303,7 @@ msgid "AnalogOut not supported on given pin"
msgstr "Wèi zhīchí zhǐdìng de yǐn jiǎo AnalogOut"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
+#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
msgstr "Lìng yīgè fāsòng yǐjīng jīhuó"
@@ -409,6 +417,7 @@ msgid "Cannot delete values"
msgstr "Wúfǎ shānchú zhí"
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
+#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr "Zài shūchū móshì xià wúfǎ huòqǔ lādòng"
@@ -438,6 +447,8 @@ msgid "Cannot remount '/' when USB is active."
msgstr "USB jīhuó shí wúfǎ chóngxīn bǎng ding '/'."
#: ports/atmel-samd/common-hal/microcontroller/__init__.c
+#: ports/cxd56/common-hal/microcontroller/__init__.c
+#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c
msgid "Cannot reset into bootloader because no bootloader is present."
msgstr "Wúfǎ chóng zhì wèi bootloader, yīnwèi méiyǒu bootloader cúnzài."
@@ -457,6 +468,10 @@ msgstr "Méiyǒu MOSI/MISO jiù wúfǎ zhuǎnyí."
msgid "Cannot unambiguously get sizeof scalar"
msgstr "Wúfǎ míngquè de huòdé biāoliàng de dàxiǎo"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Cannot vary frequency on a timer that is already in use"
+msgstr ""
+
#: shared-module/bitbangio/SPI.c
msgid "Cannot write without MOSI pin."
msgstr "Wúfǎ xiě rù MOSI de yǐn jiǎo."
@@ -513,25 +528,53 @@ msgstr "Fǔbài de .mpy wénjiàn"
msgid "Corrupt raw code"
msgstr "Sǔnhuài de yuánshǐ dàimǎ"
-#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
msgid "Could not initialize UART"
msgstr "Wúfǎ chūshǐhuà UART"
-#: shared-module/audiomp3/MP3File.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not initialize timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init channel"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not re-init timer"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not restart PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Could not start PWM"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Could not start interrupt, RX busy"
+msgstr ""
+
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate decoder"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate first buffer"
msgstr "Wúfǎ fēnpèi dì yī gè huǎnchōng qū"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
msgstr ""
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate second buffer"
msgstr "Wúfǎ fēnpèi dì èr gè huǎnchōng qū"
@@ -539,6 +582,14 @@ msgstr "Wúfǎ fēnpèi dì èr gè huǎnchōng qū"
msgid "Crash into the HardFault_Handler."
msgstr ""
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Channel Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "DAC Device Init Error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
msgid "DAC already in use"
msgstr "Fā yuán huì yǐjīng shǐyòng"
@@ -564,6 +615,10 @@ msgstr "Mùbiāo róngliàng xiǎoyú mùdì de_chángdù."
msgid "Device in use"
msgstr "Zhèngzài shǐyòng de shèbèi"
+#: ports/cxd56/common-hal/digitalio/DigitalInOut.c
+msgid "DigitalInOut not supported on given pin"
+msgstr ""
+
#: shared-bindings/displayio/Display.c
msgid "Display must have a 16 bit colorspace."
msgstr "Xiǎnshì bìxū jùyǒu 16 wèi yánsè kōngjiān."
@@ -580,6 +635,7 @@ msgstr "Fāngxiàng shūrù shí qūdòng móshì méiyǒu shǐyòng."
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
msgid "EXTINT channel already in use"
msgstr "EXTINT píndào yǐjīng shǐyòng"
@@ -629,11 +685,13 @@ msgstr "Fāsòng mìnglìng shībài."
msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Wúfǎ huòdé mutex, err 0x%04x"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "Failed to allocate RX buffer"
msgstr "Fēnpèi RX huǎnchōng shībài"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
@@ -647,7 +705,7 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr "Liánjiē shībài: Chāoshí"
-#: shared-module/audiomp3/MP3File.c
+#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
msgstr ""
@@ -664,14 +722,14 @@ msgstr ""
msgid "File exists"
msgstr "Wénjiàn cúnzài"
-#: ports/nrf/common-hal/nvm/ByteArray.c
-msgid "Flash write failed"
-msgstr "Flash xiě rù shībài"
-
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
msgstr "Pínlǜ bǔhuò gāo yú nénglì. Bǔhuò zàntíng."
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Frequency must match existing PWMOut using this timer"
+msgstr ""
+
#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c
#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c
msgid "Function requires lock"
@@ -686,10 +744,22 @@ msgstr "Jítuán yǐjīng shǐyòngguò"
msgid "Group full"
msgstr "Fēnzǔ yǐ mǎn"
+#: ports/stm32f4/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Hardware busy, try alternative pins"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Hardware in use, try alternative pins"
+msgstr ""
+
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
msgstr "Wénjiàn shàng de I/ O cāozuò"
+#: ports/stm32f4/common-hal/busio/I2C.c
+msgid "I2C Init Error"
+msgstr ""
+
#: extmod/machine_i2c.c
msgid "I2C operation not supported"
msgstr "I2C cāozuò bù zhīchí"
@@ -718,20 +788,46 @@ msgstr "Rènzhèng bùzú"
msgid "Insufficient encryption"
msgstr "Jiāmì bùzú"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Internal define error"
+msgstr ""
+
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
msgstr "Wúxiào de %q yǐn jiǎo"
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
+msgid "Invalid ADC Unit value"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
msgid "Invalid BMP file"
msgstr "Wúxiào de BMP wénjiàn"
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
+msgid "Invalid DAC pin supplied"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/stm32f4/common-hal/busio/I2C.c
+msgid "Invalid I2C pin selection"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c
+#: ports/cxd56/common-hal/pulseio/PWMOut.c
#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr "Wúxiào de PWM pínlǜ"
+#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm32f4/common-hal/busio/SPI.c
+msgid "Invalid SPI pin selection"
+msgstr ""
+
+#: ports/mimxrt10xx/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid UART pin selection"
+msgstr ""
+
#: py/moduerrno.c
msgid "Invalid argument"
msgstr "Wúxiào de cānshù"
@@ -740,7 +836,7 @@ msgstr "Wúxiào de cānshù"
msgid "Invalid bits per value"
msgstr "Měi gè zhí de wèi wúxiào"
-#: ports/nrf/common-hal/busio/UART.c
+#: ports/nrf/common-hal/busio/UART.c ports/stm32f4/common-hal/busio/UART.c
msgid "Invalid buffer size"
msgstr "Wúxiào de huǎnchōng qū dàxiǎo"
@@ -768,6 +864,14 @@ msgstr "Wúxiào de wénjiàn"
msgid "Invalid format chunk size"
msgstr "Géshì kuài dàxiǎo wúxiào"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "Invalid frequency supplied"
+msgstr ""
+
+#: supervisor/shared/safe_mode.c
+msgid "Invalid memory access."
+msgstr ""
+
#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c
msgid "Invalid number of bits"
msgstr "Wèi shù wúxiào"
@@ -794,7 +898,9 @@ msgstr "Yòuxián tōngdào yǐn jiǎo wúxiào"
#: ports/atmel-samd/common-hal/busio/SPI.c
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c
-#: ports/nrf/common-hal/busio/I2C.c
+#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
+#: ports/cxd56/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
msgid "Invalid pins"
msgstr "Wúxiào de yǐn jiǎo"
@@ -826,6 +932,10 @@ msgstr "Wúxiào de yǔyīn jìshù"
msgid "Invalid wave file"
msgstr "Wúxiào de làng làngcháo wénjiàn"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Invalid word/bit length"
+msgstr ""
+
#: py/compile.c
msgid "LHS of keyword arg must be an id"
msgstr "Guānjiàn zì arg de LHS bìxū shì id"
@@ -871,10 +981,18 @@ msgstr ""
msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr "Màikèfēng qǐdòng yánchí bìxū zài 0.0 Dào 1.0 De fànwéi nèi"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Missing MISO or MOSI Pin"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr "Bìxū shì %q zi lèi."
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "Must provide MISO or MOSI pin"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Negative step not supported"
msgstr ""
@@ -884,6 +1002,7 @@ msgid "No CCCD for this Characteristic"
msgstr "Zhège tèzhēng méiyǒu CCCD"
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
+#: ports/stm32f4/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip"
msgstr "Méiyǒu DAC zài xīnpiàn shàng de"
@@ -892,11 +1011,23 @@ msgstr "Méiyǒu DAC zài xīnpiàn shàng de"
msgid "No DMA channel found"
msgstr "Wèi zhǎodào DMA píndào"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MISO Pin"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "No MOSI Pin"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No RX pin"
msgstr "Wèi zhǎodào RX yǐn jiǎo"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/stm32f4/common-hal/busio/UART.c
msgid "No TX pin"
msgstr "Wèi zhǎodào TX yǐn jiǎo"
@@ -925,6 +1056,10 @@ msgstr "Shízhōng yǐn jiǎo wú yìngjiàn zhīchí"
msgid "No hardware support on pin"
msgstr "Méiyǒu zài yǐn jiǎo shàng de yìngjiàn zhīchí"
+#: ports/stm32f4/common-hal/pulseio/PWMOut.c
+msgid "No more timers available on this pin."
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr "Yǐn jiǎo shàng méiyǒu xiàlā; 1Mohm tuījiàn"
@@ -995,12 +1130,19 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Dāng biànliàng_pínlǜ shì False zài jiànzhú shí PWM pínlǜ bùkě xiě."
+#: ports/stm32f4/common-hal/displayio/ParallelBus.c
+msgid "ParallelBus not yet supported"
+msgstr ""
+
#: py/moduerrno.c
msgid "Permission denied"
msgstr "Quánxiàn bèi jùjué"
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
+#: ports/cxd56/common-hal/analogio/AnalogIn.c
+#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/stm32f4/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr "Pin méiyǒu ADC nénglì"
@@ -1028,6 +1170,23 @@ msgstr "Àn xià rènhé jiàn jìnrù REPL. Shǐyòng CTRL-D chóngxīn jiāzà
msgid "Pull not used when direction is output."
msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng."
+#: ports/stm32f4/common-hal/pulseio/PulseIn.c
+msgid "PulseIn not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/pulseio/PulseOut.c
+msgid "PulseOut not yet supported"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG DeInit Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "RNG Init Error"
+msgstr ""
+
+#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c
#: ports/nrf/common-hal/rtc/RTC.c
msgid "RTC calibration is not supported on this board"
msgstr "Cǐ bǎn bù zhīchí RTC jiàozhǔn"
@@ -1036,6 +1195,10 @@ msgstr "Cǐ bǎn bù zhīchí RTC jiàozhǔn"
msgid "RTC is not supported on this board"
msgstr "Cǐ bǎn bù zhīchí RTC"
+#: ports/stm32f4/common-hal/os/__init__.c
+msgid "Random number generation error"
+msgstr ""
+
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "Range out of bounds"
msgstr "Fànwéi chāochū biānjiè"
@@ -1076,6 +1239,14 @@ msgstr "Zài ānquán móshì xià yùnxíng! Bù yùnxíng yǐ bǎocún de dài
msgid "SDA or SCL needs a pull up"
msgstr "SDA huò SCL xūyào lādòng"
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/SPI.c
+msgid "SPI Re-initialization error"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr "Cǎiyàng lǜ bìxū wèi zhèng shù"
@@ -1115,6 +1286,10 @@ msgstr "Duīzhàn dàxiǎo bìxū zhìshǎo 256"
msgid "Stream missing readinto() or write() method."
msgstr "Liú quēshǎo readinto() huò write() fāngfǎ."
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "Supply at least one UART pin"
+msgstr ""
+
#: supervisor/shared/safe_mode.c
msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
@@ -1190,6 +1365,26 @@ msgstr "Traceback (Zuìjìn yīcì dǎ diànhuà):\n"
msgid "Tuple or struct_time argument required"
msgstr "Xūyào Tuple huò struct_time cānshù"
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Buffer allocation error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART De-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Init Error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART Re-init error"
+msgstr ""
+
+#: ports/stm32f4/common-hal/busio/UART.c
+msgid "UART write error"
+msgstr ""
+
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
msgstr "USB máng"
@@ -1271,7 +1466,7 @@ msgid ""
"declined or ignored."
msgstr ""
-#: ports/atmel-samd/common-hal/busio/I2C.c
+#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr "Bù zhīchí de baudrate"
@@ -1796,7 +1991,7 @@ msgstr "éwài de guānjiàn cí cānshù"
msgid "extra positional arguments given"
msgstr "gěi chūle éwài de wèizhì cānshù"
-#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
+#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "wénjiàn bìxū shì zài zì jié móshì xià dǎkāi de wénjiàn"
@@ -1906,6 +2101,7 @@ msgid "incorrect padding"
msgstr "bù zhèngquè de tiánchōng"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "suǒyǐn chāochū fànwéi"
@@ -2300,6 +2496,7 @@ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
+#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
msgid "pop from an empty PulseIn"
msgstr "cóng kōng de PulseIn dànchū dànchū"
@@ -2507,7 +2704,8 @@ msgstr "yuán zǔ/lièbiǎo chángdù cuòwù"
msgid "tuple/list required on RHS"
msgstr "RHS yāoqiú de yuán zǔ/lièbiǎo"
-#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
+#: ports/atmel-samd/common-hal/busio/UART.c
+#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
msgid "tx and rx cannot both be None"
msgstr "tx hé rx bùnéng dōu shì wú"
@@ -2807,6 +3005,9 @@ msgstr "líng bù"
#~ msgid "Flash erase failed to start, err 0x%04x"
#~ msgstr "Flash cā chú shībài, err 0x%04x"
+#~ msgid "Flash write failed"
+#~ msgstr "Flash xiě rù shībài"
+
#~ msgid "Flash write failed to start, err 0x%04x"
#~ msgstr "Flash xiě rù shībài, err 0x%04x"
diff --git a/mpy-cross/.gitignore b/mpy-cross/.gitignore
index 82a0a7efa..0681b685f 100644
--- a/mpy-cross/.gitignore
+++ b/mpy-cross/.gitignore
@@ -1 +1,6 @@
-mpy-cross
+/build-*
+/mpy-cross
+/mpy-cross.static
+/mpy-cross.static.exe
+/mpy-cross.static-raspbian
+/pitools
diff --git a/mpy-cross/Makefile b/mpy-cross/Makefile
index 42dbace98..072304faa 100644
--- a/mpy-cross/Makefile
+++ b/mpy-cross/Makefile
@@ -11,84 +11,4 @@ override undefine BUILD
override undefine PROG
endif
-include ../py/mkenv.mk
-
-# define main target
-
-ifeq ($(OS),Windows_NT)
-# Detect a MINGW32 build, and change the name of the final executable.
-PROG = mpy-cross.exe
-else
-PROG = mpy-cross
-endif
-
-# qstr definitions (must come before including py.mk)
-QSTR_DEFS = qstrdefsport.h
-
-# OS name, for simple autoconfig
-UNAME_S := $(shell uname -s)
-
-# include py core make definitions
-include $(TOP)/py/py.mk
-
-INC += -I.
-INC += -I$(TOP)
-INC += -I$(BUILD)
-
-# compiler settings
-CWARN = -Wall -Werror
-CWARN += -Wpointer-arith -Wuninitialized
-CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
-CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
-
-# Build a static executable.
-# Useful for Windows builds, etc., that must run on multiple operating system versions.
-ifdef STATIC_BUILD
-CFLAGS += -static -static-libgcc -static-libstdc++
-endif
-
-
-# Debugging/Optimization
-ifdef DEBUG
-CFLAGS += -g
-COPT = -O0
-else
-COPT = -Os #-DNDEBUG
-endif
-
-# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
-# The unix port of MicroPython on OSX must be compiled with clang,
-# while cross-compile ports require gcc, so we test here for OSX and
-# if necessary override the value of 'CC' set in py/mkenv.mk
-ifeq ($(UNAME_S),Darwin)
-CC = clang
-# Use clang syntax for map file
-LDFLAGS_ARCH = -Wl,-map,$@.map -Wl,-dead_strip
-else
-# Use gcc syntax for map file
-LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections
-endif
-LDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)
-
-ifdef STATIC_BUILD
-LDFLAGS += -static -static-libgcc -static-libstdc++
-endif
-
-# source files
-SRC_C = \
- main.c \
- gccollect.c \
- supervisor/stub/safe_mode.c \
- supervisor/stub/stack.c \
- supervisor/shared/translate.c
-
-# Add fmode when compiling with mingw gcc
-COMPILER_TARGET := $(shell $(CC) -dumpmachine)
-ifneq (,$(findstring mingw,$(COMPILER_TARGET)))
- SRC_C += ports/windows/fmode.c
-endif
-
-OBJ = $(PY_O)
-OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
-
-include $(TOP)/py/mkrules.mk
+include mpy-cross.mk
diff --git a/mpy-cross/Makefile.static b/mpy-cross/Makefile.static
new file mode 100644
index 000000000..ca0925f75
--- /dev/null
+++ b/mpy-cross/Makefile.static
@@ -0,0 +1,5 @@
+PROG=mpy-cross.static
+BUILD=build-static
+STATIC_BUILD=1
+
+include mpy-cross.mk
diff --git a/mpy-cross/Makefile.static-mingw b/mpy-cross/Makefile.static-mingw
new file mode 100644
index 000000000..a176e80e6
--- /dev/null
+++ b/mpy-cross/Makefile.static-mingw
@@ -0,0 +1,6 @@
+PROG=mpy-cross.static.exe
+CROSS_COMPILE = x86_64-w64-mingw32-
+BUILD=build-static-mingw
+STATIC_BUILD=1
+
+include mpy-cross.mk
diff --git a/mpy-cross/Makefile.static-raspbian b/mpy-cross/Makefile.static-raspbian
new file mode 100644
index 000000000..9129f555e
--- /dev/null
+++ b/mpy-cross/Makefile.static-raspbian
@@ -0,0 +1,8 @@
+PROG=mpy-cross.static-raspbian
+BUILD=build-static-raspbian
+STATIC_BUILD=1
+
+CROSS_COMPILE = pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
+include mpy-cross.mk
+
+$(shell [ -d pitools ] || git clone --progress --verbose https://github.com/raspberrypi/tools.git --depth=1 pitools)
diff --git a/mpy-cross/fmode.c b/mpy-cross/fmode.c
new file mode 100644
index 000000000..33ba24ed1
--- /dev/null
+++ b/mpy-cross/fmode.c
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2016 Damien P. George
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "fmode.h"
+#include "py/mpconfig.h"
+#include <fcntl.h>
+#include <stdlib.h>
+
+// Workaround for setting file translation mode: we must distinguish toolsets
+// since mingw has no _set_fmode, and altering msvc's _fmode directly has no effect
+STATIC int set_fmode_impl(int mode) {
+#ifndef _MSC_VER
+ _fmode = mode;
+ return 0;
+#else
+ return _set_fmode(mode);
+#endif
+}
+
+void set_fmode_binary(void) {
+ set_fmode_impl(O_BINARY);
+}
+
+void set_fmode_text(void) {
+ set_fmode_impl(O_TEXT);
+}
diff --git a/mpy-cross/fmode.h b/mpy-cross/fmode.h
new file mode 100644
index 000000000..c661c84d0
--- /dev/null
+++ b/mpy-cross/fmode.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013-2016 Damien P. George
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef MICROPY_INCLUDED_WINDOWS_FMODE_H
+#define MICROPY_INCLUDED_WINDOWS_FMODE_H
+
+// Treat files opened by open() as binary. No line ending translation is done.
+void set_fmode_binary(void);
+
+// Treat files opened by open() as text.
+// When reading from the file \r\n will be converted to \n.
+// When writing to the file \n will be converted into \r\n.
+void set_fmode_text(void);
+
+#endif // MICROPY_INCLUDED_WINDOWS_FMODE_H
diff --git a/mpy-cross/main.c b/mpy-cross/main.c
index d819f74f1..7c232385b 100644
--- a/mpy-cross/main.c
+++ b/mpy-cross/main.c
@@ -35,7 +35,7 @@
#include "py/gc.h"
#include "py/stackctrl.h"
#ifdef _WIN32
-#include "ports/windows/fmode.h"
+#include "fmode.h"
#endif
// Command line options, with their defaults
@@ -284,3 +284,7 @@ void nlr_jump_fail(void *val) {
printf("FATAL: uncaught NLR %p\n", val);
exit(1);
}
+
+void serial_write(const char* text) {
+ printf("%s", text);
+}
diff --git a/mpy-cross/mpy-cross.mk b/mpy-cross/mpy-cross.mk
new file mode 100644
index 000000000..de96305cb
--- /dev/null
+++ b/mpy-cross/mpy-cross.mk
@@ -0,0 +1,81 @@
+include ../py/mkenv.mk
+
+# define main target
+
+ifeq ($(OS),Windows_NT)
+# Detect a MINGW32 build, and change the name of the final executable.
+PROG ?= mpy-cross.exe
+else
+PROG ?= mpy-cross
+endif
+
+# qstr definitions (must come before including py.mk)
+QSTR_DEFS = qstrdefsport.h
+
+# OS name, for simple autoconfig
+UNAME_S := $(shell uname -s)
+
+# include py core make definitions
+include $(TOP)/py/py.mk
+
+INC += -I.
+INC += -I$(TOP)
+INC += -I$(BUILD)
+
+# compiler settings
+CWARN = -Wall -Werror
+CWARN += -Wpointer-arith -Wuninitialized
+CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
+CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
+
+# Build a static executable.
+# Useful for Windows builds, etc., that must run on multiple operating system versions.
+ifdef STATIC_BUILD
+CFLAGS += -static -static-libgcc -static-libstdc++
+endif
+
+
+# Debugging/Optimization
+ifdef DEBUG
+CFLAGS += -g
+COPT = -O0
+else
+COPT = -Os #-DNDEBUG
+endif
+
+# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
+# The unix port of MicroPython on OSX must be compiled with clang,
+# while cross-compile ports require gcc, so we test here for OSX and
+# if necessary override the value of 'CC' set in py/mkenv.mk
+ifeq ($(UNAME_S),Darwin)
+CC = clang
+# Use clang syntax for map file
+LDFLAGS_ARCH = -Wl,-map,$@.map -Wl,-dead_strip
+else
+# Use gcc syntax for map file
+LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections
+endif
+LDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)
+
+ifdef STATIC_BUILD
+LDFLAGS += -static -static-libgcc -static-libstdc++
+endif
+
+# source files
+SRC_C = \
+ main.c \
+ gccollect.c \
+ supervisor/stub/safe_mode.c \
+ supervisor/stub/stack.c \
+ supervisor/shared/translate.c
+
+# Add fmode when compiling with mingw gcc
+COMPILER_TARGET := $(shell $(CC) -dumpmachine)
+ifneq (,$(findstring mingw,$(COMPILER_TARGET)))
+ SRC_C += fmode.c
+endif
+
+OBJ = $(PY_O)
+OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
+
+include $(TOP)/py/mkrules.mk
diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c
index 0478cc9bf..352af8980 100644
--- a/ports/atmel-samd/audio_dma.c
+++ b/ports/atmel-samd/audio_dma.c
@@ -203,13 +203,13 @@ audio_dma_result audio_dma_setup_playback(audio_dma_t* dma,
if (output_signed != samples_signed) {
output_spacing = 1;
max_buffer_length /= dma->spacing;
- dma->first_buffer = (uint8_t*) m_malloc(max_buffer_length, false);
+ dma->first_buffer = (uint8_t*) m_realloc(dma->first_buffer, max_buffer_length);
if (dma->first_buffer == NULL) {
return AUDIO_DMA_MEMORY_ERROR;
}
dma->first_buffer_free = true;
if (!single_buffer) {
- dma->second_buffer = (uint8_t*) m_malloc(max_buffer_length, false);
+ dma->second_buffer = (uint8_t*) m_realloc(dma->second_buffer, max_buffer_length);
if (dma->second_buffer == NULL) {
return AUDIO_DMA_MEMORY_ERROR;
}
diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/board.c b/ports/atmel-samd/boards/capablerobot_usbhub/board.c
index 9a19e02d1..46385f094 100644
--- a/ports/atmel-samd/boards/capablerobot_usbhub/board.c
+++ b/ports/atmel-samd/boards/capablerobot_usbhub/board.c
@@ -30,13 +30,6 @@
#include "common-hal/microcontroller/Pin.h"
void board_init(void) {
- // Don't reset:
- // - USB Host Enable Pin
- // - reset pin of the USB Hub
- //
- // If either are reset, USB devices will disconnect when the MCU restarts
- never_reset_pin_number(PIN_PA07);
- never_reset_pin_number(PIN_PB08);
}
bool board_requests_safe_mode(void) {
diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk
index 0ff6f58ea..62399b1cd 100644
--- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk
@@ -7,8 +7,8 @@ CHIP_VARIANT = SAMD51G19A
CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
-EXTERNAL_FLASH_DEVICE_COUNT = 1
-EXTERNAL_FLASH_DEVICES = GD25Q16C
+EXTERNAL_FLASH_DEVICE_COUNT = 2
+EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ"
LONGINT_IMPL = MPZ
# No I2S on SAMD51G
diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c
index 1fde60940..b1966930c 100644
--- a/ports/atmel-samd/boards/capablerobot_usbhub/pins.c
+++ b/ports/atmel-samd/boards/capablerobot_usbhub/pins.c
@@ -17,8 +17,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA17) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_USBHEN), MP_ROM_PTR(&pin_PA07) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_USBRST), MP_ROM_PTR(&pin_PB08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_USBHOSTEN), MP_ROM_PTR(&pin_PA07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_USBRESET), MP_ROM_PTR(&pin_PB08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_USBBCEN), MP_ROM_PTR(&pin_PB22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
diff --git a/ports/atmel-samd/boards/circuitplayground_express/board.c b/ports/atmel-samd/boards/circuitplayground_express/board.c
index 578963642..85c37ee62 100644
--- a/ports/atmel-samd/boards/circuitplayground_express/board.c
+++ b/ports/atmel-samd/boards/circuitplayground_express/board.c
@@ -28,9 +28,8 @@
#include "boards/board.h"
#include "common-hal/microcontroller/Pin.h"
+#include "supervisor/shared/board.h"
#include "hal/include/hal_gpio.h"
-#include "shared-bindings/digitalio/DigitalInOut.h"
-#include "shared-bindings/neopixel_write/__init__.h"
void board_init(void)
{
@@ -54,12 +53,5 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
- uint8_t empty[30];
- memset(empty, 0, 30);
- digitalio_digitalinout_obj_t neopixel_pin;
- common_hal_digitalio_digitalinout_construct(&neopixel_pin, &pin_PB23);
- common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false,
- DRIVE_MODE_PUSH_PULL);
- common_hal_neopixel_write(&neopixel_pin, empty, 30);
- common_hal_digitalio_digitalinout_deinit(&neopixel_pin);
+ board_reset_user_neopixels();
}
diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
index 6eb49b02c..0c5e5b762 100644
--- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
+++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
@@ -28,7 +28,9 @@
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
// Increase stack size slightly due to CPX library import nesting
-#define CIRCUITPY_DEFAULT_STACK_SIZE (4504)
+#define CIRCUITPY_DEFAULT_STACK_SIZE (4760) //divisible by 8
+
+#define USER_NEOPIXELS_PIN (&pin_PB23)
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/board.c b/ports/atmel-samd/boards/circuitplayground_express_crickit/board.c
index 578963642..21217caac 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_crickit/board.c
+++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/board.c
@@ -29,8 +29,7 @@
#include "boards/board.h"
#include "common-hal/microcontroller/Pin.h"
#include "hal/include/hal_gpio.h"
-#include "shared-bindings/digitalio/DigitalInOut.h"
-#include "shared-bindings/neopixel_write/__init__.h"
+#include "supervisor/shared/board.h"
void board_init(void)
{
@@ -54,12 +53,5 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
- uint8_t empty[30];
- memset(empty, 0, 30);
- digitalio_digitalinout_obj_t neopixel_pin;
- common_hal_digitalio_digitalinout_construct(&neopixel_pin, &pin_PB23);
- common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false,
- DRIVE_MODE_PUSH_PULL);
- common_hal_neopixel_write(&neopixel_pin, empty, 30);
- common_hal_digitalio_digitalinout_deinit(&neopixel_pin);
+ board_reset_user_neopixels();
}
diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
index e64997c0e..312fd2626 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
+++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
@@ -24,11 +24,13 @@
#define CALIBRATE_CRYSTALLESS 1
+#define USER_NEOPIXELS_PIN (&pin_PB23)
+
// Explanation of how a user got into safe mode.
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
// Increase stack size slightly due to CPX library import nesting
-#define CIRCUITPY_DEFAULT_STACK_SIZE (4504)
+#define CIRCUITPY_DEFAULT_STACK_SIZE (4760) // divisible by 8
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/board.c b/ports/atmel-samd/boards/circuitplayground_express_displayio/board.c
index 578963642..21217caac 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_displayio/board.c
+++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/board.c
@@ -29,8 +29,7 @@
#include "boards/board.h"
#include "common-hal/microcontroller/Pin.h"
#include "hal/include/hal_gpio.h"
-#include "shared-bindings/digitalio/DigitalInOut.h"
-#include "shared-bindings/neopixel_write/__init__.h"
+#include "supervisor/shared/board.h"
void board_init(void)
{
@@ -54,12 +53,5 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
- uint8_t empty[30];
- memset(empty, 0, 30);
- digitalio_digitalinout_obj_t neopixel_pin;
- common_hal_digitalio_digitalinout_construct(&neopixel_pin, &pin_PB23);
- common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false,
- DRIVE_MODE_PUSH_PULL);
- common_hal_neopixel_write(&neopixel_pin, empty, 30);
- common_hal_digitalio_digitalinout_deinit(&neopixel_pin);
+ board_reset_user_neopixels();
}
diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
index c9a7ce040..4796e90a5 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
+++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
@@ -28,7 +28,9 @@
#define BOARD_USER_SAFE_MODE_ACTION "pressing both buttons at start up"
// Increase stack size slightly due to CPX library import nesting.
-#define CIRCUITPY_DEFAULT_STACK_SIZE (4504) // divisible by 8
+#define CIRCUITPY_DEFAULT_STACK_SIZE (4760) // divisible by 8
+
+#define USER_NEOPIXELS_PIN (&pin_PB23)
#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/board.c b/ports/atmel-samd/boards/ndgarage_ndbit6/board.c
new file mode 100644
index 000000000..0f60736a2
--- /dev/null
+++ b/ports/atmel-samd/boards/ndgarage_ndbit6/board.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "mpconfigboard.h"
+#include "hal/include/hal_gpio.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.h b/ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.h
new file mode 100644
index 000000000..869f207a1
--- /dev/null
+++ b/ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.h
@@ -0,0 +1,32 @@
+#define MICROPY_HW_BOARD_NAME "ndGarage[n°]Bit6:FeatherSnow"
+#define MICROPY_HW_MCU_NAME "samd21e18"
+
+#define MICROPY_HW_LED_STATUS (&pin_PA23)
+
+#define SPI_FLASH_MOSI_PIN &pin_PA16
+#define SPI_FLASH_MISO_PIN &pin_PA18
+#define SPI_FLASH_SCK_PIN &pin_PA17
+#define SPI_FLASH_CS_PIN &pin_PA15
+
+#define MICROPY_PORT_A (PORT_PA24 | PORT_PA25)
+#define MICROPY_PORT_B (0)
+#define MICROPY_PORT_C (0)
+
+#define CIRCUITPY_INTERNAL_NVM_SIZE 256
+
+#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 CIRCUITPY_INTERNAL_NVM_SIZE)
+
+#define DEFAULT_I2C_BUS_SCL (&pin_PA09)
+#define DEFAULT_I2C_BUS_SDA (&pin_PA08)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_PA05)
+#define DEFAULT_SPI_BUS_MOSI (&pin_PA04)
+#define DEFAULT_SPI_BUS_MISO (&pin_PA06)
+
+#define DEFAULT_UART_BUS_RX (&pin_PA09)
+#define DEFAULT_UART_BUS_TX (&pin_PA08)
+
+// USB is always used.
+#define IGNORE_PIN_PA24 1
+#define IGNORE_PIN_PA25 1
+
diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.mk b/ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.mk
new file mode 100644
index 000000000..b73f0951e
--- /dev/null
+++ b/ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.mk
@@ -0,0 +1,15 @@
+LD_FILE = boards/samd21x18-bootloader.ld
+USB_VID = 0x239A
+USB_PID = 0x8066
+USB_PRODUCT = "Bit6"
+USB_MANUFACTURER = "ndGarage"
+
+CHIP_VARIANT = SAMD21E18A
+CHIP_FAMILY = samd21
+
+INTERNAL_FLASH_FILESYSTEM = 1
+LONGINT_IMPL = NONE
+CIRCUITPY_SMALL_BUILD = 1
+
+SUPEROPT_GC = 0
+
diff --git a/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c
new file mode 100644
index 000000000..6d1fc53b6
--- /dev/null
+++ b/ports/atmel-samd/boards/ndgarage_ndbit6/pins.c
@@ -0,0 +1,39 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA05) },
+ { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA11) },
+ { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA22) },
+ { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA28) },
+ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA00) },
+ { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA03) },
+ { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA15) },
+ { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA23) },
+ { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA01) },
+ { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA04) },
+ { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA07) },
+ { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA10) },
+ { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PA14) },
+ { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PA27) },
+ { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PA02) },
+
+ { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA04) },
+ { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA05) },
+
+ { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA09) },
+
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
+
+ { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PA23) },
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
+ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/boards/openbook_m4/board.c b/ports/atmel-samd/boards/openbook_m4/board.c
new file mode 100644
index 000000000..2d9b31647
--- /dev/null
+++ b/ports/atmel-samd/boards/openbook_m4/board.c
@@ -0,0 +1,107 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Joey Castillo
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "mpconfigboard.h"
+#include "hal/include/hal_gpio.h"
+#include "shared-bindings/busio/SPI.h"
+#include "shared-bindings/displayio/FourWire.h"
+#include "shared-bindings/time/__init__.h"
+#include "shared-module/displayio/__init__.h"
+#include "shared-module/displayio/mipi_constants.h"
+#include "tick.h"
+
+displayio_fourwire_obj_t board_display_obj;
+
+#define DELAY 0x80
+#define HEIGHT 400
+#define WIDTH 300
+
+uint8_t start_sequence[] = {
+ 0x01, 0x04, 0x03, 0x00, 0x2b, 0x2b, // power setting
+ 0x06, 0x03, 0x17, 0x17, 0x17, // booster soft start
+ 0x04, 0x80, 0xc8, // power on and wait 200 ms
+ 0x00, 0x01, 0x0f, // panel setting
+ 0x61, 0x04, (HEIGHT >> 8) & 0xFF, HEIGHT & 0xFF, (WIDTH >> 8) & 0xFF, WIDTH & 0xFF // Resolution
+};
+
+uint8_t stop_sequence[] = {
+ 0x50, 0x01, 0xf7, // CDI setting
+ 0x02, 0x80, 0xf0 // Power off
+};
+
+void board_init(void) {
+ busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
+ common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL);
+ common_hal_busio_spi_never_reset(spi);
+
+ displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
+ bus->base.type = &displayio_fourwire_type;
+ common_hal_displayio_fourwire_construct(bus,
+ spi,
+ &pin_PB05, // EPD_DC Command or data
+ &pin_PB07, // EPD_CS Chip select
+ &pin_PA00, // EPD_RST Reset
+ 1000000);
+
+ displayio_epaperdisplay_obj_t* display = &displays[0].epaper_display;
+ display->base.type = &displayio_epaperdisplay_type;
+ common_hal_displayio_epaperdisplay_construct(display,
+ bus,
+ start_sequence,
+ sizeof(start_sequence),
+ stop_sequence,
+ sizeof(stop_sequence),
+ 400, // width
+ 300, // height
+ 400, // RAM width
+ 300, // RAM height
+ 0, // colstart
+ 0, // rowstart
+ 0, // rotation
+ NO_COMMAND, // set_column_window_command
+ NO_COMMAND, // set_row_window_command
+ NO_COMMAND, // set_current_column_command
+ NO_COMMAND, // set_current_row_command
+ 0x13, // write_black_ram_command
+ false, // black_bits_inverted
+ NO_COMMAND, // write_color_ram_command (can add this for grayscale eventually)
+ false, // color_bits_inverted
+ 0x000000, // highlight_color
+ 0x12, // refresh_display_command
+ 40, // refresh_time
+ &pin_PA01, // busy_pin
+ false, // busy_state
+ 5, // seconds_per_frame
+ false); // chip_select (don't always toggle chip select)
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/atmel-samd/boards/openbook_m4/mpconfigboard.h b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.h
new file mode 100644
index 000000000..6d75c086e
--- /dev/null
+++ b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.h
@@ -0,0 +1,28 @@
+#define MICROPY_HW_BOARD_NAME "The Open Book Feather"
+#define MICROPY_HW_MCU_NAME "samd51j19"
+
+#define CIRCUITPY_MCU_FAMILY samd51
+
+#define MICROPY_HW_LED_STATUS (&pin_PA23)
+
+// These are pins not to reset.
+// QSPI Data pins
+#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
+// DotStar pins, QSPI CS, and QSPI SCK
+#define MICROPY_PORT_B (PORT_PB10 | PORT_PB11)
+#define MICROPY_PORT_C (0)
+#define MICROPY_PORT_D (0)
+
+#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
+#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
+#define DEFAULT_SPI_BUS_MOSI (&pin_PB23)
+#define DEFAULT_SPI_BUS_MISO (&pin_PB22)
+
+#define DEFAULT_UART_BUS_RX (&pin_PB17)
+#define DEFAULT_UART_BUS_TX (&pin_PB16)
+
+// USB is always used internally so skip the pin objects for it.
+#define IGNORE_PIN_PA24 1
+#define IGNORE_PIN_PA25 1
diff --git a/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk
new file mode 100644
index 000000000..e5fa0cd84
--- /dev/null
+++ b/ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk
@@ -0,0 +1,14 @@
+USB_VID = 0x239A
+USB_PID = 0x807E
+USB_PRODUCT = "The Open Book Feather"
+USB_MANUFACTURER = "Oddly Specific Objects"
+
+CHIP_VARIANT = SAMD51J19A
+CHIP_FAMILY = samd51
+
+QSPI_FLASH_FILESYSTEM = 1
+EXTERNAL_FLASH_DEVICE_COUNT = 1
+EXTERNAL_FLASH_DEVICES = GD25Q16C
+LONGINT_IMPL = MPZ
+
+CIRCUITPY_GAMEPADSHIFT = 1
diff --git a/ports/atmel-samd/boards/openbook_m4/pins.c b/ports/atmel-samd/boards/openbook_m4/pins.c
new file mode 100644
index 000000000..3fbb67860
--- /dev/null
+++ b/ports/atmel-samd/boards/openbook_m4/pins.c
@@ -0,0 +1,71 @@
+#include "shared-bindings/board/__init__.h"
+
+#include "boards/board.h"
+#include "shared-module/displayio/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, // A0 = audio right channel
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, // A1 = audio left channel
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01) }, // A6 = VBAT Monitor
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) }, // A7 = Raw mic input
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB03) }, // A8 = Bottom STEMMA Port
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB02) }, // A9 = Top STEMMA Port
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PA07) }, // A10 = Amplified mic input
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PB00) }, // A11 = VBUS Monitor
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB17) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB16) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA16) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA18) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA20) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D48), MP_ROM_PTR(&pin_PB31) },
+
+ // UART
+ { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16) },
+
+ // I2C
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13) },
+
+ // SPI
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) },
+
+ // e-paper SPI and control pins
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCK1), MP_ROM_PTR(&pin_PB13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI1), MP_ROM_PTR(&pin_PB15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ECS), MP_ROM_PTR(&pin_PB07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_EDC), MP_ROM_PTR(&pin_PB05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ERST), MP_ROM_PTR(&pin_PA00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_EBSY), MP_ROM_PTR(&pin_PA01) },
+
+ // Special named pins
+ { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_LOCK_BUTTON), MP_ROM_PTR(&pin_PA27) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_LATCH), MP_ROM_PTR(&pin_PB12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_OUT), MP_ROM_PTR(&pin_PB30) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON_CLOCK), MP_ROM_PTR(&pin_PB14) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SDCS), MP_ROM_PTR(&pin_PA14) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MIC_SHUTDOWN), MP_ROM_PTR(&pin_PB31) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_BCS), MP_ROM_PTR(&pin_PB06) }, // BCS = Babel Chip Select, the second flash chip
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
+ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+
+ { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)}
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/boards/pybadge/board.c b/ports/atmel-samd/boards/pybadge/board.c
index 37f7991d1..f3ac7176a 100644
--- a/ports/atmel-samd/boards/pybadge/board.c
+++ b/ports/atmel-samd/boards/pybadge/board.c
@@ -31,6 +31,7 @@
#include "shared-bindings/displayio/FourWire.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
+#include "supervisor/shared/board.h"
#include "tick.h"
displayio_fourwire_obj_t board_display_obj;
@@ -118,4 +119,5 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
+ board_reset_user_neopixels();
}
diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.h b/ports/atmel-samd/boards/pybadge/mpconfigboard.h
index 435185322..74a13eb1c 100644
--- a/ports/atmel-samd/boards/pybadge/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.h
@@ -14,6 +14,8 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
+#define USER_NEOPIXELS_PIN (&pin_PA15)
+
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/atmel-samd/boards/pybadge_airlift/board.c b/ports/atmel-samd/boards/pybadge_airlift/board.c
index 7622de6f0..061f3d777 100644
--- a/ports/atmel-samd/boards/pybadge_airlift/board.c
+++ b/ports/atmel-samd/boards/pybadge_airlift/board.c
@@ -31,6 +31,7 @@
#include "shared-bindings/displayio/FourWire.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
+#include "supervisor/shared/board.h"
#include "tick.h"
displayio_fourwire_obj_t board_display_obj;
@@ -96,4 +97,5 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
+ board_reset_user_neopixels();
}
diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
index 229cfa335..c6ab4ed8e 100644
--- a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
@@ -14,6 +14,8 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
+#define USER_NEOPIXELS_PIN (&pin_PA15)
+
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/atmel-samd/boards/pygamer/board.c b/ports/atmel-samd/boards/pygamer/board.c
index b33ae4fb0..8c6fbca06 100644
--- a/ports/atmel-samd/boards/pygamer/board.c
+++ b/ports/atmel-samd/boards/pygamer/board.c
@@ -31,6 +31,7 @@
#include "shared-bindings/displayio/FourWire.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
+#include "supervisor/shared/board.h"
#include "tick.h"
displayio_fourwire_obj_t board_display_obj;
@@ -118,4 +119,5 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
+ board_reset_user_neopixels();
}
diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.h b/ports/atmel-samd/boards/pygamer/mpconfigboard.h
index 102c25956..21f75d272 100644
--- a/ports/atmel-samd/boards/pygamer/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.h
@@ -13,6 +13,8 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
+#define USER_NEOPIXELS_PIN (&pin_PA15)
+
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/atmel-samd/boards/pygamer_advance/board.c b/ports/atmel-samd/boards/pygamer_advance/board.c
index 8eb501243..ff2da34a2 100644
--- a/ports/atmel-samd/boards/pygamer_advance/board.c
+++ b/ports/atmel-samd/boards/pygamer_advance/board.c
@@ -31,6 +31,7 @@
#include "shared-bindings/displayio/FourWire.h"
#include "shared-module/displayio/__init__.h"
#include "shared-module/displayio/mipi_constants.h"
+#include "supervisor/shared/board.h"
#include "tick.h"
displayio_fourwire_obj_t board_display_obj;
@@ -96,4 +97,5 @@ bool board_requests_safe_mode(void) {
}
void reset_board(void) {
+ board_reset_user_neopixels();
}
diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h
index fbe946b72..7c631d1c3 100644
--- a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h
@@ -13,6 +13,8 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
+#define USER_NEOPIXELS_PIN (&pin_PA15)
+
#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
diff --git a/ports/atmel-samd/boards/seeeduino_xiao/board.c b/ports/atmel-samd/boards/seeeduino_xiao/board.c
new file mode 100644
index 000000000..0f60736a2
--- /dev/null
+++ b/ports/atmel-samd/boards/seeeduino_xiao/board.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "mpconfigboard.h"
+#include "hal/include/hal_gpio.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.h b/ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.h
new file mode 100644
index 000000000..4bd10ca41
--- /dev/null
+++ b/ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.h
@@ -0,0 +1,20 @@
+#define MICROPY_HW_BOARD_NAME "Seeeduino XIAO"
+#define MICROPY_HW_MCU_NAME "samd21g18"
+
+#define MICROPY_PORT_A (0)
+#define MICROPY_PORT_B (0)
+#define MICROPY_PORT_C (0)
+
+#define DEFAULT_I2C_BUS_SCL (&pin_PA09) // was PA23
+#define DEFAULT_I2C_BUS_SDA (&pin_PA08) // was PA22
+
+#define DEFAULT_SPI_BUS_SCK (&pin_PA07) // was PA17
+#define DEFAULT_SPI_BUS_MOSI (&pin_PA06) // was PA16
+#define DEFAULT_SPI_BUS_MISO (&pin_PA05) // was PA19
+
+#define DEFAULT_UART_BUS_RX (&pin_PB09) // was PA11
+#define DEFAULT_UART_BUS_TX (&pin_PB08) // was PA10
+
+// USB is always used internally so skip the pin objects for it.
+#define IGNORE_PIN_PA24 1
+#define IGNORE_PIN_PA25 1
diff --git a/ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.mk b/ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.mk
new file mode 100644
index 000000000..2741454ce
--- /dev/null
+++ b/ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.mk
@@ -0,0 +1,13 @@
+USB_VID = 0x2886
+USB_PID = 0x002f
+USB_PRODUCT = "Seeeduino XIAO"
+USB_MANUFACTURER = "Seeed"
+
+CHIP_VARIANT = SAMD21G18A
+CHIP_FAMILY = samd21
+
+INTERNAL_FLASH_FILESYSTEM = 1
+LONGINT_IMPL = NONE
+CIRCUITPY_SMALL_BUILD = 1
+
+SUPEROPT_GC = 0
diff --git a/ports/atmel-samd/boards/seeeduino_xiao/pins.c b/ports/atmel-samd/boards/seeeduino_xiao/pins.c
new file mode 100644
index 000000000..8b9690253
--- /dev/null
+++ b/ports/atmel-samd/boards/seeeduino_xiao/pins.c
@@ -0,0 +1,54 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+
+ // Analog pins
+ { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
+ { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA04) },
+ { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA10) },
+ { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA11) },
+ { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB08) },
+ { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB09) },
+ { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PA07) },
+ { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PA05) },
+ { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PA06) },
+
+ // Digital pins
+ { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA02) },
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA04) },
+ { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA10) },
+ { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA11) },
+ { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PB08) },
+ { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB09) },
+ { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA07) },
+ { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA05) },
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
+
+ // UART pins
+ { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB08) },
+ { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB09) },
+
+ // SPI pins
+ { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA07) },
+ { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA05) },
+
+ // I2C pins
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
+
+ // LED pins
+ { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, // status
+ { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_PA17) },
+
+ // Comm objects
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
+ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/common-hal/audioio/AudioOut.c b/ports/atmel-samd/common-hal/audioio/AudioOut.c
index 36ab52006..b75c2b335 100644
--- a/ports/atmel-samd/common-hal/audioio/AudioOut.c
+++ b/ports/atmel-samd/common-hal/audioio/AudioOut.c
@@ -397,15 +397,22 @@ void common_hal_audioio_audioout_play(audioio_audioout_obj_t* self,
if (self->right_channel == &pin_PA02) {
right_channel_reg = (uint32_t) &DAC->DATABUF[0].reg;
}
- result = audio_dma_setup_playback(&self->left_dma, sample, loop, true, 0,
- false /* output unsigned */,
- left_channel_reg,
- left_channel_trigger);
- if (right_channel_reg != 0 && result == AUDIO_DMA_OK) {
- result = audio_dma_setup_playback(&self->right_dma, sample, loop, true, 1,
+ if(right_channel_reg == left_channel_reg + 2 && audiosample_bits_per_sample(sample) == 16) {
+ result = audio_dma_setup_playback(&self->left_dma, sample, loop, false, 0,
false /* output unsigned */,
- right_channel_reg,
- right_channel_trigger);
+ left_channel_reg,
+ left_channel_trigger);
+ } else {
+ result = audio_dma_setup_playback(&self->left_dma, sample, loop, true, 0,
+ false /* output unsigned */,
+ left_channel_reg,
+ left_channel_trigger);
+ if (right_channel_reg != 0 && result == AUDIO_DMA_OK) {
+ result = audio_dma_setup_playback(&self->right_dma, sample, loop, true, 1,
+ false /* output unsigned */,
+ right_channel_reg,
+ right_channel_trigger);
+ }
}
#endif
if (result != AUDIO_DMA_OK) {
diff --git a/ports/atmel-samd/common-hal/nvm/ByteArray.c b/ports/atmel-samd/common-hal/nvm/ByteArray.c
index 12a127f53..ac896a9d5 100644
--- a/ports/atmel-samd/common-hal/nvm/ByteArray.c
+++ b/ports/atmel-samd/common-hal/nvm/ByteArray.c
@@ -43,9 +43,9 @@ bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self,
// whenever we need it instead of storing it long term.
struct flash_descriptor desc;
desc.dev.hw = NVMCTRL;
- flash_write(&desc, (uint32_t) self->start_address + start_index, values, len);
+ bool status = flash_write(&desc, (uint32_t) self->start_address + start_index, values, len) == ERR_NONE;
assert_heap_ok();
- return true;
+ return status;
}
// NVM memory is memory mapped so reading it is easy.
diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c
index dd812dfeb..01ca797ca 100644
--- a/ports/atmel-samd/supervisor/port.c
+++ b/ports/atmel-samd/supervisor/port.c
@@ -328,6 +328,14 @@ uint32_t *port_stack_get_top(void) {
return &_estack;
}
+uint32_t *port_heap_get_bottom(void) {
+ return port_stack_get_limit();
+}
+
+uint32_t *port_heap_get_top(void) {
+ return port_stack_get_top();
+}
+
// Place the word to save 8k from the end of RAM so we and the bootloader don't clobber it.
#ifdef SAMD21
uint32_t* safe_word = (uint32_t*) (HMCRAMC0_ADDR + HMCRAMC0_SIZE - 0x2000);
diff --git a/ports/cxd56/supervisor/port.c b/ports/cxd56/supervisor/port.c
index f06133468..5d2957f35 100644
--- a/ports/cxd56/supervisor/port.c
+++ b/ports/cxd56/supervisor/port.c
@@ -85,6 +85,14 @@ uint32_t *port_stack_get_top(void) {
return rtcb->adj_stack_ptr;
}
+uint32_t *port_heap_get_bottom(void) {
+ return port_stack_get_limit();
+}
+
+uint32_t *port_heap_get_top(void) {
+ return port_stack_get_top();
+}
+
extern uint32_t _ebss;
// Place the word to save just after our BSS section that gets blanked.
diff --git a/ports/mimxrt10xx/Makefile b/ports/mimxrt10xx/Makefile
index 68ddea565..66a540a40 100644
--- a/ports/mimxrt10xx/Makefile
+++ b/ports/mimxrt10xx/Makefile
@@ -71,6 +71,7 @@ INC += \
-Isdk/CMSIS/Include \
-Isdk/devices/$(CHIP_FAMILY) \
-Isdk/devices/$(CHIP_FAMILY)/drivers \
+ -Isdk/devices/$(CHIP_FAMILY)/xip \
# NDEBUG disables assert() statements. This reduces code size pretty dramatically, per tannewt.
@@ -83,24 +84,10 @@ CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_MIMXRT10XX -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_
ifeq ($(DEBUG), 1)
CFLAGS += -ggdb
# You may want to disable -flto if it interferes with debugging.
- #CFLAGS += -flto -flto-partition=none
+ # CFLAGS += -flto -flto-partition=none
# You may want to enable these flags to make setting breakpoints easier.
CFLAGS += -fno-inline -fno-ipa-sra
else
- # -finline-limit can shrink the image size.
- # -finline-limit=80 or so is similar to not having it on.
- # There is no simple default value, though.
-
- # Do a default shrink for small builds.
- ifndef CFLAGS_INLINE_LIMIT
- ifeq ($(CIRCUITPY_SMALL_BUILD),1)
- CFLAGS_INLINE_LIMIT = 50
- endif
- endif
-
- ifdef CFLAGS_INLINE_LIMIT
- CFLAGS += -finline-limit=$(CFLAGS_INLINE_LIMIT)
- endif
#CFLAGS += -flto -flto-partition=none
endif
@@ -114,14 +101,15 @@ CFLAGS += \
-mfpu=fpv5-sp-d16 \
-DCPU_$(CHIP_VARIANT) \
-DDEBUG \
- -DXIP_EXTERNAL_FLASH=1 \
- -DXIP_BOOT_HEADER_ENABLE=1 \
- -D__START=main \
+ -DIMXRT10XX \
-Os -g3 -Wno-unused-parameter \
- -ffunction-sections -fdata-sections -fstack-usage \
- -D__STARTUP_CLEAR_BSS
+ -ffunction-sections -fdata-sections -fstack-usage
-LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib -Wl,-T,$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
+LD_FILES = $(wildcard boards/$(BOARD)/*.ld) $(addprefix linking/, flash/$(FLASH).ld chip_family/$(CHIP_FAMILY).ld common.ld)
+
+LD_SCRIPT_FLAG := -Wl,-T,
+
+LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib $(addprefix $(LD_SCRIPT_FLAG), $(LD_FILES)) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
LIBS := -lgcc -lc -lnosys -lm
# Use toolchain libm if we're not using our own.
@@ -154,6 +142,7 @@ SRC_SDK := $(addprefix sdk/devices/$(CHIP_FAMILY)/, $(SRC_SDK))
SRC_C = \
background.c \
boards/$(BOARD)/board.c \
+ boards/$(BOARD)/flash_config.c \
boards/$(BOARD)/pins.c \
fatfs_port.c \
lib/mp-readline/readline.c \
@@ -231,20 +220,23 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)
-all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2
+all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 $(BUILD)/firmware.hex
-$(BUILD)/firmware.elf: $(LD_FILE) $(OBJ)
+$(BUILD)/firmware.elf: $(OBJ) $(LD_FILES)
$(STEPECHO) "LINK $@"
- $(Q)$(CC) -o $@ $(LDFLAGS) $(filter-out $<,$^) -Wl,--start-group $(LIBS) -Wl,--end-group
+ $(Q)$(CC) -o $@ $(LDFLAGS) $(filter-out %.ld, $^) -Wl,--start-group $(LIBS) -Wl,--end-group
$(BUILD)/firmware.bin: $(BUILD)/firmware.elf
$(STEPECHO) "Create $@"
- $(Q)$(OBJCOPY) -O binary -j .interrupts -j .text -j .ARM.exidx -j .data $^ $@
+ $(Q)$(OBJCOPY) -O binary -j .text -j .ARM.exidx -j .data -j .itcm -j .dtcm_data $^ $@
$(BUILD)/firmware.uf2: $(BUILD)/firmware.bin
$(STEPECHO) "Create $@"
$(Q)$(PYTHON3) $(TOP)/tools/uf2/utils/uf2conv.py -b $(BOOTLOADER_SIZE) -f MIMXRT10XX -c -o $@ $^
+$(BUILD)/firmware.hex: $(BUILD)/firmware.elf
+ $(Q)$(OBJCOPY) -O ihex -j .flash_config -j .ivt -j .text -j .ARM.exidx -j .data -j .itcm -j .dtcm_data $< $@
+
include $(TOP)/py/mkrules.mk
# Print out the value of a make variable.
diff --git a/ports/mimxrt10xx/background.c b/ports/mimxrt10xx/background.c
index 8c7333cf8..c0b217685 100644
--- a/ports/mimxrt10xx/background.c
+++ b/ports/mimxrt10xx/background.c
@@ -34,6 +34,7 @@
#include "py/runtime.h"
#include "shared-module/network/__init__.h"
+#include "supervisor/linker.h"
#include "supervisor/shared/stack.h"
// TODO
@@ -51,7 +52,7 @@ void background_tasks_reset(void) {
running_background_tasks = false;
}
-void run_background_tasks(void) {
+void PLACE_IN_ITCM(run_background_tasks)(void) {
// Don't call ourselves recursively.
if (running_background_tasks) {
return;
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1011/board.c b/ports/mimxrt10xx/boards/feather_mimxrt1011/board.c
index 8e73df4ad..52dd498b3 100644
--- a/ports/mimxrt10xx/boards/feather_mimxrt1011/board.c
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1011/board.c
@@ -27,24 +27,8 @@
#include "boards/board.h"
#include "mpconfigboard.h"
-#include "fsl_iomuxc.h"
void board_init(void) {
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1,1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 1U);
-
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B,0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 0x10E1U);
}
bool board_requests_safe_mode(void) {
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1011/flash_config.c b/ports/mimxrt10xx/boards/feather_mimxrt1011/flash_config.c
new file mode 100644
index 000000000..b74c0b151
--- /dev/null
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1011/flash_config.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2017 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "fsl_flexspi_nor_boot.h"
+#include "fsl_flexspi_nor_config.h"
+
+
+__attribute__((section(".boot_hdr.ivt")))
+/*************************************
+ * IVT Data
+ *************************************/
+const ivt image_vector_table = {
+ IVT_HEADER, /* IVT Header */
+ IMAGE_ENTRY_ADDRESS, /* Image Entry Function */
+ IVT_RSVD, /* Reserved = 0 */
+ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
+ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
+ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */
+ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
+ IVT_RSVD /* Reserved = 0 */
+};
+
+__attribute__((section(".boot_hdr.boot_data")))
+/*************************************
+ * Boot Data
+ *************************************/
+const BOOT_DATA_T boot_data = {
+ FLASH_BASE, /* boot start location */
+ FLASH_SIZE, /* size */
+ PLUGIN_FLAG, /* Plugin flag*/
+ 0xFFFFFFFF /* empty - extra data word */
+};
+
+__attribute__((section(".boot_hdr.conf")))
+// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
+const flexspi_nor_config_t qspiflash_config = {
+ .memConfig =
+ {
+ .tag = FLEXSPI_CFG_BLK_TAG,
+ .version = FLEXSPI_CFG_BLK_VERSION,
+ .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
+ .csHoldTime = 1u,
+ .csSetupTime = 2u,
+ // Enable DDR mode, Wordaddressable, Safe configuration, Differential clock
+ .deviceType = kFlexSpiDeviceType_SerialNOR,
+ .sflashPadType = kSerialFlash_4Pads,
+ .serialClkFreq = kFlexSpiSerialClk_60MHz, // 03
+ .sflashA1Size = FLASH_SIZE,
+ .lookupTable =
+ {
+ // FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)
+ // (FLEXSPI_LUT_OPERAND0(op0) | FLEXSPI_LUT_NUM_PADS0(pad0) | FLEXSPI_LUT_OPCODE0(cmd0) | FLEXSPI_LUT_OPERAND1(op1) |
+ // FLEXSPI_LUT_NUM_PADS1(pad1) | FLEXSPI_LUT_OPCODE1(cmd1))
+ // Read LUTs
+ FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
+ FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
+ 0,
+ 0,
+
+ 0x24040405,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000406,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x08180420,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x081804D8,
+ 0,
+ 0,
+ 0,
+
+ 0x08180402,
+ 0x00002004,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000460,
+ },
+ },
+ .pageSize = 256u,
+ .sectorSize = 4u * 1024u,
+ .ipcmdSerialClkFreq = kFlexSpiSerialClk_30MHz,
+ .blockSize = 0x00010000,
+ .isUniformBlockSize = false,
+};
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h b/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h
index 98d1f478b..a715a2c56 100644
--- a/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.h
@@ -1,19 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Feather MIMXRT1011"
#define MICROPY_HW_MCU_NAME "IMXRT1011DAE5A"
-//TODO
-//#define MICROPY_HW_LED_STATUS (&pin_PA27)
-
#define MICROPY_HW_NEOPIXEL (&pin_GPIO_SD_05)
-// These are pins not to reset.
-// QSPI Data pins
-//#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 )
-// QSPI CS, and QSPI SCK
-//#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 )
-//#define MICROPY_PORT_C ( 0 )
-//#define MICROPY_PORT_D ( 0 )
-
// If you change this, then make sure to update the linker scripts as well to
// make sure you don't overwrite code
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk b/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk
index 6efd3f329..08164b140 100644
--- a/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1011/mpconfigboard.mk
@@ -1,21 +1,8 @@
-LD_FILE = boards/mimxrt1011-bootloader-external-flash.ld
USB_VID = 0x239A
USB_PID = 0x8074
USB_PRODUCT = "Feather MIMXRT1011"
USB_MANUFACTURER = "arturo182"
-USB_DEVICES = "CDC,MSC,HID"
CHIP_VARIANT = MIMXRT1011DAE5A
CHIP_FAMILY = MIMXRT1011
-
-INTERNAL_FLASH_FILESYSTEM = 1
-
-CIRCUITPY_DISPLAYIO = 0
-CIRCUITPY_AUDIOIO = 0
-CIRCUITPY_AUDIOBUSIO = 0
-CIRCUITPY_FREQUENCYIO = 0
-CIRCUITPY_I2CSLAVE = 0
-CIRCUITPY_NVM = 0
-CIRCUITPY_ROTARYIO = 0
-
-LONGINT_IMPL = MPZ
+FLASH = W25Q64JV
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1062/board.c b/ports/mimxrt10xx/boards/feather_mimxrt1062/board.c
index 979dd82ce..52dd498b3 100644
--- a/ports/mimxrt10xx/boards/feather_mimxrt1062/board.c
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1062/board.c
@@ -27,24 +27,8 @@
#include "boards/board.h"
#include "mpconfigboard.h"
-#include "fsl_iomuxc.h"
void board_init(void) {
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_06_FLEXSPIA_SS0_B, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_07_FLEXSPIA_SCLK,1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_08_FLEXSPIA_DATA00, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_09_FLEXSPIA_DATA01, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_10_FLEXSPIA_DATA02, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_11_FLEXSPIA_DATA03, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_05_FLEXSPIA_DQS, 1U);
-
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_06_FLEXSPIA_SS0_B,0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_09_FLEXSPIA_DATA01, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_10_FLEXSPIA_DATA02, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_08_FLEXSPIA_DATA00, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_07_FLEXSPIA_SCLK, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_11_FLEXSPIA_DATA03, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B1_05_FLEXSPIA_DQS, 0x10E1U);
}
bool board_requests_safe_mode(void) {
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1062/flash_config.c b/ports/mimxrt10xx/boards/feather_mimxrt1062/flash_config.c
new file mode 100644
index 000000000..b74c0b151
--- /dev/null
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1062/flash_config.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2017 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "fsl_flexspi_nor_boot.h"
+#include "fsl_flexspi_nor_config.h"
+
+
+__attribute__((section(".boot_hdr.ivt")))
+/*************************************
+ * IVT Data
+ *************************************/
+const ivt image_vector_table = {
+ IVT_HEADER, /* IVT Header */
+ IMAGE_ENTRY_ADDRESS, /* Image Entry Function */
+ IVT_RSVD, /* Reserved = 0 */
+ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
+ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
+ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */
+ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
+ IVT_RSVD /* Reserved = 0 */
+};
+
+__attribute__((section(".boot_hdr.boot_data")))
+/*************************************
+ * Boot Data
+ *************************************/
+const BOOT_DATA_T boot_data = {
+ FLASH_BASE, /* boot start location */
+ FLASH_SIZE, /* size */
+ PLUGIN_FLAG, /* Plugin flag*/
+ 0xFFFFFFFF /* empty - extra data word */
+};
+
+__attribute__((section(".boot_hdr.conf")))
+// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
+const flexspi_nor_config_t qspiflash_config = {
+ .memConfig =
+ {
+ .tag = FLEXSPI_CFG_BLK_TAG,
+ .version = FLEXSPI_CFG_BLK_VERSION,
+ .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
+ .csHoldTime = 1u,
+ .csSetupTime = 2u,
+ // Enable DDR mode, Wordaddressable, Safe configuration, Differential clock
+ .deviceType = kFlexSpiDeviceType_SerialNOR,
+ .sflashPadType = kSerialFlash_4Pads,
+ .serialClkFreq = kFlexSpiSerialClk_60MHz, // 03
+ .sflashA1Size = FLASH_SIZE,
+ .lookupTable =
+ {
+ // FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)
+ // (FLEXSPI_LUT_OPERAND0(op0) | FLEXSPI_LUT_NUM_PADS0(pad0) | FLEXSPI_LUT_OPCODE0(cmd0) | FLEXSPI_LUT_OPERAND1(op1) |
+ // FLEXSPI_LUT_NUM_PADS1(pad1) | FLEXSPI_LUT_OPCODE1(cmd1))
+ // Read LUTs
+ FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
+ FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
+ 0,
+ 0,
+
+ 0x24040405,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000406,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x08180420,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x081804D8,
+ 0,
+ 0,
+ 0,
+
+ 0x08180402,
+ 0x00002004,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000460,
+ },
+ },
+ .pageSize = 256u,
+ .sectorSize = 4u * 1024u,
+ .ipcmdSerialClkFreq = kFlexSpiSerialClk_30MHz,
+ .blockSize = 0x00010000,
+ .isUniformBlockSize = false,
+};
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h b/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h
index b91209c82..4c3953187 100644
--- a/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.h
@@ -6,14 +6,6 @@
//#define MICROPY_HW_NEOPIXEL (&pin_PB22)
-// These are pins not to reset.
-// QSPI Data pins
-//#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 )
-// QSPI CS, and QSPI SCK
-//#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 )
-//#define MICROPY_PORT_C ( 0 )
-//#define MICROPY_PORT_D ( 0 )
-
// If you change this, then make sure to update the linker scripts as well to
// make sure you don't overwrite code
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
diff --git a/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk b/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk
index b2e356e55..1c8646991 100644
--- a/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk
+++ b/ports/mimxrt10xx/boards/feather_mimxrt1062/mpconfigboard.mk
@@ -1,21 +1,8 @@
-LD_FILE = boards/mimxrt1062-bootloader-external-flash.ld
USB_VID = 0x239A
USB_PID = 0x8076
USB_PRODUCT = "Feather MIMXRT1062"
USB_MANUFACTURER = "arturo182"
-USB_DEVICES = "CDC,MSC,HID"
CHIP_VARIANT = MIMXRT1062DVJ6A
CHIP_FAMILY = MIMXRT1062
-
-INTERNAL_FLASH_FILESYSTEM = 1
-
-CIRCUITPY_DISPLAYIO = 0
-CIRCUITPY_AUDIOIO = 0
-CIRCUITPY_AUDIOBUSIO = 0
-CIRCUITPY_FREQUENCYIO = 0
-CIRCUITPY_I2CSLAVE = 0
-CIRCUITPY_NVM = 0
-CIRCUITPY_ROTARYIO = 0
-
-LONGINT_IMPL = MPZ
+FLASH = W25Q64JV
diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/board.c b/ports/mimxrt10xx/boards/imxrt1010_evk/board.c
index 8e73df4ad..52dd498b3 100644
--- a/ports/mimxrt10xx/boards/imxrt1010_evk/board.c
+++ b/ports/mimxrt10xx/boards/imxrt1010_evk/board.c
@@ -27,24 +27,8 @@
#include "boards/board.h"
#include "mpconfigboard.h"
-#include "fsl_iomuxc.h"
void board_init(void) {
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1,1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 1U);
- IOMUXC_SetPinMux(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 1U);
-
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_06_FLEXSPI_A_SS0_B,0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_07_FLEXSPI_A_DATA1, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_08_FLEXSPI_A_DATA2, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_09_FLEXSPI_A_DATA0, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_10_FLEXSPI_A_SCLK, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_11_FLEXSPI_A_DATA3, 0x10E1U);
- IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_12_FLEXSPI_A_DQS, 0x10E1U);
}
bool board_requests_safe_mode(void) {
diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/flash_config.c b/ports/mimxrt10xx/boards/imxrt1010_evk/flash_config.c
new file mode 100644
index 000000000..7e8fb75b2
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1010_evk/flash_config.c
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2017 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "fsl_flexspi_nor_boot.h"
+#include "fsl_flexspi_nor_config.h"
+
+__attribute__((section(".boot_hdr.ivt")))
+/*************************************
+ * IVT Data
+ *************************************/
+const ivt image_vector_table = {
+ IVT_HEADER, /* IVT Header */
+ IMAGE_ENTRY_ADDRESS, /* Image Entry Function */
+ IVT_RSVD, /* Reserved = 0 */
+ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
+ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
+ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */
+ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
+ IVT_RSVD /* Reserved = 0 */
+};
+
+__attribute__((section(".boot_hdr.boot_data")))
+/*************************************
+ * Boot Data
+ *************************************/
+const BOOT_DATA_T boot_data = {
+ FLASH_BASE, /* boot start location */
+ FLASH_SIZE, /* size */
+ PLUGIN_FLAG, /* Plugin flag*/
+ 0xFFFFFFFF /* empty - extra data word */
+};
+
+__attribute__((section(".boot_hdr.conf")))
+// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
+const flexspi_nor_config_t qspiflash_config = {
+ .memConfig =
+ {
+ .tag = FLEXSPI_CFG_BLK_TAG,
+ .version = FLEXSPI_CFG_BLK_VERSION,
+ .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
+ .csHoldTime = 1u,
+ .csSetupTime = 2u,
+ // Enable DDR mode, Wordaddressable, Safe configuration, Differential clock
+ .deviceType = kFlexSpiDeviceType_SerialNOR,
+ .sflashPadType = kSerialFlash_4Pads,
+ .serialClkFreq = kFlexSpiSerialClk_60MHz, // 03
+ .sflashA1Size = FLASH_SIZE,
+ .lookupTable =
+ {
+ // FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)
+ // (FLEXSPI_LUT_OPERAND0(op0) | FLEXSPI_LUT_NUM_PADS0(pad0) | FLEXSPI_LUT_OPCODE0(cmd0) | FLEXSPI_LUT_OPERAND1(op1) |
+ // FLEXSPI_LUT_NUM_PADS1(pad1) | FLEXSPI_LUT_OPCODE1(cmd1))
+ // Read LUTs
+ FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
+ FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
+ 0,
+ 0,
+
+ 0x24040405,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000406,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x08180420,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x081804D8,
+ 0,
+ 0,
+ 0,
+
+ 0x08180402,
+ 0x00002004,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000460,
+ },
+ },
+ .pageSize = 256u,
+ .sectorSize = 4u * 1024u,
+ .ipcmdSerialClkFreq = kFlexSpiSerialClk_30MHz,
+ .blockSize = 0x00010000,
+ .isUniformBlockSize = false,
+};
diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h b/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h
index 12cb5e8a8..128e33111 100644
--- a/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h
+++ b/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.h
@@ -1,19 +1,6 @@
#define MICROPY_HW_BOARD_NAME "IMXRT1010-EVK"
#define MICROPY_HW_MCU_NAME "IMXRT1011DAE5A"
-//TODO
-//#define MICROPY_HW_LED_STATUS (&pin_PA27)
-
-//#define MICROPY_HW_NEOPIXEL (&pin_PB22)
-
-// These are pins not to reset.
-// QSPI Data pins
-//#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 )
-// QSPI CS, and QSPI SCK
-//#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 | PORT_PB22 )
-//#define MICROPY_PORT_C ( 0 )
-//#define MICROPY_PORT_D ( 0 )
-
// If you change this, then make sure to update the linker scripts as well to
// make sure you don't overwrite code
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
@@ -23,9 +10,5 @@
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_02)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_01)
-#define DEFAULT_SPI_BUS_SCK (&pin_GPIO_AD_06)
-#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO_AD_04)
-#define DEFAULT_SPI_BUS_MISO (&pin_GPIO_AD_03)
-
#define DEFAULT_UART_BUS_RX (&pin_GPIO_09)
#define DEFAULT_UART_BUS_TX (&pin_GPIO_10)
diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk b/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk
index 4401647c4..81eb63597 100644
--- a/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk
+++ b/ports/mimxrt10xx/boards/imxrt1010_evk/mpconfigboard.mk
@@ -1,22 +1,8 @@
-LD_FILE = boards/mimxrt1011-bootloader-external-flash.ld
USB_VID = 0x239A
USB_PID = 0x8078
USB_PRODUCT = "IMXRT1010-EVK"
USB_MANUFACTURER = "NXP"
-USB_DEVICES = "CDC,MSC,HID"
CHIP_VARIANT = MIMXRT1011DAE5A
CHIP_FAMILY = MIMXRT1011
-
-INTERNAL_FLASH_FILESYSTEM = 1
-
-CIRCUITPY_DISPLAYIO = 0
-CIRCUITPY_AUDIOIO = 0
-CIRCUITPY_AUDIOBUSIO = 0
-CIRCUITPY_FREQUENCYIO = 0
-CIRCUITPY_I2CSLAVE = 0
-CIRCUITPY_NEOPIXEL_WRITE = 0
-CIRCUITPY_NVM = 0
-CIRCUITPY_ROTARYIO = 0
-
-LONGINT_IMPL = MPZ
+FLASH = AT25SF128A
diff --git a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c
index cfc876369..a5a598760 100644
--- a/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c
+++ b/ports/mimxrt10xx/boards/imxrt1010_evk/pins.c
@@ -4,21 +4,25 @@
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_09) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_10) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_AD_05) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_AD_06) },
- //{ MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_08) }, // Connected to audio codec
- //{ MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_01) }, // Connected to audio codec
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_01) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_AD_01) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO_AD_02) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_SD_02) },
- //{ MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_03) }, // Connected to audio codec
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_03) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_AD_05) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_AD_04) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_AD_03) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_AD_06) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_01) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_02) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_07) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_09) },
@@ -27,8 +31,24 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_01) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_02) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_USR_LED), MP_ROM_PTR(&pin_GPIO_11) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_USR_SW), MP_ROM_PTR(&pin_GPIO_SD_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_USER_LED), MP_ROM_PTR(&pin_GPIO_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO_SD_05) },
+
+ // Audio Interface
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_INT), MP_ROM_PTR(&pin_GPIO_00) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_SYNC), MP_ROM_PTR(&pin_GPIO_07) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_BCLK), MP_ROM_PTR(&pin_GPIO_06) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_RXD), MP_ROM_PTR(&pin_GPIO_03) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_TXD), MP_ROM_PTR(&pin_GPIO_04) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_MCLK), MP_ROM_PTR(&pin_GPIO_08) },
+
+ // SPDIF
+ { MP_ROM_QSTR(MP_QSTR_SPDIF_IN), MP_ROM_PTR(&pin_GPIO_10) },
+ { MP_ROM_QSTR(MP_QSTR_SPDIF_OUT), MP_ROM_PTR(&pin_GPIO_11) },
+
+ // Freelink UART
+ { MP_ROM_QSTR(MP_QSTR_FREELINK_TX), MP_ROM_PTR(&pin_GPIO_10) },
+ { MP_ROM_QSTR(MP_QSTR_FREELINK_RX), MP_ROM_PTR(&pin_GPIO_09) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/board.c b/ports/mimxrt10xx/boards/imxrt1020_evk/board.c
new file mode 100644
index 000000000..52dd498b3
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1020_evk/board.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
+ * Copyright (c) 2019 Artur Pacholec
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "mpconfigboard.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/flash_config.c b/ports/mimxrt10xx/boards/imxrt1020_evk/flash_config.c
new file mode 100644
index 000000000..b74c0b151
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1020_evk/flash_config.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2017 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "fsl_flexspi_nor_boot.h"
+#include "fsl_flexspi_nor_config.h"
+
+
+__attribute__((section(".boot_hdr.ivt")))
+/*************************************
+ * IVT Data
+ *************************************/
+const ivt image_vector_table = {
+ IVT_HEADER, /* IVT Header */
+ IMAGE_ENTRY_ADDRESS, /* Image Entry Function */
+ IVT_RSVD, /* Reserved = 0 */
+ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
+ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
+ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */
+ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
+ IVT_RSVD /* Reserved = 0 */
+};
+
+__attribute__((section(".boot_hdr.boot_data")))
+/*************************************
+ * Boot Data
+ *************************************/
+const BOOT_DATA_T boot_data = {
+ FLASH_BASE, /* boot start location */
+ FLASH_SIZE, /* size */
+ PLUGIN_FLAG, /* Plugin flag*/
+ 0xFFFFFFFF /* empty - extra data word */
+};
+
+__attribute__((section(".boot_hdr.conf")))
+// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
+const flexspi_nor_config_t qspiflash_config = {
+ .memConfig =
+ {
+ .tag = FLEXSPI_CFG_BLK_TAG,
+ .version = FLEXSPI_CFG_BLK_VERSION,
+ .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
+ .csHoldTime = 1u,
+ .csSetupTime = 2u,
+ // Enable DDR mode, Wordaddressable, Safe configuration, Differential clock
+ .deviceType = kFlexSpiDeviceType_SerialNOR,
+ .sflashPadType = kSerialFlash_4Pads,
+ .serialClkFreq = kFlexSpiSerialClk_60MHz, // 03
+ .sflashA1Size = FLASH_SIZE,
+ .lookupTable =
+ {
+ // FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)
+ // (FLEXSPI_LUT_OPERAND0(op0) | FLEXSPI_LUT_NUM_PADS0(pad0) | FLEXSPI_LUT_OPCODE0(cmd0) | FLEXSPI_LUT_OPERAND1(op1) |
+ // FLEXSPI_LUT_NUM_PADS1(pad1) | FLEXSPI_LUT_OPCODE1(cmd1))
+ // Read LUTs
+ FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
+ FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
+ 0,
+ 0,
+
+ 0x24040405,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000406,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x08180420,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x081804D8,
+ 0,
+ 0,
+ 0,
+
+ 0x08180402,
+ 0x00002004,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000460,
+ },
+ },
+ .pageSize = 256u,
+ .sectorSize = 4u * 1024u,
+ .ipcmdSerialClkFreq = kFlexSpiSerialClk_30MHz,
+ .blockSize = 0x00010000,
+ .isUniformBlockSize = false,
+};
diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.h b/ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.h
new file mode 100644
index 000000000..a40df100e
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.h
@@ -0,0 +1,14 @@
+#define MICROPY_HW_BOARD_NAME "iMX RT 1020 EVK"
+#define MICROPY_HW_MCU_NAME "IMXRT1021DAG5A"
+
+// If you change this, then make sure to update the linker scripts as well to
+// make sure you don't overwrite code
+#define CIRCUITPY_INTERNAL_NVM_SIZE 0
+
+#define BOARD_FLASH_SIZE (8 * 1024 * 1024)
+
+#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_SD_B1_03)
+#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_SD_B1_02)
+
+#define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B1_09)
+#define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B1_08)
diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.mk b/ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.mk
new file mode 100644
index 000000000..7147fdf48
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1020_evk/mpconfigboard.mk
@@ -0,0 +1,8 @@
+USB_VID = 0x239A
+USB_PID = 0x8082
+USB_PRODUCT = "iMX RT 1020 EVK"
+USB_MANUFACTURER = "NXP"
+
+CHIP_VARIANT = MIMXRT1021DAG5A
+CHIP_FAMILY = MIMXRT1021
+FLASH = IS25LP064A
diff --git a/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c
new file mode 100644
index 000000000..ef8115a64
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1020_evk/pins.c
@@ -0,0 +1,84 @@
+#include "shared-bindings/board/__init__.h"
+
+#include "boards/board.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_AD_B0_09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_AD_B0_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_AD_B0_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_AD_B0_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_AD_B0_14) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_AD_B0_15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_AD_B0_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_AD_B0_13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_AD_B0_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_SD_B1_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_SD_B1_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO_SD_B1_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_SD_B1_02) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B1_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_B1_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_B1_12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_B1_13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B1_14) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_USER_LED), MP_ROM_PTR(&pin_GPIO_AD_B0_05) },
+
+ // SD Card
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CLK), MP_ROM_PTR(&pin_GPIO_SD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_SW), MP_ROM_PTR(&pin_GPIO_SD_B0_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CMD), MP_ROM_PTR(&pin_GPIO_SD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D0), MP_ROM_PTR(&pin_GPIO_SD_B0_04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D1), MP_ROM_PTR(&pin_GPIO_SD_B0_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D2), MP_ROM_PTR(&pin_GPIO_SD_B0_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D3), MP_ROM_PTR(&pin_GPIO_SD_B0_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_PWREN), MP_ROM_PTR(&pin_GPIO_SD_B1_04) },
+
+ // // Audio Interface
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_INT), MP_ROM_PTR(&pin_GPIO_AD_B1_04) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_SYNC), MP_ROM_PTR(&pin_GPIO_AD_B1_02) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_BCLK), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_RXD), MP_ROM_PTR(&pin_GPIO_AD_B1_05) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_TXD), MP_ROM_PTR(&pin_GPIO_AD_B1_03) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_MCLK), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+
+ // // Ethernet
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_MDIO), MP_ROM_PTR(&pin_GPIO_EMC_40) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_MDC), MP_ROM_PTR(&pin_GPIO_EMC_41) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RXD0), MP_ROM_PTR(&pin_GPIO_AD_B0_10) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RXD1), MP_ROM_PTR(&pin_GPIO_AD_B0_09) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_CRS_DV), MP_ROM_PTR(&pin_GPIO_AD_B0_11) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_TXD0), MP_ROM_PTR(&pin_GPIO_AD_B0_14) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_TXD1), MP_ROM_PTR(&pin_GPIO_AD_B0_15) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_TXEN), MP_ROM_PTR(&pin_GPIO_AD_B0_13) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_INT), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RST), MP_ROM_PTR(&pin_GPIO_AD_B0_04) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_CLK), MP_ROM_PTR(&pin_GPIO_AD_B0_08) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RXER), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
+
+ // // Freelink UART
+ { MP_ROM_QSTR(MP_QSTR_FREELINK_TX), MP_ROM_PTR(&pin_GPIO_AD_B0_06) },
+ { MP_ROM_QSTR(MP_QSTR_FREELINK_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_07) },
+
+ // CAN
+ { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_GPIO_SD_B1_00) },
+ { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_GPIO_SD_B1_01) },
+ { MP_ROM_QSTR(MP_QSTR_CAN_STBY), MP_ROM_PTR(&pin_GPIO_AD_B1_13) },
+
+ //
+ { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_SDA), MP_ROM_PTR(&pin_GPIO_SD_B1_03) },
+ { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_SCL), MP_ROM_PTR(&pin_GPIO_SD_B1_02) },
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/board.c b/ports/mimxrt10xx/boards/imxrt1060_evk/board.c
new file mode 100644
index 000000000..52dd498b3
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1060_evk/board.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
+ * Copyright (c) 2019 Artur Pacholec
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "mpconfigboard.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/flash_config.c b/ports/mimxrt10xx/boards/imxrt1060_evk/flash_config.c
new file mode 100644
index 000000000..7e046d494
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1060_evk/flash_config.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2017 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "fsl_flexspi_nor_boot.h"
+#include "fsl_flexspi_nor_config.h"
+
+__attribute__((section(".boot_hdr.ivt")))
+
+/*************************************
+ * IVT Data
+ *************************************/
+const ivt image_vector_table = {
+ IVT_HEADER, /* IVT Header */
+ IMAGE_ENTRY_ADDRESS, /* Image Entry Function */
+ IVT_RSVD, /* Reserved = 0 */
+ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
+ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
+ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */
+ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
+ IVT_RSVD /* Reserved = 0 */
+};
+
+__attribute__((section(".boot_hdr.boot_data")))
+/*************************************
+ * Boot Data
+ *************************************/
+const BOOT_DATA_T boot_data = {
+ FLASH_BASE, /* boot start location */
+ FLASH_SIZE, /* size */
+ PLUGIN_FLAG, /* Plugin flag*/
+ 0xFFFFFFFF /* empty - extra data word */
+};
+
+__attribute__((section(".boot_hdr.conf")))
+// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
+const flexspi_nor_config_t qspiflash_config = {
+ .memConfig =
+ {
+ .tag = FLEXSPI_CFG_BLK_TAG,
+ .version = FLEXSPI_CFG_BLK_VERSION,
+ .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
+ .csHoldTime = 1u,
+ .csSetupTime = 2u,
+ // Enable DDR mode, Wordaddressable, Safe configuration, Differential clock
+ .deviceType = kFlexSpiDeviceType_SerialNOR,
+ .sflashPadType = kSerialFlash_4Pads,
+ .serialClkFreq = kFlexSpiSerialClk_60MHz, // 03
+ .sflashA1Size = FLASH_SIZE,
+ .lookupTable =
+ {
+ // FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)
+ // (FLEXSPI_LUT_OPERAND0(op0) | FLEXSPI_LUT_NUM_PADS0(pad0) | FLEXSPI_LUT_OPCODE0(cmd0) | FLEXSPI_LUT_OPERAND1(op1) |
+ // FLEXSPI_LUT_NUM_PADS1(pad1) | FLEXSPI_LUT_OPCODE1(cmd1))
+ // Read LUTs
+ FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
+ FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
+ 0,
+ 0,
+
+ 0x24040405,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000406,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x08180420,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x081804D8,
+ 0,
+ 0,
+ 0,
+
+ 0x08180402,
+ 0x00002004,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000460,
+ },
+ },
+ .pageSize = 256u,
+ .sectorSize = 4u * 1024u,
+ .ipcmdSerialClkFreq = kFlexSpiSerialClk_30MHz,
+ .blockSize = 0x00010000,
+ .isUniformBlockSize = false,
+};
diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h b/ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h
new file mode 100644
index 000000000..8eccd8aee
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.h
@@ -0,0 +1,14 @@
+#define MICROPY_HW_BOARD_NAME "iMX RT 1060 EVK"
+#define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A"
+
+// If you change this, then make sure to update the linker scripts as well to
+// make sure you don't overwrite code
+#define CIRCUITPY_INTERNAL_NVM_SIZE 0
+
+#define BOARD_FLASH_SIZE (8 * 1024 * 1024)
+
+#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_AD_B1_00)
+#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_AD_B1_01)
+
+#define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B1_07)
+#define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B1_06)
diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.mk b/ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.mk
new file mode 100644
index 000000000..e82d8ee74
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1060_evk/mpconfigboard.mk
@@ -0,0 +1,8 @@
+USB_VID = 0x239A
+USB_PID = 0x8084
+USB_PRODUCT = "iMX RT 1060 EVK"
+USB_MANUFACTURER = "NXP"
+
+CHIP_VARIANT = MIMXRT1062DVJ6A
+CHIP_FAMILY = MIMXRT1062
+FLASH = IS25WP064A
diff --git a/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c
new file mode 100644
index 000000000..2d268952d
--- /dev/null
+++ b/ports/mimxrt10xx/boards/imxrt1060_evk/pins.c
@@ -0,0 +1,128 @@
+#include "shared-bindings/board/__init__.h"
+
+#include "boards/board.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_AD_B0_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_AD_B0_09) }, // Connected to audio codec
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_AD_B0_10) }, // Connected to audio codec
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_AD_B1_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO_AD_B1_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_AD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_AD_B0_02) }, // Connected to audio codec
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_SD_B0_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_SD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_SD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_SD_B0_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+
+ // i2c sensor is on I2C1_SCL/SDA
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B1_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_B1_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_B1_04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_B1_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_USER_LED), MP_ROM_PTR(&pin_GPIO_AD_B0_09) },
+
+ // Camera Sensor Interface
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_VSYNC), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_PWDN), MP_ROM_PTR(&pin_GPIO_AD_B1_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_HSYNC), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D9), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_MCLK), MP_ROM_PTR(&pin_GPIO_AD_B1_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D8), MP_ROM_PTR(&pin_GPIO_AD_B1_09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D7), MP_ROM_PTR(&pin_GPIO_AD_B1_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_PIXCLK), MP_ROM_PTR(&pin_GPIO_AD_B1_04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D6), MP_ROM_PTR(&pin_GPIO_AD_B1_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D2), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D5), MP_ROM_PTR(&pin_GPIO_AD_B1_12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D3), MP_ROM_PTR(&pin_GPIO_AD_B1_14) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CSI_D4), MP_ROM_PTR(&pin_GPIO_AD_B1_13) },
+
+ // SD Card
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CLK), MP_ROM_PTR(&pin_GPIO_SD_B0_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_SW), MP_ROM_PTR(&pin_GPIO_B1_12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CMD), MP_ROM_PTR(&pin_GPIO_SD_B0_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D0), MP_ROM_PTR(&pin_GPIO_SD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D1), MP_ROM_PTR(&pin_GPIO_SD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D2), MP_ROM_PTR(&pin_GPIO_SD_B0_04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_D3), MP_ROM_PTR(&pin_GPIO_SD_B0_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SD_PWREN), MP_ROM_PTR(&pin_GPIO_AD_B1_03) },
+
+ // LCD Interface
+ { MP_ROM_QSTR(MP_QSTR_LCD_BACKLIGHT), MP_ROM_PTR(&pin_GPIO_B1_15) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO_AD_B0_02) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_ENABLE), MP_ROM_PTR(&pin_GPIO_B0_01) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_VSYNC), MP_ROM_PTR(&pin_GPIO_B0_03) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_HSYNC), MP_ROM_PTR(&pin_GPIO_B0_02) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO_B0_00) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D0), MP_ROM_PTR(&pin_GPIO_B0_04) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D1), MP_ROM_PTR(&pin_GPIO_B0_05) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D2), MP_ROM_PTR(&pin_GPIO_B0_06) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D3), MP_ROM_PTR(&pin_GPIO_B0_07) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D4), MP_ROM_PTR(&pin_GPIO_B0_08) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D5), MP_ROM_PTR(&pin_GPIO_B0_09) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D6), MP_ROM_PTR(&pin_GPIO_B0_10) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D7), MP_ROM_PTR(&pin_GPIO_B0_11) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D8), MP_ROM_PTR(&pin_GPIO_B0_12) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D9), MP_ROM_PTR(&pin_GPIO_B0_13) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D10), MP_ROM_PTR(&pin_GPIO_B0_14) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D11), MP_ROM_PTR(&pin_GPIO_B0_15) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D12), MP_ROM_PTR(&pin_GPIO_B1_00) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D13), MP_ROM_PTR(&pin_GPIO_B1_01) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D14), MP_ROM_PTR(&pin_GPIO_B1_02) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D15), MP_ROM_PTR(&pin_GPIO_B1_03) },
+
+ // Touch Interface
+ { MP_ROM_QSTR(MP_QSTR_LCD_TOUCH_INT), MP_ROM_PTR(&pin_GPIO_AD_B0_11) },
+
+ // Audio Interface
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_INT), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_SYNC), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_BCLK), MP_ROM_PTR(&pin_GPIO_AD_B1_14) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_RXD), MP_ROM_PTR(&pin_GPIO_AD_B1_12) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_TXD), MP_ROM_PTR(&pin_GPIO_AD_B1_13) },
+ { MP_ROM_QSTR(MP_QSTR_AUDIO_MCLK), MP_ROM_PTR(&pin_GPIO_AD_B1_09) },
+
+ // SPDIF
+ { MP_ROM_QSTR(MP_QSTR_SPDIF_IN), MP_ROM_PTR(&pin_GPIO_AD_B1_03) },
+ { MP_ROM_QSTR(MP_QSTR_SPDIF_OUT), MP_ROM_PTR(&pin_GPIO_AD_B1_02) },
+
+ // Ethernet
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_MDIO), MP_ROM_PTR(&pin_GPIO_EMC_41) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_MDC), MP_ROM_PTR(&pin_GPIO_EMC_40) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RXD0), MP_ROM_PTR(&pin_GPIO_B1_04) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RXD1), MP_ROM_PTR(&pin_GPIO_B1_05) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_CRS_DV), MP_ROM_PTR(&pin_GPIO_B1_06) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_TXD0), MP_ROM_PTR(&pin_GPIO_B1_07) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_TXD1), MP_ROM_PTR(&pin_GPIO_B1_08) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_TXEN), MP_ROM_PTR(&pin_GPIO_B1_09) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_INT), MP_ROM_PTR(&pin_GPIO_AD_B0_10) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RST), MP_ROM_PTR(&pin_GPIO_AD_B0_09) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_CLK), MP_ROM_PTR(&pin_GPIO_B1_10) },
+ { MP_ROM_QSTR(MP_QSTR_ETHERNET_RXER), MP_ROM_PTR(&pin_GPIO_B1_11) },
+
+ // Freelink UART
+ { MP_ROM_QSTR(MP_QSTR_FREELINK_TX), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
+ { MP_ROM_QSTR(MP_QSTR_FREELINK_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_13) },
+
+ // CAN
+ { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_GPIO_AD_B0_14) },
+ { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_15) },
+ { MP_ROM_QSTR(MP_QSTR_CAN_STBY), MP_ROM_PTR(&pin_GPIO_AD_B0_05) },
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/mimxrt10xx/boards/mimxrt1011-bootloader-external-flash.ld b/ports/mimxrt10xx/boards/mimxrt1011-bootloader-external-flash.ld
deleted file mode 100644
index d36ee1239..000000000
--- a/ports/mimxrt10xx/boards/mimxrt1011-bootloader-external-flash.ld
+++ /dev/null
@@ -1,106 +0,0 @@
-ENTRY(Reset_Handler)
-
-_minimum_stack_size = 64K;
-_minimum_heap_size = 0;
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 8M
- FLASH_BOOTLOADER (rx) : ORIGIN = 0x60000000, LENGTH = 48K
- FLASH_ISR (rx) : ORIGIN = 0x6000C000, LENGTH = 1K
- FLASH_TEXT (rx) : ORIGIN = 0x6000C400, LENGTH = 975K
- FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = 7M
- RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 32K
- OCRAM (rwx) : ORIGIN = 0x20200000, LENGTH = 64K
-}
-
-_estack = ORIGIN(OCRAM) + LENGTH(OCRAM);
-_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
-
-__fatfs_flash_start_addr = ORIGIN(FLASH_FATFS);
-__fatfs_flash_length = LENGTH(FLASH_FATFS);
-
-__RAM_VECTOR_TABLE_SIZE_BYTES = 0;
-
-SECTIONS
-{
- .interrupts :
- {
- __VECTOR_TABLE = .;
- __VECTOR_RAM = .;
-
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } > FLASH_ISR
-
- .text :
- {
- . = ALIGN(4);
- *(EXCLUDE_FILE(
- *flexspi_nor_flash_ops.o
- *fsl_flexspi.o
- ) .text*) /* .text* sections (code) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } > FLASH_TEXT
-
- .ARM.exidx :
- {
- *(.ARM.exidx*)
- *(.gnu.linkonce.armexidx.*)
- _etext = .; /* define a global symbol at end of code */
- __etext = .; /* define a global symbol at end of code */
- } > FLASH_TEXT
-
- /* used by the startup to initialize data */
- _sidata = .;
-
- .data : AT (_sidata)
- {
- . = ALIGN(4);
- __data_start__ = .; /* create a global symbol at data start */
-
- *(.data*) /* .data* sections */
- *flexspi_nor_flash_ops.o(.text*)
- *fsl_flexspi.o(.text*)
- . = ALIGN(4);
-
- __data_end__ = .; /* define a global symbol at data end */
- } > RAM
-
- /* Uninitialized data section */
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
-
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- __bss_end__ = .;
- PROVIDE(end = .);
- } > RAM
-
- .heap :
- {
- . = ALIGN(8);
- _heap_start = .; /* define a global symbol at heap start */
-
- . += _minimum_heap_size;
-
- __HeapLimit = .;
- } > OCRAM
-
- .stack :
- {
- . = ALIGN(8);
- . += _minimum_stack_size;
- } > OCRAM
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
-
-ASSERT(__data_end__ <= ORIGIN(FLASH_TEXT) + LENGTH(FLASH_TEXT), "region FLASH_TEXT overflowed with text and data")
-ASSERT(_estack - _minimum_stack_size >= __HeapLimit, "region OCRAM overflowed with stack and heap")
diff --git a/ports/mimxrt10xx/boards/mimxrt1011-external-flash.ld b/ports/mimxrt10xx/boards/mimxrt1011-external-flash.ld
deleted file mode 100644
index f1b0d8554..000000000
--- a/ports/mimxrt10xx/boards/mimxrt1011-external-flash.ld
+++ /dev/null
@@ -1,123 +0,0 @@
-ENTRY(Reset_Handler)
-
-_minimum_stack_size = 64K;
-_minimum_heap_size = 0;
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 8M
- FLASH_CONFIG (rx) : ORIGIN = 0x60000400, LENGTH = 3K
- FLASH_IVT (rx) : ORIGIN = 0x60001000, LENGTH = 4K
- FLASH_ISR (rx) : ORIGIN = 0x60002000, LENGTH = 1K
- FLASH_TEXT (rx) : ORIGIN = 0x60002400, LENGTH = 1015K
- FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = 7M
- RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 32K
- OCRAM (rwx) : ORIGIN = 0x20200000, LENGTH = 64K
-}
-
-_estack = ORIGIN(OCRAM) + LENGTH(OCRAM);
-_bootloader_dbl_tap = 0;
-
-__fatfs_flash_start_addr = ORIGIN(FLASH_FATFS);
-__fatfs_flash_length = LENGTH(FLASH_FATFS);
-
-__RAM_VECTOR_TABLE_SIZE_BYTES = 0;
-
-SECTIONS
-{
- .flash_config :
- {
- . = ALIGN(4);
- KEEP(* (.boot_hdr.conf))
- . = ALIGN(4);
- } > FLASH_CONFIG
-
- .ivt :
- {
- . = ALIGN(4);
- KEEP(* (.boot_hdr.ivt))
- KEEP(* (.boot_hdr.boot_data))
- KEEP(* (.boot_hdr.dcd_data))
- . = ALIGN(4);
- } > FLASH_IVT
-
- .interrupts :
- {
- __VECTOR_TABLE = .;
- __VECTOR_RAM = .;
-
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } > FLASH_ISR
-
- .text :
- {
- . = ALIGN(4);
- *(EXCLUDE_FILE(
- *flexspi_nor_flash_ops.o
- *fsl_flexspi.o
- ) .text*) /* .text* sections (code) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } > FLASH_TEXT
-
- .ARM.exidx :
- {
- *(.ARM.exidx*)
- *(.gnu.linkonce.armexidx.*)
- _etext = .; /* define a global symbol at end of code */
- __etext = .; /* define a global symbol at end of code */
- } > FLASH_TEXT
-
- /* used by the startup to initialize data */
- _sidata = .;
-
- .data : AT (_sidata)
- {
- . = ALIGN(4);
- __data_start__ = .; /* create a global symbol at data start */
-
- *(.data*) /* .data* sections */
- *flexspi_nor_flash_ops.o(.text*)
- *fsl_flexspi.o(.text*)
- . = ALIGN(4);
-
- __data_end__ = .; /* define a global symbol at data end */
- } > RAM
-
- /* Uninitialized data section */
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
-
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- __bss_end__ = .;
- PROVIDE(end = .);
- } > RAM
-
- .heap :
- {
- . = ALIGN(8);
- _heap_start = .; /* define a global symbol at heap start */
-
- . += _minimum_heap_size;
-
- __HeapLimit = .;
- } > OCRAM
-
- .stack :
- {
- . = ALIGN(8);
- . += _minimum_stack_size;
- } > OCRAM
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
-
-ASSERT(__data_end__ <= ORIGIN(FLASH_TEXT) + LENGTH(FLASH_TEXT), "region FLASH_TEXT overflowed with text and data")
-ASSERT(_estack - _minimum_stack_size >= __HeapLimit, "region OCRAM overflowed with stack and heap")
diff --git a/ports/mimxrt10xx/boards/mimxrt1062-bootloader-external-flash.ld b/ports/mimxrt10xx/boards/mimxrt1062-bootloader-external-flash.ld
deleted file mode 100644
index 16442607f..000000000
--- a/ports/mimxrt10xx/boards/mimxrt1062-bootloader-external-flash.ld
+++ /dev/null
@@ -1,106 +0,0 @@
-ENTRY(Reset_Handler)
-
-_minimum_stack_size = 64K;
-_minimum_heap_size = 0;
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 8M
- FLASH_BOOTLOADER (rx) : ORIGIN = 0x60000000, LENGTH = 48K
- FLASH_ISR (rx) : ORIGIN = 0x6000C000, LENGTH = 1K
- FLASH_TEXT (rx) : ORIGIN = 0x6000C400, LENGTH = 975K
- FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = 7M
- RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 128K
- OCRAM (rwx) : ORIGIN = 0x20200000, LENGTH = 768K
-}
-
-_estack = ORIGIN(OCRAM) + LENGTH(OCRAM);
-_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
-
-__fatfs_flash_start_addr = ORIGIN(FLASH_FATFS);
-__fatfs_flash_length = LENGTH(FLASH_FATFS);
-
-__RAM_VECTOR_TABLE_SIZE_BYTES = 0;
-
-SECTIONS
-{
- .interrupts :
- {
- __VECTOR_TABLE = .;
- __VECTOR_RAM = .;
-
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } > FLASH_ISR
-
- .text :
- {
- . = ALIGN(4);
- *(EXCLUDE_FILE(
- *flexspi_nor_flash_ops.o
- *fsl_flexspi.o
- ) .text*) /* .text* sections (code) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } > FLASH_TEXT
-
- .ARM.exidx :
- {
- *(.ARM.exidx*)
- *(.gnu.linkonce.armexidx.*)
- _etext = .; /* define a global symbol at end of code */
- __etext = .; /* define a global symbol at end of code */
- } > FLASH_TEXT
-
- /* used by the startup to initialize data */
- _sidata = .;
-
- .data : AT (_sidata)
- {
- . = ALIGN(4);
- __data_start__ = .; /* create a global symbol at data start */
-
- *(.data*) /* .data* sections */
- *flexspi_nor_flash_ops.o(.text*)
- *fsl_flexspi.o(.text*)
- . = ALIGN(4);
-
- __data_end__ = .; /* define a global symbol at data end */
- } > RAM
-
- /* Uninitialized data section */
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
-
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- __bss_end__ = .;
- PROVIDE(end = .);
- } > RAM
-
- .heap :
- {
- . = ALIGN(8);
- _heap_start = .; /* define a global symbol at heap start */
-
- . += _minimum_heap_size;
-
- __HeapLimit = .;
- } > OCRAM
-
- .stack :
- {
- . = ALIGN(8);
- . += _minimum_stack_size;
- } > OCRAM
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
-}
-
-ASSERT(__data_end__ <= ORIGIN(FLASH_TEXT) + LENGTH(FLASH_TEXT), "region FLASH_TEXT overflowed with text and data")
-ASSERT(_estack - _minimum_stack_size >= __HeapLimit, "region OCRAM overflowed with stack and heap")
diff --git a/ports/mimxrt10xx/boards/teensy40/board.c b/ports/mimxrt10xx/boards/teensy40/board.c
new file mode 100644
index 000000000..52dd498b3
--- /dev/null
+++ b/ports/mimxrt10xx/boards/teensy40/board.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
+ * Copyright (c) 2019 Artur Pacholec
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "mpconfigboard.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/mimxrt10xx/boards/teensy40/board.ld b/ports/mimxrt10xx/boards/teensy40/board.ld
new file mode 100644
index 000000000..8f19810a3
--- /dev/null
+++ b/ports/mimxrt10xx/boards/teensy40/board.ld
@@ -0,0 +1 @@
+_ld_reserved_flash_size = 4K;
diff --git a/ports/mimxrt10xx/boards/teensy40/flash_config.c b/ports/mimxrt10xx/boards/teensy40/flash_config.c
new file mode 100644
index 000000000..426deb884
--- /dev/null
+++ b/ports/mimxrt10xx/boards/teensy40/flash_config.c
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2017 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "fsl_flexspi_nor_boot.h"
+#include "fsl_flexspi_nor_config.h"
+
+/* Component ID definition, used by tools. */
+#ifndef FSL_COMPONENT_ID
+#define FSL_COMPONENT_ID "platform.drivers.xip_device"
+#endif
+
+__attribute__((section(".boot_hdr.ivt")))
+/*************************************
+ * IVT Data
+ *************************************/
+const ivt image_vector_table = {
+ IVT_HEADER, /* IVT Header */
+ IMAGE_ENTRY_ADDRESS, /* Image Entry Function */
+ IVT_RSVD, /* Reserved = 0 */
+ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */
+ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */
+ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */
+ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */
+ IVT_RSVD /* Reserved = 0 */
+};
+
+__attribute__((section(".boot_hdr.boot_data")))
+/*************************************
+ * Boot Data
+ *************************************/
+const BOOT_DATA_T boot_data = {
+ FLASH_BASE, /* boot start location */
+ FLASH_SIZE, /* size */
+ PLUGIN_FLAG, /* Plugin flag*/
+ 0xFFFFFFFF /* empty - extra data word */
+};
+
+__attribute__((section(".boot_hdr.conf")))
+// Values copied from https://github.com/PaulStoffregen/cores/blob/ddb23fa5d97dac763bc06e11b9b41f026bd51f0a/teensy4/bootdata.c#L39
+const flexspi_nor_config_t qspiflash_config = {
+ .memConfig =
+ {
+ .tag = FLEXSPI_CFG_BLK_TAG,
+ .version = FLEXSPI_CFG_BLK_VERSION,
+ .readSampleClkSrc = kFlexSPIReadSampleClk_LoopbackFromDqsPad,
+ .csHoldTime = 1u,
+ .csSetupTime = 2u,
+ // Enable DDR mode, Wordaddressable, Safe configuration, Differential clock
+ .deviceType = kFlexSpiDeviceType_SerialNOR,
+ .sflashPadType = kSerialFlash_4Pads,
+ .serialClkFreq = kFlexSpiSerialClk_60MHz, // 03
+ .sflashA1Size = FLASH_SIZE,
+ .lookupTable =
+ {
+ // FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1)
+ // (FLEXSPI_LUT_OPERAND0(op0) | FLEXSPI_LUT_NUM_PADS0(pad0) | FLEXSPI_LUT_OPCODE0(cmd0) | FLEXSPI_LUT_OPERAND1(op1) |
+ // FLEXSPI_LUT_NUM_PADS1(pad1) | FLEXSPI_LUT_OPCODE1(cmd1))
+ // Read LUTs
+ FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
+ FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
+ 0,
+ 0,
+
+ 0x24040405,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000406,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x08180420,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x081804D8,
+ 0,
+ 0,
+ 0,
+
+ 0x08180402,
+ 0x00002004,
+ 0,
+ 0,
+
+ 0,
+ 0,
+ 0,
+ 0,
+
+ 0x00000460,
+ },
+ },
+ .pageSize = 256u,
+ .sectorSize = 4u * 1024u,
+ .ipcmdSerialClkFreq = kFlexSpiSerialClk_30MHz,
+ .blockSize = 0x00010000,
+ .isUniformBlockSize = false,
+};
diff --git a/ports/mimxrt10xx/boards/teensy40/mpconfigboard.h b/ports/mimxrt10xx/boards/teensy40/mpconfigboard.h
new file mode 100644
index 000000000..718d9b967
--- /dev/null
+++ b/ports/mimxrt10xx/boards/teensy40/mpconfigboard.h
@@ -0,0 +1,18 @@
+#define MICROPY_HW_BOARD_NAME "Teensy 4.0"
+#define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A"
+
+// If you change this, then make sure to update the linker scripts as well to
+// make sure you don't overwrite code
+#define CIRCUITPY_INTERNAL_NVM_SIZE 0
+
+#define BOARD_FLASH_SIZE (2 * 1024 * 1024)
+
+#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_AD_B1_00)
+#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_AD_B1_01)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_GPIO_B0_03)
+#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO_B0_02)
+#define DEFAULT_SPI_BUS_MISO (&pin_GPIO_B0_01)
+
+#define DEFAULT_UART_BUS_RX (&pin_GPIO_AD_B0_03)
+#define DEFAULT_UART_BUS_TX (&pin_GPIO_AD_B0_02)
diff --git a/ports/mimxrt10xx/boards/teensy40/mpconfigboard.mk b/ports/mimxrt10xx/boards/teensy40/mpconfigboard.mk
new file mode 100644
index 000000000..7900d327a
--- /dev/null
+++ b/ports/mimxrt10xx/boards/teensy40/mpconfigboard.mk
@@ -0,0 +1,8 @@
+USB_VID = 0x239A
+USB_PID = 0x8086
+USB_PRODUCT = "Teensy 4.0"
+USB_MANUFACTURER = "PJRC"
+
+CHIP_VARIANT = MIMXRT1062DVJ6A
+CHIP_FAMILY = MIMXRT1062
+FLASH = W25Q16JV
diff --git a/ports/mimxrt10xx/boards/teensy40/pins.c b/ports/mimxrt10xx/boards/teensy40/pins.c
new file mode 100644
index 000000000..9066ce0d2
--- /dev/null
+++ b/ports/mimxrt10xx/boards/teensy40/pins.c
@@ -0,0 +1,87 @@
+#include "shared-bindings/board/__init__.h"
+
+#include "boards/board.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ // With USB on left. Bottom edge.
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_AD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_AD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_GPIO_AD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_AD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_AD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_GPIO_AD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_EMC_04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_EMC_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_EMC_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_EMC_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_B0_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_B1_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_B0_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_B0_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_B0_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO_B0_01) },
+
+ // Top edge
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO_AD_B1_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_B1_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO_AD_B1_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_B1_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_B1_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_B1_06) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SDA0), MP_ROM_PTR(&pin_GPIO_AD_B1_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCL0), MP_ROM_PTR(&pin_GPIO_AD_B1_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO_AD_B1_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO_AD_B1_10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO_AD_B1_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO_AD_B1_11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_GPIO_AD_B1_08) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO_AD_B1_09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_GPIO_AD_B1_09) },
+
+ // Back side
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_GPIO_AD_B0_12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO_AD_B0_13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_GPIO_AD_B0_13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO_AD_B1_14) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A12), MP_ROM_PTR(&pin_GPIO_AD_B1_14) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_A13), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO_EMC_32) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO_EMC_31) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_GPIO_EMC_37) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_GPIO_EMC_36) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO_B0_12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO_EMC_07) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO_SD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_DAT1), MP_ROM_PTR(&pin_GPIO_SD_B0_03) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO_SD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_DAT0), MP_ROM_PTR(&pin_GPIO_SD_B0_02) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO_SD_B0_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO_SD_B0_01) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO_SD_B0_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CMD), MP_ROM_PTR(&pin_GPIO_SD_B0_00) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO_SD_B0_04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_DAT3), MP_ROM_PTR(&pin_GPIO_SD_B0_04) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO_SD_B0_05) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_DAT2), MP_ROM_PTR(&pin_GPIO_SD_B0_05) },
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
+ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c
index 68de3a890..a9f4c740f 100644
--- a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c
+++ b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c
@@ -72,10 +72,10 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) {
}
// Pretend to be the first of the two reset presses needed to enter the
// bootloader. That way one reset will end in the bootloader.
- _bootloader_dbl_tap = DBL_TAP_MAGIC;
+ SNVS->LPGPR[0] = DBL_TAP_MAGIC;
} else {
// Set up the default.
- _bootloader_dbl_tap = DBL_TAP_MAGIC_QUICK_BOOT;
+ SNVS->LPGPR[0] = DBL_TAP_MAGIC_QUICK_BOOT;
}
if (runmode == RUNMODE_SAFE_MODE) {
safe_mode_on_next_reset(PROGRAMMATIC_SAFE_MODE);
@@ -229,6 +229,7 @@ STATIC const mp_rom_map_elem_t mcu_pin_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_13), MP_ROM_PTR(&pin_GPIO_AD_B1_13) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_14), MP_ROM_PTR(&pin_GPIO_AD_B1_14) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_AD_B1_15), MP_ROM_PTR(&pin_GPIO_AD_B1_15) },
+ #ifdef MIMXRT1062_SERIES
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_00), MP_ROM_PTR(&pin_GPIO_B0_00) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_01), MP_ROM_PTR(&pin_GPIO_B0_01) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_B0_02), MP_ROM_PTR(&pin_GPIO_B0_02) },
@@ -261,6 +262,7 @@ STATIC const mp_rom_map_elem_t mcu_pin_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_13), MP_ROM_PTR(&pin_GPIO_B1_13) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_14), MP_ROM_PTR(&pin_GPIO_B1_14) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_B1_15), MP_ROM_PTR(&pin_GPIO_B1_15) },
+ #endif
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_00), MP_ROM_PTR(&pin_GPIO_SD_B0_00) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_01), MP_ROM_PTR(&pin_GPIO_SD_B0_01) },
{ MP_ROM_QSTR(MP_QSTR_GPIO_SD_B0_02), MP_ROM_PTR(&pin_GPIO_SD_B0_02) },
diff --git a/ports/mimxrt10xx/linking/chip_family/MIMXRT1011.ld b/ports/mimxrt10xx/linking/chip_family/MIMXRT1011.ld
new file mode 100644
index 000000000..0d0beebaa
--- /dev/null
+++ b/ports/mimxrt10xx/linking/chip_family/MIMXRT1011.ld
@@ -0,0 +1,2 @@
+ram_size = 128K;
+flash_config_location = 0x60000400;
diff --git a/ports/mimxrt10xx/linking/chip_family/MIMXRT1021.ld b/ports/mimxrt10xx/linking/chip_family/MIMXRT1021.ld
new file mode 100644
index 000000000..21f2ea872
--- /dev/null
+++ b/ports/mimxrt10xx/linking/chip_family/MIMXRT1021.ld
@@ -0,0 +1,2 @@
+ram_size = 256K;
+flash_config_location = 0x60000000;
diff --git a/ports/mimxrt10xx/linking/chip_family/MIMXRT1062.ld b/ports/mimxrt10xx/linking/chip_family/MIMXRT1062.ld
new file mode 100644
index 000000000..e07c5c2c3
--- /dev/null
+++ b/ports/mimxrt10xx/linking/chip_family/MIMXRT1062.ld
@@ -0,0 +1,2 @@
+ram_size = 1M;
+flash_config_location = 0x60000000;
diff --git a/ports/mimxrt10xx/linking/common.ld b/ports/mimxrt10xx/linking/common.ld
new file mode 100644
index 000000000..10568bfb8
--- /dev/null
+++ b/ports/mimxrt10xx/linking/common.ld
@@ -0,0 +1,154 @@
+/* Template for iMX RT 10xx linking. This is the last of four linker scripts passed in.
+
+The first three provide variables for this one.
+
+Boards can setup reserved flash with _ld_reserved_flash_size in board.ld. */
+
+ENTRY(Reset_Handler)
+
+code_size = 1M;
+_ld_default_stack_size = 20K;
+
+/* Default reserved flash to nothing. */
+_ld_reserved_flash_size = DEFINED(_ld_reserved_flash_size) ? _ld_reserved_flash_size : 0K ;
+
+MEMORY
+{
+ /* These next two sections are included in place of a bootloader. If a UF2 is used to load, it
+ will ignore these two sections because it lives there. */
+ /* This is the first block and is read so that the bootrom knows the optimal way to interface with the flash chip. */
+ FLASH_CONFIG (rx) : ORIGIN = flash_config_location, LENGTH = 512
+ /* This can't move because the bootrom looks at this address. */
+ FLASH_IVT (rx) : ORIGIN = 0x60001000, LENGTH = 4K
+ /* Place the ISRs 48k in to leave room for the bootloader when it is available. */
+ FLASH_TEXT (rx) : ORIGIN = 0x6000C000, LENGTH = code_size - 48K
+ FLASH_FATFS (r) : ORIGIN = 0x60100000, LENGTH = _ld_flash_size - code_size - _ld_reserved_flash_size
+ /* Teensy uses the last bit of flash for recovery. */
+ RESERVED_FLASH : ORIGIN = 0x60100000 + _ld_flash_size - _ld_reserved_flash_size, LENGTH = _ld_reserved_flash_size
+ OCRAM (rwx) : ORIGIN = 0x20200000, LENGTH = ram_size - 64K
+ DTCM (x) : ORIGIN = 0x20000000, LENGTH = 32K
+ ITCM (x) : ORIGIN = 0x00000000, LENGTH = 32K
+}
+
+__data_start__ = 0;
+__data_end__ = 0;
+_start = 0;
+
+SECTIONS
+{
+ .flash_config :
+ {
+ . = ALIGN(4);
+ KEEP(* (.boot_hdr.conf))
+ . = ALIGN(4);
+ } > FLASH_CONFIG
+
+ .ivt :
+ {
+ . = ALIGN(4);
+ KEEP(* (.boot_hdr.ivt))
+ KEEP(* (.boot_hdr.boot_data))
+ KEEP(* (.boot_hdr.dcd_data))
+ . = ALIGN(4);
+ } > FLASH_IVT
+ image_vector_table = LOADADDR(.ivt);
+
+ .text :
+ {
+ . = ALIGN(4);
+ __VECTOR_TABLE = .;
+ __VECTOR_RAM = .;
+ _ld_isr_table = .;
+
+ KEEP(*(.isr_vector)) /* Startup code */
+ *(EXCLUDE_FILE(
+ *flexspi_nor_flash_ops.o
+ *fsl_flexspi.o
+ ) .text*) /* .text* sections (code) */
+ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
+ . = ALIGN(4);
+ } > FLASH_TEXT
+
+ .ARM.exidx :
+ {
+ *(.ARM.exidx*)
+ *(.gnu.linkonce.armexidx.*)
+ _etext = .; /* define a global symbol at end of code */
+ __etext = .; /* define a global symbol at end of code */
+ } > FLASH_TEXT
+
+ _ld_filesystem_start = ORIGIN(FLASH_FATFS);
+ _ld_filesystem_end = _ld_filesystem_start + LENGTH(FLASH_FATFS);
+
+ .data :
+ {
+ . = ALIGN(4);
+ *(.data*) /* .data* sections */
+ *flexspi_nor_flash_ops.o(.text*)
+ *fsl_flexspi.o(.text*)
+ . = ALIGN(4);
+ } > OCRAM AT> FLASH_TEXT
+ _ld_ocram_data_destination = ADDR(.data);
+ _ld_ocram_data_flash_copy = LOADADDR(.data);
+ _ld_ocram_data_size = SIZEOF(.data);
+
+ /* Uninitialized data section */
+ .bss :
+ {
+ . = ALIGN(4);
+
+ *(.bss*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ } > OCRAM
+ _ld_ocram_bss_start = ADDR(.bss);
+ _ld_ocram_bss_size = SIZEOF(.bss);
+ _ld_heap_start = _ld_ocram_bss_start + _ld_ocram_bss_size;
+ _ld_heap_end = ORIGIN(OCRAM) + LENGTH(OCRAM);
+
+ .itcm :
+ {
+ . = ALIGN(4);
+
+ *(.itcm.*)
+
+ . = ALIGN(4);
+ } > ITCM AT> FLASH_TEXT
+ _ld_itcm_destination = ADDR(.itcm);
+ _ld_itcm_flash_copy = LOADADDR(.itcm);
+ _ld_itcm_size = SIZEOF(.itcm);
+
+ .dtcm_data :
+ {
+ . = ALIGN(4);
+
+ *(.dtcm_data.*)
+
+ . = ALIGN(4);
+ } > DTCM AT> FLASH_TEXT
+ _ld_dtcm_data_destination = ADDR(.dtcm_data);
+ _ld_dtcm_data_flash_copy = LOADADDR(.dtcm_data);
+ _ld_dtcm_data_size = SIZEOF(.dtcm_data);
+
+ .dtcm_bss :
+ {
+ . = ALIGN(4);
+
+ *(.dtcm_bss.*)
+
+ . = ALIGN(4);
+ } > DTCM AT> DTCM
+ _ld_dtcm_bss_start = ADDR(.dtcm_bss);
+ _ld_dtcm_bss_size = SIZEOF(.dtcm_bss);
+
+ .stack :
+ {
+ . = ALIGN(8);
+ _ld_stack_bottom = .;
+ . += _ld_default_stack_size;
+ } > DTCM
+ _ld_stack_top = ORIGIN(DTCM) + LENGTH(DTCM);
+
+ .ARM.attributes 0 : { *(.ARM.attributes) }
+}
diff --git a/ports/mimxrt10xx/linking/flash/AT25SF128A.ld b/ports/mimxrt10xx/linking/flash/AT25SF128A.ld
new file mode 100644
index 000000000..205d9dd83
--- /dev/null
+++ b/ports/mimxrt10xx/linking/flash/AT25SF128A.ld
@@ -0,0 +1 @@
+_ld_flash_size = 16M;
diff --git a/ports/mimxrt10xx/linking/flash/IS25LP064A.ld b/ports/mimxrt10xx/linking/flash/IS25LP064A.ld
new file mode 100644
index 000000000..53d296ec8
--- /dev/null
+++ b/ports/mimxrt10xx/linking/flash/IS25LP064A.ld
@@ -0,0 +1 @@
+_ld_flash_size = 8M;
diff --git a/ports/mimxrt10xx/linking/flash/IS25WP064A.ld b/ports/mimxrt10xx/linking/flash/IS25WP064A.ld
new file mode 100644
index 000000000..53d296ec8
--- /dev/null
+++ b/ports/mimxrt10xx/linking/flash/IS25WP064A.ld
@@ -0,0 +1 @@
+_ld_flash_size = 8M;
diff --git a/ports/mimxrt10xx/linking/flash/W25Q16JV.ld b/ports/mimxrt10xx/linking/flash/W25Q16JV.ld
new file mode 100644
index 000000000..9ce06b44a
--- /dev/null
+++ b/ports/mimxrt10xx/linking/flash/W25Q16JV.ld
@@ -0,0 +1 @@
+_ld_flash_size = 2M;
diff --git a/ports/mimxrt10xx/linking/flash/W25Q64JV.ld b/ports/mimxrt10xx/linking/flash/W25Q64JV.ld
new file mode 100644
index 000000000..53d296ec8
--- /dev/null
+++ b/ports/mimxrt10xx/linking/flash/W25Q64JV.ld
@@ -0,0 +1 @@
+_ld_flash_size = 8M;
diff --git a/ports/mimxrt10xx/mpconfigport.h b/ports/mimxrt10xx/mpconfigport.h
index 47b793fed..745c12f7d 100644
--- a/ports/mimxrt10xx/mpconfigport.h
+++ b/ports/mimxrt10xx/mpconfigport.h
@@ -28,11 +28,17 @@
#ifndef __INCLUDED_MPCONFIGPORT_H
#define __INCLUDED_MPCONFIGPORT_H
+#include <stdint.h>
+
#define MICROPY_PY_SYS_PLATFORM "NXP IMXRT10XX"
#define SPI_FLASH_MAX_BAUDRATE 24000000
+extern uint8_t _ld_filesystem_start;
+extern uint8_t _ld_filesystem_end;
+extern uint8_t _ld_default_stack_size;
+
// 20kiB stack
-#define CIRCUITPY_DEFAULT_STACK_SIZE 0x5000
+#define CIRCUITPY_DEFAULT_STACK_SIZE ((uint32_t) &_ld_default_stack_size)
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
#define MICROPY_PY_FUNCTION_ATTRS (0)
@@ -40,6 +46,10 @@
#define MICROPY_PY_UJSON (1)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
+
+#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR ((uint32_t) &_ld_filesystem_start)
+#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE ((uint32_t) (&_ld_filesystem_end - &_ld_filesystem_start))
+
#include "py/circuitpy_mpconfig.h"
#define MICROPY_PORT_ROOT_POINTERS \
diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk
index f1106e88f..b928ce3bb 100644
--- a/ports/mimxrt10xx/mpconfigport.mk
+++ b/ports/mimxrt10xx/mpconfigport.mk
@@ -1,6 +1,4 @@
-# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk
-# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
-# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
+LD_FILE = $(FLASH).ld $(CHIP_FAMILY).ld imxrt10xx.ld
ifeq ($(LONGINT_IMPL),NONE)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
@@ -16,5 +14,18 @@ endif
INTERNAL_LIBM = 1
+USB_DEVICES = "CDC,MSC,HID"
USB_SERIAL_NUMBER_LENGTH = 32
USB_MSC_MAX_PACKET_SIZE = 512
+
+INTERNAL_FLASH_FILESYSTEM = 1
+
+CIRCUITPY_DISPLAYIO = 0
+CIRCUITPY_AUDIOIO = 0
+CIRCUITPY_AUDIOBUSIO = 0
+CIRCUITPY_FREQUENCYIO = 0
+CIRCUITPY_I2CSLAVE = 0
+CIRCUITPY_NVM = 0
+CIRCUITPY_ROTARYIO = 0
+
+LONGINT_IMPL = MPZ
diff --git a/ports/mimxrt10xx/mphalport.c b/ports/mimxrt10xx/mphalport.c
index b333730b9..06275cd83 100644
--- a/ports/mimxrt10xx/mphalport.c
+++ b/ports/mimxrt10xx/mphalport.c
@@ -49,7 +49,7 @@ void mp_hal_delay_ms(mp_uint_t delay) {
}
void mp_hal_delay_us(mp_uint_t delay) {
-#ifdef MIMXRT1011_SERIES
+#if defined(MIMXRT1011_SERIES) || defined(MIMXRT1021_SERIES)
SDK_DelayAtLeastUs(delay, SystemCoreClock);
#else
SDK_DelayAtLeastUs(delay);
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/clocks.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/clocks.c
index c03991785..854ae4dee 100644
--- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/clocks.c
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/clocks.c
@@ -129,19 +129,6 @@ void clocks_init(void) {
CLOCK_DisableClock(kCLOCK_Pit);
/* Set PERCLK_PODF. */
CLOCK_SetDiv(kCLOCK_PerclkDiv, 1);
- /* In SDK projects, external flash (configured by FLEXSPI) will be initialized by dcd.
- * With this macro XIP_EXTERNAL_FLASH, usb1 pll (selected to be FLEXSPI clock source in SDK projects) will be left
- * unchanged. Note: If another clock source is selected for FLEXSPI, user may want to avoid changing that clock as
- * well.*/
-#if !(defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1))
- /* Disable Flexspi clock gate. */
- CLOCK_DisableClock(kCLOCK_FlexSpi);
- /* Set FLEXSPI_PODF. */
- CLOCK_SetDiv(kCLOCK_FlexspiDiv, 3);
- /* Set Flexspi clock source. */
- CLOCK_SetMux(kCLOCK_FlexspiMux, 0);
- CLOCK_SetMux(kCLOCK_FlexspiSrcMux, 0);
-#endif
/* Disable ADC_ACLK_EN clock gate. */
CCM->CSCMR2 &= ~CCM_CSCMR2_ADC_ACLK_EN_MASK;
/* Set ADC_ACLK_PODF. */
@@ -219,24 +206,6 @@ void clocks_init(void) {
CLOCK_InitSysPfd(kCLOCK_Pfd2, 18);
/* Init System pfd3. */
CLOCK_InitSysPfd(kCLOCK_Pfd3, 18);
- /* In SDK projects, external flash (configured by FLEXSPI) will be initialized by dcd.
- * With this macro XIP_EXTERNAL_FLASH, usb1 pll (selected to be FLEXSPI clock source in SDK projects) will be left
- * unchanged. Note: If another clock source is selected for FLEXSPI, user may want to avoid changing that clock as
- * well.*/
-#if !(defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1))
- /* Init Usb1 PLL. */
- CLOCK_InitUsb1Pll(&usb1PllConfig_BOARD_BootClockRUN);
- /* Init Usb1 pfd0. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd0, 22);
- /* Init Usb1 pfd1. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd1, 16);
- /* Init Usb1 pfd2. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd2, 17);
- /* Init Usb1 pfd3. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd3, 18);
- /* Disable Usb1 PLL output for USBPHY1. */
- CCM_ANALOG->PLL_USB1 &= ~CCM_ANALOG_PLL_USB1_EN_USB_CLKS_MASK;
-#endif
/* DeInit Audio PLL. */
CLOCK_DeinitAudioPll();
/* Bypass Audio PLL. */
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.c
index 0b219468f..8e68e7702 100644
--- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.c
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.c
@@ -41,8 +41,8 @@ const mcu_pin_obj_t pin_GPIO_08 = PIN(GPIO1, 8, GPIO_08, NO_ADC, 0);
const mcu_pin_obj_t pin_GPIO_09 = PIN(GPIO1, 9, GPIO_09, NO_ADC, 0);
const mcu_pin_obj_t pin_GPIO_10 = PIN(GPIO1, 10, GPIO_10, NO_ADC, 0);
const mcu_pin_obj_t pin_GPIO_11 = PIN(GPIO1, 11, GPIO_11, NO_ADC, 0);
-const mcu_pin_obj_t pin_GPIO_12 = PIN(GPIO1, 12, GPIO_11, NO_ADC, 0);
-const mcu_pin_obj_t pin_GPIO_13 = PIN(GPIO1, 13, GPIO_11, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_12 = PIN(GPIO1, 12, GPIO_12, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_13 = PIN(GPIO1, 13, GPIO_13, NO_ADC, 0);
const mcu_pin_obj_t pin_GPIO_AD_00 = PIN(GPIO1, 14, GPIO_AD_00, ADC1, 0);
const mcu_pin_obj_t pin_GPIO_AD_01 = PIN(GPIO1, 15, GPIO_AD_01, ADC1, 1);
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/clocks.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/clocks.c
new file mode 100644
index 000000000..cb9dd34c9
--- /dev/null
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/clocks.c
@@ -0,0 +1,341 @@
+/*
+ * This file is part of the Micro Python project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Artur Pacholec
+ * Copyright (c) 2020 Scott Shawcroft
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+/*
+ * Copyright 2019 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "mpconfigport.h"
+
+#include "fsl_clock.h"
+#include "fsl_iomuxc.h"
+
+// These values are pulled from the SDK's devices/MIMXRT1021/project_template/clock_config.* files.
+
+#define BOARD_XTAL0_CLK_HZ 24000000U /*!< Board xtal0 frequency in Hz */
+#define BOARD_XTAL32K_CLK_HZ 32768U /*!< Board xtal32k frequency in Hz */
+
+#define BOARD_BOOTCLOCKRUN_CORE_CLOCK 500000000U /*!< Core clock frequency: 500000000Hz */
+
+/* Clock outputs (values are in Hz): */
+#define BOARD_BOOTCLOCKRUN_AHB_CLK_ROOT 500000000UL
+#define BOARD_BOOTCLOCKRUN_CAN_CLK_ROOT 40000000UL
+#define BOARD_BOOTCLOCKRUN_CKIL_SYNC_CLK_ROOT 32768UL
+#define BOARD_BOOTCLOCKRUN_CLKO1_CLK 0UL
+#define BOARD_BOOTCLOCKRUN_CLKO2_CLK 0UL
+#define BOARD_BOOTCLOCKRUN_CLK_1M 1000000UL
+#define BOARD_BOOTCLOCKRUN_CLK_24M 24000000UL
+#define BOARD_BOOTCLOCKRUN_ENET1_TX_CLK 0UL
+#define BOARD_BOOTCLOCKRUN_ENET_125M_CLK 0UL
+#define BOARD_BOOTCLOCKRUN_ENET_25M_REF_CLK 0UL
+#define BOARD_BOOTCLOCKRUN_ENET_500M_REF_CLK 500000000UL
+#define BOARD_BOOTCLOCKRUN_FLEXIO1_CLK_ROOT 30000000UL
+#define BOARD_BOOTCLOCKRUN_FLEXSPI_CLK_ROOT 132000000UL
+#define BOARD_BOOTCLOCKRUN_GPT1_IPG_CLK_HIGHFREQ 62500000UL
+#define BOARD_BOOTCLOCKRUN_GPT2_IPG_CLK_HIGHFREQ 62500000UL
+#define BOARD_BOOTCLOCKRUN_IPG_CLK_ROOT 125000000UL
+#define BOARD_BOOTCLOCKRUN_LPI2C_CLK_ROOT 60000000UL
+#define BOARD_BOOTCLOCKRUN_LPSPI_CLK_ROOT 105600000UL
+#define BOARD_BOOTCLOCKRUN_MQS_MCLK 63529411UL
+#define BOARD_BOOTCLOCKRUN_PERCLK_CLK_ROOT 62500000UL
+#define BOARD_BOOTCLOCKRUN_SAI1_CLK_ROOT 63529411UL
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK1 63529411UL
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK2 63529411UL
+#define BOARD_BOOTCLOCKRUN_SAI1_MCLK3 30000000UL
+#define BOARD_BOOTCLOCKRUN_SAI2_CLK_ROOT 63529411UL
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK1 63529411UL
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK2 0UL
+#define BOARD_BOOTCLOCKRUN_SAI2_MCLK3 30000000UL
+#define BOARD_BOOTCLOCKRUN_SAI3_CLK_ROOT 63529411UL
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK1 63529411UL
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK2 0UL
+#define BOARD_BOOTCLOCKRUN_SAI3_MCLK3 30000000UL
+#define BOARD_BOOTCLOCKRUN_SEMC_CLK_ROOT 62500000UL
+#define BOARD_BOOTCLOCKRUN_SPDIF0_CLK_ROOT 30000000UL
+#define BOARD_BOOTCLOCKRUN_SPDIF0_EXTCLK_OUT 0UL
+#define BOARD_BOOTCLOCKRUN_TRACE_CLK_ROOT 117333333UL
+#define BOARD_BOOTCLOCKRUN_UART_CLK_ROOT 80000000UL
+#define BOARD_BOOTCLOCKRUN_USBPHY1_CLK 0UL
+#define BOARD_BOOTCLOCKRUN_USDHC1_CLK_ROOT 176000000UL
+#define BOARD_BOOTCLOCKRUN_USDHC2_CLK_ROOT 176000000UL
+
+const clock_sys_pll_config_t sysPllConfig_BOARD_BootClockRUN = {
+ .loopDivider = 1, /* PLL loop divider, Fout = Fin * ( 20 + loopDivider*2 + numerator / denominator ) */
+ .numerator = 0, /* 30 bit numerator of fractional loop divider */
+ .denominator = 1, /* 30 bit denominator of fractional loop divider */
+ .src = 0, /* Bypass clock source, 0 - OSC 24M, 1 - CLK1_P and CLK1_N */
+};
+const clock_usb_pll_config_t usb1PllConfig_BOARD_BootClockRUN = {
+ .loopDivider = 0, /* PLL loop divider, Fout = Fin * 20 */
+ .src = 0, /* Bypass clock source, 0 - OSC 24M, 1 - CLK1_P and CLK1_N */
+};
+const clock_enet_pll_config_t enetPllConfig_BOARD_BootClockRUN = {
+ .enableClkOutput = false, /* Disable the PLL providing the ENET 125MHz reference clock */
+ .enableClkOutput500M = true, /* Enable the PLL providing the ENET 500MHz reference clock */
+ .enableClkOutput25M = false, /* Disable the PLL providing the ENET 25MHz reference clock */
+ .loopDivider = 1, /* Set frequency of ethernet reference clock to 50 MHz */
+ .src = 0, /* Bypass clock source, 0 - OSC 24M, 1 - CLK1_P and CLK1_N */
+};
+
+// Based on the hello_world example in the SDK
+void clocks_init(void) {
+ /* Init RTC OSC clock frequency. */
+ CLOCK_SetRtcXtalFreq(32768U);
+ /* Enable 1MHz clock output. */
+ XTALOSC24M->OSC_CONFIG2 |= XTALOSC24M_OSC_CONFIG2_ENABLE_1M_MASK;
+ /* Use free 1MHz clock output. */
+ XTALOSC24M->OSC_CONFIG2 &= ~XTALOSC24M_OSC_CONFIG2_MUX_1M_MASK;
+ /* Set XTAL 24MHz clock frequency. */
+ CLOCK_SetXtalFreq(24000000U);
+ /* Enable XTAL 24MHz clock source. */
+ CLOCK_InitExternalClk(0);
+ /* Enable internal RC. */
+ CLOCK_InitRcOsc24M();
+ /* Switch clock source to external OSC. */
+ CLOCK_SwitchOsc(kCLOCK_XtalOsc);
+ /* Set Oscillator ready counter value. */
+ CCM->CCR = (CCM->CCR & (~CCM_CCR_OSCNT_MASK)) | CCM_CCR_OSCNT(127);
+ /* Setting PeriphClk2Mux and PeriphMux to provide stable clock before PLLs are initialed */
+ CLOCK_SetMux(kCLOCK_PeriphClk2Mux, 1); /* Set PERIPH_CLK2 MUX to OSC */
+ CLOCK_SetMux(kCLOCK_PeriphMux, 1); /* Set PERIPH_CLK MUX to PERIPH_CLK2 */
+ /* Setting the VDD_SOC to 1.5V. It is necessary to config AHB to 500Mhz. */
+ DCDC->REG3 = (DCDC->REG3 & (~DCDC_REG3_TRG_MASK)) | DCDC_REG3_TRG(0x12);
+ /* Waiting for DCDC_STS_DC_OK bit is asserted */
+ while (DCDC_REG0_STS_DC_OK_MASK != (DCDC_REG0_STS_DC_OK_MASK & DCDC->REG0))
+ {
+ }
+ /* Set AHB_PODF. */
+ CLOCK_SetDiv(kCLOCK_AhbDiv, 0);
+ /* Disable IPG clock gate. */
+ CLOCK_DisableClock(kCLOCK_Adc1);
+ CLOCK_DisableClock(kCLOCK_Adc2);
+ CLOCK_DisableClock(kCLOCK_Xbar1);
+ CLOCK_DisableClock(kCLOCK_Xbar2);
+ /* Set IPG_PODF. */
+ CLOCK_SetDiv(kCLOCK_IpgDiv, 3);
+ /* Set ARM_PODF. */
+ CLOCK_SetDiv(kCLOCK_ArmDiv, 0);
+ /* Set PERIPH_CLK2_PODF. */
+ CLOCK_SetDiv(kCLOCK_PeriphClk2Div, 0);
+ /* Disable PERCLK clock gate. */
+ CLOCK_DisableClock(kCLOCK_Gpt1);
+ CLOCK_DisableClock(kCLOCK_Gpt1S);
+ CLOCK_DisableClock(kCLOCK_Gpt2);
+ CLOCK_DisableClock(kCLOCK_Gpt2S);
+ CLOCK_DisableClock(kCLOCK_Pit);
+ /* Set PERCLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_PerclkDiv, 1);
+ /* Disable USDHC1 clock gate. */
+ CLOCK_DisableClock(kCLOCK_Usdhc1);
+ /* Set USDHC1_PODF. */
+ CLOCK_SetDiv(kCLOCK_Usdhc1Div, 2);
+ /* Set Usdhc1 clock source. */
+ CLOCK_SetMux(kCLOCK_Usdhc1Mux, 0);
+ /* Disable USDHC2 clock gate. */
+ CLOCK_DisableClock(kCLOCK_Usdhc2);
+ /* Set USDHC2_PODF. */
+ CLOCK_SetDiv(kCLOCK_Usdhc2Div, 2);
+ /* Set Usdhc2 clock source. */
+ CLOCK_SetMux(kCLOCK_Usdhc2Mux, 0);
+ /* In SDK projects, SDRAM (configured by SEMC) will be initialized in either debug script or dcd.
+ * With this macro SKIP_SYSCLK_INIT, system pll (selected to be SEMC source clock in SDK projects) will be left
+ * unchanged. Note: If another clock source is selected for SEMC, user may want to avoid changing that clock as
+ * well.*/
+#ifndef SKIP_SYSCLK_INIT
+ /* Disable Semc clock gate. */
+ CLOCK_DisableClock(kCLOCK_Semc);
+ /* Set SEMC_PODF. */
+ CLOCK_SetDiv(kCLOCK_SemcDiv, 7);
+ /* Set Semc alt clock source. */
+ CLOCK_SetMux(kCLOCK_SemcAltMux, 0);
+ /* Set Semc clock source. */
+ CLOCK_SetMux(kCLOCK_SemcMux, 0);
+#endif
+ /* Disable LPSPI clock gate. */
+ CLOCK_DisableClock(kCLOCK_Lpspi1);
+ CLOCK_DisableClock(kCLOCK_Lpspi2);
+ CLOCK_DisableClock(kCLOCK_Lpspi3);
+ CLOCK_DisableClock(kCLOCK_Lpspi4);
+ /* Set LPSPI_PODF. */
+ CLOCK_SetDiv(kCLOCK_LpspiDiv, 4);
+ /* Set Lpspi clock source. */
+ CLOCK_SetMux(kCLOCK_LpspiMux, 2);
+ /* Disable TRACE clock gate. */
+ CLOCK_DisableClock(kCLOCK_Trace);
+ /* Set TRACE_PODF. */
+ CLOCK_SetDiv(kCLOCK_TraceDiv, 2);
+ /* Set Trace clock source. */
+ CLOCK_SetMux(kCLOCK_TraceMux, 2);
+ /* Disable SAI1 clock gate. */
+ CLOCK_DisableClock(kCLOCK_Sai1);
+ /* Set SAI1_CLK_PRED. */
+ CLOCK_SetDiv(kCLOCK_Sai1PreDiv, 3);
+ /* Set SAI1_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_Sai1Div, 1);
+ /* Set Sai1 clock source. */
+ CLOCK_SetMux(kCLOCK_Sai1Mux, 0);
+ /* Disable SAI2 clock gate. */
+ CLOCK_DisableClock(kCLOCK_Sai2);
+ /* Set SAI2_CLK_PRED. */
+ CLOCK_SetDiv(kCLOCK_Sai2PreDiv, 3);
+ /* Set SAI2_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_Sai2Div, 1);
+ /* Set Sai2 clock source. */
+ CLOCK_SetMux(kCLOCK_Sai2Mux, 0);
+ /* Disable SAI3 clock gate. */
+ CLOCK_DisableClock(kCLOCK_Sai3);
+ /* Set SAI3_CLK_PRED. */
+ CLOCK_SetDiv(kCLOCK_Sai3PreDiv, 3);
+ /* Set SAI3_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_Sai3Div, 1);
+ /* Set Sai3 clock source. */
+ CLOCK_SetMux(kCLOCK_Sai3Mux, 0);
+ /* Disable Lpi2c clock gate. */
+ CLOCK_DisableClock(kCLOCK_Lpi2c1);
+ CLOCK_DisableClock(kCLOCK_Lpi2c2);
+ CLOCK_DisableClock(kCLOCK_Lpi2c3);
+ /* Set LPI2C_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_Lpi2cDiv, 0);
+ /* Set Lpi2c clock source. */
+ CLOCK_SetMux(kCLOCK_Lpi2cMux, 0);
+ /* Disable CAN clock gate. */
+ CLOCK_DisableClock(kCLOCK_Can1);
+ CLOCK_DisableClock(kCLOCK_Can2);
+ CLOCK_DisableClock(kCLOCK_Can1S);
+ CLOCK_DisableClock(kCLOCK_Can2S);
+ /* Set CAN_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_CanDiv, 1);
+ /* Set Can clock source. */
+ CLOCK_SetMux(kCLOCK_CanMux, 2);
+ /* Disable UART clock gate. */
+ CLOCK_DisableClock(kCLOCK_Lpuart1);
+ CLOCK_DisableClock(kCLOCK_Lpuart2);
+ CLOCK_DisableClock(kCLOCK_Lpuart3);
+ CLOCK_DisableClock(kCLOCK_Lpuart4);
+ CLOCK_DisableClock(kCLOCK_Lpuart5);
+ CLOCK_DisableClock(kCLOCK_Lpuart6);
+ CLOCK_DisableClock(kCLOCK_Lpuart7);
+ CLOCK_DisableClock(kCLOCK_Lpuart8);
+ /* Set UART_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_UartDiv, 0);
+ /* Set Uart clock source. */
+ CLOCK_SetMux(kCLOCK_UartMux, 0);
+ /* Disable SPDIF clock gate. */
+ CLOCK_DisableClock(kCLOCK_Spdif);
+ /* Set SPDIF0_CLK_PRED. */
+ CLOCK_SetDiv(kCLOCK_Spdif0PreDiv, 1);
+ /* Set SPDIF0_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_Spdif0Div, 7);
+ /* Set Spdif clock source. */
+ CLOCK_SetMux(kCLOCK_SpdifMux, 3);
+ /* Disable Flexio1 clock gate. */
+ CLOCK_DisableClock(kCLOCK_Flexio1);
+ /* Set FLEXIO1_CLK_PRED. */
+ CLOCK_SetDiv(kCLOCK_Flexio1PreDiv, 1);
+ /* Set FLEXIO1_CLK_PODF. */
+ CLOCK_SetDiv(kCLOCK_Flexio1Div, 7);
+ /* Set Flexio1 clock source. */
+ CLOCK_SetMux(kCLOCK_Flexio1Mux, 3);
+ /* Set Pll3 sw clock source. */
+ CLOCK_SetMux(kCLOCK_Pll3SwMux, 0);
+ /* In SDK projects, SDRAM (configured by SEMC) will be initialized in either debug script or dcd.
+ * With this macro SKIP_SYSCLK_INIT, system pll (selected to be SEMC source clock in SDK projects) will be left
+ * unchanged. Note: If another clock source is selected for SEMC, user may want to avoid changing that clock as
+ * well.*/
+#ifndef SKIP_SYSCLK_INIT
+#if defined(XIP_BOOT_HEADER_DCD_ENABLE) && (XIP_BOOT_HEADER_DCD_ENABLE == 1)
+ #warning "SKIP_SYSCLK_INIT should be defined to keep system pll (selected to be SEMC source clock in SDK projects) unchanged."
+#endif
+ /* Init System PLL. */
+ CLOCK_InitSysPll(&sysPllConfig_BOARD_BootClockRUN);
+ /* Init System pfd0. */
+ CLOCK_InitSysPfd(kCLOCK_Pfd0, 27);
+ /* Init System pfd1. */
+ CLOCK_InitSysPfd(kCLOCK_Pfd1, 16);
+ /* Init System pfd2. */
+ CLOCK_InitSysPfd(kCLOCK_Pfd2, 18);
+ /* Init System pfd3. */
+ CLOCK_InitSysPfd(kCLOCK_Pfd3, 18);
+#endif
+ /* DeInit Audio PLL. */
+ CLOCK_DeinitAudioPll();
+ /* Bypass Audio PLL. */
+ CLOCK_SetPllBypass(CCM_ANALOG, kCLOCK_PllAudio, 1);
+ /* Set divider for Audio PLL. */
+ CCM_ANALOG->MISC2 &= ~CCM_ANALOG_MISC2_AUDIO_DIV_LSB_MASK;
+ CCM_ANALOG->MISC2 &= ~CCM_ANALOG_MISC2_AUDIO_DIV_MSB_MASK;
+ /* Enable Audio PLL output. */
+ CCM_ANALOG->PLL_AUDIO |= CCM_ANALOG_PLL_AUDIO_ENABLE_MASK;
+ /* Init Enet PLL. */
+ CLOCK_InitEnetPll(&enetPllConfig_BOARD_BootClockRUN);
+ /* Set preperiph clock source. */
+ CLOCK_SetMux(kCLOCK_PrePeriphMux, 3);
+ /* Set periph clock source. */
+ CLOCK_SetMux(kCLOCK_PeriphMux, 0);
+ /* Set periph clock2 clock source. */
+ CLOCK_SetMux(kCLOCK_PeriphClk2Mux, 0);
+ /* Set per clock source. */
+ CLOCK_SetMux(kCLOCK_PerclkMux, 0);
+ /* Set clock out1 divider. */
+ CCM->CCOSR = (CCM->CCOSR & (~CCM_CCOSR_CLKO1_DIV_MASK)) | CCM_CCOSR_CLKO1_DIV(0);
+ /* Set clock out1 source. */
+ CCM->CCOSR = (CCM->CCOSR & (~CCM_CCOSR_CLKO1_SEL_MASK)) | CCM_CCOSR_CLKO1_SEL(1);
+ /* Set clock out2 divider. */
+ CCM->CCOSR = (CCM->CCOSR & (~CCM_CCOSR_CLKO2_DIV_MASK)) | CCM_CCOSR_CLKO2_DIV(0);
+ /* Set clock out2 source. */
+ CCM->CCOSR = (CCM->CCOSR & (~CCM_CCOSR_CLKO2_SEL_MASK)) | CCM_CCOSR_CLKO2_SEL(3);
+ /* Set clock out1 drives clock out1. */
+ CCM->CCOSR &= ~CCM_CCOSR_CLK_OUT_SEL_MASK;
+ /* Disable clock out1. */
+ CCM->CCOSR &= ~CCM_CCOSR_CLKO1_EN_MASK;
+ /* Disable clock out2. */
+ CCM->CCOSR &= ~CCM_CCOSR_CLKO2_EN_MASK;
+ /* Set SAI1 MCLK1 clock source. */
+ IOMUXC_SetSaiMClkClockSource(IOMUXC_GPR, kIOMUXC_GPR_SAI1MClk1Sel, 0);
+ /* Set SAI1 MCLK2 clock source. */
+ IOMUXC_SetSaiMClkClockSource(IOMUXC_GPR, kIOMUXC_GPR_SAI1MClk2Sel, 0);
+ /* Set SAI1 MCLK3 clock source. */
+ IOMUXC_SetSaiMClkClockSource(IOMUXC_GPR, kIOMUXC_GPR_SAI1MClk3Sel, 0);
+ /* Set SAI2 MCLK3 clock source. */
+ IOMUXC_SetSaiMClkClockSource(IOMUXC_GPR, kIOMUXC_GPR_SAI2MClk3Sel, 0);
+ /* Set SAI3 MCLK3 clock source. */
+ IOMUXC_SetSaiMClkClockSource(IOMUXC_GPR, kIOMUXC_GPR_SAI3MClk3Sel, 0);
+ /* Set MQS configuration. */
+ IOMUXC_MQSConfig(IOMUXC_GPR, kIOMUXC_MqsPwmOverSampleRate32, 0);
+ /* Set ENET Tx clock source. */
+ IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1RefClkMode, false);
+ /* Set GPT1 High frequency reference clock source. */
+ IOMUXC_GPR->GPR5 &= ~IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT1_MASK;
+ /* Set GPT2 High frequency reference clock source. */
+ IOMUXC_GPR->GPR5 &= ~IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT2_MASK;
+ /* Set SystemCoreClock variable. */
+ SystemCoreClock = BOARD_BOOTCLOCKRUN_CORE_CLOCK;
+
+ CLOCK_EnableClock(kCLOCK_Iomuxc);
+}
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c
new file mode 100644
index 000000000..39e4f0131
--- /dev/null
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c
@@ -0,0 +1,218 @@
+ /*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Lucian Copeland for Adafruit Industries
+ * Copyright (c) 2019 Artur Pacholec
+ * Copyright (c) 2020 Scott Shawcroft
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "py/obj.h"
+#include "py/mphal.h"
+#include "mimxrt10xx/periph.h"
+
+LPI2C_Type *mcu_i2c_banks[] = { LPI2C1, LPI2C2, LPI2C3, LPI2C4 };
+
+const mcu_periph_obj_t mcu_i2c_sda_list[8] = {
+ PERIPH_PIN(1, 0, kIOMUXC_LPI2C1_SDA_SELECT_INPUT, 0, &pin_GPIO_AD_B1_15),
+ PERIPH_PIN(1, 6, kIOMUXC_LPI2C1_SDA_SELECT_INPUT, 1, &pin_GPIO_EMC_03),
+
+ PERIPH_PIN(2, 0, kIOMUXC_LPI2C2_SDA_SELECT_INPUT, 0, &pin_GPIO_AD_B1_09),
+ PERIPH_PIN(2, 2, kIOMUXC_LPI2C2_SDA_SELECT_INPUT, 1, &pin_GPIO_EMC_18),
+
+ PERIPH_PIN(3, 1, kIOMUXC_LPI2C3_SDA_SELECT_INPUT, 0, &pin_GPIO_AD_B0_09),
+ PERIPH_PIN(3, 4, kIOMUXC_LPI2C3_SDA_SELECT_INPUT, 1, &pin_GPIO_SD_B0_01),
+
+ PERIPH_PIN(4, 2, kIOMUXC_LPI2C4_SDA_SELECT_INPUT, 0, &pin_GPIO_EMC_10),
+ PERIPH_PIN(4, 3, kIOMUXC_LPI2C4_SDA_SELECT_INPUT, 1, &pin_GPIO_SD_B1_03),
+};
+
+const mcu_periph_obj_t mcu_i2c_scl_list[8] = {
+ PERIPH_PIN(1, 0, kIOMUXC_LPI2C1_SCL_SELECT_INPUT, 0, &pin_GPIO_AD_B1_14),
+ PERIPH_PIN(1, 6, kIOMUXC_LPI2C1_SCL_SELECT_INPUT, 1, &pin_GPIO_EMC_02),
+
+ PERIPH_PIN(2, 0, kIOMUXC_LPI2C2_SCL_SELECT_INPUT, 0, &pin_GPIO_AD_B1_08),
+ PERIPH_PIN(2, 2, kIOMUXC_LPI2C2_SCL_SELECT_INPUT, 1, &pin_GPIO_EMC_19),
+
+ PERIPH_PIN(3, 1, kIOMUXC_LPI2C3_SCL_SELECT_INPUT, 0, &pin_GPIO_AD_B0_08),
+ PERIPH_PIN(3, 4, kIOMUXC_LPI2C3_SCL_SELECT_INPUT, 1, &pin_GPIO_SD_B0_00),
+
+ PERIPH_PIN(4, 2, kIOMUXC_LPI2C4_SCL_SELECT_INPUT, 0, &pin_GPIO_EMC_11),
+ PERIPH_PIN(4, 3, kIOMUXC_LPI2C4_SCL_SELECT_INPUT, 1, &pin_GPIO_SD_B1_02),
+};
+
+LPSPI_Type *mcu_spi_banks[] = { LPSPI1, LPSPI2, LPSPI3, LPSPI4 };
+
+const mcu_periph_obj_t mcu_spi_sck_list[8] = {
+ PERIPH_PIN(1, 1, kIOMUXC_LPSPI1_SCK_SELECT_INPUT, 0, &pin_GPIO_AD_B0_10),
+ PERIPH_PIN(1, 4, kIOMUXC_LPSPI1_SCK_SELECT_INPUT, 1, &pin_GPIO_SD_B0_02),
+
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SCK_SELECT_INPUT, 0, &pin_GPIO_EMC_00),
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SCK_SELECT_INPUT, 1, &pin_GPIO_EMC_10),
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SCK_SELECT_INPUT, 2, &pin_GPIO_SD_B1_07),
+
+ PERIPH_PIN(3, 2, kIOMUXC_LPSPI2_SCK_SELECT_INPUT, 0, &pin_GPIO_AD_B1_12),
+
+ PERIPH_PIN(4, 2, kIOMUXC_LPSPI2_SCK_SELECT_INPUT, 0, &pin_GPIO_AD_B1_02),
+ PERIPH_PIN(4, 4, kIOMUXC_LPSPI2_SCK_SELECT_INPUT, 1, &pin_GPIO_EMC_32),
+};
+
+const mcu_periph_obj_t mcu_spi_mosi_list[8] = {
+ PERIPH_PIN(1, 1, kIOMUXC_LPSPI1_SDO_SELECT_INPUT, 0, &pin_GPIO_AD_B0_13),
+ PERIPH_PIN(1, 4, kIOMUXC_LPSPI1_SDO_SELECT_INPUT, 1, &pin_GPIO_SD_B0_05),
+
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SDO_SELECT_INPUT, 0, &pin_GPIO_EMC_03),
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SDO_SELECT_INPUT, 1, &pin_GPIO_EMC_13),
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SDO_SELECT_INPUT, 2, &pin_GPIO_SD_B1_09),
+
+ PERIPH_PIN(3, 2, kIOMUXC_LPSPI2_SDO_SELECT_INPUT, 0, &pin_GPIO_AD_B1_15),
+
+ PERIPH_PIN(4, 2, kIOMUXC_LPSPI2_SDO_SELECT_INPUT, 0, &pin_GPIO_AD_B1_05),
+ PERIPH_PIN(4, 4, kIOMUXC_LPSPI2_SDO_SELECT_INPUT, 1, &pin_GPIO_EMC_35),
+};
+
+const mcu_periph_obj_t mcu_spi_miso_list[8] = {
+ PERIPH_PIN(1, 1, kIOMUXC_LPSPI1_SDI_SELECT_INPUT, 0, &pin_GPIO_AD_B0_12),
+ PERIPH_PIN(1, 4, kIOMUXC_LPSPI1_SDI_SELECT_INPUT, 1, &pin_GPIO_SD_B0_04),
+
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 0, &pin_GPIO_EMC_02),
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 1, &pin_GPIO_EMC_12),
+ PERIPH_PIN(2, 4, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 2, &pin_GPIO_SD_B1_08),
+
+ PERIPH_PIN(3, 2, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 0, &pin_GPIO_AD_B1_14),
+
+ PERIPH_PIN(4, 2, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 0, &pin_GPIO_AD_B1_04),
+ PERIPH_PIN(4, 4, kIOMUXC_LPSPI2_SDI_SELECT_INPUT, 1, &pin_GPIO_EMC_34),
+};
+
+LPUART_Type *mcu_uart_banks[] = { LPUART1, LPUART2, LPUART3, LPUART4, LPUART5, LPUART6, LPUART7, LPUART8 };
+
+const mcu_periph_obj_t mcu_uart_rx_list[16] = {
+ PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_07),
+
+ PERIPH_PIN(2, 2, kIOMUXC_LPUART2_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_23),
+ PERIPH_PIN(2, 2, kIOMUXC_LPUART2_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B1_09),
+
+ PERIPH_PIN(3, 2, kIOMUXC_LPUART3_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_07),
+ PERIPH_PIN(3, 2, kIOMUXC_LPUART3_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_15),
+
+ PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_03),
+ PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 1, &pin_GPIO_EMC_33),
+ PERIPH_PIN(4, 2, kIOMUXC_LPUART4_RX_SELECT_INPUT, 2, &pin_GPIO_AD_B1_11),
+
+ PERIPH_PIN(5, 2, kIOMUXC_LPUART5_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_39),
+ PERIPH_PIN(5, 2, kIOMUXC_LPUART5_RX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_11),
+
+ PERIPH_PIN(6, 2, kIOMUXC_LPUART6_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_13),
+ PERIPH_PIN(6, 2, kIOMUXC_LPUART6_RX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_01),
+
+ PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_35),
+ PERIPH_PIN(7, 2, kIOMUXC_LPUART7_RX_SELECT_INPUT, 1, &pin_GPIO_SD_B0_05),
+
+ PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 0, &pin_GPIO_EMC_27),
+ PERIPH_PIN(8, 2, kIOMUXC_LPUART8_RX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_03),
+};
+
+const mcu_periph_obj_t mcu_uart_tx_list[16] = {
+ PERIPH_PIN(1, 2, 0, 0, &pin_GPIO_AD_B0_06),
+
+ PERIPH_PIN(2, 2, kIOMUXC_LPUART2_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_22),
+ PERIPH_PIN(2, 2, kIOMUXC_LPUART2_TX_SELECT_INPUT, 1, &pin_GPIO_AD_B1_08),
+
+ PERIPH_PIN(3, 2, kIOMUXC_LPUART3_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_06),
+ PERIPH_PIN(3, 2, kIOMUXC_LPUART3_TX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_14),
+
+ PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_02),
+ PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 1, &pin_GPIO_EMC_32),
+ PERIPH_PIN(4, 2, kIOMUXC_LPUART4_TX_SELECT_INPUT, 2, &pin_GPIO_AD_B1_10),
+
+ PERIPH_PIN(5, 2, kIOMUXC_LPUART5_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_38),
+ PERIPH_PIN(5, 2, kIOMUXC_LPUART5_TX_SELECT_INPUT, 1, &pin_GPIO_AD_B0_10),
+
+ PERIPH_PIN(6, 2, kIOMUXC_LPUART6_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_12),
+ PERIPH_PIN(6, 2, kIOMUXC_LPUART6_TX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_00),
+
+ PERIPH_PIN(7, 2, kIOMUXC_LPUART7_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_34),
+ PERIPH_PIN(7, 2, kIOMUXC_LPUART7_TX_SELECT_INPUT, 1, &pin_GPIO_SD_B0_04),
+
+ PERIPH_PIN(8, 2, kIOMUXC_LPUART8_TX_SELECT_INPUT, 0, &pin_GPIO_EMC_26),
+ PERIPH_PIN(8, 2, kIOMUXC_LPUART8_TX_SELECT_INPUT, 1, &pin_GPIO_SD_B1_02),
+};
+
+const mcu_pwm_obj_t mcu_pwm_list[39] = {
+ PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_26),
+ PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_AD_B1_06),
+
+ PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_24),
+ PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_AD_B1_08),
+
+ PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_22),
+ PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_AD_B1_10),
+
+ PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_20),
+ PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmA, 6, &pin_GPIO_AD_B1_12),
+
+ PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_27),
+ PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_AD_B1_07),
+
+ PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_25),
+ PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_AD_B1_09),
+
+ PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_23),
+ PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_AD_B1_11),
+
+ PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_21),
+ PWM_PIN(PWM1, kPWM_Module_3, kPWM_PwmB, 6, &pin_GPIO_AD_B1_13),
+
+ PWM_PIN(PWM1, kPWM_Module_0, kPWM_PwmX, 7, &pin_GPIO_EMC_28),
+ PWM_PIN(PWM1, kPWM_Module_1, kPWM_PwmX, 7, &pin_GPIO_EMC_29),
+ PWM_PIN(PWM1, kPWM_Module_2, kPWM_PwmX, 7, &pin_GPIO_EMC_30),
+
+ PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 1, &pin_GPIO_EMC_38),
+ PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmA, 4, &pin_GPIO_AD_B0_14),
+
+ PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 1, &pin_GPIO_EMC_36),
+ PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmA, 4, &pin_GPIO_AD_B0_12),
+
+ PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 1, &pin_GPIO_EMC_30),
+ PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmA, 4, &pin_GPIO_AD_B0_10),
+
+ PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 1, &pin_GPIO_EMC_28),
+ PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmA, 4, &pin_GPIO_AD_B0_06),
+
+ PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 1, &pin_GPIO_EMC_39),
+ PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmB, 4, &pin_GPIO_AD_B0_15),
+
+ PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 1, &pin_GPIO_EMC_37),
+ PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmB, 4, &pin_GPIO_AD_B0_13),
+
+ PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 1, &pin_GPIO_EMC_31),
+ PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmB, 4, &pin_GPIO_AD_B0_11),
+
+ PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 1, &pin_GPIO_EMC_29),
+ PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmB, 4, &pin_GPIO_AD_B0_07),
+
+ PWM_PIN(PWM2, kPWM_Module_0, kPWM_PwmX, 6, &pin_GPIO_EMC_10),
+ PWM_PIN(PWM2, kPWM_Module_1, kPWM_PwmX, 6, &pin_GPIO_EMC_11),
+ PWM_PIN(PWM2, kPWM_Module_2, kPWM_PwmX, 6, &pin_GPIO_EMC_12),
+ PWM_PIN(PWM2, kPWM_Module_3, kPWM_PwmX, 6, &pin_GPIO_EMC_13),
+};
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h
new file mode 100644
index 000000000..1d720f633
--- /dev/null
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Artur Pacholec
+ * Copyright (c) 2020 Scott Shawcroft
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PERIPH_H
+#define MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PERIPH_H
+
+extern const mcu_periph_obj_t mcu_i2c_sda_list[8];
+extern const mcu_periph_obj_t mcu_i2c_scl_list[8];
+
+extern const mcu_periph_obj_t mcu_spi_sck_list[8];
+extern const mcu_periph_obj_t mcu_spi_mosi_list[8];
+extern const mcu_periph_obj_t mcu_spi_miso_list[8];
+
+extern const mcu_periph_obj_t mcu_uart_rx_list[16];
+extern const mcu_periph_obj_t mcu_uart_tx_list[16];
+
+extern const mcu_pwm_obj_t mcu_pwm_list[39];
+
+#endif // MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PERIP_H
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.c
new file mode 100644
index 000000000..4106c9bad
--- /dev/null
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.c
@@ -0,0 +1,128 @@
+ /*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Lucian Copeland for Adafruit Industries
+ * Copyright (c) 2019 Artur Pacholec
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "py/obj.h"
+#include "py/mphal.h"
+#include "mimxrt10xx/pins.h"
+
+const mcu_pin_obj_t pin_GPIO_AD_B0_00 = PIN(GPIO1, 0, GPIO_AD_B0_00, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_01 = PIN(GPIO1, 1, GPIO_AD_B0_01, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_02 = PIN(GPIO1, 2, GPIO_AD_B0_02, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_03 = PIN(GPIO1, 3, GPIO_AD_B0_03, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_04 = PIN(GPIO1, 4, GPIO_AD_B0_04, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_05 = PIN(GPIO1, 5, GPIO_AD_B0_05, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_06 = PIN(GPIO1, 6, GPIO_AD_B0_06, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_07 = PIN(GPIO1, 7, GPIO_AD_B0_07, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_08 = PIN(GPIO1, 8, GPIO_AD_B0_08, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_09 = PIN(GPIO1, 9, GPIO_AD_B0_09, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_10 = PIN(GPIO1, 10, GPIO_AD_B0_10, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_11 = PIN(GPIO1, 11, GPIO_AD_B0_11, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_12 = PIN(GPIO1, 12, GPIO_AD_B0_12, ADC1, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_13 = PIN(GPIO1, 13, GPIO_AD_B0_13, ADC2, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B0_14 = PIN(GPIO1, 14, GPIO_AD_B0_14, ADC2, 1);
+const mcu_pin_obj_t pin_GPIO_AD_B0_15 = PIN(GPIO1, 15, GPIO_AD_B0_15, ADC1, 2);
+
+const mcu_pin_obj_t pin_GPIO_AD_B1_00 = PIN(GPIO1, 16, GPIO_AD_B1_00, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_AD_B1_01 = PIN(GPIO1, 17, GPIO_AD_B1_01, ADC1, 3);
+const mcu_pin_obj_t pin_GPIO_AD_B1_02 = PIN(GPIO1, 18, GPIO_AD_B1_02, ADC2, 3);
+const mcu_pin_obj_t pin_GPIO_AD_B1_03 = PIN(GPIO1, 19, GPIO_AD_B1_03, ADC1, 4);
+const mcu_pin_obj_t pin_GPIO_AD_B1_04 = PIN(GPIO1, 20, GPIO_AD_B1_04, ADC2, 4);
+const mcu_pin_obj_t pin_GPIO_AD_B1_05 = PIN(GPIO1, 21, GPIO_AD_B1_05, ADC2, 5);
+const mcu_pin_obj_t pin_GPIO_AD_B1_06 = PIN(GPIO1, 22, GPIO_AD_B1_06, ADC2, 6);
+const mcu_pin_obj_t pin_GPIO_AD_B1_07 = PIN(GPIO1, 23, GPIO_AD_B1_07, ADC2, 7);
+const mcu_pin_obj_t pin_GPIO_AD_B1_08 = PIN(GPIO1, 24, GPIO_AD_B1_08, ADC2, 8);
+const mcu_pin_obj_t pin_GPIO_AD_B1_09 = PIN(GPIO1, 25, GPIO_AD_B1_09, ADC2, 9);
+const mcu_pin_obj_t pin_GPIO_AD_B1_10 = PIN(GPIO1, 26, GPIO_AD_B1_10, ADC2, 10);
+const mcu_pin_obj_t pin_GPIO_AD_B1_11 = PIN(GPIO1, 27, GPIO_AD_B1_11, ADC2, 11);
+const mcu_pin_obj_t pin_GPIO_AD_B1_12 = PIN(GPIO1, 28, GPIO_AD_B1_12, ADC2, 12);
+const mcu_pin_obj_t pin_GPIO_AD_B1_13 = PIN(GPIO1, 29, GPIO_AD_B1_13, ADC2, 13);
+const mcu_pin_obj_t pin_GPIO_AD_B1_14 = PIN(GPIO1, 30, GPIO_AD_B1_14, ADC2, 14);
+const mcu_pin_obj_t pin_GPIO_AD_B1_15 = PIN(GPIO1, 31, GPIO_AD_B1_15, ADC2, 15);
+
+const mcu_pin_obj_t pin_GPIO_EMC_00 = PIN(GPIO2, 0, GPIO_EMC_00, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_01 = PIN(GPIO2, 1, GPIO_EMC_01, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_02 = PIN(GPIO2, 2, GPIO_EMC_02, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_03 = PIN(GPIO2, 3, GPIO_EMC_03, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_04 = PIN(GPIO2, 4, GPIO_EMC_04, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_05 = PIN(GPIO2, 5, GPIO_EMC_05, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_06 = PIN(GPIO2, 6, GPIO_EMC_06, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_07 = PIN(GPIO2, 7, GPIO_EMC_07, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_08 = PIN(GPIO2, 8, GPIO_EMC_08, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_09 = PIN(GPIO2, 9, GPIO_EMC_09, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_10 = PIN(GPIO2, 10, GPIO_EMC_10, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_11 = PIN(GPIO2, 11, GPIO_EMC_11, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_12 = PIN(GPIO2, 12, GPIO_EMC_12, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_13 = PIN(GPIO2, 13, GPIO_EMC_13, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_14 = PIN(GPIO2, 14, GPIO_EMC_14, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_15 = PIN(GPIO2, 15, GPIO_EMC_15, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_16 = PIN(GPIO2, 16, GPIO_EMC_16, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_17 = PIN(GPIO2, 17, GPIO_EMC_17, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_18 = PIN(GPIO2, 18, GPIO_EMC_18, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_19 = PIN(GPIO2, 19, GPIO_EMC_19, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_20 = PIN(GPIO2, 20, GPIO_EMC_20, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_21 = PIN(GPIO2, 21, GPIO_EMC_21, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_22 = PIN(GPIO2, 22, GPIO_EMC_22, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_23 = PIN(GPIO2, 23, GPIO_EMC_23, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_24 = PIN(GPIO2, 24, GPIO_EMC_24, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_25 = PIN(GPIO2, 25, GPIO_EMC_25, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_26 = PIN(GPIO2, 26, GPIO_EMC_26, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_27 = PIN(GPIO2, 27, GPIO_EMC_27, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_28 = PIN(GPIO2, 28, GPIO_EMC_28, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_29 = PIN(GPIO2, 29, GPIO_EMC_29, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_30 = PIN(GPIO2, 30, GPIO_EMC_30, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_31 = PIN(GPIO2, 31, GPIO_EMC_31, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_32 = PIN(GPIO3, 0, GPIO_EMC_32, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_33 = PIN(GPIO3, 1, GPIO_EMC_33, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_34 = PIN(GPIO3, 2, GPIO_EMC_34, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_35 = PIN(GPIO3, 3, GPIO_EMC_35, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_36 = PIN(GPIO3, 4, GPIO_EMC_36, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_37 = PIN(GPIO3, 5, GPIO_EMC_37, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_38 = PIN(GPIO3, 6, GPIO_EMC_38, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_39 = PIN(GPIO3, 7, GPIO_EMC_39, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_40 = PIN(GPIO3, 8, GPIO_EMC_40, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_EMC_41 = PIN(GPIO3, 9, GPIO_EMC_41, NO_ADC, 0);
+
+const mcu_pin_obj_t pin_GPIO_SD_B0_00 = PIN(GPIO3, 13, GPIO_SD_B0_00, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B0_01 = PIN(GPIO3, 14, GPIO_SD_B0_01, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B0_02 = PIN(GPIO3, 15, GPIO_SD_B0_02, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B0_03 = PIN(GPIO3, 16, GPIO_SD_B0_03, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B0_04 = PIN(GPIO3, 17, GPIO_SD_B0_04, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B0_05 = PIN(GPIO3, 18, GPIO_SD_B0_05, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B0_06 = PIN(GPIO3, 19, GPIO_SD_B0_06, NO_ADC, 0);
+
+const mcu_pin_obj_t pin_GPIO_SD_B1_00 = PIN(GPIO3, 20, GPIO_SD_B1_00, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_01 = PIN(GPIO3, 21, GPIO_SD_B1_01, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_02 = PIN(GPIO3, 22, GPIO_SD_B1_02, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_03 = PIN(GPIO3, 23, GPIO_SD_B1_03, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_04 = PIN(GPIO3, 24, GPIO_SD_B1_04, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_05 = PIN(GPIO3, 25, GPIO_SD_B1_05, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_06 = PIN(GPIO3, 26, GPIO_SD_B1_06, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_07 = PIN(GPIO3, 27, GPIO_SD_B1_07, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_08 = PIN(GPIO3, 28, GPIO_SD_B1_08, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_09 = PIN(GPIO3, 29, GPIO_SD_B1_09, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_10 = PIN(GPIO3, 30, GPIO_SD_B1_10, NO_ADC, 0);
+const mcu_pin_obj_t pin_GPIO_SD_B1_11 = PIN(GPIO3, 31, GPIO_SD_B1_11, NO_ADC, 0);
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.h
new file mode 100644
index 000000000..a13bacfc3
--- /dev/null
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.h
@@ -0,0 +1,129 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Artur Pacholec
+ * Copyright (c) 2020 Scott Shawcroft
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PINS_H
+#define MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PINS_H
+
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_00;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_01;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_02;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_03;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_04;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_05;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_06;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_07;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_08;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_09;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_10;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_11;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_12;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_13;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_14;
+extern const mcu_pin_obj_t pin_GPIO_AD_B0_15;
+
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_00;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_01;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_02;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_03;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_04;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_05;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_06;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_07;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_08;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_09;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_10;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_11;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_12;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_13;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_14;
+extern const mcu_pin_obj_t pin_GPIO_AD_B1_15;
+
+extern const mcu_pin_obj_t pin_GPIO_EMC_00;
+extern const mcu_pin_obj_t pin_GPIO_EMC_01;
+extern const mcu_pin_obj_t pin_GPIO_EMC_02;
+extern const mcu_pin_obj_t pin_GPIO_EMC_03;
+extern const mcu_pin_obj_t pin_GPIO_EMC_04;
+extern const mcu_pin_obj_t pin_GPIO_EMC_05;
+extern const mcu_pin_obj_t pin_GPIO_EMC_06;
+extern const mcu_pin_obj_t pin_GPIO_EMC_07;
+extern const mcu_pin_obj_t pin_GPIO_EMC_08;
+extern const mcu_pin_obj_t pin_GPIO_EMC_09;
+extern const mcu_pin_obj_t pin_GPIO_EMC_10;
+extern const mcu_pin_obj_t pin_GPIO_EMC_11;
+extern const mcu_pin_obj_t pin_GPIO_EMC_12;
+extern const mcu_pin_obj_t pin_GPIO_EMC_13;
+extern const mcu_pin_obj_t pin_GPIO_EMC_14;
+extern const mcu_pin_obj_t pin_GPIO_EMC_15;
+extern const mcu_pin_obj_t pin_GPIO_EMC_16;
+extern const mcu_pin_obj_t pin_GPIO_EMC_17;
+extern const mcu_pin_obj_t pin_GPIO_EMC_18;
+extern const mcu_pin_obj_t pin_GPIO_EMC_19;
+extern const mcu_pin_obj_t pin_GPIO_EMC_20;
+extern const mcu_pin_obj_t pin_GPIO_EMC_21;
+extern const mcu_pin_obj_t pin_GPIO_EMC_22;
+extern const mcu_pin_obj_t pin_GPIO_EMC_23;
+extern const mcu_pin_obj_t pin_GPIO_EMC_24;
+extern const mcu_pin_obj_t pin_GPIO_EMC_25;
+extern const mcu_pin_obj_t pin_GPIO_EMC_26;
+extern const mcu_pin_obj_t pin_GPIO_EMC_27;
+extern const mcu_pin_obj_t pin_GPIO_EMC_28;
+extern const mcu_pin_obj_t pin_GPIO_EMC_29;
+extern const mcu_pin_obj_t pin_GPIO_EMC_30;
+extern const mcu_pin_obj_t pin_GPIO_EMC_31;
+extern const mcu_pin_obj_t pin_GPIO_EMC_32;
+extern const mcu_pin_obj_t pin_GPIO_EMC_33;
+extern const mcu_pin_obj_t pin_GPIO_EMC_34;
+extern const mcu_pin_obj_t pin_GPIO_EMC_35;
+extern const mcu_pin_obj_t pin_GPIO_EMC_36;
+extern const mcu_pin_obj_t pin_GPIO_EMC_37;
+extern const mcu_pin_obj_t pin_GPIO_EMC_38;
+extern const mcu_pin_obj_t pin_GPIO_EMC_39;
+extern const mcu_pin_obj_t pin_GPIO_EMC_40;
+extern const mcu_pin_obj_t pin_GPIO_EMC_41;
+
+extern const mcu_pin_obj_t pin_GPIO_SD_B0_00;
+extern const mcu_pin_obj_t pin_GPIO_SD_B0_01;
+extern const mcu_pin_obj_t pin_GPIO_SD_B0_02;
+extern const mcu_pin_obj_t pin_GPIO_SD_B0_03;
+extern const mcu_pin_obj_t pin_GPIO_SD_B0_04;
+extern const mcu_pin_obj_t pin_GPIO_SD_B0_05;
+extern const mcu_pin_obj_t pin_GPIO_SD_B0_06;
+
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_00;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_01;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_02;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_03;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_04;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_05;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_06;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_07;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_08;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_09;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_10;
+extern const mcu_pin_obj_t pin_GPIO_SD_B1_11;
+
+#endif // MICROPY_INCLUDED_MIMXRT10XX_PERIPHERALS_MIMXRT1021_PINS_H
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/clocks.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/clocks.c
index cafc8efc3..7b9af3a6a 100644
--- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/clocks.c
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/clocks.c
@@ -130,17 +130,6 @@ void clocks_init(void) {
/* Set Semc clock source. */
CLOCK_SetMux(kCLOCK_SemcMux, 0);
#endif
- /* In SDK projects, external flash (configured by FLEXSPI) will be initialized by dcd.
- * With this macro XIP_EXTERNAL_FLASH, usb1 pll (selected to be FLEXSPI clock source in SDK projects) will be left unchanged.
- * Note: If another clock source is selected for FLEXSPI, user may want to avoid changing that clock as well.*/
-#if !(defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1))
- /* Disable Flexspi clock gate. */
- CLOCK_DisableClock(kCLOCK_FlexSpi);
- /* Set FLEXSPI_PODF. */
- CLOCK_SetDiv(kCLOCK_FlexspiDiv, 1);
- /* Set Flexspi clock source. */
- CLOCK_SetMux(kCLOCK_FlexspiMux, 3);
-#endif
/* Disable LPSPI clock gate. */
CLOCK_DisableClock(kCLOCK_Lpspi1);
CLOCK_DisableClock(kCLOCK_Lpspi2);
@@ -255,23 +244,6 @@ void clocks_init(void) {
/* Init System pfd3. */
CLOCK_InitSysPfd(kCLOCK_Pfd3, 16);
#endif
- /* In SDK projects, external flash (configured by FLEXSPI) will be initialized by dcd.
- * With this macro XIP_EXTERNAL_FLASH, usb1 pll (selected to be FLEXSPI clock source in SDK projects) will be left unchanged.
- * Note: If another clock source is selected for FLEXSPI, user may want to avoid changing that clock as well.*/
-#if !(defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1))
- /* Init Usb1 PLL. */
- CLOCK_InitUsb1Pll(&usb1PllConfig_BOARD_BootClockRUN);
- /* Init Usb1 pfd0. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd0, 33);
- /* Init Usb1 pfd1. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd1, 16);
- /* Init Usb1 pfd2. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd2, 17);
- /* Init Usb1 pfd3. */
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd3, 19);
- /* Disable Usb1 PLL output for USBPHY1. */
- CCM_ANALOG->PLL_USB1 &= ~CCM_ANALOG_PLL_USB1_EN_USB_CLKS_MASK;
-#endif
/* DeInit Audio PLL. */
CLOCK_DeinitAudioPll();
/* Bypass Audio PLL. */
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c
index fc90e2374..3f0473a88 100644
--- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c
@@ -71,7 +71,7 @@ const mcu_periph_obj_t mcu_spi_sck_list[8] = {
PERIPH_PIN(2, 2, kIOMUXC_LPSPI2_SCK_SELECT_INPUT, 1, &pin_GPIO_EMC_00),
PERIPH_PIN(3, 7, kIOMUXC_LPSPI3_SCK_SELECT_INPUT, 0, &pin_GPIO_AD_B0_00),
- PERIPH_PIN(3, 2, kIOMUXC_LPSPI3_SCK_SELECT_INPUT, 0, &pin_GPIO_AD_B1_15),
+ PERIPH_PIN(3, 2, kIOMUXC_LPSPI3_SCK_SELECT_INPUT, 1, &pin_GPIO_AD_B1_15),
PERIPH_PIN(4, 3, kIOMUXC_LPSPI4_SCK_SELECT_INPUT, 0, &pin_GPIO_B0_03),
PERIPH_PIN(4, 1, kIOMUXC_LPSPI4_SCK_SELECT_INPUT, 1, &pin_GPIO_B1_07),
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h
index 301eb0db4..9b9713bb4 100644
--- a/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/periph.h
@@ -70,6 +70,8 @@ extern LPUART_Type *mcu_uart_banks[];
#ifdef MIMXRT1011_SERIES
#include "MIMXRT1011/periph.h"
+#elif defined(MIMXRT1021_SERIES)
+#include "MIMXRT1021/periph.h"
#elif defined(MIMXRT1062_SERIES)
#include "MIMXRT1062/periph.h"
#endif
diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/pins.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/pins.h
index 64a8324bd..404a411e1 100644
--- a/ports/mimxrt10xx/peripherals/mimxrt10xx/pins.h
+++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/pins.h
@@ -68,6 +68,8 @@ typedef struct {
#ifdef MIMXRT1011_SERIES
#include "MIMXRT1011/pins.h"
+#elif defined(MIMXRT1021_SERIES)
+#include "MIMXRT1021/pins.h"
#elif defined(MIMXRT1062_SERIES)
#include "MIMXRT1062/pins.h"
#endif
diff --git a/ports/mimxrt10xx/reset.c b/ports/mimxrt10xx/reset.c
index dc4a1dce1..a3a4f667d 100644
--- a/ports/mimxrt10xx/reset.c
+++ b/ports/mimxrt10xx/reset.c
@@ -35,5 +35,5 @@ void reset(void) {
}
bool bootloader_available(void) {
- return &_bootloader_dbl_tap >= 0;
+ return SNVS->LPGPR[0] >= 0;
}
diff --git a/ports/mimxrt10xx/reset.h b/ports/mimxrt10xx/reset.h
index b6dfc38cc..dc3106cf0 100644
--- a/ports/mimxrt10xx/reset.h
+++ b/ports/mimxrt10xx/reset.h
@@ -34,8 +34,6 @@
#define DBL_TAP_MAGIC 0xf01669ef // Randomly selected, adjusted to have first and last bit set
#define DBL_TAP_MAGIC_QUICK_BOOT 0xf02669ef
-extern volatile uint32_t _bootloader_dbl_tap;
-
void reset_to_bootloader(void);
void reset(void);
bool bootloader_available(void);
diff --git a/ports/mimxrt10xx/sdk b/ports/mimxrt10xx/sdk
-Subproject 2251c7b79343966a57a0f36d897873dd40b692b
+Subproject 4e7438e654f4a6b4f386b4bb9e817d74a0fbffc
diff --git a/ports/mimxrt10xx/supervisor/flexspi_nor_flash_ops.c b/ports/mimxrt10xx/supervisor/flexspi_nor_flash_ops.c
index e20c67fa3..71252d677 100644
--- a/ports/mimxrt10xx/supervisor/flexspi_nor_flash_ops.c
+++ b/ports/mimxrt10xx/supervisor/flexspi_nor_flash_ops.c
@@ -16,19 +16,10 @@
static inline void flexspi_clock_init(void)
{
-#if defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1)
/* Switch to PLL2 for XIP to avoid hardfault during re-initialize clock. */
CLOCK_InitSysPfd(kCLOCK_Pfd2, 24); /* Set PLL2 PFD2 clock 396MHZ. */
CLOCK_SetMux(kCLOCK_FlexspiMux, 0x2); /* Choose PLL2 PFD2 clock as flexspi source clock. */
CLOCK_SetDiv(kCLOCK_FlexspiDiv, 2); /* flexspi clock 133M. */
-#else
- const clock_usb_pll_config_t g_ccmConfigUsbPll = {.loopDivider = 0U};
-
- CLOCK_InitUsb1Pll(&g_ccmConfigUsbPll);
- CLOCK_InitUsb1Pfd(kCLOCK_Pfd0, 24); /* Set PLL3 PFD0 clock 360MHZ. */
- CLOCK_SetMux(kCLOCK_FlexspiMux, 0x3); /* Choose PLL3 PFD0 clock as flexspi source clock. */
- CLOCK_SetDiv(kCLOCK_FlexspiDiv, 2); /* flexspi clock 120M. */
-#endif
}
extern flexspi_device_config_t deviceconfig;
diff --git a/ports/mimxrt10xx/supervisor/internal_flash.c b/ports/mimxrt10xx/supervisor/internal_flash.c
index e15b4962e..7e9d8fa37 100644
--- a/ports/mimxrt10xx/supervisor/internal_flash.c
+++ b/ports/mimxrt10xx/supervisor/internal_flash.c
@@ -166,11 +166,13 @@ void supervisor_flash_init(void) {
}
__enable_irq();
+ SCB_EnableDCache();
+
init_done = true;
}
static inline uint32_t lba2addr(uint32_t block) {
- return ((uint32_t)__fatfs_flash_start_addr) + block * FILESYSTEM_BLOCK_SIZE;
+ return CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR + block * FILESYSTEM_BLOCK_SIZE;
}
uint32_t supervisor_flash_get_block_size(void) {
@@ -178,7 +180,7 @@ uint32_t supervisor_flash_get_block_size(void) {
}
uint32_t supervisor_flash_get_block_count(void) {
- return ((uint32_t) __fatfs_flash_length) / FILESYSTEM_BLOCK_SIZE;
+ return CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE / FILESYSTEM_BLOCK_SIZE;
}
void supervisor_flash_flush(void) {
@@ -191,20 +193,20 @@ void supervisor_flash_flush(void) {
__disable_irq();
status = flexspi_nor_flash_erase_sector(FLEXSPI, sector_addr);
+ __enable_irq();
if (status != kStatus_Success) {
printf("Page erase failure %ld!\r\n", status);
return;
}
- __enable_irq();
for (int i = 0; i < SECTOR_SIZE / FLASH_PAGE_SIZE; ++i) {
__disable_irq();
status = flexspi_nor_flash_page_program(FLEXSPI, sector_addr + i * FLASH_PAGE_SIZE, (void *)_flash_cache + i * FLASH_PAGE_SIZE);
+ __enable_irq();
if (status != kStatus_Success) {
printf("Page program failure %ld!\r\n", status);
return;
}
- __enable_irq();
}
DCACHE_CleanInvalidateByRange(_flash_page_addr, SECTOR_SIZE);
diff --git a/ports/mimxrt10xx/supervisor/port.c b/ports/mimxrt10xx/supervisor/port.c
index 0399ee61d..b311e8920 100644
--- a/ports/mimxrt10xx/supervisor/port.c
+++ b/ports/mimxrt10xx/supervisor/port.c
@@ -3,8 +3,8 @@
*
* The MIT License (MIT)
*
- * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
- * Copyright (c) 2017 Artur Pacholec
+ * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
+ * Copyright (c) 2020 Artur Pacholec
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -24,6 +24,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+/*
+ * Copyright 2018 NXP
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
#include "boards/board.h"
#include "supervisor/port.h"
@@ -54,16 +60,190 @@
#include "fsl_gpio.h"
#include "fsl_lpuart.h"
-void mpu_init(void)
-{
- ARM_MPU_Disable();
+// Device memories must be accessed in order.
+#define DEVICE 2
+// Normal memory can have accesses reorder and prefetched.
+#define NORMAL 0
+
+// Prevents instruction access.
+#define NO_EXECUTION 1
+#define EXECUTION 0
+
+// Shareable if the memory system manages coherency.
+#define NOT_SHAREABLE 0
+#define SHAREABLE 1
+
+//
+#define NOT_CACHEABLE 0
+#define CACHEABLE 1
+
+#define NOT_BUFFERABLE 0
+#define BUFFERABLE 1
+
+#define NO_SUBREGIONS 0
+
+extern uint32_t _ld_flash_size;
+extern uint32_t _ld_stack_top;
+
+extern uint32_t __isr_vector[];
+
+extern uint32_t _ld_ocram_bss_start;
+extern uint32_t _ld_ocram_bss_size;
+extern uint32_t _ld_ocram_data_destination;
+extern uint32_t _ld_ocram_data_size;
+extern uint32_t _ld_ocram_data_flash_copy;
+extern uint32_t _ld_dtcm_bss_start;
+extern uint32_t _ld_dtcm_bss_size;
+extern uint32_t _ld_dtcm_data_destination;
+extern uint32_t _ld_dtcm_data_size;
+extern uint32_t _ld_dtcm_data_flash_copy;
+extern uint32_t _ld_itcm_destination;
+extern uint32_t _ld_itcm_size;
+extern uint32_t _ld_itcm_flash_copy;
+
+extern void main(void);
+
+// This replaces the Reset_Handler in startup_*.S and SystemInit in system_*.c.
+__attribute__((used, naked)) void Reset_Handler(void) {
+ __disable_irq();
+ SCB->VTOR = (uint32_t) &__isr_vector;
+ __set_MSP((uint32_t) &_ld_stack_top);
+
+ /* Disable I cache and D cache */
+ SCB_DisableICache();
+ SCB_DisableDCache();
+
+ // Changing the FlexRAM must happen here where the stack is empty. If it is in a function call,
+ // then the return will jump to an invalid address.
+ // Configure FlexRAM. The e is one block of ITCM (0b11) and DTCM (0b10). The rest is two OCRAM
+ // (0b01). We shift in zeroes for all unimplemented banks.
+ IOMUXC_GPR->GPR17 = (0xe5555555) >> (32 - 2 * FSL_FEATURE_FLEXRAM_INTERNAL_RAM_TOTAL_BANK_NUMBERS);
+
+ // Switch from FlexRAM fuse config to the IOMUXC values.
+ IOMUXC_GPR->GPR16 |= IOMUXC_GPR_GPR16_FLEXRAM_BANK_CFG_SEL(1);
+
+ // Let the core know the TCM sizes changed.
+ uint32_t current_gpr14 = IOMUXC_GPR->GPR14;
+ current_gpr14 &= ~IOMUXC_GPR_GPR14_CM7_CFGDTCMSZ_MASK;
+ current_gpr14 |= IOMUXC_GPR_GPR14_CM7_CFGDTCMSZ(0x6);
+ current_gpr14 &= ~IOMUXC_GPR_GPR14_CM7_CFGITCMSZ_MASK;
+ current_gpr14 |= IOMUXC_GPR_GPR14_CM7_CFGITCMSZ(0x6);
+ IOMUXC_GPR->GPR14 = current_gpr14;
+
+ #if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
+ SCB->CPACR |= ((3UL << 10*2) | (3UL << 11*2)); /* set CP10, CP11 Full Access */
+ #endif /* ((__FPU_PRESENT == 1) && (__FPU_USED == 1)) */
+
+ /* Disable Watchdog Power Down Counter */
+ WDOG1->WMCR &= ~WDOG_WMCR_PDE_MASK;
+ WDOG2->WMCR &= ~WDOG_WMCR_PDE_MASK;
+
+ /* Watchdog disable */
+ WDOG1->WCR &= ~WDOG_WCR_WDE_MASK;
+ WDOG2->WCR &= ~WDOG_WCR_WDE_MASK;
+ RTWDOG->CNT = 0xD928C520U; /* 0xD928C520U is the update key */
+ RTWDOG->TOVAL = 0xFFFF;
+ RTWDOG->CS = (uint32_t) ((RTWDOG->CS) & ~RTWDOG_CS_EN_MASK) | RTWDOG_CS_UPDATE_MASK;
+
+ /* Disable Systick which might be enabled by bootrom */
+ if (SysTick->CTRL & SysTick_CTRL_ENABLE_Msk)
+ {
+ SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
+ }
+
+ /* Disable MPU */
+ ARM_MPU_Disable();
+
+ // Copy all of the code to run from ITCM. Do this while the MPU is disabled because we write
+ // protect it.
+ for (uint32_t i = 0; i < ((size_t) &_ld_itcm_size) / 4; i++) {
+ (&_ld_itcm_destination)[i] = (&_ld_itcm_flash_copy)[i];
+ }
+
+ // The first number in RBAR is the region number. When searching for a policy, the region with
+ // the highest number wins. If none match, then the default policy set at enable applies.
+
+ // This is an undocumented region and is likely more registers.
+ MPU->RBAR = ARM_MPU_RBAR(8, 0xC0000000U);
+ MPU->RASR = ARM_MPU_RASR(EXECUTION, ARM_MPU_AP_FULL, DEVICE, NOT_SHAREABLE, NOT_CACHEABLE, NOT_BUFFERABLE, NO_SUBREGIONS, ARM_MPU_REGION_SIZE_512MB);
+
+ // This is the SEMC region where external RAM and 8+ flash would live. Disable for now, even though the EVKs have stuff here.
+ MPU->RBAR = ARM_MPU_RBAR(9, 0x80000000U);
+ MPU->RASR = ARM_MPU_RASR(NO_EXECUTION, ARM_MPU_AP_NONE, DEVICE, NOT_SHAREABLE, NOT_CACHEABLE, NOT_BUFFERABLE, NO_SUBREGIONS, ARM_MPU_REGION_SIZE_1GB);
- SCB_EnableDCache();
- SCB_EnableICache();
+ // FlexSPI2 is 0x70000000
+
+ // This the first 1MB of flash is the bootloader and CircuitPython read-only data.
+ MPU->RBAR = ARM_MPU_RBAR(10, 0x60000000U);
+ MPU->RASR = ARM_MPU_RASR(EXECUTION, ARM_MPU_AP_FULL, NORMAL, NOT_SHAREABLE, CACHEABLE, BUFFERABLE, NO_SUBREGIONS, ARM_MPU_REGION_SIZE_1MB);
+
+ // The remainder of flash is the fat filesystem which could have code on it too. Make sure that
+ // we set the region to the minimal size so that bad data doesn't get speculatively fetched.
+ // Thanks to Damien for the tip!
+ uint32_t region_size = ARM_MPU_REGION_SIZE_32B;
+ uint32_t filesystem_size = &_ld_filesystem_end - &_ld_filesystem_start;
+ while (filesystem_size > (1u << (region_size + 1))) {
+ region_size += 1;
+ }
+ // Mask out as much of the remainder as we can. For example on an 8MB flash, 7MB are for the
+ // filesystem. The region_size here must be a power of 2 so it is 8MB. Using the subregion mask
+ // we can ignore 1/8th size chunks. So, we ignore the last 1MB using the subregion.
+ uint32_t remainder = (1u << (region_size + 1)) - filesystem_size;
+ uint32_t subregion_size = (1u << (region_size + 1)) / 8;
+ uint8_t subregion_mask = (0xff00 >> (remainder / subregion_size)) & 0xff;
+
+ MPU->RBAR = ARM_MPU_RBAR(11, 0x60100000U);
+ MPU->RASR = ARM_MPU_RASR(EXECUTION, ARM_MPU_AP_FULL, NORMAL, NOT_SHAREABLE, CACHEABLE, BUFFERABLE, subregion_mask, region_size);
+
+ // This the ITCM. Set it to read-only because we've loaded everything already and it's easy to
+ // accidentally write the wrong value to 0x00000000 (aka NULL).
+ MPU->RBAR = ARM_MPU_RBAR(12, 0x00000000U);
+ MPU->RASR = ARM_MPU_RASR(EXECUTION, ARM_MPU_AP_RO, NORMAL, NOT_SHAREABLE, CACHEABLE, BUFFERABLE, NO_SUBREGIONS, ARM_MPU_REGION_SIZE_32KB);
+
+ // This the DTCM.
+ MPU->RBAR = ARM_MPU_RBAR(13, 0x20000000U);
+ MPU->RASR = ARM_MPU_RASR(EXECUTION, ARM_MPU_AP_FULL, NORMAL, NOT_SHAREABLE, CACHEABLE, BUFFERABLE, NO_SUBREGIONS, ARM_MPU_REGION_SIZE_32KB);
+
+ // This is OCRAM.
+ MPU->RBAR = ARM_MPU_RBAR(14, 0x20200000U);
+ MPU->RASR = ARM_MPU_RASR(EXECUTION, ARM_MPU_AP_FULL, NORMAL, NOT_SHAREABLE, CACHEABLE, BUFFERABLE, NO_SUBREGIONS, ARM_MPU_REGION_SIZE_512KB);
+
+ // We steal 64k from FlexRAM for ITCM and DTCM so disable those memory regions here.
+ MPU->RBAR = ARM_MPU_RBAR(15, 0x20280000U);
+ MPU->RASR = ARM_MPU_RASR(EXECUTION, ARM_MPU_AP_FULL, NORMAL, NOT_SHAREABLE, CACHEABLE, BUFFERABLE, 0x80, ARM_MPU_REGION_SIZE_512KB);
+
+ /* Enable MPU */
+ ARM_MPU_Enable(MPU_CTRL_PRIVDEFENA_Msk);
+
+ /* We're done mucking with memory so enable I cache and D cache */
+ SCB_EnableDCache();
+ SCB_EnableICache();
+
+ // Copy all of the data to run from DTCM.
+ for (uint32_t i = 0; i < ((size_t) &_ld_dtcm_data_size) / 4; i++) {
+ (&_ld_dtcm_data_destination)[i] = (&_ld_dtcm_data_flash_copy)[i];
+ }
+
+ // Clear DTCM bss.
+ for (uint32_t i = 0; i < ((size_t) &_ld_dtcm_bss_size) / 4; i++) {
+ (&_ld_dtcm_bss_start)[i] = 0;
+ }
+
+ // Copy all of the data to run from OCRAM.
+ for (uint32_t i = 0; i < ((size_t) &_ld_ocram_data_size) / 4; i++) {
+ (&_ld_ocram_data_destination)[i] = (&_ld_ocram_data_flash_copy)[i];
+ }
+
+ // Clear OCRAM bss.
+ for (uint32_t i = 0; i < ((size_t) &_ld_ocram_bss_size) / 4; i++) {
+ (&_ld_ocram_bss_start)[i] = 0;
+ }
+
+ __enable_irq();
+ main();
}
safe_mode_t port_init(void) {
- mpu_init();
clocks_init();
// Configure millisecond timer initialization.
@@ -126,7 +306,7 @@ void reset_port(void) {
}
void reset_to_bootloader(void) {
- _bootloader_dbl_tap = DBL_TAP_MAGIC;
+ SNVS->LPGPR[0] = DBL_TAP_MAGIC;
reset();
}
@@ -134,23 +314,64 @@ void reset_cpu(void) {
reset();
}
-extern uint32_t _heap_start, _estack;
+extern uint32_t _ld_heap_start, _ld_heap_end, _ld_stack_top, _ld_stack_bottom;
uint32_t *port_stack_get_limit(void) {
- return &_heap_start;
+ return &_ld_heap_start;
}
uint32_t *port_stack_get_top(void) {
- return &_estack;
+ return &_ld_stack_top;
+}
+
+uint32_t *port_heap_get_bottom(void) {
+ return &_ld_heap_start;
+}
+
+// Get heap top address
+uint32_t *port_heap_get_top(void) {
+ return &_ld_heap_end;
}
-extern uint32_t __bss_end__;
// Place the word to save just after our BSS section that gets blanked.
void port_set_saved_word(uint32_t value) {
- __bss_end__ = value;
+ SNVS->LPGPR[1] = value;
}
uint32_t port_get_saved_word(void) {
- return __bss_end__;
+ return SNVS->LPGPR[1];
+}
+
+/**
+ * \brief Default interrupt handler for unused IRQs.
+ */
+__attribute__((used)) void MemManage_Handler(void)
+{
+ reset_into_safe_mode(MEM_MANAGE);
+ while (true) {
+ asm("nop;");
+ }
+}
+
+/**
+ * \brief Default interrupt handler for unused IRQs.
+ */
+__attribute__((used)) void BusFault_Handler(void)
+{
+ reset_into_safe_mode(MEM_MANAGE);
+ while (true) {
+ asm("nop;");
+ }
+}
+
+/**
+ * \brief Default interrupt handler for unused IRQs.
+ */
+__attribute__((used)) void UsageFault_Handler(void)
+{
+ reset_into_safe_mode(MEM_MANAGE);
+ while (true) {
+ asm("nop;");
+ }
}
/**
@@ -163,3 +384,4 @@ __attribute__((used)) void HardFault_Handler(void)
asm("nop;");
}
}
+
diff --git a/ports/mimxrt10xx/supervisor/usb.c b/ports/mimxrt10xx/supervisor/usb.c
index c38dd55b9..051fcca9d 100644
--- a/ports/mimxrt10xx/supervisor/usb.c
+++ b/ports/mimxrt10xx/supervisor/usb.c
@@ -49,6 +49,10 @@ void init_usb_hardware(void) {
phytx &= ~(USBPHY_TX_D_CAL_MASK | USBPHY_TX_TXCAL45DM_MASK | USBPHY_TX_TXCAL45DP_MASK);
phytx |= USBPHY_TX_D_CAL(0x0C) | USBPHY_TX_TXCAL45DP(0x06) | USBPHY_TX_TXCAL45DM(0x06);
usb_phy->TX = phytx;
+
+ // Temporarily disable the data cache until we can sort out all of the spots in TinyUSB that
+ // need the cache invalidated or cleaned.
+ SCB_DisableDCache();
}
void USB_OTG1_IRQHandler(void) {
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index f38b9f684..47a5b8653 100755
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -73,8 +73,6 @@ INC += -I$(BUILD)
INC += -I$(BUILD)/genhdr
INC += -I./../../lib/cmsis/inc
INC += -I./boards/$(BOARD)
-INC += -I./modules/ubluepy
-INC += -I./modules/ble
INC += -I./nrfx
INC += -I./nrfx/hal
INC += -I./nrfx/mdk
@@ -157,6 +155,7 @@ SRC_C += \
boards/$(BOARD)/pins.c \
device/$(MCU_VARIANT)/startup_$(MCU_SUB_VARIANT).c \
bluetooth/ble_drv.c \
+ common-hal/_bleio/bonding.c \
lib/libc/string0.c \
lib/mp-readline/readline.c \
lib/oofatfs/ff.c \
@@ -184,6 +183,32 @@ SRC_C += \
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c
endif
+ifeq ($(CIRCUITPY_NETWORK),1)
+CFLAGS += -DMICROPY_PY_NETWORK=1
+
+SRC_MOD += lib/netutils/netutils.c
+
+ifneq ($(MICROPY_PY_WIZNET5K),0)
+WIZNET5K_DIR=drivers/wiznet5k
+INC += -I$(TOP)/$(WIZNET5K_DIR)
+CFLAGS_MOD += -DMICROPY_PY_WIZNET5K=$(MICROPY_PY_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_WIZNET5K)
+SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\
+ ethernet/w$(MICROPY_PY_WIZNET5K)/w$(MICROPY_PY_WIZNET5K).c \
+ ethernet/wizchip_conf.c \
+ ethernet/socket.c \
+ internet/dns/dns.c \
+ internet/dhcp/dhcp.c \
+ )
+
+endif # MICROPY_PY_WIZNET5K
+endif # CIRCUITPY_NETWORK
+
+ifeq ($(CIRCUITPY_NETWORK),1)
+ifneq ($(MICROPY_PY_WIZNET5K),0)
+SRC_SHARED_MODULE += wiznet/__init__.c wiznet/wiznet5k.c
+endif
+endif
+
SRC_COMMON_HAL_EXPANDED = $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \
$(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \
$(addprefix common-hal/, $(SRC_COMMON_HAL))
diff --git a/ports/nrf/background.c b/ports/nrf/background.c
index 629967b3d..966c56e0b 100644
--- a/ports/nrf/background.c
+++ b/ports/nrf/background.c
@@ -43,6 +43,7 @@
#if CIRCUITPY_BLEIO
#include "supervisor/shared/bluetooth.h"
+#include "common-hal/_bleio/bonding.h"
#endif
static bool running_background_tasks = false;
@@ -68,6 +69,7 @@ void run_background_tasks(void) {
#if CIRCUITPY_BLEIO
supervisor_bluetooth_background();
+ bonding_background();
#endif
#if CIRCUITPY_DISPLAYIO
diff --git a/ports/nrf/boards/aramcon_badge_2019/board.c b/ports/nrf/boards/aramcon_badge_2019/board.c
new file mode 100644
index 000000000..efb449285
--- /dev/null
+++ b/ports/nrf/boards/aramcon_badge_2019/board.c
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Uri Shaked
+ * Copyright (c) 2019 Benjamin Meisels
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "common-hal/microcontroller/Pin.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+
+}
diff --git a/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.h b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.h
new file mode 100644
index 000000000..51d14721c
--- /dev/null
+++ b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.h
@@ -0,0 +1,31 @@
+#include "nrfx/hal/nrf_gpio.h"
+
+#define MICROPY_HW_BOARD_NAME "ARAMCON Badge 2019"
+#define MICROPY_HW_MCU_NAME "nRF52840"
+
+#define MICROPY_HW_LED_STATUS (&pin_P1_11)
+
+#ifdef QSPI_FLASH_FILESYSTEM
+#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 22)
+#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 20)
+#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(1, 4)
+#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(1, 6)
+#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(1, 0)
+#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(1, 2)
+#endif
+
+#ifdef SPI_FLASH_FILESYSTEM
+#define SPI_FLASH_MOSI_PIN &pin_P0_20
+#define SPI_FLASH_MISO_PIN &pin_P0_22
+#define SPI_FLASH_SCK_PIN &pin_P1_00
+#define SPI_FLASH_CS_PIN &pin_P1_02
+#endif
+
+#define BOARD_HAS_32KHZ_XTAL 0
+
+#define DEFAULT_I2C_BUS_SCL (&pin_P0_28)
+#define DEFAULT_I2C_BUS_SDA (&pin_P0_03)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_P0_01)
+#define DEFAULT_SPI_BUS_MOSI (&pin_P1_10)
+#define DEFAULT_SPI_BUS_MISO (&pin_P1_09)
diff --git a/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk
new file mode 100644
index 000000000..09252ab4b
--- /dev/null
+++ b/ports/nrf/boards/aramcon_badge_2019/mpconfigboard.mk
@@ -0,0 +1,14 @@
+USB_VID = 0x239A
+USB_PID = 0x807A
+USB_PRODUCT = "ARAMCON Badge 2019"
+USB_MANUFACTURER = "ARAMCON Badge Team"
+
+MCU_CHIP = nrf52840
+
+QSPI_FLASH_FILESYSTEM = 1
+EXTERNAL_FLASH_DEVICE_COUNT = 1
+EXTERNAL_FLASH_DEVICES = "GD25Q16C"
+
+CIRCUITPY_DISPLAYIO = 1
+
+CIRCUITPY_REQUIRE_I2C_PULLUPS = 0
diff --git a/ports/nrf/boards/aramcon_badge_2019/pins.c b/ports/nrf/boards/aramcon_badge_2019/pins.c
new file mode 100644
index 000000000..82ab20013
--- /dev/null
+++ b/ports/nrf/boards/aramcon_badge_2019/pins.c
@@ -0,0 +1,34 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_LEFT_BUTTON), MP_ROM_PTR(&pin_P0_02) },
+ { MP_ROM_QSTR(MP_QSTR_MIDDLE_BUTTON), MP_ROM_PTR(&pin_P0_29) },
+ { MP_ROM_QSTR(MP_QSTR_RIGHT_BUTTON), MP_ROM_PTR(&pin_P0_31) },
+
+ { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P1_11) },
+
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_28) },
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_03) },
+
+ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_01) },
+ { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_10) },
+ { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_09) },
+
+ { MP_ROM_QSTR(MP_QSTR_SND_CS), MP_ROM_PTR(&pin_P1_13) },
+ { MP_ROM_QSTR(MP_QSTR_SND_DREQ), MP_ROM_PTR(&pin_P0_13) },
+ { MP_ROM_QSTR(MP_QSTR_SND_RESET), MP_ROM_PTR(&pin_P0_00) },
+ { MP_ROM_QSTR(MP_QSTR_SND_XDCS), MP_ROM_PTR(&pin_P0_24) },
+
+ { MP_ROM_QSTR(MP_QSTR_DISP_BUSY), MP_ROM_PTR(&pin_P0_26) },
+ { MP_ROM_QSTR(MP_QSTR_DISP_CS), MP_ROM_PTR(&pin_P0_07) },
+ { MP_ROM_QSTR(MP_QSTR_DISP_DC), MP_ROM_PTR(&pin_P0_12) },
+ { MP_ROM_QSTR(MP_QSTR_DISP_RESET), MP_ROM_PTR(&pin_P0_06) },
+
+ { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P0_08) },
+
+ { MP_ROM_QSTR(MP_QSTR_VIBRATION_MOTOR), MP_ROM_PTR(&pin_P0_17) },
+
+ { MP_ROM_QSTR(MP_QSTR_BATTERY_SENSE), MP_ROM_PTR(&pin_P0_30) },
+};
+
+MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
diff --git a/ports/nrf/boards/circuitplayground_bluefruit/board.c b/ports/nrf/boards/circuitplayground_bluefruit/board.c
index 7c8ec8e9a..3aa6857da 100644
--- a/ports/nrf/boards/circuitplayground_bluefruit/board.c
+++ b/ports/nrf/boards/circuitplayground_bluefruit/board.c
@@ -28,6 +28,7 @@
#include "mpconfigboard.h"
#include "py/obj.h"
#include "peripherals/nrf/pins.h"
+#include "supervisor/shared/board.h"
#include "nrf_gpio.h"
@@ -47,4 +48,6 @@ void reset_board(void) {
NRF_GPIO_PIN_S0S1,
NRF_GPIO_PIN_NOSENSE);
nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false);
+
+ board_reset_user_neopixels();
}
diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
index 7f9933b42..e401cecc1 100644
--- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
+++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
@@ -54,6 +54,8 @@
// Disables onboard peripherals and neopixels to save power.
#define POWER_SWITCH_PIN (&pin_P0_06)
+#define USER_NEOPIXELS_PIN (&pin_P0_13)
+
#define DEFAULT_I2C_BUS_SCL (&pin_P0_04)
#define DEFAULT_I2C_BUS_SDA (&pin_P0_05)
diff --git a/ports/nrf/boards/clue_nrf52840_express/pins.c b/ports/nrf/boards/clue_nrf52840_express/pins.c
index b13d1977f..2926f46e0 100644
--- a/ports/nrf/boards/clue_nrf52840_express/pins.c
+++ b/ports/nrf/boards/clue_nrf52840_express/pins.c
@@ -1,5 +1,8 @@
#include "shared-bindings/board/__init__.h"
+#include "boards/board.h"
+#include "shared-module/displayio/__init__.h"
+
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_P0), MP_ROM_PTR(&pin_P0_04) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_04) },
@@ -96,6 +99,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+
+ { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
diff --git a/ports/nrf/boards/ohs2020_badge/board.c b/ports/nrf/boards/ohs2020_badge/board.c
new file mode 100644
index 000000000..189f7acdf
--- /dev/null
+++ b/ports/nrf/boards/ohs2020_badge/board.c
@@ -0,0 +1,99 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "boards/board.h"
+#include "mpconfigboard.h"
+
+#include "shared-bindings/busio/SPI.h"
+#include "shared-bindings/displayio/FourWire.h"
+#include "shared-module/displayio/__init__.h"
+#include "shared-module/displayio/mipi_constants.h"
+#include "tick.h"
+
+displayio_fourwire_obj_t board_display_obj;
+
+#define DELAY 0x80
+
+uint8_t display_init_sequence[] = {
+ 0x01, 0 | DELAY, 150, // SWRESET
+ 0x11, 0 | DELAY, 255, // SLPOUT
+ 0x36, 1, 0x00, // _MADCTL bottom to top refresh in vsync aligned order.
+ 0x3a, 1, 0x55, // COLMOD - 16bit color
+ 0x21, 0 | DELAY, 10, // _INVON
+ 0x13, 0 | DELAY, 10, // _NORON
+ 0x29, 0 | DELAY, 255, // _DISPON
+};
+
+void board_init(void) {
+ busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
+ common_hal_busio_spi_construct(spi, &pin_P0_14, &pin_P0_15, NULL);
+ common_hal_busio_spi_never_reset(spi);
+
+ displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
+ bus->base.type = &displayio_fourwire_type;
+ common_hal_displayio_fourwire_construct(bus,
+ spi,
+ &pin_P0_08, // TFT_DC Command or data
+ &pin_P0_14, // TFT_CS Chip select
+ &pin_P0_13, // TFT_RST Reset
+ 60000000);
+
+ displayio_display_obj_t* display = &displays[0].display;
+ display->base.type = &displayio_display_type;
+ common_hal_displayio_display_construct(display,
+ bus,
+ 240, // Width (after rotation)
+ 240, // Height (after rotation)
+ 0, // column start
+ 0, // row start
+ 270, // rotation
+ 16, // Color depth
+ false, // Grayscale
+ false, // Pixels in a byte share a row. Only used for depth < 8
+ 1, // bytes per cell. Only valid for depths < 8
+ false, // reverse_pixels_in_byte. Only valid for depths < 8
+ MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
+ MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
+ MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
+ 0x37, // set vertical scroll command
+ display_init_sequence,
+ sizeof(display_init_sequence),
+ &pin_P0_02, // backlight pin
+ NO_BRIGHTNESS_COMMAND,
+ 1.0f, // brightness (ignored)
+ true, // auto_brightness
+ false, // single_byte_bounds
+ false, // data_as_commands
+ true, // auto_refresh
+ 60); // native_frames_per_second
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/nrf/boards/ohs2020_badge/mpconfigboard.h b/ports/nrf/boards/ohs2020_badge/mpconfigboard.h
new file mode 100644
index 000000000..8e4e68dea
--- /dev/null
+++ b/ports/nrf/boards/ohs2020_badge/mpconfigboard.h
@@ -0,0 +1,57 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2016 Glenn Ruben Bakke
+ * Copyright (c) 2018 Dan Halbert for Adafruit Industries
+ * Copyright (c) 2020 Michael Welling
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "nrfx/hal/nrf_gpio.h"
+
+#define MICROPY_HW_BOARD_NAME "Open Hardware Summit 2020 Badge"
+#define MICROPY_HW_MCU_NAME "nRF52840"
+
+#if QSPI_FLASH_FILESYSTEM
+#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 22)
+#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(1, 0)
+#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 20)
+#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(1, 2)
+#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(1, 1)
+#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 23)
+#endif
+
+#if SPI_FLASH_FILESYSTEM
+#define SPI_FLASH_MOSI_PIN &pin_P1_00
+#define SPI_FLASH_MISO_PIN &pin_P0_22
+#define SPI_FLASH_SCK_PIN &pin_P1_01
+#define SPI_FLASH_CS_PIN &pin_P0_23
+#endif
+
+#define BOARD_HAS_CRYSTAL 1
+
+#define DEFAULT_I2C_BUS_SCL (&pin_P1_14)
+#define DEFAULT_I2C_BUS_SDA (&pin_P1_15)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_P0_11)
+#define DEFAULT_SPI_BUS_MOSI (&pin_P0_12)
+#define DEFAULT_SPI_BUS_MISO (&pin_P0_07)
diff --git a/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk
new file mode 100644
index 000000000..46a4c3be6
--- /dev/null
+++ b/ports/nrf/boards/ohs2020_badge/mpconfigboard.mk
@@ -0,0 +1,10 @@
+USB_VID = 0x239A
+USB_PID = 0x8080
+USB_PRODUCT = "OHS2020 Badge"
+USB_MANUFACTURER = "OSHWA"
+
+MCU_CHIP = nrf52840
+
+QSPI_FLASH_FILESYSTEM = 1
+EXTERNAL_FLASH_DEVICE_COUNT = 1
+EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ"
diff --git a/ports/nrf/boards/ohs2020_badge/pins.c b/ports/nrf/boards/ohs2020_badge/pins.c
new file mode 100644
index 000000000..df87deeeb
--- /dev/null
+++ b/ports/nrf/boards/ohs2020_badge/pins.c
@@ -0,0 +1,18 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_25) },
+ { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_P0_28) },
+
+ { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P0_13) },
+ { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P0_02) },
+ { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_P0_14) },
+ { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_P0_08) },
+ { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_P0_11) },
+ { MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_P0_12) },
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
+};
+
+MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.mk b/ports/nrf/boards/particle_argon/mpconfigboard.mk
index f8d3d2aca..a0edfda95 100644
--- a/ports/nrf/boards/particle_argon/mpconfigboard.mk
+++ b/ports/nrf/boards/particle_argon/mpconfigboard.mk
@@ -8,3 +8,7 @@ MCU_CHIP = nrf52840
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "MX25L3233F"
+
+# Support for the Ethernet FeatherWing
+CIRCUITPY_NETWORK = 1
+MICROPY_PY_WIZNET5K = 5500 \ No newline at end of file
diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.mk b/ports/nrf/boards/particle_boron/mpconfigboard.mk
index eada97a73..ccb2d63a1 100644
--- a/ports/nrf/boards/particle_boron/mpconfigboard.mk
+++ b/ports/nrf/boards/particle_boron/mpconfigboard.mk
@@ -8,3 +8,7 @@ MCU_CHIP = nrf52840
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "MX25L3233F"
+
+# Support for the Ethernet FeatherWing
+CIRCUITPY_NETWORK = 1
+MICROPY_PY_WIZNET5K = 5500 \ No newline at end of file
diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.mk b/ports/nrf/boards/particle_xenon/mpconfigboard.mk
index 6062da378..3970b1d05 100644
--- a/ports/nrf/boards/particle_xenon/mpconfigboard.mk
+++ b/ports/nrf/boards/particle_xenon/mpconfigboard.mk
@@ -8,3 +8,7 @@ MCU_CHIP = nrf52840
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "MX25L3233F"
+
+# Support for the Ethernet FeatherWing
+CIRCUITPY_NETWORK = 1
+MICROPY_PY_WIZNET5K = 5500 \ No newline at end of file
diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c
index b9b6d2e88..361fbbf3b 100644
--- a/ports/nrf/common-hal/_bleio/Adapter.c
+++ b/ports/nrf/common-hal/_bleio/Adapter.c
@@ -32,6 +32,7 @@
#include "ble.h"
#include "ble_drv.h"
+#include "bonding.h"
#include "nrfx_power.h"
#include "nrf_nvic.h"
#include "nrf_sdm.h"
@@ -248,6 +249,7 @@ STATIC bool adapter_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
}
ble_drv_remove_event_handler(connection_on_ble_evt, connection);
connection->conn_handle = BLE_CONN_HANDLE_INVALID;
+ connection->pair_status = PAIR_NOT_PAIRED;
if (connection->connection_obj != mp_const_none) {
bleio_connection_obj_t* obj = connection->connection_obj;
obj->connection = NULL;
@@ -692,6 +694,10 @@ mp_obj_t common_hal_bleio_adapter_get_connections(bleio_adapter_obj_t *self) {
return self->connection_objs;
}
+void common_hal_bleio_adapter_erase_bonding(bleio_adapter_obj_t *self) {
+ bonding_erase_storage();
+}
+
void bleio_adapter_gc_collect(bleio_adapter_obj_t* adapter) {
gc_collect_root((void**)adapter, sizeof(bleio_adapter_obj_t) / sizeof(size_t));
gc_collect_root((void**)bleio_connections, sizeof(bleio_connections) / sizeof(size_t));
diff --git a/ports/nrf/common-hal/_bleio/Characteristic.c b/ports/nrf/common-hal/_bleio/Characteristic.c
index c7eec94c0..e311aceb9 100644
--- a/ports/nrf/common-hal/_bleio/Characteristic.c
+++ b/ports/nrf/common-hal/_bleio/Characteristic.c
@@ -33,6 +33,7 @@
#include "shared-bindings/_bleio/Service.h"
#include "common-hal/_bleio/Adapter.h"
+#include "common-hal/_bleio/bonding.h"
STATIC uint16_t characteristic_get_cccd(uint16_t cccd_handle, uint16_t conn_handle) {
uint16_t cccd;
diff --git a/ports/nrf/common-hal/_bleio/Connection.c b/ports/nrf/common-hal/_bleio/Connection.c
index daf5b937b..96e8b8fbe 100644
--- a/ports/nrf/common-hal/_bleio/Connection.c
+++ b/ports/nrf/common-hal/_bleio/Connection.c
@@ -46,13 +46,16 @@
#include "shared-bindings/_bleio/Characteristic.h"
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/UUID.h"
+#include "supervisor/shared/tick.h"
+
+#include "common-hal/_bleio/bonding.h"
#define BLE_ADV_LENGTH_FIELD_SIZE 1
#define BLE_ADV_AD_TYPE_FIELD_SIZE 1
#define BLE_AD_TYPE_FLAGS_DATA_SIZE 1
static const ble_gap_sec_params_t pairing_sec_params = {
- .bond = 0,
+ .bond = 1,
.mitm = 0,
.lesc = 0,
.keypress = 0,
@@ -64,6 +67,13 @@ static const ble_gap_sec_params_t pairing_sec_params = {
.kdist_peer = { .enc = 1, .id = 1},
};
+#define CONNECTION_DEBUG (1)
+#if CONNECTION_DEBUG
+ #define CONNECTION_DEBUG_PRINTF(...) printf(__VA_ARGS__)
+#else
+ #define CONNECTION_DEBUG_PRINTF(...)
+#endif
+
static volatile bool m_discovery_in_process;
static volatile bool m_discovery_successful;
@@ -84,6 +94,7 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
switch (ble_evt->header.evt_id) {
case BLE_GAP_EVT_DISCONNECTED:
+ // Adapter.c does the work for this event.
break;
case BLE_GAP_EVT_PHY_UPDATE_REQUEST: {
@@ -137,6 +148,22 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
break;
}
+ case BLE_GATTS_EVT_WRITE:
+ // A client wrote a value.
+ // If we are bonded and it's a CCCD (UUID 0x2902), store the CCCD value.
+ if (self->conn_handle != BLE_CONN_HANDLE_INVALID &&
+ self->pair_status == PAIR_PAIRED &&
+ ble_evt->evt.gatts_evt.params.write.uuid.type == BLE_UUID_TYPE_BLE &&
+ ble_evt->evt.gatts_evt.params.write.uuid.uuid == 0x2902) {
+ //
+ // Save sys_attr data (CCCD state) in bonding area at
+ // next opportunity, but also remember time of this
+ // request, so we can consolidate closely-spaced requests.
+ self->do_bond_cccds = true;
+ self->do_bond_cccds_request_time = supervisor_ticks_ms64();
+ }
+ break;
+
case BLE_GATTS_EVT_SYS_ATTR_MISSING:
sd_ble_gatts_sys_attr_set(self->conn_handle, NULL, 0, 0);
break;
@@ -197,6 +224,15 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
break;
}
case BLE_GAP_EVT_SEC_PARAMS_REQUEST: {
+ // First time pairing.
+ // 1. Either we or peer initiate the process
+ // 2. Peer asks for security parameters using BLE_GAP_EVT_SEC_PARAMS_REQUEST.
+ // 3. Pair Key exchange ("just works" implemented now; TODO: out-of-band key pairing)
+ // 4. Connection is secured: BLE_GAP_EVT_CONN_SEC_UPDATE
+ // 5. Long-term Keys exchanged: BLE_GAP_EVT_AUTH_STATUS
+
+ bonding_clear_keys(&self->bonding_keys);
+ self->ediv = EDIV_INVALID;
ble_gap_sec_keyset_t keyset = {
.keys_own = {
.p_enc_key = &self->bonding_keys.own_enc,
@@ -214,7 +250,8 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
};
sd_ble_gap_sec_params_reply(self->conn_handle, BLE_GAP_SEC_STATUS_SUCCESS,
- &pairing_sec_params, &keyset);
+ self->is_central ? NULL : &pairing_sec_params,
+ &keyset);
break;
}
@@ -224,13 +261,16 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
break;
case BLE_GAP_EVT_AUTH_STATUS: { // 0x19
- // Pairing process completed
+ // Key exchange completed.
ble_gap_evt_auth_status_t* status = &ble_evt->evt.gap_evt.params.auth_status;
self->sec_status = status->auth_status;
if (status->auth_status == BLE_GAP_SEC_STATUS_SUCCESS) {
- // TODO _ediv = bonding_keys->own_enc.master_id.ediv;
+ self->ediv = self->bonding_keys.own_enc.master_id.ediv;
self->pair_status = PAIR_PAIRED;
+ // Save keys in bonding area at next opportunity.
+ self->do_bond_keys = true;
} else {
+ // Inform busy-waiter pairing has failed.
self->pair_status = PAIR_NOT_PAIRED;
}
break;
@@ -242,17 +282,22 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
// - Else return NULL --> Initiate key exchange
ble_gap_evt_sec_info_request_t* sec_info_request = &ble_evt->evt.gap_evt.params.sec_info_request;
(void) sec_info_request;
- //if ( bond_load_keys(_role, sec_req->master_id.ediv, &bkeys) ) {
- //sd_ble_gap_sec_info_reply(_conn_hdl, &bkeys.own_enc.enc_info, &bkeys.peer_id.id_info, NULL);
- //
- //_ediv = bkeys.own_enc.master_id.ediv;
- // } else {
+ if ( bonding_load_keys(self->is_central, sec_info_request->master_id.ediv, &self->bonding_keys) ) {
+ sd_ble_gap_sec_info_reply(
+ self->conn_handle,
+ &self->bonding_keys.own_enc.enc_info,
+ &self->bonding_keys.peer_id.id_info,
+ NULL);
+ self->ediv = self->bonding_keys.own_enc.master_id.ediv;
+ } else {
+ // We don't have stored keys. Ask for keys.
sd_ble_gap_sec_info_reply(self->conn_handle, NULL, NULL, NULL);
- // }
- break;
+ }
+ break;
}
case BLE_GAP_EVT_CONN_SEC_UPDATE: { // 0x1a
+ // We get this both on first-time pairing and on subsequent pairings using stored keys.
ble_gap_conn_sec_t* conn_sec = &ble_evt->evt.gap_evt.params.conn_sec_update.conn_sec;
if (conn_sec->sec_mode.sm <= 1 && conn_sec->sec_mode.lv <= 1) {
// Security setup did not succeed:
@@ -261,18 +306,17 @@ bool connection_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
// mode >=1 and/or level >=1 means encryption is set up
self->pair_status = PAIR_NOT_PAIRED;
} else {
- //if ( !bond_load_cccd(_role, _conn_hdl, _ediv) ) {
- if (true) { // TODO: no bonding yet
- // Initialize system attributes fresh.
+ if (bonding_load_cccd_info(self->is_central, self->conn_handle, self->ediv)) {
+ // Did an sd_ble_gatts_sys_attr_set() with the stored sys_attr values.
+ } else {
+ // No matching bonding found, so use fresh system attributes.
sd_ble_gatts_sys_attr_set(self->conn_handle, NULL, 0, 0);
}
- // Not quite paired yet: wait for BLE_GAP_EVT_AUTH_STATUS SUCCESS.
- self->ediv = self->bonding_keys.own_enc.master_id.ediv;
+ self->pair_status = PAIR_PAIRED;
}
break;
}
-
default:
return false;
}
@@ -284,8 +328,7 @@ void bleio_connection_clear(bleio_connection_internal_t *self) {
self->conn_handle = BLE_CONN_HANDLE_INVALID;
self->pair_status = PAIR_NOT_PAIRED;
-
- memset(&self->bonding_keys, 0, sizeof(self->bonding_keys));
+ bonding_clear_keys(&self->bonding_keys);
}
bool common_hal_bleio_connection_get_paired(bleio_connection_obj_t *self) {
@@ -565,8 +608,7 @@ STATIC bool discovery_on_ble_evt(ble_evt_t *ble_evt, mp_obj_t payload) {
break;
default:
- // For debugging.
- // mp_printf(&mp_plat_print, "Unhandled discovery event: 0x%04x\n", ble_evt->header.evt_id);
+ // CONNECTION_DEBUG_PRINTF(&mp_plat_print, "Unhandled discovery event: 0x%04x\n", ble_evt->header.evt_id);
return false;
break;
}
diff --git a/ports/nrf/common-hal/_bleio/Connection.h b/ports/nrf/common-hal/_bleio/Connection.h
index 61bbea4a1..282e0c4b5 100644
--- a/ports/nrf/common-hal/_bleio/Connection.h
+++ b/ports/nrf/common-hal/_bleio/Connection.h
@@ -36,6 +36,7 @@
#include "py/objlist.h"
#include "common-hal/_bleio/__init__.h"
+#include "common-hal/_bleio/bonding.h"
#include "shared-module/_bleio/Address.h"
#include "common-hal/_bleio/Service.h"
@@ -56,16 +57,23 @@ typedef struct {
// The advertising data and scan response buffers are held by us, not by the SD, so we must
// maintain them and not change it. If we need to change the contents during advertising,
// there are tricks to get the SD to notice (see DevZone - TBS).
- // EDIV: Encrypted Diversifier: Identifies LTK during legacy pairing.
bonding_keys_t bonding_keys;
+ // EDIV: Encrypted Diversifier: Identifies LTK during legacy pairing.
uint16_t ediv;
- pair_status_t pair_status;
+ volatile pair_status_t pair_status;
uint8_t sec_status; // Internal security status.
mp_obj_t connection_obj;
ble_drv_evt_handler_entry_t handler_entry;
ble_gap_conn_params_t conn_params;
volatile bool conn_params_updating;
uint16_t mtu;
+ // Request that CCCD values for this conenction be saved, using sys_attr values.
+ volatile bool do_bond_cccds;
+ // Request that security key info for this connection be saved.
+ volatile bool do_bond_keys;
+ // Time of setting do_bond_ccds: we delay a bit to consolidate multiple CCCD changes
+ // into one write. Time is currently in ticks_ms.
+ uint64_t do_bond_cccds_request_time;
} bleio_connection_internal_t;
typedef struct {
diff --git a/ports/nrf/common-hal/_bleio/__init__.c b/ports/nrf/common-hal/_bleio/__init__.c
index 8606c89ec..a000c3e7e 100644
--- a/ports/nrf/common-hal/_bleio/__init__.c
+++ b/ports/nrf/common-hal/_bleio/__init__.c
@@ -97,6 +97,7 @@ void bleio_reset() {
common_hal_bleio_adapter_set_enabled(&common_hal_bleio_adapter_obj, false);
}
supervisor_start_bluetooth();
+ bonding_reset();
}
// The singleton _bleio.Adapter object, bound to _bleio.adapter
diff --git a/ports/nrf/common-hal/_bleio/__init__.h b/ports/nrf/common-hal/_bleio/__init__.h
index ecacf7c85..e216795fc 100644
--- a/ports/nrf/common-hal/_bleio/__init__.h
+++ b/ports/nrf/common-hal/_bleio/__init__.h
@@ -30,9 +30,9 @@
void bleio_reset(void);
typedef struct {
- ble_gap_enc_key_t own_enc;
- ble_gap_enc_key_t peer_enc;
- ble_gap_id_key_t peer_id;
+ ble_gap_enc_key_t own_enc;
+ ble_gap_enc_key_t peer_enc;
+ ble_gap_id_key_t peer_id;
} bonding_keys_t;
// We assume variable length data.
diff --git a/ports/nrf/common-hal/_bleio/bonding.c b/ports/nrf/common-hal/_bleio/bonding.c
new file mode 100644
index 000000000..9716b3988
--- /dev/null
+++ b/ports/nrf/common-hal/_bleio/bonding.c
@@ -0,0 +1,309 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Dan Halbert for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "ble.h"
+#include "ble_drv.h"
+#include "shared-bindings/_bleio/__init__.h"
+#include "shared-bindings/_bleio/Adapter.h"
+#include "shared-bindings/nvm/ByteArray.h"
+#include "supervisor/shared/tick.h"
+
+#include "nrf_soc.h"
+
+#include "bonding.h"
+
+// Internal flash area reserved for bonding storage.
+#define BONDING_PAGES_START_ADDR CIRCUITPY_BLE_CONFIG_START_ADDR
+#define BONDING_PAGES_END_ADDR (CIRCUITPY_BLE_CONFIG_START_ADDR + CIRCUITPY_BLE_CONFIG_SIZE)
+
+// First and last four bytes are magic bytes for id and version. Data is in between.
+// 'BD01'
+const uint32_t BONDING_FLAG = ('1' | '0' << 8 | 'D' << 16 | 'B' << 24);
+
+#define BONDING_DATA_START_ADDR (BONDING_PAGES_START_ADDR + sizeof(BONDING_FLAG))
+#define BONDING_DATA_END_ADDR (BONDING_PAGES_END_ADDR - sizeof(BONDING_FLAG))
+
+#define BONDING_START_FLAG_ADDR BONDING_PAGES_START_ADDR
+#define BONDING_END_FLAG_ADDR BONDING_DATA_END_ADDR
+
+// Save both system and user service info.
+#define SYS_ATTR_FLAGS (BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS | BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS)
+
+#if BONDING_DEBUG
+void bonding_print_block(bonding_block_t *block) {
+ printf("at 0x%08lx: is_central: %1d, type: 0x%x, ediv: 0x%04x, data_length: %d\n",
+ (uint32_t) block, block->is_central, block->type, block->ediv, block->data_length);
+}
+
+void bonding_print_keys(bonding_keys_t *keys) {
+ for (size_t i = 0; i < sizeof(bonding_keys_t); i ++) {
+ printf("%x", ((uint8_t*) keys)[i]);
+ }
+ printf("\n");
+}
+#endif
+
+STATIC size_t compute_block_size(uint16_t data_length) {
+ // Round data size up to the nearest 32-bit address.
+ return sizeof(bonding_block_t) + ((data_length + 3) & ~0x3);
+}
+
+void bonding_erase_storage(void) {
+ // Erase all pages in the bonding area.
+ for(uint32_t page_address = BONDING_PAGES_START_ADDR;
+ page_address < BONDING_PAGES_END_ADDR;
+ page_address += FLASH_PAGE_SIZE) {
+ // Argument is page number, not address.
+ sd_flash_page_erase_sync(page_address / FLASH_PAGE_SIZE);
+ }
+ // Write marker words at the beginning and the end of the bonding area.
+ uint32_t flag = BONDING_FLAG;
+ sd_flash_write_sync((uint32_t *) BONDING_START_FLAG_ADDR, &flag, 1);
+ sd_flash_write_sync((uint32_t *) BONDING_END_FLAG_ADDR, &flag, 1);
+}
+
+// Given NULL to start or block address, return the address of the next valid block.
+// The last block returned is the unused block at the end.
+// Return NULL if we have run off the end of the bonding space.
+
+STATIC bonding_block_t *next_block(bonding_block_t *block) {
+ while (1) {
+ // Advance to next block.
+ if (block == NULL) {
+ return (bonding_block_t *) BONDING_DATA_START_ADDR;
+ } else if (block->type == BLOCK_UNUSED) {
+ // Already at last block (the unused block).
+ return NULL;
+ }
+
+ // Advance to next block.
+ block = (bonding_block_t *) ((uint8_t *) block + compute_block_size(block->data_length));
+
+ if (block >= (bonding_block_t *) BONDING_DATA_END_ADDR) {
+ // Went past end of bonding space.
+ return NULL;
+ }
+ if (block->type != BLOCK_INVALID) {
+ // Found an empty or a valid block.
+ return block;
+ }
+ // Invalid block (was erased); try again.
+ }
+}
+
+// Find the block with given is_central, type and ediv value.
+// If type == BLOCK_UNUSED, ediv is ignored and the the sole unused block at the end is returned.
+// If not found, return NULL.
+STATIC bonding_block_t *find_existing_block(bool is_central, bonding_block_type_t type, uint16_t ediv) {
+ bonding_block_t *block = NULL;
+ while (1) {
+ block = next_block(block);
+ if (block == NULL) {
+ return NULL;
+ }
+ // If types match, and block is unused, just return it.
+ // Otherwise check that is_central and ediv match.
+ if (type == block->type) {
+ if (type == BLOCK_UNUSED ||
+ (is_central == block->is_central && ediv == block->ediv)) {
+ return block;
+ }
+ }
+ }
+}
+
+// Get an empty block large enough to store data_length data.
+STATIC bonding_block_t* find_unused_block(uint16_t data_length) {
+ bonding_block_t *unused_block = find_existing_block(true, BLOCK_UNUSED, EDIV_INVALID);
+ // If no more room, erase all existing blocks and start over.
+ if (!unused_block ||
+ (uint8_t *) unused_block + compute_block_size(data_length) >= (uint8_t *) BONDING_DATA_END_ADDR) {
+ bonding_erase_storage();
+ unused_block = (bonding_block_t *) BONDING_DATA_START_ADDR;
+ }
+ return unused_block;
+}
+
+// Set the header word to all 0's, to mark the block as invalid.
+// We don't change data_length, so we can still skip over this block.
+STATIC void invalidate_block(bonding_block_t *block) {
+ uint32_t zero = 0;
+ sd_flash_write_sync((uint32_t *) block, &zero, 1);
+}
+
+// Write bonding block header.
+STATIC void write_block_header(bonding_block_t *dest_block, bonding_block_t *source_block_header) {
+ sd_flash_write_sync((uint32_t *) dest_block, (uint32_t *) source_block_header, sizeof(bonding_block_t) / 4);
+}
+
+// Write variable-length data at end of bonding block.
+STATIC void write_block_data(bonding_block_t *dest_block, uint8_t *data, uint16_t data_length) {
+ // Minimize the number of writes. Datasheet says no more than two writes per word before erasing again.
+
+ // Start writing after the current header.
+ uint32_t *flash_word_p = (uint32_t *) ((uint8_t *) dest_block + sizeof(bonding_block_t));
+ while (1) {
+ uint32_t word = 0xffffffff;
+ memcpy(&word, data, data_length >= 4 ? 4 : data_length);
+ sd_flash_write_sync(flash_word_p, &word, 1);
+ if (data_length <= 4) {
+ break;
+ }
+ data_length -= 4;
+ data += 4;
+ // Increment by word size.
+ flash_word_p++;
+ }
+}
+
+STATIC void write_sys_attr_block(bleio_connection_internal_t *connection) {
+ uint16_t length = 0;
+ // First find out how big a buffer we need, then fetch the data.
+ if(sd_ble_gatts_sys_attr_get(connection->conn_handle, NULL, &length, SYS_ATTR_FLAGS) != NRF_SUCCESS) {
+ return;
+ }
+ uint8_t sys_attr[length];
+ if(sd_ble_gatts_sys_attr_get(connection->conn_handle, sys_attr, &length, SYS_ATTR_FLAGS) != NRF_SUCCESS) {
+ return;
+ }
+
+ // Is there an existing sys_attr block that matches the current sys_attr data?
+ bonding_block_t *existing_block =
+ find_existing_block(connection->is_central, BLOCK_SYS_ATTR, connection->ediv);
+ if (existing_block) {
+ if (length == existing_block->data_length &&
+ memcmp(sys_attr, existing_block->data, length) == 0) {
+ // Identical block found. No need to store again.
+ return;
+ }
+ // Data doesn't match. Invalidate block and store a new one.
+ invalidate_block(existing_block);
+ }
+
+ bonding_block_t block_header = {
+ .is_central = connection->is_central,
+ .type = BLOCK_SYS_ATTR,
+ .ediv = connection->ediv,
+ .conn_handle = connection->conn_handle,
+ .data_length = length,
+ };
+ bonding_block_t *new_block = find_unused_block(length);
+ write_block_header(new_block, &block_header);
+ write_block_data(new_block, sys_attr, length);
+ return;
+}
+
+STATIC void write_keys_block(bleio_connection_internal_t *connection) {
+ uint16_t const ediv = connection->is_central
+ ? connection->bonding_keys.peer_enc.master_id.ediv
+ : connection->bonding_keys.own_enc.master_id.ediv;
+
+ // Is there an existing keys block that matches?
+ bonding_block_t *existing_block = find_existing_block(connection->is_central, BLOCK_KEYS, ediv);
+ if (existing_block) {
+ if (existing_block->data_length == sizeof(bonding_keys_t) &&
+ memcmp(existing_block->data, &connection->bonding_keys, sizeof(bonding_keys_t)) == 0) {
+ // Identical block found. No need to store again.
+ return;
+ }
+ // Data doesn't match. Invalidate block and store a new one.
+ invalidate_block(existing_block);
+ }
+
+ bonding_block_t block_header = {
+ .is_central = connection->is_central,
+ .type = BLOCK_KEYS,
+ .ediv = ediv,
+ .conn_handle = connection->conn_handle,
+ .data_length = sizeof(bonding_keys_t),
+ };
+ bonding_block_t *new_block = find_unused_block(sizeof(bonding_keys_t));
+ write_block_header(new_block, &block_header);
+ write_block_data(new_block, (uint8_t *) &connection->bonding_keys, sizeof(bonding_keys_t));
+}
+
+void bonding_clear_keys(bonding_keys_t *bonding_keys) {
+ memset((uint8_t*) bonding_keys, 0, sizeof(bonding_keys_t));
+}
+
+void bonding_reset(void) {
+ if (BONDING_FLAG != *((uint32_t *) BONDING_START_FLAG_ADDR) ||
+ BONDING_FLAG != *((uint32_t *) BONDING_END_FLAG_ADDR)) {
+ bonding_erase_storage();
+ }
+}
+
+// Write bonding blocks to flash. Requests have been queued during evt handlers.
+void bonding_background(void) {
+ // A paired connection will request that its keys and CCCD values be stored.
+ // The CCCD store whenever a CCCD value is written.
+ for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
+ bleio_connection_internal_t *connection = &bleio_connections[i];
+
+ uint64_t current_ticks_ms = supervisor_ticks_ms64();
+ // Wait at least one second before saving CCCD, to consolidate
+ // writes that involve multiple CCCDs. For instance, for HID,
+ // three CCCD's are set in short succession by the HID client.
+ if (connection->do_bond_cccds &&
+ current_ticks_ms - connection->do_bond_cccds_request_time >= 1000) {
+ write_sys_attr_block(connection);
+ connection->do_bond_cccds = false;
+ }
+
+ if (connection->do_bond_keys) {
+ write_keys_block(connection);
+ connection->do_bond_keys = false;
+ }
+ }
+}
+
+bool bonding_load_cccd_info(bool is_central, uint16_t conn_handle, uint16_t ediv) {
+ bonding_block_t *block = find_existing_block(is_central, BLOCK_SYS_ATTR, ediv);
+ if (block == NULL) {
+ return false;
+ }
+
+ return NRF_SUCCESS ==
+ sd_ble_gatts_sys_attr_set(conn_handle, block->data, block->data_length, SYS_ATTR_FLAGS);
+}
+
+bool bonding_load_keys(bool is_central, uint16_t ediv, bonding_keys_t *bonding_keys) {
+ bonding_block_t *block = find_existing_block(is_central, BLOCK_KEYS, ediv);
+ if (block == NULL) {
+ return false;
+ }
+ if (sizeof(bonding_keys_t) != block->data_length) {
+ // bonding_keys_t is a fixed length, so lengths should match.
+ return false;
+ }
+
+ memcpy(bonding_keys, block->data, block->data_length);
+ return true;
+}
diff --git a/ports/nrf/common-hal/_bleio/bonding.h b/ports/nrf/common-hal/_bleio/bonding.h
new file mode 100644
index 000000000..cb8e7c427
--- /dev/null
+++ b/ports/nrf/common-hal/_bleio/bonding.h
@@ -0,0 +1,85 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Dan Halbert for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_BONDING_H
+#define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_BONDING_H
+
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "ble.h"
+#include "ble_drv.h"
+#include "common-hal/_bleio/__init__.h"
+
+#define EDIV_INVALID (0xffff)
+
+#define BONDING_DEBUG (1)
+#if BONDING_DEBUG
+ #define BONDING_DEBUG_PRINTF(...) printf(__VA_ARGS__)
+ #define BONDING_DEBUG_PRINT_BLOCK(block) bonding_print_block(block)
+ #define BONDING_DEBUG_PRINT_KEYS(keys) bonding_print_keys(keys)
+#else
+ #define BONDING_DEBUG_PRINTF(...)
+ #define BONDING_DEBUG_PRINT_BLOCK(block)
+ #define BONDING_DEBUG_PRINT_KEYS(keys)
+#endif
+
+// Bonding data is stored in variable-length blocks consecutively in
+// erased flash (all 1's). The blocks are 32-bit aligned, though the
+// data may be any number of bytes. We hop through the blocks using
+// the size field to find the next block. When we hit a word that is
+// all 1's, we have reached the end of the blocks. We can write a new
+// block there.
+
+typedef enum {
+ BLOCK_INVALID = 0, // Ignore this block
+ BLOCK_KEYS = 1, // Block contains bonding keys.
+ BLOCK_SYS_ATTR = 2, // Block contains sys_attr values (CCCD settings, etc.).
+ BLOCK_UNUSED = 0xff, // Initial erased value.
+} bonding_block_type_t;
+
+typedef struct {
+ bool is_central: 1; // 1 if data is for a central role.
+ uint16_t reserved: 7; // Not currently used
+ bonding_block_type_t type: 8; // What kind of data is stored in.
+ uint16_t ediv; // ediv value; used as a lookup key.
+ uint16_t conn_handle; // Connection handle: used when a BLOCK_SYS_ATTR is queued to write.
+ // Not used as a key, etc.
+ uint16_t data_length; // Length of data in bytes, including ediv, not including padding.
+ // End of block header. 32-bit boundary here.
+ uint8_t data[]; // Rest of data in the block. Needs to be 32-bit aligned.
+ // Block is padded to 32-bit alignment.
+} bonding_block_t;
+
+void bonding_background(void);
+void bonding_erase_storage(void);
+void bonding_reset(void);
+void bonding_clear_keys(bonding_keys_t *bonding_keys);
+bool bonding_load_cccd_info(bool is_central, uint16_t conn_handle, uint16_t ediv);
+bool bonding_load_keys(bool is_central, uint16_t ediv, bonding_keys_t *bonding_keys);
+
+#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_BONDING_H
diff --git a/ports/nrf/common-hal/neopixel_write/__init__.c b/ports/nrf/common-hal/neopixel_write/__init__.c
index 3052e908d..8495a359d 100644
--- a/ports/nrf/common-hal/neopixel_write/__init__.c
+++ b/ports/nrf/common-hal/neopixel_write/__init__.c
@@ -102,7 +102,7 @@ uint32_t next_start_tick_us = 1000;
void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout, uint8_t *pixels, uint32_t numBytes) {
// To support both the SoftDevice + Neopixels we use the EasyDMA
- // feature from the NRF25. However this technique implies to
+ // feature from the NRF52. However this technique implies to
// generate a pattern and store it on the memory. The actual
// memory used in bytes corresponds to the following formula:
// totalMem = numBytes*8*2+(2*2)
@@ -113,22 +113,28 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout
// using DWT
#define PATTERN_SIZE(numBytes) (numBytes * 8 * sizeof(uint16_t) + 2 * sizeof(uint16_t))
+// Allocate PWM space for up to STACK_PIXELS on the stack, to avoid malloc'ing.
+// We may need to write to the status neopixel or to Circuit Playground NeoPixels
+// when we cannot malloc, between VM instantiations.
+// We need space for at least 10 pixels for Circuit Playground, but let's choose 24
+// to handle larger NeoPixel rings without malloc'ing.
+#define STACK_PIXELS 24
uint32_t pattern_size = PATTERN_SIZE(numBytes);
uint16_t* pixels_pattern = NULL;
bool pattern_on_heap = false;
- // Use the stack to store 1 pixels worth of PWM data for the status led. uint32_t to ensure alignment.
- // Make it at least as big as PATTERN_SIZE(3), for one pixel of RGB data.
+ // Use the stack to store STACK_PIXEL's worth of PWM data. uint32_t to ensure alignment.
+ // It is 3*STACK_PIXELS to handle RGB.
// PATTERN_SIZE is a multiple of 4, so we don't need round up to make sure one_pixel is large enough.
- uint32_t one_pixel[PATTERN_SIZE(3)/sizeof(uint32_t)];
+ uint32_t stack_pixels[PATTERN_SIZE(3 * STACK_PIXELS) / sizeof(uint32_t)];
NRF_PWM_Type* pwm = find_free_pwm();
// only malloc if there is PWM device available
if ( pwm != NULL ) {
- if (pattern_size <= sizeof(one_pixel)) {
- pixels_pattern = (uint16_t *) one_pixel;
+ if (pattern_size <= sizeof(stack_pixels)) {
+ pixels_pattern = (uint16_t *) stack_pixels;
} else {
uint8_t sd_en = 0;
(void) sd_softdevice_is_enabled(&sd_en);
diff --git a/ports/nrf/common-hal/nvm/ByteArray.c b/ports/nrf/common-hal/nvm/ByteArray.c
index 7d733ce7b..6b2f04a61 100644
--- a/ports/nrf/common-hal/nvm/ByteArray.c
+++ b/ports/nrf/common-hal/nvm/ByteArray.c
@@ -36,21 +36,17 @@ uint32_t common_hal_nvm_bytearray_get_length(nvm_bytearray_obj_t *self) {
return self->len;
}
-static void write_page(uint32_t page_addr, uint32_t offset, uint32_t len, uint8_t *bytes) {
+static bool write_page(uint32_t page_addr, uint32_t offset, uint32_t len, uint8_t *bytes) {
// Write a whole page to flash, buffering it first and then erasing and rewriting
// it since we can only clear a whole page at a time.
- bool status;
if (offset == 0 && len == FLASH_PAGE_SIZE) {
- status = nrf_nvm_safe_flash_page_write(page_addr, bytes);
+ return nrf_nvm_safe_flash_page_write(page_addr, bytes);
} else {
uint8_t buffer[FLASH_PAGE_SIZE];
memcpy(buffer, (uint8_t *)page_addr, FLASH_PAGE_SIZE);
memcpy(buffer + offset, bytes, len);
- status = nrf_nvm_safe_flash_page_write(page_addr, buffer);
- }
- if (!status) {
- mp_raise_OSError_msg(translate("Flash write failed"));
+ return nrf_nvm_safe_flash_page_write(page_addr, buffer);
}
}
@@ -63,7 +59,9 @@ bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self,
while (len) {
uint32_t write_len = MIN(len, FLASH_PAGE_SIZE - offset);
- write_page(page_addr, offset, write_len, values);
+ if (!write_page(page_addr, offset, write_len, values)) {
+ return false;
+ }
len -= write_len;
values += write_len;
page_addr += FLASH_PAGE_SIZE;
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index cb25870dc..b6635965d 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -152,10 +152,9 @@
#endif
-
-
#define MICROPY_PORT_ROOT_POINTERS \
CIRCUITPY_COMMON_ROOT_POINTERS \
ble_drv_evt_handler_entry_t* ble_drv_evt_handler_entries; \
+
#endif // NRF5_MPCONFIGPORT_H__
diff --git a/ports/nrf/peripherals/nrf/nvm.c b/ports/nrf/peripherals/nrf/nvm.c
index 1501ccfc9..63b168f14 100644
--- a/ports/nrf/peripherals/nrf/nvm.c
+++ b/ports/nrf/peripherals/nrf/nvm.c
@@ -38,23 +38,62 @@
#include "ble_drv.h"
#include "nrf_sdm.h"
+STATIC bool sd_is_enabled(void) {
+ uint8_t sd_en = 0;
+ (void) sd_softdevice_is_enabled(&sd_en);
+ return sd_en;
+}
+
STATIC void sd_flash_operation_start(void) {
sd_flash_operation_status = SD_FLASH_OPERATION_IN_PROGRESS;
}
STATIC sd_flash_operation_status_t sd_flash_operation_wait_until_done(void) {
- while (sd_flash_operation_status == SD_FLASH_OPERATION_IN_PROGRESS) {
- sd_app_evt_wait();
+ // If the SD is not enabled, no events are generated, so just return immediately.
+ if (sd_is_enabled()) {
+ while (sd_flash_operation_status == SD_FLASH_OPERATION_IN_PROGRESS) {
+ sd_app_evt_wait();
+ }
+ } else {
+ sd_flash_operation_status = SD_FLASH_OPERATION_DONE;
}
return sd_flash_operation_status;
+
+}
+
+bool sd_flash_page_erase_sync(uint32_t page_number) {
+ sd_flash_operation_start();
+ if (sd_flash_page_erase(page_number) != NRF_SUCCESS) {
+ return false;
+ }
+ if (sd_flash_operation_wait_until_done() == SD_FLASH_OPERATION_ERROR) {
+ return false;
+ }
+ return true;
+}
+
+bool sd_flash_write_sync(uint32_t *dest_words, uint32_t* src_words, uint32_t num_words) {
+ sd_flash_operation_start();
+ if (sd_flash_write(dest_words, src_words, num_words) != NRF_SUCCESS) {
+ return false;
+ }
+ if (sd_flash_operation_wait_until_done() == SD_FLASH_OPERATION_ERROR) {
+ return false;
+ }
+ return true;
}
+
#endif
+// The nRF52840 datasheet specifies a maximum of two writes to a flash
+// location before an erase is necessary, even if the write is all
+// ones (erased state). So we can't avoid erases even if the page
+// appears to be already erased (all ones), unless we keep track of
+// writes to a page.
+
bool nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data) {
#ifdef BLUETOOTH_SD
- uint8_t sd_en = 0;
- (void) sd_softdevice_is_enabled(&sd_en);
- if (sd_en) {
+ if (sd_is_enabled()) {
uint32_t err_code;
sd_flash_operation_status_t status;
diff --git a/ports/nrf/peripherals/nrf/nvm.h b/ports/nrf/peripherals/nrf/nvm.h
index e54e953df..8ba95773d 100644
--- a/ports/nrf/peripherals/nrf/nvm.h
+++ b/ports/nrf/peripherals/nrf/nvm.h
@@ -27,4 +27,9 @@
#define FLASH_PAGE_SIZE (4096)
+#if BLUETOOTH_SD
+bool sd_flash_page_erase_sync(uint32_t page_number);
+bool sd_flash_write_sync(uint32_t *dest_words, uint32_t* src_words, uint32_t num_words);
+#endif
+
bool nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data);
diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c
index 637ab8c36..6a4813c66 100644
--- a/ports/nrf/supervisor/port.c
+++ b/ports/nrf/supervisor/port.c
@@ -143,6 +143,14 @@ void reset_cpu(void) {
NVIC_SystemReset();
}
+uint32_t *port_heap_get_bottom(void) {
+ return port_stack_get_limit();
+}
+
+uint32_t *port_heap_get_top(void) {
+ return port_stack_get_top();
+}
+
uint32_t *port_stack_get_limit(void) {
return &_ebss;
}
diff --git a/ports/stm32f4/supervisor/port.c b/ports/stm32f4/supervisor/port.c
index 19520255e..397923f23 100644
--- a/ports/stm32f4/supervisor/port.c
+++ b/ports/stm32f4/supervisor/port.c
@@ -51,6 +51,8 @@ safe_mode_t port_init(void) {
tick_init();
+ board_init();
+
return NO_SAFE_MODE;
}
@@ -70,6 +72,14 @@ void reset_cpu(void) {
NVIC_SystemReset();
}
+uint32_t *port_heap_get_bottom(void) {
+ return port_stack_get_limit();
+}
+
+uint32_t *port_heap_get_top(void) {
+ return port_stack_get_top();
+}
+
uint32_t *port_stack_get_limit(void) {
return &_ebss;
}
diff --git a/py/emitnative.c b/py/emitnative.c
index 6d23bf097..60f31d15f 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -459,6 +459,7 @@ STATIC void emit_native_end_pass(emit_t *emit) {
type_sig |= (emit->local_vtype[i] & 0xf) << (i * 4 + 4);
}
+ #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
mp_emit_glue_assign_native(emit->scope->raw_code,
emit->do_viper_types ? MP_CODE_NATIVE_VIPER : MP_CODE_NATIVE_PY,
diff --git a/py/gc.c b/py/gc.c
index 5e631f5ed..fef67f61b 100755
--- a/py/gc.c
+++ b/py/gc.c
@@ -464,6 +464,10 @@ void gc_info(gc_info_t *info) {
GC_EXIT();
}
+bool gc_alloc_possible(void) {
+ return MP_STATE_MEM(gc_pool_start) != 0;
+}
+
// We place long lived objects at the end of the heap rather than the start. This reduces
// fragmentation by localizing the heap churn to one portion of memory (the start of the heap.)
void *gc_alloc(size_t n_bytes, bool has_finaliser, bool long_lived) {
diff --git a/py/gc.h b/py/gc.h
index cd63ba94c..2a0811f4e 100644
--- a/py/gc.h
+++ b/py/gc.h
@@ -58,6 +58,8 @@ void gc_collect_ptr(void *ptr);
void gc_collect_root(void **ptrs, size_t len);
void gc_collect_end(void);
+// Is the gc heap available?
+bool gc_alloc_possible(void);
void *gc_alloc(size_t n_bytes, bool has_finaliser, bool long_lived);
// Use this function to sweep the whole heap and run all finalisers
diff --git a/py/map.c b/py/map.c
index 6abf4853f..57c11dbc9 100644
--- a/py/map.c
+++ b/py/map.c
@@ -33,6 +33,8 @@
#include "py/misc.h"
#include "py/runtime.h"
+#include "supervisor/linker.h"
+
#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#else // don't print debugging info
@@ -143,7 +145,7 @@ STATIC void mp_map_rehash(mp_map_t *map) {
// - returns slot, with key non-null and value=MP_OBJ_NULL if it was added
// MP_MAP_LOOKUP_REMOVE_IF_FOUND behaviour:
// - returns NULL if not found, else the slot if was found in with key null and value non-null
-mp_map_elem_t *mp_map_lookup(mp_map_t *map, mp_obj_t index, mp_map_lookup_kind_t lookup_kind) {
+mp_map_elem_t *PLACE_IN_ITCM(mp_map_lookup)(mp_map_t *map, mp_obj_t index, mp_map_lookup_kind_t lookup_kind) {
// If the map is a fixed array then we must only be called for a lookup
assert(!map->is_fixed || lookup_kind == MP_MAP_LOOKUP);
diff --git a/py/mpstate.c b/py/mpstate.c
index 6ce64adfd..32f1d60a5 100644
--- a/py/mpstate.c
+++ b/py/mpstate.c
@@ -25,9 +25,10 @@
*/
#include "py/mpstate.h"
+#include "supervisor/linker.h"
#if MICROPY_DYNAMIC_COMPILER
mp_dynamic_compiler_t mp_dynamic_compiler = {0};
#endif
-mp_state_ctx_t mp_state_ctx;
+mp_state_ctx_t PLACE_IN_DTCM_BSS(mp_state_ctx);
diff --git a/py/obj.c b/py/obj.c
index 09e71be4d..f1e00de1a 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -38,6 +38,7 @@
#include "py/stackctrl.h"
#include "py/stream.h" // for mp_obj_print
+#include "supervisor/linker.h"
#include "supervisor/shared/stack.h"
#include "supervisor/shared/translate.h"
@@ -128,7 +129,7 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) {
mp_print_str(print, "\n");
}
-bool mp_obj_is_true(mp_obj_t arg) {
+bool PLACE_IN_ITCM(mp_obj_is_true)(mp_obj_t arg) {
if (arg == mp_const_false) {
return 0;
} else if (arg == mp_const_true) {
diff --git a/py/objdict.c b/py/objdict.c
index 683fcb748..3ec3cbe80 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -31,6 +31,7 @@
#include "py/builtin.h"
#include "py/objtype.h"
+#include "supervisor/linker.h"
#include "supervisor/shared/translate.h"
#define MP_OBJ_IS_DICT_TYPE(o) (MP_OBJ_IS_OBJ(o) && ((mp_obj_base_t*)MP_OBJ_TO_PTR(o))->type->make_new == dict_make_new)
@@ -324,7 +325,7 @@ STATIC mp_obj_t dict_popitem(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(dict_popitem_obj, dict_popitem);
-STATIC mp_obj_t dict_update(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
+STATIC mp_obj_t PLACE_IN_ITCM(dict_update)(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
mp_check_self(MP_OBJ_IS_DICT_TYPE(args[0]));
mp_obj_dict_t *self = MP_OBJ_TO_PTR(args[0]);
mp_ensure_not_fixed(self);
@@ -590,7 +591,7 @@ size_t mp_obj_dict_len(mp_obj_t self_in) {
return self->map.used;
}
-mp_obj_t mp_obj_dict_store(mp_obj_t self_in, mp_obj_t key, mp_obj_t value) {
+mp_obj_t PLACE_IN_ITCM(mp_obj_dict_store)(mp_obj_t self_in, mp_obj_t key, mp_obj_t value) {
mp_check_self(MP_OBJ_IS_DICT_TYPE(self_in));
mp_obj_dict_t *self = MP_OBJ_TO_PTR(self_in);
mp_ensure_not_fixed(self);
diff --git a/py/objfun.c b/py/objfun.c
index 7e5899456..c586a290a 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -34,6 +34,8 @@
#include "py/bc.h"
#include "py/stackctrl.h"
+#include "supervisor/linker.h"
+
#if MICROPY_DEBUG_VERBOSE // print debugging info
#define DEBUG_PRINT (1)
#else // don't print debugging info
@@ -249,7 +251,7 @@ mp_code_state_t *mp_obj_fun_bc_prepare_codestate(mp_obj_t self_in, size_t n_args
}
#endif
-STATIC mp_obj_t fun_bc_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t PLACE_IN_ITCM(fun_bc_call)(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args) {
MP_STACK_CHECK();
DEBUG_printf("Input n_args: " UINT_FMT ", n_kw: " UINT_FMT "\n", n_args, n_kw);
diff --git a/py/qstr.c b/py/qstr.c
index eea57c1e0..bb8024435 100755
--- a/py/qstr.c
+++ b/py/qstr.c
@@ -33,6 +33,8 @@
#include "py/qstr.h"
#include "py/gc.h"
+#include "supervisor/linker.h"
+
// NOTE: we are using linear arrays to store and search for qstr's (unique strings, interned strings)
// ultimately we will replace this with a static hash table of some kind
// also probably need to include the length in the string data, to allow null bytes in the string
@@ -248,7 +250,7 @@ qstr qstr_from_strn(const char *str, size_t len) {
return q;
}
-mp_uint_t qstr_hash(qstr q) {
+mp_uint_t PLACE_IN_ITCM(qstr_hash)(qstr q) {
return Q_GET_HASH(find_qstr(q));
}
diff --git a/py/runtime.c b/py/runtime.c
index a786619bf..48416bab2 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -200,7 +200,7 @@ mp_obj_t mp_load_build_class(void) {
return MP_OBJ_FROM_PTR(&mp_builtin___build_class___obj);
}
-void mp_store_name(qstr qst, mp_obj_t obj) {
+void PLACE_IN_ITCM(mp_store_name)(qstr qst, mp_obj_t obj) {
DEBUG_OP_printf("store name %s <- %p\n", qstr_str(qst), obj);
mp_obj_dict_store(MP_OBJ_FROM_PTR(mp_locals_get()), MP_OBJ_NEW_QSTR(qst), obj);
}
@@ -211,7 +211,7 @@ void mp_delete_name(qstr qst) {
mp_obj_dict_delete(MP_OBJ_FROM_PTR(mp_locals_get()), MP_OBJ_NEW_QSTR(qst));
}
-void mp_store_global(qstr qst, mp_obj_t obj) {
+void PLACE_IN_ITCM(mp_store_global)(qstr qst, mp_obj_t obj) {
DEBUG_OP_printf("store global %s <- %p\n", qstr_str(qst), obj);
mp_obj_dict_store(MP_OBJ_FROM_PTR(mp_globals_get()), MP_OBJ_NEW_QSTR(qst), obj);
}
@@ -283,7 +283,7 @@ mp_obj_t mp_unary_op(mp_unary_op_t op, mp_obj_t arg) {
}
}
-mp_obj_t mp_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
+mp_obj_t PLACE_IN_ITCM(mp_binary_op)(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs) {
DEBUG_OP_printf("binary " UINT_FMT " %q %p %p\n", op, mp_binary_op_method_name[op], lhs, rhs);
// TODO correctly distinguish inplace operators for mutable objects
@@ -641,7 +641,7 @@ mp_obj_t mp_call_method_n_kw(size_t n_args, size_t n_kw, const mp_obj_t *args) {
#if !MICROPY_STACKLESS
STATIC
#endif
-void mp_call_prepare_args_n_kw_var(bool have_self, size_t n_args_n_kw, const mp_obj_t *args, mp_call_args_t *out_args) {
+void PLACE_IN_ITCM(mp_call_prepare_args_n_kw_var)(bool have_self, size_t n_args_n_kw, const mp_obj_t *args, mp_call_args_t *out_args) {
mp_obj_t fun = *args++;
mp_obj_t self = MP_OBJ_NULL;
if (have_self) {
diff --git a/py/runtime.h b/py/runtime.h
index e8398cf0e..4121352df 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -29,6 +29,8 @@
#include "py/mpstate.h"
#include "py/pystack.h"
+#include "supervisor/linker.h"
+
typedef enum {
MP_VM_RETURN_NORMAL,
MP_VM_RETURN_YIELD,
@@ -84,10 +86,10 @@ void mp_arg_parse_all_kw_array(size_t n_pos, size_t n_kw, const mp_obj_t *args,
NORETURN void mp_arg_error_terse_mismatch(void);
NORETURN void mp_arg_error_unimpl_kw(void);
-static inline mp_obj_dict_t *mp_locals_get(void) { return MP_STATE_THREAD(dict_locals); }
-static inline void mp_locals_set(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_locals) = d; }
-static inline mp_obj_dict_t *mp_globals_get(void) { return MP_STATE_THREAD(dict_globals); }
-static inline void mp_globals_set(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_globals) = d; }
+static inline mp_obj_dict_t *PLACE_IN_ITCM(mp_locals_get)(void) { return MP_STATE_THREAD(dict_locals); }
+static inline void PLACE_IN_ITCM(mp_locals_set)(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_locals) = d; }
+static inline mp_obj_dict_t *PLACE_IN_ITCM(mp_globals_get)(void) { return MP_STATE_THREAD(dict_globals); }
+static inline void PLACE_IN_ITCM(mp_globals_set)(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_globals) = d; }
mp_obj_t mp_load_name(qstr qst);
mp_obj_t mp_load_global(qstr qst);
diff --git a/py/sequence.c b/py/sequence.c
index a750e5bac..0e668ea2a 100644
--- a/py/sequence.c
+++ b/py/sequence.c
@@ -34,6 +34,11 @@
#define SWAP(type, var1, var2) { type t = var2; var2 = var1; var1 = t; }
+#if __GNUC__ < 5
+// n.b. does not actually detect overflow!
+#define __builtin_mul_overflow(a, b, x) (*(x) = (a) * (b), false)
+#endif
+
// Detect when a multiply causes an overflow.
size_t mp_seq_multiply_len(size_t item_sz, size_t len) {
size_t new_len;
diff --git a/py/vm.c b/py/vm.c
index 353fc8810..4f0340681 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -35,6 +35,8 @@
#include "py/bc0.h"
#include "py/bc.h"
+#include "supervisor/linker.h"
+
#if 0
#define TRACE(ip) printf("sp=%d ", (int)(sp - &code_state->state[0] + 1)); mp_bytecode_print2(ip, 1, code_state->fun_bc->const_table);
#else
@@ -116,7 +118,7 @@
// MP_VM_RETURN_NORMAL, sp valid, return value in *sp
// MP_VM_RETURN_YIELD, ip, sp valid, yielded value in *sp
// MP_VM_RETURN_EXCEPTION, exception in fastn[0]
-mp_vm_return_kind_t mp_execute_bytecode(mp_code_state_t *code_state, volatile mp_obj_t inject_exc) {
+mp_vm_return_kind_t PLACE_IN_ITCM(mp_execute_bytecode)(mp_code_state_t *code_state, volatile mp_obj_t inject_exc) {
#define SELECTIVE_EXC_IP (0)
#if SELECTIVE_EXC_IP
#define MARK_EXC_IP_SELECTIVE() { code_state->ip = ip; } /* stores ip 1 byte past last opcode */
diff --git a/py/vmentrytable.h b/py/vmentrytable.h
index a0e2d4065..31a96dbec 100644
--- a/py/vmentrytable.h
+++ b/py/vmentrytable.h
@@ -29,7 +29,9 @@
#pragma clang diagnostic ignored "-Winitializer-overrides"
#endif // __clang__
-static const void *const entry_table[256] = {
+#include "supervisor/linker.h"
+
+static const void *const PLACE_IN_DTCM_DATA(entry_table[256]) = {
[0 ... 255] = &&entry_default,
[MP_BC_LOAD_CONST_FALSE] = &&entry_MP_BC_LOAD_CONST_FALSE,
[MP_BC_LOAD_CONST_NONE] = &&entry_MP_BC_LOAD_CONST_NONE,
diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c
index 5d3211b0c..500055cf3 100644
--- a/shared-bindings/_bleio/Adapter.c
+++ b/shared-bindings/_bleio/Adapter.c
@@ -360,22 +360,35 @@ STATIC mp_obj_t bleio_adapter_connect(mp_uint_t n_args, const mp_obj_t *pos_args
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_adapter_connect_obj, 2, bleio_adapter_connect);
+//| .. method:: erase_bonding()
+//|
+//| Erase all bonding information stored in flash memory.
+STATIC mp_obj_t bleio_adapter_erase_bonding(mp_obj_t self_in) {
+ bleio_adapter_obj_t *self = MP_OBJ_TO_PTR(self_in);
+
+ common_hal_bleio_adapter_erase_bonding(self);
+
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_erase_bonding_obj, bleio_adapter_erase_bonding);
STATIC const mp_rom_map_elem_t bleio_adapter_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_enabled), MP_ROM_PTR(&bleio_adapter_enabled_obj) },
{ MP_ROM_QSTR(MP_QSTR_address), MP_ROM_PTR(&bleio_adapter_address_obj) },
- { MP_ROM_QSTR(MP_QSTR_name), MP_ROM_PTR(&bleio_adapter_name_obj) },
+ { MP_ROM_QSTR(MP_QSTR_name), MP_ROM_PTR(&bleio_adapter_name_obj) },
- { MP_ROM_QSTR(MP_QSTR_start_advertising), MP_ROM_PTR(&bleio_adapter_start_advertising_obj) },
- { MP_ROM_QSTR(MP_QSTR_stop_advertising), MP_ROM_PTR(&bleio_adapter_stop_advertising_obj) },
+ { MP_ROM_QSTR(MP_QSTR_start_advertising), MP_ROM_PTR(&bleio_adapter_start_advertising_obj) },
+ { MP_ROM_QSTR(MP_QSTR_stop_advertising), MP_ROM_PTR(&bleio_adapter_stop_advertising_obj) },
{ MP_ROM_QSTR(MP_QSTR_start_scan), MP_ROM_PTR(&bleio_adapter_start_scan_obj) },
- { MP_ROM_QSTR(MP_QSTR_stop_scan), MP_ROM_PTR(&bleio_adapter_stop_scan_obj) },
+ { MP_ROM_QSTR(MP_QSTR_stop_scan), MP_ROM_PTR(&bleio_adapter_stop_scan_obj) },
- { MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&bleio_adapter_connect_obj) },
+ { MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&bleio_adapter_connect_obj) },
- { MP_ROM_QSTR(MP_QSTR_connected), MP_ROM_PTR(&bleio_adapter_connected_obj) },
+ { MP_ROM_QSTR(MP_QSTR_connected), MP_ROM_PTR(&bleio_adapter_connected_obj) },
{ MP_ROM_QSTR(MP_QSTR_connections), MP_ROM_PTR(&bleio_adapter_connections_obj) },
+
+ { MP_ROM_QSTR(MP_QSTR_erase_bonding), MP_ROM_PTR(&bleio_adapter_erase_bonding_obj) },
};
STATIC MP_DEFINE_CONST_DICT(bleio_adapter_locals_dict, bleio_adapter_locals_dict_table);
diff --git a/shared-bindings/_bleio/Adapter.h b/shared-bindings/_bleio/Adapter.h
index 4340d82c1..9b20a461a 100644
--- a/shared-bindings/_bleio/Adapter.h
+++ b/shared-bindings/_bleio/Adapter.h
@@ -48,13 +48,15 @@ extern void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const c
extern uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len);
extern void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo);
-void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self);
+extern void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self);
-mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active);
-void common_hal_bleio_adapter_stop_scan(bleio_adapter_obj_t *self);
+extern mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active);
+extern void common_hal_bleio_adapter_stop_scan(bleio_adapter_obj_t *self);
-bool common_hal_bleio_adapter_get_connected(bleio_adapter_obj_t *self);
-mp_obj_t common_hal_bleio_adapter_get_connections(bleio_adapter_obj_t *self);
-mp_obj_t common_hal_bleio_adapter_connect(bleio_adapter_obj_t *self, bleio_address_obj_t *address, mp_float_t timeout);
+extern bool common_hal_bleio_adapter_get_connected(bleio_adapter_obj_t *self);
+extern mp_obj_t common_hal_bleio_adapter_get_connections(bleio_adapter_obj_t *self);
+extern mp_obj_t common_hal_bleio_adapter_connect(bleio_adapter_obj_t *self, bleio_address_obj_t *address, mp_float_t timeout);
+
+extern void common_hal_bleio_adapter_erase_bonding(bleio_adapter_obj_t *self);
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_ADAPTER_H
diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c
index 7fcf274da..e55191f7c 100644
--- a/shared-bindings/_bleio/Characteristic.c
+++ b/shared-bindings/_bleio/Characteristic.c
@@ -49,7 +49,7 @@
//| as part of remote Services.
//|
-//| .. method:: add_to_service(service, uuid, *, properties=0, read_perm=`Attribute.OPEN`, write_perm=`Attribute.OPEN`, max_length=20, fixed_length=False, initial_value=None)
+//| .. method:: add_to_service(service, uuid, *, properties=0, read_perm=Attribute.OPEN, write_perm=Attribute.OPEN, max_length=20, fixed_length=False, initial_value=None)
//|
//| Create a new Characteristic object, and add it to this Service.
//|
@@ -292,7 +292,6 @@ STATIC mp_obj_t bleio_characteristic_set_cccd(mp_uint_t n_args, const mp_obj_t *
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_characteristic_set_cccd_obj, 1, bleio_characteristic_set_cccd);
-
STATIC const mp_rom_map_elem_t bleio_characteristic_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_add_to_service), MP_ROM_PTR(&bleio_characteristic_add_to_service_obj) },
{ MP_ROM_QSTR(MP_QSTR_properties), MP_ROM_PTR(&bleio_characteristic_properties_obj) },
diff --git a/shared-bindings/_bleio/PacketBuffer.c b/shared-bindings/_bleio/PacketBuffer.c
index f9f171870..3ed295f01 100644
--- a/shared-bindings/_bleio/PacketBuffer.c
+++ b/shared-bindings/_bleio/PacketBuffer.c
@@ -163,13 +163,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_deinit_obj, bleio_packet_bu
//| .. attribute:: packet_size
//|
-//| Maximum size of each packet in bytes. This is the minimum of the Characterstic length and
+//| Maximum size of each packet in bytes. This is the minimum of the Characteristic length and
//| the negotiated Maximum Transfer Unit (MTU).
//|
STATIC mp_obj_t bleio_packet_buffer_get_packet_size(mp_obj_t self_in) {
bleio_packet_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
- return mp_obj_new_bool(common_hal_bleio_packet_buffer_get_packet_size(self));
+ return MP_OBJ_NEW_SMALL_INT(common_hal_bleio_packet_buffer_get_packet_size(self));
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_get_packet_size_obj, bleio_packet_buffer_get_packet_size);
diff --git a/shared-module/audiomixer/Mixer.c b/shared-module/audiomixer/Mixer.c
index afa3a0632..4a72dab28 100644
--- a/shared-module/audiomixer/Mixer.c
+++ b/shared-module/audiomixer/Mixer.c
@@ -101,198 +101,141 @@ void audiomixer_mixer_reset_buffer(audiomixer_mixer_obj_t* self,
}
}
-uint32_t add8signed(uint32_t a, uint32_t b) {
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- return __SHADD8(a, b);
- #else
- uint32_t result = 0;
- for (int8_t i = 0; i < 4; i++) {
- int8_t ai = a >> (sizeof(int8_t) * 8 * i);
- int8_t bi = b >> (sizeof(int8_t) * 8 * i);
- int32_t intermediate = (int32_t) ai + bi / 2;
- if (intermediate > CHAR_MAX) {
- intermediate = CHAR_MAX;
- } else if (intermediate < CHAR_MIN) {
- intermediate = CHAR_MIN;
- }
- result |= ((uint32_t) intermediate & 0xff) << (sizeof(int8_t) * 8 * i);
- }
- return result;
- #endif
+__attribute__((always_inline))
+static inline uint32_t add16signed(uint32_t a, uint32_t b) {
+ return __QADD16(a, b);
}
-uint32_t add8unsigned(uint32_t a, uint32_t b) {
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- return __UHADD8(a, b);
- #else
- uint32_t result = 0;
- for (int8_t i = 0; i < 4; i++) {
- uint8_t ai = (a >> (sizeof(uint8_t) * 8 * i));
- uint8_t bi = (b >> (sizeof(uint8_t) * 8 * i));
- int32_t intermediate = (int32_t) (ai + bi) / 2;
- if (intermediate > UCHAR_MAX) {
- intermediate = UCHAR_MAX;
- }
- result |= ((uint32_t) intermediate & 0xff) << (sizeof(uint8_t) * 8 * i);
- }
- return result;
- #endif
+__attribute__((always_inline))
+static inline uint32_t mult16signed(uint32_t val, int32_t mul) {
+ mul <<= 16;
+ int32_t hi, lo;
+ enum { bits = 16 }; // saturate to 16 bits
+ enum { shift = 15 }; // shift is done automatically
+ asm volatile("smulwb %0, %1, %2" : "=r" (lo) : "r" (mul), "r" (val));
+ asm volatile("smulwt %0, %1, %2" : "=r" (hi) : "r" (mul), "r" (val));
+ asm volatile("ssat %0, %1, %2, asr %3" : "=r" (lo) : "I" (bits), "r" (lo), "I" (shift));
+ asm volatile("ssat %0, %1, %2, asr %3" : "=r" (hi) : "I" (bits), "r" (hi), "I" (shift));
+ asm volatile("pkhbt %0, %1, %2, lsl #16" : "=r" (val) : "r" (lo), "r" (hi)); // pack
+ return val;
}
-uint32_t add16signed(uint32_t a, uint32_t b) {
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- return __SHADD16(a, b);
- #else
- uint32_t result = 0;
- for (int8_t i = 0; i < 2; i++) {
- int16_t ai = a >> (sizeof(int16_t) * 8 * i);
- int16_t bi = b >> (sizeof(int16_t) * 8 * i);
- int32_t intermediate = (int32_t) ai + bi / 2;
- if (intermediate > SHRT_MAX) {
- intermediate = SHRT_MAX;
- } else if (intermediate < SHRT_MIN) {
- intermediate = SHRT_MIN;
- }
- result |= (((uint32_t) intermediate) & 0xffff) << (sizeof(int16_t) * 8 * i);
- }
- return result;
- #endif
+static inline uint32_t tounsigned8(uint32_t val) {
+ return __UADD8(val, 0x80808080);
}
-uint32_t add16unsigned(uint32_t a, uint32_t b) {
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- return __UHADD16(a, b);
- #else
- uint32_t result = 0;
- for (int8_t i = 0; i < 2; i++) {
- int16_t ai = (a >> (sizeof(uint16_t) * 8 * i)) - 0x8000;
- int16_t bi = (b >> (sizeof(uint16_t) * 8 * i)) - 0x8000;
- int32_t intermediate = (int32_t) ai + bi / 2;
- if (intermediate > USHRT_MAX) {
- intermediate = USHRT_MAX;
- }
- result |= ((uint32_t) intermediate & 0xffff) << (sizeof(int16_t) * 8 * i);
- }
- return result;
- #endif
+static inline uint32_t tounsigned16(uint32_t val) {
+ return __UADD16(val, 0x80008000);
}
-static inline uint32_t mult8unsigned(uint32_t val, int32_t mul) {
- // if mul == 0, no need in wasting cycles
- if (mul == 0) {
- return 0;
- }
- /* TODO: workout ARMv7 instructions
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- return val;
- #else*/
- uint32_t result = 0;
- float mod_mul = (float) mul / (float) ((1<<15)-1);
- for (int8_t i = 0; i < 4; i++) {
- uint8_t ai = val >> (sizeof(uint8_t) * 8 * i);
- int32_t intermediate = ai * mod_mul;
- if (intermediate > SHRT_MAX) {
- intermediate = SHRT_MAX;
- }
- result |= ((uint32_t) intermediate & 0xff) << (sizeof(uint8_t) * 8 * i);
- }
+static inline uint32_t tosigned16(uint32_t val) {
+ return __UADD16(val, 0x80008000);
+}
- return result;
- //#endif
+static inline uint32_t unpack8(uint16_t val) {
+ return ((val & 0xff00) << 16) | ((val & 0x00ff) << 8);
}
-static inline uint32_t mult8signed(uint32_t val, int32_t mul) {
- // if mul == 0, no need in wasting cycles
- if (mul == 0) {
- return 0;
- }
- /* TODO: workout ARMv7 instructions
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- return val;
- #else
- */
- uint32_t result = 0;
- float mod_mul = (float)mul / (float)((1<<15)-1);
- for (int8_t i = 0; i < 4; i++) {
- int16_t ai = val >> (sizeof(int8_t) * 8 * i);
- int32_t intermediate = ai * mod_mul;
- if (intermediate > CHAR_MAX) {
- intermediate = CHAR_MAX;
- } else if (intermediate < CHAR_MIN) {
- intermediate = CHAR_MIN;
- }
- result |= (((uint32_t) intermediate) & 0xff) << (sizeof(int16_t) * 8 * i);
- }
- return result;
- //#endif
+static inline uint32_t pack8(uint32_t val) {
+ return ((val & 0xff000000) >> 16) | ((val & 0xff00) >> 8);
}
-//TODO:
-static inline uint32_t mult16unsigned(uint32_t val, int32_t mul) {
- // if mul == 0, no need in wasting cycles
- if (mul == 0) {
- return 0;
- }
- /* TODO: the below ARMv7m instructions "work", but the amplitude is much higher/louder
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- // there is no unsigned equivalent to the 'SMULWx' ARMv7 Thumb function,
- // so we have to do it by hand.
- uint32_t lo = val & 0xffff;
- uint32_t hi = val >> 16;
- //mp_printf(&mp_plat_print, "pre-asm: (mul: %d)\n\tval: %x\tlo: %x\thi: %x\n", mul, val, lo, hi);
- uint32_t val_lo;
- asm volatile("mul %0, %1, %2" : "=r" (val_lo) : "r" (mul), "r" (lo));
- asm volatile("mla %0, %1, %2, %3" : "=r" (val) : "r" (mul), "r" (hi), "r" (val_lo));
- //mp_printf(&mp_plat_print, "post-asm:\n\tval: %x\tlo: %x\n\n", val, val_lo);
- return val;
- #else
- */
- uint32_t result = 0;
- float mod_mul = (float)mul / (float)((1<<15)-1);
- for (int8_t i = 0; i < 2; i++) {
- int16_t ai = (val >> (sizeof(uint16_t) * 8 * i)) - 0x8000;
- int32_t intermediate = ai * mod_mul;
- if (intermediate > SHRT_MAX) {
- intermediate = SHRT_MAX;
- } else if (intermediate < SHRT_MIN) {
- intermediate = SHRT_MIN;
+static void mix_down_one_voice(audiomixer_mixer_obj_t* self,
+ audiomixer_mixervoice_obj_t* voice, bool voices_active,
+ uint32_t* word_buffer, uint32_t length) {
+ bool voice_done = voice->sample == NULL;
+ while (!voice_done && length != 0) {
+ if (voice->buffer_length == 0) {
+ if (!voice->more_data) {
+ if (voice->loop) {
+ audiosample_reset_buffer(voice->sample, false, 0);
+ } else {
+ voice->sample = NULL;
+ voice_done = true;
+ break;
+ }
+ }
+ if (!voice_done) {
+ // Load another buffer
+ audioio_get_buffer_result_t result = audiosample_get_buffer(voice->sample, false, 0, (uint8_t**) &voice->remaining_buffer, &voice->buffer_length);
+ // Track length in terms of words.
+ voice->buffer_length /= sizeof(uint32_t);
+ voice->more_data = result == GET_BUFFER_MORE_DATA;
+ }
}
- result |= (((uint32_t) intermediate) + 0x8000) << (sizeof(int16_t) * 8 * i);
- }
- return result;
- //#endif
-}
-static inline uint32_t mult16signed(uint32_t val, int32_t mul) {
- // if mul == 0, no need in wasting cycles
- if (mul == 0) {
- return 0;
+ uint32_t n = MIN(voice->buffer_length, length);
+ uint32_t *src = voice->remaining_buffer;
+ uint16_t level = voice->level;
+
+ // First active voice gets copied over verbatim.
+ if (!voices_active) {
+ if (MP_LIKELY(self->bits_per_sample == 16)) {
+ if (MP_LIKELY(self->samples_signed)) {
+ for (uint32_t i = 0; i<n; i++) {
+ uint32_t v = src[i];
+ word_buffer[i] = mult16signed(v, level);
+ }
+ } else {
+ for (uint32_t i = 0; i<n; i++) {
+ uint32_t v = src[i];
+ v = tosigned16(v);
+ word_buffer[i] = mult16signed(v, level);
+ }
+ }
+ } else {
+ uint16_t *hword_buffer = (uint16_t*)word_buffer;
+ uint16_t *hsrc = (uint16_t*)src;
+ for (uint32_t i = 0; i<n*2; i++) {
+ uint32_t word = unpack8(hsrc[i]);
+ if (MP_LIKELY(!self->samples_signed)) {
+ word = tosigned16(word);
+ }
+ word = mult16signed(word, level);
+ hword_buffer[i] = pack8(word);
+ }
+ }
+ } else {
+ if (MP_LIKELY(self->bits_per_sample == 16)) {
+ if (MP_LIKELY(self->samples_signed)) {
+ for (uint32_t i = 0; i<n; i++) {
+ uint32_t word = src[i];
+ word_buffer[i] = add16signed(mult16signed(word, level), word_buffer[i]);
+ }
+ } else {
+ for (uint32_t i = 0; i<n; i++) {
+ uint32_t word = src[i];
+ word = tosigned16(word);
+ word_buffer[i] = add16signed(mult16signed(word, level), word_buffer[i]);
+ }
+ }
+ } else {
+ uint16_t *hword_buffer = (uint16_t*)word_buffer;
+ uint16_t *hsrc = (uint16_t*)src;
+ for (uint32_t i = 0; i<n*2; i++) {
+ uint32_t word = unpack8(hsrc[i]);
+ if (MP_LIKELY(!self->samples_signed)) {
+ word = tosigned16(word);
+ }
+ word = mult16signed(word, level);
+ word = add16signed(word, unpack8(hword_buffer[i]));
+ hword_buffer[i] = pack8(word);
+ }
+ }
+ }
+ length -= n;
+ word_buffer += n;
+ voice->remaining_buffer += n;
+ voice->buffer_length -= n;
}
- #if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
- int32_t hi, lo;
- enum { bits = 16 }; // saturate to 16 bits
- enum { shift = 0 }; // shift is done automatically
- asm volatile("smulwb %0, %1, %2" : "=r" (lo) : "r" (mul), "r" (val));
- asm volatile("smulwt %0, %1, %2" : "=r" (hi) : "r" (mul), "r" (val));
- asm volatile("ssat %0, %1, %2, asr %3" : "=r" (lo) : "I" (bits), "r" (lo), "I" (shift));
- asm volatile("ssat %0, %1, %2, asr %3" : "=r" (hi) : "I" (bits), "r" (hi), "I" (shift));
- asm volatile("pkhbt %0, %1, %2, lsl #16" : "=r" (val) : "r" (lo), "r" (hi)); // pack
- return val;
- #else
- uint32_t result = 0;
- float mod_mul = (float)mul / (float)((1<<15)-1);
- for (int8_t i = 0; i < 2; i++) {
- int16_t ai = val >> (sizeof(int16_t) * 8 * i);
- int32_t intermediate = ai * mod_mul;
- if (intermediate > SHRT_MAX) {
- intermediate = SHRT_MAX;
- } else if (intermediate < SHRT_MIN) {
- intermediate = SHRT_MIN;
+
+ if (length && !voices_active) {
+ uint32_t sample_value = self->bits_per_sample == 8
+ ? 0x80808080 : 0x80008000;
+ for (uint32_t i = 0; i<length; i++) {
+ word_buffer[i] = sample_value;
}
- result |= (((uint32_t) intermediate) & 0xffff) << (sizeof(int16_t) * 8 * i);
}
- return result;
- #endif
}
audioio_get_buffer_result_t audiomixer_mixer_get_buffer(audiomixer_mixer_obj_t* self,
@@ -322,87 +265,25 @@ audioio_get_buffer_result_t audiomixer_mixer_get_buffer(audiomixer_mixer_obj_t*
}
self->use_first_buffer = !self->use_first_buffer;
bool voices_active = false;
+ uint32_t length = self->len / sizeof(uint32_t);
+
for (int32_t v = 0; v < self->voice_count; v++) {
audiomixer_mixervoice_obj_t* voice = MP_OBJ_TO_PTR(self->voice[v]);
- uint32_t j = 0;
- bool voice_done = voice->sample == NULL;
- for (uint32_t i = 0; i < self->len / sizeof(uint32_t); i++) {
- if (!voice_done && j >= voice->buffer_length) {
- if (!voice->more_data) {
- if (voice->loop) {
- audiosample_reset_buffer(voice->sample, false, 0);
- } else {
- voice->sample = NULL;
- voice_done = true;
- }
- }
- if (!voice_done) {
- // Load another buffer
- audioio_get_buffer_result_t result = audiosample_get_buffer(voice->sample, false, 0, (uint8_t**) &voice->remaining_buffer, &voice->buffer_length);
- // Track length in terms of words.
- voice->buffer_length /= sizeof(uint32_t);
- voice->more_data = result == GET_BUFFER_MORE_DATA;
- j = 0;
- }
- }
- // First active voice gets copied over verbatim.
- uint32_t sample_value;
- if (voice_done) {
- // Exit early if another voice already set all samples once.
- if (voices_active) {
- continue;
- }
- sample_value = 0;
- if (!self->samples_signed) {
- if (self->bits_per_sample == 8) {
- sample_value = 0x7f7f7f7f;
- } else {
- sample_value = 0x7fff7fff;
- }
- }
- } else {
- sample_value = voice->remaining_buffer[j];
- }
+ mix_down_one_voice(self, voice, voices_active, word_buffer, length);
+ voices_active = true;
+ }
- // apply the mixer level
- if (!self->samples_signed) {
- if (self->bits_per_sample == 8) {
- sample_value = mult8unsigned(sample_value, voice->level);
- } else {
- sample_value = mult16unsigned(sample_value, voice->level);
- }
- } else {
- if (self->bits_per_sample == 8) {
- sample_value = mult8signed(sample_value, voice->level);
- } else {
- sample_value = mult16signed(sample_value, voice->level);
- }
+ if (!self->samples_signed) {
+ if (self->bits_per_sample == 16) {
+ for (uint32_t i = 0; i < length; i++) {
+ word_buffer[i] = tounsigned16(word_buffer[i]);
}
-
- if (!voices_active) {
- word_buffer[i] = sample_value;
- } else {
- if (self->bits_per_sample == 8) {
- if (self->samples_signed) {
- word_buffer[i] = add8signed(word_buffer[i], sample_value);
- } else {
- word_buffer[i] = add8unsigned(word_buffer[i], sample_value);
- }
- } else {
- if (self->samples_signed) {
- word_buffer[i] = add16signed(word_buffer[i], sample_value);
- } else {
- word_buffer[i] = add16unsigned(word_buffer[i], sample_value);
- }
- }
+ } else {
+ for (uint32_t i = 0; i < length; i++) {
+ word_buffer[i] = tounsigned8(word_buffer[i]);
}
- j++;
}
- voice->buffer_length -= j;
- voice->remaining_buffer += j;
-
- voices_active = true;
}
self->read_count += 1;
diff --git a/shared-module/audiomixer/MixerVoice.c b/shared-module/audiomixer/MixerVoice.c
index ff05dc93e..9be104afc 100644
--- a/shared-module/audiomixer/MixerVoice.c
+++ b/shared-module/audiomixer/MixerVoice.c
@@ -34,7 +34,7 @@
void common_hal_audiomixer_mixervoice_construct(audiomixer_mixervoice_obj_t *self) {
self->sample = NULL;
- self->level = ((1 << 15) - 1);
+ self->level = 1 << 15;
}
void common_hal_audiomixer_mixervoice_set_parent(audiomixer_mixervoice_obj_t* self, audiomixer_mixer_obj_t *parent) {
@@ -42,11 +42,11 @@ void common_hal_audiomixer_mixervoice_set_parent(audiomixer_mixervoice_obj_t* se
}
float common_hal_audiomixer_mixervoice_get_level(audiomixer_mixervoice_obj_t* self) {
- return ((float) self->level / ((1 << 15) - 1));
+ return ((float) self->level / (1 << 15));
}
void common_hal_audiomixer_mixervoice_set_level(audiomixer_mixervoice_obj_t* self, float level) {
- self->level = level * ((1 << 15)-1);
+ self->level = level * (1 << 15);
}
void common_hal_audiomixer_mixervoice_play(audiomixer_mixervoice_obj_t* self, mp_obj_t sample, bool loop) {
diff --git a/shared-module/audiomixer/MixerVoice.h b/shared-module/audiomixer/MixerVoice.h
index efac19156..a85316e3d 100644
--- a/shared-module/audiomixer/MixerVoice.h
+++ b/shared-module/audiomixer/MixerVoice.h
@@ -39,7 +39,7 @@ typedef struct {
bool more_data;
uint32_t* remaining_buffer;
uint32_t buffer_length;
- int16_t level;
+ uint16_t level;
} audiomixer_mixervoice_obj_t;
diff --git a/supervisor/linker.h b/supervisor/linker.h
new file mode 100755
index 000000000..b58414433
--- /dev/null
+++ b/supervisor/linker.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+// These macros are used to place code and data into different linking sections.
+
+#ifndef MICROPY_INCLUDED_SUPERVISOR_LINKER_H
+#define MICROPY_INCLUDED_SUPERVISOR_LINKER_H
+
+#if defined(IMXRT10XX)
+#define PLACE_IN_DTCM_DATA(name) name __attribute__((section(".dtcm_data." #name )))
+#define PLACE_IN_DTCM_BSS(name) name __attribute__((section(".dtcm_bss." #name )))
+#define PLACE_IN_ITCM(name) __attribute__((section(".itcm." #name ))) name
+#else
+#define PLACE_IN_DTCM_DATA(name) name
+#define PLACE_IN_DTCM_BSS(name) name
+#define PLACE_IN_ITCM(name) name
+#endif
+
+#endif // MICROPY_INCLUDED_SUPERVISOR_LINKER_H
diff --git a/supervisor/port.h b/supervisor/port.h
index c8a011978..b289583dd 100644
--- a/supervisor/port.h
+++ b/supervisor/port.h
@@ -60,6 +60,12 @@ uint32_t *port_stack_get_limit(void);
// Get stack top address
uint32_t *port_stack_get_top(void);
+// Get heap bottom address
+uint32_t *port_heap_get_bottom(void);
+
+// Get heap top address
+uint32_t *port_heap_get_top(void);
+
// Save and retrieve a word from memory that is preserved over reset. Used for safe mode.
void port_set_saved_word(uint32_t);
uint32_t port_get_saved_word(void);
diff --git a/supervisor/shared/board.c b/supervisor/shared/board.c
new file mode 100644
index 000000000..e3eb8fd0d
--- /dev/null
+++ b/supervisor/shared/board.c
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Dan Halbert for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "supervisor/shared/board.h"
+
+#include "shared-bindings/digitalio/DigitalInOut.h"
+#include "shared-bindings/neopixel_write/__init__.h"
+
+#ifdef USER_NEOPIXELS_PIN
+
+// The maximum number of user neopixels right now is 10, on Circuit Playgrounds.
+// PyBadge and PyGamer have max 5
+#define USER_NEOPIXELS_MAX_COUNT 10
+
+void board_reset_user_neopixels(void) {
+ // Turn off on-board NeoPixel string
+ uint8_t empty[USER_NEOPIXELS_MAX_COUNT * 3] = { 0 };
+ digitalio_digitalinout_obj_t neopixel_pin;
+ common_hal_digitalio_digitalinout_construct(&neopixel_pin, USER_NEOPIXELS_PIN);
+ common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false,
+ DRIVE_MODE_PUSH_PULL);
+ common_hal_neopixel_write(&neopixel_pin, empty, USER_NEOPIXELS_MAX_COUNT * 3);
+ common_hal_digitalio_digitalinout_deinit(&neopixel_pin);
+}
+
+#endif
diff --git a/supervisor/shared/board.h b/supervisor/shared/board.h
new file mode 100644
index 000000000..0e4d73455
--- /dev/null
+++ b/supervisor/shared/board.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Dan Halbert for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_SUPERVISOR_BOARD_H
+#define MICROPY_INCLUDED_SUPERVISOR_BOARD_H
+
+#include "py/mpconfig.h"
+
+#ifdef USER_NEOPIXELS_PIN
+
+void board_reset_user_neopixels(void);
+
+#endif
+
+#endif // MICROPY_INCLUDED_SUPERVISOR_BOARD_H
diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c
index 92727f6fb..3b799619f 100644
--- a/supervisor/shared/filesystem.c
+++ b/supervisor/shared/filesystem.c
@@ -75,7 +75,7 @@ static void make_sample_code_file(FATFS *fatfs) {
FIL fs;
UINT char_written = 0;
const byte buffer[] = "print('Hello World!')\n";
- //Create or modify existing code.py file
+ //Create or modify existing code.py file
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
f_write(&fs, buffer, sizeof(buffer) - 1, &char_written);
f_close(&fs);
diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c
index 38040d11d..14c3b4979 100755
--- a/supervisor/shared/memory.c
+++ b/supervisor/shared/memory.c
@@ -39,11 +39,14 @@ uint32_t* low_address;
uint32_t* high_address;
void memory_init(void) {
- low_address = port_stack_get_limit();
- high_address = port_stack_get_top();
+ low_address = port_heap_get_bottom();
+ high_address = port_heap_get_top();
}
void free_memory(supervisor_allocation* allocation) {
+ if (allocation == NULL) {
+ return;
+ }
int32_t index = 0;
bool found = false;
for (index = 0; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {
diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c
index aba31e9c9..c957aee53 100644
--- a/supervisor/shared/safe_mode.c
+++ b/supervisor/shared/safe_mode.c
@@ -157,6 +157,9 @@ void print_safe_mode_message(safe_mode_t reason) {
case FLASH_WRITE_FAIL:
serial_write_compressed(translate("Failed to write internal flash."));
break;
+ case MEM_MANAGE:
+ serial_write_compressed(translate("Invalid memory access."));
+ break;
default:
serial_write_compressed(translate("Unknown reason."));
break;
diff --git a/supervisor/shared/safe_mode.h b/supervisor/shared/safe_mode.h
index e05fca0e4..5b09c4b54 100644
--- a/supervisor/shared/safe_mode.h
+++ b/supervisor/shared/safe_mode.h
@@ -40,6 +40,7 @@ typedef enum {
PROGRAMMATIC_SAFE_MODE,
NORDIC_SOFT_DEVICE_ASSERT,
FLASH_WRITE_FAIL,
+ MEM_MANAGE,
} safe_mode_t;
safe_mode_t wait_for_safe_mode_reset(void);
diff --git a/supervisor/shared/stack.c b/supervisor/shared/stack.c
index dcecf2067..2b7b1c03a 100755
--- a/supervisor/shared/stack.c
+++ b/supervisor/shared/stack.c
@@ -46,6 +46,10 @@ void allocate_stack(void) {
mp_uint_t c_size = (uint32_t) port_stack_get_top() - sp;
+ if (port_stack_get_top() != port_heap_get_top()) {
+ return;
+ }
+
stack_alloc = allocate_memory(c_size + next_stack_size + EXCEPTION_STACK_SIZE, true);
if (stack_alloc == NULL) {
stack_alloc = allocate_memory(c_size + CIRCUITPY_DEFAULT_STACK_SIZE + EXCEPTION_STACK_SIZE, true);
@@ -71,6 +75,9 @@ void stack_init(void) {
}
void stack_resize(void) {
+ if (stack_alloc == NULL) {
+ return;
+ }
if (next_stack_size == current_stack_size) {
*stack_alloc->ptr = STACK_CANARY_VALUE;
return;
diff --git a/supervisor/shared/tick.c b/supervisor/shared/tick.c
index 69256081c..5668f8fa1 100644
--- a/supervisor/shared/tick.c
+++ b/supervisor/shared/tick.c
@@ -25,11 +25,13 @@
*/
#include "supervisor/shared/tick.h"
+
+#include "supervisor/linker.h"
#include "supervisor/filesystem.h"
#include "supervisor/shared/autoreload.h"
-static volatile uint64_t ticks_ms;
-static volatile uint32_t background_ticks_ms32;
+static volatile uint64_t PLACE_IN_DTCM_BSS(ticks_ms);
+static volatile uint32_t PLACE_IN_DTCM_BSS(background_ticks_ms32);
#if CIRCUITPY_GAMEPAD
#include "shared-module/gamepad/__init__.h"
@@ -77,7 +79,7 @@ uint32_t supervisor_ticks_ms32() {
extern void run_background_tasks(void);
-void supervisor_run_background_tasks_if_tick() {
+void PLACE_IN_ITCM(supervisor_run_background_tasks_if_tick)() {
uint32_t now32 = ticks_ms;
if (now32 == background_ticks_ms32) {
diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk
index 96a14c25b..52d60b52b 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -2,6 +2,7 @@ SRC_SUPERVISOR = \
main.c \
supervisor/port.c \
supervisor/shared/autoreload.c \
+ supervisor/shared/board.c \
supervisor/shared/display.c \
supervisor/shared/filesystem.c \
supervisor/shared/flash.c \
diff --git a/tools/build_board_info.py b/tools/build_board_info.py
index d583fc63f..1f074dddf 100644
--- a/tools/build_board_info.py
+++ b/tools/build_board_info.py
@@ -18,6 +18,7 @@ BIN = ('bin',)
UF2 = ('uf2',)
BIN_UF2 = ('bin', 'uf2')
HEX = ('hex',)
+HEX_UF2 = ('hex', 'uf2')
SPK = ('spk',)
# Default extensions
@@ -26,7 +27,7 @@ extension_by_port = {
"atmel-samd": UF2,
"stm32f4": BIN,
"cxd56": SPK,
- "mimxrt10xx": UF2,
+ "mimxrt10xx": HEX_UF2,
}
# Per board overrides
diff --git a/tools/uf2 b/tools/uf2
-Subproject 84da66ce62215c1daa62204f2c3fa83c05143a4
+Subproject adbb8c7260f938e810eb37f2287f8e1a055ff40