diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d7db57d0e..e87190c727 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,12 +155,15 @@ jobs: - "stm32f411ve_discovery" - "stm32f412zg_discovery" - "stringcar_m0_express" + - "teknikio_bluebird" - "trellis_m4_express" - "trinket_m0" - "trinket_m0_haxpress" - "uchip" - "ugame10" - "winterbloom_sol" + - "xinabox_cc03" + - "xinabox_cs11" steps: - name: Set up Python 3.5 @@ -171,7 +174,7 @@ jobs: run: | sudo apt-get install -y gettext pip install requests sh click setuptools awscli - wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 + wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 - name: Versions run: | diff --git a/.gitignore b/.gitignore index 3e5bd28300..435ed73a78 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,8 @@ TAGS *~ *.DS_Store +**/*.DS_Store +*.icloud # POEdit mo files #################### diff --git a/.gitmodules b/.gitmodules index 98252c2afa..da2360cb72 100644 --- a/.gitmodules +++ b/.gitmodules @@ -102,6 +102,9 @@ [submodule "ports/cxd56/spresense-exported-sdk"] path = ports/cxd56/spresense-exported-sdk url = https://github.com/sonydevworld/spresense-exported-sdk.git +[submodule "frozen/Adafruit_CircuitPython_SD"] + path = frozen/Adafruit_CircuitPython_SD + url = https://github.com/adafruit/Adafruit_CircuitPython_SD.git [submodule "lib/mp3"] path = lib/mp3 url = https://github.com/adafruit/Adafruit_MP3 diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 0000000000..73499d65d5 --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,82 @@ + +# Building CircuitPython + +Welcome to CircuitPython! + +This document is a quick-start guide only. + +Detailed guides on how to build CircuitPython can be found in the Adafruit Learn system at +https://learn.adafruit.com/building-circuitpython/ + +## Setup + +Please ensure you setup your build environment appropriately, as per the guide. You will need: + +* Linux: https://learn.adafruit.com/building-circuitpython/linux +* MacOS: https://learn.adafruit.com/building-circuitpython/macos +* Windows Subsystem for Linux (WSL): https://learn.adafruit.com/building-circuitpython/windows-subsystem-for-linux + +### Submodules + +This project has a bunch of git submodules. You will need to update them regularly. + + git submodule sync + git submodule update --init + +### mpy-cross + +As part of the build process, mpy-cross is needed to compile .py files into .mpy files. +To compile (or recompile) mpy-cross: + + make -C mpy-cross + +# Building + +There a number of ports of CircuitPython! To build for your board, change to the appropriate ports directory and build. + +Examples: + + cd ports/atmel-samd + make BOARD=circuitplayground_express + + cd ports/nrf + make BOARD=circuitplayground_bluefruit + +If you aren't sure what boards exist, have a peek in the boards subdirectory of your port. +If you have a fast computer with many cores, consider adding `-j` to your build flags, such as `-j17` on +a 6-core 12-thread machine. + +# Testing + +If you are working on changes to the core language, you might find it useful to run the test suite. +The test suite in the top level `tests` directory. It needs the unix port to run. + + cd ports/unix + make axtls + make micropython + +Then you can run the test suite: + + cd ../../tests + ./run-tests + +A successful run will say something like + + 676 tests performed (19129 individual testcases) + 676 tests passed + 30 tests skipped: buffered_writer builtin_help builtin_range_binop class_delattr_setattr cmd_parsetree extra_coverage framebuf1 framebuf16 framebuf2 framebuf4 framebuf8 framebuf_subclass mpy_invalid namedtuple_asdict non_compliant resource_stream schedule sys_getsizeof urandom_extra ure_groups ure_span ure_sub ure_sub_unmatched vfs_basic vfs_fat_fileio1 vfs_fat_fileio2 vfs_fat_more vfs_fat_oldproto vfs_fat_ramdisk vfs_userfs + +# Debugging + +The easiest way to debug CircuitPython on hardware is with a JLink device, JLinkGDBServer, and an appropriate GDB. +Instructions can be found at https://learn.adafruit.com/debugging-the-samd21-with-gdb + +If using JLink, you'll need both the `JLinkGDBServer` and `arm-none-eabi-gdb` running. + +Example: + + JLinkGDBServer -if SWD -device ATSAMD51J19 + arm-none-eabi-gdb build-metro_m4_express/firmware.elf -iex "target extended-remote :2331" + +If your port/build includes `arm-none-eabi-gdb-py`, consider using it instead, as it can be used for better register +debugging with https://github.com/bnahill/PyCortexMDebug diff --git a/docs/index.rst b/docs/index.rst index a85772fdc9..6dadddfc1a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,6 +43,7 @@ Full Table of Contents ../README ../CONTRIBUTING + ../BUILDING ../CODE_OF_CONDUCT ../license.rst diff --git a/frozen/Adafruit_CircuitPython_BusDevice b/frozen/Adafruit_CircuitPython_BusDevice index 52d87bd7e5..2000ae3a7c 160000 --- a/frozen/Adafruit_CircuitPython_BusDevice +++ b/frozen/Adafruit_CircuitPython_BusDevice @@ -1 +1 @@ -Subproject commit 52d87bd7e571af66ecb57ee32b5af92531134150 +Subproject commit 2000ae3a7c5d60b850c9546a16425aee279e2a36 diff --git a/frozen/Adafruit_CircuitPython_CircuitPlayground b/frozen/Adafruit_CircuitPython_CircuitPlayground index d87ea261c4..82ba9e40df 160000 --- a/frozen/Adafruit_CircuitPython_CircuitPlayground +++ b/frozen/Adafruit_CircuitPython_CircuitPlayground @@ -1 +1 @@ -Subproject commit d87ea261c40ecbc6d893d72d337beefbea1cf932 +Subproject commit 82ba9e40dfff41fdc0541636afde4936c930d86c diff --git a/frozen/Adafruit_CircuitPython_Crickit b/frozen/Adafruit_CircuitPython_Crickit index a6100fb5d8..5534662902 160000 --- a/frozen/Adafruit_CircuitPython_Crickit +++ b/frozen/Adafruit_CircuitPython_Crickit @@ -1 +1 @@ -Subproject commit a6100fb5d867c7f4980f071119bfa7e0a76e1d47 +Subproject commit 5534662902a223ac8562e6f999d6359e4c17dab1 diff --git a/frozen/Adafruit_CircuitPython_DotStar b/frozen/Adafruit_CircuitPython_DotStar index 409e90902a..01e89a8437 160000 --- a/frozen/Adafruit_CircuitPython_DotStar +++ b/frozen/Adafruit_CircuitPython_DotStar @@ -1 +1 @@ -Subproject commit 409e90902ac49720c4add985e8e1a1660bbe63a0 +Subproject commit 01e89a8437c78b62d4d655c745ded57e26dc747a diff --git a/frozen/Adafruit_CircuitPython_HID b/frozen/Adafruit_CircuitPython_HID index 89faee0eb0..a23b80569f 160000 --- a/frozen/Adafruit_CircuitPython_HID +++ b/frozen/Adafruit_CircuitPython_HID @@ -1 +1 @@ -Subproject commit 89faee0eb08a6855e14f117c514fecf2dd90769d +Subproject commit a23b80569f23ef109667dd8c595d319e8a30d620 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index ddc7484498..f69fc9b47f 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit ddc74844983b35b027bd45091c7b8bb3c8d7a2d1 +Subproject commit f69fc9b47fa25ba1414eb3d5c82f05013280c0d2 diff --git a/frozen/Adafruit_CircuitPython_NeoPixel b/frozen/Adafruit_CircuitPython_NeoPixel index c0bdd8b103..ff99d55115 160000 --- a/frozen/Adafruit_CircuitPython_NeoPixel +++ b/frozen/Adafruit_CircuitPython_NeoPixel @@ -1 +1 @@ -Subproject commit c0bdd8b10383725ee9293f5d88fb8d47eb1272bd +Subproject commit ff99d55115f81899902c2c4a84fdfbea9ae83823 diff --git a/frozen/Adafruit_CircuitPython_SD b/frozen/Adafruit_CircuitPython_SD new file mode 160000 index 0000000000..dd0fe8530a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SD @@ -0,0 +1 @@ +Subproject commit dd0fe8530a2dcc64ac95bb3e116af2158dcd7cd2 diff --git a/lib/mp3 b/lib/mp3 index 2a3cc7873b..c3c664bf4d 160000 --- a/lib/mp3 +++ b/lib/mp3 @@ -1 +1 @@ -Subproject commit 2a3cc7873b5c642d4bb60043dc14d2555e3377a5 +Subproject commit c3c664bf4db6a36d11808dfcbb5dbf7cff1715b8 diff --git a/locale/ID.po b/locale/ID.po index 4be18ec0de..18773a2027 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,6 +23,19 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -294,7 +307,7 @@ msgid "Array values should be single bytes." msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -406,6 +419,10 @@ msgstr "Tidak bisa mendapatkan pull pada saat mode output" msgid "Cannot get temperature" msgstr "Tidak bisa mendapatkan temperatur. status: 0x%02x" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "" @@ -454,6 +471,16 @@ msgstr "" msgid "CharacteristicBuffer writing not provided" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "" @@ -515,7 +542,7 @@ msgid "Couldn't allocate second buffer" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -632,28 +659,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -826,13 +843,6 @@ msgstr "" msgid "Length must be non-negative" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -847,11 +857,11 @@ msgid "Maximum x value when mirrored is %d" msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" +msgid "MicroPython fatal error." msgstr "" #: shared-bindings/audiobusio/PDMIn.c @@ -920,6 +930,10 @@ msgstr "" msgid "No such file/directory" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy @@ -1103,10 +1117,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" #: supervisor/shared/safe_mode.c @@ -1116,21 +1127,11 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"Tegangan dari mikrokontroler turun atau mati. Pastikan sumber tegangan " -"memberikan daya\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1164,10 +1165,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Untuk keluar, silahkan reset board tanpa " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Terlalu banyak channel dalam sampel" @@ -1246,6 +1243,10 @@ msgstr "" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1323,12 +1324,8 @@ msgstr "" "Untuk menampilkan modul built-in silahkan ketik `help(\"modules\")`.\n" #: supervisor/shared/safe_mode.c -#, fuzzy -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" -"Anda sedang menjalankan mode aman (safe mode) yang berarti sesuatu yang " -"sangat buruk telah terjadi.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2853,6 +2850,19 @@ msgstr "" #~ msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #~ msgstr "Dukungan soft device, id: 0x%08lX, pc: 0x%08l" +#, fuzzy +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Tegangan dari mikrokontroler turun atau mati. Pastikan sumber tegangan " +#~ "memberikan daya\n" + +#~ msgid "To exit, please reset the board without " +#~ msgstr "Untuk keluar, silahkan reset board tanpa " + #~ msgid "UART(%d) does not exist" #~ msgstr "UART(%d) tidak ada" @@ -2870,6 +2880,14 @@ msgstr "" #~ "Gunakan esptool untuk menghapus flash dan upload ulang Python sebagai " #~ "gantinya" +#, fuzzy +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "" +#~ "Anda sedang menjalankan mode aman (safe mode) yang berarti sesuatu yang " +#~ "sangat buruk telah terjadi.\n" + #~ msgid "[addrinfo error %d]" #~ msgstr "[addrinfo error %d]" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index f007202071..f4b67521ce 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,6 +23,19 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -292,7 +305,7 @@ msgid "Array values should be single bytes." msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -400,6 +413,10 @@ msgstr "" msgid "Cannot get temperature" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "" @@ -444,6 +461,16 @@ msgstr "" msgid "CharacteristicBuffer writing not provided" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "" @@ -505,7 +532,7 @@ msgid "Couldn't allocate second buffer" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -621,28 +648,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -815,13 +832,6 @@ msgstr "" msgid "Length must be non-negative" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -836,11 +846,11 @@ msgid "Maximum x value when mirrored is %d" msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" +msgid "MicroPython fatal error." msgstr "" #: shared-bindings/audiobusio/PDMIn.c @@ -909,6 +919,10 @@ msgstr "" msgid "No such file/directory" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1087,10 +1101,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" #: supervisor/shared/safe_mode.c @@ -1101,18 +1112,11 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -1145,10 +1149,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "" @@ -1227,6 +1227,10 @@ msgstr "" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1297,8 +1301,7 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/de_DE.po b/locale/de_DE.po index 1756a7717e..36d2f266d7 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n" @@ -25,6 +25,19 @@ msgstr "" "\n" "Der Code wurde ausgeführt. Warte auf reload.\n" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Datei \"%q\"" @@ -294,7 +307,7 @@ msgid "Array values should be single bytes." msgstr "Array-Werte sollten aus Einzelbytes bestehen." #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -404,6 +417,10 @@ msgstr "Pull up im Ausgabemodus nicht möglich" msgid "Cannot get temperature" msgstr "Kann Temperatur nicht holen" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "Kann nicht beite Kanäle auf dem gleichen Pin ausgeben" @@ -448,6 +465,16 @@ msgstr "Kann nicht ohne MOSI-Pin schreiben." msgid "CharacteristicBuffer writing not provided" msgstr "Schreiben von CharacteristicBuffer ist nicht vorgesehen" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Clock pin init fehlgeschlagen." @@ -509,8 +536,8 @@ msgid "Couldn't allocate second buffer" msgstr "Konnte second buffer nicht zuteilen" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" -msgstr "Absturz in HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." +msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -625,28 +652,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Datei existiert" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -823,17 +840,6 @@ msgstr "Länge muss ein int sein" msgid "Length must be non-negative" msgstr "Länge darf nicht negativ sein" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" -"Sieht aus, als wäre der CircuitPython-Kernel-Code abgestürzt. Uups!\n" -"Bitte melde das Problem unter https://github.com/adafruit/circuitpython/" -"issues\n" -"mit dem Inhalt deines CIRCUITPY-Laufwerks und dieser Nachricht:\n" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "MISO pin Initialisierung fehlgeschlagen" @@ -848,14 +854,12 @@ msgid "Maximum x value when mirrored is %d" msgstr "Maximaler x-Wert beim Spiegeln ist %d" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" -"MicroPython-NLR-Sprung ist fehlgeschlagen. Wahrscheinlich " -"Speicherbeschädigung.\n" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" -msgstr "Schwerwiegender MicroPython-Fehler\n" +msgid "MicroPython fatal error." +msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -924,6 +928,10 @@ msgstr "Kein Speicherplatz mehr verfügbar auf dem Gerät" msgid "No such file/directory" msgstr "Keine solche Datei/Verzeichnis" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1110,17 +1118,8 @@ msgstr "Stream fehlt readinto() oder write() Methode." #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" -"Der CircuitPython-Heap war beschädigt, weil der Stack zu klein war.\n" -"Bitte erhöhe die stack size limits und drücke die Reset-Taste (nach Auswurf " -"des CIRCUITPY-Laufwerks)\n" -"Wenn du den Stack nicht geändert hast, melde bitte das Problem unter https://" -"github.com/adafruit/circuitpython/issues\n" -"mit dem Inhalt deines CIRCUITPY-Laufwerks.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -1132,23 +1131,10 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"Die Stromversorgung des Mikrocontrollers ist eingebrochen. Stelle sicher, " -"dass deine Stromversorgung genug Leistung für die gesamte Schaltung zur " -"Verfügung stellt und drücke die Reset-Taste (nach Auswurf des CIRCUITPY-" -"Laufwerks)\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" -"Die Reset-Taste wurde beim Booten von CircuitPython gedrückt. Drücke sie " -"erneut um den abgesicherten Modus zu verlassen. \n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1182,10 +1168,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Zum beenden, resette bitte das board ohne " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Zu viele Kanäle im sample" @@ -1264,6 +1246,10 @@ msgstr "Unerwarteter nrfx uuid-Typ" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1343,11 +1329,8 @@ msgstr "" "aus.\n" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" -"Sie laufen im abgesicherten Modus, was bedeutet, dass etwas Unerwartetes " -"passiert ist.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2737,6 +2720,9 @@ msgstr "" #~ msgid "Could not decode ble_uuid, err 0x%04x" #~ msgstr "Konnte ble_uuid nicht decodieren. Status: 0x%04x" +#~ msgid "Crash into the HardFault_Handler.\n" +#~ msgstr "Absturz in HardFault_Handler.\n" + #~ msgid "Data too large for the advertisement packet" #~ msgstr "Daten sind zu groß für das advertisement packet" @@ -2871,9 +2857,27 @@ msgstr "" #~ msgid "Invalid data pin" #~ msgstr "Ungültiger data pin" +#~ msgid "" +#~ "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ "Please file an issue at https://github.com/adafruit/circuitpython/issues\n" +#~ " with the contents of your CIRCUITPY drive and this message:\n" +#~ msgstr "" +#~ "Sieht aus, als wäre der CircuitPython-Kernel-Code abgestürzt. Uups!\n" +#~ "Bitte melde das Problem unter https://github.com/adafruit/circuitpython/" +#~ "issues\n" +#~ "mit dem Inhalt deines CIRCUITPY-Laufwerks und dieser Nachricht:\n" + #~ msgid "Maximum PWM frequency is %dhz." #~ msgstr "Maximale PWM Frequenz ist %dHz" +#~ msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +#~ msgstr "" +#~ "MicroPython-NLR-Sprung ist fehlgeschlagen. Wahrscheinlich " +#~ "Speicherbeschädigung.\n" + +#~ msgid "MicroPython fatal error.\n" +#~ msgstr "Schwerwiegender MicroPython-Fehler\n" + #~ msgid "Minimum PWM frequency is 1hz." #~ msgstr "Minimale PWM Frequenz ist %dHz" @@ -2920,6 +2924,41 @@ msgstr "" #~ msgid "STA required" #~ msgstr "STA erforderlich" +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase stack size limits and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ "If you didn't change the stack, then file an issue here with the contents " +#~ "of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Der CircuitPython-Heap war beschädigt, weil der Stack zu klein war.\n" +#~ "Bitte erhöhe die stack size limits und drücke die Reset-Taste (nach " +#~ "Auswurf des CIRCUITPY-Laufwerks)\n" +#~ "Wenn du den Stack nicht geändert hast, melde bitte das Problem unter " +#~ "https://github.com/adafruit/circuitpython/issues\n" +#~ "mit dem Inhalt deines CIRCUITPY-Laufwerks.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Die Stromversorgung des Mikrocontrollers ist eingebrochen. Stelle sicher, " +#~ "dass deine Stromversorgung genug Leistung für die gesamte Schaltung zur " +#~ "Verfügung stellt und drücke die Reset-Taste (nach Auswurf des CIRCUITPY-" +#~ "Laufwerks)\n" + +#~ msgid "" +#~ "The reset button was pressed while booting CircuitPython. Press again to " +#~ "exit safe mode.\n" +#~ msgstr "" +#~ "Die Reset-Taste wurde beim Booten von CircuitPython gedrückt. Drücke sie " +#~ "erneut um den abgesicherten Modus zu verlassen. \n" + +#~ msgid "To exit, please reset the board without " +#~ msgstr "Zum beenden, resette bitte das board ohne " + #~ msgid "UART(%d) does not exist" #~ msgstr "UART(%d) existiert nicht" @@ -2942,6 +2981,13 @@ msgstr "" #~ msgid "Voice index too high" #~ msgstr "Voice index zu hoch" +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "" +#~ "Sie laufen im abgesicherten Modus, was bedeutet, dass etwas Unerwartetes " +#~ "passiert ist.\n" + #~ msgid "buffer too long" #~ msgstr "Buffer zu lang" diff --git a/locale/en_US.po b/locale/en_US.po index 79940e95ed..7da32614f4 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -23,6 +23,19 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -292,7 +305,7 @@ msgid "Array values should be single bytes." msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -400,6 +413,10 @@ msgstr "" msgid "Cannot get temperature" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "" @@ -444,6 +461,16 @@ msgstr "" msgid "CharacteristicBuffer writing not provided" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "" @@ -505,7 +532,7 @@ msgid "Couldn't allocate second buffer" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -621,28 +648,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -815,13 +832,6 @@ msgstr "" msgid "Length must be non-negative" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -836,11 +846,11 @@ msgid "Maximum x value when mirrored is %d" msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" +msgid "MicroPython fatal error." msgstr "" #: shared-bindings/audiobusio/PDMIn.c @@ -909,6 +919,10 @@ msgstr "" msgid "No such file/directory" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1087,10 +1101,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" #: supervisor/shared/safe_mode.c @@ -1101,18 +1112,11 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -1145,10 +1149,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "" @@ -1227,6 +1227,10 @@ msgstr "" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1297,8 +1301,7 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po index 9fe49ec9f1..867618bd98 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: @sommersoft, @MrCertainly\n" @@ -25,6 +25,19 @@ msgstr "" "\n" "Captin's orders are complete. Holdin' fast fer reload.\n" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr "" @@ -294,7 +307,7 @@ msgid "Array values should be single bytes." msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -404,6 +417,10 @@ msgstr "" msgid "Cannot get temperature" msgstr "" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "" @@ -448,6 +465,16 @@ msgstr "" msgid "CharacteristicBuffer writing not provided" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "" @@ -509,7 +536,7 @@ msgid "Couldn't allocate second buffer" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -625,28 +652,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -819,13 +836,6 @@ msgstr "" msgid "Length must be non-negative" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -840,11 +850,11 @@ msgid "Maximum x value when mirrored is %d" msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" +msgid "MicroPython fatal error." msgstr "" #: shared-bindings/audiobusio/PDMIn.c @@ -913,6 +923,10 @@ msgstr "" msgid "No such file/directory" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1091,10 +1105,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" #: supervisor/shared/safe_mode.c @@ -1105,18 +1116,11 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -1149,10 +1153,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "" @@ -1231,6 +1231,10 @@ msgstr "" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1301,8 +1305,7 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/es.po b/locale/es.po index b5c375481c..285d1d8515 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -25,6 +25,19 @@ msgstr "" "\n" "El código terminó su ejecución. Esperando para recargar.\n" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Archivo \"%q\"" @@ -296,10 +309,8 @@ msgid "Array values should be single bytes." msgstr "Valores del array deben ser bytes individuales." #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" -"Intento de allocation de heap cuando la VM de MicroPython no estaba " -"corriendo.\n" #: main.c msgid "Auto-reload is off.\n" @@ -408,6 +419,10 @@ msgstr "No puede ser pull mientras este en modo de salida" msgid "Cannot get temperature" msgstr "No se puede obtener la temperatura." +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "No se puede tener ambos canales en el mismo pin" @@ -452,6 +467,16 @@ msgstr "No se puede escribir sin pin MOSI." msgid "CharacteristicBuffer writing not provided" msgstr "CharateristicBuffer escritura no proporcionada" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Clock pin init fallido" @@ -513,8 +538,8 @@ msgid "Couldn't allocate second buffer" msgstr "No se pudo asignar el segundo buffer" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" -msgstr "Choque en el HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." +msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -629,28 +654,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "No se puede liberar el mutex, err 0x%04x" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "El archivo ya existe" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "Falló borrado de flash" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "Falló el iniciar borrado de flash, err 0x%04x" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "Falló la escritura" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "Falló el iniciar la escritura de flash, err 0x%04x" - #: 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." @@ -825,17 +840,6 @@ msgstr "Length debe ser un int" msgid "Length must be non-negative" msgstr "Longitud no deberia ser negativa" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" -"Parece que nuestro código de CircuitPython ha fallado con fuerza. Whoops!\n" -"Por favor, crea un issue en https://github.com/adafruit/circuitpython/" -"issues\n" -" con el contenido de su unidad CIRCUITPY y este mensaje:\n" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "MISO pin init fallido." @@ -850,12 +854,12 @@ msgid "Maximum x value when mirrored is %d" msgstr "Valor máximo de x cuando se refleja es %d" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" -msgstr "MicroPython NLR salto fallido. Probable corrupción de memoria.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." +msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" -msgstr "Error fatal de MicroPython.\n" +msgid "MicroPython fatal error." +msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -923,6 +927,10 @@ msgstr "No queda espacio en el dispositivo" msgid "No such file/directory" msgstr "No existe el archivo/directorio" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1112,17 +1120,8 @@ msgstr "A Stream le falta el método readinto() o write()." #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" -"El heap de CircuitPython estaba corrupto porque el stack era demasiado " -"pequeño.\n" -"Aumente los límites del tamaño del stacj y presione reset (después de " -"expulsarCIRCUITPY).\n" -"Si no cambió el stack, entonces reporte un issue aquí con el contenido desu " -"unidad CIRCUITPY:\n" #: supervisor/shared/safe_mode.c msgid "" @@ -1132,23 +1131,10 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"La alimentación del microcontrolador cayó. Por favor asegurate de que tu " -"fuente de alimentación provee\n" -"suficiente energia para todo el circuito y presiona el botón de reset " -"(despuesde expulsar CIRCUITPY).\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" -"El botón reset fue presionado mientras arrancaba CircuitPython. Presiona " -"otra vez para salir del modo seguro.\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1182,10 +1168,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "Ancho del Tile debe dividir exactamente el ancho de mapa de bits" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Para salir, por favor reinicia la tarjeta sin " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Demasiados canales en sample." @@ -1264,6 +1246,10 @@ msgstr "Tipo de uuid nrfx inesperado" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1341,11 +1327,8 @@ msgstr "" "Para listar los módulos incorporados por favor haga `help(\"modules\")`.\n" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" -"Estás ejecutando en modo seguro, lo cual significa que algo realmente malo " -"ha sucedido.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2702,6 +2685,11 @@ msgstr "paso cero" #~ msgid "Address is not %d bytes long or is in wrong format" #~ msgstr "Direción no es %d bytes largo o esta en el formato incorrecto" +#~ msgid "Attempted heap allocation when MicroPython VM not running.\n" +#~ msgstr "" +#~ "Intento de allocation de heap cuando la VM de MicroPython no estaba " +#~ "corriendo.\n" + #~ msgid "Can't add services in Central mode" #~ msgstr "No se pueden agregar servicio en modo Central" @@ -2735,6 +2723,9 @@ msgstr "paso cero" #~ msgid "Could not decode ble_uuid, err 0x%04x" #~ msgstr "No se puede descodificar ble_uuid, err 0x%04x" +#~ msgid "Crash into the HardFault_Handler.\n" +#~ msgstr "Choque en el HardFault_Handler.\n" + #, fuzzy #~ msgid "Data too large for the advertisement packet" #~ msgstr "Los datos no caben en el paquete de anuncio." @@ -2849,6 +2840,15 @@ msgstr "paso cero" #~ msgid "Failed to write gatts value, err 0x%04x" #~ msgstr "No se puede escribir el valor del atributo. err: 0x%04x" +#~ msgid "Flash erase failed" +#~ msgstr "Falló borrado de flash" + +#~ msgid "Flash erase failed to start, err 0x%04x" +#~ msgstr "Falló el iniciar borrado de flash, err 0x%04x" + +#~ msgid "Flash write failed to start, err 0x%04x" +#~ msgstr "Falló el iniciar la escritura de flash, err 0x%04x" + #~ msgid "Function requires lock." #~ msgstr "La función requiere lock" @@ -2864,9 +2864,26 @@ msgstr "paso cero" #~ msgid "Invalid data pin" #~ msgstr "Pin de datos inválido" +#~ msgid "" +#~ "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ "Please file an issue at https://github.com/adafruit/circuitpython/issues\n" +#~ " with the contents of your CIRCUITPY drive and this message:\n" +#~ msgstr "" +#~ "Parece que nuestro código de CircuitPython ha fallado con fuerza. " +#~ "Whoops!\n" +#~ "Por favor, crea un issue en https://github.com/adafruit/circuitpython/" +#~ "issues\n" +#~ " con el contenido de su unidad CIRCUITPY y este mensaje:\n" + #~ msgid "Maximum PWM frequency is %dhz." #~ msgstr "La frecuencia máxima del PWM es %dhz." +#~ msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +#~ msgstr "MicroPython NLR salto fallido. Probable corrupción de memoria.\n" + +#~ msgid "MicroPython fatal error.\n" +#~ msgstr "Error fatal de MicroPython.\n" + #~ msgid "Minimum PWM frequency is 1hz." #~ msgstr "La frecuencia mínima del PWM es 1hz" @@ -2926,9 +2943,44 @@ msgstr "paso cero" #~ msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #~ msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX" +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase stack size limits and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ "If you didn't change the stack, then file an issue here with the contents " +#~ "of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "El heap de CircuitPython estaba corrupto porque el stack era demasiado " +#~ "pequeño.\n" +#~ "Aumente los límites del tamaño del stacj y presione reset (después de " +#~ "expulsarCIRCUITPY).\n" +#~ "Si no cambió el stack, entonces reporte un issue aquí con el contenido " +#~ "desu unidad CIRCUITPY:\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "La alimentación del microcontrolador cayó. Por favor asegurate de que tu " +#~ "fuente de alimentación provee\n" +#~ "suficiente energia para todo el circuito y presiona el botón de reset " +#~ "(despuesde expulsar CIRCUITPY).\n" + +#~ msgid "" +#~ "The reset button was pressed while booting CircuitPython. Press again to " +#~ "exit safe mode.\n" +#~ msgstr "" +#~ "El botón reset fue presionado mientras arrancaba CircuitPython. Presiona " +#~ "otra vez para salir del modo seguro.\n" + #~ msgid "Tile indices must be 0 - 255" #~ msgstr "Los índices de Tile deben ser 0 - 255" +#~ msgid "To exit, please reset the board without " +#~ msgstr "Para salir, por favor reinicia la tarjeta sin " + #~ msgid "UART(%d) does not exist" #~ msgstr "UART(%d) no existe" @@ -2951,6 +3003,13 @@ msgstr "paso cero" #~ msgid "Voice index too high" #~ msgstr "Index de voz demasiado alto" +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "" +#~ "Estás ejecutando en modo seguro, lo cual significa que algo realmente " +#~ "malo ha sucedido.\n" + #~ msgid "bad GATT role" #~ msgstr "mal GATT role" diff --git a/locale/fil.po b/locale/fil.po index ba20e69b81..6600ffb9a6 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -23,6 +23,19 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -296,7 +309,7 @@ msgid "Array values should be single bytes." msgstr "Array values ay dapat single bytes." #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -408,6 +421,10 @@ msgstr "Hindi makakakuha ng pull habang nasa output mode" msgid "Cannot get temperature" msgstr "Hindi makuha ang temperatura. status 0x%02x" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "Hindi maaaring output ang mga parehong channel sa parehong pin" @@ -452,6 +469,16 @@ msgstr "Hindi maaring isulat kapag walang MOSI pin." msgid "CharacteristicBuffer writing not provided" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Nabigo sa pag init ng Clock pin." @@ -514,8 +541,8 @@ msgid "Couldn't allocate second buffer" msgstr "Hindi ma-iallocate ang second buffer" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" -msgstr "Nagcrash sa HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." +msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -635,28 +662,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Mayroong file" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -831,17 +848,6 @@ msgstr "Haba ay dapat int" msgid "Length must be non-negative" msgstr "Haba ay dapat hindi negatibo" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" -"Mukhang ang core CircuitPython code nag crash. Ay!\n" -"Maaring mag file ng issue sa https://github.com/adafruit/circuitpython/" -"issues\n" -"kasama ng laman ng iyong CIRCUITPY drive at ang message na ito:\n" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "Hindi ma-initialize ang MISO pin." @@ -856,12 +862,12 @@ msgid "Maximum x value when mirrored is %d" msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" -msgstr "CircuitPython NLR jump nabigo. Maaring memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." +msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" -msgstr "CircuitPython fatal na pagkakamali.\n" +msgid "MicroPython fatal error." +msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -929,6 +935,10 @@ msgstr "" msgid "No such file/directory" msgstr "Walang file/directory" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy @@ -1116,16 +1126,8 @@ msgstr "Stream kulang ng readinto() o write() method." #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" -"Ang CircuitPython heap ay na corrupt dahil ang stack ay maliit.\n" -"Maaring i-increase ang stack size limit at i-press ang reset (pagkatapos i-" -"eject ang CIRCUITPY.\n" -"Kung hindi mo pinalitan ang stack, mag file ng issue dito kasama ng laman ng " -"CIRCUITPY drive:\n" #: supervisor/shared/safe_mode.c msgid "" @@ -1135,22 +1137,10 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"Ang kapangyarihan ng mikrokontroller ay bumaba. Mangyaring suriin ang power " -"supply \n" -"pindutin ang reset (pagkatapos i-eject ang CIRCUITPY).\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" -"Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin " -"ulit para lumabas sa safe mode.\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1184,10 +1174,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Para lumabas, paki-reset ang board na wala ang " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Sobra ang channels sa sample." @@ -1267,6 +1253,10 @@ msgstr "hindi inaasahang indent" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1346,9 +1336,8 @@ msgstr "" "Para makita ang listahan ng modules, `help(“modules”)`.\n" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" -msgstr "Ikaw ay tumatakbo sa safe mode dahil may masamang nangyari.\n" +msgid "You are in safe mode: something unanticipated happened.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2735,6 +2724,9 @@ msgstr "zero step" #~ msgid "Cannot update i/f status" #~ msgstr "Hindi ma-update i/f status" +#~ msgid "Crash into the HardFault_Handler.\n" +#~ msgstr "Nagcrash sa HardFault_Handler.\n" + #, fuzzy #~ msgid "Data too large for the advertisement packet" #~ msgstr "Hindi makasya ang data sa loob ng advertisement packet" @@ -2871,9 +2863,25 @@ msgstr "zero step" #~ msgid "Invalid data pin" #~ msgstr "Mali ang data pin" +#~ msgid "" +#~ "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ "Please file an issue at https://github.com/adafruit/circuitpython/issues\n" +#~ " with the contents of your CIRCUITPY drive and this message:\n" +#~ msgstr "" +#~ "Mukhang ang core CircuitPython code nag crash. Ay!\n" +#~ "Maaring mag file ng issue sa https://github.com/adafruit/circuitpython/" +#~ "issues\n" +#~ "kasama ng laman ng iyong CIRCUITPY drive at ang message na ito:\n" + #~ msgid "Maximum PWM frequency is %dhz." #~ msgstr "Pinakamataas na PWM frequency ay %dhz." +#~ msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +#~ msgstr "CircuitPython NLR jump nabigo. Maaring memory corruption.\n" + +#~ msgid "MicroPython fatal error.\n" +#~ msgstr "CircuitPython fatal na pagkakamali.\n" + #~ msgid "Minimum PWM frequency is 1hz." #~ msgstr "Pinakamababang PWM frequency ay 1hz." @@ -2918,6 +2926,39 @@ msgstr "zero step" #~ msgid "STA required" #~ msgstr "STA kailangan" +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase stack size limits and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ "If you didn't change the stack, then file an issue here with the contents " +#~ "of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Ang CircuitPython heap ay na corrupt dahil ang stack ay maliit.\n" +#~ "Maaring i-increase ang stack size limit at i-press ang reset (pagkatapos " +#~ "i-eject ang CIRCUITPY.\n" +#~ "Kung hindi mo pinalitan ang stack, mag file ng issue dito kasama ng laman " +#~ "ng CIRCUITPY drive:\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Ang kapangyarihan ng mikrokontroller ay bumaba. Mangyaring suriin ang " +#~ "power supply \n" +#~ "pindutin ang reset (pagkatapos i-eject ang CIRCUITPY).\n" + +#~ msgid "" +#~ "The reset button was pressed while booting CircuitPython. Press again to " +#~ "exit safe mode.\n" +#~ msgstr "" +#~ "Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin " +#~ "ulit para lumabas sa safe mode.\n" + +#~ msgid "To exit, please reset the board without " +#~ msgstr "Para lumabas, paki-reset ang board na wala ang " + #~ msgid "UART(%d) does not exist" #~ msgstr "Walang UART(%d)" @@ -2937,6 +2978,11 @@ msgstr "zero step" #~ msgid "Voice index too high" #~ msgstr "Index ng Voice ay masyadong mataas" +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "Ikaw ay tumatakbo sa safe mode dahil may masamang nangyari.\n" + #~ msgid "[addrinfo error %d]" #~ msgstr "[addrinfo error %d]" diff --git a/locale/fr.po b/locale/fr.po index e103cd06d2..6437b8ba86 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2019-04-14 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -25,6 +25,19 @@ msgstr "" "\n" "Fin d'éxecution du code. En attente de recharge.\n" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Fichier \"%q\"" @@ -300,9 +313,8 @@ msgid "Array values should be single bytes." msgstr "Les valeurs du tableau doivent être des octets simples 'bytes'." #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" -"Tentative d'allocation de tas alors que la VM MicroPython ne tourne pas.\n" #: main.c msgid "Auto-reload is off.\n" @@ -413,6 +425,10 @@ msgstr "Ne peut être tiré ('pull') en mode 'output'" msgid "Cannot get temperature" msgstr "Impossible de lire la température" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "Les 2 canaux de sortie ne peuvent être sur la même broche" @@ -458,6 +474,16 @@ msgstr "Impossible d'écrire sans broche MOSI." msgid "CharacteristicBuffer writing not provided" msgstr "Ecriture sur 'CharacteristicBuffer' non fournie" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Echec de l'init. de la broche d'horloge" @@ -520,8 +546,8 @@ msgid "Couldn't allocate second buffer" msgstr "Impossible d'allouer le 2e tampon" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" -msgstr "Plantage vers le 'HardFault_Handler'.\n" +msgid "Crash into the HardFault_Handler." +msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -639,28 +665,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Impossible de libérer mutex, err 0x%04x" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Le fichier existe" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "L'effacement de la flash a échoué" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "Echec du démarrage de l'effacement de la flash, err 0x%04x" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "L'écriture de la flash échoué" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "Echec du démarrage de l'écriture de la flash, err 0x%04x" - #: 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." @@ -839,17 +855,6 @@ msgstr "La longueur doit être un nombre entier" msgid "Length must be non-negative" msgstr "La longueur ne doit pas être négative" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" -"On dirait que notre code CircuitPython a durement planté. Oups !\n" -"Merci de remplir un ticket sur https://github.com/adafruit/circuitpython/" -"issues\n" -"avec le contenu de votre lecteur CIRCUITPY et ce message:\n" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "Echec de l'init. de la broche MISO" @@ -864,12 +869,12 @@ msgid "Maximum x value when mirrored is %d" msgstr "La valeur max. de x est %d lors d'une opération miroir" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" -msgstr "Saut MicroPython NLR a échoué. Corruption de mémoire possible.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." +msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" -msgstr "Erreur fatale de MicroPython.\n" +msgid "MicroPython fatal error." +msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -937,6 +942,10 @@ msgstr "Il n'y a plus d'espace libre sur le périphérique" msgid "No such file/directory" msgstr "Fichier/dossier introuvable" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy @@ -1131,17 +1140,8 @@ msgstr "Il manque une méthode readinto() ou write() au flux." #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" -"Le tas (heap) de CircuitPython a été corrompu parce que la pile était trop " -"petite.\n" -"Augmentez la limite de taille de la pile et appuyez sur 'reset' (après avoir " -"éjecté CIRCUITPY).\n" -"Si vous n'avez pas modifié la pile, merci de remplir un ticket avec le " -"contenu de votre lecteur CIRCUITPY :\n" #: supervisor/shared/safe_mode.c msgid "" @@ -1150,25 +1150,11 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"L'alimentation du microcontroleur a chuté. Merci de vérifier que votre " -"alimentation fournit\n" -"suffisamment de puissance pour l'ensemble du circuit et appuyez sur " -"'reset' (après avoir éjecté CIRCUITPY).\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" -"Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. " -"Appuyer de nouveau pour quitter de le mode sans-échec.\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1203,10 +1189,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "La largeur de la tuile doit diviser exactement la largeur de l'image" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Pour quitter, redémarrez la carte SVP sans " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Trop de canaux dans l'échantillon." @@ -1289,6 +1271,10 @@ msgstr "Type inattendu pour l'uuid nrfx" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1367,11 +1353,8 @@ msgstr "" "Pour lister les modules inclus, tapez `help(\"modules\")`.\n" #: supervisor/shared/safe_mode.c -#, fuzzy -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" -"Vous êtes en mode sans-échec ce qui signifie qu'un imprévu est survenu.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2753,6 +2736,10 @@ msgstr "'step' nul" #~ msgid "Address is not %d bytes long or is in wrong format" #~ msgstr "L'adresse n'est pas longue de %d octets ou est d'un format erroné" +#~ msgid "Attempted heap allocation when MicroPython VM not running.\n" +#~ msgstr "" +#~ "Tentative d'allocation de tas alors que la VM MicroPython ne tourne pas.\n" + #~ msgid "Can't add services in Central mode" #~ msgstr "Impossible d'ajouter des services en mode Central" @@ -2786,6 +2773,9 @@ msgstr "'step' nul" #~ msgid "Could not decode ble_uuid, err 0x%04x" #~ msgstr "Impossible de décoder le 'ble_uuid', err 0x%04x" +#~ msgid "Crash into the HardFault_Handler.\n" +#~ msgstr "Plantage vers le 'HardFault_Handler'.\n" + #~ msgid "Data too large for the advertisement packet" #~ msgstr "Données trop volumineuses pour le paquet de diffusion" @@ -2912,6 +2902,15 @@ msgstr "'step' nul" #~ msgid "Failed to write gatts value, err 0x%04x" #~ msgstr "Impossible d'écrire la valeur de 'gatts', err 0x%04x" +#~ msgid "Flash erase failed" +#~ msgstr "L'effacement de la flash a échoué" + +#~ 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 to start, err 0x%04x" +#~ msgstr "Echec du démarrage de l'écriture de la flash, err 0x%04x" + #~ msgid "Function requires lock." #~ msgstr "La fonction nécessite un verrou." @@ -2927,9 +2926,25 @@ msgstr "'step' nul" #~ msgid "Invalid data pin" #~ msgstr "Broche de données invalide" +#~ msgid "" +#~ "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ "Please file an issue at https://github.com/adafruit/circuitpython/issues\n" +#~ " with the contents of your CIRCUITPY drive and this message:\n" +#~ msgstr "" +#~ "On dirait que notre code CircuitPython a durement planté. Oups !\n" +#~ "Merci de remplir un ticket sur https://github.com/adafruit/circuitpython/" +#~ "issues\n" +#~ "avec le contenu de votre lecteur CIRCUITPY et ce message:\n" + #~ msgid "Maximum PWM frequency is %dhz." #~ msgstr "La fréquence de PWM maximale est %dHz" +#~ msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +#~ msgstr "Saut MicroPython NLR a échoué. Corruption de mémoire possible.\n" + +#~ msgid "MicroPython fatal error.\n" +#~ msgstr "Erreur fatale de MicroPython.\n" + #~ msgid "Minimum PWM frequency is 1hz." #~ msgstr "La fréquence de PWM minimale est 1Hz" @@ -2986,9 +3001,45 @@ msgstr "'step' nul" #~ msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #~ msgstr "Assertion en mode 'soft-device', id: 0x%08lX, pc: 0x%08lX" +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase stack size limits and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ "If you didn't change the stack, then file an issue here with the contents " +#~ "of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Le tas (heap) de CircuitPython a été corrompu parce que la pile était " +#~ "trop petite.\n" +#~ "Augmentez la limite de taille de la pile et appuyez sur 'reset' (après " +#~ "avoir éjecté CIRCUITPY).\n" +#~ "Si vous n'avez pas modifié la pile, merci de remplir un ticket avec le " +#~ "contenu de votre lecteur CIRCUITPY :\n" + +#, fuzzy +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "L'alimentation du microcontroleur a chuté. Merci de vérifier que votre " +#~ "alimentation fournit\n" +#~ "suffisamment de puissance pour l'ensemble du circuit et appuyez sur " +#~ "'reset' (après avoir éjecté CIRCUITPY).\n" + +#~ msgid "" +#~ "The reset button was pressed while booting CircuitPython. Press again to " +#~ "exit safe mode.\n" +#~ msgstr "" +#~ "Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. " +#~ "Appuyer de nouveau pour quitter de le mode sans-échec.\n" + #~ msgid "Tile indices must be 0 - 255" #~ msgstr "Les indices des tuiles doivent être compris entre 0 et 255 " +#~ msgid "To exit, please reset the board without " +#~ msgstr "Pour quitter, redémarrez la carte SVP sans " + #~ msgid "UART(%d) does not exist" #~ msgstr "UART(%d) n'existe pas" @@ -3011,6 +3062,13 @@ msgstr "'step' nul" #~ msgid "Voice index too high" #~ msgstr "Index de la voix trop grand" +#, fuzzy +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "" +#~ "Vous êtes en mode sans-échec ce qui signifie qu'un imprévu est survenu.\n" + #~ msgid "bad GATT role" #~ msgstr "mauvais rôle GATT" diff --git a/locale/it_IT.po b/locale/it_IT.po index c1a445fa24..a659664a00 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -23,6 +23,19 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " File \"%q\"" @@ -295,7 +308,7 @@ msgid "Array values should be single bytes." msgstr "Valori di Array dovrebbero essere bytes singulari" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -408,6 +421,10 @@ msgstr "non si può tirare quando nella modalita output" msgid "Cannot get temperature" msgstr "Impossibile leggere la temperatura. status: 0x%02x" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "Impossibile dare in output entrambi i canal sullo stesso pin" @@ -453,6 +470,16 @@ msgstr "Impossibile scrivere senza pin MOSI." msgid "CharacteristicBuffer writing not provided" msgstr "CharacteristicBuffer scritura non dato" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Inizializzazione del pin di clock fallita." @@ -515,7 +542,7 @@ msgid "Couldn't allocate second buffer" msgstr "Impossibile allocare il secondo buffer" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -635,28 +662,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "File esistente" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "Cancellamento di Flash fallito" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "Iniziamento di Cancellamento di Flash fallito, err 0x%04x" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "Impostazione di Flash fallito" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "Iniziamento di Impostazione di Flash dallito, err 0x%04x" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -834,13 +851,6 @@ msgstr "Length deve essere un intero" msgid "Length must be non-negative" msgstr "Length deve essere non negativo" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "inizializzazione del pin MISO fallita." @@ -855,12 +865,12 @@ msgid "Maximum x value when mirrored is %d" msgstr "Valore massimo di x quando rispachiato è %d" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" -msgstr "Errore fatale in MicroPython.\n" +msgid "MicroPython fatal error." +msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -929,6 +939,10 @@ msgstr "Non che spazio sul dispositivo" msgid "No such file/directory" msgstr "Nessun file/directory esistente" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy @@ -1123,10 +1137,7 @@ msgstr "Metodi mancanti readinto() o write() allo stream." #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" #: supervisor/shared/safe_mode.c @@ -1136,21 +1147,11 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"La potenza del microcontrollore è calata. Assicurati che l'alimentazione sia " -"attaccata correttamente\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1184,10 +1185,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Per uscire resettare la scheda senza " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "" @@ -1267,6 +1264,10 @@ msgstr "indentazione inaspettata" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1338,12 +1339,8 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -#, fuzzy -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" -"Sei nella modalità sicura che significa che qualcosa di molto brutto è " -"successo.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2862,6 +2859,15 @@ msgstr "zero step" #~ msgid "Failed to write gatts value, err 0x%04x" #~ msgstr "Impossibile scrivere valore dell'attributo. status: 0x%02x" +#~ msgid "Flash erase failed" +#~ msgstr "Cancellamento di Flash fallito" + +#~ msgid "Flash erase failed to start, err 0x%04x" +#~ msgstr "Iniziamento di Cancellamento di Flash fallito, err 0x%04x" + +#~ msgid "Flash write failed to start, err 0x%04x" +#~ msgstr "Iniziamento di Impostazione di Flash dallito, err 0x%04x" + #~ msgid "GPIO16 does not support pull up." #~ msgstr "GPIO16 non supporta pull-up" @@ -2877,6 +2883,9 @@ msgstr "zero step" #~ msgid "Maximum PWM frequency is %dhz." #~ msgstr "Frequenza massima su PWM è %dhz" +#~ msgid "MicroPython fatal error.\n" +#~ msgstr "Errore fatale in MicroPython.\n" + #~ msgid "Minimum PWM frequency is 1hz." #~ msgstr "Frequenza minima su PWM è 1hz" @@ -2922,6 +2931,19 @@ msgstr "zero step" #~ msgid "STA required" #~ msgstr "STA richiesta" +#, fuzzy +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "La potenza del microcontrollore è calata. Assicurati che l'alimentazione " +#~ "sia attaccata correttamente\n" + +#~ msgid "To exit, please reset the board without " +#~ msgstr "Per uscire resettare la scheda senza " + #~ msgid "UART(%d) does not exist" #~ msgstr "UART(%d) non esistente" @@ -2937,6 +2959,14 @@ msgstr "zero step" #~ msgid "Use esptool to erase flash and re-upload Python instead" #~ msgstr "Usa esptool per cancellare la flash e ricaricare Python invece" +#, fuzzy +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "" +#~ "Sei nella modalità sicura che significa che qualcosa di molto brutto è " +#~ "successo.\n" + #~ msgid "[addrinfo error %d]" #~ msgstr "[errore addrinfo %d]" diff --git a/locale/ko.po b/locale/ko.po index 93a476b876..c47c10a94d 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2019-05-06 14:22-0700\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" @@ -25,6 +25,19 @@ msgstr "" "\n" "실행 완료 코드. 재장전 을 기다리는 중입니다\n" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " 파일 \"%q\"" @@ -294,7 +307,7 @@ msgid "Array values should be single bytes." msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -404,6 +417,10 @@ msgstr "" msgid "Cannot get temperature" msgstr "온도 데이터를 수신 할 수 없습니다" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "" @@ -448,6 +465,16 @@ msgstr "" msgid "CharacteristicBuffer writing not provided" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "" @@ -509,7 +536,7 @@ msgid "Couldn't allocate second buffer" msgstr "" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -625,28 +652,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -819,13 +836,6 @@ msgstr "길이는 정수(int) 여야합니다" msgid "Length must be non-negative" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -840,11 +850,11 @@ msgid "Maximum x value when mirrored is %d" msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" +msgid "MicroPython fatal error." msgstr "" #: shared-bindings/audiobusio/PDMIn.c @@ -913,6 +923,10 @@ msgstr "" msgid "No such file/directory" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1091,10 +1105,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" #: supervisor/shared/safe_mode.c @@ -1105,18 +1116,11 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -1149,10 +1153,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "" @@ -1232,6 +1232,10 @@ msgstr "" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1302,8 +1306,7 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/pl.po b/locale/pl.po index 8efab18675..8d564c2431 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n" "Last-Translator: Radomir Dopieralski \n" "Language-Team: pl\n" @@ -24,6 +24,19 @@ msgstr "" "\n" "Kod wykonany. Czekam na przeładowanie.\n" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Plik \"%q\"" @@ -293,8 +306,8 @@ msgid "Array values should be single bytes." msgstr "Wartości powinny być bajtami." #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" -msgstr "Próba alokacji pamięci na stercie gdy VM nie działa.\n" +msgid "Attempted heap allocation when MicroPython VM not running." +msgstr "" #: main.c msgid "Auto-reload is off.\n" @@ -403,6 +416,10 @@ msgstr "Nie ma podciągnięcia w trybie wyjścia" msgid "Cannot get temperature" msgstr "Nie można odczytać temperatury" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "Nie można mieć obu kanałów na tej samej nóżce" @@ -447,6 +464,16 @@ msgstr "Nie można pisać bez nóżki MOSI." msgid "CharacteristicBuffer writing not provided" msgstr "Pisanie do CharacteristicBuffer niewspierane" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Nie powiodło się ustawienie nóżki zegara" @@ -508,8 +535,8 @@ msgid "Couldn't allocate second buffer" msgstr "Nie udała się alokacja drugiego bufora" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" -msgstr "Katastrofa w HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." +msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -624,28 +651,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Nie udało się zwolnić blokady, błąd 0x%04x" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Plik istnieje" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "Nie udało się skasować flash" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "Nie udało się rozpocząć kasowania flash, błąd 0x%04x" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "Zapis do flash nie powiódł się" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "Nie udało się rozpocząć zapisu do flash, błąd 0x%04x" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "Uzyskana częstotliwość jest niemożliwa. Spauzowano." @@ -820,17 +837,6 @@ msgstr "Długość musi być całkowita" msgid "Length must be non-negative" msgstr "Długość musi być nieujemna" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" -"Ojej, wygląda na to, że CircuitPython natrafił na poważny problem!\n" -"Prosimy o zgłoszenie błędu pod adresem https://github.com/adafruit/" -"circuitpython/issues\n" -" z zawartością dysku CIRCUITPY oraz tym komunikatem:\n" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "Nie powiodło się ustawienie nóżki MISO." @@ -845,13 +851,12 @@ msgid "Maximum x value when mirrored is %d" msgstr "Największa wartość x przy odwróceniu to %d" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" -"Skok NLR MicroPythona nie powiódł się. Prawdopodobne skażenie pamięci.\n" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" -msgstr "Krytyczny błąd MicroPythona.\n" +msgid "MicroPython fatal error." +msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -919,6 +924,10 @@ msgstr "Brak miejsca" msgid "No such file/directory" msgstr "Brak pliku/katalogu" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1097,16 +1106,8 @@ msgstr "Strumień nie ma metod readinto() lub write()." #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" -"Sterta CircuitPythona jest skażona z powodu zbyt małego stosu.\n" -"Proszę zwiększyć limity wielkości stosu i nazisnąć reset (po odmontowaniu " -"CIRCUITPY).\n" -"Jeśli wielkość stosu nie była zmieniana, proszę zgłosić błąd zawierający " -"zawartość CIRCUITPY tutaj:\n" #: supervisor/shared/safe_mode.c msgid "" @@ -1116,22 +1117,10 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"Zasilanie mikrokontrolera gwałtownie spadło. Proszę upewnić się,\n" -"że zasilanie jest wystarczające dla całego obwodu in nacisnąć reset (po " -"odmontowaniu CIRCUITPY).\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" -"Przycisk reset został wciśnięty podczas startu CircuitPythona. Wciśnij go " -"ponownie aby wyjść z trybu bezpieczeństwa.\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1165,10 +1154,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "Szerokość bitmapy musi być wielokrotnością szerokości kafelka" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "By wyjść, proszę zresetować płytkę bez " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Zbyt wiele kanałów." @@ -1247,6 +1232,10 @@ msgstr "Nieoczekiwany typ nrfx uuid." msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1320,10 +1309,8 @@ msgstr "" "Aby zobaczyć wbudowane moduły, wpisz `help(\"modules\")`.\n" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" -"Uruchomiono w trybie bezpieczeństwa, gdyż nastąpiło coś nieoczekiwanego.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2660,6 +2647,9 @@ msgstr "zerowy krok" #~ msgid "Address is not %d bytes long or is in wrong format" #~ msgstr "Adres nie ma długości %d bajtów lub zły format" +#~ msgid "Attempted heap allocation when MicroPython VM not running.\n" +#~ msgstr "Próba alokacji pamięci na stercie gdy VM nie działa.\n" + #~ msgid "Can't add services in Central mode" #~ msgstr "Nie można dodać serwisów w trybie Central" @@ -2681,6 +2671,9 @@ msgstr "zerowy krok" #~ msgid "Could not decode ble_uuid, err 0x%04x" #~ msgstr "Nie można zdekodować ble_uuid, błąd 0x%04x" +#~ msgid "Crash into the HardFault_Handler.\n" +#~ msgstr "Katastrofa w HardFault_Handler.\n" + #~ msgid "Data too large for the advertisement packet" #~ msgstr "Zbyt dużo danych pakietu rozgłoszeniowego" @@ -2763,6 +2756,15 @@ msgstr "zerowy krok" #~ msgid "Failed to write gatts value, err 0x%04x" #~ msgstr "Nie udało się zapisać gatts, błąd 0x%04x" +#~ msgid "Flash erase failed" +#~ msgstr "Nie udało się skasować flash" + +#~ 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 to start, err 0x%04x" +#~ msgstr "Nie udało się rozpocząć zapisu do flash, błąd 0x%04x" + #~ msgid "Invalid bit clock pin" #~ msgstr "Zła nóżka zegara" @@ -2772,6 +2774,23 @@ msgstr "zerowy krok" #~ msgid "Invalid data pin" #~ msgstr "Zła nóżka danych" +#~ msgid "" +#~ "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ "Please file an issue at https://github.com/adafruit/circuitpython/issues\n" +#~ " with the contents of your CIRCUITPY drive and this message:\n" +#~ msgstr "" +#~ "Ojej, wygląda na to, że CircuitPython natrafił na poważny problem!\n" +#~ "Prosimy o zgłoszenie błędu pod adresem https://github.com/adafruit/" +#~ "circuitpython/issues\n" +#~ " z zawartością dysku CIRCUITPY oraz tym komunikatem:\n" + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +#~ msgstr "" +#~ "Skok NLR MicroPythona nie powiódł się. Prawdopodobne skażenie pamięci.\n" + +#~ msgid "MicroPython fatal error.\n" +#~ msgstr "Krytyczny błąd MicroPythona.\n" + #~ msgid "Must be a Group subclass." #~ msgstr "Musi dziedziczyć z Group." @@ -2783,15 +2802,54 @@ msgstr "zerowy krok" #~ msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #~ msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX" +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase stack size limits and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ "If you didn't change the stack, then file an issue here with the contents " +#~ "of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Sterta CircuitPythona jest skażona z powodu zbyt małego stosu.\n" +#~ "Proszę zwiększyć limity wielkości stosu i nazisnąć reset (po odmontowaniu " +#~ "CIRCUITPY).\n" +#~ "Jeśli wielkość stosu nie była zmieniana, proszę zgłosić błąd zawierający " +#~ "zawartość CIRCUITPY tutaj:\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Zasilanie mikrokontrolera gwałtownie spadło. Proszę upewnić się,\n" +#~ "że zasilanie jest wystarczające dla całego obwodu in nacisnąć reset (po " +#~ "odmontowaniu CIRCUITPY).\n" + +#~ msgid "" +#~ "The reset button was pressed while booting CircuitPython. Press again to " +#~ "exit safe mode.\n" +#~ msgstr "" +#~ "Przycisk reset został wciśnięty podczas startu CircuitPythona. Wciśnij go " +#~ "ponownie aby wyjść z trybu bezpieczeństwa.\n" + #~ msgid "Tile indices must be 0 - 255" #~ msgstr "Indeks kafelka musi być pomiędzy 0 a 255 włącznie" +#~ msgid "To exit, please reset the board without " +#~ msgstr "By wyjść, proszę zresetować płytkę bez " + #~ msgid "UUID integer value not in range 0 to 0xffff" #~ msgstr "Wartość UUID poza zakresem 0 do 0xffff" #~ msgid "Voice index too high" #~ msgstr "Zbyt wysoki indeks głosu" +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "" +#~ "Uruchomiono w trybie bezpieczeństwa, gdyż nastąpiło coś nieoczekiwanego.\n" + #~ msgid "bad GATT role" #~ msgstr "zła rola GATT" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 1ca6b7d9a5..48cf9e77ef 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -23,6 +23,19 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Arquivo \"%q\"" @@ -295,7 +308,7 @@ msgid "Array values should be single bytes." msgstr "" #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" +msgid "Attempted heap allocation when MicroPython VM not running." msgstr "" #: main.c @@ -405,6 +418,10 @@ msgstr "" msgid "Cannot get temperature" msgstr "Não pode obter a temperatura. status: 0x%02x" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "" @@ -449,6 +466,16 @@ msgstr "Não é possível ler sem um pino MOSI" msgid "CharacteristicBuffer writing not provided" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Inicialização do pino de Clock falhou." @@ -511,7 +538,7 @@ msgid "Couldn't allocate second buffer" msgstr "Não pôde alocar segundo buffer" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -630,28 +657,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Não é possível ler o valor do atributo. status: 0x%02x" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Arquivo já existe" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "" - #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -827,13 +844,6 @@ msgstr "Tamanho deve ser um int" msgid "Length must be non-negative" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "Inicialização do pino MISO falhou" @@ -848,11 +858,11 @@ msgid "Maximum x value when mirrored is %d" msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" +msgid "MicroPython fatal error." msgstr "" #: shared-bindings/audiobusio/PDMIn.c @@ -921,6 +931,10 @@ msgstr "" msgid "No such file/directory" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy @@ -1104,10 +1118,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" #: supervisor/shared/safe_mode.c @@ -1118,18 +1129,11 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -1162,10 +1166,6 @@ msgstr "" msgid "Tile width must exactly divide bitmap width" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Para sair, por favor, reinicie a placa sem " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Muitos canais na amostra." @@ -1244,6 +1244,10 @@ msgstr "" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1315,8 +1319,7 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" #: supervisor/shared/safe_mode.c @@ -2837,6 +2840,9 @@ msgstr "passo zero" #~ msgid "STA required" #~ msgstr "STA requerido" +#~ msgid "To exit, please reset the board without " +#~ msgstr "Para sair, por favor, reinicie a placa sem " + #~ msgid "UART(%d) does not exist" #~ msgstr "UART(%d) não existe" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 40966090d4..63889a52d6 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: 2019-12-10 13:55-0600\n" +"POT-Creation-Date: 2019-12-12 15:33-0800\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -25,6 +25,19 @@ msgstr "" "\n" "Dàimǎ yǐ wánchéng yùnxíng. Zhèngzài děngdài chóngxīn jiāzài.\n" +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" + #: py/obj.c msgid " File \"%q\"" msgstr " Wénjiàn \"%q\"" @@ -294,8 +307,8 @@ msgid "Array values should be single bytes." msgstr "Shùzǔ zhí yīnggāi shì dāngè zì jié." #: supervisor/shared/safe_mode.c -msgid "Attempted heap allocation when MicroPython VM not running.\n" -msgstr "MicroPython VM wèi yùnxíng shí chángshì duī fēnpèi.\n" +msgid "Attempted heap allocation when MicroPython VM not running." +msgstr "" #: main.c msgid "Auto-reload is off.\n" @@ -404,6 +417,10 @@ msgstr "Zài shūchū móshì xià wúfǎ huòqǔ lādòng" msgid "Cannot get temperature" msgstr "Wúfǎ huòqǔ wēndù" +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Cannot output both channels on the same pin" msgstr "Wúfǎ shūchū tóng yīgè yǐn jiǎo shàng de liǎng gè píndào" @@ -448,6 +465,16 @@ msgstr "Wúfǎ xiě rù MOSI de yǐn jiǎo." msgid "CharacteristicBuffer writing not provided" msgstr "Wèi tígōng zìfú huǎncún xiě rù" +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." msgstr "Shízhōng de yǐn jiǎo chūshǐhuà shībài." @@ -509,8 +536,8 @@ msgid "Couldn't allocate second buffer" msgstr "Wúfǎ fēnpèi dì èr gè huǎnchōng qū" #: supervisor/shared/safe_mode.c -msgid "Crash into the HardFault_Handler.\n" -msgstr "Bēngkuì dào HardFault_Handler.\n" +msgid "Crash into the HardFault_Handler." +msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -625,28 +652,18 @@ msgstr "" msgid "Failed to release mutex, err 0x%04x" msgstr "Wúfǎ shìfàng mutex, err 0x%04x" +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + #: py/moduerrno.c msgid "File exists" msgstr "Wénjiàn cúnzài" -#: ports/nrf/peripherals/nrf/nvm.c -msgid "Flash erase failed" -msgstr "Flash cā chú shībài" - -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash erase failed to start, err 0x%04x" -msgstr "Flash cā chú shībài, err 0x%04x" - -#: ports/nrf/peripherals/nrf/nvm.c +#: ports/nrf/common-hal/nvm/ByteArray.c msgid "Flash write failed" msgstr "Flash xiě rù shībài" -#: ports/nrf/peripherals/nrf/nvm.c -#, c-format -msgid "Flash write failed to start, err 0x%04x" -msgstr "Flash xiě rù shībài, err 0x%04x" - #: 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." @@ -821,17 +838,6 @@ msgstr "Chángdù bìxū shì yīgè zhěngshù" msgid "Length must be non-negative" msgstr "Chángdù bìxū shìfēi fùshù" -#: supervisor/shared/safe_mode.c -msgid "" -"Looks like our core CircuitPython code crashed hard. Whoops!\n" -"Please file an issue at https://github.com/adafruit/circuitpython/issues\n" -" with the contents of your CIRCUITPY drive and this message:\n" -msgstr "" -"Kàn lái wǒmen de héxīn CircuitPython dàimǎ bēngkuì dé hěn lìhài. Āi yōu!\n" -"Qǐng zài https://Github.Com/adafruit/circuitpython/issues\n" -"shàng tíjiāo yīgè wèntí, qízhōng bāohán nín de CIRCUITPY qūdòngqì de nèiróng " -"hé cǐ xiāoxī:\n" - #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "MISO yǐn jiǎo chūshǐhuà shībài." @@ -846,12 +852,12 @@ msgid "Maximum x value when mirrored is %d" msgstr "Jìngxiàng shí de zuìdà X zhí wèi%d" #: supervisor/shared/safe_mode.c -msgid "MicroPython NLR jump failed. Likely memory corruption.\n" -msgstr "MicroPython NLR tiàoyuè shībài. Kěnéng nèicún fǔbài.\n" +msgid "MicroPython NLR jump failed. Likely memory corruption." +msgstr "" #: supervisor/shared/safe_mode.c -msgid "MicroPython fatal error.\n" -msgstr "MicroPython zhìmìng cuòwù.\n" +msgid "MicroPython fatal error." +msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -919,6 +925,10 @@ msgstr "Shèbèi shàng méiyǒu kònggé" msgid "No such file/directory" msgstr "Méiyǒu cǐ lèi wénjiàn/mùlù" +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "Not connected" @@ -1101,16 +1111,8 @@ msgstr "Liú quēshǎo readinto() huò write() fāngfǎ." #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase stack size limits and press reset (after ejecting " -"CIRCUITPY).\n" -"If you didn't change the stack, then file an issue here with the contents of " -"your CIRCUITPY drive:\n" +"Please increase the stack size if you know how, or if not:" msgstr "" -"Yóuyú duīzhàn tài xiǎo, huánliú Python rè sǔnhuài.\n" -"Qǐng zēngjiā duīzhàn chǐcùn xiànzhì, ránhòu chóngxīn shèzhì (zài dànchū " -"CIRCUITPY).\n" -"Rúguǒ nín méiyǒu gǎibiàn duīzhàn, qǐng zài cǐ chù tíchū yīgè wèntí, bìng zài " -"rù nín de CIRCUITPY qūdòngqì:\n" #: supervisor/shared/safe_mode.c msgid "" @@ -1122,22 +1124,10 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" +"The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" -"Wēi kòngzhì qì de diànliàng bèi chōng chū. Qǐng quèbǎo nín de diànyuán wèi\n" -"zhěnggè diànlù tígōng zúgòu de diànyuán bìng àn xià fùwèi (zài dànchū " -"CIRCUITPY hòu).\n" - -#: supervisor/shared/safe_mode.c -msgid "" -"The reset button was pressed while booting CircuitPython. Press again to " -"exit safe mode.\n" -msgstr "" -"Qǐdòng CircuitPython shí, chóng zhì ànniǔ bèi àn xià. Zàicì àn xià yǐ tuìchū " -"ānquán móshì\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -1171,10 +1161,6 @@ msgstr "Píng pū zhí chāochū fànwéi" msgid "Tile width must exactly divide bitmap width" msgstr "Píng pū kuāndù bìxū huàfēn wèi tú kuāndù" -#: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Yào tuìchū, qǐng chóng zhì bǎnkuài ér bùyòng " - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." msgstr "Chōuyàng zhōng de píndào tài duō." @@ -1253,6 +1239,10 @@ msgstr "Yìwài de nrfx uuid lèixíng" msgid "Unknown gatt error: 0x%04x" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" @@ -1328,11 +1318,8 @@ msgstr "" "Ruò yào liè chū nèizài de mókuài, qǐng qǐng zuò yǐxià `help(\"modules\")`.\n" #: supervisor/shared/safe_mode.c -msgid "" -"You are running in safe mode which means something unanticipated happened.\n" +msgid "You are in safe mode: something unanticipated happened.\n" msgstr "" -"Nǐ zhèngzài ānquán móshì xià yùnxíng, zhè yì wèi zhuó yìwài fāshēng de " -"shìqíng.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -2673,6 +2660,9 @@ msgstr "líng bù" #~ msgid "Address is not %d bytes long or is in wrong format" #~ msgstr "Dìzhǐ bùshì %d zì jié zhǎng, huòzhě géshì cuòwù" +#~ msgid "Attempted heap allocation when MicroPython VM not running.\n" +#~ msgstr "MicroPython VM wèi yùnxíng shí chángshì duī fēnpèi.\n" + #~ msgid "Can't add services in Central mode" #~ msgstr "Wúfǎ zài zhōngyāng móshì xià tiānjiā fúwù" @@ -2697,6 +2687,9 @@ msgstr "líng bù" #~ msgid "Could not decode ble_uuid, err 0x%04x" #~ msgstr "Wúfǎ jiěmǎ kě dú_uuid, err 0x%04x" +#~ msgid "Crash into the HardFault_Handler.\n" +#~ msgstr "Bēngkuì dào HardFault_Handler.\n" + #~ msgid "Data too large for the advertisement packet" #~ msgstr "Guǎnggào bāo de shùjù tài dà" @@ -2802,6 +2795,15 @@ msgstr "líng bù" #~ msgid "Failed to write gatts value, err 0x%04x" #~ msgstr "Xiě rù gatts zhí,err 0x%04x shībài" +#~ msgid "Flash erase failed" +#~ msgstr "Flash cā chú shībài" + +#~ msgid "Flash erase failed to start, err 0x%04x" +#~ msgstr "Flash cā chú shībài, err 0x%04x" + +#~ msgid "Flash write failed to start, err 0x%04x" +#~ msgstr "Flash xiě rù shībài, err 0x%04x" + #~ msgid "Invalid bit clock pin" #~ msgstr "Wúxiào de wèi shízhōng yǐn jiǎo" @@ -2811,6 +2813,22 @@ msgstr "líng bù" #~ msgid "Invalid data pin" #~ msgstr "Wúxiào de shùjù yǐn jiǎo" +#~ msgid "" +#~ "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ "Please file an issue at https://github.com/adafruit/circuitpython/issues\n" +#~ " with the contents of your CIRCUITPY drive and this message:\n" +#~ msgstr "" +#~ "Kàn lái wǒmen de héxīn CircuitPython dàimǎ bēngkuì dé hěn lìhài. Āi yōu!\n" +#~ "Qǐng zài https://Github.Com/adafruit/circuitpython/issues\n" +#~ "shàng tíjiāo yīgè wèntí, qízhōng bāohán nín de CIRCUITPY qūdòngqì de " +#~ "nèiróng hé cǐ xiāoxī:\n" + +#~ msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +#~ msgstr "MicroPython NLR tiàoyuè shībài. Kěnéng nèicún fǔbài.\n" + +#~ msgid "MicroPython fatal error.\n" +#~ msgstr "MicroPython zhìmìng cuòwù.\n" + #~ msgid "Must be a Group subclass." #~ msgstr "Bìxū shì fēnzǔ zi lèi." @@ -2835,15 +2853,56 @@ msgstr "líng bù" #~ msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #~ msgstr "Ruǎn shèbèi wéihù, id: 0X%08lX, pc: 0X%08lX" +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase stack size limits and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ "If you didn't change the stack, then file an issue here with the contents " +#~ "of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Yóuyú duīzhàn tài xiǎo, huánliú Python rè sǔnhuài.\n" +#~ "Qǐng zēngjiā duīzhàn chǐcùn xiànzhì, ránhòu chóngxīn shèzhì (zài dànchū " +#~ "CIRCUITPY).\n" +#~ "Rúguǒ nín méiyǒu gǎibiàn duīzhàn, qǐng zài cǐ chù tíchū yīgè wèntí, bìng " +#~ "zài rù nín de CIRCUITPY qūdòngqì:\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Please make sure your power supply " +#~ "provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Wēi kòngzhì qì de diànliàng bèi chōng chū. Qǐng quèbǎo nín de diànyuán " +#~ "wèi\n" +#~ "zhěnggè diànlù tígōng zúgòu de diànyuán bìng àn xià fùwèi (zài dànchū " +#~ "CIRCUITPY hòu).\n" + +#~ msgid "" +#~ "The reset button was pressed while booting CircuitPython. Press again to " +#~ "exit safe mode.\n" +#~ msgstr "" +#~ "Qǐdòng CircuitPython shí, chóng zhì ànniǔ bèi àn xià. Zàicì àn xià yǐ " +#~ "tuìchū ānquán móshì\n" + #~ msgid "Tile indices must be 0 - 255" #~ msgstr "Píng pū zhǐshù bìxū wèi 0 - 255" +#~ msgid "To exit, please reset the board without " +#~ msgstr "Yào tuìchū, qǐng chóng zhì bǎnkuài ér bùyòng " + #~ msgid "UUID integer value not in range 0 to 0xffff" #~ msgstr "UUID zhěngshù zhí bùzài fànwéi 0 zhì 0xffff" #~ msgid "Voice index too high" #~ msgstr "Yǔyīn suǒyǐn tài gāo" +#~ msgid "" +#~ "You are running in safe mode which means something unanticipated " +#~ "happened.\n" +#~ msgstr "" +#~ "Nǐ zhèngzài ānquán móshì xià yùnxíng, zhè yì wèi zhuó yìwài fāshēng de " +#~ "shìqíng.\n" + #~ msgid "bad GATT role" #~ msgstr "zǒng xiédìng de bùliáng juésè" diff --git a/main.c b/main.c index a6c7c05816..805888dddf 100755 --- a/main.c +++ b/main.c @@ -204,7 +204,7 @@ void cleanup_after_vm(supervisor_allocation* heap) { bool run_code_py(safe_mode_t safe_mode) { bool serial_connected_at_start = serial_connected(); - #ifdef CIRCUITPY_AUTORELOAD_DELAY_MS + #if CIRCUITPY_AUTORELOAD_DELAY_MS > 0 if (serial_connected_at_start) { serial_write("\n"); if (autoreload_is_enabled()) { @@ -264,9 +264,7 @@ bool run_code_py(safe_mode_t safe_mode) { rgb_status_animation_t animation; prep_rgb_status_animation(&result, found_main, safe_mode, &animation); while (true) { - #ifdef MICROPY_VM_HOOK_LOOP - MICROPY_VM_HOOK_LOOP - #endif + RUN_BACKGROUND_TASKS; if (reload_requested) { reload_requested = false; return true; diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 5d47fd0871..83fd879aad 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -157,7 +157,7 @@ endif -LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib -Wl,-T,$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs +LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs LIBS := -lgcc -lc # Use toolchain libm if we're not using our own. @@ -301,12 +301,17 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) $(addprefix shared-module/, $(SRC_SHARED_MODULE)) \ $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) +# There may be duplicates between SRC_COMMON_HAL_EXPANDED and SRC_SHARED_MODULE_EXPANDED, +# because a few modules have files both in common-hal/ and shared-modules/. +# Doing a $(sort ...) removes duplicates as part of sorting. +SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) + + SRC_S = supervisor/$(CHIP_FAMILY)_cpu.s OBJ = $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_ASF:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o)) +OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_SHARED_MODULE_EXPANDED:.c=.o)) ifeq ($(INTERNAL_LIBM),1) OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o)) endif @@ -319,10 +324,10 @@ SRC_QSTR_PREPROCESSOR += peripherals/samd/$(CHIP_FAMILY)/clocks.c all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 -$(BUILD)/firmware.elf: $(OBJ) +$(BUILD)/firmware.elf: $(OBJ) $(GENERATED_LD_FILE) $(STEPECHO) "LINK $@" - $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group - $(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py $(LD_FILE) + $(Q)$(CC) -o $@ $(LDFLAGS) $(OBJ) -Wl,--start-group $(LIBS) -Wl,--end-group + $(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py $(GENERATED_LD_FILE) $(BUILD)/firmware.bin: $(BUILD)/firmware.elf $(STEPECHO) "Create $@" diff --git a/ports/atmel-samd/bindings/samd/Clock.c b/ports/atmel-samd/bindings/samd/Clock.c index be597c4440..b88bb82e22 100644 --- a/ports/atmel-samd/bindings/samd/Clock.c +++ b/ports/atmel-samd/bindings/samd/Clock.c @@ -163,3 +163,263 @@ const mp_obj_type_t samd_clock_type = { .print = samd_clock_print, .locals_dict = (mp_obj_t)&samd_clock_locals_dict, }; + +#ifdef SAMD21 + +#ifdef SAMD21_EXPOSE_ALL_CLOCKS +CLOCK_SOURCE(XOSC); +CLOCK_SOURCE(GCLKIN); +CLOCK_SOURCE(GCLKGEN1); +CLOCK_SOURCE(OSCULP32K); +#endif +CLOCK_SOURCE(OSC32K); +CLOCK_SOURCE(XOSC32K); +#ifdef SAMD21_EXPOSE_ALL_CLOCKS +CLOCK_SOURCE(OSC8M); +CLOCK_SOURCE(DFLL48M); +CLOCK_SOURCE(DPLL96M); + +CLOCK_GCLK_(SYSCTRL, DFLL48); +CLOCK_GCLK_(SYSCTRL, FDPLL); +CLOCK_GCLK_(SYSCTRL, FDPLL32K); +CLOCK_GCLK(WDT); +#endif +CLOCK_GCLK(RTC); +#ifdef SAMD21_EXPOSE_ALL_CLOCKS +CLOCK_GCLK(EIC); +CLOCK_GCLK(USB); +CLOCK_GCLK_(EVSYS, 0); +CLOCK_GCLK_(EVSYS, 1); +CLOCK_GCLK_(EVSYS, 2); +CLOCK_GCLK_(EVSYS, 3); +CLOCK_GCLK_(EVSYS, 4); +CLOCK_GCLK_(EVSYS, 5); +CLOCK_GCLK_(EVSYS, 6); +CLOCK_GCLK_(EVSYS, 7); +CLOCK_GCLK_(EVSYS, 8); +CLOCK_GCLK_(EVSYS, 9); +CLOCK_GCLK_(EVSYS, 10); +CLOCK_GCLK_(EVSYS, 11); +CLOCK(SERCOMx_SLOW, 1, 19); +CLOCK_GCLK_(SERCOM0, CORE); +CLOCK_GCLK_(SERCOM1, CORE); +CLOCK_GCLK_(SERCOM2, CORE); +CLOCK_GCLK_(SERCOM3, CORE); +CLOCK_GCLK_(SERCOM4, CORE); +CLOCK_GCLK_(SERCOM5, CORE); +CLOCK(TCC0_TCC1, 1, 26); +CLOCK(TCC2_TCC3, 1, 27); +CLOCK(TC4_TC5, 1, 28); +CLOCK(TC6_TC7, 1, 29); +CLOCK_GCLK(ADC); +CLOCK_GCLK_(AC, DIG); +CLOCK_GCLK_(AC, ANA); +CLOCK_GCLK(DAC); +CLOCK_GCLK(PTC); +CLOCK_GCLK_(I2S, 0); +CLOCK_GCLK_(I2S, 1); + +CLOCK(SYSTICK, 2, 0); +#endif + +STATIC const mp_rom_map_elem_t samd_clock_global_dict_table[] = { +#ifdef SAMD21_EXPOSE_ALL_CLOCKS + CLOCK_ENTRY(XOSC), + CLOCK_ENTRY(GCLKIN), + CLOCK_ENTRY(GCLKGEN1), + CLOCK_ENTRY(OSCULP32K), +#endif + CLOCK_ENTRY(OSC32K), + CLOCK_ENTRY(XOSC32K), +#ifdef SAMD21_EXPOSE_ALL_CLOCKS + CLOCK_ENTRY(OSC8M), + CLOCK_ENTRY(DFLL48M), + CLOCK_ENTRY(DPLL96M), + CLOCK_ENTRY_(SYSCTRL, DFLL48), + CLOCK_ENTRY_(SYSCTRL, FDPLL), + CLOCK_ENTRY_(SYSCTRL, FDPLL32K), + CLOCK_ENTRY(WDT), +#endif + CLOCK_ENTRY(RTC), +#ifdef SAMD21_EXPOSE_ALL_CLOCKS + CLOCK_ENTRY(EIC), + CLOCK_ENTRY(USB), + CLOCK_ENTRY_(EVSYS, 0), + CLOCK_ENTRY_(EVSYS, 1), + CLOCK_ENTRY_(EVSYS, 2), + CLOCK_ENTRY_(EVSYS, 3), + CLOCK_ENTRY_(EVSYS, 4), + CLOCK_ENTRY_(EVSYS, 5), + CLOCK_ENTRY_(EVSYS, 6), + CLOCK_ENTRY_(EVSYS, 7), + CLOCK_ENTRY_(EVSYS, 8), + CLOCK_ENTRY_(EVSYS, 9), + CLOCK_ENTRY_(EVSYS, 10), + CLOCK_ENTRY_(EVSYS, 11), + CLOCK_ENTRY(SERCOMx_SLOW), + CLOCK_ENTRY_(SERCOM0, CORE), + CLOCK_ENTRY_(SERCOM1, CORE), + CLOCK_ENTRY_(SERCOM2, CORE), + CLOCK_ENTRY_(SERCOM3, CORE), + CLOCK_ENTRY_(SERCOM4, CORE), + CLOCK_ENTRY_(SERCOM5, CORE), + CLOCK_ENTRY(TCC0_TCC1), + CLOCK_ENTRY(TCC2_TCC3), + CLOCK_ENTRY(TC4_TC5), + CLOCK_ENTRY(TC6_TC7), + CLOCK_ENTRY(ADC), + CLOCK_ENTRY_(AC, DIG), + CLOCK_ENTRY_(AC, ANA), + CLOCK_ENTRY(DAC), + CLOCK_ENTRY(PTC), + CLOCK_ENTRY_(I2S, 0), + CLOCK_ENTRY_(I2S, 1), + + CLOCK_ENTRY(SYSTICK), +#endif +}; +MP_DEFINE_CONST_DICT(samd_clock_globals, samd_clock_global_dict_table); + +#endif // SAMD21 + +#ifdef SAMD51 + + + +#include +#include +#include +#include +#include +#include +#include + +CLOCK_SOURCE(XOSC0); +CLOCK_SOURCE(XOSC1); +CLOCK_SOURCE(GCLKIN); +CLOCK_SOURCE(GCLKGEN1); +CLOCK_SOURCE(OSCULP32K); +CLOCK_SOURCE(XOSC32K); +CLOCK_SOURCE(DFLL); +CLOCK_SOURCE(DPLL0); +CLOCK_SOURCE(DPLL1); + +CLOCK_GCLK_(OSCCTRL, DFLL48); +CLOCK_GCLK_(OSCCTRL, FDPLL0); +CLOCK_GCLK_(OSCCTRL, FDPLL1); +CLOCK_GCLK_(OSCCTRL, FDPLL032K); // GCLK_OSCCTRL_FDPLL1_32K, GCLK_SDHC0_SLOW, GCLK_SDHC1_SLOW, GCLK_SERCOM[0..7]_SLOW +CLOCK_GCLK(EIC); +CLOCK_GCLK_(FREQM, MSR); +// 6: GCLK_FREQM_REF +CLOCK_GCLK_(SERCOM0, CORE); +CLOCK_GCLK_(SERCOM1, CORE); +CLOCK(TC0_TC1, 1, 9); +CLOCK_GCLK(USB); +CLOCK_GCLK_(EVSYS, 0); +CLOCK_GCLK_(EVSYS, 1); +CLOCK_GCLK_(EVSYS, 2); +CLOCK_GCLK_(EVSYS, 3); +CLOCK_GCLK_(EVSYS, 4); +CLOCK_GCLK_(EVSYS, 5); +CLOCK_GCLK_(EVSYS, 6); +CLOCK_GCLK_(EVSYS, 7); +CLOCK_GCLK_(EVSYS, 8); +CLOCK_GCLK_(EVSYS, 9); +CLOCK_GCLK_(EVSYS, 10); +CLOCK_GCLK_(EVSYS, 11); +CLOCK_GCLK_(SERCOM2, CORE); +CLOCK_GCLK_(SERCOM3, CORE); +CLOCK(TCC0_TCC1, 1, 25); +CLOCK(TC2_TC3, 1, 26); +CLOCK_GCLK(CAN0); +CLOCK_GCLK(CAN1); +CLOCK(TCC2_TCC3, 1, 29); +CLOCK(TC4_TC5, 1, 30); +// CLOCK_GCLK(PDEC); +// CLOCK_GCLK(AC); +// CLOCK_GCLK(CCL); +CLOCK_GCLK_(SERCOM4, CORE); +CLOCK_GCLK_(SERCOM5, CORE); +CLOCK_GCLK_(SERCOM6, CORE); +CLOCK_GCLK_(SERCOM7, CORE); +CLOCK_GCLK(TCC4); +CLOCK(TC6_TC7, 1, 39); +CLOCK_GCLK(ADC0); +CLOCK_GCLK(ADC1); +CLOCK_GCLK(DAC); +CLOCK_GCLK_(I2S, 0); +CLOCK_GCLK_(I2S, 1); +// CLOCK_GCLK(SDHC0); +// CLOCK_GCLK(SDHC1); +// 47: GCLK_CM4_TRACE + +CLOCK(SYSTICK, 2, 0); +CLOCK(CPU, 2, 1); +CLOCK(RTC, 2, 2); + + +STATIC const mp_rom_map_elem_t samd_clock_global_dict_table[] = { + CLOCK_ENTRY(XOSC0), + CLOCK_ENTRY(XOSC1), + CLOCK_ENTRY(GCLKIN), + CLOCK_ENTRY(GCLKGEN1), + CLOCK_ENTRY(OSCULP32K), + CLOCK_ENTRY(XOSC32K), + CLOCK_ENTRY(DFLL), + CLOCK_ENTRY(DPLL0), + CLOCK_ENTRY(DPLL1), + + CLOCK_ENTRY_(OSCCTRL, DFLL48), + CLOCK_ENTRY_(OSCCTRL, FDPLL0), + CLOCK_ENTRY_(OSCCTRL, FDPLL1), + CLOCK_ENTRY_(OSCCTRL, FDPLL032K), + CLOCK_ENTRY(EIC), + CLOCK_ENTRY_(FREQM, MSR), + CLOCK_ENTRY_(SERCOM0, CORE), + CLOCK_ENTRY_(SERCOM1, CORE), + CLOCK_ENTRY(TC0_TC1), + CLOCK_ENTRY(USB), + CLOCK_ENTRY_(EVSYS, 0), + CLOCK_ENTRY_(EVSYS, 1), + CLOCK_ENTRY_(EVSYS, 2), + CLOCK_ENTRY_(EVSYS, 3), + CLOCK_ENTRY_(EVSYS, 4), + CLOCK_ENTRY_(EVSYS, 5), + CLOCK_ENTRY_(EVSYS, 6), + CLOCK_ENTRY_(EVSYS, 7), + CLOCK_ENTRY_(EVSYS, 8), + CLOCK_ENTRY_(EVSYS, 9), + CLOCK_ENTRY_(EVSYS, 10), + CLOCK_ENTRY_(EVSYS, 11), + CLOCK_ENTRY_(SERCOM2, CORE), + CLOCK_ENTRY_(SERCOM3, CORE), + CLOCK_ENTRY(TCC0_TCC1), + CLOCK_ENTRY(TC2_TC3), + CLOCK_ENTRY(CAN0), + CLOCK_ENTRY(CAN1), + CLOCK_ENTRY(TCC2_TCC3), + CLOCK_ENTRY(TC4_TC5), + // CLOCK_ENTRY(PDEC), + // CLOCK_ENTRY(AC), + // CLOCK_ENTRY(CCL), + CLOCK_ENTRY_(SERCOM4, CORE), + CLOCK_ENTRY_(SERCOM5, CORE), + CLOCK_ENTRY_(SERCOM6, CORE), + CLOCK_ENTRY_(SERCOM7, CORE), + CLOCK_ENTRY(TCC4), + CLOCK_ENTRY(TC6_TC7), + CLOCK_ENTRY(ADC0), + CLOCK_ENTRY(ADC1), + CLOCK_ENTRY(DAC), + CLOCK_ENTRY_(I2S, 0), + CLOCK_ENTRY_(I2S, 1), + // CLOCK_ENTRY(SDHC0), + // CLOCK_ENTRY(SDHC1), + + CLOCK_ENTRY(SYSTICK), + CLOCK_ENTRY(CPU), + CLOCK_ENTRY(RTC), +}; +MP_DEFINE_CONST_DICT(samd_clock_globals, samd_clock_global_dict_table); + +#endif // SAMD51 diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h index a508d91913..226717c83b 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h @@ -7,10 +7,6 @@ #define MICROPY_HW_LED_STATUS (&pin_PB23) -#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) diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk index a543468e52..bd682ade07 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x2341 USB_PID = 0x8053 USB_PRODUCT = "Arduino MKR1300" diff --git a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h index 02750e6469..4871b1798b 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h @@ -5,10 +5,6 @@ #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) diff --git a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk index 5612eb88d7..894b9b0110 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8050 USB_PRODUCT = "Arduino MKRZero" diff --git a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h index ec201e6ef5..bf2a68c57a 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h @@ -10,10 +10,6 @@ #define MICROPY_PORT_B (PORT_PB03) #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk index cbbf15a3ef..f94ec13b7c 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x2341 USB_PID = 0x824D USB_PRODUCT = "Arduino Zero" diff --git a/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.h b/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.h index 561240c69a..cbfb11d200 100644 --- a/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.h @@ -5,6 +5,7 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) +// No microcontroller.nvm #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define DEFAULT_I2C_BUS_SCL (&pin_PA08) @@ -17,8 +18,6 @@ #define DEFAULT_UART_BUS_RX (&pin_PA01) #define DEFAULT_UART_BUS_TX (&pin_PA00) -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) - #define IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA12 1 #define IGNORE_PIN_PA13 1 diff --git a/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk b/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk index 08e42aa4ef..c3f0750a9e 100644 --- a/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x1209 USB_PID = 0xBAB3 USB_PRODUCT = "Bast Pro Mini M0" diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.h b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.h index f4e40739b0..d359687e13 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.h +++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.h @@ -3,7 +3,6 @@ #define CIRCUITPY_MCU_FAMILY samd51 - #define MICROPY_HW_LED_STATUS (&pin_PA22) // These are pins not to reset. @@ -14,14 +13,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk index f390a8681a..0ff6f58eab 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk +++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x04D8 USB_PID = 0xEDB3 USB_PRODUCT = "Programmable USB Hub" diff --git a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h index 7a32bf023f..b92c2a65e3 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h +++ b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h @@ -7,14 +7,10 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 256 - #define DEFAULT_SPI_BUS_SCK (&pin_PA19) #define DEFAULT_SPI_BUS_MOSI (&pin_PA18) #define DEFAULT_SPI_BUS_MISO (&pin_PA22) -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define IGNORE_PIN_PA00 1 #define IGNORE_PIN_PA01 1 #define IGNORE_PIN_PA02 1 diff --git a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk index 2399aad5c5..adae4beb27 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk +++ b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x1209 USB_PID = 0xBAB2 USB_PRODUCT = "CatWAN USBStick" diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h index e6a7e06769..6eb49b02c5 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -22,17 +22,14 @@ #define SPEAKER_ENABLE_PIN (&pin_PA30) -// 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define CALIBRATE_CRYSTALLESS 1 // 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 DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SDA (&pin_PB02) diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index 3c43776f5b..cdbdf44f80 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x8019 USB_PRODUCT = "CircuitPlayground Express" diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index ca6f9b7734..e64997c0e4 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -22,17 +22,14 @@ #define SPEAKER_ENABLE_PIN (&pin_PA30) -// 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define CALIBRATE_CRYSTALLESS 1 // 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 DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SDA (&pin_PB02) diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index f456515f9a..04b4b7792e 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x8019 USB_PRODUCT = "CircuitPlayground Express with Crickit libraries" @@ -14,9 +13,10 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. LONGINT_IMPL = NONE CIRCUITPY_DISPLAYIO = 0 -CIRCUITPY_PIXELBUF = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CSLAVE = 0 +CIRCUITPY_PIXELBUF = 0 SUPEROPT_GC = 0 CFLAGS_INLINE_LIMIT = 55 diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h index 333fc79f9b..c9a7ce0405 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h @@ -22,17 +22,14 @@ #define SPEAKER_ENABLE_PIN (&pin_PA30) -// 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define CALIBRATE_CRYSTALLESS 1 // 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) // divisible by 8 + #define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SDA (&pin_PB02) @@ -46,3 +43,5 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +#define MICROPY_PY_URE 0 diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index f0c9c6b8c4..b5a7c2424d 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x8019 USB_PRODUCT = "CircuitPlayground Express with displayio" diff --git a/ports/atmel-samd/boards/samd21x18-bootloader-crystalless.ld b/ports/atmel-samd/boards/common.template.ld similarity index 68% rename from ports/atmel-samd/boards/samd21x18-bootloader-crystalless.ld rename to ports/atmel-samd/boards/common.template.ld index 2adf4fa909..1054605c8c 100644 --- a/ports/atmel-samd/boards/samd21x18-bootloader-crystalless.ld +++ b/ports/atmel-samd/boards/common.template.ld @@ -1,13 +1,16 @@ -/* - GNU linker script for SAMD21x18 (256K flash, 32K RAM) -*/ +/* Template for SAMD21/SAMD51 linking. dollar-sign-curly-bracket items are replaced with strings. */ /* Specify the memory areas */ MEMORY { - /* Leave 8KiB for the bootloader, 256b for persistent config (clock), 64k for the flash file system and 256b for the user config. */ - FLASH (rx) : ORIGIN = 0x00000000 + 8K, LENGTH = 256K - 8K - 256 - 64K - 256 - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K + FLASH_BOOTLOADER (rx): ORIGIN = ${BOOTLOADER_START_ADDR}, LENGTH = ${BOOTLOADER_SIZE} + + FLASH_FIRMWARE (rx) : ORIGIN = ${CIRCUITPY_FIRMWARE_START_ADDR}, LENGTH = ${CIRCUITPY_FIRMWARE_SIZE} + FLASH_FILESYSTEM (r) : ORIGIN = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE} + FLASH_CONFIG (r) : ORIGIN = ${CIRCUITPY_INTERNAL_CONFIG_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_CONFIG_SIZE} + FLASH_NVM (r) : ORIGIN = ${CIRCUITPY_INTERNAL_NVM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_NVM_SIZE} + + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = ${RAM_SIZE} } /* top end of the stack */ @@ -30,7 +33,7 @@ SECTIONS *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ . = ALIGN(4); - } >FLASH + } >FLASH_FIRMWARE .ARM.exidx : { @@ -38,12 +41,12 @@ SECTIONS *(.gnu.linkonce.armexidx.*) _etext = .; /* define a global symbol at end of code */ _sidata = .; /* start of .data section */ - } > FLASH + } >FLASH_FIRMWARE /* This is the initialized data section The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ + but the loader puts the initial values in the FLASH_FIRMWARE (inidata). + It is one task of the startup to copy the initial values from FLASH_FIRMWARE to RAM. */ .data : AT ( _sidata ) { . = ALIGN(4); @@ -72,11 +75,11 @@ SECTIONS _ebss = .; } >RAM - /* this just checks there is enough RAM for a minimal stack */ + /* this just checks there is enough RAM for the requested stack. */ .stack : { . = ALIGN(4); - . = . + 2K; /* Reserve a minimum of 2K for the stack. */ + . = . + ${CIRCUITPY_DEFAULT_STACK_SIZE}; . = ALIGN(4); } >RAM diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h index 9e329b3ed9..8664a6a0ec 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h @@ -12,14 +12,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PB09) #define DEFAULT_I2C_BUS_SDA (&pin_PB08) diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index 5cd3fe70ec..6eb76c182f 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x20-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8021 USB_PRODUCT = "CP32-M4" diff --git a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.h b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.h index 99167d31bc..f560cfa493 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.h @@ -20,14 +20,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PB03) diff --git a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk index 398c54a119..b1dad30eb0 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x4097 USB_PID = 0x0001 USB_PRODUCT = "Datalore IP M4" diff --git a/ports/atmel-samd/boards/datum_distance/mpconfigboard.h b/ports/atmel-samd/boards/datum_distance/mpconfigboard.h index e02e437805..74706ba040 100644 --- a/ports/atmel-samd/boards/datum_distance/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_distance/mpconfigboard.h @@ -10,10 +10,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/datum_distance/mpconfigboard.mk b/ports/atmel-samd/boards/datum_distance/mpconfigboard.mk index a7bb8293d4..4f6c7ab82e 100644 --- a/ports/atmel-samd/boards/datum_distance/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datum_distance/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x04D8 USB_PID = 0xEE8C USB_PRODUCT = "datum-Distance" diff --git a/ports/atmel-samd/boards/datum_imu/mpconfigboard.h b/ports/atmel-samd/boards/datum_imu/mpconfigboard.h index b87739dd0e..3cc218f9e0 100644 --- a/ports/atmel-samd/boards/datum_imu/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_imu/mpconfigboard.h @@ -10,10 +10,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/datum_imu/mpconfigboard.mk b/ports/atmel-samd/boards/datum_imu/mpconfigboard.mk index 507c83b041..336a1b832f 100644 --- a/ports/atmel-samd/boards/datum_imu/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datum_imu/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x04D8 USB_PID = 0xEE8D USB_PRODUCT = "datum-IMU" diff --git a/ports/atmel-samd/boards/datum_light/mpconfigboard.h b/ports/atmel-samd/boards/datum_light/mpconfigboard.h index 2a91c112dd..33e80d06d0 100644 --- a/ports/atmel-samd/boards/datum_light/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_light/mpconfigboard.h @@ -10,10 +10,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/datum_light/mpconfigboard.mk b/ports/atmel-samd/boards/datum_light/mpconfigboard.mk index 4bb227ba4e..7ec2efcf96 100644 --- a/ports/atmel-samd/boards/datum_light/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datum_light/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x04D8 USB_PID = 0xEE8E USB_PRODUCT = "datum-Light" diff --git a/ports/atmel-samd/boards/datum_weather/mpconfigboard.h b/ports/atmel-samd/boards/datum_weather/mpconfigboard.h index 45619197b9..328a6860c4 100644 --- a/ports/atmel-samd/boards/datum_weather/mpconfigboard.h +++ b/ports/atmel-samd/boards/datum_weather/mpconfigboard.h @@ -10,10 +10,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/datum_weather/mpconfigboard.mk b/ports/atmel-samd/boards/datum_weather/mpconfigboard.mk index 411aee6254..d3ec1b0fdd 100644 --- a/ports/atmel-samd/boards/datum_weather/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datum_weather/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x04D8 USB_PID = 0xEE8F USB_PRODUCT = "datum-Weather" diff --git a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h index f27cb533b2..3a984188fa 100644 --- a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h +++ b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h @@ -8,12 +8,6 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. diff --git a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk index a2c182e683..dedd49ff71 100644 --- a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk +++ b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x1209 USB_PID = 0xBAB6 USB_PRODUCT = "Escornabot Makech" diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h index eb1b905851..a0fde67ef6 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h @@ -8,10 +8,6 @@ #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_PA22) #define DEFAULT_I2C_BUS_SDA (&pin_PA23) diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk index a88dbd563e..134abf7236 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8015 USB_PRODUCT = "Feather M0 Adalogger" diff --git a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h index a16cee0b4c..41a4bde212 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h @@ -8,10 +8,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk index 076f1f8ff0..3643743509 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8015 USB_PRODUCT = "Feather M0" diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h index e6cd1c729b..5421dc8890 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h @@ -15,13 +15,6 @@ #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PA23) diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index 5b89f1be4f..cdee7b7946 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8023 USB_PRODUCT = "Feather M0 Express" diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h index 77146889e5..ee61e1d87d 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h @@ -15,12 +15,6 @@ #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PA23) diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk index 5793d82e55..d5e03b49d4 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8023 USB_PRODUCT = "Feather M0 Express" diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h index 19a5147587..2a319a4129 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h @@ -8,10 +8,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk index 83d794d047..40a461b279 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8015 USB_PRODUCT = "Feather M0 RFM69" diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h index d3db098e54..850033dbe4 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h @@ -8,10 +8,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk index a84e14f55f..736161047a 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8015 USB_PRODUCT = "Feather M0 RFM9x" diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h index 5ad265bf14..2d9f88e2e1 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h @@ -17,12 +17,6 @@ #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk index c5fef4373c..cb13adb76d 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8023 USB_PRODUCT = "Feather M0 Supersized" diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h index f65ea8db78..ba16d17ee4 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h @@ -16,14 +16,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define EXTERNAL_FLASH_QSPI_DUAL #define BOARD_HAS_CRYSTAL 1 diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk index 4faa073876..38dd477581 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8026 USB_PRODUCT = "Feather M4 Express" diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h index 7df31f3a93..2afe358178 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h @@ -14,12 +14,6 @@ #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PA13) diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk index c4a3a5a19e..05c305b1a2 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8023 USB_PRODUCT = "Feather RadioFruit Zigbee" diff --git a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h index 5f09ab4d2f..b6d8f946bc 100644 --- a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h @@ -10,16 +10,12 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 256 - #define DEFAULT_I2C_BUS_SCL (&pin_PA05) #define DEFAULT_I2C_BUS_SDA (&pin_PA04) #define DEFAULT_UART_BUS_RX (&pin_PA05) #define DEFAULT_UART_BUS_TX (&pin_PA04) -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA06 1 #define IGNORE_PIN_PA07 1 diff --git a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk index 6f44a22f84..d649386328 100644 --- a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x801D USB_PRODUCT = "Gemma M0" diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h index bc8f5a134a..bab0550148 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h @@ -21,14 +21,6 @@ #define MICROPY_PORT_C ( PORT_PC24 | PORT_PC30 | PORT_PC31 ) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PB21) diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk index 33542183b6..ab81ec5a29 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x20-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8032 USB_PRODUCT = "Grand Central M4 Express" diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h index d5c2745009..e5ac346daf 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h @@ -16,12 +16,6 @@ #define MICROPY_PORT_B ( PORT_PB22 | PORT_PB23 ) #define MICROPY_PORT_C ( 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA17) #define DEFAULT_I2C_BUS_SDA (&pin_PA16) diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 988d10d1cd..af4a5a2932 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0xD1ED USB_PRODUCT = "HalloWing M0 Express" diff --git a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.h index 654632db5d..a0c726e726 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.h @@ -16,14 +16,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA13) #define DEFAULT_I2C_BUS_SDA (&pin_PA12) diff --git a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk index 375be283a5..4bf1552884 100644 --- a/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m4_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x804A USB_PRODUCT = "Hallowing M4 Express" diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h index 6f9f661d94..db5e2a4df2 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h @@ -16,12 +16,6 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk index 2b64e90275..4d516c75b6 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x8012 USB_PRODUCT = "ItsyBitsy M0 Express" @@ -21,4 +20,3 @@ CIRCUITPY_RTC = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 - diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h index 9e4d4a10c9..98920b54f2 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h @@ -17,14 +17,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA13) #define DEFAULT_I2C_BUS_SDA (&pin_PA12) diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk index dca4e3706f..eb02d3c270 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x802C USB_PRODUCT = "ItsyBitsy M4 Express" diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h index 194542b055..4d911ad64c 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h @@ -10,12 +10,8 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define CALIBRATE_CRYSTALLESS 1 - #define CIRCUITPY_INTERNAL_NVM_SIZE 0 -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - 0x010000) - #define DEFAULT_I2C_BUS_SCL (&pin_PA17) #define DEFAULT_I2C_BUS_SDA (&pin_PA16) diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index b9b88a368b..df1a2d8eb3 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader.ld USB_VID = 0x04D8 USB_PID = 0xED94 USB_PRODUCT = "kicksat-sprite" @@ -7,7 +6,6 @@ USB_MANUFACTURER = "maholli" CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 -QSPI_FLASH_FILESYSTEM = 0 INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h index 1304b6dfbf..80d3678630 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h @@ -8,12 +8,6 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk b/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk index 894e19a6bb..4b452ecbfe 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x1209 USB_PID = 0xBAB1 USB_PRODUCT = "Meow Meow" diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h index bfa254b95e..04565feb40 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h @@ -21,12 +21,6 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PA23) diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index d3f35ba8b0..b52b1343fb 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8014 USB_PRODUCT = "Metro M0 Express" diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.h b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.h index e89b0322a1..9fa4018046 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.h +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.h @@ -18,14 +18,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PB03) diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk index bd837ebd6e..4895cda77b 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8038 USB_PRODUCT = "Metro M4 Airlift Lite" diff --git a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h index 2a8878874d..7f8dbb1d2b 100644 --- a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h @@ -20,14 +20,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PB03) diff --git a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk index e4d8b9428e..62e6b7c72f 100644 --- a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8021 USB_PRODUCT = "Metro M4 Express" diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.h b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.h index c4563964f8..08ab7e16b9 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.h @@ -17,14 +17,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA13) #define DEFAULT_I2C_BUS_SDA (&pin_PA12) diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index eff8bfe08a..ae2a1e9733 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x1209 USB_PID = 0x2017 USB_PRODUCT = "Mini SAM M4" diff --git a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h index fc77520f5f..42fb4548e0 100644 --- a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h +++ b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h @@ -13,14 +13,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA01) #define DEFAULT_I2C_BUS_SDA (&pin_PA00) diff --git a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk index 84d1285c5b..9b242a3ffc 100644 --- a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk +++ b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8048 USB_PRODUCT = "Monster M4SK" diff --git a/ports/atmel-samd/boards/pewpew10/mpconfigboard.h b/ports/atmel-samd/boards/pewpew10/mpconfigboard.h index 445ccc4355..6b3b4aa15c 100644 --- a/ports/atmel-samd/boards/pewpew10/mpconfigboard.h +++ b/ports/atmel-samd/boards/pewpew10/mpconfigboard.h @@ -5,11 +5,6 @@ #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 IGNORE_PIN_PB00 1 #define IGNORE_PIN_PB01 1 #define IGNORE_PIN_PB02 1 diff --git a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk index 8a1d6b16a4..b3271d062f 100644 --- a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x801D USB_PRODUCT = "PewPew 10.2" diff --git a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.h b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.h index 1b3035e120..60cd8d754f 100644 --- a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.h @@ -9,14 +9,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA01) #define DEFAULT_I2C_BUS_SDA (&pin_PA00) @@ -48,4 +40,3 @@ #define IGNORE_PIN_PB09 1 #define IGNORE_PIN_PB10 1 #define IGNORE_PIN_PB11 1 - diff --git a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk index bc2ae609ed..990b26ff3e 100644 --- a/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader.ld USB_VID = 0x1d50 USB_PID = 0x60e8 USB_PRODUCT = "PewPew M4" diff --git a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h index 5a8eb9d147..866e21991b 100644 --- a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h @@ -8,10 +8,6 @@ #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 IGNORE_PIN_PA02 1 #define IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA04 1 diff --git a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk index 8b82f0a09c..e6c227b135 100644 --- a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x8028 USB_PRODUCT = "pIRKey M0" diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.h b/ports/atmel-samd/boards/pybadge/mpconfigboard.h index 36115bc873..435185322a 100644 --- a/ports/atmel-samd/boards/pybadge/mpconfigboard.h +++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.h @@ -14,14 +14,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA13) #define DEFAULT_I2C_BUS_SDA (&pin_PA12) diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk index b5a240c66b..7a213faf4c 100644 --- a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8034 USB_PRODUCT = "PyBadge" diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h index ade74786d3..229cfa3354 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h @@ -14,14 +14,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA13) #define DEFAULT_I2C_BUS_SDA (&pin_PA12) diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk index e78789d741..5ae09294d6 100644 --- a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8043 USB_PRODUCT = "PyBadge AirLift" diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.h b/ports/atmel-samd/boards/pygamer/mpconfigboard.h index 4720b22eb1..102c259567 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.h +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.h @@ -13,14 +13,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA13) #define DEFAULT_I2C_BUS_SDA (&pin_PA12) diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index a455690e19..2db6786bfd 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x803E USB_PRODUCT = "PyGamer" diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h index c05aa4f062..fbe946b72f 100644 --- a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.h @@ -13,14 +13,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA13) #define DEFAULT_I2C_BUS_SDA (&pin_PA12) diff --git a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk index b6bb266308..d001374a50 100644 --- a/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer_advance/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x803E USB_PRODUCT = "PyGamer Advance" diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.h b/ports/atmel-samd/boards/pyportal/mpconfigboard.h index 43346488ba..2c4cf4f580 100644 --- a/ports/atmel-samd/boards/pyportal/mpconfigboard.h +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.h @@ -17,14 +17,6 @@ #define MICROPY_PORT_C ( 0 ) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SDA (&pin_PB02) diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk index f763c74fa4..149141a4e3 100644 --- a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x20-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8036 USB_PRODUCT = "PyPortal" diff --git a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h index f2af07371c..4d58b81839 100644 --- a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h +++ b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h @@ -15,14 +15,6 @@ #define MICROPY_PORT_C ( 0 ) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SDA (&pin_PB02) diff --git a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk index 58b363779c..dbc2d5ae99 100644 --- a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x20-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8054 USB_PRODUCT = "PyPortal Titano" diff --git a/ports/atmel-samd/boards/pyruler/mpconfigboard.h b/ports/atmel-samd/boards/pyruler/mpconfigboard.h index 171873b47c..4d0586d912 100644 --- a/ports/atmel-samd/boards/pyruler/mpconfigboard.h +++ b/ports/atmel-samd/boards/pyruler/mpconfigboard.h @@ -10,10 +10,6 @@ #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 IGNORE_PIN_PA12 1 #define IGNORE_PIN_PA13 1 #define IGNORE_PIN_PA16 1 diff --git a/ports/atmel-samd/boards/pyruler/mpconfigboard.mk b/ports/atmel-samd/boards/pyruler/mpconfigboard.mk index 63d4cfed7e..ca7ed4bdc3 100644 --- a/ports/atmel-samd/boards/pyruler/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyruler/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x804C USB_PRODUCT = "PyRuler" diff --git a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.h b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.h index 64040a6586..c66873aeb2 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.h @@ -21,14 +21,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk index f18a3dbf46..fd4f222306 100644 --- a/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/robohatmm1_m4/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x1209 USB_PID = 0x4D43 USB_PRODUCT = "Robo HAT MM1 M4" diff --git a/ports/atmel-samd/boards/sam32/mpconfigboard.h b/ports/atmel-samd/boards/sam32/mpconfigboard.h index f6d3fb6b46..bd9f5e3983 100644 --- a/ports/atmel-samd/boards/sam32/mpconfigboard.h +++ b/ports/atmel-samd/boards/sam32/mpconfigboard.h @@ -9,14 +9,11 @@ #define MICROPY_PORT_A (PORT_PA24 | PORT_PA25) #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define MICROPY_PORT_D (0) - -#define AUTORESET_DELAY_MS 500 +#define MICROPY_PORT_D (0) +// No microcontroller.nvm #define CIRCUITPY_INTERNAL_NVM_SIZE 0 -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - 0x010000) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_PA04) diff --git a/ports/atmel-samd/boards/sam32/mpconfigboard.mk b/ports/atmel-samd/boards/sam32/mpconfigboard.mk index 12884a9cc8..0d6be64374 100644 --- a/ports/atmel-samd/boards/sam32/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sam32/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x20-bootloader.ld USB_VID = 0x04D8 USB_PID = 0xEDBE USB_PRODUCT = "SAM32" diff --git a/ports/atmel-samd/boards/samd21x18-bootloader-external-flash-crystalless.ld b/ports/atmel-samd/boards/samd21x18-bootloader-external-flash-crystalless.ld deleted file mode 100644 index bddaae99da..0000000000 --- a/ports/atmel-samd/boards/samd21x18-bootloader-external-flash-crystalless.ld +++ /dev/null @@ -1,84 +0,0 @@ -/* - GNU linker script for SAMD21x18 (256K flash, 32K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 8KiB for the bootloader, 256b for internal config and 256b for user config. */ - FLASH (rx) : ORIGIN = 0x00000000 + 8K, LENGTH = 256K - 8K - 256 - 256 - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 2K; /* Reserve a minimum of 2K for the stack. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd21x18-bootloader-external-flash.ld b/ports/atmel-samd/boards/samd21x18-bootloader-external-flash.ld deleted file mode 100644 index 4e677a079f..0000000000 --- a/ports/atmel-samd/boards/samd21x18-bootloader-external-flash.ld +++ /dev/null @@ -1,84 +0,0 @@ -/* - GNU linker script for SAMD21x18 (256K flash, 32K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 8KiB for the bootloader and 256b for user config. */ - FLASH (rx) : ORIGIN = 0x00000000 + 8K, LENGTH = 256K - 8K - 256 - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K /* 32 KiB RAM */ -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _etext ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 2K; /* Reserve a minimum of 2K for the stack. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd21x18-bootloader.ld b/ports/atmel-samd/boards/samd21x18-bootloader.ld deleted file mode 100644 index 2ef09ba9af..0000000000 --- a/ports/atmel-samd/boards/samd21x18-bootloader.ld +++ /dev/null @@ -1,85 +0,0 @@ -/* - GNU linker script for SAMD21x18 (256K flash, 32K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 8KiB for the bootloader, 64k for the flash file system, and 256b - for user config. */ - FLASH (rx) : ORIGIN = 0x00000000 + 8K, LENGTH = 256K - 8K - 64K - 256 - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialize the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialize the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 2K; /* Reserve a minimum of 2K for the stack. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd21x18-external-flash.ld b/ports/atmel-samd/boards/samd21x18-external-flash.ld deleted file mode 100644 index a540bfde2a..0000000000 --- a/ports/atmel-samd/boards/samd21x18-external-flash.ld +++ /dev/null @@ -1,83 +0,0 @@ -/* - GNU linker script for SAMD21x18 (256K flash, 32K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* 256 KiB but leave 256b for internal config and 256b for user config (protected eeprom) */ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K - 256 - 256 - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K -} - -/* top end of the stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); -_bootloader_dbl_tap = 0; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 2K; /* Reserve a minimum of 2K for the stack. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd21x18.ld b/ports/atmel-samd/boards/samd21x18.ld deleted file mode 100644 index 139be86bb2..0000000000 --- a/ports/atmel-samd/boards/samd21x18.ld +++ /dev/null @@ -1,83 +0,0 @@ -/* - GNU linker script for SAMD21x18 (256K flash, 32K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 256b for internal config, 64k for the flash file system and 256b for user config. */ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K - 256 - 64K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K -} - -/* top end of the stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); -_bootloader_dbl_tap = 0; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - -/* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 2K; /* Reserve a minimum of 2K for the stack. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd51x18-bootloader-external-flash.ld b/ports/atmel-samd/boards/samd51x18-bootloader-external-flash.ld deleted file mode 100644 index c0e812ce19..0000000000 --- a/ports/atmel-samd/boards/samd51x18-bootloader-external-flash.ld +++ /dev/null @@ -1,84 +0,0 @@ -/* - GNU linker script for SAMD51x18 (256K flash, 128K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 16KiB for the bootloader. 8K for user data*/ - FLASH (rx) : ORIGIN = 0x00000000 + 16K, LENGTH = 256K - 16K - 8K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 10K; /* Reserve a minimum of 10K for the stack. nvm will temporarily store 8k on the stack when writing. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd51x19-bootloader-external-flash.ld b/ports/atmel-samd/boards/samd51x19-bootloader-external-flash.ld deleted file mode 100644 index 253a764c9b..0000000000 --- a/ports/atmel-samd/boards/samd51x19-bootloader-external-flash.ld +++ /dev/null @@ -1,84 +0,0 @@ -/* - GNU linker script for SAMD51x19 (512K flash, 192K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 16KiB for the bootloader. 8K for user data*/ - FLASH (rx) : ORIGIN = 0x00000000 + 16K, LENGTH = 512K - 16K - 8K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 10K; /* Reserve a minimum of 10K for the stack. nvm will temporarily store 8k on the stack when writing. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd51x19-bootloader.ld b/ports/atmel-samd/boards/samd51x19-bootloader.ld deleted file mode 100644 index 56786a37af..0000000000 --- a/ports/atmel-samd/boards/samd51x19-bootloader.ld +++ /dev/null @@ -1,84 +0,0 @@ -/* - GNU linker script for SAMD51x19 (512K flash, 192K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 16KiB for the bootloader, 256KiB for the internal file system, and 8KiB for user binary data. */ - FLASH (rx) : ORIGIN = 0x00000000 + 16K, LENGTH = 512K - 16K - 256K - 8K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 10K; /* Reserve a minimum of 10K for the stack. nvm will temporarily store 8k on the stack when writing. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd51x20-bootloader-external-flash.ld b/ports/atmel-samd/boards/samd51x20-bootloader-external-flash.ld deleted file mode 100644 index 598915b1b7..0000000000 --- a/ports/atmel-samd/boards/samd51x20-bootloader-external-flash.ld +++ /dev/null @@ -1,84 +0,0 @@ -/* - GNU linker script for SAMD51x20 (1MB flash, 256K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 16KiB for the bootloader. */ - FLASH (rx) : ORIGIN = 0x00000000 + 16K, LENGTH = 1M - 16K - 8K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 10K; /* Reserve a minimum of 10K for the stack. nvm will temporarily store 8k on the stack when writing. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd51x20-bootloader.ld b/ports/atmel-samd/boards/samd51x20-bootloader.ld deleted file mode 100644 index 49d4d87914..0000000000 --- a/ports/atmel-samd/boards/samd51x20-bootloader.ld +++ /dev/null @@ -1,84 +0,0 @@ -/* - GNU linker script for SAMD51x20 (1MB flash, 256K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* Leave 16KiB for the bootloader, 512k for the filesystem and 8k for user config data. */ - FLASH (rx) : ORIGIN = 0x00000000 + 16K, LENGTH = 1M - 16K - 512K - 8K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K -} - -/* top end of the stack */ -/* stack must be double-word (8 byte) aligned */ -_estack = ORIGIN(RAM) + LENGTH(RAM) - 8; -_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 10K; /* Reserve a minimum of 10K for the stack. nvm will temporarily store 8k on the stack when writing. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd51x20-external-flash.ld b/ports/atmel-samd/boards/samd51x20-external-flash.ld deleted file mode 100644 index d3ed90476e..0000000000 --- a/ports/atmel-samd/boards/samd51x20-external-flash.ld +++ /dev/null @@ -1,82 +0,0 @@ -/* - GNU linker script for SAMD51x20 (1MB flash, 256K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 1M - 8K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K -} - -/* top end of the stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); -_bootloader_dbl_tap = 0; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 10K; /* Reserve a minimum of 10K for the stack. nvm will temporarily store 8k on the stack when writing. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/samd51x20.ld b/ports/atmel-samd/boards/samd51x20.ld deleted file mode 100644 index e203c5b7a9..0000000000 --- a/ports/atmel-samd/boards/samd51x20.ld +++ /dev/null @@ -1,83 +0,0 @@ -/* - GNU linker script for SAMD51x20 (1MB flash, 256K RAM) -*/ - -/* Specify the memory areas */ -MEMORY -{ - /* 1024 KiB minus 512KiB for the internal file system and 8KiB for the user nvm. */ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 1M - 512K - 8K - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K -} - -/* top end of the stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); -_bootloader_dbl_tap = 0; - -/* define output sections */ -SECTIONS -{ - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - _sfixed = .; - KEEP(*(.vectors)) /* isr vector table */ - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - - . = ALIGN(4); - } >FLASH - - .ARM.exidx : - { - *(.ARM.exidx*) - *(.gnu.linkonce.armexidx.*) - _etext = .; /* define a global symbol at end of code */ - _sidata = .; /* start of .data section */ - } > FLASH - - /* This is the initialized data section - The program executes knowing that the data is in the RAM - but the loader puts the initial values in the FLASH (inidata). - It is one task of the startup to copy the initial values from FLASH to RAM. */ - .data : AT ( _sidata ) - { - . = ALIGN(4); - _srelocate = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ - *(.ramfunc) - *(.ramfunc*) - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _erelocate = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - - /* Uninitialized data section */ - .bss : - { - . = ALIGN(4); - _sbss = .; - _szero = .; /* define a global symbol at bss start; used by startup code */ - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ezero = .; /* define a global symbol at bss end; used by startup code */ - _ebss = .; - } >RAM - - /* this just checks there is enough RAM for a minimal stack */ - .stack : - { - . = ALIGN(4); - . = . + 10K; /* Reserve a minimum of 10K for the stack. nvm will temporarily store 8k on the stack when writing. */ - . = ALIGN(4); - } >RAM - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/ports/atmel-samd/boards/serpente/mpconfigboard.h b/ports/atmel-samd/boards/serpente/mpconfigboard.h index 034e1f6c37..515bc14410 100644 --- a/ports/atmel-samd/boards/serpente/mpconfigboard.h +++ b/ports/atmel-samd/boards/serpente/mpconfigboard.h @@ -13,12 +13,6 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) @@ -36,4 +30,3 @@ // Not connected #define IGNORE_PIN_PA13 1 #define IGNORE_PIN_PA28 1 - diff --git a/ports/atmel-samd/boards/serpente/mpconfigboard.mk b/ports/atmel-samd/boards/serpente/mpconfigboard.mk index 98e1e37297..a5adb17a1e 100644 --- a/ports/atmel-samd/boards/serpente/mpconfigboard.mk +++ b/ports/atmel-samd/boards/serpente/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x8058 USB_PRODUCT = "Serpente" diff --git a/ports/atmel-samd/boards/shirtty/mpconfigboard.h b/ports/atmel-samd/boards/shirtty/mpconfigboard.h index d5ad8e4bd1..796d23f869 100644 --- a/ports/atmel-samd/boards/shirtty/mpconfigboard.h +++ b/ports/atmel-samd/boards/shirtty/mpconfigboard.h @@ -7,10 +7,6 @@ #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 IGNORE_PIN_PA00 1 // #define IGNORE_PIN_PA01 1 // #define IGNORE_PIN_PA02 1 diff --git a/ports/atmel-samd/boards/shirtty/mpconfigboard.mk b/ports/atmel-samd/boards/shirtty/mpconfigboard.mk index 9f3710e5ae..bc37b59433 100644 --- a/ports/atmel-samd/boards/shirtty/mpconfigboard.mk +++ b/ports/atmel-samd/boards/shirtty/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x806C USB_PRODUCT = "shIRtty" diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.h b/ports/atmel-samd/boards/snekboard/mpconfigboard.h index a349143d91..1c0804fe72 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.h +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.h @@ -15,13 +15,6 @@ #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 0 #define DEFAULT_I2C_BUS_SCL (&pin_PA08) /* ANALOG 5 */ diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk index db2e511abf..4faa041b1b 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x804E USB_PRODUCT = "snekboard" diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h index 80cacfa9b0..d184945f35 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h @@ -13,10 +13,6 @@ #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 0 ) -#define CIRCUITPY_INTERNAL_NVM_SIZE 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 //I2C diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk index 9d0ef1c040..6a2afc306e 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x1B4F USB_PID = 0x0017 USB_PRODUCT = "LUMIDrive Board" diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.h index 96291ff3f2..dcce97b8da 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.h @@ -5,10 +5,6 @@ #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 CALIBRATE_CRYSTALLESS 1 #define BOARD_HAS_CRYSTAL 0 diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.mk index 4497507ac4..632cd095c2 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x1B4F USB_PID = 0x8D24 USB_PRODUCT = "SparkFun Qwiic Micro" diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.h index d31826d26c..c9b195eef4 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.h @@ -13,10 +13,6 @@ #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 0 ) -#define CIRCUITPY_INTERNAL_NVM_SIZE 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define CALIBRATE_CRYSTALLESS 1 #define BOARD_HAS_CRYSTAL 0 diff --git a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk index 324da2e354..ccf5a41495 100644 --- a/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x1B4F USB_PID = 0x8D24 USB_PRODUCT = "SparkFun Qwiic Micro" diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.h index cf7c3998bb..ae272d502b 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.h @@ -15,20 +15,12 @@ #define SPI_FLASH_SCK_PIN &pin_PB23 #define SPI_FLASH_CS_PIN &pin_PA13 -#define MICROPY_PORT_A ( 0 ) +#define MICROPY_PORT_A ( 0 ) #define MICROPY_PORT_B ( 0 ) #define MICROPY_PORT_C ( 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 - // I2C - also QWIIC #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk index e80ef62771..f2d4eccad9 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash.ld USB_VID = 0x1B4F USB_PID = 0x0015 USB_PRODUCT = "RedBoard Turbo Board" diff --git a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h index a50c61cf2d..13bb263803 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h @@ -5,10 +5,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk index c9d0baf11f..0c33ef960e 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x1B4F USB_PID = 0x8D23 USB_PRODUCT = "SparkFun SAMD21 Dev Breakout" diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h index 6af7fa1918..2cfdd9e73b 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h @@ -5,10 +5,6 @@ #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_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk index a6e216575e..d09785fb8a 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x1B4F USB_PID = 0x8D22 USB_PRODUCT = "SparkFun SAMD21 Mini Breakout" diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.h index 34ab8fcfbc..02a6e7f7ce 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.h @@ -16,12 +16,6 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA05) #define DEFAULT_I2C_BUS_SDA (&pin_PA04) @@ -47,4 +41,3 @@ #define IGNORE_PIN_PA28 1 #define IGNORE_PIN_PA30 1 #define IGNORE_PIN_PA31 1 - diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk index 6dc71978c5..20feabd189 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x8060 USB_PRODUCT = "StringCar M0 Express" @@ -22,4 +21,3 @@ CIRCUITPY_RTC = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 - diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h index 8ca1df1621..96b38810c3 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.h @@ -16,14 +16,6 @@ #define MICROPY_PORT_C (0) #define MICROPY_PORT_D (0) -#define AUTORESET_DELAY_MS 500 - -// 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 8192 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PB08) #define DEFAULT_I2C_BUS_SDA (&pin_PB09) diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk index bb0b7d1754..ee82b99c90 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x19-bootloader-external-flash.ld USB_VID = 0x239A USB_PID = 0x8030 USB_PRODUCT = "Trellis M4 Express" diff --git a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h index dd8bc03ccf..69517534ee 100644 --- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h @@ -11,10 +11,6 @@ #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 IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA04 1 #define IGNORE_PIN_PA11 1 diff --git a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk index af8b561a21..5c942901a8 100644 --- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x801F USB_PRODUCT = "Trinket M0" @@ -17,4 +16,3 @@ CFLAGS_BOARD = --param max-inline-insns-auto=15 ifeq ($(TRANSLATION), zh_Latn_pinyin) CFLAGS_INLINE_LIMIT = 35 endif - diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h index 369d84b8b8..af473b1288 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h @@ -18,12 +18,6 @@ #define CALIBRATE_CRYSTALLESS 1 -// 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk index c20358e19f..bd6c9c9ff7 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x801F USB_PRODUCT="Trinket M0 Haxpress" diff --git a/ports/atmel-samd/boards/uchip/mpconfigboard.h b/ports/atmel-samd/boards/uchip/mpconfigboard.h index 6dcaf2965c..1877a41ef9 100644 --- a/ports/atmel-samd/boards/uchip/mpconfigboard.h +++ b/ports/atmel-samd/boards/uchip/mpconfigboard.h @@ -7,11 +7,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) +// No microcontroller.nvm #define CIRCUITPY_INTERNAL_NVM_SIZE 0 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) - - // 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/uchip/mpconfigboard.mk b/ports/atmel-samd/boards/uchip/mpconfigboard.mk index 109492b764..950910e48b 100644 --- a/ports/atmel-samd/boards/uchip/mpconfigboard.mk +++ b/ports/atmel-samd/boards/uchip/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x04D8 USB_PID = 0xED5F USB_PRODUCT = "uChip CircuitPython" diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.h b/ports/atmel-samd/boards/ugame10/mpconfigboard.h index b5590d986c..550172a517 100644 --- a/ports/atmel-samd/boards/ugame10/mpconfigboard.h +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.h @@ -13,12 +13,6 @@ #define CALIBRATE_CRYSTALLESS 1 -// 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 256 - -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_SPI_BUS_SCK (&pin_PA07) #define DEFAULT_SPI_BUS_MISO (&pin_PA11) #define DEFAULT_SPI_BUS_MOSI (&pin_PA06) diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk index f0310b4aaa..1c43369076 100644 --- a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld USB_VID = 0x239A USB_PID = 0x801F USB_PRODUCT = "uGame10" diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.h b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.h index 7e01e228ac..86b1ad8a03 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.h +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.h @@ -16,12 +16,6 @@ #define AUTORESET_DELAY_MS 500 -// 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 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_SPI_BUS_SCK (&pin_PA17) diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk index 1f624df998..a0449d7bb9 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk @@ -1,4 +1,3 @@ -LD_FILE = boards/samd51x20-bootloader-external-flash.ld # Adafruit USB_VID = 0x239A # Allocated for Winterbloom Sol diff --git a/ports/atmel-samd/boards/xinabox_cc03/board.c b/ports/atmel-samd/boards/xinabox_cc03/board.c new file mode 100644 index 0000000000..770bc82593 --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cc03/board.c @@ -0,0 +1,40 @@ +/* + * 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/xinabox_cc03/mpconfigboard.h b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.h new file mode 100644 index 0000000000..4690ed3416 --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.h @@ -0,0 +1,24 @@ +#define MICROPY_HW_BOARD_NAME "XinaBox CC03" +#define MICROPY_HW_MCU_NAME "samd21g18" + +#define MICROPY_PORT_A (0) +#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_PA23) +#define DEFAULT_I2C_BUS_SDA (&pin_PA22) + +#define DEFAULT_SPI_BUS_SCK (&pin_PB11) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB10) +#define DEFAULT_SPI_BUS_MISO (&pin_PA12) + +#define DEFAULT_UART_BUS_RX (&pin_PA11) +#define DEFAULT_UART_BUS_TX (&pin_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/xinabox_cc03/mpconfigboard.mk b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk new file mode 100644 index 0000000000..941d88b459 --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk @@ -0,0 +1,26 @@ +LD_FILE = boards/samd21x18-bootloader.ld +USB_VID = 0x04D8 +USB_PID = 0xEC72 +USB_PRODUCT = "XinaBox CC03" +USB_MANUFACTURER = "XinaBox" + +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ +CIRCUITPY_SMALL_BUILD = 1 + +SUPEROPT_GC = 0 + +# Make room for frozen libs. +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_ANALOGIO=0 +CIRCUITPY_NEOPIXEL_WRITE=0 +CIRCUITPY_PULSEIO=0 +CIRCUITPY_ROTARYIO=0 +CIRCUITPY_TOUCHIO_USE_NATIVE=0 +CIRCUITPY_TOUCHIO=0 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/atmel-samd/boards/xinabox_cc03/pins.c b/ports/atmel-samd/boards/xinabox_cc03/pins.c new file mode 100644 index 0000000000..f7c035d0b2 --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cc03/pins.c @@ -0,0 +1,15 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_GREEN), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_BLUE), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), 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/xinabox_cs11/board.c b/ports/atmel-samd/boards/xinabox_cs11/board.c new file mode 100644 index 0000000000..770bc82593 --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cs11/board.c @@ -0,0 +1,40 @@ +/* + * 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/xinabox_cs11/mpconfigboard.h b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.h new file mode 100644 index 0000000000..9699568dad --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.h @@ -0,0 +1,24 @@ +#define MICROPY_HW_BOARD_NAME "XinaBox CS11" +#define MICROPY_HW_MCU_NAME "samd21g18" + +#define MICROPY_PORT_A (0) +#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_PA23) +#define DEFAULT_I2C_BUS_SDA (&pin_PA22) + +#define DEFAULT_SPI_BUS_SCK (&pin_PB11) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB10) +#define DEFAULT_SPI_BUS_MISO (&pin_PA12) + +#define DEFAULT_UART_BUS_RX (&pin_PA11) +#define DEFAULT_UART_BUS_TX (&pin_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/xinabox_cs11/mpconfigboard.mk b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk new file mode 100644 index 0000000000..5c418d312c --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk @@ -0,0 +1,29 @@ +LD_FILE = boards/samd21x18-bootloader.ld +USB_VID = 0x04D8 +USB_PID = 0xEC75 +USB_PRODUCT = "XinaBox CS11" +USB_MANUFACTURER = "XinaBox" + +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ +CIRCUITPY_SMALL_BUILD = 1 + +SUPEROPT_GC = 0 + +# Make room for frozen libs. +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_ANALOGIO=0 +CIRCUITPY_NEOPIXEL_WRITE=0 +CIRCUITPY_PULSEIO=0 +CIRCUITPY_ROTARYIO=0 +CIRCUITPY_TOUCHIO_USE_NATIVE=0 +CIRCUITPY_TOUCHIO=0 +CIRCUITPY_USB_MIDI=0 +CIRCUITPY_RTC=0 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD diff --git a/ports/atmel-samd/boards/xinabox_cs11/pins.c b/ports/atmel-samd/boards/xinabox_cs11/pins.c new file mode 100644 index 0000000000..f0ef0da674 --- /dev/null +++ b/ports/atmel-samd/boards/xinabox_cs11/pins.c @@ -0,0 +1,20 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_ALERT), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_GREEN), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_BLUE), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) }, + { 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/frequencyio/FrequencyIn.c b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c index d34049946b..cbb0671045 100644 --- a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +++ b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c @@ -213,17 +213,17 @@ void frequencyin_samd51_start_dpll() { // Will also enable the Lock Bypass due to low-frequency sources causing DPLL unlocks // as outlined in the Errata (1.12.1) OSCCTRL->Dpll[1].DPLLRATIO.reg = OSCCTRL_DPLLRATIO_LDRFRAC(0) | OSCCTRL_DPLLRATIO_LDR(2999); - if (board_has_crystal()) { // we can use XOSC32K directly as the source - OSC32KCTRL->XOSC32K.bit.EN32K = 1; - OSCCTRL->Dpll[1].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_REFCLK(1) | - OSCCTRL_DPLLCTRLB_LBYPASS; - } else { - // can't use OSCULP32K directly; need to setup a GCLK as a reference, - // which must be done in samd/clocks.c to avoid waiting for sync - return; - //OSC32KCTRL->OSCULP32K.bit.EN32K = 1; - //OSCCTRL->Dpll[1].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_REFCLK(0); - } +#if BOARD_HAS_CRYSTAL + // we can use XOSC32K directly as the source + OSC32KCTRL->XOSC32K.bit.EN32K = 1; + OSCCTRL->Dpll[1].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_REFCLK(1) | OSCCTRL_DPLLCTRLB_LBYPASS; +#else + // can't use OSCULP32K directly; need to setup a GCLK as a reference, + // which must be done in samd/clocks.c to avoid waiting for sync + return; + //OSC32KCTRL->OSCULP32K.bit.EN32K = 1; + //OSCCTRL->Dpll[1].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_REFCLK(0); +#endif OSCCTRL->Dpll[1].DPLLCTRLA.reg = OSCCTRL_DPLLCTRLA_ENABLE; while (!(OSCCTRL->Dpll[1].DPLLSTATUS.bit.LOCK || OSCCTRL->Dpll[1].DPLLSTATUS.bit.CLKRDY)) {} diff --git a/ports/atmel-samd/common-hal/microcontroller/__init__.c b/ports/atmel-samd/common-hal/microcontroller/__init__.c index cb0751acef..09212a0d12 100644 --- a/ports/atmel-samd/common-hal/microcontroller/__init__.c +++ b/ports/atmel-samd/common-hal/microcontroller/__init__.c @@ -92,7 +92,6 @@ const mcu_processor_obj_t common_hal_mcu_processor_obj = { }, }; -// NVM is only available on Express boards for now. #if CIRCUITPY_INTERNAL_NVM_SIZE > 0 // The singleton nvm.ByteArray object. const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = { @@ -100,7 +99,7 @@ const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = { .type = &nvm_bytearray_type, }, .len = CIRCUITPY_INTERNAL_NVM_SIZE, - .start_address = (uint8_t*) (FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE) + .start_address = (uint8_t*) (CIRCUITPY_INTERNAL_NVM_START_ADDR) }; #endif diff --git a/ports/atmel-samd/ld_defines.c b/ports/atmel-samd/ld_defines.c new file mode 100644 index 0000000000..18f49d42c6 --- /dev/null +++ b/ports/atmel-samd/ld_defines.c @@ -0,0 +1,30 @@ +// Fake source file used only to capture #define values for use in ld template files. +#include "mpconfigport.h" + +// For each value needed in the LD file, create a C-like line: +// /*NAME_OF_VALUE=*/ NAME_OF_VALUE; +// The C preprocessor will replace NAME_OF_VALUE with the actual value. +// This will be post-processed by tools/gen_ld_files.py to extract the name and value. + +// The next line is a marker to start looking for definitions. Lines above the next line are ignored. +// START_LD_DEFINES + +/*RAM_SIZE=*/ RAM_SIZE; +/*FLASH_SIZE=*/ FLASH_SIZE; + +/*BOOTLOADER_SIZE=*/ BOOTLOADER_SIZE; +/*BOOTLOADER_START_ADDR=*/ BOOTLOADER_START_ADDR; + +/*CIRCUITPY_DEFAULT_STACK_SIZE=*/ CIRCUITPY_DEFAULT_STACK_SIZE; + +/*CIRCUITPY_FIRMWARE_START_ADDR=*/ CIRCUITPY_FIRMWARE_START_ADDR; +/*CIRCUITPY_FIRMWARE_SIZE=*/ CIRCUITPY_FIRMWARE_SIZE; + +/*CIRCUITPY_INTERNAL_CONFIG_START_ADDR=*/ CIRCUITPY_INTERNAL_CONFIG_START_ADDR; +/*CIRCUITPY_INTERNAL_CONFIG_SIZE=*/ CIRCUITPY_INTERNAL_CONFIG_SIZE; + +/*CIRCUITPY_INTERNAL_NVM_START_ADDR=*/ CIRCUITPY_INTERNAL_NVM_START_ADDR; +/*CIRCUITPY_INTERNAL_NVM_SIZE=*/ CIRCUITPY_INTERNAL_NVM_SIZE; + +/*CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR=*/ CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR; +/*CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE=*/ CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE; diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 4e15a6c308..28a844ffc0 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -30,11 +30,18 @@ // Definitions for which SAMD chip we're using. #include "include/sam.h" +// Definitions that control circuitpy_mpconfig.h: + +//////////////////////////////////////////////////////////////////////////////////////////////////// + #ifdef SAMD21 + +// HMCRAMC0_SIZE is defined in the ASF4 include files for each SAMD21 chip. +#define RAM_SIZE HMCRAMC0_SIZE +#define BOOTLOADER_SIZE (8*1024) #define CIRCUITPY_MCU_FAMILY samd21 #define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21" #define SPI_FLASH_MAX_BAUDRATE 8000000 -#define CIRCUITPY_DEFAULT_STACK_SIZE 4096 #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0) #define MICROPY_PY_FUNCTION_ATTRS (0) @@ -54,21 +61,155 @@ X(EISDIR) \ X(EINVAL) \ -#endif +#endif // SAMD21 + +//////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef SAMD51 + +// HSRAM_SIZE is defined in the ASF4 include files for each SAMD51 chip. +#define RAM_SIZE HSRAM_SIZE +#define BOOTLOADER_SIZE (16*1024) #define CIRCUITPY_MCU_FAMILY samd51 #define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51" #define SPI_FLASH_MAX_BAUDRATE 24000000 -// 24kiB stack -#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000 #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) #define MICROPY_PY_FUNCTION_ATTRS (1) +// MICROPY_PY_UJSON depends on MICROPY_PY_IO #define MICROPY_PY_IO (1) #define MICROPY_PY_UJSON (1) #define MICROPY_PY_REVERSE_SPECIAL_METHODS (1) // MICROPY_PY_UERRNO_LIST - Use the default + +#endif // SAMD51 + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// This also includes mpconfigboard.h. +#include "py/circuitpy_mpconfig.h" + +// Definitions that can be overridden by mpconfigboard.h: + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef SAMD21 + +#if INTERNAL_FLASH_FILESYSTEM +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (64*1024) +#else +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0) +#endif + +#ifndef CIRCUITPY_INTERNAL_NVM_SIZE +#define CIRCUITPY_INTERNAL_NVM_SIZE (256) +#endif + +#ifndef CIRCUITPY_DEFAULT_STACK_SIZE +#define CIRCUITPY_DEFAULT_STACK_SIZE 4096 +#endif + +#endif // SAMD21 + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef SAMD51 + +#ifndef CIRCUITPY_INTERNAL_NVM_SIZE +#define CIRCUITPY_INTERNAL_NVM_SIZE (8192) +#endif + +#ifndef CIRCUITPY_DEFAULT_STACK_SIZE +#define CIRCUITPY_DEFAULT_STACK_SIZE (24*1024) +#endif + +// If CIRCUITPY is internal, use half of flash for it. +#if INTERNAL_FLASH_FILESYSTEM + #ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE + #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (FLASH_SIZE/2) + #endif +#else + #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0) +#endif + +#endif // SAMD51 + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef CALIBRATE_CRYSTALLESS +#define CALIBRATE_CRYSTALLESS (0) +#endif + +#ifndef BOARD_HAS_CRYSTAL +#define BOARD_HAS_CRYSTAL (0) +#endif + +// if CALIBRATE_CRYSTALLESS is requested, make room for storing +// calibration data generated from external USB. +#ifndef CIRCUITPY_INTERNAL_CONFIG_SIZE + #if CALIBRATE_CRYSTALLESS + #define CIRCUITPY_INTERNAL_CONFIG_SIZE (NVMCTRL_ROW_SIZE) // 256 + #else + #define CIRCUITPY_INTERNAL_CONFIG_SIZE (0) + #endif +#endif + +// Flash layout, starting at 0x00000000 +// +// - bootloader (8 or 16kB) +// - firmware +// - internal CIRCUITPY flash filesystem (optional) +// - internal config, used to store crystalless clock calibration info (optional) +// - microntroller.nvm (optional) + +// Define these regions starting up from the bottom of flash: + +#define BOOTLOADER_START_ADDR (0x00000000) + +#define CIRCUITPY_FIRMWARE_START_ADDR (BOOTLOADER_START_ADDR + BOOTLOADER_SIZE) + +// Define these regions start down from the top of flash: + +#define CIRCUITPY_INTERNAL_NVM_START_ADDR \ + (FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE) + +#define CIRCUITPY_INTERNAL_CONFIG_START_ADDR \ + (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_INTERNAL_CONFIG_SIZE) + +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR \ + (CIRCUITPY_INTERNAL_CONFIG_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE) + +// The firmware space is the space left over between the fixed lower and upper regions. +#define CIRCUITPY_FIRMWARE_SIZE \ + (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR) + +#if BOOTLOADER_START_ADDR % FLASH_PAGE_SIZE != 0 +#error BOOTLOADER_START_ADDR must be on a flash page boundary. +#endif + +#if CIRCUITPY_INTERNAL_NVM_START_ADDR % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_NVM_START_ADDR must be on a flash page boundary. +#endif +#if CIRCUITPY_INTERNAL_NVM_SIZE % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_NVM_SIZE must be a multiple of FLASH_PAGE_SIZE. +#endif + +#if CIRCUITPY_INTERNAL_CONFIG_START_ADDR % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_CONFIG_SIZE must be on a flash page boundary. +#endif +#if CIRCUITPY_INTERNAL_CONFIG_SIZE % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_CONFIG_SIZE must be a multiple of FLASH_PAGE_SIZE. +#endif + +#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE must be on a flash page boundary. +#endif +#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE must be a multiple of FLASH_PAGE_SIZE. +#endif + +#if CIRCUITPY_FIRMWARE_SIZE < 0 +#error No space left in flash for firmware after specifying other regions! #endif // Turning off audioio, audiobusio, and touchio as necessary @@ -76,8 +217,6 @@ #include "peripherals/samd/dma.h" -#include "py/circuitpy_mpconfig.h" - #define MICROPY_PORT_ROOT_POINTERS \ CIRCUITPY_COMMON_ROOT_POINTERS \ mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT]; diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 58bf07247c..354745a2c1 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -1,3 +1,7 @@ +# All linking can be done with this common templated linker script, which has +# parameters that vary based on chip and/or board. +LD_TEMPLATE_FILE = boards/common.template.ld + # 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. @@ -35,7 +39,8 @@ endif # SAMD21 needs separate endpoint pairs for MSC BULK IN and BULK OUT, otherwise it's erratic. USB_MSC_EP_NUM_OUT = 1 -endif + +endif # samd21 # Put samd51-only choices here. ifeq ($(CHIP_FAMILY),samd51) @@ -57,7 +62,7 @@ ifndef CIRCUITPY_SAMD CIRCUITPY_SAMD = 1 endif -endif +endif # samd51 INTERNAL_LIBM = 1 diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals index 2ba5b20ba7..4c0deecf88 160000 --- a/ports/atmel-samd/peripherals +++ b/ports/atmel-samd/peripherals @@ -1 +1 @@ -Subproject commit 2ba5b20ba725e1c91c77875fba3a5e22059cdb92 +Subproject commit 4c0deecf889da0074c1dbc9a5e2d24cb7c7a31c6 diff --git a/ports/atmel-samd/supervisor/internal_flash.c b/ports/atmel-samd/supervisor/internal_flash.c index 6dd5ac0a70..a8ff5adfa9 100644 --- a/ports/atmel-samd/supervisor/internal_flash.c +++ b/ports/atmel-samd/supervisor/internal_flash.c @@ -86,7 +86,7 @@ void flash_flush(void) { static int32_t convert_block_to_flash_addr(uint32_t block) { if (0 <= block && block < INTERNAL_FLASH_PART1_NUM_BLOCKS) { // a block in partition 1 - return INTERNAL_FLASH_MEM_SEG1_START_ADDR + block * FILESYSTEM_BLOCK_SIZE; + return CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR + block * FILESYSTEM_BLOCK_SIZE; } // bad block return -1; diff --git a/ports/atmel-samd/supervisor/internal_flash.h b/ports/atmel-samd/supervisor/internal_flash.h index 0939a34548..df8b495ccb 100644 --- a/ports/atmel-samd/supervisor/internal_flash.h +++ b/ports/atmel-samd/supervisor/internal_flash.h @@ -32,16 +32,7 @@ #include "sam.h" -#ifdef SAMD51 -#define TOTAL_INTERNAL_FLASH_SIZE (FLASH_SIZE / 2) -#endif - -#ifdef SAMD21 -#define TOTAL_INTERNAL_FLASH_SIZE 0x010000 -#endif - -#define INTERNAL_FLASH_MEM_SEG1_START_ADDR (FLASH_SIZE - TOTAL_INTERNAL_FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE) -#define INTERNAL_FLASH_PART1_NUM_BLOCKS (TOTAL_INTERNAL_FLASH_SIZE / FILESYSTEM_BLOCK_SIZE) +#define INTERNAL_FLASH_PART1_NUM_BLOCKS (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE / FILESYSTEM_BLOCK_SIZE) #define INTERNAL_FLASH_SYSTICK_MASK (0x1ff) // 512ms #define INTERNAL_FLASH_IDLE_TICK(tick) (((tick) & INTERNAL_FLASH_SYSTICK_MASK) == 2) diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index e962281c1e..5662b159bc 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -24,12 +24,16 @@ * THE SOFTWARE. */ +#include +#include + #include "boards/board.h" #include "supervisor/port.h" // ASF 4 #include "atmel_start_pins.h" #include "hal/include/hal_delay.h" +#include "hal/include/hal_flash.h" #include "hal/include/hal_gpio.h" #include "hal/include/hal_init.h" #include "hpl/gclk/hpl_gclk_base.h" @@ -94,6 +98,40 @@ extern volatile bool mp_msc_enabled; __attribute__((__aligned__(TRACE_BUFFER_SIZE_BYTES))) uint32_t mtb[TRACE_BUFFER_SIZE] = {0}; #endif +#if CALIBRATE_CRYSTALLESS +static void save_usb_clock_calibration(void) { + // If we are on USB lets double check our fine calibration for the clock and + // save the new value if its different enough. + SYSCTRL->DFLLSYNC.bit.READREQ = 1; + uint16_t saved_calibration = 0x1ff; + if (strcmp((char*) CIRCUITPY_INTERNAL_CONFIG_START_ADDR, "CIRCUITPYTHON1") == 0) { + saved_calibration = ((uint16_t *) CIRCUITPY_INTERNAL_CONFIG_START_ADDR)[8]; + } + while (SYSCTRL->PCLKSR.bit.DFLLRDY == 0) { + // TODO(tannewt): Run the mass storage stuff if this takes a while. + } + int16_t current_calibration = SYSCTRL->DFLLVAL.bit.FINE; + if (abs(current_calibration - saved_calibration) > 10) { + // Copy the full internal config page to memory. + uint8_t page_buffer[NVMCTRL_ROW_SIZE]; + memcpy(page_buffer, (uint8_t*) CIRCUITPY_INTERNAL_CONFIG_START_ADDR, NVMCTRL_ROW_SIZE); + + // Modify it. + memcpy(page_buffer, "CIRCUITPYTHON1", 15); + // First 16 bytes (0-15) are ID. Little endian! + page_buffer[16] = current_calibration & 0xff; + page_buffer[17] = current_calibration >> 8; + + // Write it back. + // We don't use features that use any advanced NVMCTRL features so we can fake the descriptor + // whenever we need it instead of storing it long term. + struct flash_descriptor desc; + desc.dev.hw = NVMCTRL; + flash_write(&desc, (uint32_t) CIRCUITPY_INTERNAL_CONFIG_START_ADDR, page_buffer, NVMCTRL_ROW_SIZE); + } +} +#endif + safe_mode_t port_init(void) { #if defined(SAMD21) @@ -168,7 +206,19 @@ safe_mode_t port_init(void) { hri_nvmctrl_set_CTRLB_RWS_bf(NVMCTRL, 2); _pm_init(); #endif - clock_init(); + +#if CALIBRATE_CRYSTALLESS + uint32_t fine = DEFAULT_DFLL48M_FINE_CALIBRATION; + // The fine calibration data is stored in an NVM page after the text and data storage but before + // the optional file system. The first 16 bytes are the identifier for the section. + if (strcmp((char*) CIRCUITPY_INTERNAL_CONFIG_START_ADDR, "CIRCUITPYTHON1") == 0) { + fine = ((uint16_t *) CIRCUITPY_INTERNAL_CONFIG_START_ADDR)[8]; + } + clock_init(BOARD_HAS_CRYSTAL, fine); +#else + // Use a default fine value + clock_init(BOARD_HAS_CRYSTAL, DEFAULT_DFLL48M_FINE_CALIBRATION); +#endif // Configure millisecond timer initialization. tick_init(); @@ -257,9 +307,11 @@ void reset_port(void) { // gpio_set_pin_function(PIN_PB15, GPIO_PIN_FUNCTION_M); // GCLK1, D6 // #endif +#if CALIBRATE_CRYSTALLESS if (tud_cdc_connected()) { save_usb_clock_calibration(); } +#endif } void reset_to_bootloader(void) { diff --git a/ports/cxd56/boards/spresense/mpconfigboard.mk b/ports/cxd56/boards/spresense/mpconfigboard.mk index a2d4e5d88c..7b8ac6ff63 100644 --- a/ports/cxd56/boards/spresense/mpconfigboard.mk +++ b/ports/cxd56/boards/spresense/mpconfigboard.mk @@ -2,3 +2,5 @@ USB_VID = 0x054c USB_PID = 0x0bc2 USB_PRODUCT = "Spresense" USB_MANUFACTURER = "Sony" + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 096dfaa4bf..f38b9f6846 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -63,8 +63,6 @@ ifneq ($(SD), ) include bluetooth/bluetooth_common.mk endif -FROZEN_MPY_DIR = freeze - CROSS_COMPILE = arm-none-eabi- FATFS_DIR = lib/oofatfs @@ -119,7 +117,7 @@ CFLAGS += \ # TODO: check this CFLAGS += -D__START=main -LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib -Wl,-T,$(LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs +LDFLAGS = $(CFLAGS) -nostartfiles -fshort-enums -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs LIBS := -lgcc -lc LDFLAGS += -mthumb -mcpu=cortex-m4 @@ -140,6 +138,7 @@ SRC_NRFX = $(addprefix nrfx/,\ drivers/src/nrfx_uarte.c \ drivers/src/nrfx_gpiote.c \ drivers/src/nrfx_rtc.c \ + drivers/src/nrfx_nvmc.c \ ) ifdef EXTERNAL_FLASH_DEVICES @@ -169,7 +168,6 @@ SRC_C += \ lib/utils/pyexec.c \ lib/utils/stdout_helpers.c \ lib/utils/sys_stdio_mphal.c \ - nrfx/hal/nrf_nvmc.c \ nrfx/mdk/system_$(MCU_SUB_VARIANT).c \ peripherals/nrf/cache.c \ peripherals/nrf/clocks.c \ @@ -194,15 +192,16 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) $(addprefix shared-module/, $(SRC_SHARED_MODULE)) \ $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) -SRC_S = supervisor/cpu.s +# There may be duplicates between SRC_COMMON_HAL_EXPANDED and SRC_SHARED_MODULE_EXPANDED, +# because a few modules have files both in common-hal/ and shared-modules/. +# Doing a $(sort ...) removes duplicates as part of sorting. +SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) -FROZEN_MPY_PY_FILES := $(shell find -L $(FROZEN_MPY_DIR) -type f -name '*.py') -FROZEN_MPY_MPY_FILES := $(addprefix $(BUILD)/,$(FROZEN_MPY_PY_FILES:.py=.mpy)) +SRC_S = supervisor/cpu.s OBJ += $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_NRFX:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o)) +OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_SHARED_MODULE_EXPANDED:.c=.o)) ifeq ($(INTERNAL_LIBM),1) OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o)) endif @@ -220,10 +219,10 @@ SRC_QSTR_PREPROCESSOR += all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 -$(BUILD)/firmware.elf: $(OBJ) +$(BUILD)/firmware.elf: $(OBJ) $(GENERATED_LD_FILE) $(STEPECHO) "LINK $@" - $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group - $(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py $(LD_FILE) + $(Q)$(CC) -o $@ $(LDFLAGS) $(OBJ) -Wl,--start-group $(LIBS) -Wl,--end-group + $(Q)$(SIZE) $@ | $(PYTHON3) $(TOP)/tools/build_memory_info.py $(GENERATED_LD_FILE) $(BUILD)/firmware.bin: $(BUILD)/firmware.elf $(STEPECHO) "Create $@" @@ -265,7 +264,7 @@ else ifeq ($(FLASHER), pyocd) flash: $(BUILD)/firmware.hex pyocd-flashtool -t $(MCU_VARIANT) $< --sector_erase - #pyocd-tool -t $(MCU_VARIANT) erase $(BOOT_SETTING_ADDR) +# pyocd-tool -t $(MCU_VARIANT) erase $(BOOT_SETTING_ADDR) pyocd-tool -t $(MCU_VARIANT) write32 $(BOOT_SETTING_ADDR) 0x00000001 pyocd-tool -t $(MCU_VARIANT) reset diff --git a/ports/nrf/README.md b/ports/nrf/README.md index 5f6d037204..88dd472738 100644 --- a/ports/nrf/README.md +++ b/ports/nrf/README.md @@ -2,85 +2,18 @@ This is a port of CircuitPython to the Nordic Semiconductor nRF52 series of chips. -## Supported Features +> **NOTE**: There are board-specific READMEs that may be more up to date than the + generic board-neutral documentation below. -* UART -* SPI -* LEDs -* Pins -* ADC -* I2C -* PWM -* Temperature -* RTC (Real Time Counter. Low-Power counter) -* BLE support including: - * Peripheral role - * Scanner role - * _REPL over Bluetooth LE_ (optionally using WebBluetooth) - * ubluepy: Bluetooth LE module for CircuitPython - * 1 non-connectable advertiser while in connection +## Flash -## Tested Hardware +Some boards have UF2 bootloaders and can simply be flashed in the normal way, by copying +firmware.uf2 to the BOOT drive. -* nRF52840 - * [PCA10056](http://www.nordicsemi.com/eng/Products/nRF52840-Preview-DK) +For some boards, you can use the `flash` target: -## Board Specific Instructions - -For board-specific instructions on building and flashing CircuitPython, see -the following links: - -> **NOTE**: These board specific readmes may be more up to date than the - generic board-neutral documentation further down. - -* Adafruit Feather nRF52840: `boards/feather_nrf52840_express/README.md`: 1MB Flash, 256KB SRAM -* Nordic PCA10056 (uses nRF52840): `boards/pca10056/README.md` -* MakerDiary nRF52840 MDK: `boards/makerdiary_nrf52840_mdk/README.md` -* MakerDiary nRF52840 MDK USB Dongle: `boards/makerdiary_nrf52840_mdk_usb_dongle/README.md` - -For all other board targets, see the generic notes below. - -## Compile and Flash - -Prerequisite steps for building the nrf port: - - git clone .git circuitpython - cd circuitpython - git submodule update --init - make -C mpy-cross - -To build and flash issue the following command inside the ports/nrf/ folder: - - make BOARD=pca10056 make BOARD=pca10056 flash -## Compile and Flash with Bluetooth Stack - -First prepare the bluetooth folder by downloading Bluetooth LE stacks and headers: - - ./bluetooth/download_ble_stack.sh - -If the Bluetooth stacks has been downloaded, compile the target with the following command: - - make BOARD=pca10040 SD=s132 - -The **make sd** will trigger a flash of the bluetooth stack before that application is flashed. Note that **make sd** will perform a full erase of the chip, which could cause 3rd party bootloaders to also be wiped. - - make BOARD=pca10040 SD=s132 sd - -Note: further tuning of features to include in bluetooth or even setting up the device to use REPL over Bluetooth can be configured in the `bluetooth_conf.h`. - -## Target Boards and Make Flags - -Target Board (BOARD) | Bluetooth Stack (SD) | Bluetooth Support | Flash Util --------------------------|-------------------------|------------------------|------------------------------- -pca10056 | s140 | Peripheral and Scanner | [Segger](#segger-targets) -feather_nrf52840_express | s140 | Peripheral and Scanner | UF2 bootloader -makerdiary_nrf52840_mdk | s140 | Peripheral and Scanner | pyocd or ARM mbed DAPLink -makerdiary_nrf52840_mdk_usb_dongle | s140 | Peripheral and Scanner | DFU bootloader & nrfutil -electronut_labs_papyr | s140 | Peripheral and Scanner | UF2 bootloader -electronut_labs_blip | s140 | Peripheral and Scanner | Black Magic Probe - ## Segger Targets Install the necessary tools to flash and debug using Segger: @@ -107,22 +40,7 @@ run follow command to install [adafruit-nrfutil](https://github.com/adafruit/Ada * dfu-gen: Generates a Firmware zip to be used by the DFU flash application. * dfu-flash: Triggers the DFU flash application to upload the firmware from the generated Firmware zip file. -Example on how to generate and flash feather_nrf52840 target: - - make BOARD=feather_nrf52840 SD=s140 - make BOARD=feather_nrf52840 SD=s140 dfu-gen dfu-flash - -## Bluetooth LE REPL - -The port also implements a BLE REPL driver. This feature is disabled by default, as it will deactivate the UART REPL when activated. As some of the nRF devices only have one UART, using the BLE REPL free's the UART instance such that it can be used as a general UART peripheral not bound to REPL. - -The configuration can be enabled by editing the `bluetooth_conf.h` and set `MICROPY_PY_BLE_NUS` to 1. When enabled you have different options to test it: * [NUS Console for Linux](https://github.com/tralamazza/nus_console) (recommended) * [WebBluetooth REPL](https://glennrub.github.io/webbluetooth/micropython/repl/) (experimental) - -Other: -* nRF UART application for IPhone/Android - -WebBluetooth mode can also be configured by editing `bluetooth_conf.h` and set `BLUETOOTH_WEBBLUETOOTH_REPL` to 1. This will alternate advertisement between Eddystone URL and regular connectable advertisement. The Eddystone URL will point the phone or PC to download [WebBluetooth REPL](https://glennrub.github.io/webbluetooth/micropython/repl/) (experimental), which subsequently can be used to connect to the Bluetooth REPL from the PC or Phone browser. diff --git a/ports/nrf/bluetooth/ble_drv.c b/ports/nrf/bluetooth/ble_drv.c index 63d67a7f4a..7dbb315826 100644 --- a/ports/nrf/bluetooth/ble_drv.c +++ b/ports/nrf/bluetooth/ble_drv.c @@ -43,7 +43,7 @@ nrf_nvic_state_t nrf_nvic_state = { 0 }; // Flag indicating progress of internal flash operation. -sd_flash_operation_status_t sd_flash_operation_status; +volatile sd_flash_operation_status_t sd_flash_operation_status; __attribute__((aligned(4))) static uint8_t m_ble_evt_buf[sizeof(ble_evt_t) + (BLE_GATT_ATT_MTU_DEFAULT)]; diff --git a/ports/nrf/bluetooth/ble_drv.h b/ports/nrf/bluetooth/ble_drv.h index 7716cab8be..91990da6df 100644 --- a/ports/nrf/bluetooth/ble_drv.h +++ b/ports/nrf/bluetooth/ble_drv.h @@ -59,7 +59,7 @@ typedef enum { } sd_flash_operation_status_t; // Flag indicating progress of internal flash operation. -extern sd_flash_operation_status_t sd_flash_operation_status; +extern volatile sd_flash_operation_status_t sd_flash_operation_status; typedef struct ble_drv_evt_handler_entry { struct ble_drv_evt_handler_entry *next; diff --git a/ports/nrf/bluetooth/ble_uart.c b/ports/nrf/bluetooth/ble_uart.c index 787a2a1174..1e7a319bdd 100644 --- a/ports/nrf/bluetooth/ble_uart.c +++ b/ports/nrf/bluetooth/ble_uart.c @@ -40,7 +40,7 @@ #include "shared-bindings/_bleio/Service.h" #include "shared-bindings/_bleio/UUID.h" -#if (MICROPY_PY_BLE_NUS == 1) +#if CIRCUITPY_SERIAL_BLE static const char default_name[] = "CP-REPL"; // max 8 chars or uuid won't fit in adv data static const char NUS_UUID[] = "6e400001-b5a3-f393-e0a9-e50e24dcca9e"; @@ -190,4 +190,4 @@ void mp_hal_stdout_tx_strn(const char *str, size_t len) { } } -#endif // MICROPY_PY_BLE_NUS +#endif // CIRCUITPY_SERIAL_BLE diff --git a/ports/nrf/boards/adafruit_nrf52840_s140_v6.ld b/ports/nrf/boards/adafruit_nrf52840_s140_v6.ld deleted file mode 100644 index 756060f960..0000000000 --- a/ports/nrf/boards/adafruit_nrf52840_s140_v6.ld +++ /dev/null @@ -1,50 +0,0 @@ -/* - GNU linker script for NRF52840 w/S140 6.x.x SoftDevice - - MEMORY MAP - ------------------------------------------------------------------------ - START ADDR END ADDR SIZE DESCRIPTION - ---------- ---------- ------- ----------------------------------------- - 0x000FF000..0x000FFFFF ( 4KB) Bootloader Settings - 0x000FE000..0x000FEFFF ( 4KB) Master Boot Record Params - 0x000F4000..0x000FDFFF ( 40KB) Bootloader (UF2 + CDC + OTA) - - 0x000ED000..0x000F3FFF (28KB ) Private Config Data (Bonding, Keys, etc.) - 0x000AD000..0x000ECFFF (256KB) User Filesystem - 0x00026000..0x000ACFFF (540KB) Application Code (including ISR vector) - 0x00001000..0x00025FFF (148KB) SoftDevice - 0x00000000..0x00000FFF (4KB) Master Boot Record -*/ - - -/* Specify the memory areas (S140 6.x.x) */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000 - - FLASH_ISR (rx) : ORIGIN = 0x00026000, LENGTH = 0x001000 - FLASH_TEXT (rx) : ORIGIN = 0x00027000, LENGTH = 0x086000 - FLASH_FATFS (r) : ORIGIN = 0x000AD000, LENGTH = 0x040000 - - /* 0x2000000 - RAM:ORIGIN is reserved for Softdevice */ - /* SoftDevice 6.1.0 takes 0x1628 bytes (5.54 kb) minimum. */ - /* To measure the minimum required amount of memory for given configuration, set this number - high enough to work and then check the mutation of the value done by sd_ble_enable. */ - RAM (xrw) : ORIGIN = 0x20000000 + 16K, LENGTH = 256K - 16K -} - -/* produce a link error if there is not this amount of RAM for these sections */ -_minimum_stack_size = 2K; -_minimum_heap_size = 0; - -/* top end of the stack */ - -/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/ -_estack = ORIGIN(RAM) + LENGTH(RAM); - -/* RAM extents for the garbage collector and soft device init */ -_ram_start = ORIGIN(RAM); -_ram_end = ORIGIN(RAM) + LENGTH(RAM); -_heap_end = 0x20020000; /* tunable */ - -INCLUDE "boards/common.ld" diff --git a/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk b/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk index 9a875ac442..d5e38c5b72 100644 --- a/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk +++ b/ports/nrf/boards/arduino_nano_33_ble/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0x805A USB_PRODUCT = "Arduino_Nano_33_BLE" USB_MANUFACTURER = "Arduino" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h index 21ba3a976b..7f9933b421 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h @@ -30,9 +30,6 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Circuit Playground Bluefruit" #define MICROPY_HW_MCU_NAME "nRF52840" -#define FLASH_SIZE (0x100000) -#define FLASH_PAGE_SIZE (4096) - #define MICROPY_HW_LED_STATUS (&pin_P1_14) // Unusually, board does not have a 32 kHz xtal. Nearly all boards do. @@ -57,12 +54,6 @@ // Disables onboard peripherals and neopixels to save power. #define POWER_SWITCH_PIN (&pin_P0_06) -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -#define CIRCUITPY_INTERNAL_NVM_SIZE (4096) - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define DEFAULT_I2C_BUS_SCL (&pin_P0_04) #define DEFAULT_I2C_BUS_SDA (&pin_P0_05) diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk index d53e486f9d..f63554e5e8 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0x8046 USB_PRODUCT = "Circuit Playground Bluefruit" USB_MANUFACTURER = "Adafruit Industries LLC" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/common.ld b/ports/nrf/boards/common.template.ld similarity index 63% rename from ports/nrf/boards/common.ld rename to ports/nrf/boards/common.template.ld index df81aae583..931f95ee9e 100644 --- a/ports/nrf/boards/common.ld +++ b/ports/nrf/boards/common.template.ld @@ -1,6 +1,36 @@ -/* Flash region for File System */ -__fatfs_flash_start_addr = ORIGIN(FLASH_FATFS); -__fatfs_flash_length = LENGTH(FLASH_FATFS); +/* + GNU linker script for NRF52840 w/ s140 6.0.0 SoftDevice +*/ + +/* Specify the memory areas */ +MEMORY +{ + FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000 /* entire flash, 1 MiB */ + /* nRF SoftDevice */ + FLASH_MBR (rx) : ORIGIN = ${MBR_START_ADDR}, LENGTH = ${MBR_SIZE} + FLASH_SD (rx) : ORIGIN = ${SD_FLASH_START_ADDR}, LENGTH = ${SD_FLASH_SIZE} + FLASH_ISR (rx) : ORIGIN = ${ISR_START_ADDR}, LENGTH = ${ISR_SIZE} + FLASH_FIRMWARE (rx) : ORIGIN = ${CIRCUITPY_FIRMWARE_START_ADDR}, LENGTH = ${CIRCUITPY_FIRMWARE_SIZE} + FLASH_BLE_CONFIG (r) : ORIGIN = ${CIRCUITPY_BLE_CONFIG_START_ADDR}, LENGTH = ${CIRCUITPY_BLE_CONFIG_SIZE} + FLASH_NVM (r) : ORIGIN = ${CIRCUITPY_INTERNAL_NVM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_NVM_SIZE} + FLASH_FATFS (r) : ORIGIN = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE} + FLASH_BOOTLOADER (rx) : ORIGIN = ${BOOTLOADER_START_ADDR}, LENGTH = ${BOOTLOADER_SIZE} + FLASH_BOOTLOADER_SETTINGS (r) : ORIGIN = ${BOOTLOADER_SETTINGS_START_ADDR}, LENGTH = ${BOOTLOADER_SETTINGS_SIZE} + RAM (xrw) : ORIGIN = 0x20004000, LENGTH = 0x03C000 /* 240 KiB */ +} + +/* produce a link error if there is not this amount of RAM for these sections */ +_minimum_stack_size = 40K; +_minimum_heap_size = 0; + +/* top end of the stack */ + +/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/ +_estack = ORIGIN(RAM) + LENGTH(RAM); + +/* RAM extents for the garbage collector */ +_ram_end = ORIGIN(RAM) + LENGTH(RAM); +_heap_end = 0x20020000; /* tunable */ /* define output sections */ SECTIONS @@ -13,7 +43,7 @@ SECTIONS . = ALIGN(4); } >FLASH_ISR - + /* The program code and other data goes into FLASH */ .text : { @@ -27,25 +57,25 @@ SECTIONS . = ALIGN(4); _etext = .; /* define a global symbol at end of code */ - } >FLASH_TEXT - + } >FLASH_FIRMWARE + /* .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) - } >FLASH + } >FLASH_FIRMWARE .ARM : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; - } >FLASH + } >FLASH_FIRMWARE */ - + /* used by the startup to initialize data */ _sidata = .; - + /* This is the initialized data section The program executes knowing that the data is in the RAM but the loader puts the initial values in the FLASH (inidata). @@ -60,8 +90,8 @@ SECTIONS . = ALIGN(4); _edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ - } >RAM - + } >RAM + /* Uninitialized data section */ .bss : { @@ -105,4 +135,3 @@ SECTIONS .ARM.attributes 0 : { *(.ARM.attributes) } } - diff --git a/ports/nrf/boards/electronut_labs_blip/mpconfigboard.h b/ports/nrf/boards/electronut_labs_blip/mpconfigboard.h index 6fe969d4ac..ed1c32bd3c 100644 --- a/ports/nrf/boards/electronut_labs_blip/mpconfigboard.h +++ b/ports/nrf/boards/electronut_labs_blip/mpconfigboard.h @@ -33,12 +33,6 @@ #define MICROPY_HW_BOARD_NAME "Electronut Labs Blip" #define MICROPY_HW_MCU_NAME "nRF52840" -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_P0_11) diff --git a/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk b/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk index 9cddd96eeb..f30b308ecf 100644 --- a/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk +++ b/ports/nrf/boards/electronut_labs_blip/mpconfigboard.mk @@ -3,28 +3,10 @@ USB_PID = 0x803C USB_PRODUCT = "Blip" USB_MANUFACTURER = "Electronut Labs" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 - -QSPI_FLASH_FILESYSTEM = 0 INTERNAL_FLASH_FILESYSTEM = 1 CIRCUITPY_AUDIOIO = 0 CIRCUITPY_DISPLAYIO = 1 CIRCUITPY_GAMEPAD = 1 CIRCUITPY_STAGE = 1 - diff --git a/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.h b/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.h index 6fc1c5fad7..4c2e7a92c1 100644 --- a/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.h +++ b/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.h @@ -32,12 +32,6 @@ #define MICROPY_HW_BOARD_NAME "Electronut Labs Papyr" #define MICROPY_HW_MCU_NAME "nRF52840" -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_P0_06) diff --git a/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.mk b/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.mk index 5aee244f11..569dccc9c4 100644 --- a/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.mk +++ b/ports/nrf/boards/electronut_labs_papyr/mpconfigboard.mk @@ -3,20 +3,6 @@ USB_PID = 0x803C USB_PRODUCT = "Papyr" USB_MANUFACTURER = "Electronut Labs" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 \ No newline at end of file +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h index b5319032c9..64988e1a28 100644 --- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h +++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h @@ -30,9 +30,6 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Feather nRF52840 Express" #define MICROPY_HW_MCU_NAME "nRF52840" -#define FLASH_SIZE (0x100000) -#define FLASH_PAGE_SIZE (4096) - #define MICROPY_HW_NEOPIXEL (&pin_P0_16) #define MICROPY_HW_LED_STATUS (&pin_P1_15) @@ -53,12 +50,6 @@ #define SPI_FLASH_CS_PIN &pin_P0_20 #endif -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -#define CIRCUITPY_INTERNAL_NVM_SIZE (4096) - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_P0_11) diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk index 0fef54ef79..84861a1f0b 100644 --- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0x802A USB_PRODUCT = "Feather nRF52840 Express" USB_MANUFACTURER = "Adafruit Industries LLC" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.h b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.h index 2f17460ae7..629463e4e2 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.h +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.h @@ -3,9 +3,6 @@ #define MICROPY_HW_BOARD_NAME "Adafruit ItsyBitsy nRF52840 Express" #define MICROPY_HW_MCU_NAME "nRF52840" -#define FLASH_SIZE (0x100000) -#define FLASH_PAGE_SIZE (4096) - #define MICROPY_HW_LED_STATUS (&pin_P0_06) #define MICROPY_HW_APA102_MOSI (&pin_P0_08) diff --git a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk index d290077e75..d5587f4b94 100644 --- a/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/itsybitsy_nrf52840_express/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0x8052 USB_PRODUCT = "ItsyBitsy nRF52840 Express" USB_MANUFACTURER = "Adafruit Industries LLC" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 # Don't use up a hardware SPI peripheral for the status DotStar: we only have one or two. CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h index ce0abe724e..871cbe73d8 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.h @@ -39,12 +39,6 @@ #define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(1, 3) #define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(1, 8) -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 0 #define DEFAULT_UART_BUS_RX (&pin_P0_19) diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk index abb0f4946c..3395750496 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0x802A USB_PRODUCT = "nRF52840-MDK" USB_MANUFACTURER = "makerdiary" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h index 86c7243e57..684b2c501a 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.h @@ -32,10 +32,4 @@ #define MICROPY_HW_BOARD_NAME "MakerDiary nRF52840 MDK USB Dongle" #define MICROPY_HW_MCU_NAME "nRF52840" -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 // according to the schematic we do diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.mk b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.mk index 82bbc3bd8c..55ca410d9f 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.mk +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.mk @@ -3,21 +3,6 @@ USB_PID = 0x802A USB_PRODUCT = "nRF52840-MDK-Dongle" USB_MANUFACTURER = "makerdiary" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 -BOOT_SETTING_ADDR = 0xFF000 -BOOT_FILE = boards/$(BOARD)/bootloader/$(SOFTDEV_VERSION)/$(BOARD)_bootloader_$(SOFTDEV_VERSION)_s140 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.h b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.h index 797cc9668c..8373551545 100644 --- a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.h +++ b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.h @@ -30,9 +30,6 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Metro nRF52840 Express" #define MICROPY_HW_MCU_NAME "nRF52840" -#define FLASH_SIZE (0x100000) -#define FLASH_PAGE_SIZE (4096) - #define MICROPY_HW_NEOPIXEL (&pin_P0_13) #define MICROPY_HW_LED_STATUS (&pin_P1_13) @@ -53,12 +50,6 @@ #define SPI_FLASH_CS_PIN &pin_P0_20 #endif -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -#define CIRCUITPY_INTERNAL_NVM_SIZE (4096) - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_P0_16) diff --git a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk index 4c1c93c10a..d421e52104 100644 --- a/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk +++ b/ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0x8040 USB_PRODUCT = "Metro nRF52840 Express" USB_MANUFACTURER = "Adafruit Industries LLC" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/nrf52840_1M_256k.ld b/ports/nrf/boards/nrf52840_1M_256k.ld deleted file mode 100644 index eb8a18aef6..0000000000 --- a/ports/nrf/boards/nrf52840_1M_256k.ld +++ /dev/null @@ -1,28 +0,0 @@ -/* - GNU linker script for NRF52840 blank w/ no SoftDevice -*/ - -/* Specify the memory areas */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000 /* entire flash, 1 MiB */ - FLASH_ISR (rx) : ORIGIN = 0x00000000, LENGTH = 0x001000 /* sector 0, 4 KiB */ - FLASH_TEXT (rx) : ORIGIN = 0x00001000, LENGTH = 0x0E6000 /* 920 KiB */ - FLASH_FATFS (r) : ORIGIN = 0x000E7000, LENGTH = 0x019000 /* File system 100 KiB */ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x040000 /* 256 KiB */ -} - -/* produce a link error if there is not this amount of RAM for these sections */ -_minimum_stack_size = 40K; -_minimum_heap_size = 0; - -/* top end of the stack */ - -/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/ -_estack = ORIGIN(RAM) + LENGTH(RAM); - -/* RAM extents for the garbage collector */ -_ram_end = ORIGIN(RAM) + LENGTH(RAM); -_heap_end = 0x20020000; /* tunable */ - -INCLUDE "boards/common.ld" diff --git a/ports/nrf/boards/nrf52840_1M_256k_s140_6.0.0.ld b/ports/nrf/boards/nrf52840_1M_256k_s140_6.0.0.ld deleted file mode 100644 index 90d6c402d0..0000000000 --- a/ports/nrf/boards/nrf52840_1M_256k_s140_6.0.0.ld +++ /dev/null @@ -1,28 +0,0 @@ -/* - GNU linker script for NRF52840 w/ s140 6.0.0 SoftDevice -*/ - -/* Specify the memory areas */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x100000 /* entire flash, 1 MiB */ - FLASH_ISR (rx) : ORIGIN = 0x00026000, LENGTH = 0x001000 /* sector 0, 4 KiB */ - FLASH_TEXT (rx) : ORIGIN = 0x00027000, LENGTH = 0x099000 /* 612 KiB */ - FLASH_FATFS (r) : ORIGIN = 0x000C0000, LENGTH = 0x040000 /* File system 256 KiB */ - RAM (xrw) : ORIGIN = 0x20004000, LENGTH = 0x03C000 /* 240 KiB */ -} - -/* produce a link error if there is not this amount of RAM for these sections */ -_minimum_stack_size = 40K; -_minimum_heap_size = 0; - -/* top end of the stack */ - -/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/ -_estack = ORIGIN(RAM) + LENGTH(RAM); - -/* RAM extents for the garbage collector */ -_ram_end = ORIGIN(RAM) + LENGTH(RAM); -_heap_end = 0x20020000; /* tunable */ - -INCLUDE "boards/common.ld" diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.h b/ports/nrf/boards/particle_argon/mpconfigboard.h index 1eeb7291bc..a4952fc797 100644 --- a/ports/nrf/boards/particle_argon/mpconfigboard.h +++ b/ports/nrf/boards/particle_argon/mpconfigboard.h @@ -52,12 +52,6 @@ #define SPI_FLASH_CS_PIN &pin_P0_17 #endif -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_P0_27) diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.mk b/ports/nrf/boards/particle_argon/mpconfigboard.mk index 8d3bb2a289..f8d3d2aca2 100644 --- a/ports/nrf/boards/particle_argon/mpconfigboard.mk +++ b/ports/nrf/boards/particle_argon/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0xc00c USB_PRODUCT = "Argon" USB_MANUFACTURER = "Particle" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.h b/ports/nrf/boards/particle_boron/mpconfigboard.h index af69924841..bab1b3d5cd 100644 --- a/ports/nrf/boards/particle_boron/mpconfigboard.h +++ b/ports/nrf/boards/particle_boron/mpconfigboard.h @@ -52,12 +52,6 @@ #define SPI_FLASH_CS_PIN &pin_P0_17 #endif -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_P0_27) diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.mk b/ports/nrf/boards/particle_boron/mpconfigboard.mk index 801b9613f7..eada97a730 100644 --- a/ports/nrf/boards/particle_boron/mpconfigboard.mk +++ b/ports/nrf/boards/particle_boron/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0xc00d USB_PRODUCT = "Boron" USB_MANUFACTURER = "Particle" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.h b/ports/nrf/boards/particle_xenon/mpconfigboard.h index 34ca6421e6..f0d12bb0b9 100644 --- a/ports/nrf/boards/particle_xenon/mpconfigboard.h +++ b/ports/nrf/boards/particle_xenon/mpconfigboard.h @@ -52,12 +52,6 @@ #define SPI_FLASH_CS_PIN &pin_P0_17 #endif -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -// TODO #define CIRCUITPY_INTERNAL_NVM_SIZE 8192 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) - #define BOARD_HAS_CRYSTAL 1 #define DEFAULT_I2C_BUS_SCL (&pin_P0_27) diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.mk b/ports/nrf/boards/particle_xenon/mpconfigboard.mk index 5cebc423a0..6062da378f 100644 --- a/ports/nrf/boards/particle_xenon/mpconfigboard.mk +++ b/ports/nrf/boards/particle_xenon/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0xc00e # argon is 0xc00c USB_PRODUCT = "Xenon" USB_MANUFACTURER = "Particle" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/pca10056/mpconfigboard.h b/ports/nrf/boards/pca10056/mpconfigboard.h index 5b30c7fe83..5d0d4d3a51 100644 --- a/ports/nrf/boards/pca10056/mpconfigboard.h +++ b/ports/nrf/boards/pca10056/mpconfigboard.h @@ -29,8 +29,6 @@ #define MICROPY_HW_BOARD_NAME "PCA10056 nRF52840-DK" #define MICROPY_HW_MCU_NAME "nRF52840" -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - #define MICROPY_HW_LED_STATUS (&pin_P0_13) #define DEFAULT_I2C_BUS_SCL (&pin_P0_27) diff --git a/ports/nrf/boards/pca10056/mpconfigboard.mk b/ports/nrf/boards/pca10056/mpconfigboard.mk index 723e7976e1..8fd1ef08d0 100644 --- a/ports/nrf/boards/pca10056/mpconfigboard.mk +++ b/ports/nrf/boards/pca10056/mpconfigboard.mk @@ -3,23 +3,7 @@ USB_PID = 0x802A USB_PRODUCT = "PCA10056" USB_MANUFACTURER = "Nordic Semiconductor" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 diff --git a/ports/nrf/boards/pca10059/mpconfigboard.h b/ports/nrf/boards/pca10059/mpconfigboard.h index b79d3c88f2..18aa66f16b 100644 --- a/ports/nrf/boards/pca10059/mpconfigboard.h +++ b/ports/nrf/boards/pca10059/mpconfigboard.h @@ -28,5 +28,3 @@ #define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_HW_LED_STATUS (&pin_P0_06) - -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 diff --git a/ports/nrf/boards/pca10059/mpconfigboard.mk b/ports/nrf/boards/pca10059/mpconfigboard.mk index db9d806685..3f97b08218 100644 --- a/ports/nrf/boards/pca10059/mpconfigboard.mk +++ b/ports/nrf/boards/pca10059/mpconfigboard.mk @@ -3,21 +3,6 @@ USB_PID = 0x802A USB_PRODUCT = "PCA10059" USB_MANUFACTURER = "Nordic Semiconductor" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 -BOOT_SETTING_ADDR = 0xFF000 -BOOT_FILE = boards/$(BOARD)/bootloader/$(SOFTDEV_VERSION)/$(BOARD)_bootloader_$(SOFTDEV_VERSION)_s140 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h index cc7e68864e..23cce7f8a4 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h @@ -29,8 +29,6 @@ #define MICROPY_HW_BOARD_NAME "SparkFun Pro nRF52840 Mini" #define MICROPY_HW_MCU_NAME "nRF52840" -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - #define DEFAULT_I2C_BUS_SCL (&pin_P0_11) #define DEFAULT_I2C_BUS_SDA (&pin_P0_08) diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk index 212a85d57c..f66b2eaf7a 100644 --- a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk @@ -3,22 +3,6 @@ USB_PID = 0x5289 USB_PRODUCT = "SFE_nRF52840_Mini" USB_MANUFACTURER = "SparkFun Electronics" -MCU_SERIES = m4 -MCU_VARIANT = nrf52 -MCU_SUB_VARIANT = nrf52840 MCU_CHIP = nrf52840 -SD ?= s140 -SOFTDEV_VERSION ?= 6.1.0 - -BOOT_SETTING_ADDR = 0xFF000 - -ifeq ($(SD),) - LD_FILE = boards/nrf52840_1M_256k.ld -else - LD_FILE = boards/adafruit_$(MCU_SUB_VARIANT)_$(SD_LOWER)_v$(firstword $(subst ., ,$(SOFTDEV_VERSION))).ld - CIRCUITPY_BLEIO = 1 -endif - -NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/teknikio_bluebird/board.c b/ports/nrf/boards/teknikio_bluebird/board.c new file mode 100644 index 0000000000..4421970eef --- /dev/null +++ b/ports/nrf/boards/teknikio_bluebird/board.c @@ -0,0 +1,38 @@ +/* + * 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" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/teknikio_bluebird/mpconfigboard.h b/ports/nrf/boards/teknikio_bluebird/mpconfigboard.h new file mode 100644 index 0000000000..76e772ca9b --- /dev/null +++ b/ports/nrf/boards/teknikio_bluebird/mpconfigboard.h @@ -0,0 +1,48 @@ +/* + * 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 + * + * 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. + */ + +//https://github.com/Teknikio/TKInventionBuilderFramework + + +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "Teknikio Bluebird" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_NEOPIXEL (&pin_P0_26) + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_27) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_26) + +#define DEFAULT_SPI_BUS_SCK (&pin_P1_15) +#define DEFAULT_SPI_BUS_MOSI (&pin_P1_13) +#define DEFAULT_SPI_BUS_MISO (&pin_P1_14) + +#define DEFAULT_UART_BUS_RX (&pin_P1_07) +#define DEFAULT_UART_BUS_TX (&pin_P1_08) + +#define BOARD_HAS_CRYSTAL 1 // according to the schematic we do diff --git a/ports/nrf/boards/teknikio_bluebird/mpconfigboard.mk b/ports/nrf/boards/teknikio_bluebird/mpconfigboard.mk new file mode 100644 index 0000000000..e178a82051 --- /dev/null +++ b/ports/nrf/boards/teknikio_bluebird/mpconfigboard.mk @@ -0,0 +1,8 @@ +USB_VID = 0x239A +USB_PID = 0x8070 +USB_PRODUCT = "Bluebird" +USB_MANUFACTURER = "Teknikio" + +MCU_CHIP = nrf52840 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/teknikio_bluebird/pins.c b/ports/nrf/boards/teknikio_bluebird/pins.c new file mode 100644 index 0000000000..a90dc7daa2 --- /dev/null +++ b/ports/nrf/boards/teknikio_bluebird/pins.c @@ -0,0 +1,62 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_12) }, + + { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_P0_11) }, + + { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_09) }, + + { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_08) }, + + { MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_08) }, + + { MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_07) }, + + { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P0_06) }, + + { MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_05) }, + + { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_04) }, + + { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_29) }, + + { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P0_02) }, + + { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P0_03) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P0_26) }, + + { MP_ROM_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_LIGHT_ENABLE), MP_ROM_PTR(&pin_P0_30) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_P1_15) }, + + { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_SDA), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_SCL), MP_ROM_PTR(&pin_P1_11) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); \ 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 8f67d66d20..cee40a5a0c 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -45,6 +45,7 @@ #include "shared-bindings/_bleio/__init__.h" #include "shared-bindings/_bleio/Adapter.h" #include "shared-bindings/_bleio/Address.h" +#include "shared-bindings/nvm/ByteArray.h" #include "shared-bindings/_bleio/Connection.h" #include "shared-bindings/_bleio/ScanEntry.h" #include "shared-bindings/time/__init__.h" @@ -54,6 +55,14 @@ #define BLE_SLAVE_LATENCY 0 #define BLE_CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) +const nvm_bytearray_obj_t common_hal_bleio_nvm_obj = { + .base = { + .type = &nvm_bytearray_type, + }, + .start_address = (uint8_t*) CIRCUITPY_BLE_CONFIG_START_ADDR, + .len = CIRCUITPY_BLE_CONFIG_SIZE, +}; + STATIC void softdevice_assert_handler(uint32_t id, uint32_t pc, uint32_t info) { reset_into_safe_mode(NORDIC_SOFT_DEVICE_ASSERT); } diff --git a/ports/nrf/common-hal/analogio/AnalogIn.c b/ports/nrf/common-hal/analogio/AnalogIn.c index 44ebe9b4df..3bc097019e 100644 --- a/ports/nrf/common-hal/analogio/AnalogIn.c +++ b/ports/nrf/common-hal/analogio/AnalogIn.c @@ -36,12 +36,12 @@ void analogin_init(void) { // Calibrate the ADC once, on startup. - nrf_saadc_enable(); - nrf_saadc_event_clear(NRF_SAADC_EVENT_CALIBRATEDONE); - nrf_saadc_task_trigger(NRF_SAADC_TASK_CALIBRATEOFFSET); - while (nrf_saadc_event_check(NRF_SAADC_EVENT_CALIBRATEDONE) == 0) { } - nrf_saadc_event_clear(NRF_SAADC_EVENT_CALIBRATEDONE); - nrf_saadc_disable(); + nrf_saadc_enable(NRF_SAADC); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_CALIBRATEOFFSET); + while (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE) == 0) { } + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_CALIBRATEDONE); + nrf_saadc_disable(NRF_SAADC); } void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin) { @@ -81,34 +81,33 @@ uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) { .reference = NRF_SAADC_REFERENCE_VDD4, .acq_time = NRF_SAADC_ACQTIME_3US, .mode = NRF_SAADC_MODE_SINGLE_ENDED, - .burst = NRF_SAADC_BURST_DISABLED, - .pin_p = self->pin->adc_channel, - .pin_n = self->pin->adc_channel, + .burst = NRF_SAADC_BURST_DISABLED }; - nrf_saadc_resolution_set(NRF_SAADC_RESOLUTION_14BIT); - nrf_saadc_oversample_set(NRF_SAADC_OVERSAMPLE_DISABLED); - nrf_saadc_enable(); + nrf_saadc_resolution_set(NRF_SAADC, NRF_SAADC_RESOLUTION_14BIT); + nrf_saadc_oversample_set(NRF_SAADC, NRF_SAADC_OVERSAMPLE_DISABLED); + nrf_saadc_enable(NRF_SAADC); - for (uint32_t i = 0; i < NRF_SAADC_CHANNEL_COUNT; i++) - nrf_saadc_channel_input_set(i, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); + for (uint32_t i = 0; i < SAADC_CH_NUM; i++) + nrf_saadc_channel_input_set(NRF_SAADC, i, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); - nrf_saadc_channel_init(CHANNEL_NO, &config); - nrf_saadc_buffer_init(&value, 1); + nrf_saadc_channel_init(NRF_SAADC, CHANNEL_NO, &config); + nrf_saadc_channel_input_set(NRF_SAADC, CHANNEL_NO, self->pin->adc_channel, self->pin->adc_channel); + nrf_saadc_buffer_init(NRF_SAADC, &value, 1); - nrf_saadc_task_trigger(NRF_SAADC_TASK_START); - while (nrf_saadc_event_check(NRF_SAADC_EVENT_STARTED) == 0); - nrf_saadc_event_clear(NRF_SAADC_EVENT_STARTED); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_START); + while (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STARTED) == 0); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STARTED); - nrf_saadc_task_trigger(NRF_SAADC_TASK_SAMPLE); - while (nrf_saadc_event_check(NRF_SAADC_EVENT_END) == 0); - nrf_saadc_event_clear(NRF_SAADC_EVENT_END); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); + while (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_END) == 0); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); - nrf_saadc_task_trigger(NRF_SAADC_TASK_STOP); - while (nrf_saadc_event_check(NRF_SAADC_EVENT_STOPPED) == 0); - nrf_saadc_event_clear(NRF_SAADC_EVENT_STOPPED); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_STOP); + while (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STOPPED) == 0); + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); - nrf_saadc_disable(); + nrf_saadc_disable(NRF_SAADC); if (value < 0) value = 0; diff --git a/ports/nrf/common-hal/audiopwmio/PWMAudioOut.c b/ports/nrf/common-hal/audiopwmio/PWMAudioOut.c index b4c626355f..cdb57bbe1d 100644 --- a/ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +++ b/ports/nrf/common-hal/audiopwmio/PWMAudioOut.c @@ -225,10 +225,6 @@ void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t* self, self->loop = loop; uint32_t sample_rate = audiosample_sample_rate(sample); - uint32_t max_sample_rate = 62500; - if (sample_rate > max_sample_rate) { - mp_raise_ValueError_varg(translate("Sample rate too high. It must be less than %d"), max_sample_rate); - } self->bytes_per_sample = audiosample_bits_per_sample(sample) / 8; uint32_t max_buffer_length; @@ -255,16 +251,18 @@ void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t* self, self->pwm->LOOP = 1; audiosample_reset_buffer(self->sample, false, 0); activate_audiopwmout_obj(self); + self->stopping = false; + self->pwm->SHORTS = NRF_PWM_SHORT_LOOPSDONE_SEQSTART0_MASK; fill_buffers(self, 0); self->pwm->SEQ[1].PTR = self->pwm->SEQ[0].PTR; self->pwm->SEQ[1].CNT = self->pwm->SEQ[0].CNT; self->pwm->EVENTS_SEQSTARTED[0] = 0; self->pwm->EVENTS_SEQSTARTED[1] = 0; + self->pwm->EVENTS_SEQEND[0] = 0; + self->pwm->EVENTS_SEQEND[1] = 0; self->pwm->EVENTS_STOPPED = 0; - self->pwm->SHORTS = NRF_PWM_SHORT_LOOPSDONE_SEQSTART0_MASK; self->pwm->TASKS_SEQSTART[0] = 1; self->playing = true; - self->stopping = false; self->paused = false; } diff --git a/ports/nrf/common-hal/busio/I2C.c b/ports/nrf/common-hal/busio/I2C.c index 8a2ebde3bd..7a079ff7f4 100644 --- a/ports/nrf/common-hal/busio/I2C.c +++ b/ports/nrf/common-hal/busio/I2C.c @@ -133,9 +133,8 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, const mcu_pin_obj_t * mp_raise_RuntimeError(translate("SDA or SCL needs a pull up")); } - nrfx_twim_config_t config = NRFX_TWIM_DEFAULT_CONFIG; - config.scl = scl->number; - config.sda = sda->number; + nrfx_twim_config_t config = NRFX_TWIM_DEFAULT_CONFIG(scl->number, sda->number); + // change freq. only if it's less than the default 400K if (frequency < 100000) { config.frequency = NRF_TWIM_FREQ_100K; @@ -248,8 +247,10 @@ uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t addr, const u // break into MAX_XFER_LEN transaction while ( len ) { const size_t xact_len = MIN(len, I2C_MAX_XFER_LEN); + nrfx_twim_xfer_desc_t xfer_desc = NRFX_TWIM_XFER_DESC_TX(addr, (uint8_t*) data, xact_len); + uint32_t const flags = (stopBit ? 0 : NRFX_TWIM_FLAG_TX_NO_STOP); - if ( NRFX_SUCCESS != (err = nrfx_twim_tx(&self->twim_peripheral->twim, addr, data, xact_len, !stopBit)) ) { + if ( NRFX_SUCCESS != (err = nrfx_twim_xfer(&self->twim_peripheral->twim, &xfer_desc, flags)) ) { break; } @@ -274,8 +275,9 @@ uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t addr, uint8_t // break into MAX_XFER_LEN transaction while ( len ) { const size_t xact_len = MIN(len, I2C_MAX_XFER_LEN); + nrfx_twim_xfer_desc_t xfer_desc = NRFX_TWIM_XFER_DESC_RX(addr, data, xact_len); - if ( NRFX_SUCCESS != (err = nrfx_twim_rx(&self->twim_peripheral->twim, addr, data, xact_len)) ) { + if ( NRFX_SUCCESS != (err = nrfx_twim_xfer(&self->twim_peripheral->twim, &xfer_desc, 0)) ) { break; } diff --git a/ports/nrf/common-hal/busio/SPI.c b/ports/nrf/common-hal/busio/SPI.c index 5f1aac1934..d2977909e1 100644 --- a/ports/nrf/common-hal/busio/SPI.c +++ b/ports/nrf/common-hal/busio/SPI.c @@ -135,7 +135,8 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, const mcu_pin_obj_t * mp_raise_ValueError(translate("All SPI peripherals are in use")); } - nrfx_spim_config_t config = NRFX_SPIM_DEFAULT_CONFIG; + nrfx_spim_config_t config = NRFX_SPIM_DEFAULT_CONFIG(NRFX_SPIM_PIN_NOT_USED, NRFX_SPIM_PIN_NOT_USED, + NRFX_SPIM_PIN_NOT_USED, NRFX_SPIM_PIN_NOT_USED); config.frequency = NRF_SPIM_FREQ_8M; config.sck_pin = clock->number; diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 9cdc197e7c..0579db4142 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -163,10 +163,12 @@ void common_hal_busio_uart_construct (busio_uart_obj_t *self, .pselcts = NRF_UARTE_PSEL_DISCONNECTED, .pselrts = NRF_UARTE_PSEL_DISCONNECTED, .p_context = self, - .hwfc = NRF_UARTE_HWFC_DISABLED, - .parity = (parity == PARITY_NONE) ? NRF_UARTE_PARITY_EXCLUDED : NRF_UARTE_PARITY_INCLUDED, .baudrate = get_nrf_baud(baudrate), - .interrupt_priority = 7 + .interrupt_priority = 7, + .hal_cfg = { + .hwfc = NRF_UARTE_HWFC_DISABLED, + .parity = (parity == PARITY_NONE) ? NRF_UARTE_PARITY_EXCLUDED : NRF_UARTE_PARITY_INCLUDED + } }; nrfx_uarte_uninit(self->uarte); diff --git a/ports/nrf/common-hal/microcontroller/Processor.c b/ports/nrf/common-hal/microcontroller/Processor.c index abfd5b8656..03d9c4d3f0 100644 --- a/ports/nrf/common-hal/microcontroller/Processor.c +++ b/ports/nrf/common-hal/microcontroller/Processor.c @@ -75,35 +75,34 @@ float common_hal_mcu_processor_get_voltage(void) { .reference = NRF_SAADC_REFERENCE_INTERNAL, .acq_time = NRF_SAADC_ACQTIME_10US, .mode = NRF_SAADC_MODE_SINGLE_ENDED, - .burst = NRF_SAADC_BURST_DISABLED, - .pin_p = NRF_SAADC_INPUT_VDD, - .pin_n = NRF_SAADC_INPUT_VDD, + .burst = NRF_SAADC_BURST_DISABLED }; - nrf_saadc_resolution_set(NRF_SAADC_RESOLUTION_14BIT); - nrf_saadc_oversample_set(NRF_SAADC_OVERSAMPLE_DISABLED); - nrf_saadc_enable(); + nrf_saadc_resolution_set(NRF_SAADC, NRF_SAADC_RESOLUTION_14BIT); + nrf_saadc_oversample_set(NRF_SAADC, NRF_SAADC_OVERSAMPLE_DISABLED); + nrf_saadc_enable(NRF_SAADC); - for (uint32_t i = 0; i < NRF_SAADC_CHANNEL_COUNT; i++) { - nrf_saadc_channel_input_set(i, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); + for (uint32_t i = 0; i < SAADC_CH_NUM; i++) { + nrf_saadc_channel_input_set(NRF_SAADC, i, NRF_SAADC_INPUT_DISABLED, NRF_SAADC_INPUT_DISABLED); } - nrf_saadc_channel_init(0, &config); - nrf_saadc_buffer_init(&value, 1); + nrf_saadc_channel_init(NRF_SAADC, 0, &config); + nrf_saadc_channel_input_set(NRF_SAADC, 0, NRF_SAADC_INPUT_VDD, NRF_SAADC_INPUT_VDD); + nrf_saadc_buffer_init(NRF_SAADC, &value, 1); - nrf_saadc_task_trigger(NRF_SAADC_TASK_START); - while (nrf_saadc_event_check(NRF_SAADC_EVENT_STARTED) == 0) { } - nrf_saadc_event_clear(NRF_SAADC_EVENT_STARTED); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_START); + while (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STARTED) == 0) { } + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STARTED); - nrf_saadc_task_trigger(NRF_SAADC_TASK_SAMPLE); - while (nrf_saadc_event_check(NRF_SAADC_EVENT_END) == 0) { } - nrf_saadc_event_clear(NRF_SAADC_EVENT_END); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_SAMPLE); + while (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_END) == 0) { } + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_END); - nrf_saadc_task_trigger(NRF_SAADC_TASK_STOP); - while (nrf_saadc_event_check(NRF_SAADC_EVENT_STOPPED) == 0) { } - nrf_saadc_event_clear(NRF_SAADC_EVENT_STOPPED); + nrf_saadc_task_trigger(NRF_SAADC, NRF_SAADC_TASK_STOP); + while (nrf_saadc_event_check(NRF_SAADC, NRF_SAADC_EVENT_STOPPED) == 0) { } + nrf_saadc_event_clear(NRF_SAADC, NRF_SAADC_EVENT_STOPPED); - nrf_saadc_disable(); + nrf_saadc_disable(NRF_SAADC); if (value < 0) { value = 0; diff --git a/ports/nrf/common-hal/microcontroller/__init__.c b/ports/nrf/common-hal/microcontroller/__init__.c index a6b1c4ba3b..de924566c8 100644 --- a/ports/nrf/common-hal/microcontroller/__init__.c +++ b/ports/nrf/common-hal/microcontroller/__init__.c @@ -76,11 +76,14 @@ const mcu_processor_obj_t common_hal_mcu_processor_obj = { }; #if CIRCUITPY_INTERNAL_NVM_SIZE > 0 + // The singleton nvm.ByteArray object. const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = { .base = { .type = &nvm_bytearray_type, }, + .start_address = (uint8_t*) CIRCUITPY_INTERNAL_NVM_START_ADDR, + .len = CIRCUITPY_INTERNAL_NVM_SIZE, }; #endif diff --git a/ports/nrf/common-hal/nvm/ByteArray.c b/ports/nrf/common-hal/nvm/ByteArray.c index ee270f79bb..7d733ce7be 100644 --- a/ports/nrf/common-hal/nvm/ByteArray.c +++ b/ports/nrf/common-hal/nvm/ByteArray.c @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#include "py/runtime.h" #include "common-hal/nvm/ByteArray.h" #include @@ -31,35 +32,32 @@ #include "peripherals/nrf/nvm.h" -// defined in linker -extern uint32_t __fatfs_flash_start_addr[]; -extern uint32_t __fatfs_flash_length[]; - -#define NVM_START_ADDR ((uint32_t)__fatfs_flash_start_addr + \ - (uint32_t)__fatfs_flash_length - CIRCUITPY_INTERNAL_NVM_SIZE) - uint32_t common_hal_nvm_bytearray_get_length(nvm_bytearray_obj_t *self) { - return CIRCUITPY_INTERNAL_NVM_SIZE; + return self->len; } static void 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 + // 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) { - nrf_nvm_safe_flash_page_write(page_addr, bytes); + status = 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); - nrf_nvm_safe_flash_page_write(page_addr, buffer); + status = nrf_nvm_safe_flash_page_write(page_addr, buffer); + } + if (!status) { + mp_raise_OSError_msg(translate("Flash write failed")); } } bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self, uint32_t start_index, uint8_t* values, uint32_t len) { - uint32_t address = NVM_START_ADDR + start_index; + uint32_t address = (uint32_t) self->start_address + start_index; uint32_t offset = address % FLASH_PAGE_SIZE; uint32_t page_addr = address - offset; @@ -76,5 +74,5 @@ bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self, void common_hal_nvm_bytearray_get_bytes(nvm_bytearray_obj_t *self, uint32_t start_index, uint32_t len, uint8_t* values) { - memcpy(values, (uint8_t *)(NVM_START_ADDR + start_index), len); + memcpy(values, self->start_address + start_index, len); } diff --git a/ports/nrf/common-hal/nvm/ByteArray.h b/ports/nrf/common-hal/nvm/ByteArray.h index a8d09dd43a..c048d55778 100644 --- a/ports/nrf/common-hal/nvm/ByteArray.h +++ b/ports/nrf/common-hal/nvm/ByteArray.h @@ -31,6 +31,8 @@ typedef struct { mp_obj_base_t base; + uint8_t* start_address; + uint32_t len; } nvm_bytearray_obj_t; #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_NVM_BYTEARRAY_H diff --git a/ports/nrf/common-hal/os/__init__.c b/ports/nrf/common-hal/os/__init__.c index 7671cc2a51..e38226f94e 100644 --- a/ports/nrf/common-hal/os/__init__.c +++ b/ports/nrf/common-hal/os/__init__.c @@ -70,17 +70,17 @@ bool common_hal_os_urandom(uint8_t *buffer, uint32_t length) { return NRF_SUCCESS == sd_rand_application_vector_get(buffer, length); #endif - nrf_rng_event_clear(NRF_RNG_EVENT_VALRDY); - nrf_rng_task_trigger(NRF_RNG_TASK_START); + nrf_rng_event_clear(NRF_RNG, NRF_RNG_EVENT_VALRDY); + nrf_rng_task_trigger(NRF_RNG, NRF_RNG_TASK_START); for (uint32_t i = 0; i < length; i++) { - while (nrf_rng_event_get(NRF_RNG_EVENT_VALRDY) == 0); - nrf_rng_event_clear(NRF_RNG_EVENT_VALRDY); + while (nrf_rng_event_check(NRF_RNG, NRF_RNG_EVENT_VALRDY) == 0); + nrf_rng_event_clear(NRF_RNG, NRF_RNG_EVENT_VALRDY); - buffer[i] = nrf_rng_random_value_get(); + buffer[i] = nrf_rng_random_value_get(NRF_RNG); } - nrf_rng_task_trigger(NRF_RNG_TASK_STOP); + nrf_rng_task_trigger(NRF_RNG, NRF_RNG_TASK_STOP); return true; } diff --git a/ports/nrf/common-hal/pulseio/PulseIn.c b/ports/nrf/common-hal/pulseio/PulseIn.c index 3839668314..b47cc6273b 100644 --- a/ports/nrf/common-hal/pulseio/PulseIn.c +++ b/ports/nrf/common-hal/pulseio/PulseIn.c @@ -112,7 +112,7 @@ void pulsein_reset(void) { if ( nrfx_gpiote_is_init() ) { nrfx_gpiote_uninit(); } - nrfx_gpiote_init(); + nrfx_gpiote_init(NRFX_GPIOTE_CONFIG_IRQ_PRIORITY); memset(_objs, 0, sizeof(_objs)); } diff --git a/ports/nrf/common-hal/rtc/RTC.c b/ports/nrf/common-hal/rtc/RTC.c index 57138350c9..a8ea366887 100644 --- a/ports/nrf/common-hal/rtc/RTC.c +++ b/ports/nrf/common-hal/rtc/RTC.c @@ -59,8 +59,8 @@ void rtc_handler(nrfx_rtc_int_type_t int_type) { } void rtc_init(void) { - if (!nrf_clock_lf_is_running()) { - nrf_clock_task_trigger(NRF_CLOCK_TASK_LFCLKSTART); + if (!nrf_clock_lf_is_running(NRF_CLOCK)) { + nrf_clock_task_trigger(NRF_CLOCK, NRF_CLOCK_TASK_LFCLKSTART); } nrfx_rtc_counter_clear(&rtc_instance); nrfx_rtc_init(&rtc_instance, &rtc_config, rtc_handler); diff --git a/ports/nrf/ld_defines.c b/ports/nrf/ld_defines.c new file mode 100644 index 0000000000..0ec6dfdb5d --- /dev/null +++ b/ports/nrf/ld_defines.c @@ -0,0 +1,39 @@ +// Fake source file used only to capture #define values for use in ld template files. +#include "mpconfigport.h" + +// For each value needed in the LD file, create a C-like line: +// /*NAME_OF_VALUE=*/ NAME_OF_VALUE; +// The C preprocessor will replace NAME_OF_VALUE with the actual value. +// This will be post-processed by tools/gen_ld_files.py to extract the name and value. + +// The next line is a marker to start looking for definitions. Lines above the next line are ignored. +// START_LD_DEFINES + +/*MBR_START_ADDR=*/ MBR_START_ADDR; +/*MBR_SIZE=*/ MBR_SIZE; + +/*SD_FLASH_START_ADDR=*/ SD_FLASH_START_ADDR; +/*SD_FLASH_SIZE=*/ SD_FLASH_SIZE; + +/*ISR_START_ADDR=*/ ISR_START_ADDR; +/*ISR_SIZE=*/ ISR_SIZE; + +/*CIRCUITPY_DEFAULT_STACK_SIZE=*/ CIRCUITPY_DEFAULT_STACK_SIZE; + +/*CIRCUITPY_FIRMWARE_START_ADDR=*/ CIRCUITPY_FIRMWARE_START_ADDR; +/*CIRCUITPY_FIRMWARE_SIZE=*/ CIRCUITPY_FIRMWARE_SIZE; + +/*CIRCUITPY_BLE_CONFIG_START_ADDR=*/ CIRCUITPY_BLE_CONFIG_START_ADDR; +/*CIRCUITPY_BLE_CONFIG_SIZE=*/ CIRCUITPY_BLE_CONFIG_SIZE; + +/*CIRCUITPY_INTERNAL_NVM_START_ADDR=*/ CIRCUITPY_INTERNAL_NVM_START_ADDR; +/*CIRCUITPY_INTERNAL_NVM_SIZE=*/ CIRCUITPY_INTERNAL_NVM_SIZE; + +/*CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR=*/ CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR; +/*CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE=*/ CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE; + +/*BOOTLOADER_START_ADDR=*/ BOOTLOADER_START_ADDR; +/*BOOTLOADER_SIZE=*/ BOOTLOADER_SIZE; + +/*BOOTLOADER_SETTINGS_START_ADDR=*/ BOOTLOADER_SETTINGS_START_ADDR; +/*BOOTLOADER_SETTINGS_SIZE=*/ BOOTLOADER_SETTINGS_SIZE; diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index bbe6419a5f..cb25870dc0 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -30,8 +30,13 @@ #include "ble_drv.h" +#include "nrf_mbr.h" // for MBR_SIZE +#include "nrf_sdm.h" // for SD_FLASH_SIZE +#include "peripherals/nrf/nvm.h" // for FLASH_PAGE_SIZE + #ifdef NRF52840 #define MICROPY_PY_SYS_PLATFORM "nRF52840" +#define FLASH_SIZE (0x100000) // 1MiB #endif #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) @@ -42,26 +47,113 @@ #define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_UJSON (1) -// TODO this is old BLE stuff -#if BLUETOOTH_SD - #define MICROPY_PY_BLEIO (1) - #define MICROPY_PY_BLE_NUS (0) -#else - #ifndef MICROPY_PY_BLEIO - #define MICROPY_PY_BLEIO (0) - #endif -#endif - // 24kiB stack #define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000 +//////////////////////////////////////////////////////////////////////////////////////////////////// + +// This also includes mpconfigboard.h. #include "py/circuitpy_mpconfig.h" +// Definitions that might be overriden by mpconfigboard.h + +#ifndef CIRCUITPY_INTERNAL_NVM_SIZE +#define CIRCUITPY_INTERNAL_NVM_SIZE (8192) +#endif + #ifndef BOARD_HAS_32KHZ_XTAL // Assume crystal is present, which is the most common case. #define BOARD_HAS_32KHZ_XTAL (1) #endif +#if INTERNAL_FLASH_FILESYSTEM + #ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE + #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (256*1024) + #endif +#else + #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0) +#endif + +// Flash layout, starting at 0x00000000 +// +// - SoftDevice +// - ISR +// - firmware +// - BLE config (bonding info, etc.) (optional) +// - microcontroller.nvm (optional) +// - internal CIRCUITPY flash filesystem (optional) +// The flash filesystem is adjacent to the bootloader, so that its location will not change even if +// other regions change in size. +// - bootloader (note the MBR at 0x0 redirects to the bootloader here, in high flash) +// - bootloader settings + +// Define these regions starting up from the bottom of flash: + +#define MBR_START_ADDR (0x0) +// MBR_SIZE is from nrf_mbr.h +#define SD_FLASH_START_ADDR (MBR_START_ADDR + MBR_SIZE) + +// SD_FLASH_SIZE is from nrf_sdm.h +#define ISR_START_ADDR (SD_FLASH_START_ADDR + SD_FLASH_SIZE) +#define ISR_SIZE (0x1000) // 4kiB + +#define CIRCUITPY_FIRMWARE_START_ADDR (ISR_START_ADDR + ISR_SIZE) + +// Define these regions starting down from the bootloader: + +// Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld +#define BOOTLOADER_START_ADDR (0x000F4000) +#define BOOTLOADER_SIZE (0xA000) // 40kiB +#define BOOTLOADER_SETTINGS_START_ADDR (0x000FF000) +#define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB + +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE) + +#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE > 0 && CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR != (BOOTLOADER_START_ADDR - 256*1024) +#warning Internal flash filesystem location has moved! +#endif + +#define CIRCUITPY_INTERNAL_NVM_START_ADDR (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE) + +// 32kiB for bonding, etc. +#define CIRCUITPY_BLE_CONFIG_SIZE (32*1024) +#define CIRCUITPY_BLE_CONFIG_START_ADDR (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_BLE_CONFIG_SIZE) + +// The firmware space is the space left over between the fixed lower and upper regions. +#define CIRCUITPY_FIRMWARE_SIZE (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR) + +#if BOOTLOADER_START_ADDR % FLASH_PAGE_SIZE != 0 +#error BOOTLOADER_START_ADDR must be on a flash page boundary. +#endif + +#if CIRCUITPY_INTERNAL_NVM_START_ADDR % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_NVM_START_ADDR must be on a flash page boundary. +#endif +#if CIRCUITPY_INTERNAL_NVM_SIZE % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_NVM_SIZE must be a multiple of FLASH_PAGE_SIZE. +#endif + +#if CIRCUITPY_BLE_CONFIG_START_ADDR % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_BLE_CONFIG_SIZE must be on a flash page boundary. +#endif +#if CIRCUITPY_BLE_CONFIG_SIZE % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_BLE_CONFIG_SIZE must be a multiple of FLASH_PAGE_SIZE. +#endif + +#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE must be on a flash page boundary. +#endif +#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE % FLASH_PAGE_SIZE != 0 +#error CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE must be a multiple of FLASH_PAGE_SIZE. +#endif + +#if CIRCUITPY_FIRMWARE_SIZE < 0 +#error No space left in flash for firmware after specifying other regions! +#endif + + + + #define MICROPY_PORT_ROOT_POINTERS \ CIRCUITPY_COMMON_ROOT_POINTERS \ ble_drv_evt_handler_entry_t* ble_drv_evt_handler_entries; \ diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index f61d9f8eae..9b738d4b3a 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -1,3 +1,7 @@ +# All linking can be done with this common templated linker script, which has +# parameters that vary based on chip and/or board. +LD_TEMPLATE_FILE = boards/common.template.ld + # 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. @@ -17,8 +21,13 @@ endif CIRCUITPY_AUDIOIO = 0 + # The ifndef's allow overriding in mpconfigboard.mk. +ifndef +CIRCUITPY_BLEIO = 1 +endif + ifndef CIRCUITPY_AUDIOMIXER CIRCUITPY_AUDIOMIXER = 1 endif @@ -42,7 +51,22 @@ endif # frequencyio not yet implemented CIRCUITPY_FREQUENCYIO = 0 +# nRF52840-specific + +ifeq ($(MCU_CHIP),nrf52840) +MCU_SERIES = m4 +MCU_VARIANT = nrf52 +MCU_SUB_VARIANT = nrf52840 + +SD ?= s140 +SOFTDEV_VERSION ?= 6.1.0 + +BOOT_SETTING_ADDR = 0xFF000 +NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 + # CircuitPython doesn't yet support NFC so force the NFC antenna pins to be GPIO. # See https://github.com/adafruit/circuitpython/issues/1300 # Defined here because system_nrf52840.c doesn't #include any of our own include files. CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS + +endif diff --git a/ports/nrf/nrfx b/ports/nrf/nrfx index 3d268263be..3f55e49eb1 160000 --- a/ports/nrf/nrfx +++ b/ports/nrf/nrfx @@ -1 +1 @@ -Subproject commit 3d268263be2390ab760f75a3da72689ef13031a4 +Subproject commit 3f55e49eb11e6db0da1da09e189bb094222702c9 diff --git a/ports/nrf/nrfx_config.h b/ports/nrf/nrfx_config.h index cafec6aa1d..82f6514dfa 100644 --- a/ports/nrf/nrfx_config.h +++ b/ports/nrf/nrfx_config.h @@ -3,7 +3,7 @@ // Power #define NRFX_POWER_ENABLED 1 -#define NRFX_POWER_CONFIG_IRQ_PRIORITY 7 +#define NRFX_POWER_DEFAULT_CONFIG_IRQ_PRIORITY 7 // NOTE: THIS WORKAROUND CAUSES BLE CODE TO CRASH. // It doesn't work with the SoftDevice. @@ -116,4 +116,7 @@ #define NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 1 #define NRFX_GPIOTE_CONFIG_IRQ_PRIORITY 7 +// NVM controller +#define NRFX_NVMC_ENABLED 1 + #endif // NRFX_CONFIG_H__ diff --git a/ports/nrf/peripherals/nrf/nrf52840/power.c b/ports/nrf/peripherals/nrf/nrf52840/power.c index 9f7a9fa17a..794872c5d9 100644 --- a/ports/nrf/peripherals/nrf/nrf52840/power.c +++ b/ports/nrf/peripherals/nrf/nrf52840/power.c @@ -25,7 +25,7 @@ */ #include "nrfx.h" -#include "nrf_nvmc.h" +#include "nrfx_nvmc.h" void nrf_peripherals_power_init(void) { // Set GPIO reference voltage to 3.3V if it isn't already. REGOUT0 will get reset to 0xfffffff @@ -33,7 +33,7 @@ void nrf_peripherals_power_init(void) { // This matters only when "high voltage mode" is enabled, which is true on the PCA10059, // and might be true on other boards. if (NRF_UICR->REGOUT0 == 0xffffffff) { - nrf_nvmc_write_word((uint32_t) &NRF_UICR->REGOUT0, UICR_REGOUT0_VOUT_3V3 << UICR_REGOUT0_VOUT_Pos); + nrfx_nvmc_word_write((uint32_t) &NRF_UICR->REGOUT0, UICR_REGOUT0_VOUT_3V3 << UICR_REGOUT0_VOUT_Pos); // Must reset to make enable change. NVIC_SystemReset(); } diff --git a/ports/nrf/peripherals/nrf/nvm.c b/ports/nrf/peripherals/nrf/nvm.c index d8fddc4dcf..1501ccfc98 100644 --- a/ports/nrf/peripherals/nrf/nvm.c +++ b/ports/nrf/peripherals/nrf/nvm.c @@ -30,7 +30,7 @@ #include #include -#include "nrf_nvmc.h" +#include "nrfx_nvmc.h" #define FLASH_PAGE_SIZE (4096) @@ -50,7 +50,7 @@ STATIC sd_flash_operation_status_t sd_flash_operation_wait_until_done(void) { } #endif -void nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data) { +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); @@ -61,11 +61,11 @@ void nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data) { sd_flash_operation_start(); err_code = sd_flash_page_erase(page_addr / FLASH_PAGE_SIZE); if (err_code != NRF_SUCCESS) { - mp_raise_OSError_msg_varg(translate("Flash erase failed to start, err 0x%04x"), err_code); + return false; } status = sd_flash_operation_wait_until_done(); if (status == SD_FLASH_OPERATION_ERROR) { - mp_raise_OSError_msg(translate("Flash erase failed")); + return false; } // Divide a full page into parts, because writing a full page causes an assertion failure. @@ -78,18 +78,19 @@ void nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data) { (uint32_t *)data + i * words_to_write, words_to_write); if (err_code != NRF_SUCCESS) { - mp_raise_OSError_msg_varg(translate("Flash write failed to start, err 0x%04x"), err_code); + return false; } status = sd_flash_operation_wait_until_done(); if (status == SD_FLASH_OPERATION_ERROR) { - mp_raise_OSError_msg(translate("Flash write failed")); + return false; } } - return; + return true; } #endif - nrf_nvmc_page_erase(page_addr); - nrf_nvmc_write_bytes(page_addr, data, FLASH_PAGE_SIZE); -} + nrfx_nvmc_page_erase(page_addr); + nrfx_nvmc_bytes_write(page_addr, data, FLASH_PAGE_SIZE); + return true; +} diff --git a/ports/nrf/peripherals/nrf/nvm.h b/ports/nrf/peripherals/nrf/nvm.h index 4eac3d7283..e54e953dfc 100644 --- a/ports/nrf/peripherals/nrf/nvm.h +++ b/ports/nrf/peripherals/nrf/nvm.h @@ -27,8 +27,4 @@ #define FLASH_PAGE_SIZE (4096) -#ifndef CIRCUITPY_INTERNAL_NVM_SIZE -#define CIRCUITPY_INTERNAL_NVM_SIZE (0) -#endif - -void nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data); +bool nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data); diff --git a/ports/nrf/supervisor/internal_flash.c b/ports/nrf/supervisor/internal_flash.c index dcacd4d27f..a44f047ff6 100644 --- a/ports/nrf/supervisor/internal_flash.c +++ b/ports/nrf/supervisor/internal_flash.c @@ -34,6 +34,7 @@ #include "py/obj.h" #include "py/runtime.h" #include "lib/oofatfs/ff.h" +#include "supervisor/shared/safe_mode.h" #include "peripherals/nrf/nvm.h" @@ -42,10 +43,6 @@ #include "nrf_sdm.h" #endif -// defined in linker -extern uint32_t __fatfs_flash_start_addr[]; -extern uint32_t __fatfs_flash_length[]; - #define NO_CACHE 0xffffffff uint8_t _flash_cache[FLASH_PAGE_SIZE] __attribute__((aligned(4))); @@ -56,7 +53,7 @@ uint32_t _flash_page_addr = NO_CACHE; /* Internal Flash API *------------------------------------------------------------------*/ 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; } void supervisor_flash_init(void) { @@ -67,7 +64,7 @@ uint32_t supervisor_flash_get_block_size(void) { } uint32_t supervisor_flash_get_block_count(void) { - return ((uint32_t) __fatfs_flash_length - CIRCUITPY_INTERNAL_NVM_SIZE) / FILESYSTEM_BLOCK_SIZE ; + return CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE / FILESYSTEM_BLOCK_SIZE ; } void supervisor_flash_flush(void) { @@ -75,7 +72,9 @@ void supervisor_flash_flush(void) { // Skip if data is the same if (memcmp(_flash_cache, (void *)_flash_page_addr, FLASH_PAGE_SIZE) != 0) { - nrf_nvm_safe_flash_page_write(_flash_page_addr, _flash_cache); + if (!nrf_nvm_safe_flash_page_write(_flash_page_addr, _flash_cache)) { + reset_into_safe_mode(FLASH_WRITE_FAIL); + } } } @@ -120,4 +119,3 @@ mp_uint_t supervisor_flash_write_blocks(const uint8_t *src, uint32_t lba, uint32 void supervisor_flash_release_cache(void) { } - diff --git a/ports/nrf/supervisor/serial.c b/ports/nrf/supervisor/serial.c index 6fd89eb3ea..b19e9267cc 100644 --- a/ports/nrf/supervisor/serial.c +++ b/ports/nrf/supervisor/serial.c @@ -28,15 +28,15 @@ #include "supervisor/serial.h" -#if (MICROPY_PY_BLE_NUS == 1) +#if CIRCUITPY_SERIAL_BLE #include "ble_uart.h" -#else +#elif CIRCUITPY_SERIAL_UART #include #include "nrf_gpio.h" #include "nrfx_uarte.h" #endif -#if (MICROPY_PY_BLE_NUS == 1) +#if CIRCUITPY_SERIAL_BLE void serial_init(void) { ble_uart_init(); @@ -58,7 +58,7 @@ void serial_write(const char *text) { ble_uart_stdout_tx_str(text); } -#elif !defined(NRF52840_XXAA) +#elif CIRCUITPY_SERIAL_UART uint8_t serial_received_char; nrfx_uarte_t serial_instance = NRFX_UARTE_INSTANCE(0); @@ -124,4 +124,4 @@ void serial_write_substring(const char *text, uint32_t len) { } } -#endif +#endif // CIRCUITPY_SERIAL_UART diff --git a/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h b/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h index dc88f695a9..a1d83a25af 100644 --- a/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h +++ b/ports/stm32f4/boards/feather_stm32f405_express/mpconfigboard.h @@ -32,9 +32,6 @@ #define FLASH_SIZE (0x100000) #define FLASH_PAGE_SIZE (0x4000) -#define AUTORESET_DELAY_MS 500 -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000) - #define MICROPY_HW_NEOPIXEL (&pin_PC00) // On-board flash diff --git a/ports/stm32f4/boards/feather_stm32f405_express/pins.c b/ports/stm32f4/boards/feather_stm32f405_express/pins.c index 180fdd0937..ebc8fa337e 100644 --- a/ports/stm32f4/boards/feather_stm32f405_express/pins.c +++ b/ports/stm32f4/boards/feather_stm32f405_express/pins.c @@ -7,6 +7,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PC04) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC05) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC07) }, { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC06) }, diff --git a/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h b/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h index 9d8f72f77c..7093442d09 100644 --- a/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h +++ b/ports/stm32f4/boards/pyboard_v11/mpconfigboard.h @@ -32,8 +32,6 @@ #define FLASH_SIZE (0x100000) #define FLASH_PAGE_SIZE (0x4000) -#define AUTORESET_DELAY_MS 500 -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000) #define DEFAULT_I2C_BUS_SCL (&pin_PB06) #define DEFAULT_I2C_BUS_SDA (&pin_PB07) diff --git a/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h b/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h index b8e374f05b..05e2a384a1 100644 --- a/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h +++ b/ports/stm32f4/boards/stm32f411ce_blackpill/mpconfigboard.h @@ -33,7 +33,7 @@ #define FLASH_PAGE_SIZE (0x4000) #define BOARD_OSC_DIV 25 -#define BOARD_NO_VBUS +#define BOARD_NO_VBUS_SENSE // On-board flash // #define SPI_FLASH_MOSI_PIN (&pin_PA07) diff --git a/ports/stm32f4/boards/stm32f411ve_discovery/mpconfigboard.h b/ports/stm32f4/boards/stm32f411ve_discovery/mpconfigboard.h index 0c6f537f87..7a53354078 100644 --- a/ports/stm32f4/boards/stm32f411ve_discovery/mpconfigboard.h +++ b/ports/stm32f4/boards/stm32f411ve_discovery/mpconfigboard.h @@ -33,9 +33,3 @@ #define FLASH_PAGE_SIZE (0x4000) //16K #define BOARD_OSC_DIV 8 - -#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 - -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000) - -#define AUTORESET_DELAY_MS 500 diff --git a/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h b/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h index 45505dee28..3ab9a55853 100644 --- a/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h +++ b/ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h @@ -32,8 +32,5 @@ #define FLASH_SIZE (0x100000) #define FLASH_PAGE_SIZE (0x4000) -#define AUTORESET_DELAY_MS 500 -#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000) - #define DEFAULT_I2C_BUS_SCL (&pin_PB10) #define DEFAULT_I2C_BUS_SDA (&pin_PB09) diff --git a/ports/stm32f4/supervisor/usb.c b/ports/stm32f4/supervisor/usb.c index f2f274de5e..5733527c2a 100644 --- a/ports/stm32f4/supervisor/usb.c +++ b/ports/stm32f4/supervisor/usb.c @@ -38,7 +38,7 @@ STATIC void init_usb_vbus_sense(void) { -#ifdef BOARD_NO_VBUS +#ifdef BOARD_NO_VBUS_SENSE // Disable VBUS sensing #ifdef USB_OTG_GCCFG_VBDEN USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBDEN; diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 446620d27b..8dd4fc6b16 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -297,7 +297,6 @@ $(filter $(SRC_PATTERNS), \ fontio/Glyph.c \ microcontroller/RunMode.c \ math/__init__.c \ - supervisor/__init__.c \ ) SRC_BINDINGS_ENUMS += \ @@ -428,6 +427,18 @@ $(addprefix lib/,\ ) endif +ifdef LD_TEMPLATE_FILE +# Generate a linker script (.ld file) from a template, for those builds that use it. +GENERATED_LD_FILE = $(BUILD)/$(notdir $(patsubst %.template.ld,%.ld,$(LD_TEMPLATE_FILE))) +# +# ld_defines.pp is generated from ld_defines.c. See py/mkrules.mk. +# Run gen_ld_files.py over ALL *.template.ld files, not just LD_TEMPLATE_FILE, +# because it may include other template files. +$(GENERATED_LD_FILE): $(BUILD)/ld_defines.pp boards/*.template.ld + $(STEPECHO) "GEN $@" + $(Q)$(PYTHON3) $(TOP)/tools/gen_ld_files.py --defines $< --out_dir $(BUILD) boards/*.template.ld +endif + .PHONY: check-release-needs-clean-build check-release-needs-clean-build: diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 5ee5d52c07..932d4f855f 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -140,7 +140,6 @@ #define MICROPY_VFS_FAT (MICROPY_VFS) #define MICROPY_READER_VFS (MICROPY_VFS) - // type definitions for the specific machine #define BYTES_PER_WORD (4) @@ -168,13 +167,15 @@ typedef long mp_off_t; #define mp_import_stat mp_vfs_import_stat #define mp_builtin_open_obj mp_vfs_open_obj + // extra built in names to add to the global namespace #define MICROPY_PORT_BUILTINS \ { MP_OBJ_NEW_QSTR(MP_QSTR_help), (mp_obj_t)&mp_builtin_help_obj }, \ { MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \ { MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj }, -// board specific definitions +////////////////////////////////////////////////////////////////////////////////////////////////// +// board-specific definitions, which control and may override definitions below. #include "mpconfigboard.h" // CIRCUITPY_FULL_BUILD is defined in a *.mk file. @@ -192,7 +193,9 @@ typedef long mp_off_t; #define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD) // Opposite setting is deliberate. #define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD) +#ifndef MICROPY_PY_URE #define MICROPY_PY_URE (CIRCUITPY_FULL_BUILD) +#endif #define MICROPY_PY_URE_MATCH_GROUPS (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_URE_MATCH_SPAN_START_END (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_URE_SUB (CIRCUITPY_FULL_BUILD) @@ -213,6 +216,9 @@ typedef long mp_off_t; #define MP_SSIZE_MAX (0x7fffffff) #endif +#if INTERNAL_FLASH_FILESYSTEM == 0 && QSPI_FLASH_FILESYSTEM == 0 && SPI_FLASH_FILESYSTEM == 0 && !CIRCUITPY_MINIMAL_BUILD +#error No *_FLASH_FILESYSTEM set! +#endif // These CIRCUITPY_xxx values should all be defined in the *.mk files as being on or off. // So if any are not defined in *.mk, they'll throw an error here. @@ -670,8 +676,15 @@ void supervisor_run_background_tasks_if_tick(void); #define MICROPY_VM_HOOK_LOOP RUN_BACKGROUND_TASKS; #define MICROPY_VM_HOOK_RETURN RUN_BACKGROUND_TASKS; +// CIRCUITPY_AUTORELOAD_DELAY_MS = 0 will completely disable autoreload. +#ifndef CIRCUITPY_AUTORELOAD_DELAY_MS #define CIRCUITPY_AUTORELOAD_DELAY_MS 500 +#endif + +#ifndef CIRCUITPY_FILESYSTEM_FLUSH_INTERVAL_MS #define CIRCUITPY_FILESYSTEM_FLUSH_INTERVAL_MS 1000 +#endif + #define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt" #define CIRCUITPY_VERBOSE_BLE 0 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index c614ea06a0..a464583f32 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -23,7 +23,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. - # mpconfigboard.mk files can specify: # CIRCUITPY_FULL_BUILD = 1 (which is the default) # or @@ -34,15 +33,19 @@ ifndef CIRCUITPY_FULL_BUILD ifeq ($(CIRCUITPY_SMALL_BUILD),1) CIRCUITPY_FULL_BUILD = 0 - CFLAGS += -DCIRCUITPY_FULL_BUILD=0 else CIRCUITPY_FULL_BUILD = 1 - CFLAGS += -DCIRCUITPY_FULL_BUILD=1 endif endif +CFLAGS += -DCIRCUITPY_FULL_BUILD=$(CIRCUITPY_FULL_BUILD) # Setting CIRCUITPY_MINIMAL_BUILD = 1 will disable all features # Use for for early stage or highly restricted ports +ifndef CIRCUITPY_MINIMAL_BUILD +CIRCUITPY_MINIMAL_BUILD = 0 +endif +CFLAGS += -DCIRCUITPY_MINIMAL_BUILD=$(CIRCUITPY_MINIMAL_BUILD) + ifndef CIRCUITPY_DEFAULT_BUILD ifeq ($(CIRCUITPY_MINIMAL_BUILD),1) CIRCUITPY_FULL_BUILD = 0 @@ -51,12 +54,14 @@ ifndef CIRCUITPY_DEFAULT_BUILD CIRCUITPY_DEFAULT_BUILD = 1 endif endif +CFLAGS += -DCIRCUITPY_DEFAULT_BUILD=$(CIRCUITPY_DEFAULT_BUILD) # Some features have no unique HAL component, and thus there's never # a reason to not include them. ifndef CIRCUITPY_ALWAYS_BUILD CIRCUITPY_ALWAYS_BUILD = 1 endif +CFLAGS += -DCIRCUITPY_ALWAYS_BUILD=$(CIRCUITPY_ALWAYS_BUILD) # All builtin modules are listed below, with default values (0 for off, 1 for on) @@ -298,12 +303,24 @@ CIRCUITPY_USTACK = 0 endif CFLAGS += -DCIRCUITPY_USTACK=$(CIRCUITPY_USTACK) +# Non-module conditionals ifndef CIRCUITPY_BITBANG_APA102 CIRCUITPY_BITBANG_APA102 = 0 endif CFLAGS += -DCIRCUITPY_BITBANG_APA102=$(CIRCUITPY_BITBANG_APA102) +# REPL over BLE +ifndef CIRCUITPY_SERIAL_BLE +CIRCUITPY_SERIAL_BLE = 0 +endif +CFLAGS += -DCIRCUITPY_SERIAL_BLE=$(CIRCUITPY_SERIAL_BLE) + +# REPL over UART +ifndef CIRCUITPY_SERIAL_UART +CIRCUITPY_SERIAL_UART = 0 +endif +CFLAGS += -DCIRCUITPY_SERIAL_UART=$(CIRCUITPY_SERIAL_UART) # Enabled micropython.native decorator (experimental) ifndef CIRCUITPY_ENABLE_MPY_NATIVE diff --git a/py/mpconfig.h b/py/mpconfig.h index 3ec383817e..a0d211bfaa 100755 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1440,6 +1440,15 @@ typedef double mp_float_t; #define MP_UNLIKELY(x) __builtin_expect((x), 0) #endif +// To annotate that code is unreachable +#ifndef MP_UNREACHABLE +#if defined(__GNUC__) +#define MP_UNREACHABLE __builtin_unreachable(); +#else +#define MP_UNREACHABLE for (;;); +#endif +#endif + #ifndef MP_HTOBE16 #if MP_ENDIANNESS_LITTLE # define MP_HTOBE16(x) ((uint16_t)( (((x) & 0xff) << 8) | (((x) >> 8) & 0xff) )) diff --git a/py/nlr.h b/py/nlr.h index b442aaf8a0..1b95002d3b 100644 --- a/py/nlr.h +++ b/py/nlr.h @@ -54,7 +54,14 @@ #endif #elif defined(__thumb2__) || defined(__thumb__) || defined(__arm__) #define MICROPY_NLR_THUMB (1) - #define MICROPY_NLR_NUM_REGS (10) + #if defined(__SOFTFP__) + #define MICROPY_NLR_NUM_REGS (10) + #else + // With hardware FP registers s16-s31 are callee save so in principle + // should be saved and restored by the NLR code. gcc only uses s16-s21 + // so only save/restore those as an optimisation. + #define MICROPY_NLR_NUM_REGS (10 + 6) + #endif #elif defined(__xtensa__) #define MICROPY_NLR_XTENSA (1) #define MICROPY_NLR_NUM_REGS (10) diff --git a/py/nlrthumb.c b/py/nlrthumb.c index 69d3f868af..056aa358e7 100644 --- a/py/nlrthumb.c +++ b/py/nlrthumb.c @@ -63,6 +63,11 @@ __attribute__((naked)) unsigned int nlr_push(nlr_buf_t *nlr) { "str r10, [r0, #36] \n" // store r10 into nlr_buf "str r11, [r0, #40] \n" // store r11 into nlr_buf "str r13, [r0, #44] \n" // store r13=sp into nlr_buf + #if MICROPY_NLR_NUM_REGS == 16 + "vstr d8, [r0, #48] \n" // store s16-s17 into nlr_buf + "vstr d9, [r0, #56] \n" // store s18-s19 into nlr_buf + "vstr d10, [r0, #64] \n" // store s20-s21 into nlr_buf + #endif "str lr, [r0, #8] \n" // store lr into nlr_buf #endif @@ -118,6 +123,11 @@ NORETURN void nlr_jump(void *val) { "ldr r10, [r0, #36] \n" // load r10 from nlr_buf "ldr r11, [r0, #40] \n" // load r11 from nlr_buf "ldr r13, [r0, #44] \n" // load r13=sp from nlr_buf + #if MICROPY_NLR_NUM_REGS == 16 + "vldr d8, [r0, #48] \n" // load s16-s17 from nlr_buf + "vldr d9, [r0, #56] \n" // load s18-s19 from nlr_buf + "vldr d10, [r0, #64] \n" // load s20-s21 from nlr_buf + #endif "ldr lr, [r0, #8] \n" // load lr from nlr_buf #endif "movs r0, #1 \n" // return 1, non-local return @@ -127,11 +137,7 @@ NORETURN void nlr_jump(void *val) { : // clobbered registers ); - #if defined(__GNUC__) - __builtin_unreachable(); - #else - for (;;); // needed to silence compiler warning - #endif + MP_UNREACHABLE } #endif // MICROPY_NLR_THUMB diff --git a/py/nlrx64.c b/py/nlrx64.c index 9b2b22c225..569ad84fb0 100644 --- a/py/nlrx64.c +++ b/py/nlrx64.c @@ -108,7 +108,7 @@ NORETURN void nlr_jump(void *val) { : // clobbered registers ); - for (;;); // needed to silence compiler warning + MP_UNREACHABLE } #endif // MICROPY_NLR_X64 diff --git a/py/nlrx86.c b/py/nlrx86.c index 4900a4c0d2..6fbbe44327 100644 --- a/py/nlrx86.c +++ b/py/nlrx86.c @@ -100,7 +100,7 @@ NORETURN void nlr_jump(void *val) { : // clobbered registers ); - for (;;); // needed to silence compiler warning + MP_UNREACHABLE } #endif // MICROPY_NLR_X86 diff --git a/py/nlrxtensa.c b/py/nlrxtensa.c index d66c7a9a7f..5640350043 100644 --- a/py/nlrxtensa.c +++ b/py/nlrxtensa.c @@ -77,7 +77,7 @@ NORETURN void nlr_jump(void *val) { : // clobbered registers ); - for (;;); // needed to silence compiler warning + MP_UNREACHABLE } #endif // MICROPY_NLR_XTENSA diff --git a/py/py.mk b/py/py.mk index ae9b005b6c..9031c009f6 100644 --- a/py/py.mk +++ b/py/py.mk @@ -308,7 +308,7 @@ $(HEADER_BUILD)/mpversion.h: FORCE | $(HEADER_BUILD) # build a list of registered modules for py/objmodule.c. $(HEADER_BUILD)/moduledefs.h: $(SRC_QSTR) $(QSTR_GLOBAL_DEPENDENCIES) | $(HEADER_BUILD)/mpversion.h - @$(ECHO) "GEN $@" + @$(STEPECHO) "GEN $@" $(Q)$(PYTHON) $(PY_SRC)/makemoduledefs.py --vpath="., $(TOP), $(USER_C_MODULES)" $(SRC_QSTR) > $@ SRC_QSTR += $(HEADER_BUILD)/moduledefs.h @@ -317,7 +317,7 @@ SRC_QSTR += $(HEADER_BUILD)/moduledefs.h # overall config, so they need to be caught MPCONFIGPORT_MK = $(wildcard mpconfigport.mk) -$(HEADER_BUILD)/$(TRANSLATION).mo: $(TOP)/locale/$(TRANSLATION).po +$(HEADER_BUILD)/$(TRANSLATION).mo: $(TOP)/locale/$(TRANSLATION).po | $(HEADER_BUILD) $(Q)msgfmt -o $@ $^ $(HEADER_BUILD)/qstrdefs.preprocessed.h: $(PY_QSTR_DEFS) $(QSTR_DEFS) $(QSTR_DEFS_COLLECTED) mpconfigport.h $(MPCONFIGPORT_MK) $(PY_SRC)/mpconfig.h | $(HEADER_BUILD) diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index 9772fa830d..5d3211b0c4 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -29,6 +29,7 @@ #include "py/objproperty.h" #include "py/runtime.h" +#include "shared-bindings/_bleio/__init__.h" #include "shared-bindings/_bleio/Address.h" #include "shared-bindings/_bleio/Adapter.h" @@ -185,7 +186,12 @@ STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t ADV_INTERVAL_MIN_STRING, ADV_INTERVAL_MAX_STRING); } - common_hal_bleio_adapter_start_advertising(self, args[ARG_connectable].u_bool, interval, + bool connectable = args[ARG_connectable].u_bool; + if (data_bufinfo.len > 31 && connectable && scan_response_bufinfo.len > 0) { + mp_raise_bleio_BluetoothError(translate("Cannot have scan responses for extended, connectable advertisements.")); + } + + common_hal_bleio_adapter_start_advertising(self, connectable, interval, &data_bufinfo, &scan_response_bufinfo); return mp_const_none; diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 5ce7b3581b..5759e8ad22 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -394,11 +394,18 @@ STATIC mp_obj_t displayio_display_obj_get_rotation(mp_obj_t self_in) { return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_display_get_rotation(self)); } MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_rotation_obj, displayio_display_obj_get_rotation); +STATIC mp_obj_t displayio_display_obj_set_rotation(mp_obj_t self_in, mp_obj_t value) { + displayio_display_obj_t *self = native_display(self_in); + common_hal_displayio_display_set_rotation(self, mp_obj_get_int(value)); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_rotation_obj, displayio_display_obj_set_rotation); + const mp_obj_property_t displayio_display_rotation_obj = { .base.type = &mp_type_property, .proxy = {(mp_obj_t)&displayio_display_get_rotation_obj, - (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&displayio_display_set_rotation_obj, (mp_obj_t)&mp_const_none_obj}, }; diff --git a/shared-bindings/displayio/Display.h b/shared-bindings/displayio/Display.h index ca2b2d4765..b82a68ebe9 100644 --- a/shared-bindings/displayio/Display.h +++ b/shared-bindings/displayio/Display.h @@ -58,6 +58,7 @@ void common_hal_displayio_display_set_auto_refresh(displayio_display_obj_t* self uint16_t common_hal_displayio_display_get_width(displayio_display_obj_t* self); uint16_t common_hal_displayio_display_get_height(displayio_display_obj_t* self); uint16_t common_hal_displayio_display_get_rotation(displayio_display_obj_t* self); +void common_hal_displayio_display_set_rotation(displayio_display_obj_t* self, int rotation); bool common_hal_displayio_display_get_auto_brightness(displayio_display_obj_t* self); void common_hal_displayio_display_set_auto_brightness(displayio_display_obj_t* self, bool auto_brightness); diff --git a/shared-bindings/random/__init__.c b/shared-bindings/random/__init__.c index 83698eac57..de4c90910d 100644 --- a/shared-bindings/random/__init__.c +++ b/shared-bindings/random/__init__.c @@ -33,11 +33,11 @@ #include "shared-bindings/random/__init__.h" #include "supervisor/shared/translate.h" -//| :mod:`random` --- psuedo-random numbers and choices +//| :mod:`random` --- pseudo-random numbers and choices //| ======================================================== //| //| .. module:: random -//| :synopsis: psuedo-random numbers and choices +//| :synopsis: pseudo-random numbers and choices //| :platform: SAMD21, ESP8266 //| //| The `random` module is a strict subset of the CPython `cpython:random` diff --git a/shared-module/audiocore/__init__.c b/shared-module/audiocore/__init__.c index 1553dbe961..ac9d41b60a 100644 --- a/shared-module/audiocore/__init__.c +++ b/shared-module/audiocore/__init__.c @@ -52,7 +52,7 @@ uint8_t audiosample_channel_count(mp_obj_t sample_obj) { void audiosample_reset_buffer(mp_obj_t sample_obj, bool single_channel, uint8_t audio_channel) { const audiosample_p_t *proto = mp_proto_get_or_throw(MP_QSTR_protocol_audiosample, sample_obj); - proto->reset_buffer(MP_OBJ_TO_PTR(sample_obj)); + proto->reset_buffer(MP_OBJ_TO_PTR(sample_obj), single_channel, audio_channel); } audioio_get_buffer_result_t audiosample_get_buffer(mp_obj_t sample_obj, diff --git a/shared-module/audiocore/__init__.h b/shared-module/audiocore/__init__.h index 38c1f5aeb1..7a56454b8a 100644 --- a/shared-module/audiocore/__init__.h +++ b/shared-module/audiocore/__init__.h @@ -42,7 +42,8 @@ typedef enum { typedef uint32_t (*audiosample_sample_rate_fun)(mp_obj_t); typedef uint8_t (*audiosample_bits_per_sample_fun)(mp_obj_t); typedef uint8_t (*audiosample_channel_count_fun)(mp_obj_t); -typedef void (*audiosample_reset_buffer_fun)(mp_obj_t); +typedef void (*audiosample_reset_buffer_fun)(mp_obj_t, + bool single_channel, uint8_t audio_channel); typedef audioio_get_buffer_result_t (*audiosample_get_buffer_fun)(mp_obj_t, bool single_channel, uint8_t channel, uint8_t** buffer, uint32_t* buffer_length); diff --git a/shared-module/audiomp3/MP3File.c b/shared-module/audiomp3/MP3File.c index cabb461056..0aa4f24a66 100644 --- a/shared-module/audiomp3/MP3File.c +++ b/shared-module/audiomp3/MP3File.c @@ -88,6 +88,39 @@ STATIC bool mp3file_update_inbuf(audiomp3_mp3file_obj_t* self) { #define BYTES_LEFT(self) (self->inbuf_length - self->inbuf_offset) #define CONSUME(self, n) (self->inbuf_offset += n) +// http://id3.org/d3v2.3.0 +// http://id3.org/id3v2.3.0 +STATIC void mp3file_skip_id3v2(audiomp3_mp3file_obj_t* self) { + mp3file_update_inbuf(self); + if (BYTES_LEFT(self) < 10) { + return; + } + uint8_t *data = READ_PTR(self); + if (!( + data[0] == 'I' && + data[1] == 'D' && + data[2] == '3' && + data[3] != 0xff && + data[4] != 0xff && + (data[5] & 0x1f) == 0 && + (data[6] & 0x80) == 0 && + (data[7] & 0x80) == 0 && + (data[8] & 0x80) == 0 && + (data[9] & 0x80) == 0)) { + return; + } + uint32_t size = (data[6] << 21) | (data[7] << 14) | (data[8] << 7) | (data[9]); + size += 10; // size excludes the "header" (but not the "extended header") + // First, deduct from size whatever is left in buffer + uint32_t to_consume = MIN(size, BYTES_LEFT(self)); + CONSUME(self, to_consume); + size -= to_consume; + + // Next, seek in the file after the header + f_lseek(&self->file->fp, f_tell(&self->file->fp) + size); + return; +} + /* If a sync word can be found, advance to it and return true. Otherwise, * return false. */ @@ -106,7 +139,15 @@ STATIC bool mp3file_find_sync_word(audiomp3_mp3file_obj_t* self) { } STATIC bool mp3file_get_next_frame_info(audiomp3_mp3file_obj_t* self, MP3FrameInfo* fi) { - int err = MP3GetNextFrameInfo(self->decoder, fi, READ_PTR(self)); + int err; + do { + err = MP3GetNextFrameInfo(self->decoder, fi, READ_PTR(self)); + if (err == ERR_MP3_NONE) { + break; + } + CONSUME(self, 1); + mp3file_find_sync_word(self); + } while (!self->eof); return err == ERR_MP3_NONE; } @@ -151,10 +192,13 @@ void common_hal_audiomp3_mp3file_construct(audiomp3_mp3file_obj_t* self, self->channel_count = fi.nChans; self->frame_buffer_size = fi.outputSamps*sizeof(int16_t); + if ((intptr_t)buffer & 1) { + buffer += 1; buffer_size -= 1; + } if (buffer_size >= 2 * self->frame_buffer_size) { self->len = buffer_size / 2 / self->frame_buffer_size * self->frame_buffer_size; - self->buffers[0] = buffer; - self->buffers[1] = buffer + self->len; + self->buffers[0] = (int16_t*)(void*)buffer; + self->buffers[1] = (int16_t*)(void*)buffer + self->len; } else { self->len = 2 * self->frame_buffer_size; self->buffers[0] = m_malloc(self->len, false); @@ -218,7 +262,9 @@ void audiomp3_mp3file_reset_buffer(audiomp3_mp3file_obj_t* self, f_lseek(&self->file->fp, 0); self->inbuf_offset = self->inbuf_length; self->eof = 0; + self->other_channel = -1; mp3file_update_inbuf(self); + mp3file_skip_id3v2(self); mp3file_find_sync_word(self); } @@ -227,30 +273,38 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t* uint8_t channel, uint8_t** bufptr, uint32_t* buffer_length) { + if (!self->inbuf) { + return GET_BUFFER_ERROR; + } if (!single_channel) { channel = 0; } - uint16_t channel_read_count = self->channel_read_count[channel]++; - bool need_more_data = self->read_count++ == channel_read_count; - - *bufptr = self->buffers[self->buffer_index] + channel; + *bufptr = (uint8_t*)(self->buffers[self->buffer_index] + channel); *buffer_length = self->frame_buffer_size; - if (need_more_data) { - self->buffer_index = !self->buffer_index; - int16_t *buffer = (int16_t *)(void *)self->buffers[self->buffer_index]; + if (channel == self->other_channel) { + *bufptr = (uint8_t*)(self->buffers[self->other_buffer_index] + channel); + self->other_channel = -1; + return GET_BUFFER_MORE_DATA; + } - if (!mp3file_find_sync_word(self)) { - return self->eof ? GET_BUFFER_DONE : GET_BUFFER_ERROR; - } - int bytes_left = BYTES_LEFT(self); - uint8_t *inbuf = READ_PTR(self); - int err = MP3Decode(self->decoder, &inbuf, &bytes_left, buffer, 0); - CONSUME(self, BYTES_LEFT(self) - bytes_left); - if (err) { - return GET_BUFFER_DONE; - } + self->other_channel = 1-channel; + self->other_buffer_index = self->buffer_index; + + self->buffer_index = !self->buffer_index; + int16_t *buffer = (int16_t *)(void *)self->buffers[self->buffer_index]; + + mp3file_skip_id3v2(self); + if (!mp3file_find_sync_word(self)) { + return self->eof ? GET_BUFFER_DONE : GET_BUFFER_ERROR; + } + int bytes_left = BYTES_LEFT(self); + uint8_t *inbuf = READ_PTR(self); + int err = MP3Decode(self->decoder, &inbuf, &bytes_left, buffer, 0); + CONSUME(self, BYTES_LEFT(self) - bytes_left); + if (err) { + return GET_BUFFER_DONE; } return GET_BUFFER_MORE_DATA; diff --git a/shared-module/audiomp3/MP3File.h b/shared-module/audiomp3/MP3File.h index 12649ac1ad..9d99e8d1f0 100644 --- a/shared-module/audiomp3/MP3File.h +++ b/shared-module/audiomp3/MP3File.h @@ -39,7 +39,7 @@ typedef struct { uint8_t* inbuf; uint32_t inbuf_length; uint32_t inbuf_offset; - uint8_t* buffers[2]; + int16_t* buffers[2]; uint32_t len; uint32_t frame_buffer_size; @@ -50,8 +50,8 @@ typedef struct { uint8_t channel_count; bool eof; - uint16_t read_count; - uint16_t channel_read_count[2]; + int8_t other_channel; + int8_t other_buffer_index; } audiomp3_mp3file_obj_t; // These are not available from Python because it may be called in an interrupt. diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 11db0f8ff2..299c8ad359 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -308,10 +308,27 @@ STATIC void _refresh_display(displayio_display_obj_t* self) { displayio_display_core_finish_refresh(&self->core); } +void common_hal_displayio_display_set_rotation(displayio_display_obj_t* self, int rotation){ + bool transposed = (self->core.rotation == 90 || self->core.rotation == 270); + bool will_transposed = (rotation == 90 || rotation == 270); + if(transposed != will_transposed) { + int tmp = self->core.width; + self->core.width = self->core.height; + self->core.height = tmp; + } + displayio_display_core_set_rotation(&self->core, rotation); + supervisor_stop_terminal(); + supervisor_start_terminal(self->core.width, self->core.height); + if (self->core.current_group != NULL) { + displayio_group_update_transform(self->core.current_group, &self->core.transform); + } +} + uint16_t common_hal_displayio_display_get_rotation(displayio_display_obj_t* self){ return self->core.rotation; } + bool common_hal_displayio_display_refresh(displayio_display_obj_t* self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame) { if (!self->auto_refresh && !self->first_manual_refresh) { uint64_t current_time = supervisor_ticks_ms64(); diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c index 658daa8d69..120b70f76a 100644 --- a/shared-module/displayio/display_core.c +++ b/shared-module/displayio/display_core.c @@ -86,6 +86,15 @@ void displayio_display_core_construct(displayio_display_core_t* self, self->height = height; self->ram_width = ram_width; self->ram_height = ram_height; + + displayio_display_core_set_rotation(self, rotation); +} + +void displayio_display_core_set_rotation( displayio_display_core_t* self, + int rotation) { + int height = self->height; + int width = self->width; + rotation = rotation % 360; self->rotation = rotation; self->transform.x = 0; diff --git a/shared-module/displayio/display_core.h b/shared-module/displayio/display_core.h index 3a69cd40a2..1c3d0f09c6 100644 --- a/shared-module/displayio/display_core.h +++ b/shared-module/displayio/display_core.h @@ -68,6 +68,8 @@ uint16_t displayio_display_core_get_height(displayio_display_core_t* self); void displayio_display_core_set_dither(displayio_display_core_t* self, bool dither); bool displayio_display_core_get_dither(displayio_display_core_t* self); +void displayio_display_core_set_rotation(displayio_display_core_t* self, int rotation); + bool displayio_display_core_bus_free(displayio_display_core_t *self); bool displayio_display_core_begin_transaction(displayio_display_core_t* self); void displayio_display_core_end_transaction(displayio_display_core_t* self); diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index c6fda0f168..855432d645 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -81,6 +81,7 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { grid->pixel_width = width_in_tiles * grid->tile_width; grid->pixel_height = height_in_tiles * grid->tile_height; grid->tiles = tiles; + grid->full_change = true; common_hal_terminalio_terminal_construct(&supervisor_terminal, grid, &supervisor_terminal_font); } diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 363181da06..aba31e9c9e 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -94,44 +94,72 @@ void __attribute__((noinline,)) reset_into_safe_mode(safe_mode_t reason) { reset_cpu(); } + + +#define FILE_AN_ISSUE translate("\nPlease file an issue with the contents of your CIRCUITPY drive at \nhttps://github.com/adafruit/circuitpython/issues\n") + void print_safe_mode_message(safe_mode_t reason) { if (reason == NO_SAFE_MODE) { return; } - serial_write("\r\n"); - // Output a user safe mode string if its set. + serial_write("\n"); + // Output a user safe mode string if it's set. #ifdef BOARD_USER_SAFE_MODE if (reason == USER_SAFE_MODE) { serial_write_compressed(translate("You requested starting safe mode by ")); serial_write(BOARD_USER_SAFE_MODE_ACTION); - serial_write("\r\n"); - serial_write_compressed(translate("To exit, please reset the board without ")); + serial_write_compressed(translate("\nTo exit, please reset the board without ")); serial_write(BOARD_USER_SAFE_MODE_ACTION); - serial_write("\r\n"); + serial_write("\n"); } else #endif - if (reason == MANUAL_SAFE_MODE) { - serial_write_compressed(translate("The reset button was pressed while booting CircuitPython. Press again to exit safe mode.\n")); - } else if (reason == PROGRAMMATIC_SAFE_MODE) { - serial_write_compressed(translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode.\n")); - } else { - serial_write_compressed(translate("You are running in safe mode which means something unanticipated happened.\n")); - if (reason == HARD_CRASH || reason == MICROPY_NLR_JUMP_FAIL || reason == MICROPY_FATAL_ERROR || reason == GC_ALLOC_OUTSIDE_VM) { - serial_write_compressed(translate("Looks like our core CircuitPython code crashed hard. Whoops!\nPlease file an issue at https://github.com/adafruit/circuitpython/issues\n with the contents of your CIRCUITPY drive and this message:\n")); - if (reason == HARD_CRASH) { - serial_write_compressed(translate("Crash into the HardFault_Handler.\n")); - } else if (reason == MICROPY_NLR_JUMP_FAIL) { - serial_write_compressed(translate("MicroPython NLR jump failed. Likely memory corruption.\n")); - } else if (reason == MICROPY_FATAL_ERROR) { - serial_write_compressed(translate("MicroPython fatal error.\n")); - } else if (reason == GC_ALLOC_OUTSIDE_VM) { - serial_write_compressed(translate("Attempted heap allocation when MicroPython VM not running.\n")); - } - } else if (reason == BROWNOUT) { - serial_write_compressed(translate("The microcontroller's power dipped. Please make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n")); - } else if (reason == HEAP_OVERWRITTEN) { - serial_write_compressed(translate("The CircuitPython heap was corrupted because the stack was too small.\nPlease increase stack size limits and press reset (after ejecting CIRCUITPY).\nIf you didn't change the stack, then file an issue here with the contents of your CIRCUITPY drive:\n")); - serial_write("https://github.com/adafruit/circuitpython/issues\r\n"); + switch (reason) { + case MANUAL_SAFE_MODE: + serial_write_compressed(translate("CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.\n")); + return; + case PROGRAMMATIC_SAFE_MODE: + serial_write_compressed(translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode.\n")); + return; + default: + break; } - } + + serial_write_compressed(translate("You are in safe mode: something unanticipated happened.\n")); + switch (reason) { + case BROWNOUT: + serial_write_compressed(translate("The microcontroller's power dipped. Make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n")); + return; + case HEAP_OVERWRITTEN: + serial_write_compressed(translate("The CircuitPython heap was corrupted because the stack was too small.\nPlease increase the stack size if you know how, or if not:")); + serial_write_compressed(FILE_AN_ISSUE); + return; + default: + break; + } + + serial_write_compressed(translate("CircuitPython core code crashed hard. Whoops!\n")); + switch (reason) { + case HARD_CRASH: + serial_write_compressed(translate("Crash into the HardFault_Handler.")); + return; + case MICROPY_NLR_JUMP_FAIL: + serial_write_compressed(translate("MicroPython NLR jump failed. Likely memory corruption.")); + return; + case MICROPY_FATAL_ERROR: + serial_write_compressed(translate("MicroPython fatal error.")); + break; + case GC_ALLOC_OUTSIDE_VM: + serial_write_compressed(translate("Attempted heap allocation when MicroPython VM not running.")); + break; + case NORDIC_SOFT_DEVICE_ASSERT: + serial_write_compressed(translate("Nordic Soft Device failure assertion.")); + break; + case FLASH_WRITE_FAIL: + serial_write_compressed(translate("Failed to write internal flash.")); + break; + default: + serial_write_compressed(translate("Unknown reason.")); + break; + } + serial_write_compressed(FILE_AN_ISSUE); } diff --git a/supervisor/shared/safe_mode.h b/supervisor/shared/safe_mode.h index 8c5dcd9c5d..e05fca0e46 100644 --- a/supervisor/shared/safe_mode.h +++ b/supervisor/shared/safe_mode.h @@ -38,7 +38,8 @@ typedef enum { MICROPY_FATAL_ERROR, GC_ALLOC_OUTSIDE_VM, PROGRAMMATIC_SAFE_MODE, - NORDIC_SOFT_DEVICE_ASSERT + NORDIC_SOFT_DEVICE_ASSERT, + FLASH_WRITE_FAIL, } safe_mode_t; safe_mode_t wait_for_safe_mode_reset(void); diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index c1d70c5b0f..a0178528d8 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -87,10 +87,12 @@ void usb_background(void) { // Invoked when device is mounted void tud_mount_cb(void) { + usb_msc_mount(); } // Invoked when device is unmounted void tud_umount_cb(void) { + usb_msc_umount(); } // Invoked when usb bus is suspended diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c index 205cb7b500..0376cfc1df 100644 --- a/supervisor/shared/usb/usb_msc_flash.c +++ b/supervisor/shared/usb/usb_msc_flash.c @@ -41,6 +41,18 @@ static bool ejected[1]; +void usb_msc_mount(void) { + // Reset the ejection tracking every time we're plugged into USB. This allows for us to battery + // power the device, eject, unplug and plug it back in to get the drive. + for (uint8_t i = 0; i < sizeof(ejected); i++) { + ejected[i] = false; + } +} + +void usb_msc_umount(void) { + +} + // The root FS is always at the end of the list. static fs_user_mount_t* get_vfs(int lun) { // TODO(tannewt): Return the mount which matches the lun where 0 is the end @@ -198,19 +210,34 @@ bool tud_msc_test_unit_ready_cb(uint8_t lun) { // - Start = 0 : stopped power mode, if load_eject = 1 : unload disk storage // - Start = 1 : active mode, if load_eject = 1 : load disk storage bool tud_msc_start_stop_cb(uint8_t lun, uint8_t power_condition, bool start, bool load_eject) { + if (lun > 1) { + return false; + } + fs_user_mount_t* current_mount = get_vfs(lun); + if (current_mount == NULL) { + return false; + } if (load_eject) { - if (lun > 1) { - return false; - } else { - fs_user_mount_t* current_mount = get_vfs(lun); - if (current_mount == NULL) { - return false; - } + if (!start) { + // Eject but first flush. if (disk_ioctl(current_mount, CTRL_SYNC, NULL) != RES_OK) { return false; } else { ejected[lun] = true; } + } else { + // We can only load if it hasn't been ejected. + return !ejected[lun]; + } + } else { + if (!start) { + // Stop the unit but don't eject. + if (disk_ioctl(current_mount, CTRL_SYNC, NULL) != RES_OK) { + return false; + } + } else { + // Start the unit, but only if not ejected. + return !ejected[lun]; } } diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 5e997ee78e..96a14c25b4 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -17,25 +17,27 @@ ifndef $(NO_USB) NO_USB = $(wildcard supervisor/usb.c) endif -ifneq ($(INTERNAL_FLASH_FILESYSTEM),) - CFLAGS += -DINTERNAL_FLASH_FILESYSTEM=$(INTERNAL_FLASH_FILESYSTEM) -endif -ifneq ($(QSPI_FLASH_FILESYSTEM),) -# EXPRESS_BOARD is obsolete and should be removed when samd-peripherals is updated. - CFLAGS += -DQSPI_FLASH_FILESYSTEM=$(QSPI_FLASH_FILESYSTEM) -DEXPRESS_BOARD -endif -ifneq ($(SPI_FLASH_FILESYSTEM),) -# EXPRESS_BOARD is obsolete and should be removed when samd-peripherals is updated. - CFLAGS += -DSPI_FLASH_FILESYSTEM=$(SPI_FLASH_FILESYSTEM) -DEXPRESS_BOARD +ifndef INTERNAL_FLASH_FILESYSTEM +INTERNAL_FLASH_FILESYSTEM = 0 endif +CFLAGS += -DINTERNAL_FLASH_FILESYSTEM=$(INTERNAL_FLASH_FILESYSTEM) +ifndef QSPI_FLASH_FILESYSTEM +QSPI_FLASH_FILESYSTEM = 0 +endif +CFLAGS += -DQSPI_FLASH_FILESYSTEM=$(QSPI_FLASH_FILESYSTEM) + +ifndef SPI_FLASH_FILESYSTEM +SPI_FLASH_FILESYSTEM = 0 +endif +CFLAGS += -DSPI_FLASH_FILESYSTEM=$(SPI_FLASH_FILESYSTEM) ifeq ($(CIRCUITPY_BLEIO),1) SRC_SUPERVISOR += supervisor/shared/bluetooth.c endif # Choose which flash filesystem impl to use. -# (Right now INTERNAL_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM are mutually exclusive. +# (Right now INTERNAL_FLASH_FILESYSTEM and (Q)SPI_FLASH_FILESYSTEM are mutually exclusive. # But that might not be true in the future.) ifdef EXTERNAL_FLASH_DEVICES CFLAGS += -DEXTERNAL_FLASH_DEVICES=$(EXTERNAL_FLASH_DEVICES) \ @@ -52,7 +54,7 @@ ifdef EXTERNAL_FLASH_DEVICES else ifeq ($(DISABLE_FILESYSTEM),1) SRC_SUPERVISOR += supervisor/stub/internal_flash.c - else + else SRC_SUPERVISOR += supervisor/internal_flash.c endif endif @@ -64,30 +66,31 @@ ifeq ($(USB),FALSE) SRC_SUPERVISOR += supervisor/serial.c endif else - SRC_SUPERVISOR += lib/tinyusb/src/common/tusb_fifo.c \ - lib/tinyusb/src/device/usbd.c \ - lib/tinyusb/src/device/usbd_control.c \ - lib/tinyusb/src/class/msc/msc_device.c \ - lib/tinyusb/src/class/cdc/cdc_device.c \ - lib/tinyusb/src/class/hid/hid_device.c \ - lib/tinyusb/src/class/midi/midi_device.c \ - lib/tinyusb/src/tusb.c \ - supervisor/shared/serial.c \ - supervisor/usb.c \ - supervisor/shared/usb/usb_desc.c \ - supervisor/shared/usb/usb.c \ - supervisor/shared/usb/usb_msc_flash.c \ - shared-bindings/usb_hid/__init__.c \ - shared-bindings/usb_hid/Device.c \ - shared-bindings/usb_midi/__init__.c \ - shared-bindings/usb_midi/PortIn.c \ - shared-bindings/usb_midi/PortOut.c \ - shared-module/usb_hid/__init__.c \ - shared-module/usb_hid/Device.c \ - shared-module/usb_midi/__init__.c \ - shared-module/usb_midi/PortIn.c \ - shared-module/usb_midi/PortOut.c \ - $(BUILD)/autogen_usb_descriptor.c + SRC_SUPERVISOR += \ + lib/tinyusb/src/common/tusb_fifo.c \ + lib/tinyusb/src/device/usbd.c \ + lib/tinyusb/src/device/usbd_control.c \ + lib/tinyusb/src/class/msc/msc_device.c \ + lib/tinyusb/src/class/cdc/cdc_device.c \ + lib/tinyusb/src/class/hid/hid_device.c \ + lib/tinyusb/src/class/midi/midi_device.c \ + lib/tinyusb/src/tusb.c \ + supervisor/shared/serial.c \ + supervisor/usb.c \ + supervisor/shared/usb/usb_desc.c \ + supervisor/shared/usb/usb.c \ + supervisor/shared/usb/usb_msc_flash.c \ + shared-bindings/usb_hid/__init__.c \ + shared-bindings/usb_hid/Device.c \ + shared-bindings/usb_midi/__init__.c \ + shared-bindings/usb_midi/PortIn.c \ + shared-bindings/usb_midi/PortOut.c \ + shared-module/usb_hid/__init__.c \ + shared-module/usb_hid/Device.c \ + shared-module/usb_midi/__init__.c \ + shared-module/usb_midi/PortIn.c \ + shared-module/usb_midi/PortOut.c \ + $(BUILD)/autogen_usb_descriptor.c CFLAGS += -DUSB_AVAILABLE endif diff --git a/supervisor/usb.h b/supervisor/usb.h index c87540d408..0cc361619d 100644 --- a/supervisor/usb.h +++ b/supervisor/usb.h @@ -41,4 +41,8 @@ void init_usb_hardware(void); bool usb_enabled(void); void usb_init(void); +// Propagate plug/unplug events to the MSC logic. +void usb_msc_mount(void); +void usb_msc_umount(void); + #endif // MICROPY_INCLUDED_SUPERVISOR_USB_H diff --git a/tools/build_memory_info.py b/tools/build_memory_info.py index a8f84bbb6a..93b4c1e82f 100644 --- a/tools/build_memory_info.py +++ b/tools/build_memory_info.py @@ -41,6 +41,8 @@ data = 0 bss = 0 # stdin is the linker output. for line in sys.stdin: + # Uncomment to see linker output. + # print(line) line = line.strip() if not line.startswith("text"): text, data, bss = map(int, line.split()[:3]) @@ -50,7 +52,7 @@ regions = {} with open(sys.argv[1], "r") as f: for line in f: line = line.strip() - if line.startswith(("FLASH", "RAM")): + if line.startswith(("FLASH_FIRMWARE", "FLASH", "RAM")): regions[line.split()[0]] = line.split("=")[-1] for region in regions: @@ -59,12 +61,19 @@ for region in regions: space = space.split("/*")[0] space = K_PATTERN.sub(K_REPLACE, space) space = M_PATTERN.sub(M_REPLACE, space) - regions[region] = eval(space) + regions[region] = int(eval(space)) -free_flash = regions["FLASH"] - text - data -free_ram = regions["RAM"] - data - bss -print(free_flash, "bytes free in flash out of", regions["FLASH"], "bytes (", regions["FLASH"] / 1024, "kb ).") -print(free_ram, "bytes free in ram for stack out of", regions["RAM"], "bytes (", regions["RAM"] / 1024, "kb ).") +# TODO Remove check for both FLASH_FIRMWARE and FLASH after all ports are converted to use FLASH_FIRMWARE. +try: + firmware_region = regions["FLASH_FIRMWARE"] +except KeyError: + firmware_region = regions["FLASH"] +ram_region = regions["RAM"] + +free_flash = firmware_region - text - data +free_ram = ram_region - data - bss +print("{} bytes free in flash firmware space out of {} bytes ({}kB).".format(free_flash, firmware_region, firmware_region / 1024)) +print("{} bytes free in ram for stack and heap out of {} bytes ({}kB).".format(free_ram, ram_region, ram_region / 1024)) print() # Check that we have free flash space. GCC doesn't fail when the text + data diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index 781b5e69b2..c08daf4776 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -48,18 +48,19 @@ for c in sample_characters: all_characters += c if args.extra_characters: all_characters.extend(args.extra_characters) +all_characters = "".join(sorted(set(all_characters))) filtered_characters = all_characters # Try to pre-load all of the glyphs. Misses will still be slow later. -f.load_glyphs(set(all_characters)) +f.load_glyphs(set(ord(c) for c in all_characters)) # Get each glyph. -for c in all_characters: - g = f.get_glyph(ord(c)) - if not g: +for c in set(all_characters): + if ord(c) not in f._glyphs: print("Font missing character:", c, ord(c)) filtered_characters = filtered_characters.replace(c, "") continue + g = f.get_glyph(ord(c)) if g["shift"][1] != 0: raise RuntimeError("y shift") diff --git a/tools/gen_ld_files.py b/tools/gen_ld_files.py new file mode 100755 index 0000000000..c2ac812bc9 --- /dev/null +++ b/tools/gen_ld_files.py @@ -0,0 +1,60 @@ +#! /usr/bin/env python3 +import argparse + +import os +import os.path +import sys +import re +from string import Template + +parser = argparse.ArgumentParser(description='Apply #define values to .template.ld file.') +parser.add_argument('template_files', metavar='TEMPLATE_FILE', type=argparse.FileType('r'), + nargs='+', help="template filename: .template.ld") +parser.add_argument('--defines', type=argparse.FileType('r'), required=True) +parser.add_argument('--out_dir', required=True) + +args = parser.parse_args() + +defines = {} + +# +REMOVE_UL_RE = re.compile('([0-9]+)UL') +def remove_UL(s): + return REMOVE_UL_RE.sub(r'\1', s) + +# We skip all lines before +# // START_LD_DEFINES +# Then we look for lines like this: +# /*NAME_OF_VALUE=*/ NAME_OF_VALUE; +VALUE_LINE_RE = re.compile(r'^/\*\s*(\w+)\s*=\*/\s*(.*);\s*$') + +start_processing = False +for line in args.defines: + line = line.strip() + if line == '// START_LD_DEFINES': + start_processing = True + continue + if start_processing: + match = VALUE_LINE_RE.match(line) + if match: + name = match.group(1) + value = match.group(2).strip() + defines[name] = remove_UL(value) + +fail = False + +for template_file in args.template_files: + ld_template_basename = os.path.basename(template_file.name) + ld_pathname = os.path.join(args.out_dir, ld_template_basename.replace('.template.ld', '.ld')) + with open(ld_pathname, 'w') as output: + for k,v in defines.items(): + print('/*', k, '=', v, '*/', file=output) + print(file=output) + try: + output.write(Template(template_file.read()).substitute(defines)) + except KeyError as e: + print("ERROR: {}: No #define for '{}'".format(ld_pathname, e.args[0]), file=sys.stderr) + fail = True + +if fail: + sys.exit(1) diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py index 2199e9d395..7ae20c4d61 100755 --- a/tools/preprocess_frozen_modules.py +++ b/tools/preprocess_frozen_modules.py @@ -35,6 +35,7 @@ def copy_and_process(in_dir, out_dir): # Skip library examples directory and subfolders. relative_path_parts = Path(root).relative_to(in_dir).parts if relative_path_parts and relative_path_parts[0] in ['examples', 'docs', 'tests']: + del subdirs[:] continue for file in files: