diff options
122 files changed, 3840 insertions, 1790 deletions
diff --git a/.gitmodules b/.gitmodules index 362cb55e5..3a746ccae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -78,7 +78,7 @@ url = https://github.com/adafruit/nrfx.git [submodule "lib/tinyusb"] path = lib/tinyusb - url = https://github.com/tannewt/tinyusb.git + url = https://github.com/hathach/tinyusb.git branch = develop [submodule "tools/huffman"] path = tools/huffman diff --git a/.travis.yml b/.travis.yml index 13e97b729..d3e9f4bf1 100755 --- a/.travis.yml +++ b/.travis.yml @@ -21,11 +21,11 @@ git: # that SDK is shortest and add it there. In the case of major re-organizations, # just try to make the builds "about equal in run time" env: - - TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="feather_huzzah circuitplayground_express grandcentral_m4_express pca10056 pca10059 feather_nrf52832 feather_nrf52840_express makerdiary_nrf52840_mdk" TRAVIS_SDK=arm:nrf:esp8266 + - TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="feather_huzzah circuitplayground_express mini_sam_m4 grandcentral_m4_express pca10056 pca10059 feather_nrf52832 feather_nrf52840_express makerdiary_nrf52840_mdk particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini" TRAVIS_SDK=arm:nrf:esp8266 - TRAVIS_BOARDS="metro_m0_express metro_m4_express pirkey_m0 trellis_m4_express trinket_m0" TRAVIS_SDK=arm - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow" TRAVIS_SDK=arm - - TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300" TRAVIS_SDK=arm - - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick" TRAVIS_SDK=arm + - TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero" TRAVIS_SDK=arm + - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal" TRAVIS_SDK=arm addons: artifacts: @@ -37,8 +37,8 @@ deploy: provider: releases api_key: secure: "jdqVFw6itRY4qwQF4ReXo0uaymT+Mob6RhYX0lw8KWFNqBgHnLVuKmKKcGMEuRvBVMPkvxF7bMuOQzSBOunqwlHFse3oMzdWvQODv1zwV7pSRXGwTdIvTPbBjKWxnBG9uSNRf2R5AMflJFUxy2CbtBpgvNzr+4VLREZDrrjEu8C1iTtXGpSm5AQ5iIp2fkMAWD85FP7CQPpkqRoxhSIFZmTdurfYRmenq1OZ/4SeD5TESKcyvqJNzVT9z210B3cg3eAkP6ukvelW4qE2zgIANqUkGqvDEnAvEII9M89kuwhCMAekdfwnUSPrry+g77i1dUZHoRN1+MFj+waYtPaqxdYo2G1sysa6enxlu4jHMR5MfMk9eKHgaNgL3PiyANusYSS44amh8QIiVaX5nw82myZDCpQOZW7YqJKE6WX70Lbs4mS+wIs+ig4KIXO1B0p9kMb0OeVjHRl+KcXsWGRu/ECG/ExpqlVIssSPU407LohMXT2cJ37CY/R/EeK2XSDsQ2M3L3EAGUjCJdBGuwsOJ+2lG+HQpAVu9vAB4kq5jy9Ye+MG+8Xlkly3XZZ5+FkXyYxKnXb26/QVv0e5sIG5OmdJCPYFaH2J1QdKo7CdhEcBtrf6DMPWaimGMldShFqzLjOz3b3qLysRxFF0aGb7ipKPa57vawNzYHoPAViOcXQ=" - file: - - $(ls -d1 bin/*/* | tr "\n" ":") + file_glob: true + file: "$TRAVIS_BUILD_DIR/bin/*/*" skip_cleanup: true draft: true on: @@ -92,7 +92,9 @@ script: - make -C mpy-cross -j2 - echo -en 'travis_fold:end:mpy-cross\\r' - - cd tools && python3 build_adafruit_bins.py + # Use unbuffered output because building all the releases can take a long time. + # Travis will cancel the job if it sees no output for >10 minutes. + - cd tools && python3 -u build_release_files.py - cd .. - echo 'Building unix' && echo -en 'travis_fold:start:unix\\r' diff --git a/README.rst b/README.rst index 138dbfea7..13672b689 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,9 @@ Adafruit CircuitPython ====================== -|Build Status| |Doc Status| |Discord| +.. image:: https://github.com/adafruit/circuitpython/blob/master/logo/CircuitPython_Repo_header_logo.png + +|Build Status| |Doc Status| |License| |Discord| `Status <#status>`__ \| `Supported Boards <#supported-boards>`__ \| `Download <#download>`__ \| @@ -60,13 +62,15 @@ Other supported using the `Adafruit CircuitPython SD library <https://github.com/adafruit/Adafruit_CircuitPython_SD>`__) - `Arduino Zero <https://www.arduino.cc/en/Main/ArduinoBoardZero>`__ +- `Arduino MKR Zero <https://store.arduino.cc/arduino-mkrzero>`__ (MicroSD card + supported using the `Adafruit CircuitPython SD + library <https://github.com/adafruit/Adafruit_CircuitPython_SD>`__) "Third-party" or "non-Adafruit" boards ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - `Electronic Cats Meow Meow <https://electroniccats.com/gomeow/>`__ -- `Electronic Cats CatWAN USB Stick <https://electroniccats.com/producto/catwan_usb_stick/>`__ - +- `Electronic Cats CatWAN USB Stick <https://electroniccats.com/producto/catwan_usb_stick/>`__ Download -------- @@ -207,7 +211,7 @@ amongst ports including CircuitPython: - ``extmod`` Shared C code used in multiple ports' modules. - ``lib`` Shared core C code including externally developed libraries such as FATFS. -- ``logo`` The MicroPython logo. +- ``logo`` The CircuitPython logo. - ``mpy-cross`` A cross compiler that converts Python files to byte code prior to being run in MicroPython. Useful for reducing library size. @@ -262,9 +266,11 @@ project. `⬆ back to top <#adafruit-circuitpython>`__ -.. |Build Status| image:: https://travis-ci.org/adafruit/circuitpython.svg?branch=master +.. |Build Status| image:: https://travis-ci.com/adafruit/circuitpython.svg?branch=master :target: https://travis-ci.org/adafruit/circuitpython .. |Doc Status| image:: https://readthedocs.org/projects/circuitpython/badge/?version=latest :target: http://circuitpython.readthedocs.io/ .. |Discord| image:: https://img.shields.io/discord/327254708534116352.svg :target: https://discord.gg/nBQh6qu +.. |License| image:: https://github.com/adafruit/circuitpython/blob/master/logo/license-MIT-brightgreen.svg + :target: https://opensource.org/licenses/MIT diff --git a/lib/tinyusb b/lib/tinyusb -Subproject 47fabe42edaae4a5da6aa0d48c664a918457875 +Subproject 3bb53273cd3770328f55ba317af3df0cce4333c diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 34467c7b5..92e181302 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: 2018-11-09 16:20-0800\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -131,7 +131,7 @@ msgstr "" msgid "invalid dupterm index" msgstr "" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "" @@ -151,70 +151,37 @@ msgstr "" msgid "script compilation not supported" msgstr "" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr "" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "" - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "" - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "" - -#: main.c:263 -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "" @@ -360,7 +327,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" @@ -374,31 +341,31 @@ msgstr "" msgid "Unsupported baudrate" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "" @@ -443,7 +410,7 @@ msgid "pop from an empty PulseIn" msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "" @@ -807,24 +774,24 @@ msgstr "" msgid "All SPI peripherals are in use" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:86 +#: ports/nrf/common-hal/busio/UART.c:110 msgid "Invalid buffer size" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:90 +#: ports/nrf/common-hal/busio/UART.c:114 msgid "Odd parity is not supported" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 msgid "busio.UART not available" msgstr "" @@ -1325,140 +1292,140 @@ msgstr "" msgid "expecting a dict for keyword args" msgstr "" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" msgstr "" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" msgstr "" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" msgstr "" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" msgstr "" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" msgstr "" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" msgstr "" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" msgstr "" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" msgstr "" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" msgstr "" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" msgstr "" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" msgstr "" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" msgstr "" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" msgstr "" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" msgstr "" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" msgstr "" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" msgstr "" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" msgstr "" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" msgstr "" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" msgstr "" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" msgstr "" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" msgstr "" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" msgstr "" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" msgstr "" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" msgstr "" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" msgstr "" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" msgstr "" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" msgstr "" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" msgstr "" @@ -1974,6 +1941,14 @@ msgstr "" msgid "stream operation not supported" msgstr "" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "" + #: py/vm.c:255 msgid "local variable referenced before assignment" msgstr "" @@ -2132,14 +2107,18 @@ msgstr "" msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" msgstr "" +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" +msgstr "" + #: shared-bindings/digitalio/DigitalInOut.c:211 msgid "Invalid direction." msgstr "" @@ -2361,15 +2340,15 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" msgstr "" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" msgstr "" -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" msgstr "" @@ -2512,3 +2491,58 @@ msgstr "" #: shared-module/usb_hid/Device.c:59 msgid "USB Error" msgstr "" + +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "" + +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "" + +#: supervisor/shared/safe_mode.c:107 +msgid "" +"You are running in safe mode which means something unanticipated happened.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:109 +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 "" + +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:118 +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 "" + +#: supervisor/shared/safe_mode.c:120 +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 "" + +#: supervisor/shared/safe_mode.c:123 +msgid "" +"The reset button was pressed while booting CircuitPython. Press again to " +"exit safe mode.\n" +msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 7451d9b2a..e9f81e0b1 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: 2018-11-09 16:20-0800\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Sebastian Plamauer\n" "Language-Team: \n" @@ -131,7 +131,7 @@ msgstr "kompression header" msgid "invalid dupterm index" msgstr "ungültiger dupterm index" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "Schreibgeschützte Dateisystem" @@ -151,11 +151,11 @@ msgstr "ungültige argumente" msgid "script compilation not supported" msgstr "kompilieren von Skripten ist nicht unterstützt" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr " Ausgabe:\n" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,67 +163,29 @@ msgstr "" "Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie " "auszuführen oder verbinde dich mit der REPL um zu deaktivieren.\n" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "Automatisches Neuladen ist deaktiviert.\n" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "WARNUNG: Der Dateiname deines codes hat zwei Dateityperweiterungen\n" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "Du hast das Starten im Sicherheitsmodus ausgelöst durch " - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "Zum beenden bitte resette das board ohne " - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "Sicherheitsmodus aktiv, etwas wirklich schlechtes ist passiert.\n" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "CircuitPython ist abgestürzt. Ups!\n" - -#: main.c:263 -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "" -"Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" -"Die Stromversorgung des Mikrocontrollers ist eingebrochen. Stelle sicher," -"dass deine Stromversorgung\n" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" -"genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " -"sicheren Auswerfen von CIRCUITPY.)\n" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu " "laden" -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "soft reboot\n" @@ -369,7 +331,7 @@ msgstr "Nicht genug Pins vorhanden" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" @@ -383,31 +345,31 @@ msgstr "SDA oder SCL brauchen pull up" msgid "Unsupported baudrate" msgstr "Baudrate wird nicht unterstützt" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "bytes mit merh als 8 bits werden nicht unterstützt" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" msgstr "tx und rx können nicht beide None sein" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "Konnte keinen RX Buffer allozieren" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "Konnte UART nicht initialisieren" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "Kein RX Pin" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "Kein TX Pin" @@ -452,7 +414,7 @@ msgid "pop from an empty PulseIn" msgstr "pop von einem leeren PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "index außerhalb der Reichweite" @@ -822,26 +784,26 @@ msgstr "Alle timer werden benutzt" msgid "All SPI peripherals are in use" msgstr "Alle timer werden benutzt" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:86 +#: ports/nrf/common-hal/busio/UART.c:110 #, fuzzy msgid "Invalid buffer size" msgstr "ungültiger dupterm index" -#: ports/nrf/common-hal/busio/UART.c:90 +#: ports/nrf/common-hal/busio/UART.c:114 #, fuzzy msgid "Odd parity is not supported" msgstr "bytes mit merh als 8 bits werden nicht unterstützt" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 msgid "busio.UART not available" msgstr "" @@ -1345,140 +1307,140 @@ msgstr "" msgid "expecting a dict for keyword args" msgstr "" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" msgstr "" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" msgstr "" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" msgstr "" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" msgstr "" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" msgstr "" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" msgstr "" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" msgstr "" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" msgstr "" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" msgstr "" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" msgstr "" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" msgstr "" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" msgstr "" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" msgstr "" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" msgstr "" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" msgstr "" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" msgstr "" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" msgstr "" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" msgstr "" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" msgstr "" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" msgstr "" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" msgstr "" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" msgstr "" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" msgstr "" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" msgstr "" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" msgstr "" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" msgstr "" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" msgstr "" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" msgstr "" @@ -1994,6 +1956,14 @@ msgstr "" msgid "stream operation not supported" msgstr "" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "" + #: py/vm.c:255 msgid "local variable referenced before assignment" msgstr "" @@ -2155,14 +2125,18 @@ msgstr "" msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" msgstr "" +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" +msgstr "" + #: shared-bindings/digitalio/DigitalInOut.c:211 msgid "Invalid direction." msgstr "" @@ -2385,15 +2359,15 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" msgstr "" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" msgstr "" -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" msgstr "" @@ -2538,17 +2512,92 @@ msgstr "USB beschäftigt" msgid "USB Error" msgstr "USB Fehler" +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "Du hast das Starten im Sicherheitsmodus ausgelöst durch " + +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "Zum beenden bitte resette das board ohne " + +#: supervisor/shared/safe_mode.c:107 +#, fuzzy +msgid "" +"You are running in safe mode which means something unanticipated happened.\n" +msgstr "Sicherheitsmodus aktiv, etwas wirklich schlechtes ist passiert.\n" + +#: supervisor/shared/safe_mode.c:109 +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 "" + +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:118 +#, 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 "" +"Die Stromversorgung des Mikrocontrollers ist eingebrochen. Stelle sicher," +"dass deine Stromversorgung\n" + +#: supervisor/shared/safe_mode.c:120 +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 "" + +#: supervisor/shared/safe_mode.c:123 +msgid "" +"The reset button was pressed while booting CircuitPython. Press again to " +"exit safe mode.\n" +msgstr "" + #~ msgid "Invalid Service type" #~ msgstr "Ungültiger Diensttyp" -#~ msgid "Can not query for the device address." -#~ msgstr "Kann nicht nach der Geräteadresse suchen." +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Kann GAP Parameter nicht anwenden." + +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." #~ msgid "Cannot set PPCP parameters." #~ msgstr "Kann PPCP Parameter nicht setzen." -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Kann GAP Parameter nicht anwenden." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem " +#~ "sicheren Auswerfen von CIRCUITPY.)\n" + +#~ msgid "Can not query for the device address." +#~ msgstr "Kann nicht nach der Geräteadresse suchen." + +#~ msgid "Can not add Characteristic." +#~ msgstr "Kann das Merkmal nicht hinzufügen." #~ msgid "Can not encode UUID, to check length." #~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." @@ -2556,14 +2605,13 @@ msgstr "USB Fehler" #~ msgid "Can encode UUID into the advertisement packet." #~ msgstr "Kann UUID in das advertisement packet kodieren." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." - -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" - #~ msgid "Can not add Service." #~ msgstr "Kann den Dienst nicht hinzufügen." -#~ msgid "Can not add Characteristic." -#~ msgstr "Kann das Merkmal nicht hinzufügen." +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "CircuitPython ist abgestürzt. Ups!\n" diff --git a/locale/en_US.po b/locale/en_US.po index e7bcf1c08..119dde3d6 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: 2018-11-09 15:57-0800\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -131,7 +131,7 @@ msgstr "" msgid "invalid dupterm index" msgstr "" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "" @@ -151,70 +151,37 @@ msgstr "" msgid "script compilation not supported" msgstr "" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr "" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "" - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "" - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "" - -#: main.c:263 -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "" @@ -360,7 +327,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" @@ -374,31 +341,31 @@ msgstr "" msgid "Unsupported baudrate" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "" @@ -443,7 +410,7 @@ msgid "pop from an empty PulseIn" msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "" @@ -807,24 +774,24 @@ msgstr "" msgid "All SPI peripherals are in use" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:86 +#: ports/nrf/common-hal/busio/UART.c:110 msgid "Invalid buffer size" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:90 +#: ports/nrf/common-hal/busio/UART.c:114 msgid "Odd parity is not supported" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 msgid "busio.UART not available" msgstr "" @@ -1325,140 +1292,140 @@ msgstr "" msgid "expecting a dict for keyword args" msgstr "" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" msgstr "" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" msgstr "" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" msgstr "" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" msgstr "" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" msgstr "" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" msgstr "" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" msgstr "" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" msgstr "" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" msgstr "" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" msgstr "" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" msgstr "" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" msgstr "" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" msgstr "" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" msgstr "" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" msgstr "" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" msgstr "" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" msgstr "" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" msgstr "" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" msgstr "" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" msgstr "" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" msgstr "" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" msgstr "" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" msgstr "" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" msgstr "" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" msgstr "" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" msgstr "" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" msgstr "" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" msgstr "" @@ -1974,6 +1941,14 @@ msgstr "" msgid "stream operation not supported" msgstr "" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "" + #: py/vm.c:255 msgid "local variable referenced before assignment" msgstr "" @@ -2132,14 +2107,18 @@ msgstr "" msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" msgstr "" +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" +msgstr "" + #: shared-bindings/digitalio/DigitalInOut.c:211 msgid "Invalid direction." msgstr "" @@ -2361,15 +2340,15 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" msgstr "" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" msgstr "" -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" msgstr "" @@ -2512,3 +2491,58 @@ msgstr "" #: shared-module/usb_hid/Device.c:59 msgid "USB Error" msgstr "" + +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "" + +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "" + +#: supervisor/shared/safe_mode.c:107 +msgid "" +"You are running in safe mode which means something unanticipated happened.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:109 +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 "" + +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:118 +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 "" + +#: supervisor/shared/safe_mode.c:120 +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 "" + +#: supervisor/shared/safe_mode.c:123 +msgid "" +"The reset button was pressed while booting CircuitPython. Press again to " +"exit safe mode.\n" +msgstr "" diff --git a/locale/es.po b/locale/es.po index e9e97842a..29c69d49c 100644 --- a/locale/es.po +++ b/locale/es.po @@ -2,12 +2,13 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Carlos Diaz <carlos.santiago.diaz@gmail.com>, 2018. +# Juan Biondi <juanernestobiondi@gmail.com>, 2018. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-09 16:20-0800\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -65,11 +66,11 @@ msgstr "string de longitud impar" #: extmod/modubinascii.c:101 msgid "non-hex digit found" -msgstr "se encontró un digito non-hex" +msgstr "digito non-hex encontrado" #: extmod/modubinascii.c:169 msgid "incorrect padding" -msgstr "padding incorrecto" +msgstr "relleno (padding) incorrecto" #: extmod/moductypes.c:122 msgid "syntax error in uctypes descriptor" @@ -121,7 +122,7 @@ msgstr "certificado inválido" #: extmod/modutimeq.c:131 msgid "queue overflow" -msgstr "desbordamiento de queue" +msgstr "desbordamiento de cola(queue)" #: extmod/moduzlib.c:98 msgid "compression header" @@ -131,7 +132,7 @@ msgstr "encabezado de compresión" msgid "invalid dupterm index" msgstr "index dupterm inválido" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "Sistema de archivos de solo-Lectura" @@ -151,11 +152,11 @@ msgstr "argumentos inválidos" msgid "script compilation not supported" msgstr "script de compilación no soportado" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr " salida:\n" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,77 +164,37 @@ msgstr "" "Auto-reload habilitado. Simplemente guarda los archivos via USB para " "ejecutarlos o entra al REPL para desabilitarlos.\n" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "Auto-recarga deshabilitada.\n" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "ADVERTENCIA: El nombre de archivo de tu código tiene dos extensiones\n" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "Solicitaste iniciar en modo seguro por " - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "Para salir, por favor reinicia la tarjeta sin " - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "" -"Estás ejecutando en modo seguro, lo cual significa que algo realmente malo " -"ha sucedido.\n" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" - -#: main.c:263 -#, fuzzy -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "" -"Por favor registra un issue en el siguiente URL con los contenidos de tu " -"unidad de almacenamiento CIRCUITPY:\n" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" -"La alimentación del microcontrolador cayó. Por favor asegurate de que tu " -"fuente de alimentación provee\n" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" -"suficiente poder para todo el circuito y presiona reset (después de expulsar " -"CIRCUITPY).\n" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Presiona cualquier tecla para entrar al REPL. Usa CTRL-D para recargar." -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "reinicio suave\n" #: ports/atmel-samd/audio_dma.c:209 #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361 msgid "All sync event channels in use" -msgstr "Todos los sync event channels están siendo utilizados" +msgstr "" +"Todos los canales de eventos de sincronización(sync event channels) están " +"siendo utilizados" #: ports/atmel-samd/bindings/samd/Clock.c:135 msgid "calibration is read only" @@ -245,15 +206,15 @@ msgstr "calibration esta fuera de rango" #: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 msgid "No default I2C bus" -msgstr "Sin bus I2C por default" +msgstr "Sin bus I2C por defecto" #: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64 msgid "No default SPI bus" -msgstr "Sin bus SPI por default" +msgstr "Sin bus SPI por defecto" #: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91 msgid "No default UART bus" -msgstr "Sin bus UART por default" +msgstr "Sin bus UART por defecto" #: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63 #: ports/nrf/common-hal/analogio/AnalogIn.c:39 @@ -359,7 +320,7 @@ msgstr "Todos los timers en uso" #: ports/atmel-samd/common-hal/audioio/AudioOut.c:285 msgid "All event channels in use" -msgstr "Todos los event channels en uso" +msgstr "Todos los canales de eventos en uso" #: ports/atmel-samd/common-hal/audioio/AudioOut.c:375 #, c-format @@ -372,7 +333,7 @@ msgstr "No hay suficientes pines disponibles" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" @@ -386,31 +347,31 @@ msgstr "SDA o SCL necesitan una pull up" msgid "Unsupported baudrate" msgstr "Baudrate no soportado" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "bytes > 8 bits no soportados" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" msgstr "Ambos tx y rx no pueden ser None" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "Ha fallado la asignación del buffer RX" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "No se puede inicializar la UART" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "Sin pin RX" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "Sin pin TX" @@ -455,7 +416,7 @@ msgid "pop from an empty PulseIn" msgstr "pop de un PulseIn vacío" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "index fuera de rango" @@ -697,17 +658,17 @@ msgstr "" #: ports/nrf/common-hal/bleio/Adapter.c:125 #, c-format msgid "Failed to change softdevice state, error: 0x%08lX" -msgstr "" +msgstr "No se puede cambiar el estado del softdevice, error: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:135 #, c-format msgid "Failed to get softdevice state, error: 0x%08lX" -msgstr "" +msgstr "No se puede obtener el estado del softdevice, error: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:155 #, c-format msgid "Failed to get local address, error: 0x%08lX" -msgstr "" +msgstr "No se puede obtener la dirección local, error: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:52 #, fuzzy, c-format @@ -729,7 +690,7 @@ msgstr "No se puede leer el valor del atributo. status 0x%02x" #: ports/nrf/common-hal/bleio/Device.c:307 #, c-format msgid "Failed to acquire mutex, status: 0x%08lX" -msgstr "" +msgstr "No se puede adquirir el mutex, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:126 #, fuzzy, c-format @@ -743,7 +704,7 @@ msgstr "No se puede escribir el valor del atributo. status: 0x%02x" #: ports/nrf/common-hal/bleio/Device.c:391 #, c-format msgid "Failed to release mutex, status: 0x%08lX" -msgstr "" +msgstr "No se puede liberar el mutex, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:81 #: ports/nrf/common-hal/bleio/Device.c:114 @@ -754,7 +715,7 @@ msgstr "Los datos no caben en el paquete de anuncio." #: ports/nrf/common-hal/bleio/Device.c:266 #, c-format msgid "Failed to discover serivices, status: 0x%08lX" -msgstr "" +msgstr "No se puede descubrir servicios, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:403 #: ports/nrf/common-hal/bleio/Scanner.c:76 @@ -796,7 +757,7 @@ msgstr "No se puede leer el valor del atributo. status 0x%02x" #: ports/nrf/common-hal/bleio/Service.c:83 #, c-format msgid "Failed to add characteristic, status: 0x%08lX" -msgstr "" +msgstr "No se puede añadir caracteristica, status: 0x%08lX" #: ports/nrf/common-hal/bleio/UUID.c:97 #, fuzzy, c-format @@ -821,24 +782,24 @@ msgstr "Todos los timers están siendo usados" msgid "All SPI peripherals are in use" msgstr "Todos los timers están siendo usados" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" msgstr "error = 0x%08lx" -#: ports/nrf/common-hal/busio/UART.c:86 +#: ports/nrf/common-hal/busio/UART.c:110 msgid "Invalid buffer size" msgstr "Tamaño de buffer inválido" -#: ports/nrf/common-hal/busio/UART.c:90 +#: ports/nrf/common-hal/busio/UART.c:114 msgid "Odd parity is not supported" msgstr "Paridad impar no soportada" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 msgid "busio.UART not available" msgstr "busio.UART no disponible" @@ -865,7 +826,7 @@ msgstr "ffi_prep_closure_loc" #: ports/unix/modffi.c:413 msgid "Don't know how to pass object to native function" -msgstr "" +msgstr "No se sabe cómo pasar objeto a función nativa" #: ports/unix/modusocket.c:474 #, c-format @@ -889,7 +850,7 @@ msgstr "a la función le hacen falta %d argumentos posicionales requeridos" #: py/argcheck.c:72 #, c-format msgid "function expected at most %d arguments, got %d" -msgstr "la función esperaba a lo sumo %d argumentos, tiene %d" +msgstr "la función esperaba minimo %d argumentos, tiene %d" #: py/argcheck.c:97 msgid "'%q' argument required" @@ -897,23 +858,25 @@ msgstr "argumento '%q' requerido" #: py/argcheck.c:122 msgid "extra positional arguments given" -msgstr "" +msgstr "argumento posicional adicional dado" #: py/argcheck.c:130 msgid "extra keyword arguments given" -msgstr "" +msgstr "argumento(s) por palabra clave adicionales fueron dados" #: py/argcheck.c:142 msgid "argument num/types mismatch" -msgstr "" +msgstr "argumento número/tipos no coinciden" #: py/argcheck.c:147 msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" +"argumento(s) por palabra clave aún no implementados - usa argumentos " +"normales en su lugar" #: py/bc.c:88 py/objnamedtuple.c:108 msgid "%q() takes %d positional arguments but %d were given" -msgstr "" +msgstr "%q() toma %d argumentos posicionales pero %d fueron dados" #: py/bc.c:197 py/bc.c:215 msgid "unexpected keyword argument" @@ -925,32 +888,32 @@ msgstr "palabras clave deben ser strings" #: py/bc.c:206 py/objnamedtuple.c:138 msgid "function got multiple values for argument '%q'" -msgstr "" +msgstr "la función tiene múltiples valores para el argumento '%q'" #: py/bc.c:218 py/objnamedtuple.c:130 msgid "unexpected keyword argument '%q'" -msgstr "" +msgstr "argumento por palabra clave inesperado '%q'" #: py/bc.c:244 #, c-format msgid "function missing required positional argument #%d" -msgstr "" +msgstr "la función requiere del argumento posicional #%d" #: py/bc.c:260 msgid "function missing required keyword argument '%q'" -msgstr "" +msgstr "la función requiere del argumento por palabra clave '%q'" #: py/bc.c:269 msgid "function missing keyword-only argument" -msgstr "" +msgstr "falta palabra clave para función" #: py/binary.c:112 msgid "bad typecode" -msgstr "" +msgstr "typecode erroneo" #: py/builtinevex.c:99 msgid "bad compile mode" -msgstr "" +msgstr "modo de compilación erroneo" #: py/builtinhelp.c:137 #, fuzzy @@ -966,10 +929,16 @@ msgid "" "\n" "To list built-in modules please do `help(\"modules\")`.\n" msgstr "" +"Bienvenido a Adafruit CircuitPython %s!\n" +"\n" +"Visita learn.adafruit.com/category/circuitpython para obtener guías de " +"proyectos.\n" +"\n" +"Para listar los módulos incorporados por favor haga `help(\"modules\")`.\n" #: py/builtinimport.c:336 msgid "cannot perform relative import" -msgstr "" +msgstr "no se puedo realizar importación relativa" #: py/builtinimport.c:420 py/builtinimport.c:532 msgid "module not found" @@ -985,23 +954,23 @@ msgstr "import relativo" #: py/compile.c:397 py/compile.c:542 msgid "can't assign to expression" -msgstr "" +msgstr "no se puede asignar a la expresión" #: py/compile.c:416 msgid "multiple *x in assignment" -msgstr "" +msgstr "múltiples *x en la asignación" #: py/compile.c:642 msgid "non-default argument follows default argument" -msgstr "" +msgstr "argumento no predeterminado sigue argumento predeterminado" #: py/compile.c:771 py/compile.c:789 msgid "invalid micropython decorator" -msgstr "" +msgstr "decorador de micropython inválido" #: py/compile.c:943 msgid "can't delete expression" -msgstr "" +msgstr "no se puede borrar la expresión" #: py/compile.c:955 msgid "'break' outside loop" @@ -1017,64 +986,66 @@ msgstr "'return' fuera de una función" #: py/compile.c:1169 msgid "identifier redefined as global" -msgstr "" +msgstr "identificador redefinido como global" #: py/compile.c:1185 msgid "no binding for nonlocal found" -msgstr "" +msgstr "no se ha encontrado ningún enlace para nonlocal" #: py/compile.c:1188 msgid "identifier redefined as nonlocal" -msgstr "" +msgstr "identificador redefinido como nonlocal" #: py/compile.c:1197 msgid "can't declare nonlocal in outer code" -msgstr "" +msgstr "no se puede declarar nonlocal" #: py/compile.c:1542 msgid "default 'except' must be last" -msgstr "" +msgstr "'except' por defecto deberia estar de último" #: py/compile.c:2095 msgid "*x must be assignment target" -msgstr "" +msgstr "*x debe ser objetivo de la tarea" #: py/compile.c:2193 msgid "super() can't find self" -msgstr "" +msgstr "super() no puede encontrar self" #: py/compile.c:2256 msgid "can't have multiple *x" -msgstr "" +msgstr "no puede tener multiples *x" #: py/compile.c:2263 msgid "can't have multiple **x" -msgstr "" +msgstr "no puede tener multiples *x" #: py/compile.c:2271 msgid "LHS of keyword arg must be an id" -msgstr "" +msgstr "LHS del agumento por palabra clave deberia ser un identificador" #: py/compile.c:2287 msgid "non-keyword arg after */**" -msgstr "" +msgstr "no deberia estar/tener agumento por palabra clave despues de */**" #: py/compile.c:2291 msgid "non-keyword arg after keyword arg" msgstr "" +"no deberia estar/tener agumento por palabra clave despues de argumento por " +"palabra clave" #: py/compile.c:2463 py/compile.c:2473 py/compile.c:2712 py/compile.c:2742 #: py/parse.c:1176 msgid "invalid syntax" -msgstr "" +msgstr "sintaxis inválida" #: py/compile.c:2465 msgid "expecting key:value for dict" -msgstr "" +msgstr "esperando la clave:valor para dict" #: py/compile.c:2475 msgid "expecting just a value for set" -msgstr "" +msgstr "esperando solo un valor para set" #: py/compile.c:2600 msgid "'yield' outside function" @@ -1083,69 +1054,69 @@ msgstr "" #: py/compile.c:2619 msgid "'await' outside function" -msgstr "" +msgstr "'await' fuera de la función" #: py/compile.c:2774 msgid "name reused for argument" -msgstr "" +msgstr "nombre reusado para argumento" #: py/compile.c:2827 msgid "parameter annotation must be an identifier" -msgstr "" +msgstr "parámetro de anotación debe ser un identificador" #: py/compile.c:2969 py/compile.c:3137 msgid "return annotation must be an identifier" -msgstr "" +msgstr "la anotación de retorno debe ser un identificador" #: py/compile.c:3097 msgid "inline assembler must be a function" -msgstr "" +msgstr "ensamblador en línea debe ser una función" #: py/compile.c:3134 msgid "unknown type" -msgstr "" +msgstr "tipo desconocido" #: py/compile.c:3154 msgid "expecting an assembler instruction" -msgstr "" +msgstr "esperando una instrucción de ensamblador" #: py/compile.c:3184 msgid "'label' requires 1 argument" -msgstr "" +msgstr "'label' requiere 1 argumento" #: py/compile.c:3190 msgid "label redefined" -msgstr "" +msgstr "etiqueta redefinida" #: py/compile.c:3196 msgid "'align' requires 1 argument" -msgstr "" +msgstr "'align' requiere 1 argumento" #: py/compile.c:3205 msgid "'data' requires at least 2 arguments" -msgstr "" +msgstr "'data' requiere como minomo 2 argumentos" #: py/compile.c:3212 msgid "'data' requires integer arguments" -msgstr "" +msgstr "'data' requiere argumentos de tipo entero" #: py/emitinlinethumb.c:102 msgid "can only have up to 4 parameters to Thumb assembly" -msgstr "" +msgstr "solo puede tener hasta 4 parámetros para ensamblar Thumb" #: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112 msgid "parameters must be registers in sequence r0 to r3" -msgstr "" +msgstr "los parametros deben ser registros en secuencia del r0 al r3" #: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230 #, c-format msgid "'%s' expects at most r%d" -msgstr "" +msgstr "'%s' espera a lo sumo r%d" #: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162 #, c-format msgid "'%s' expects a register" -msgstr "" +msgstr "'%s' espera un registro" #: py/emitinlinethumb.c:211 #, c-format @@ -1155,41 +1126,41 @@ msgstr "ord espera un carácter" #: py/emitinlinethumb.c:239 #, c-format msgid "'%s' expects an FPU register" -msgstr "" +msgstr "'%s' espera un registro de FPU" #: py/emitinlinethumb.c:292 #, c-format msgid "'%s' expects {r0, r1, ...}" -msgstr "" +msgstr "'%s' espera {r0, r1, ...}" #: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169 #, c-format msgid "'%s' expects an integer" -msgstr "" +msgstr "'%s' espera un entero" #: py/emitinlinethumb.c:304 #, c-format msgid "'%s' integer 0x%x does not fit in mask 0x%x" -msgstr "" +msgstr "'%s' entero 0x%x no cabe en la máscara 0x%x" #: py/emitinlinethumb.c:328 #, c-format msgid "'%s' expects an address of the form [a, b]" -msgstr "" +msgstr "'%s' espera una dirección de forma [a, b]" #: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182 #, c-format msgid "'%s' expects a label" -msgstr "" +msgstr "'%s' espera una etiqueta" #: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193 msgid "label '%q' not defined" -msgstr "" +msgstr "etiqueta '%q' no definida" #: py/emitinlinethumb.c:806 #, c-format msgid "unsupported Thumb instruction '%s' with %d arguments" -msgstr "" +msgstr "instrucción de tipo Thumb no admitida '%s' con %d argumentos" #: py/emitinlinethumb.c:810 msgid "branch not in range" @@ -1197,77 +1168,77 @@ msgstr "El argumento de chr() no esta en el rango(256)" #: py/emitinlinextensa.c:86 msgid "can only have up to 4 parameters to Xtensa assembly" -msgstr "" +msgstr "solo puede tener hasta 4 parámetros para ensamblador Xtensa" #: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96 msgid "parameters must be registers in sequence a2 to a5" -msgstr "" +msgstr "los parámetros deben ser registros en secuencia de a2 a a5" #: py/emitinlinextensa.c:174 #, c-format msgid "'%s' integer %d is not within range %d..%d" -msgstr "" +msgstr "'%s' entero %d no esta dentro del rango %d..%d" #: py/emitinlinextensa.c:327 #, c-format msgid "unsupported Xtensa instruction '%s' with %d arguments" -msgstr "" +msgstr "instrucción Xtensa '%s' con %d argumentos no soportada" #: py/emitnative.c:183 msgid "unknown type '%q'" -msgstr "" +msgstr "tipo desconocido '%q'" #: py/emitnative.c:260 msgid "Viper functions don't currently support more than 4 arguments" -msgstr "" +msgstr "funciones Viper actualmente no soportan más de 4 argumentos." #: py/emitnative.c:742 msgid "conversion to object" -msgstr "" +msgstr "conversión a objeto" #: py/emitnative.c:921 msgid "local '%q' used before type known" -msgstr "" +msgstr "variable local '%q' usada antes del tipo conocido" #: py/emitnative.c:1118 py/emitnative.c:1156 msgid "can't load from '%q'" -msgstr "" +msgstr "no se puede cargar desde '%q'" #: py/emitnative.c:1128 msgid "can't load with '%q' index" -msgstr "" +msgstr "no se puede cargar con el índice '%q'" #: py/emitnative.c:1188 msgid "local '%q' has type '%q' but source is '%q'" -msgstr "" +msgstr "la variable local '%q' tiene el tipo '%q' pero la fuente es '%q'" #: py/emitnative.c:1289 py/emitnative.c:1379 msgid "can't store '%q'" -msgstr "" +msgstr "no se puede almacenar '%q'" #: py/emitnative.c:1358 py/emitnative.c:1419 msgid "can't store to '%q'" -msgstr "" +msgstr "no se puede almacenar para '%q'" #: py/emitnative.c:1369 msgid "can't store with '%q' index" -msgstr "" +msgstr "no se puede almacenar con el indice '%q'" #: py/emitnative.c:1540 msgid "can't implicitly convert '%q' to 'bool'" -msgstr "" +msgstr "no se puede convertir implícitamente '%q' a 'bool'" #: py/emitnative.c:1774 msgid "unary op %q not implemented" -msgstr "" +msgstr "Operación unica %q no implementada" #: py/emitnative.c:1930 msgid "binary op %q not implemented" -msgstr "" +msgstr "operacion binaria %q no implementada" #: py/emitnative.c:1951 msgid "can't do binary op between '%q' and '%q'" -msgstr "" +msgstr "no se puede hacer una operacion binaria entre '%q' y '%q'" #: py/emitnative.c:2126 msgid "casting" @@ -1275,11 +1246,11 @@ msgstr "" #: py/emitnative.c:2173 msgid "return expected '%q' but got '%q'" -msgstr "" +msgstr "retorno esperado '%q' pero se obtuvo '%q'" #: py/emitnative.c:2191 msgid "must raise an object" -msgstr "" +msgstr "debe hacer un raise de un objeto" #: py/emitnative.c:2201 msgid "native yield" @@ -1299,7 +1270,7 @@ msgstr "El argumento de chr() no esta en el rango(256)" #: py/modbuiltins.c:285 msgid "arg is an empty sequence" -msgstr "" +msgstr "argumento es una secuencia vacía" #: py/modbuiltins.c:350 msgid "ord expects a character" @@ -1312,7 +1283,7 @@ msgstr "ord() espera un carácter, pero encontró un string de longitud %d" #: py/modbuiltins.c:363 msgid "3-arg pow() not supported" -msgstr "" +msgstr "pow() con 3 argumentos no soportado" #: py/modbuiltins.c:517 msgid "must use keyword argument for key function" @@ -1320,12 +1291,12 @@ msgstr "" #: py/modmath.c:41 shared-bindings/math/__init__.c:53 msgid "math domain error" -msgstr "" +msgstr "error de dominio matemático" #: py/modmath.c:196 py/objfloat.c:270 py/objint_longlong.c:222 #: py/objint_mpz.c:230 py/runtime.c:619 shared-bindings/math/__init__.c:346 msgid "division by zero" -msgstr "" +msgstr "división por cero" #: py/modmicropython.c:155 msgid "schedule stack full" @@ -1339,173 +1310,173 @@ msgstr "buffer demasiado pequeño" #: py/modthread.c:240 msgid "expecting a dict for keyword args" -msgstr "" +msgstr "esperando un diccionario para argumentos por palabra clave" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" -msgstr "" +msgstr "Permiso denegado" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" -msgstr "" +msgstr "No existe el archivo/directorio" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" -msgstr "" +msgstr "error Input/output" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" -msgstr "" +msgstr "El archivo ya existe" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" -msgstr "Operacion no soportada" +msgstr "Operación no soportada" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "Argumento inválido" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" -msgstr "" +msgstr " Archivo \"%q\", línea %d" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" -msgstr "" +msgstr " Archivo \"%q\"" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" -msgstr "" +msgstr ", en %q\n" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" -msgstr "" +msgstr "no se puede convertir a int" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" -msgstr "" +msgstr "no se puede convertir %s a int" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" -msgstr "" +msgstr "no se puede convertir a float" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" -msgstr "" +msgstr "no se puede convertir %s a float" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" -msgstr "" +msgstr "no se puede convertir a complejo" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" -msgstr "" +msgstr "no se puede convertir %s a complejo" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" -msgstr "" +msgstr "tupla/lista esperada" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" -msgstr "" +msgstr "el objeto '%s' no es una tupla o lista" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" -msgstr "" +msgstr "tupla/lista tiene una longitud incorrecta" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" -msgstr "" +msgstr "longitud solicitada %d pero el objeto tiene longitud %d" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" -msgstr "" +msgstr "indices deben ser enteros" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" -msgstr "" +msgstr "%q indices deben ser enteros, no %s" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" -msgstr "%w index fuera de rango" +msgstr "%w indice fuera de rango" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" -msgstr "" +msgstr "el objeto no tiene longitud" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" -msgstr "" +msgstr "el objeto de tipo '%s' no tiene len()" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" -msgstr "object no soporta supresión de item" +msgstr "object no soporta la eliminación de elementos" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" -msgstr "" +msgstr "objeto '%s' no soporta la eliminación de elementos" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" -msgstr "" +msgstr "el objeto no soporta la asignación de elementos" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" -msgstr "" +msgstr "el objeto '%s' no soporta la asignación de elementos" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" -msgstr "" +msgstr "objeto con protocolo de buffer requerido" #: py/objarray.c:413 py/objstr.c:427 py/objstrunicode.c:191 py/objtuple.c:187 #: shared-bindings/nvm/ByteArray.c:85 msgid "only slices with step=1 (aka None) are supported" -msgstr "" +msgstr "solo se admiten segmentos con step=1 (alias None)" #: py/objarray.c:426 msgid "lhs and rhs should be compatible" -msgstr "" +msgstr "lhs y rhs deben ser compatibles" #: py/objarray.c:444 shared-bindings/nvm/ByteArray.c:107 msgid "array/bytes required on right side" -msgstr "" +msgstr "array/bytes requeridos en el lado derecho" #: py/objcomplex.c:203 msgid "can't do truncated division of a complex number" -msgstr "" +msgstr "no se puede hacer la división truncada de un número complejo" #: py/objcomplex.c:209 msgid "complex division by zero" -msgstr "" +msgstr "división compleja por cero" #: py/objcomplex.c:237 msgid "0.0 to a complex power" -msgstr "" +msgstr "0.0 a una potencia compleja" #: py/objdeque.c:107 msgid "full" -msgstr "" +msgstr "lleno" #: py/objdeque.c:127 msgid "empty" @@ -1513,11 +1484,11 @@ msgstr "vacío" #: py/objdict.c:314 msgid "popitem(): dictionary is empty" -msgstr "" +msgstr "popitem(): diccionario vacío" #: py/objdict.c:357 msgid "dict update sequence has wrong length" -msgstr "" +msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta" #: py/objfloat.c:308 py/parsenum.c:331 msgid "complex values not supported" @@ -1526,26 +1497,27 @@ msgstr "valores complejos no soportados" #: py/objgenerator.c:108 msgid "can't send non-None value to a just-started generator" msgstr "" +"no se puede enviar un valor que no sea None a un generador recién iniciado" #: py/objgenerator.c:126 msgid "generator already executing" -msgstr "" +msgstr "generador ya se esta ejecutando" #: py/objgenerator.c:229 msgid "generator ignored GeneratorExit" -msgstr "" +msgstr "generador ignorado GeneratorExit" #: py/objgenerator.c:251 msgid "can't pend throw to just-started generator" -msgstr "" +msgstr "no se puede colgar al generador recién iniciado" #: py/objint.c:144 msgid "can't convert inf to int" -msgstr "" +msgstr "no se puede convertir inf en int" #: py/objint.c:146 msgid "can't convert NaN to int" -msgstr "" +msgstr "no se puede convertir Nan a int" #: py/objint.c:163 msgid "float too big" @@ -1573,11 +1545,11 @@ msgstr "" #: py/objint_mpz.c:336 msgid "pow() with 3 arguments requires integers" -msgstr "" +msgstr "pow() con 3 argumentos requiere enteros" #: py/objint_mpz.c:347 msgid "pow() 3rd argument cannot be 0" -msgstr "" +msgstr "el 3er argumento de pow() no puede ser 0" #: py/objint_mpz.c:415 msgid "overflow converting long int to machine word" @@ -1589,7 +1561,7 @@ msgstr "" #: py/objnamedtuple.c:92 msgid "can't set attribute" -msgstr "" +msgstr "no se puede asignar el atributo" #: py/objobject.c:55 msgid "__new__ arg must be a user-type" @@ -1609,7 +1581,7 @@ msgstr "Length debe ser un int" #: py/objslice.c:71 msgid "Length must be non-negative" -msgstr "" +msgstr "Longitud no deberia ser negativa" #: py/objslice.c:86 py/sequence.c:57 msgid "slice step cannot be zero" @@ -1625,11 +1597,12 @@ msgstr "valor de bytes fuera de rango" #: py/objstr.c:270 msgid "wrong number of arguments" -msgstr "" +msgstr "numero erroneo de argumentos" #: py/objstr.c:467 msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" +"join espera una lista de objetos str/bytes consistentes con el mismo objeto" #: py/objstr.c:542 py/objstr.c:647 py/objstr.c:1744 msgid "empty separator" @@ -1649,7 +1622,7 @@ msgstr "" #: py/objstr.c:931 msgid "bad format string" -msgstr "" +msgstr "formato de string erroneo" #: py/objstr.c:953 msgid "single '}' encountered in format string" @@ -1657,16 +1630,16 @@ msgstr "" #: py/objstr.c:992 msgid "bad conversion specifier" -msgstr "" +msgstr "especificador de conversion erroneo" #: py/objstr.c:996 msgid "end of format while looking for conversion specifier" -msgstr "" +msgstr "el final del formato mientras se busca el especificador de conversión" #: py/objstr.c:998 #, c-format msgid "unknown conversion specifier %c" -msgstr "" +msgstr "especificador de conversión %c desconocido" #: py/objstr.c:1029 msgid "unmatched '{' in format" @@ -1674,12 +1647,14 @@ msgstr "" #: py/objstr.c:1036 msgid "expected ':' after format specifier" -msgstr "" +msgstr "se espera ':' despues de un especificaro de tipo format" #: py/objstr.c:1050 msgid "" "can't switch from automatic field numbering to manual field specification" msgstr "" +"no se puede cambiar de la numeración automática de campos a la " +"especificación de campo manual" #: py/objstr.c:1055 py/objstr.c:1083 msgid "tuple index out of range" @@ -1778,16 +1753,16 @@ msgstr "string index fuera de rango" #: py/objtype.c:358 msgid "__init__() should return None" -msgstr "" +msgstr "__init__() deberia devolver None" #: py/objtype.c:360 #, c-format msgid "__init__() should return None, not '%s'" -msgstr "" +msgstr "__init__() deberia devolver None, no '%s'" #: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065 msgid "unreadable attribute" -msgstr "" +msgstr "atributo no legible" #: py/objtype.c:868 py/runtime.c:653 msgid "object not callable" @@ -1800,27 +1775,27 @@ msgstr "" #: py/objtype.c:978 msgid "type takes 1 or 3 arguments" -msgstr "" +msgstr "type acepta 1 o 3 argumentos" #: py/objtype.c:989 msgid "cannot create instance" -msgstr "" +msgstr "no se puede crear instancia" #: py/objtype.c:991 msgid "cannot create '%q' instances" -msgstr "" +msgstr "no se pueden crear '%q' instancias" #: py/objtype.c:1047 msgid "can't add special method to already-subclassed class" -msgstr "" +msgstr "no se puede agregar un método a una clase ya subclasificada" #: py/objtype.c:1091 py/objtype.c:1097 msgid "type is not an acceptable base type" -msgstr "" +msgstr "type no es un tipo de base aceptable" #: py/objtype.c:1100 msgid "type '%q' is not an acceptable base type" -msgstr "" +msgstr "type '%q' no es un tipo de base aceptable" #: py/objtype.c:1137 msgid "multiple inheritance not supported" @@ -1832,7 +1807,7 @@ msgstr "" #: py/objtype.c:1205 msgid "first argument to super() must be type" -msgstr "" +msgstr "primer argumento para super() debe ser de tipo" #: py/objtype.c:1370 msgid "issubclass() arg 2 must be a class or a tuple of classes" @@ -1864,16 +1839,16 @@ msgstr "" #: py/parsenum.c:151 msgid "invalid syntax for integer" -msgstr "sintaxis inválido para entero" +msgstr "sintaxis inválida para entero" #: py/parsenum.c:155 #, c-format msgid "invalid syntax for integer with base %d" -msgstr "" +msgstr "sintaxis inválida para entero con base %d" #: py/parsenum.c:339 msgid "invalid syntax for number" -msgstr "sintaxis inválido para número" +msgstr "sintaxis inválida para número" #: py/parsenum.c:342 msgid "decimal numbers not supported" @@ -1884,10 +1859,12 @@ msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." msgstr "" +"Archivo .mpy incompatible. Actualice todos los archivos .mpy. Consulte " +"http://adafru.it/mpy-update para más información" #: py/persistentcode.c:326 msgid "can only save bytecode" -msgstr "" +msgstr "solo puede almacenar bytecode" #: py/runtime.c:206 msgid "name not defined" @@ -1895,75 +1872,75 @@ msgstr "name no definido" #: py/runtime.c:209 msgid "name '%q' is not defined" -msgstr "" +msgstr "name '%q' no esta definido" #: py/runtime.c:304 py/runtime.c:611 msgid "unsupported type for operator" -msgstr "" +msgstr "tipo de operador no soportado" #: py/runtime.c:307 msgid "unsupported type for %q: '%s'" -msgstr "" +msgstr "tipo no soportado para %q: '%s'" #: py/runtime.c:614 msgid "unsupported types for %q: '%s', '%s'" -msgstr "" +msgstr "tipos no soportados para %q: '%s', '%s'" #: py/runtime.c:881 py/runtime.c:888 py/runtime.c:945 msgid "wrong number of values to unpack" -msgstr "" +msgstr "numero erroneo de valores a descomprimir" #: py/runtime.c:883 py/runtime.c:947 #, c-format msgid "need more than %d values to unpack" -msgstr "" +msgstr "necesita más de %d valores para descomprimir" #: py/runtime.c:890 #, c-format msgid "too many values to unpack (expected %d)" -msgstr "" +msgstr "demasiados valores para descomprimir (%d esperado)" #: py/runtime.c:984 msgid "argument has wrong type" -msgstr "" +msgstr "el argumento tiene un tipo erroneo" #: py/runtime.c:986 msgid "argument should be a '%q' not a '%q'" -msgstr "" +msgstr "argumento deberia ser un '%q' no un '%q'" #: py/runtime.c:1123 py/runtime.c:1197 msgid "no such attribute" -msgstr "" +msgstr "no hay tal atributo" #: py/runtime.c:1128 msgid "type object '%q' has no attribute '%q'" -msgstr "" +msgstr "objeto de tipo '%q' no tiene atributo '%q'" #: py/runtime.c:1132 py/runtime.c:1200 msgid "'%s' object has no attribute '%q'" -msgstr "" +msgstr "objeto '%s' no tiene atributo '%q'" #: py/runtime.c:1238 msgid "object not iterable" -msgstr "" +msgstr "objeto no iterable" #: py/runtime.c:1241 #, c-format msgid "'%s' object is not iterable" -msgstr "" +msgstr "objeto '%s' no es iterable" #: py/runtime.c:1260 py/runtime.c:1296 msgid "object not an iterator" -msgstr "" +msgstr "objeto no es un iterator" #: py/runtime.c:1262 py/runtime.c:1298 #, c-format msgid "'%s' object is not an iterator" -msgstr "" +msgstr "objeto '%s' no es un iterator" #: py/runtime.c:1401 msgid "exceptions must derive from BaseException" -msgstr "" +msgstr "las excepciones deben derivar de BaseException" #: py/runtime.c:1430 msgid "cannot import name %q" @@ -1971,28 +1948,36 @@ msgstr "no se puede importar name '%q'" #: py/runtime.c:1535 msgid "memory allocation failed, heap is locked" -msgstr "" +msgstr "la asignación de memoria falló, el heap está bloqueado" #: py/runtime.c:1539 #, c-format msgid "memory allocation failed, allocating %u bytes" -msgstr "" +msgstr "la asignación de memoria falló, asignando %u bytes" #: py/runtime.c:1609 msgid "maximum recursion depth exceeded" -msgstr "" +msgstr "profundidad máxima de recursión excedida" #: py/sequence.c:264 msgid "object not in sequence" -msgstr "" +msgstr "objeto no en secuencia" #: py/stream.c:96 msgid "stream operation not supported" msgstr "operación stream no soportada" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "" + #: py/vm.c:255 msgid "local variable referenced before assignment" -msgstr "" +msgstr "variable local referenciada antes de la asignación" #: py/vm.c:1142 msgid "no active exception to reraise" @@ -2000,31 +1985,31 @@ msgstr "" #: py/vm.c:1284 msgid "byte code not implemented" -msgstr "" +msgstr "codigo byte no implementado" #: shared-bindings/_stage/Layer.c:71 msgid "graphic must be 2048 bytes long" -msgstr "" +msgstr "graphic debe ser 2048 bytes de largo" #: shared-bindings/_stage/Layer.c:77 shared-bindings/_stage/Text.c:75 msgid "palette must be 32 bytes long" -msgstr "" +msgstr "palette debe ser 32 bytes de largo" #: shared-bindings/_stage/Layer.c:84 msgid "map buffer too small" -msgstr "" +msgstr "map buffer muy pequeño" #: shared-bindings/_stage/Text.c:69 msgid "font must be 2048 bytes long" -msgstr "" +msgstr "font debe ser 2048 bytes de largo" #: shared-bindings/_stage/Text.c:81 msgid "chars buffer too small" -msgstr "" +msgstr "chars buffer muy pequeño" #: shared-bindings/analogio/AnalogOut.c:118 msgid "AnalogOut is only 16 bits. Value must be less than 65536." -msgstr "" +msgstr "AnalogOut es solo de 16 bits. Value debe ser menos a 65536." #: shared-bindings/audiobusio/I2SOut.c:225 #: shared-bindings/audioio/AudioOut.c:226 @@ -2033,7 +2018,7 @@ msgstr "" #: shared-bindings/audiobusio/PDMIn.c:124 msgid "Bit depth must be multiple of 8." -msgstr "" +msgstr "La profundidad de bits debe ser múltiplo de 8." #: shared-bindings/audiobusio/PDMIn.c:128 msgid "Oversample must be multiple of 8." @@ -2045,11 +2030,11 @@ msgstr "" #: shared-bindings/audiobusio/PDMIn.c:193 msgid "destination_length must be an int >= 0" -msgstr "" +msgstr "destination_length debe ser un int >= 0" #: shared-bindings/audiobusio/PDMIn.c:199 msgid "Cannot record to a file" -msgstr "" +msgstr "No se puede grabar en un archivo" #: shared-bindings/audiobusio/PDMIn.c:202 msgid "Destination capacity is smaller than destination_length." @@ -2063,6 +2048,8 @@ msgstr "" msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" +"el buffer de destino debe ser un bytearray o array de tipo 'B' para " +"bit_depth = 8" #: shared-bindings/audioio/Mixer.c:94 msgid "Invalid voice count" @@ -2095,28 +2082,28 @@ msgstr "buffer debe de ser un objeto bytes-like" #: shared-bindings/audioio/WaveFile.c:78 #: shared-bindings/displayio/OnDiskBitmap.c:85 msgid "file must be a file opened in byte mode" -msgstr "" +msgstr "el archivo deberia ser una archivo abierto en modo byte" #: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 #: shared-bindings/busio/SPI.c:133 msgid "Function requires lock" -msgstr "" +msgstr "La función requiere lock" #: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210 msgid "Buffer must be at least length 1" -msgstr "" +msgstr "Buffer debe ser de longitud 1 como minimo" #: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175 msgid "Invalid polarity" -msgstr "" +msgstr "Polaridad inválida" #: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179 msgid "Invalid phase" -msgstr "" +msgstr "Fase inválida" #: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183 msgid "Invalid number of bits" -msgstr "" +msgstr "Numero inválido de bits" #: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348 msgid "buffer slices must be of equal length" @@ -2124,23 +2111,23 @@ msgstr "" #: shared-bindings/bleio/Address.c:101 msgid "Wrong address length" -msgstr "" +msgstr "Longitud de address erronea" #: shared-bindings/bleio/Address.c:107 msgid "Wrong number of bytes provided" -msgstr "" +msgstr "Numero erroneo de bytes dados" #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" -msgstr "" +msgstr "No se pueden agregar servicio en modo Central" #: shared-bindings/bleio/Device.c:226 msgid "Can't connect in Peripheral mode" -msgstr "" +msgstr "No se puede conectar en modo Peripheral" #: shared-bindings/bleio/Device.c:256 msgid "Can't change the name in Central mode" -msgstr "" +msgstr "No se puede cambiar el nombre en modo Central" #: shared-bindings/bleio/Device.c:277 shared-bindings/bleio/Device.c:313 msgid "Can't advertise in Central mode" @@ -2148,14 +2135,18 @@ msgstr "" #: shared-bindings/busio/I2C.c:120 msgid "Function requires lock." -msgstr "" +msgstr "La función requiere lock" -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" -msgstr "" +msgstr "bits deben ser 7, 8 o 9" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" +msgstr "stop debe ser 1 o 2" + +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c:211 @@ -2164,50 +2155,50 @@ msgstr "Dirección inválida." #: shared-bindings/digitalio/DigitalInOut.c:240 msgid "Cannot set value when direction is input." -msgstr "" +msgstr "No se puede asignar un valor cuando la dirección es input." #: shared-bindings/digitalio/DigitalInOut.c:266 #: shared-bindings/digitalio/DigitalInOut.c:281 msgid "Drive mode not used when direction is input." -msgstr "" +msgstr "Modo Drive no se usa cuando la dirección es input." #: shared-bindings/digitalio/DigitalInOut.c:314 #: shared-bindings/digitalio/DigitalInOut.c:331 msgid "Pull not used when direction is output." -msgstr "" +msgstr "Pull no se usa cuando la dirección es output." #: shared-bindings/digitalio/DigitalInOut.c:340 msgid "Unsupported pull value." -msgstr "" +msgstr "valor pull no soportado." #: shared-bindings/displayio/Bitmap.c:84 msgid "y should be an int" -msgstr "" +msgstr "y deberia ser un int" #: shared-bindings/displayio/Bitmap.c:89 msgid "row buffer must be a bytearray or array of type 'b' or 'B'" -msgstr "" +msgstr "row buffer deberia ser un bytearray o array de tipo 'b' o 'B'" #: shared-bindings/displayio/Bitmap.c:94 msgid "row data must be a buffer" -msgstr "" +msgstr "row data debe ser un buffer" #: shared-bindings/displayio/ColorConverter.c:72 msgid "color should be an int" -msgstr "" +msgstr "color deberia ser un int" #: shared-bindings/displayio/FourWire.c:55 #: shared-bindings/displayio/FourWire.c:64 msgid "displayio is a work in progress" -msgstr "" +msgstr "displayio todavia esta en desarrollo" #: shared-bindings/displayio/Group.c:65 msgid "Group must have size at least 1" -msgstr "" +msgstr "Group debe tener size de minimo 1" #: shared-bindings/displayio/Palette.c:96 msgid "color buffer must be a bytearray or array of type 'b' or 'B'" -msgstr "" +msgstr "color buffer deberia ser un bytearray o array de tipo 'b' o 'B'" #: shared-bindings/displayio/Palette.c:102 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" @@ -2215,54 +2206,54 @@ msgstr "" #: shared-bindings/displayio/Palette.c:106 msgid "color must be between 0x000000 and 0xffffff" -msgstr "" +msgstr "color debe estar entre 0x000000 y 0xffffff" #: shared-bindings/displayio/Palette.c:110 msgid "color buffer must be a buffer or int" -msgstr "" +msgstr "color buffer deber ser un buffer o un int" #: shared-bindings/displayio/Palette.c:123 #: shared-bindings/displayio/Palette.c:137 msgid "palette_index should be an int" -msgstr "" +msgstr "palette_index deberia ser un int" #: shared-bindings/displayio/Sprite.c:48 msgid "position must be 2-tuple" -msgstr "" +msgstr "posición debe ser 2-tuple" #: shared-bindings/displayio/Sprite.c:97 msgid "unsupported bitmap type" -msgstr "" +msgstr "tipo de bitmap no soportado" #: shared-bindings/displayio/Sprite.c:162 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" +msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter" #: shared-bindings/gamepad/GamePad.c:100 msgid "too many arguments" -msgstr "" +msgstr "muchos argumentos" #: shared-bindings/gamepad/GamePad.c:104 msgid "expected a DigitalInOut" -msgstr "" +msgstr "se espera un DigitalInOut" #: shared-bindings/i2cslave/I2CSlave.c:98 msgid "can't convert address to int" -msgstr "" +msgstr "no se puede convertir address a int" #: shared-bindings/i2cslave/I2CSlave.c:101 msgid "address out of bounds" -msgstr "" +msgstr "address fuera de límites" #: shared-bindings/i2cslave/I2CSlave.c:107 msgid "addresses is empty" -msgstr "" +msgstr "addresses esta vacío" #: shared-bindings/microcontroller/Pin.c:89 #: shared-bindings/neopixel_write/__init__.c:67 #: shared-bindings/pulseio/PulseOut.c:76 msgid "Expected a %q" -msgstr "" +msgstr "Se espera un %q" #: shared-bindings/microcontroller/Pin.c:100 msgid "%q in use" @@ -2270,11 +2261,11 @@ msgstr "%q está siendo utilizado" #: shared-bindings/microcontroller/__init__.c:126 msgid "Invalid run mode." -msgstr "" +msgstr "Modo de ejecución inválido." #: shared-bindings/multiterminal/__init__.c:68 msgid "Stream missing readinto() or write() method." -msgstr "" +msgstr "A Stream le falta el método readinto() o write()." #: shared-bindings/nvm/ByteArray.c:99 msgid "Slice and value different lengths." @@ -2282,15 +2273,15 @@ msgstr "" #: shared-bindings/nvm/ByteArray.c:104 msgid "Array values should be single bytes." -msgstr "" +msgstr "Valores del array deben ser bytes individuales." #: shared-bindings/nvm/ByteArray.c:111 shared-bindings/nvm/ByteArray.c:141 msgid "Unable to write to nvm." -msgstr "" +msgstr "Imposible escribir en nvm" #: shared-bindings/nvm/ByteArray.c:137 msgid "Bytes must be between 0 and 255." -msgstr "" +msgstr "Bytes debe estar entre 0 y 255." #: shared-bindings/os/__init__.c:200 msgid "No hardware random available" @@ -2308,7 +2299,7 @@ msgstr "" #: shared-bindings/pulseio/PulseIn.c:275 msgid "Cannot delete values" -msgstr "" +msgstr "No se puede eliminar valores" #: shared-bindings/pulseio/PulseIn.c:281 msgid "Slices not supported" @@ -2316,7 +2307,7 @@ msgstr "" #: shared-bindings/pulseio/PulseIn.c:287 msgid "index must be int" -msgstr "" +msgstr "indice debe ser int" #: shared-bindings/pulseio/PulseIn.c:293 msgid "Read-only" @@ -2340,28 +2331,28 @@ msgstr "" #: shared-bindings/random/__init__.c:146 msgid "empty sequence" -msgstr "" +msgstr "secuencia vacía" #: shared-bindings/rtc/RTC.c:40 shared-bindings/rtc/RTC.c:44 #: shared-bindings/time/__init__.c:190 msgid "RTC is not supported on this board" -msgstr "" +msgstr "RTC no soportado en esta placa" #: shared-bindings/rtc/RTC.c:52 msgid "RTC calibration is not supported on this board" -msgstr "" +msgstr "Calibración de RTC no es soportada en esta placa" #: shared-bindings/socket/__init__.c:516 shared-module/network/__init__.c:81 msgid "no available NIC" -msgstr "" +msgstr "NIC no disponible" #: shared-bindings/storage/__init__.c:77 msgid "filesystem must provide mount method" -msgstr "" +msgstr "sistema de archivos debe proporcionar método de montaje" #: shared-bindings/supervisor/__init__.c:93 msgid "Brightness must be between 0 and 255" -msgstr "" +msgstr "Brightness debe estar entro 0 y 255" #: shared-bindings/supervisor/__init__.c:119 msgid "Stack size must be at least 256" @@ -2369,25 +2360,25 @@ msgstr "" #: shared-bindings/time/__init__.c:78 msgid "sleep length must be non-negative" -msgstr "" +msgstr "la longitud de sleep no puede ser negativa" #: shared-bindings/time/__init__.c:88 msgid "time.struct_time() takes exactly 1 argument" -msgstr "" +msgstr "time.struct_time() acepta exactamente 1 argumento" #: shared-bindings/time/__init__.c:91 msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" -msgstr "" +msgstr "Argumento tuple o struct_time requerido" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" -msgstr "" +msgstr "la función toma exactamente 9 argumentos." -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" msgstr "" @@ -2399,6 +2390,8 @@ msgstr "" msgid "" "Object has been deinitialized and can no longer be used. Create a new object." msgstr "" +"El objeto se ha desinicializado y ya no se puede utilizar. Crea un nuevo " +"objeto" #: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117 msgid "Couldn't allocate first buffer" @@ -2430,7 +2423,7 @@ msgstr "El signo del sample no iguala al del mixer" #: shared-module/audioio/WaveFile.c:61 msgid "Invalid wave file" -msgstr "" +msgstr "Archivo wave inválido" #: shared-module/audioio/WaveFile.c:69 msgid "Invalid format chunk size" @@ -2438,7 +2431,7 @@ msgstr "" #: shared-module/audioio/WaveFile.c:83 msgid "Unsupported format" -msgstr "" +msgstr "Formato no soportado" #: shared-module/audioio/WaveFile.c:99 msgid "Data chunk must follow fmt chunk" @@ -2446,7 +2439,7 @@ msgstr "" #: shared-module/audioio/WaveFile.c:107 msgid "Invalid file" -msgstr "" +msgstr "Archivo inválido" #: shared-module/bitbangio/I2C.c:58 msgid "Clock stretch too long" @@ -2454,39 +2447,39 @@ msgstr "" #: shared-module/bitbangio/SPI.c:44 msgid "Clock pin init failed." -msgstr "" +msgstr "Clock pin init fallido" #: shared-module/bitbangio/SPI.c:50 msgid "MOSI pin init failed." -msgstr "" +msgstr "MOSI pin init fallido." #: shared-module/bitbangio/SPI.c:61 msgid "MISO pin init failed." -msgstr "" +msgstr "MISO pin init fallido." #: shared-module/bitbangio/SPI.c:121 msgid "Cannot write without MOSI pin." -msgstr "" +msgstr "No se puede escribir sin pin MOSI." #: shared-module/bitbangio/SPI.c:176 msgid "Cannot read without MISO pin." -msgstr "" +msgstr "No se puede leer sin pin MISO." #: shared-module/bitbangio/SPI.c:240 msgid "Cannot transfer without MOSI and MISO pins." -msgstr "" +msgstr "No se puede transferir sin pines MOSI y MISO." #: shared-module/displayio/Bitmap.c:49 msgid "Only bit maps of 8 bit color or less are supported" -msgstr "" +msgstr "Solo se admiten bit maps de color de 8 bits o menos" #: shared-module/displayio/Bitmap.c:69 msgid "row must be packed and word aligned" -msgstr "" +msgstr "la fila debe estar empacada y la palabra alineada" #: shared-module/displayio/Group.c:39 msgid "Group full" -msgstr "" +msgstr "Group lleno" #: shared-module/displayio/Group.c:48 msgid "Group empty" @@ -2499,12 +2492,12 @@ msgstr "Archivo BMP inválido" #: shared-module/displayio/OnDiskBitmap.c:59 #, c-format msgid "Only Windows format, uncompressed BMP supported %d" -msgstr "" +msgstr "Solo formato Windows, BMP sin comprimir soportado %d" #: shared-module/displayio/OnDiskBitmap.c:64 #, c-format msgid "Only true color (24 bpp or higher) BMP supported %x" -msgstr "" +msgstr "Solo color verdadero (24 bpp o superior) BMP admitido %x" #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." @@ -2512,11 +2505,11 @@ msgstr "No se puede volver a montar '/' cuando el USB esta activo." #: shared-module/struct/__init__.c:39 msgid "'S' and 'O' are not supported format types" -msgstr "" +msgstr "'S' y 'O' no son compatibles con los tipos de formato" #: shared-module/struct/__init__.c:83 msgid "too many arguments provided with the given format" -msgstr "" +msgstr "demasiados argumentos provistos con el formato dado" #: shared-module/usb_hid/Device.c:45 #, c-format @@ -2531,35 +2524,114 @@ msgstr "USB ocupado" msgid "USB Error" msgstr "Error USB" -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Baud rate demasiado alto para este periférico SPI" +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "Solicitaste iniciar en modo seguro por " -#~ msgid "Invalid Service type" -#~ msgstr "Tipo de Servicio inválido" +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "Para salir, por favor reinicia la tarjeta sin " -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." +#: supervisor/shared/safe_mode.c:107 +#, fuzzy +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" + +#: supervisor/shared/safe_mode.c:109 +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 "" + +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:118 +#, 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 alimentación del microcontrolador cayó. Por favor asegurate de que tu " +"fuente de alimentación provee\n" + +#: supervisor/shared/safe_mode.c:120 +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 "" + +#: supervisor/shared/safe_mode.c:123 +msgid "" +"The reset button was pressed while booting CircuitPython. Press again to " +"exit safe mode.\n" +msgstr "" + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "No se pueden aplicar los parámetros GAP." + +#~ msgid "Can not add Characteristic." +#~ msgstr "No se puede agregar la Característica." + +#~ msgid "Can not apply device name in the stack." +#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." #~ msgid "Can not encode UUID, to check length." #~ msgstr "No se puede codificar el UUID, para revisar la longitud." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Se puede codificar el UUID en el paquete de anuncio." + +#~ msgid "Invalid Service type" +#~ msgstr "Tipo de Servicio inválido" + +#~ msgid "Can not add Service." +#~ msgstr "No se puede agregar el Servicio." + #~ msgid "Can not query for the device address." #~ msgstr "No se puede consultar la dirección del dispositivo." +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Baud rate demasiado alto para este periférico SPI" + #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." - -#~ msgid "Can not add Characteristic." -#~ msgstr "No se puede agregar la Característica." - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "No se pueden aplicar los parámetros GAP." - #~ msgid "Cannot set PPCP parameters." #~ msgstr "No se pueden establecer los parámetros PPCP." -#~ msgid "Can not add Service." -#~ msgstr "No se puede agregar el Servicio." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "suficiente poder para todo el circuito y presiona reset (después de " +#~ "expulsar CIRCUITPY).\n" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n" + +#, fuzzy +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu " +#~ "unidad de almacenamiento CIRCUITPY:\n" diff --git a/locale/fil.po b/locale/fil.po index 1dc5c1ca4..53ca5d22a 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-09 16:20-0800\n" -"PO-Revision-Date: 2018-08-30 23:04-0700\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" +"PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy <me@timothygarcia.ca>\n" "Language-Team: fil\n" "Language: fil\n" @@ -131,7 +131,7 @@ msgstr "compression header" msgid "invalid dupterm index" msgstr "mali ang dupterm index" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "Basahin-lamang mode" @@ -151,11 +151,11 @@ msgstr "mali ang mga argumento" msgid "script compilation not supported" msgstr "script kompilasyon hindi supportado" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr " output:\n" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,70 +163,29 @@ msgstr "" "Ang awtomatikong pag re-reload ay ON. i-save lamang ang mga files sa USB " "para patakbuhin sila o pasukin ang REPL para i-disable ito.\n" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "Awtomatikong pag re-reload ay OFF.\n" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "BABALA: Ang pangalan ng file ay may dalawang extension\n" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng " - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "Para lumabas, paki-reset ang board na wala ang " - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "" -"Ikaw ay tumatakbo sa safe mode, ang ibig sabihin nito ay may masamang " -"nangyari.\n" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" - -#: main.c:263 -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "" -"Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " -"drive:\n" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" -"Ang kapangyarihan ng mikrokontroller ay bumaba. Mangyaring suriin ang power " -"supply \n" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" -"ay nagbibigay ng sapat na power para sa buong circuit at i-press ang reset " -"(pagkatapos i-eject ang CIRCUITPY).\n" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" -"Pindutin ang anumang key upang ipasok ang REPL. Gamitin ang CTRL-D upang i-" +"Pindutin ang anumang key upang pumasok sa REPL. Gamitin ang CTRL-D upang i-" "reload." -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "malambot na reboot\n" @@ -364,7 +323,7 @@ msgstr "Lahat ng event channels ginagamit" #: ports/atmel-samd/common-hal/audioio/AudioOut.c:375 #, c-format msgid "Sample rate too high. It must be less than %d" -msgstr "" +msgstr "Sample rate ay masyadong mataas. Ito ay dapat hindi hiigit sa %d" #: ports/atmel-samd/common-hal/busio/I2C.c:71 msgid "Not enough pins available" @@ -372,7 +331,7 @@ msgstr "Hindi sapat ang magagamit na pins" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" @@ -386,31 +345,31 @@ msgstr "Kailangan ng pull up resistors ang SDA o SCL" msgid "Unsupported baudrate" msgstr "Hindi supportadong baudrate" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "hindi sinusuportahan ang bytes > 8 bits" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" msgstr "tx at rx hindi pwedeng parehas na None" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "Nabigong ilaan ang RX buffer" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "Hindi ma-initialize ang UART" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "Walang RX pin" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "Walang TX pin" @@ -455,7 +414,7 @@ msgid "pop from an empty PulseIn" msgstr "pop mula sa walang laman na PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "index wala sa sakop" @@ -694,49 +653,49 @@ msgstr "Hindi supportado ang AnalogOut" #: ports/nrf/common-hal/bleio/Adapter.c:41 #, c-format msgid "Soft device assert, id: 0x%08lX, pc: 0x%08lX" -msgstr "" +msgstr "Soft device assert, id: 0x%08lX, pc: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:125 #, c-format msgid "Failed to change softdevice state, error: 0x%08lX" -msgstr "" +msgstr "Nabigo sa pagbago ng softdevice state, error: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:135 #, c-format msgid "Failed to get softdevice state, error: 0x%08lX" -msgstr "" +msgstr "Nabigo sa pagkuha ng softdevice state, error: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:155 #, c-format msgid "Failed to get local address, error: 0x%08lX" -msgstr "" +msgstr "Nabigo sa pagkuha ng local na address, , error: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:52 -#, fuzzy, c-format +#, c-format msgid "Failed to write gatts value, status: 0x%08lX" -msgstr "Hindi maisulat ang attribute value. status: 0x%02x" +msgstr "Hindi maisulat ang gatts value, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:76 -#, fuzzy, c-format +#, c-format msgid "Failed to notify attribute value, status: 0x%08lX" -msgstr "Hindi mabalitaan ang attribute value. status: 0x%02x" +msgstr "Hindi mabalitaan ang attribute value, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:91 -#, fuzzy, c-format +#, c-format msgid "Failed to read attribute value, status: 0x%08lX" -msgstr "Hindi mabasa ang value ng attribute. status: 0x%02x" +msgstr "Hindi mabasa ang value ng attribute, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:119 #: ports/nrf/common-hal/bleio/Device.c:272 #: ports/nrf/common-hal/bleio/Device.c:307 #, c-format msgid "Failed to acquire mutex, status: 0x%08lX" -msgstr "" +msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:126 -#, fuzzy, c-format +#, c-format msgid "Failed to write attribute value, status: 0x%08lX" -msgstr "Hindi maisulat ang attribute value. status: 0x%02x" +msgstr "Hindi maisulat ang attribute value, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:138 #: ports/nrf/common-hal/bleio/Device.c:284 @@ -745,65 +704,64 @@ msgstr "Hindi maisulat ang attribute value. status: 0x%02x" #: ports/nrf/common-hal/bleio/Device.c:391 #, c-format msgid "Failed to release mutex, status: 0x%08lX" -msgstr "" +msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:81 #: ports/nrf/common-hal/bleio/Device.c:114 -#, fuzzy msgid "Can not fit data into the advertisment packet" -msgstr "Hindi makasya ang data sa loob ng advertisement packet." +msgstr "Hindi makasya ang data sa loob ng advertisement packet" #: ports/nrf/common-hal/bleio/Device.c:266 #, c-format msgid "Failed to discover serivices, status: 0x%08lX" -msgstr "" +msgstr "Nabigo sa pagdiscover ng services, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:403 #: ports/nrf/common-hal/bleio/Scanner.c:76 -#, fuzzy, c-format +#, c-format msgid "Failed to continue scanning, status: 0x%0xlX" -msgstr "Hindi masimulaan mag i-scan. status: 0x%02x" +msgstr "Hindi maituloy ang pag scan, status: 0x%0xlX" #: ports/nrf/common-hal/bleio/Device.c:436 -#, fuzzy, c-format +#, c-format msgid "Failed to connect, status: 0x%08lX" -msgstr "Hindi makaconnect. status: 0x%02x" +msgstr "Hindi makaconnect, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:513 -#, fuzzy, c-format +#, c-format msgid "Failed to add service, status: 0x%08lX" -msgstr "Hindi mahinto ang advertisement. status: 0x%02x" +msgstr "Hindi matagumpay ang paglagay ng service, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:531 -#, fuzzy, c-format +#, c-format msgid "Failed to start advertisment, status: 0x%08lX" -msgstr "Hindi masimulaan ang advertisement. status 0x%02x" +msgstr "Hindi masimulaan ang advertisement, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:549 -#, fuzzy, c-format +#, c-format msgid "Failed to stop advertisment, status: 0x%08lX" -msgstr "Hindi mahinto ang advertisement. status: 0x%02x" +msgstr "Hindi mahinto ang advertisement, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:575 #: ports/nrf/common-hal/bleio/Scanner.c:103 -#, fuzzy, c-format +#, c-format msgid "Failed to start scanning, status: 0x%0xlX" -msgstr "Hindi masimulaan mag i-scan. status: 0x%02x" +msgstr "Hindi masimulaan mag i-scan, status: 0x%0xlX" #: ports/nrf/common-hal/bleio/Device.c:592 -#, fuzzy, c-format +#, c-format msgid "Failed to create mutex, status: 0x%0xlX" -msgstr "Hindi mabasa ang value ng attribute. status: 0x%02x" +msgstr "Hindi matagumpay ang pagbuo ng mutex, status: 0x%0xlX" #: ports/nrf/common-hal/bleio/Service.c:83 #, c-format msgid "Failed to add characteristic, status: 0x%08lX" -msgstr "" +msgstr "Nabigo sa paglagay ng characteristic, status: 0x%08lX" #: ports/nrf/common-hal/bleio/UUID.c:97 -#, fuzzy, c-format +#, c-format msgid "Failed to add Vendor Specific UUID, status: 0x%08lX" -msgstr "Hindi maaaring magdagdag ng Vendor Specific na 128-bit UUID." +msgstr "Hindi matagumpay ang paglagay ng Vender Specific UUID, status: 0x%08lX" #: ports/nrf/common-hal/bleio/UUID.c:102 msgid "Invalid UUID string length" @@ -816,37 +774,33 @@ msgid "Invalid UUID parameter" msgstr "Mali ang UUID parameter" #: ports/nrf/common-hal/busio/I2C.c:96 -#, fuzzy msgid "All I2C peripherals are in use" -msgstr "Lahat ng timer ginagamit" +msgstr "Lahat ng I2C peripherals ginagamit" #: ports/nrf/common-hal/busio/SPI.c:133 -#, fuzzy msgid "All SPI peripherals are in use" -msgstr "Lahat ng timer ginagamit" +msgstr "Lahat ng SPI peripherals ay ginagamit" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" -msgstr "" +msgstr "error = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:86 -#, fuzzy +#: ports/nrf/common-hal/busio/UART.c:110 msgid "Invalid buffer size" -msgstr "mali ang buffer length" +msgstr "Mali ang buffer size" -#: ports/nrf/common-hal/busio/UART.c:90 -#, fuzzy +#: ports/nrf/common-hal/busio/UART.c:114 msgid "Odd parity is not supported" -msgstr "hindi sinusuportahan ang bytes > 8 bits" +msgstr "Odd na parity ay hindi supportado" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 msgid "busio.UART not available" -msgstr "" +msgstr "busio.UART hindi available" #: ports/nrf/common-hal/microcontroller/Processor.c:49 #, c-format @@ -854,9 +808,8 @@ msgid "Can not get temperature. status: 0x%02x" msgstr "Hindi makuha ang temperatura. status 0x%02x" #: ports/nrf/common-hal/pulseio/PWMOut.c:161 -#, fuzzy msgid "All PWM peripherals are in use" -msgstr "Lahat ng timer ginagamit" +msgstr "Lahat ng PWM peripherals ay ginagamit" #: ports/unix/modffi.c:138 msgid "Unknown type" @@ -964,9 +917,8 @@ msgid "bad compile mode" msgstr "masamang mode ng compile" #: py/builtinhelp.c:137 -#, fuzzy msgid "Plus any modules on the filesystem\n" -msgstr "Hindi ma-remount ang filesystem" +msgstr "Kasama ang kung ano pang modules na sa filesystem\n" #: py/builtinhelp.c:183 #, c-format @@ -977,6 +929,12 @@ msgid "" "\n" "To list built-in modules please do `help(\"modules\")`.\n" msgstr "" +"Mabuhay sa Adafruit CircuitPython %s!\n" +"\n" +"Mangyaring bisitahin ang learn.adafruit.com/category/circuitpython para sa " +"project guides.\n" +"\n" +"Para makita ang listahan ng modules, `help(“modules”)`.\n" #: py/builtinimport.c:336 msgid "cannot perform relative import" @@ -1140,19 +1098,17 @@ msgid "'data' requires integer arguments" msgstr "'data' kailangan ng integer arguments" #: py/emitinlinethumb.c:102 -#, fuzzy msgid "can only have up to 4 parameters to Thumb assembly" -msgstr "maaari lamang magkaroon ng hanggang 4 na parameter sa Xtensa assembly" +msgstr "maaari lamang magkaroon ng hanggang 4 na parameter sa Thumb assembly" #: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112 -#, fuzzy msgid "parameters must be registers in sequence r0 to r3" -msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence a2 hanggang a5" +msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence r0 hanggang r3" #: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230 -#, fuzzy, c-format +#, c-format msgid "'%s' expects at most r%d" -msgstr "Inaasahan ng '%s' ang isang rehistro" +msgstr "Inaasahan ng '%s' ang hangang r%d" #: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162 #, c-format @@ -1160,19 +1116,19 @@ msgid "'%s' expects a register" msgstr "Inaasahan ng '%s' ang isang rehistro" #: py/emitinlinethumb.c:211 -#, fuzzy, c-format +#, c-format msgid "'%s' expects a special register" -msgstr "Inaasahan ng '%s' ang isang rehistro" +msgstr "Inaasahan ng '%s' ang isang espesyal na register" #: py/emitinlinethumb.c:239 -#, fuzzy, c-format +#, c-format msgid "'%s' expects an FPU register" -msgstr "Inaasahan ng '%s' ang isang rehistro" +msgstr "Inaasahan ng '%s' ang isang FPU register" #: py/emitinlinethumb.c:292 -#, fuzzy, c-format +#, c-format msgid "'%s' expects {r0, r1, ...}" -msgstr "Inaasahan ng '%s' ang isang rehistro" +msgstr "Inaasahan ng '%s' ay {r0, r1, …}" #: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169 #, c-format @@ -1180,14 +1136,14 @@ msgid "'%s' expects an integer" msgstr "Inaasahan ng '%s' ang isang integer" #: py/emitinlinethumb.c:304 -#, fuzzy, c-format +#, c-format msgid "'%s' integer 0x%x does not fit in mask 0x%x" -msgstr "'%s' integer %d ay wala sa sakop ng %d..%d" +msgstr "'%s' integer 0x%x ay wala sa mask na sakop ng 0x%x" #: py/emitinlinethumb.c:328 -#, fuzzy, c-format +#, c-format msgid "'%s' expects an address of the form [a, b]" -msgstr "Inaasahan ng '%s' ang isang rehistro" +msgstr "Inaasahan ng '%s' ang isang address sa [a, b]" #: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182 #, c-format @@ -1199,14 +1155,13 @@ msgid "label '%q' not defined" msgstr "label '%d' kailangan na i-define" #: py/emitinlinethumb.c:806 -#, fuzzy, c-format +#, c-format msgid "unsupported Thumb instruction '%s' with %d arguments" -msgstr "hindi sinusuportahan ang instruction ng Xtensa '%s' sa %d argumento" +msgstr "hindi sinusuportahan ang thumb instruktion '%s' sa %d argumento" #: py/emitinlinethumb.c:810 -#, fuzzy msgid "branch not in range" -msgstr "chr() arg wala sa sakop ng range(256)" +msgstr "branch wala sa range" #: py/emitinlinextensa.c:86 msgid "can only have up to 4 parameters to Xtensa assembly" @@ -1356,140 +1311,140 @@ msgstr "masyadong maliit ang buffer" msgid "expecting a dict for keyword args" msgstr "umaasa ng dict para sa keyword args" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" msgstr "Walang pahintulot" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" msgstr "Walang file/directory" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" msgstr "May mali sa Input/Output" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" msgstr "Mayroong file" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" msgstr "Hindi sinusuportahang operasyon" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "Maling argumento" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "Traceback (pinakahuling huling tawag): \n" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" msgstr " File \"%q\", line %d" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" msgstr ", sa %q\n" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" msgstr "hindi ma-convert sa int" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" msgstr "hindi ma-convert %s sa int" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" msgstr "hindi ma-convert sa float" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" msgstr "hindi ma-convert %s sa int" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" msgstr "hindi ma-convert sa complex" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" msgstr "hindi ma-convert %s sa complex" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" msgstr "umaasa ng tuple/list" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" msgstr "object '%s' ay hindi tuple o list" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" msgstr "mali ang haba ng tuple/list" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" msgstr "hiniling ang haba %d ngunit may haba ang object na %d" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" msgstr "ang mga indeks ay dapat na integer" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" msgstr "%q indeks ay dapat integers, hindi %s" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" msgstr "%q indeks wala sa sakop" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" msgstr "object walang len" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" msgstr "object na type '%s' walang len()" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" msgstr "ang object ay hindi sumusuporta sa pagbura ng item" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" msgstr "'%s' object ay hindi sumusuporta sa pagtanggal ng item" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "ang bagay ay hindi maaaring ma-subscript" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "'%s' object ay hindi maaaring i-subscript" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" msgstr "ang object na '%s' ay hindi maaaring i-subscript" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" msgstr "'%s' object hindi sumusuporta ng item assignment" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" msgstr "object na may buffer protocol kinakailangan" @@ -2015,6 +1970,14 @@ msgstr "object wala sa sequence" msgid "stream operation not supported" msgstr "stream operation hindi sinusuportahan" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "string hindi supportado; gumamit ng bytes o kaya bytearray" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "length argument ay walang pahintulot sa ganitong type" + #: py/vm.c:255 msgid "local variable referenced before assignment" msgstr "local variable na reference bago na i-assign" @@ -2095,24 +2058,20 @@ msgstr "" "para sa bit_depth = 8" #: shared-bindings/audioio/Mixer.c:94 -#, fuzzy msgid "Invalid voice count" -msgstr "Mali ang tipo ng serbisyo" +msgstr "Maling bilang ng voice" #: shared-bindings/audioio/Mixer.c:99 -#, fuzzy msgid "Invalid channel count" -msgstr "Maling argumento" +msgstr "Maling bilang ng channel" #: shared-bindings/audioio/Mixer.c:103 -#, fuzzy msgid "Sample rate must be positive" -msgstr "Dapat aktibo ang STA" +msgstr "Sample rate ay dapat positibo" #: shared-bindings/audioio/Mixer.c:107 -#, fuzzy msgid "bits_per_sample must be 8 or 16" -msgstr "bits ay dapat 7, 8 o 9" +msgstr "bits_per_sample ay dapat 8 o 16" #: shared-bindings/audioio/RawSample.c:98 msgid "" @@ -2158,41 +2117,44 @@ msgstr "aarehas na haba dapat ang buffer slices" #: shared-bindings/bleio/Address.c:101 msgid "Wrong address length" -msgstr "" +msgstr "Mali ang address length" #: shared-bindings/bleio/Address.c:107 -#, fuzzy msgid "Wrong number of bytes provided" -msgstr "mali ang bilang ng argumento" +msgstr "Mali ang bilang ng bytes" #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" -msgstr "" +msgstr "Hindi maarang maglagay ng service sa Central mode" #: shared-bindings/bleio/Device.c:226 msgid "Can't connect in Peripheral mode" -msgstr "" +msgstr "Hindi maconnect sa Peripheral mode" #: shared-bindings/bleio/Device.c:256 msgid "Can't change the name in Central mode" -msgstr "" +msgstr "Hindi mapalitan ang pangalan sa Central mode" #: shared-bindings/bleio/Device.c:277 shared-bindings/bleio/Device.c:313 msgid "Can't advertise in Central mode" -msgstr "" +msgstr "Hindi ma advertise habang nasa Central mode" #: shared-bindings/busio/I2C.c:120 msgid "Function requires lock." msgstr "Kailangan ng lock ang function." -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" msgstr "bits ay dapat 7, 8 o 9" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" msgstr "stop dapat 1 o 2" +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" +msgstr "timeout >100 (units ay seconds, hindi na msecs)" + #: shared-bindings/digitalio/DigitalInOut.c:211 msgid "Invalid direction." msgstr "Mali ang direksyon." @@ -2216,76 +2178,62 @@ msgid "Unsupported pull value." msgstr "Hindi suportado ang pull value." #: shared-bindings/displayio/Bitmap.c:84 -#, fuzzy msgid "y should be an int" -msgstr "Haba ay dapat int" +msgstr "y ay dapat int" #: shared-bindings/displayio/Bitmap.c:89 -#, fuzzy msgid "row buffer must be a bytearray or array of type 'b' or 'B'" -msgstr "" -"ang sample_source buffer ay dapat na isang bytearray o array ng uri na 'h', " -"'H', 'b' o'B'" +msgstr "ang row buffer ay dapat bytearray o array na type ‘b’ or ‘B’" #: shared-bindings/displayio/Bitmap.c:94 -#, fuzzy msgid "row data must be a buffer" -msgstr "constant ay dapat na integer" +msgstr "row data ay dapat na buffer" #: shared-bindings/displayio/ColorConverter.c:72 -#, fuzzy msgid "color should be an int" -msgstr "Haba ay dapat int" +msgstr "color ay dapat na int" #: shared-bindings/displayio/FourWire.c:55 #: shared-bindings/displayio/FourWire.c:64 msgid "displayio is a work in progress" -msgstr "" +msgstr "displayio ay nasa gitna ng konstruksiyon" #: shared-bindings/displayio/Group.c:65 -#, fuzzy msgid "Group must have size at least 1" -msgstr "Buffer dapat ay hindi baba sa 1 na haba" +msgstr "Group dapat ay hindi baba sa 1 na haba" #: shared-bindings/displayio/Palette.c:96 -#, fuzzy msgid "color buffer must be a bytearray or array of type 'b' or 'B'" -msgstr "" -"ang sample_source buffer ay dapat na isang bytearray o array ng uri na 'h', " -"'H', 'b' o'B'" +msgstr "ang color buffer ay dapat bytearray o array na type ‘b’ or ‘B’" #: shared-bindings/displayio/Palette.c:102 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "" +msgstr "color buffer ay dapat na 3 bytes (RGB) o 4 bytes (RGB + pad byte)" #: shared-bindings/displayio/Palette.c:106 -#, fuzzy msgid "color must be between 0x000000 and 0xffffff" -msgstr "Sa gitna ng 0 o 255 dapat ang bytes." +msgstr "color ay dapat mula sa 0x000000 hangang 0xffffff" #: shared-bindings/displayio/Palette.c:110 -#, fuzzy msgid "color buffer must be a buffer or int" -msgstr "buffer ay dapat bytes-like object" +msgstr "color buffer ay dapat buffer or int" #: shared-bindings/displayio/Palette.c:123 #: shared-bindings/displayio/Palette.c:137 msgid "palette_index should be an int" -msgstr "" +msgstr "palette_index ay dapat na int" #: shared-bindings/displayio/Sprite.c:48 -#, fuzzy msgid "position must be 2-tuple" -msgstr "stop dapat 1 o 2" +msgstr "position ay dapat 2-tuple" #: shared-bindings/displayio/Sprite.c:97 -#, fuzzy msgid "unsupported bitmap type" -msgstr "Hindi supportadong baudrate" +msgstr "Hindi supportadong tipo ng bitmap" #: shared-bindings/displayio/Sprite.c:162 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" +msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter" #: shared-bindings/gamepad/GamePad.c:100 msgid "too many arguments" @@ -2351,11 +2299,10 @@ msgid "" msgstr "PWM duty_cycle ay dapat sa loob ng 0 at 65535 (16 bit resolution)" #: shared-bindings/pulseio/PWMOut.c:195 -#, fuzzy msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -"PWM frequency hindi maisulat kapag variable_frequency ay False sa pag buo." +"PWM frequency hindi writable kapag variable_frequency ay False sa pag buo." #: shared-bindings/pulseio/PulseIn.c:275 msgid "Cannot delete values" @@ -2404,7 +2351,7 @@ msgstr "RTC calibration ay hindi supportado ng board na ito" #: shared-bindings/socket/__init__.c:516 shared-module/network/__init__.c:81 msgid "no available NIC" -msgstr "" +msgstr "walang magagamit na NIC" #: shared-bindings/storage/__init__.c:77 msgid "filesystem must provide mount method" @@ -2430,15 +2377,15 @@ msgstr "time.struct_time() kumukuha ng 1 argument" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() kumukuha ng 9-sequence" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" msgstr "Tuple o struct_time argument kailangan" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" msgstr "function kumukuha ng 9 arguments" -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" msgstr "wala sa sakop ng timestamp ang platform time_t" @@ -2463,23 +2410,23 @@ msgstr "Hindi ma-iallocate ang second buffer" #: shared-module/audioio/Mixer.c:82 msgid "Voice index too high" -msgstr "" +msgstr "Index ng Voice ay masyadong mataas" #: shared-module/audioio/Mixer.c:85 msgid "The sample's sample rate does not match the mixer's" -msgstr "" +msgstr "Ang sample rate ng sample ay hindi tugma sa mixer" #: shared-module/audioio/Mixer.c:88 msgid "The sample's channel count does not match the mixer's" -msgstr "" +msgstr "Ang channel count ng sample ay hindi tugma sa mixer" #: shared-module/audioio/Mixer.c:91 msgid "The sample's bits_per_sample does not match the mixer's" -msgstr "" +msgstr "Ang bits_per_sample ng sample ay hindi tugma sa mixer" #: shared-module/audioio/Mixer.c:100 msgid "The sample's signedness does not match the mixer's" -msgstr "" +msgstr "Ang signedness ng sample hindi tugma sa mixer" #: shared-module/audioio/WaveFile.c:61 msgid "Invalid wave file" @@ -2531,35 +2478,33 @@ msgstr "Hindi maaaring ilipat kapag walang MOSI at MISO pin." #: shared-module/displayio/Bitmap.c:49 msgid "Only bit maps of 8 bit color or less are supported" -msgstr "" +msgstr "Tanging bit maps na may 8 bit color o mas mababa ang supportado" #: shared-module/displayio/Bitmap.c:69 msgid "row must be packed and word aligned" -msgstr "" +msgstr "row ay dapat packed at ang word nakahanay" #: shared-module/displayio/Group.c:39 msgid "Group full" -msgstr "" +msgstr "Puno ang group" #: shared-module/displayio/Group.c:48 -#, fuzzy msgid "Group empty" -msgstr "walang laman" +msgstr "Walang laman ang group" #: shared-module/displayio/OnDiskBitmap.c:49 -#, fuzzy msgid "Invalid BMP file" -msgstr "Mali ang file" +msgstr "Mali ang BMP file" #: shared-module/displayio/OnDiskBitmap.c:59 #, c-format msgid "Only Windows format, uncompressed BMP supported %d" -msgstr "" +msgstr "Tanging Windows format, uncompressed BMP lamang ang supportado %d" #: shared-module/displayio/OnDiskBitmap.c:64 #, c-format msgid "Only true color (24 bpp or higher) BMP supported %x" -msgstr "" +msgstr "Dapat true color (24 bpp o mas mataas) BMP lamang ang supportado %x" #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." @@ -2586,36 +2531,122 @@ msgstr "Busy ang USB" msgid "USB Error" msgstr "May pagkakamali ang USB" -#, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "ang palette ay dapat 32 bytes ang haba" +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng " -#~ msgid "Invalid Service type" -#~ msgstr "Mali ang tipo ng serbisyo" +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "Para lumabas, paki-reset ang board na wala ang " -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." +#: supervisor/shared/safe_mode.c:107 +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" + +#: supervisor/shared/safe_mode.c:109 +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" + +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "Nagcrash sa HardFault_Handler.\n" + +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "CircuitPython NLR jump nabigo. Maaring memory corruption.\n" + +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "CircuitPython fatal na pagkakamali.\n" + +#: supervisor/shared/safe_mode.c:118 +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" + +#: supervisor/shared/safe_mode.c:120 +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" + +#: supervisor/shared/safe_mode.c:123 +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 "Cannot apply GAP parameters." +#~ msgstr "Hindi ma-apply ang GAP parameters." + +#~ msgid "Can not add Characteristic." +#~ msgstr "Hindi mabasa and Characteristic." + +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." #~ msgid "Can not encode UUID, to check length." #~ msgstr "Hindi ma-encode UUID, para suriin ang haba." +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Maaring i-encode ang UUID sa advertisement packet." + +#~ msgid "Invalid Service type" +#~ msgstr "Mali ang tipo ng serbisyo" + +#~ msgid "Can not add Service." +#~ msgstr "Hindi maidaragdag ang serbisyo." + #~ msgid "Can not query for the device address." #~ msgstr "Hindi maaaring mag-query para sa address ng device." +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "ang palette ay dapat 32 bytes ang haba" + #~ msgid "Can not apply advertisement data. status: 0x%02x" #~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x" -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." - -#~ msgid "Can not add Characteristic." -#~ msgstr "Hindi mabasa and Characteristic." - -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Hindi ma-apply ang GAP parameters." - #~ msgid "Cannot set PPCP parameters." #~ msgstr "Hindi ma-set ang PPCP parameters." -#~ msgid "Can not add Service." -#~ msgstr "Hindi maidaragdag ang serbisyo." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang " +#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n" + +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY " +#~ "drive:\n" diff --git a/locale/fr.po b/locale/fr.po index 71962f610..61781fe5b 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-11-09 16:20-0800\n" -"PO-Revision-Date: 2018-08-14 11:01+0200\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" +"PO-Revision-Date: 2018-12-23 20:05+0100\n" "Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n" "Language-Team: fr\n" "Language: fr\n" @@ -100,7 +100,7 @@ msgstr "'heap' vide" #: extmod/modujson.c:281 msgid "syntax error in JSON" -msgstr "erreur de syntaxe dans le JSON" +msgstr "erreur de syntaxe JSON" #: extmod/modure.c:161 msgid "Splitting with sub-captures" @@ -130,7 +130,7 @@ msgstr "entête de compression" msgid "invalid dupterm index" msgstr "index invalide pour dupterm" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "Système de fichier en lecture seule" @@ -148,13 +148,13 @@ msgstr "arguments invalides" #: lib/utils/pyexec.c:97 py/builtinimport.c:251 msgid "script compilation not supported" -msgstr "compilation du script non supporté" +msgstr "compilation de script non supporté" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr " sortie:\n" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -162,66 +162,27 @@ msgstr "" "Auto-chargement activé. Copiez simplement les fichiers en USB pour les " "lancer ou entrez sur REPL pour le désactiver.\n" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Mode sans-échec. Auto-rechargement désactivé.\n" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "Auto-rechargement désactivé.\n" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "Mode sans-échec! Le code sauvegardé ne s'éxecute pas.\n" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENTION: le nom de fichier de votre code a deux extensions\n" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "Vous avez demandé à démarrer en mode sans-échec par " - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "Pour quitter, redémarrez la carte SVP sans " - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "" -"Vous êtes en mode sans-échec ce qui signifie que quelque chose demauvais est " -"arrivé.\n" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" - -#: main.c:263 -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" -"L'alimentation du microcontroleur a chuté. Merci de vérifier que votre " -"alimentation fournit\n" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" -"assez de puissance pour l'ensemble du circuit et appuyez sur 'reset' (après " -"avoir éjecter CIRCUITPY).\n" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger." -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "redémarrage logiciel\n" @@ -232,11 +193,11 @@ msgstr "Tous les canaux d'événements de synchro sont utilisés" #: ports/atmel-samd/bindings/samd/Clock.c:135 msgid "calibration is read only" -msgstr "la calibration est en lecture seule" +msgstr "calibration en lecture seule" #: ports/atmel-samd/bindings/samd/Clock.c:137 msgid "calibration is out of range" -msgstr "la calibration est hors gamme" +msgstr "calibration hors gamme" #: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39 msgid "No default I2C bus" @@ -261,7 +222,7 @@ msgstr "Pas de DAC sur la puce" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c:56 msgid "AnalogOut not supported on given pin" -msgstr "AnalogOut n'est pas supporté sur cette broche" +msgstr "AnalogOut n'est pas supporté sur la broche indiquée" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:147 #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:150 @@ -270,7 +231,7 @@ msgstr "Broche invalide pour 'bit clock'" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:153 msgid "Bit clock and word select must share a clock unit" -msgstr "'bit clock' et 'word select' doivent partagé une horloge" +msgstr "'bit clock' et 'word select' doivent partager une horloge" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:156 #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:130 @@ -343,7 +304,7 @@ msgstr "Broche invalide pour le canal droit" #: ports/atmel-samd/common-hal/audioio/AudioOut.c:154 msgid "Cannot output both channels on the same pin" -msgstr "On ne peut mettre les deux canaux sur la même broche" +msgstr "Les 2 canaux de sortie ne peuvent être sur la même broche" #: ports/atmel-samd/common-hal/audioio/AudioOut.c:243 #: ports/atmel-samd/common-hal/pulseio/PWMOut.c:189 @@ -359,7 +320,7 @@ msgstr "Tous les canaux d'événements sont utilisés" #: ports/atmel-samd/common-hal/audioio/AudioOut.c:375 #, c-format msgid "Sample rate too high. It must be less than %d" -msgstr "" +msgstr "Taux d'échantillonage trop élevé. Doit être inf. à %d" #: ports/atmel-samd/common-hal/busio/I2C.c:71 msgid "Not enough pins available" @@ -367,11 +328,11 @@ msgstr "Pas assez de broches disponibles" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" -msgstr "Broche invalide" +msgstr "Broches invalides" #: ports/atmel-samd/common-hal/busio/I2C.c:101 msgid "SDA or SCL needs a pull up" @@ -381,38 +342,38 @@ msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')" msgid "Unsupported baudrate" msgstr "Débit non supporté" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "octets > 8 bits non supporté" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" -msgstr "TX et RX ne peuvent être None tous les deux" +msgstr "tx et rx ne peuvent être None tous les deux" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "Echec de l'allocation du tampon RX" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "L'UART n'a pu être initialisé" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "Pas de broche RX" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "Pas de broche TX" #: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c:170 #: ports/nrf/common-hal/digitalio/DigitalInOut.c:147 msgid "Cannot get pull while in output mode" -msgstr "Ne peux être tirer ('pull') en mode 'output'" +msgstr "Ne peux être tiré ('pull') en mode 'output'" #: ports/atmel-samd/common-hal/microcontroller/__init__.c:74 #: ports/esp8266/common-hal/microcontroller/__init__.c:64 @@ -451,7 +412,7 @@ msgid "pop from an empty PulseIn" msgstr "'pop' d'une entrée PulseIn vide" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "index hors gamme" @@ -489,7 +450,7 @@ msgstr "Broche invalide pour le SPI" #: ports/esp8266/common-hal/busio/UART.c:45 msgid "Only tx supported on UART1 (GPIO2)." -msgstr "Seul le TX est supporté sur l'UART1 (GPIO2)." +msgstr "Seul le tx est supporté sur l'UART1 (GPIO2)." #: ports/esp8266/common-hal/busio/UART.c:67 ports/esp8266/machine_uart.c:108 msgid "invalid data bits" @@ -526,7 +487,7 @@ msgstr "La fréquence de PWM minimale est 1Hz" #, c-format msgid "Multiple PWM frequencies not supported. PWM already set to %dhz." msgstr "" -"Les fréquences multiples de PWM ne sont pas supportées. Déjà réglé à %dHz" +"Les fréquences de PWM multiples ne sont pas supportées. PWM réglé à %dHz" #: ports/esp8266/common-hal/pulseio/PWMOut.c:77 ports/esp8266/machine_pwm.c:70 #, c-format @@ -573,7 +534,7 @@ msgstr "broche invalide" #: ports/esp8266/machine_pin.c:389 msgid "pin does not have IRQ capabilities" -msgstr "la broche n'a pas de capacité d'interruption (IRQ)" +msgstr "la broche ne supporte pas les interruptions (IRQ)" #: ports/esp8266/machine_rtc.c:185 msgid "buffer too long" @@ -653,15 +614,15 @@ msgstr "wifi_set_ip_info() a échoué" #: ports/esp8266/modnetwork.c:319 msgid "either pos or kw args are allowed" -msgstr "seuls les arguments 'pos' ou 'kw' sont autorisés" +msgstr "soit 'pos', soit 'kw' est permis en argument" #: ports/esp8266/modnetwork.c:329 msgid "can't get STA config" -msgstr "impossible de récupérer de la config de 'STA'" +msgstr "impossible de récupérer la config de 'STA'" #: ports/esp8266/modnetwork.c:331 msgid "can't get AP config" -msgstr "impossible de récupérer de la config de 'AP'" +msgstr "impossible de récupérer la config de 'AP'" #: ports/esp8266/modnetwork.c:346 msgid "invalid buffer length" @@ -695,44 +656,44 @@ msgstr "" #: ports/nrf/common-hal/bleio/Adapter.c:125 #, c-format msgid "Failed to change softdevice state, error: 0x%08lX" -msgstr "" +msgstr "Echec de la modification de l'état du périph., erreur: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:135 #, c-format msgid "Failed to get softdevice state, error: 0x%08lX" -msgstr "" +msgstr "Echec de l'obtention de l'état du périph., erreur: 0x%08lX" #: ports/nrf/common-hal/bleio/Adapter.c:155 #, c-format msgid "Failed to get local address, error: 0x%08lX" -msgstr "" +msgstr "Echec de l'obtention de l'adresse locale, erreur: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:52 #, fuzzy, c-format msgid "Failed to write gatts value, status: 0x%08lX" -msgstr "Impossible d'écrire la valeur de l'attribut. status: 0x%02x" +msgstr "Impossible d'écrire la valeur de gatts. status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:76 #, fuzzy, c-format msgid "Failed to notify attribute value, status: 0x%08lX" -msgstr "Impossible de notifier la valeur de l'attribut. status: 0x%02x" +msgstr "Impossible de notifier la valeur de l'attribut. status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:91 #, fuzzy, c-format msgid "Failed to read attribute value, status: 0x%08lX" -msgstr "Impossible de lire la valeur de l'attribut. status: 0x%02x" +msgstr "Impossible de lire la valeur de l'attribut. status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:119 #: ports/nrf/common-hal/bleio/Device.c:272 #: ports/nrf/common-hal/bleio/Device.c:307 #, c-format msgid "Failed to acquire mutex, status: 0x%08lX" -msgstr "" +msgstr "Echec de l'obtention de mutex, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:126 #, fuzzy, c-format msgid "Failed to write attribute value, status: 0x%08lX" -msgstr "Impossible d'écrire la valeur de l'attribut. status: 0x%02x" +msgstr "Impossible d'écrire la valeur de l'attribut. status: 0x%08lX" #: ports/nrf/common-hal/bleio/Characteristic.c:138 #: ports/nrf/common-hal/bleio/Device.c:284 @@ -741,7 +702,7 @@ msgstr "Impossible d'écrire la valeur de l'attribut. status: 0x%02x" #: ports/nrf/common-hal/bleio/Device.c:391 #, c-format msgid "Failed to release mutex, status: 0x%08lX" -msgstr "" +msgstr "Impossible de libérer mutex, status: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:81 #: ports/nrf/common-hal/bleio/Device.c:114 @@ -749,56 +710,56 @@ msgid "Can not fit data into the advertisment packet" msgstr "" #: ports/nrf/common-hal/bleio/Device.c:266 -#, c-format +#, fuzzy, c-format msgid "Failed to discover serivices, status: 0x%08lX" -msgstr "" +msgstr "Echec de la découverte de services, statut: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:403 #: ports/nrf/common-hal/bleio/Scanner.c:76 #, fuzzy, c-format msgid "Failed to continue scanning, status: 0x%0xlX" -msgstr "Impossible de commencer à scanner. status: 0x%02x" +msgstr "Impossible de commencer à scanner. statut: 0x%0xlX" #: ports/nrf/common-hal/bleio/Device.c:436 #, fuzzy, c-format msgid "Failed to connect, status: 0x%08lX" -msgstr "Connection impossible. status: 0x%02x" +msgstr "Connection impossible. statut: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:513 #, c-format msgid "Failed to add service, status: 0x%08lX" -msgstr "" +msgstr "Echec de l'ajout de service, statut: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:531 -#, fuzzy, c-format +#, c-format msgid "Failed to start advertisment, status: 0x%08lX" -msgstr "Impossible de commencer à scanner. status: 0x%02x" +msgstr "" #: ports/nrf/common-hal/bleio/Device.c:549 -#, c-format +#, fuzzy, c-format msgid "Failed to stop advertisment, status: 0x%08lX" -msgstr "" +msgstr "Echec de l'ajout de service, statut: 0x%08lX" #: ports/nrf/common-hal/bleio/Device.c:575 #: ports/nrf/common-hal/bleio/Scanner.c:103 #, fuzzy, c-format msgid "Failed to start scanning, status: 0x%0xlX" -msgstr "Impossible de commencer à scanner. status: 0x%02x" +msgstr "Impossible de commencer à scanner, statut: 0x%0xlX" #: ports/nrf/common-hal/bleio/Device.c:592 #, fuzzy, c-format msgid "Failed to create mutex, status: 0x%0xlX" -msgstr "Impossible de lire la valeur de l'attribut. status: 0x%02x" +msgstr "Echec de la création de mutex, statut: 0x%0xlX" #: ports/nrf/common-hal/bleio/Service.c:83 #, c-format msgid "Failed to add characteristic, status: 0x%08lX" -msgstr "" +msgstr "Echec de l'ajout de caractéristique, statut: 0x%08lX" #: ports/nrf/common-hal/bleio/UUID.c:97 #, fuzzy, c-format msgid "Failed to add Vendor Specific UUID, status: 0x%08lX" -msgstr "Impossible d'ajouter l'UUID 128bits Vendor Specific" +msgstr "Echec de l'ajout de l'UUID Vendor Specific, , statut: 0x%08lX" #: ports/nrf/common-hal/bleio/UUID.c:102 msgid "Invalid UUID string length" @@ -813,33 +774,33 @@ msgstr "Paramètre UUID invalide" #: ports/nrf/common-hal/busio/I2C.c:96 #, fuzzy msgid "All I2C peripherals are in use" -msgstr "Tous les timers sont utilisés" +msgstr "Tous les périphériques I2C sont utilisés" #: ports/nrf/common-hal/busio/SPI.c:133 #, fuzzy msgid "All SPI peripherals are in use" -msgstr "Tous les timers sont utilisés" +msgstr "Tous les périphériques SPI sont utilisés" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" -msgstr "" +msgstr "erreur = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:86 +#: ports/nrf/common-hal/busio/UART.c:110 #, fuzzy msgid "Invalid buffer size" msgstr "longueur de tampon invalide" -#: ports/nrf/common-hal/busio/UART.c:90 +#: ports/nrf/common-hal/busio/UART.c:114 #, fuzzy msgid "Odd parity is not supported" -msgstr "octets > 8 bits non supporté" +msgstr "parité impaire non supportée" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 #, fuzzy msgid "busio.UART not available" msgstr "busio.UART n'est pas disponible" @@ -852,7 +813,7 @@ msgstr "Impossible de lire la température. status: 0x%02x" #: ports/nrf/common-hal/pulseio/PWMOut.c:161 #, fuzzy msgid "All PWM peripherals are in use" -msgstr "Tous les timers sont utilisés" +msgstr "Tous les périphériques PWM sont utilisés" #: ports/unix/modffi.c:138 msgid "Unknown type" @@ -868,7 +829,7 @@ msgstr "" #: ports/unix/modffi.c:413 msgid "Don't know how to pass object to native function" -msgstr "Ne sais pas comment passer un objet à une fonction native" +msgstr "Ne sais pas comment passer l'objet à une fonction native" #: ports/unix/modusocket.c:474 #, c-format @@ -957,9 +918,8 @@ msgid "bad compile mode" msgstr "mauvais mode de compilation" #: py/builtinhelp.c:137 -#, fuzzy msgid "Plus any modules on the filesystem\n" -msgstr "Impossible de remonter le système de fichiers" +msgstr "" #: py/builtinhelp.c:183 #, c-format @@ -970,6 +930,11 @@ msgid "" "\n" "To list built-in modules please do `help(\"modules\")`.\n" msgstr "" +"Bienvenue sur Adafruit CircuitPython %s!\n" +"\n" +"Vistez learn.adafruit.com/category/circuitpython pour des guides.\n" +"\n" +"Pour lister les modules inclus, tapez `help(\"modules\")`.\n" #: py/builtinimport.c:336 msgid "cannot perform relative import" @@ -997,7 +962,8 @@ msgstr "*x multiple dans l'assignement" #: py/compile.c:642 msgid "non-default argument follows default argument" -msgstr "un argument sans valeur par défaut suit un argument avec défaut" +msgstr "" +"un argument sans valeur par défaut suit un argument avec valeur par défaut" #: py/compile.c:771 py/compile.c:789 msgid "invalid micropython decorator" @@ -1037,7 +1003,7 @@ msgstr "ne peut déclarer de nonlocal dans un code externe" #: py/compile.c:1542 msgid "default 'except' must be last" -msgstr "l''except' par défaut doit être le dernier" +msgstr "l''except' par défaut doit être en dernier" #: py/compile.c:2095 msgid "*x must be assignment target" @@ -1078,7 +1044,7 @@ msgstr "couple clef:valeur attendu pour un objet dict" #: py/compile.c:2475 msgid "expecting just a value for set" -msgstr "une simple valeur est attendu pour set" +msgstr "une simple valeur est attendue pour set" #: py/compile.c:2600 msgid "'yield' outside function" @@ -1102,7 +1068,7 @@ msgstr "l'annotation de return doit être un identifiant" #: py/compile.c:3097 msgid "inline assembler must be a function" -msgstr "l'assembleur en ligne doit être une fonction" +msgstr "l'assembleur doit être une fonction" #: py/compile.c:3134 msgid "unknown type" @@ -1134,12 +1100,12 @@ msgstr "'data' nécessite des arguments entiers" #: py/emitinlinethumb.c:102 msgid "can only have up to 4 parameters to Thumb assembly" -msgstr "" +msgstr "il peut y avoir jusqu'à 4 paramètres pour Thumb assembly" #: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112 #, fuzzy msgid "parameters must be registers in sequence r0 to r3" -msgstr "les paramètres doivent être des registres dans la séquence a2 à a5" +msgstr "les paramètres doivent être des registres dans la séquence r0 à r3" #: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230 #, fuzzy, c-format @@ -1154,17 +1120,17 @@ msgstr "'%s' attend un registre" #: py/emitinlinethumb.c:211 #, fuzzy, c-format msgid "'%s' expects a special register" -msgstr "'%s' attend un registre" +msgstr "'%s' attend un registre special" #: py/emitinlinethumb.c:239 #, fuzzy, c-format msgid "'%s' expects an FPU register" -msgstr "'%s' attend un registre" +msgstr "'%s' attend un registre FPU" #: py/emitinlinethumb.c:292 #, fuzzy, c-format msgid "'%s' expects {r0, r1, ...}" -msgstr "'%s' attend un registre" +msgstr "'%s' attend {r0, r1, ...}" #: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169 #, c-format @@ -1174,12 +1140,12 @@ msgstr "'%s' attend un entier" #: py/emitinlinethumb.c:304 #, fuzzy, c-format msgid "'%s' integer 0x%x does not fit in mask 0x%x" -msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d" +msgstr "'%s' l'entier 0x%x ne correspond pas au masque 0x%x" #: py/emitinlinethumb.c:328 #, fuzzy, c-format msgid "'%s' expects an address of the form [a, b]" -msgstr "'%s' attend un registre" +msgstr "'%s' attend une adresse de la forme [a, b]" #: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182 #, c-format @@ -1193,7 +1159,7 @@ msgstr "label '%q' non supporté" #: py/emitinlinethumb.c:806 #, fuzzy, c-format msgid "unsupported Thumb instruction '%s' with %d arguments" -msgstr "instruction Xtensa '%s' non supportée avec %d arguments" +msgstr "instruction Thumb '%s' non supportée avec %d arguments" #: py/emitinlinethumb.c:810 #, fuzzy @@ -1202,7 +1168,7 @@ msgstr "argument de chr() hors de la gamme range(256)" #: py/emitinlinextensa.c:86 msgid "can only have up to 4 parameters to Xtensa assembly" -msgstr "" +msgstr "Maximum 4 paramètres pour l'assembleur Xtensa" #: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96 msgid "parameters must be registers in sequence a2 to a5" @@ -1232,7 +1198,7 @@ msgstr "conversion en objet" #: py/emitnative.c:921 msgid "local '%q' used before type known" -msgstr "'%q' local utilisé avant d'en connaitre le type" +msgstr "variable locale '%q' utilisée avant d'en connaitre le type" #: py/emitnative.c:1118 py/emitnative.c:1156 msgid "can't load from '%q'" @@ -1252,7 +1218,7 @@ msgstr "impossible de stocker '%q'" #: py/emitnative.c:1358 py/emitnative.c:1419 msgid "can't store to '%q'" -msgstr "imposible de stocker vers '%q'" +msgstr "impossible de stocker vers '%q'" #: py/emitnative.c:1369 msgid "can't store with '%q' index" @@ -1292,7 +1258,7 @@ msgstr "native yield" #: py/lexer.c:345 msgid "unicode name escapes" -msgstr "échappement pour nom unicode" +msgstr "échappements de nom unicode" #: py/modbuiltins.c:162 msgid "chr() arg not in range(0x110000)" @@ -1346,140 +1312,140 @@ msgstr "tampon trop petit" msgid "expecting a dict for keyword args" msgstr "un dict est attendu pour les arguments nommés" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" msgstr "Permission refusée" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" msgstr "Fichier/dossier introuvable" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" msgstr "Erreur d'entrée/sortie" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" msgstr "Le fichier existe" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" msgstr "Opération non supportée" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "Argument invalide" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "Trace (appels les plus récents en dernier):\n" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" msgstr " Fichier \"%q\", ligne %d" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" msgstr " Fichier \"%q\"" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" msgstr ", dans %q\n" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" -msgstr "ne peut convertir en entier int" +msgstr "ne peut convertir en entier (int)" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" -msgstr "ne peut convertir %s en entier int" +msgstr "ne peut convertir %s en entier (int)" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" msgstr "ne peut convertir en nombre à virgule flottante (float)" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" msgstr "ne peut convertir %s en nombre à virgule flottante (float)" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" msgstr "ne peut convertir en nombre complexe" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" msgstr "ne peut convertir %s en nombre complexe" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" msgstr "un tuple ou une liste est attendu" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" msgstr "l'objet '%s' n'est pas un tuple ou une liste" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" msgstr "tuple/liste a une mauvaise longueur" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" msgstr "la longueur requise est %d mais l'objet est long de %d" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" msgstr "les indices doivent être des entiers" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" msgstr "les indices %q doivent être des entiers, pas %s" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" msgstr "index %q hors gamme" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" msgstr "l'objet n'a pas de len" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" msgstr "l'objet de type '%s' n'a pas de len()" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" msgstr "l'objet ne supporte pas la suppression d'éléments" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" msgstr "l'objet '%s' ne supporte pas la suppression d'éléments" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "l'objet n'est pas sous-scriptable" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "l'objet '%s' n'est pas sous-scriptable" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" msgstr "l'objet ne supporte pas l'assignation d'éléments" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" msgstr "l'objet '%s' ne supporte pas l'assignation d'éléments" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" msgstr "un objet avec un protocol de tampon est nécessaire" @@ -1498,7 +1464,7 @@ msgstr "tableau/octets requis à droite" #: py/objcomplex.c:203 msgid "can't do truncated division of a complex number" -msgstr "on ne peut pas faire de division tronquée d'un nombre complexe" +msgstr "on ne peut pas faire de division tronquée de nombres complexes" #: py/objcomplex.c:209 msgid "complex division by zero" @@ -1531,7 +1497,7 @@ msgstr "valeurs complexes non supportées" #: py/objgenerator.c:108 msgid "can't send non-None value to a just-started generator" msgstr "" -"on ne peut envoyer une valeur différente de None à un générateur fraîchement " +"on ne peut envoyer une valeur autre que None à un générateur fraîchement " "démarré" #: py/objgenerator.c:126 @@ -1560,7 +1526,7 @@ msgstr "nombre flottant trop grand" #: py/objint.c:328 msgid "long int not supported in this build" -msgstr "entier long non supporté dans cette build" +msgstr "entiers longs non supportés dans cette build" #: py/objint.c:334 py/objint.c:340 py/objint.c:350 py/objint.c:358 msgid "small int overflow" @@ -1640,7 +1606,7 @@ msgstr "join attend une liste d'objets str/bytes cohérent avec l'objet self" #: py/objstr.c:542 py/objstr.c:647 py/objstr.c:1744 msgid "empty separator" -msgstr "separateur vide" +msgstr "séparateur vide" #: py/objstr.c:641 msgid "rsplit(None,n)" @@ -1707,7 +1673,7 @@ msgstr "" #: py/objstr.c:1171 msgid "invalid format specifier" -msgstr "spécificationde format invalide" +msgstr "spécification de format invalide" #: py/objstr.c:1192 msgid "sign not allowed in string format specifier" @@ -1750,7 +1716,7 @@ msgstr "format incomplet" #: py/objstr.c:1490 msgid "not enough arguments for format string" -msgstr "pas assez d'argument pour la chaîne de format" +msgstr "pas assez d'arguments pour la chaîne de format" #: py/objstr.c:1500 #, c-format @@ -1858,7 +1824,7 @@ msgstr "l'argument 1 de issubclass() doit être une classe" #: py/parse.c:726 msgid "constant must be an integer" -msgstr "les constantes doivent être des entiers" +msgstr "une constante doit être un entier" #: py/parse.c:868 msgid "Unable to init parser" @@ -1874,7 +1840,7 @@ msgstr "la désindentation ne correspond à aucune indentation" #: py/parsenum.c:60 msgid "int() arg 2 must be >= 2 and <= 36" -msgstr "l'argument 2 de int() doit être >=2 et <=32" +msgstr "l'argument 2 de int() doit être >=2 et <=36" #: py/parsenum.c:151 msgid "invalid syntax for integer" @@ -1898,7 +1864,7 @@ msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." msgstr "" -"Fichier .mpy incompatible. Merci de mettre à jour tous les .mpy. Voir http://" +"Fichier .mpy incompatible. Merci de mettre à jour tous les .mpy. Voirhttp://" "adafru.it/mpy-update pour plus d'informations." #: py/persistentcode.c:326 @@ -1979,7 +1945,7 @@ msgstr "l'objet '%s' n'est pas un itérateur" #: py/runtime.c:1401 msgid "exceptions must derive from BaseException" -msgstr "les exception doivent dériver de BaseException" +msgstr "les exceptions doivent dériver de BaseException" #: py/runtime.c:1430 msgid "cannot import name %q" @@ -2006,13 +1972,22 @@ msgstr "l'objet n'est pas dans la séquence" msgid "stream operation not supported" msgstr "opération de flux non supportée" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "" +"chaîne de carac. non supportée; utilisez des bytes ou un tableau de bytes" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "argument lenght non permis pour ce type" + #: py/vm.c:255 msgid "local variable referenced before assignment" msgstr "variable locale référencée avant d'être assignée" #: py/vm.c:1142 msgid "no active exception to reraise" -msgstr "aucune exception active a relevé" +msgstr "aucune exception active à relever" #: py/vm.c:1284 msgid "byte code not implemented" @@ -2041,13 +2016,12 @@ msgstr "tampon de caractères trop petit" #: shared-bindings/analogio/AnalogOut.c:118 msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" -"AnalogOut est seulement 16 bits. Les valeurs doivent être inférieures à " -"65536." +"AnalogOut est seulement 16 bits. Les valeurs doivent être inf. à 65536." #: shared-bindings/audiobusio/I2SOut.c:225 #: shared-bindings/audioio/AudioOut.c:226 msgid "Not playing" -msgstr "En pause" +msgstr "Ne joue pas" #: shared-bindings/audiobusio/PDMIn.c:124 msgid "Bit depth must be multiple of 8." @@ -2063,11 +2037,11 @@ msgstr "Le délais au démarrage du micro doit être entre 0.0 et 1.0" #: shared-bindings/audiobusio/PDMIn.c:193 msgid "destination_length must be an int >= 0" -msgstr "destination_length doit être un int >= 0" +msgstr "destination_length doit être un entier >= 0" #: shared-bindings/audiobusio/PDMIn.c:199 msgid "Cannot record to a file" -msgstr "impossible d'enregistrer vers un fichier" +msgstr "Impossible d'enregistrer vers un fichier" #: shared-bindings/audiobusio/PDMIn.c:202 msgid "Destination capacity is smaller than destination_length." @@ -2090,19 +2064,18 @@ msgid "Invalid voice count" msgstr "Type de service invalide" #: shared-bindings/audioio/Mixer.c:99 -#, fuzzy msgid "Invalid channel count" -msgstr "Argument invalide" +msgstr "" #: shared-bindings/audioio/Mixer.c:103 #, fuzzy msgid "Sample rate must be positive" -msgstr "'STA' doit être actif" +msgstr "le taux d'échantillonage doit être positif" #: shared-bindings/audioio/Mixer.c:107 #, fuzzy msgid "bits_per_sample must be 8 or 16" -msgstr "bits doivent être 7, 8 ou 9" +msgstr "bits doivent être 8 ou 16" #: shared-bindings/audioio/RawSample.c:98 msgid "" @@ -2119,7 +2092,7 @@ msgstr "le tampon doit être un objet bytes-like" #: shared-bindings/audioio/WaveFile.c:78 #: shared-bindings/displayio/OnDiskBitmap.c:85 msgid "file must be a file opened in byte mode" -msgstr "le fichier doit être un fichier ouvert en mode byte" +msgstr "le fichier doit être un fichier ouvert en mode 'byte'" #: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121 #: shared-bindings/busio/SPI.c:133 @@ -2148,24 +2121,24 @@ msgstr "les slices de tampon doivent être de longueurs égales" #: shared-bindings/bleio/Address.c:101 msgid "Wrong address length" -msgstr "" +msgstr "Mauvaise longueur d'adresse" #: shared-bindings/bleio/Address.c:107 #, fuzzy msgid "Wrong number of bytes provided" -msgstr "mauvais nombres d'arguments" +msgstr "mauvais nombre d'octets fourni'" #: shared-bindings/bleio/Device.c:210 msgid "Can't add services in Central mode" -msgstr "" +msgstr "Impossible d'ajouter des service en mode Central" #: shared-bindings/bleio/Device.c:226 msgid "Can't connect in Peripheral mode" -msgstr "" +msgstr "Impossible de se connecter en mode Peripheral" #: shared-bindings/bleio/Device.c:256 msgid "Can't change the name in Central mode" -msgstr "" +msgstr "Modification du nom impossible en mode Central" #: shared-bindings/bleio/Device.c:277 shared-bindings/bleio/Device.c:313 msgid "Can't advertise in Central mode" @@ -2175,57 +2148,60 @@ msgstr "" msgid "Function requires lock." msgstr "La fonction nécessite un verrou." -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" msgstr "bits doivent être 7, 8 ou 9" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" msgstr "stop doit être 1 ou 2" +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" +msgstr "timeout >100 (exprimé en secondes, pas en ms)" + #: shared-bindings/digitalio/DigitalInOut.c:211 msgid "Invalid direction." msgstr "Direction invalide" #: shared-bindings/digitalio/DigitalInOut.c:240 msgid "Cannot set value when direction is input." -msgstr "Impossible d'affecter une valeur quand la direction est input." +msgstr "Impossible d'affecter une valeur quand la direction est 'input'." #: shared-bindings/digitalio/DigitalInOut.c:266 #: shared-bindings/digitalio/DigitalInOut.c:281 msgid "Drive mode not used when direction is input." -msgstr "Le mode Drive n'est pas utilisé quand la direction est 'input'" +msgstr "Le mode Drive n'est pas utilisé quand la direction est 'input'." #: shared-bindings/digitalio/DigitalInOut.c:314 #: shared-bindings/digitalio/DigitalInOut.c:331 msgid "Pull not used when direction is output." -msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'" +msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." #: shared-bindings/digitalio/DigitalInOut.c:340 msgid "Unsupported pull value." -msgstr "Valeur de 'pull' non supportée" +msgstr "Valeur de tirage 'pull' non supportée." #: shared-bindings/displayio/Bitmap.c:84 #, fuzzy msgid "y should be an int" -msgstr "La longueur doit être entière" +msgstr "y doit être un entier (int)" #: shared-bindings/displayio/Bitmap.c:89 #, fuzzy msgid "row buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -"le tampon de sample_source doit être un bytearray ou un tableau de type " -"'h','H', 'b' ou 'B'" +"le tampon de ligne doit être un bytearray ou un tableau de type 'b' ou 'B'" #: shared-bindings/displayio/Bitmap.c:94 #, fuzzy msgid "row data must be a buffer" -msgstr "les constantes doivent être des entiers" +msgstr "les données de ligne doivent être un tampon" #: shared-bindings/displayio/ColorConverter.c:72 #, fuzzy msgid "color should be an int" -msgstr "La longueur doit être entière" +msgstr "la couleur doit être un entier (int)" #: shared-bindings/displayio/FourWire.c:55 #: shared-bindings/displayio/FourWire.c:64 @@ -2241,44 +2217,42 @@ msgstr "Le tampon doit être de longueur au moins 1" #, fuzzy msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -"le tampon de sample_source doit être un bytearray ou un tableau de type " -"'h','H', 'b' ou 'B'" +"le tampon de couleur doit être un bytearray ou un tableau de type 'b' ou 'B'" #: shared-bindings/displayio/Palette.c:102 msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "" -"Le tampon couleur doit avoir 3 octets (RVB) ou 4 octets (RVB + octet de " -"padding)" +msgstr "le tampon de couleur doit faire 3 octets (RVB) ou 4 (RVB + pad byte)" #: shared-bindings/displayio/Palette.c:106 #, fuzzy msgid "color must be between 0x000000 and 0xffffff" -msgstr "Les octets 'bytes' doivent être entre 0 et 255" +msgstr "la couleur doit être entre 0x000000 et 0xffffff" #: shared-bindings/displayio/Palette.c:110 #, fuzzy msgid "color buffer must be a buffer or int" -msgstr "le tampon doit être un objet bytes-like" +msgstr "le tampon de couleur doit être un tampon ou un entier" #: shared-bindings/displayio/Palette.c:123 #: shared-bindings/displayio/Palette.c:137 #, fuzzy msgid "palette_index should be an int" -msgstr "Les valeurs du tableau doivent être des octets simples 'bytes'" +msgstr "palette_index devrait être un entier (int)'" #: shared-bindings/displayio/Sprite.c:48 #, fuzzy msgid "position must be 2-tuple" -msgstr "stop doit être 1 ou 2" +msgstr "position doit être un 2-tuple" #: shared-bindings/displayio/Sprite.c:97 #, fuzzy msgid "unsupported bitmap type" -msgstr "Débit non supporté" +msgstr "type de bitmap non supporté" #: shared-bindings/displayio/Sprite.c:162 msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" msgstr "" +"pixel_shader doit être un objet displayio.Palette ou displayio.ColorConverter" #: shared-bindings/gamepad/GamePad.c:100 msgid "too many arguments" @@ -2286,7 +2260,7 @@ msgstr "trop d'arguments" #: shared-bindings/gamepad/GamePad.c:104 msgid "expected a DigitalInOut" -msgstr "un objet DigitalInOut attendu" +msgstr "objet DigitalInOut attendu" #: shared-bindings/i2cslave/I2CSlave.c:98 #, fuzzy @@ -2295,11 +2269,11 @@ msgstr "ne peut convertir %s en entier int" #: shared-bindings/i2cslave/I2CSlave.c:101 msgid "address out of bounds" -msgstr "Adresse hors limite" +msgstr "adresse hors limites" #: shared-bindings/i2cslave/I2CSlave.c:107 msgid "addresses is empty" -msgstr "Adresses est vide" +msgstr "adresses vides" #: shared-bindings/microcontroller/Pin.c:89 #: shared-bindings/neopixel_write/__init__.c:67 @@ -2325,11 +2299,11 @@ msgstr "Slice et valeur de tailles différentes" #: shared-bindings/nvm/ByteArray.c:104 msgid "Array values should be single bytes." -msgstr "Les valeurs du tableau doivent être des octets simples 'bytes'" +msgstr "Les valeurs du tableau doivent être des octets simples 'bytes'." #: shared-bindings/nvm/ByteArray.c:111 shared-bindings/nvm/ByteArray.c:141 msgid "Unable to write to nvm." -msgstr "Impossible d'écrire sur la nvm" +msgstr "Impossible d'écrire sur la nvm." #: shared-bindings/nvm/ByteArray.c:137 msgid "Bytes must be between 0 and 255." @@ -2352,7 +2326,7 @@ msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" "La fréquence de PWM n'est pas modifiable quand variable_frequency est False " -"à laconstruction." +"à la construction." #: shared-bindings/pulseio/PulseIn.c:275 msgid "Cannot delete values" @@ -2376,7 +2350,7 @@ msgstr "Le tableau doit contenir des halfwords (type 'H')" #: shared-bindings/random/__init__.c:92 shared-bindings/random/__init__.c:100 msgid "stop not reachable from start" -msgstr "stop n'est pas accessible de start" +msgstr "stop n'est pas accessible au démarrage" #: shared-bindings/random/__init__.c:111 msgid "step must be non-zero" @@ -2428,17 +2402,17 @@ msgstr "time.struct_time() prend exactement 1 argument" msgid "time.struct_time() takes a 9-sequence" msgstr "time.struct_time() prend une séquence de longueur 9" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" msgstr "Argument de type tuple ou struct_time nécessaire" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" msgstr "la fonction prend exactement 9 arguments" -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" -msgstr "timestamp hors gamme pour la plateforme time_t" +msgstr "timestamp hors gamme pour time_t de la plateforme" #: shared-bindings/touchio/TouchIn.c:173 msgid "threshold must be in the range 0-65536" @@ -2465,19 +2439,19 @@ msgstr "Index de la voix trop grand" #: shared-module/audioio/Mixer.c:85 msgid "The sample's sample rate does not match the mixer's" -msgstr "" +msgstr "L'échantillonage de l'échantillon ne correspond pas à celui du mixer" #: shared-module/audioio/Mixer.c:88 msgid "The sample's channel count does not match the mixer's" -msgstr "" +msgstr "Le canal de l'échantillon ne correspond pas à celui du mixer" #: shared-module/audioio/Mixer.c:91 msgid "The sample's bits_per_sample does not match the mixer's" -msgstr "Le bits_per_sample de l'échantillon ne correspond pas au mixer" +msgstr "Le bits_per_sample de l'échantillon ne correspond pas à celui du mixer" #: shared-module/audioio/Mixer.c:100 msgid "The sample's signedness does not match the mixer's" -msgstr "L'échantillon non signé ne correspond pas au mixer" +msgstr "Le signe de l'échantillon ne correspond pas au mixer" #: shared-module/audioio/WaveFile.c:61 msgid "Invalid wave file" @@ -2529,7 +2503,7 @@ msgstr "Pas de transfert sans broches MOSI et MISO" #: shared-module/displayio/Bitmap.c:49 msgid "Only bit maps of 8 bit color or less are supported" -msgstr "Seul les mappings en couleur 8 bits (ou moins) sont supportés" +msgstr "Seules les bitmaps de 8bits par couleur ou moins sont supportées" #: shared-module/displayio/Bitmap.c:69 msgid "row must be packed and word aligned" @@ -2537,7 +2511,7 @@ msgstr "" #: shared-module/displayio/Group.c:39 msgid "Group full" -msgstr "Group complet" +msgstr "Groupe plein" #: shared-module/displayio/Group.c:48 #, fuzzy @@ -2552,12 +2526,12 @@ msgstr "Fichier invalide" #: shared-module/displayio/OnDiskBitmap.c:59 #, c-format msgid "Only Windows format, uncompressed BMP supported %d" -msgstr "Seul le format Windows, BMP non compressé, est supporté %d" +msgstr "Seul les BMP non-compressé au format Windows sont supportés %d" #: shared-module/displayio/OnDiskBitmap.c:64 #, c-format msgid "Only true color (24 bpp or higher) BMP supported %x" -msgstr "Seul les BMP 'true color' (24 bpp ou plus) sont supportés %x" +msgstr "Seul les BMP 24bits ou plus sont supportés %x" #: shared-module/storage/__init__.c:155 msgid "Cannot remount '/' when USB is active." @@ -2584,34 +2558,124 @@ msgstr "USB occupé" msgid "USB Error" msgstr "Erreur USB" +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "Vous avez demandé à démarrer en mode sans-échec par " + +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "Pour quitter, redémarrez la carte SVP sans " + +#: supervisor/shared/safe_mode.c:107 #, fuzzy -#~ msgid "palette must be displayio.Palette" -#~ msgstr "palettre doit être displayio.Palette" +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 "Can not query for the device address." -#~ msgstr "Impossible d'obtenir l'adresse du périphérique" +#: supervisor/shared/safe_mode.c:109 +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 "Cannot set PPCP parameters." -#~ msgstr "Impossible d'appliquer les paramètres PPCP" +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Impossible d'appliquer les paramètres GAP" +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "" -#~ msgid "Can not encode UUID, to check length." -#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "Erreur fatale de MicroPython.\n" + +#: supervisor/shared/safe_mode.c:118 +#, 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 éjecter CIRCUITPY).\n" + +#: supervisor/shared/safe_mode.c:120 +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 "" +"La pile de CircuitPython a été corrompue parce que la pile était trop " +"petite.\n" +"Augmentez la limite de taille de la pile et appuyez sur 'reset' (après avoir " +"éjecter 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:123 +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 denouveau pour quitter de le mode sans-échec.\n" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n" + +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n" + +#~ msgid "Can not add Service." +#~ msgstr "Impossible d'ajouter le Service" #~ msgid "Invalid Service type" #~ msgstr "Type de service invalide" +#~ msgid "Can not encode UUID, to check length." +#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." + +#~ msgid "Can not add Characteristic." +#~ msgstr "Impossible d'ajouter la Characteristic." + +#~ msgid "Can not query for the device address." +#~ msgstr "Impossible d'obtenir l'adresse du périphérique" + +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "assez de puissance pour l'ensemble du circuit et appuyez sur " +#~ "'reset' (après avoir éjecter CIRCUITPY).\n" + +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Impossible d'appliquer les paramètres PPCP" + #~ msgid "Can not apply device name in the stack." #~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossible d'appliquer les paramètres GAP" + #, fuzzy #~ msgid "value_size must be power of two" -#~ msgstr "value_size est une puissance de deux" - -#~ msgid "Can not add Service." -#~ msgstr "Impossible d'ajouter le Service" +#~ msgstr "value_size doit être une puissance de 2" -#~ msgid "Can not add Characteristic." -#~ msgstr "Impossible d'ajouter la Characteristic." +#, fuzzy +#~ msgid "palette must be displayio.Palette" +#~ msgstr "la palette doit être une displayio.Palette" diff --git a/locale/it_IT.po b/locale/it_IT.po index 4acdb39f7..4cb328319 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: 2018-11-09 16:20-0800\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n" "Language-Team: \n" @@ -131,7 +131,7 @@ msgstr "compressione dell'header" msgid "invalid dupterm index" msgstr "indice dupterm non valido" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "Filesystem in sola lettura" @@ -151,11 +151,11 @@ msgstr "argomenti non validi" msgid "script compilation not supported" msgstr "compilazione dello scrip non suportata" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr " output:\n" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" @@ -163,71 +163,28 @@ msgstr "" "L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL " "per disabilitarlo.\n" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "Auto-reload disattivato.\n" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\n" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "È stato richiesto l'avvio in modalità sicura da " - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "Per uscire resettare la scheda senza " - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "" -"Sei nella modalità sicura che significa che qualcosa di molto brutto è " -"successo.\n" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "" -"Sembra che il codice del core di CircuitPython sia crashato malamente. " -"Whoops!\n" - -#: main.c:263 -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "" -"Ti preghiamo di compilare una issue con il contenuto del tuo drie " -"CIRCUITPY:\n" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" -"La potenza del microcontrollore è calata. Assicurati che l'alimentazione sia " -"attaccata correttamente\n" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" -"abbastanza potenza per l'intero circuito e premere reset (dopo aver espulso " -"CIRCUITPY).\n" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" "Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare." -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "soft reboot\n" @@ -375,7 +332,7 @@ msgstr "Non sono presenti abbastanza pin" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" @@ -389,31 +346,31 @@ msgstr "SDA o SCL necessitano un pull-up" msgid "Unsupported baudrate" msgstr "baudrate non supportato" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "byte > 8 bit non supportati" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" msgstr "tx e rx non possono essere entrambi None" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "Impossibile allocare buffer RX" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "Impossibile inizializzare l'UART" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "Nessun pin RX" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "Nessun pin TX" @@ -459,7 +416,7 @@ msgid "pop from an empty PulseIn" msgstr "pop sun un PulseIn vuoto" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "indice fuori intervallo" @@ -825,26 +782,26 @@ msgstr "Tutte le periferiche I2C sono in uso" msgid "All SPI peripherals are in use" msgstr "Tutte le periferiche SPI sono in uso" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" msgstr "" -#: ports/nrf/common-hal/busio/UART.c:86 +#: ports/nrf/common-hal/busio/UART.c:110 #, fuzzy msgid "Invalid buffer size" msgstr "lunghezza del buffer non valida" -#: ports/nrf/common-hal/busio/UART.c:90 +#: ports/nrf/common-hal/busio/UART.c:114 #, fuzzy msgid "Odd parity is not supported" msgstr "operazione I2C non supportata" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 #, fuzzy msgid "busio.UART not available" msgstr "busio.UART non ancora implementato" @@ -1355,140 +1312,140 @@ msgstr "buffer troppo piccolo" msgid "expecting a dict for keyword args" msgstr "argomenti nominati necessitano un dizionario" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" msgstr "Permesso negato" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" msgstr "Nessun file/directory esistente" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" msgstr "Errore input/output" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" msgstr "File esistente" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" msgstr "Operazione non supportata" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "Argomento non valido" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "Traceback (chiamata più recente per ultima):\n" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" msgstr " File \"%q\", riga %d" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" msgstr " File \"%q\"" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" msgstr ", in %q\n" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" msgstr "non è possibile convertire a int" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" msgstr "non è possibile convertire %s a int" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" msgstr "non è possibile convertire a float" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" msgstr "non è possibile convertire %s a float" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" msgstr "non è possibile convertire a complex" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" msgstr "non è possibile convertire a complex" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" msgstr "lista/tupla prevista" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" msgstr "oggetto '%s' non è una tupla o una lista" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" msgstr "tupla/lista ha la lunghezza sbagliata" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" msgstr "lunghezza %d richiesta ma l'oggetto ha lunghezza %d" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" msgstr "gli indici devono essere interi" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" msgstr "gli indici %q devono essere interi, non %s" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" msgstr "indice %q fuori intervallo" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" msgstr "l'oggetto non ha lunghezza" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" msgstr "l'oggetto di tipo '%s' non implementa len()" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" msgstr "" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" msgstr "" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" msgstr "" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" msgstr "" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" msgstr "" @@ -2011,6 +1968,14 @@ msgstr "oggetto non in sequenza" msgid "stream operation not supported" msgstr "operazione di stream non supportata" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "" + #: py/vm.c:255 msgid "local variable referenced before assignment" msgstr "variabile locale richiamata prima di un assegnamento" @@ -2180,14 +2145,18 @@ msgstr "" msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" msgstr "i bit devono essere 7, 8 o 9" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" msgstr "" +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" +msgstr "" + #: shared-bindings/digitalio/DigitalInOut.c:211 msgid "Invalid direction." msgstr "Direzione non valida." @@ -2417,15 +2386,15 @@ msgstr "time.struct_time() prende esattamente un argomento" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" msgstr "Tupla o struct_time richiesto come argomento" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" msgstr "la funzione prende esattamente 9 argomenti" -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" msgstr "timestamp è fuori intervallo per il time_t della piattaforma" @@ -2571,17 +2540,94 @@ msgstr "USB occupata" msgid "USB Error" msgstr "Errore USB" +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "È stato richiesto l'avvio in modalità sicura da " + +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "Per uscire resettare la scheda senza " + +#: supervisor/shared/safe_mode.c:107 +#, 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" + +#: supervisor/shared/safe_mode.c:109 +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 "" + +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:118 +#, 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" + +#: supervisor/shared/safe_mode.c:120 +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 "" + +#: supervisor/shared/safe_mode.c:123 +msgid "" +"The reset button was pressed while booting CircuitPython. Press again to " +"exit safe mode.\n" +msgstr "" + #~ msgid "Invalid Service type" #~ msgstr "Tipo di servizio non valido" -#~ msgid "Can not query for the device address." -#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" + +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Impossibile applicare i parametri GAP." + +#~ msgid "Can not apply device name in the stack." +#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." #~ msgid "Cannot set PPCP parameters." #~ msgstr "Impossibile impostare i parametri PPCP." -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Impossibile applicare i parametri GAP." +#~ msgid "" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver " +#~ "espulso CIRCUITPY).\n" + +#~ msgid "Can not query for the device address." +#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." + +#~ msgid "Can not add Characteristic." +#~ msgstr "Non è possibile aggiungere Characteristic." #~ msgid "Can not encode UUID, to check length." #~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." @@ -2589,14 +2635,16 @@ msgstr "Errore USB" #~ msgid "Can encode UUID into the advertisement packet." #~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." -#~ msgid "Can not apply device name in the stack." -#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." - -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" - #~ msgid "Can not add Service." #~ msgstr "Non è possibile aggiungere Service." -#~ msgid "Can not add Characteristic." -#~ msgstr "Non è possibile aggiungere Characteristic." +#~ msgid "" +#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n" +#~ msgstr "" +#~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie " +#~ "CIRCUITPY:\n" + +#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" +#~ msgstr "" +#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. " +#~ "Whoops!\n" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 2400b6a13..1b35b4824 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: 2018-11-09 16:20-0800\n" +"POT-Creation-Date: 2018-12-26 20:49+0100\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -131,7 +131,7 @@ msgstr "" msgid "invalid dupterm index" msgstr "Índice de dupterm inválido" -#: extmod/vfs_fat.c:426 py/moduerrno.c:150 +#: extmod/vfs_fat.c:426 py/moduerrno.c:154 msgid "Read-only filesystem" msgstr "Sistema de arquivos somente leitura" @@ -151,70 +151,37 @@ msgstr "argumentos inválidos" msgid "script compilation not supported" msgstr "compilação de script não suportada" -#: main.c:154 +#: main.c:150 msgid " output:\n" msgstr " saída:\n" -#: main.c:168 main.c:241 +#: main.c:164 main.c:237 msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -#: main.c:170 +#: main.c:166 msgid "Running in safe mode! Auto-reload is off.\n" msgstr "Rodando em modo seguro! Atualização automática está desligada.\n" -#: main.c:172 main.c:243 +#: main.c:168 main.c:239 msgid "Auto-reload is off.\n" msgstr "A atualização automática está desligada.\n" -#: main.c:186 +#: main.c:182 msgid "Running in safe mode! Not running saved code.\n" msgstr "Rodando em modo seguro! Não está executando o código salvo.\n" -#: main.c:202 +#: main.c:198 msgid "WARNING: Your code filename has two extensions\n" msgstr "AVISO: Seu arquivo de código tem duas extensões\n" -#: main.c:250 -msgid "You requested starting safe mode by " -msgstr "Você solicitou o início do modo de segurança" - -#: main.c:253 -msgid "To exit, please reset the board without " -msgstr "Para sair, por favor, reinicie a placa sem " - -#: main.c:260 -msgid "" -"You are running in safe mode which means something really bad happened.\n" -msgstr "" - -#: main.c:262 -msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n" -msgstr "" - -#: main.c:263 -msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n" -msgstr "" - -#: main.c:266 -msgid "" -"The microcontroller's power dipped. Please make sure your power supply " -"provides\n" -msgstr "" - -#: main.c:267 -msgid "" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" -msgstr "" - -#: main.c:271 +#: main.c:244 msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgstr "" -#: main.c:429 +#: main.c:407 msgid "soft reboot\n" msgstr "" @@ -360,7 +327,7 @@ msgstr "Não há pinos suficientes disponíveis" #: ports/atmel-samd/common-hal/busio/I2C.c:78 #: ports/atmel-samd/common-hal/busio/SPI.c:171 -#: ports/atmel-samd/common-hal/busio/UART.c:119 +#: ports/atmel-samd/common-hal/busio/UART.c:120 #: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45 #: ports/nrf/common-hal/busio/I2C.c:82 msgid "Invalid pins" @@ -374,31 +341,31 @@ msgstr "SDA ou SCL precisa de um pull up" msgid "Unsupported baudrate" msgstr "Taxa de transmissão não suportada" -#: ports/atmel-samd/common-hal/busio/UART.c:66 +#: ports/atmel-samd/common-hal/busio/UART.c:67 msgid "bytes > 8 bits not supported" msgstr "bytes > 8 bits não suportado" -#: ports/atmel-samd/common-hal/busio/UART.c:72 -#: ports/nrf/common-hal/busio/UART.c:82 +#: ports/atmel-samd/common-hal/busio/UART.c:73 +#: ports/nrf/common-hal/busio/UART.c:106 msgid "tx and rx cannot both be None" msgstr "TX e RX não podem ser ambos" -#: ports/atmel-samd/common-hal/busio/UART.c:145 -#: ports/nrf/common-hal/busio/UART.c:115 +#: ports/atmel-samd/common-hal/busio/UART.c:146 +#: ports/nrf/common-hal/busio/UART.c:140 msgid "Failed to allocate RX buffer" msgstr "Falha ao alocar buffer RX" -#: ports/atmel-samd/common-hal/busio/UART.c:153 +#: ports/atmel-samd/common-hal/busio/UART.c:154 msgid "Could not initialize UART" msgstr "Não foi possível inicializar o UART" -#: ports/atmel-samd/common-hal/busio/UART.c:240 -#: ports/nrf/common-hal/busio/UART.c:149 +#: ports/atmel-samd/common-hal/busio/UART.c:241 +#: ports/nrf/common-hal/busio/UART.c:185 msgid "No RX pin" msgstr "Nenhum pino RX" -#: ports/atmel-samd/common-hal/busio/UART.c:294 -#: ports/nrf/common-hal/busio/UART.c:195 +#: ports/atmel-samd/common-hal/busio/UART.c:300 +#: ports/nrf/common-hal/busio/UART.c:220 msgid "No TX pin" msgstr "Nenhum pino TX" @@ -443,7 +410,7 @@ msgid "pop from an empty PulseIn" msgstr "" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 -#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420 +#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:422 msgid "index out of range" msgstr "Índice fora do intervalo" @@ -808,26 +775,26 @@ msgstr "Todos os periféricos I2C estão em uso" msgid "All SPI peripherals are in use" msgstr "Todos os periféricos SPI estão em uso" -#: ports/nrf/common-hal/busio/UART.c:48 +#: ports/nrf/common-hal/busio/UART.c:49 #, c-format msgid "error = 0x%08lX" msgstr "erro = 0x%08lX" -#: ports/nrf/common-hal/busio/UART.c:86 +#: ports/nrf/common-hal/busio/UART.c:110 #, fuzzy msgid "Invalid buffer size" msgstr "Arquivo inválido" -#: ports/nrf/common-hal/busio/UART.c:90 +#: ports/nrf/common-hal/busio/UART.c:114 #, fuzzy msgid "Odd parity is not supported" msgstr "I2C operação não suportada" -#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326 -#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336 -#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347 -#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356 -#: ports/nrf/common-hal/busio/UART.c:364 +#: ports/nrf/common-hal/busio/UART.c:346 ports/nrf/common-hal/busio/UART.c:350 +#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360 +#: ports/nrf/common-hal/busio/UART.c:366 ports/nrf/common-hal/busio/UART.c:371 +#: ports/nrf/common-hal/busio/UART.c:376 ports/nrf/common-hal/busio/UART.c:380 +#: ports/nrf/common-hal/busio/UART.c:388 msgid "busio.UART not available" msgstr "busio.UART não disponível" @@ -1331,140 +1298,140 @@ msgstr "" msgid "expecting a dict for keyword args" msgstr "" -#: py/moduerrno.c:143 py/moduerrno.c:146 +#: py/moduerrno.c:147 py/moduerrno.c:150 msgid "Permission denied" msgstr "Permissão negada" -#: py/moduerrno.c:144 +#: py/moduerrno.c:148 msgid "No such file/directory" msgstr "" -#: py/moduerrno.c:145 +#: py/moduerrno.c:149 msgid "Input/output error" msgstr "" -#: py/moduerrno.c:147 +#: py/moduerrno.c:151 msgid "File exists" msgstr "Arquivo já existe" -#: py/moduerrno.c:148 +#: py/moduerrno.c:152 msgid "Unsupported operation" msgstr "" -#: py/moduerrno.c:149 +#: py/moduerrno.c:153 msgid "Invalid argument" msgstr "Argumento inválido" -#: py/obj.c:90 +#: py/obj.c:92 msgid "Traceback (most recent call last):\n" msgstr "" -#: py/obj.c:94 +#: py/obj.c:96 msgid " File \"%q\", line %d" msgstr " Arquivo \"%q\", linha %d" -#: py/obj.c:96 +#: py/obj.c:98 msgid " File \"%q\"" msgstr " Arquivo \"%q\"" -#: py/obj.c:100 +#: py/obj.c:102 msgid ", in %q\n" msgstr "" -#: py/obj.c:257 +#: py/obj.c:259 msgid "can't convert to int" msgstr "" -#: py/obj.c:260 +#: py/obj.c:262 #, c-format msgid "can't convert %s to int" msgstr "" -#: py/obj.c:320 +#: py/obj.c:322 msgid "can't convert to float" msgstr "" -#: py/obj.c:323 +#: py/obj.c:325 #, c-format msgid "can't convert %s to float" msgstr "" -#: py/obj.c:353 +#: py/obj.c:355 msgid "can't convert to complex" msgstr "" -#: py/obj.c:356 +#: py/obj.c:358 #, c-format msgid "can't convert %s to complex" msgstr "" -#: py/obj.c:371 +#: py/obj.c:373 msgid "expected tuple/list" msgstr "" -#: py/obj.c:374 +#: py/obj.c:376 #, c-format msgid "object '%s' is not a tuple or list" msgstr "" -#: py/obj.c:385 +#: py/obj.c:387 msgid "tuple/list has wrong length" msgstr "" -#: py/obj.c:387 +#: py/obj.c:389 #, c-format msgid "requested length %d but object has length %d" msgstr "" -#: py/obj.c:400 +#: py/obj.c:402 msgid "indices must be integers" msgstr "" -#: py/obj.c:403 +#: py/obj.c:405 msgid "%q indices must be integers, not %s" msgstr "" -#: py/obj.c:423 +#: py/obj.c:425 msgid "%q index out of range" msgstr "" -#: py/obj.c:455 +#: py/obj.c:457 msgid "object has no len" msgstr "" -#: py/obj.c:458 +#: py/obj.c:460 #, c-format msgid "object of type '%s' has no len()" msgstr "" -#: py/obj.c:496 +#: py/obj.c:500 msgid "object does not support item deletion" msgstr "" -#: py/obj.c:499 +#: py/obj.c:503 #, c-format msgid "'%s' object does not support item deletion" msgstr "" -#: py/obj.c:503 +#: py/obj.c:507 msgid "object is not subscriptable" msgstr "" -#: py/obj.c:506 +#: py/obj.c:510 #, c-format msgid "'%s' object is not subscriptable" msgstr "" -#: py/obj.c:510 +#: py/obj.c:514 msgid "object does not support item assignment" msgstr "" -#: py/obj.c:513 +#: py/obj.c:517 #, c-format msgid "'%s' object does not support item assignment" msgstr "" -#: py/obj.c:544 +#: py/obj.c:548 msgid "object with buffer protocol required" msgstr "" @@ -1980,6 +1947,14 @@ msgstr "objeto não em seqüência" msgid "stream operation not supported" msgstr "" +#: py/stream.c:254 +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: py/stream.c:289 +msgid "length argument not allowed for this type" +msgstr "" + #: py/vm.c:255 msgid "local variable referenced before assignment" msgstr "" @@ -2141,14 +2116,18 @@ msgstr "" msgid "Function requires lock." msgstr "" -#: shared-bindings/busio/UART.c:102 +#: shared-bindings/busio/UART.c:106 msgid "bits must be 7, 8 or 9" msgstr "" -#: shared-bindings/busio/UART.c:114 +#: shared-bindings/busio/UART.c:118 msgid "stop must be 1 or 2" msgstr "" +#: shared-bindings/busio/UART.c:123 +msgid "timeout >100 (units are now seconds, not msecs)" +msgstr "" + #: shared-bindings/digitalio/DigitalInOut.c:211 msgid "Invalid direction." msgstr "Direção inválida" @@ -2370,15 +2349,15 @@ msgstr "" msgid "time.struct_time() takes a 9-sequence" msgstr "" -#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:264 +#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:263 msgid "Tuple or struct_time argument required" msgstr "Tuple or struct_time argument required" -#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:269 +#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:268 msgid "function takes exactly 9 arguments" msgstr "função leva exatamente 9 argumentos" -#: shared-bindings/time/__init__.c:240 shared-bindings/time/__init__.c:273 +#: shared-bindings/time/__init__.c:239 shared-bindings/time/__init__.c:272 msgid "timestamp out of range for platform time_t" msgstr "timestamp fora do intervalo para a plataforma time_t" @@ -2523,32 +2502,87 @@ msgstr "USB ocupada" msgid "USB Error" msgstr "Erro na USB" -#~ msgid "Baud rate too high for this SPI peripheral" -#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" +#: supervisor/shared/safe_mode.c:97 +msgid "You requested starting safe mode by " +msgstr "Você solicitou o início do modo de segurança" -#~ msgid "Can not query for the device address." -#~ msgstr "Não é possível consultar o endereço do dispositivo." +#: supervisor/shared/safe_mode.c:100 +msgid "To exit, please reset the board without " +msgstr "Para sair, por favor, reinicie a placa sem " -#~ msgid "Cannot set PPCP parameters." -#~ msgstr "Não é possível definir parâmetros PPCP." +#: supervisor/shared/safe_mode.c:107 +msgid "" +"You are running in safe mode which means something unanticipated happened.\n" +msgstr "" -#~ msgid "Cannot apply GAP parameters." -#~ msgstr "Não é possível aplicar parâmetros GAP." +#: supervisor/shared/safe_mode.c:109 +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 "" -#~ msgid "Can encode UUID into the advertisement packet." -#~ msgstr "Pode codificar o UUID no pacote de anúncios." +#: supervisor/shared/safe_mode.c:111 +msgid "Crash into the HardFault_Handler.\n" +msgstr "" -#~ msgid "Can not apply advertisement data. status: 0x%02x" -#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" +#: supervisor/shared/safe_mode.c:113 +msgid "MicroPython NLR jump failed. Likely memory corruption.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:115 +msgid "MicroPython fatal error.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c:118 +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 "" + +#: supervisor/shared/safe_mode.c:120 +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 "" + +#: supervisor/shared/safe_mode.c:123 +msgid "" +"The reset button was pressed while booting CircuitPython. Press again to " +"exit safe mode.\n" +msgstr "" #~ msgid "Can not apply device name in the stack." #~ msgstr "Não é possível aplicar o nome do dispositivo na pilha." +#~ msgid "Can not add Characteristic." +#~ msgstr "Não é possível adicionar Característica." + +#~ msgid "Can encode UUID into the advertisement packet." +#~ msgstr "Pode codificar o UUID no pacote de anúncios." + #~ msgid "Invalid Service type" #~ msgstr "Tipo de serviço inválido" +#~ msgid "Cannot apply GAP parameters." +#~ msgstr "Não é possível aplicar parâmetros GAP." + +#~ msgid "Cannot set PPCP parameters." +#~ msgstr "Não é possível definir parâmetros PPCP." + +#~ msgid "Can not query for the device address." +#~ msgstr "Não é possível consultar o endereço do dispositivo." + +#~ msgid "Baud rate too high for this SPI peripheral" +#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" + +#~ msgid "Can not apply advertisement data. status: 0x%02x" +#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x" + #~ msgid "Can not add Service." #~ msgstr "Não é possível adicionar o serviço." - -#~ msgid "Can not add Characteristic." -#~ msgstr "Não é possível adicionar Característica." diff --git a/logo/CircuitPython_Repo_header_logo.png b/logo/CircuitPython_Repo_header_logo.png Binary files differnew file mode 100644 index 000000000..6ce287922 --- /dev/null +++ b/logo/CircuitPython_Repo_header_logo.png diff --git a/logo/license-MIT-brightgreen.svg b/logo/license-MIT-brightgreen.svg new file mode 100644 index 000000000..e28c04bbc --- /dev/null +++ b/logo/license-MIT-brightgreen.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="78" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="78" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h47v20H0z"/><path fill="#4c1" d="M47 0h31v20H47z"/><path fill="url(#b)" d="M0 0h78v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"> <text x="245" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="370">license</text><text x="245" y="140" transform="scale(.1)" textLength="370">license</text><text x="615" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="210">MIT</text><text x="615" y="140" transform="scale(.1)" textLength="210">MIT</text></g> <head xmlns=""/></svg>
\ No newline at end of file @@ -51,6 +51,7 @@ #include "supervisor/shared/autoreload.h" #include "supervisor/shared/translate.h" #include "supervisor/shared/rgb_led_status.h" +#include "supervisor/shared/safe_mode.h" #include "supervisor/shared/status_leds.h" #include "supervisor/shared/stack.h" #include "supervisor/serial.h" @@ -140,12 +141,6 @@ const char* first_existing_file_in_list(const char ** filenames) { return NULL; } -void write_compressed(const compressed_string_t* compressed) { - char decompressed[compressed->length]; - decompress(compressed, decompressed); - serial_write(decompressed); -} - bool maybe_run_list(const char ** filenames, pyexec_result_t* exec_result) { const char* filename = first_existing_file_in_list(filenames); if (filename == NULL) { @@ -166,11 +161,11 @@ bool run_code_py(safe_mode_t safe_mode) { if (serial_connected_at_start) { serial_write("\n"); if (autoreload_is_enabled()) { - write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n")); + serial_write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n")); } else if (safe_mode != NO_SAFE_MODE) { - write_compressed(translate("Running in safe mode! Auto-reload is off.\n")); + serial_write_compressed(translate("Running in safe mode! Auto-reload is off.\n")); } else if (!autoreload_is_enabled()) { - write_compressed(translate("Auto-reload is off.\n")); + serial_write_compressed(translate("Auto-reload is off.\n")); } } #endif @@ -184,7 +179,7 @@ bool run_code_py(safe_mode_t safe_mode) { bool found_main = false; if (safe_mode != NO_SAFE_MODE) { - write_compressed(translate("Running in safe mode! Not running saved code.\n")); + serial_write_compressed(translate("Running in safe mode! Not running saved code.\n")); } else { new_status_color(MAIN_RUNNING); @@ -200,7 +195,7 @@ bool run_code_py(safe_mode_t safe_mode) { if (!found_main){ found_main = maybe_run_list(double_extension_filenames, &result); if (found_main) { - write_compressed(translate("WARNING: Your code filename has two extensions\n")); + serial_write_compressed(translate("WARNING: Your code filename has two extensions\n")); } } stop_mp(); @@ -239,37 +234,14 @@ bool run_code_py(safe_mode_t safe_mode) { if (!serial_connected_at_start) { if (autoreload_is_enabled()) { - write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n")); + serial_write_compressed(translate("Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.\n")); } else { - write_compressed(translate("Auto-reload is off.\n")); - } - } - // Output a user safe mode string if its set. - #ifdef BOARD_USER_SAFE_MODE - if (safe_mode == USER_SAFE_MODE) { - serial_write("\n"); - write_compressed(translate("You requested starting safe mode by ")); - serial_write(BOARD_USER_SAFE_MODE_ACTION); - serial_write("\n"); - write_compressed(translate("To exit, please reset the board without ")); - serial_write(BOARD_USER_SAFE_MODE_ACTION); - serial_write("\n"); - } else - #endif - if (safe_mode != NO_SAFE_MODE) { - serial_write("\n"); - write_compressed(translate("You are running in safe mode which means something really bad happened.\n")); - if (safe_mode == HARD_CRASH) { - write_compressed(translate("Looks like our core CircuitPython code crashed hard. Whoops!\n")); - write_compressed(translate("Please file an issue here with the contents of your CIRCUITPY drive:\n")); - serial_write("https://github.com/adafruit/circuitpython/issues\n"); - } else if (safe_mode == BROWNOUT) { - write_compressed(translate("The microcontroller's power dipped. Please make sure your power supply provides\n")); - write_compressed(translate("enough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n")); + serial_write_compressed(translate("Auto-reload is off.\n")); } } + print_safe_mode_message(safe_mode); serial_write("\n"); - write_compressed(translate("Press any key to enter the REPL. Use CTRL-D to reload.")); + serial_write_compressed(translate("Press any key to enter the REPL. Use CTRL-D to reload.")); } if (serial_connected_before_animation && !serial_connected()) { serial_connected_at_start = false; @@ -394,6 +366,11 @@ int __attribute__((used)) main(void) { init_status_leds(); rgb_led_status_init(); + // Wait briefly to give a reset window where we'll enter safe mode after the reset. + if (safe_mode == NO_SAFE_MODE) { + safe_mode = wait_for_safe_mode_reset(); + } + stack_init(); // Create a new filesystem only if we're not in a safe mode. @@ -427,7 +404,7 @@ int __attribute__((used)) main(void) { } if (exit_code == PYEXEC_FORCED_EXIT) { if (!first_run) { - write_compressed(translate("soft reboot\n")); + serial_write_compressed(translate("soft reboot\n")); } first_run = false; skip_repl = run_code_py(safe_mode); @@ -455,12 +432,12 @@ void gc_collect(void) { } void NORETURN nlr_jump_fail(void *val) { - HardFault_Handler(); + reset_into_safe_mode(MICROPY_NLR_JUMP_FAIL); while (true) {} } void NORETURN __fatal_error(const char *msg) { - HardFault_Handler(); + reset_into_safe_mode(MICROPY_FATAL_ERROR); while (true) {} } diff --git a/mpy-cross/Makefile b/mpy-cross/Makefile index d9234ac02..fb1ab1ffd 100644 --- a/mpy-cross/Makefile +++ b/mpy-cross/Makefile @@ -78,6 +78,7 @@ endif SRC_C = \ main.c \ gccollect.c \ + supervisor/stub/stack.c \ supervisor/shared/translate.c # Add fmode when compiling with mingw gcc diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 99b8842c6..9a31eb42a 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -81,7 +81,9 @@ BASE_CFLAGS = \ -DCIRCUITPY_SAFE_RESTART_WORD=0xDEADBEEF \ --param max-inline-insns-single=500 - + # Use these flags to debug build times and header includes. + # -ftime-report + # -H # NDEBUG disables assert() statements. This reduces code size pretty dramatically, per tannewt. ifeq ($(CHIP_FAMILY), samd21) diff --git a/ports/atmel-samd/README.rst b/ports/atmel-samd/README.rst index 0c1026644..6037c7d3b 100644 --- a/ports/atmel-samd/README.rst +++ b/ports/atmel-samd/README.rst @@ -2,9 +2,16 @@ SAMD21x18 ========= This port brings MicroPython to SAMD21x18 based development boards under the name -CircuitPython. Supported boards include the Adafruit CircuitPlayground Express, -Adafruit Feather M0 Express, Adafruit Metro M0 Express, Arduino Zero, Adafruit -Feather M0 Basic and Adafruit M0 Bluefruit LE. +CircuitPython. Supported boards include: + +- Adafruit CircuitPlayground Express +- Adafruit Feather M0 Basic +- Adafruit Feather M0 Express +- Adafruit Metro M0 Express +- Adafruit M0 Bluefruit LE +- Arduino Zero +- Arduino MKR Zero + Pinout ------ @@ -15,51 +22,51 @@ different names. The table below matches the pin order in and omits the pins only available on the largest package because all supported boards use smaller version. -===================== =============== =========================== ====================== ================ ================== ========================= ================ ================ +===================== =================== =============== =========================== ====================== ================ ================== ========================= ================ ================ `microcontroller.pin` `board` ---------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -Datasheet arduino_zero circuitplayground_express feather_m0_adalogger feather_m0_basic feather_m0_express gemma_m0 metro_m0_express trinket_m0 -===================== =============== =========================== ====================== ================ ================== ========================= ================ ================ -PA00 ``ACCELEROMETER_SDA`` ``APA102_MOSI`` ``APA102_MOSI`` -PA01 ``ACCELEROMETER_SCL`` ``APA102_SCK`` ``APA102_SCK`` -PA02 ``A0`` ``A0`` / ``SPEAKER`` ``A0`` ``A0`` ``A0`` ``A0`` / ``D1`` ``A0`` ``D1`` / ``A0`` +--------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +Datasheet arduino_mkrzero arduino_zero circuitplayground_express feather_m0_adalogger feather_m0_basic feather_m0_express gemma_m0 metro_m0_express trinket_m0 +===================== =================== =============== =========================== ====================== ================ ================== ========================= ================ ================ +PA00 ``ACCELEROMETER_SDA`` ``APA102_MOSI`` ``APA102_MOSI`` +PA01 ``ACCELEROMETER_SCL`` ``APA102_SCK`` ``APA102_SCK`` +PA02 ``A0`` ``A0`` ``A0`` / ``SPEAKER`` ``A0`` ``A0`` ``A0`` ``A0`` / ``D1`` ``A0`` ``D1`` / ``A0`` PA03 -PB08 ``A1`` ``A7`` / ``TX`` ``A1`` ``A1`` ``A1`` ``A1`` -PB09 ``A2`` ``A6`` / ``RX`` ``A2`` ``A2`` ``A2`` ``A2`` -PA04 ``A3`` ``IR_PROXIMITY`` ``A3`` ``A3`` ``A3`` ``D0`` / ``TX`` / ``SDA`` ``A3`` -PA05 ``A4`` ``A1`` ``A4`` ``A4`` ``A4`` ``D2`` / ``RX`` / ``SCL`` ``A4`` -PA06 ``D8`` ``A2`` ``D8`` / ``GREEN_LED`` ``NEOPIXEL`` ``D8`` ``D4`` / ``TX`` -PA07 ``D9`` ``A3`` ``D9`` ``D9`` ``D9`` ``D9`` ``D3`` / ``RX`` -PA08 ``D4`` ``MICROPHONE_DO`` ``D4`` / ``SD_CS`` ``D4`` ``D0`` / ``SDA`` -PA09 ``D3`` ``TEMPERATURE`` / ``A9`` ``D3`` ``D2`` / ``SCL`` -PA10 ``D1`` / ``TX`` ``MICROPHONE_SCK`` ``D1`` / ``TX`` ``D1`` / ``TX`` ``D1`` / ``TX`` ``D1`` / ``TX`` ``D13`` -PA11 ``D0`` / ``RX`` ``LIGHT`` / ``A8`` ``D0`` / ``RX`` ``D0`` / ``RX`` ``D0`` / ``RX`` ``D0`` / ``RX`` -PB10 ``MOSI`` ``MOSI`` ``MOSI`` ``MOSI`` ``MOSI`` -PB11 ``SCK`` ``SCK`` ``SCK`` ``SCK`` ``SCK`` -PA12 ``MISO`` ``REMOTEIN`` / ``IR_RX`` ``MISO`` ``MISO`` ``MISO`` ``MISO`` -PA13 ``ACCELEROMETER_INTERRUPT`` ``FLASH_CS`` -PA14 ``D2`` ``BUTTON_B`` / ``D5`` ``D2`` -PA15 ``D5`` ``SLIDE_SWITCH`` / ``D7`` ``D5`` ``D5`` ``D5`` ``D5`` -PA16 ``D11`` ``MISO`` ``D11`` ``D11`` ``D11`` ``D11`` -PA17 ``D13`` ``D13`` ``D13`` / ``RED_LED`` ``D13`` ``D13`` ``D13`` -PA18 ``D10`` ``D10`` ``D10`` ``D10`` ``D10`` -PA19 ``D12`` ``D12`` ``D12`` ``D12`` ``D12`` -PA20 ``D6`` ``MOSI`` ``D6`` ``D6`` ``D6`` ``D6`` -PA21 ``D7`` ``SCK`` ``D7`` / ``SD_CD`` ``D7`` -PA22 ``SDA`` ``SDA`` ``SDA`` ``SDA`` ``SDA`` -PA23 ``SCL`` ``REMOTEOUT`` / ``IR_TX`` ``SCL`` ``SCL`` ``SCL`` ``L`` / ``D13`` ``SCL`` +PB08 ``L`` ``A1`` ``A7`` / ``TX`` ``A1`` ``A1`` ``A1`` ``A1`` +PB09 ``BATTERY`` ``A2`` ``A6`` / ``RX`` ``A2`` ``A2`` ``A2`` ``A2`` +PA04 ``A3`` ``A3`` ``IR_PROXIMITY`` ``A3`` ``A3`` ``A3`` ``D0`` / ``TX`` / ``SDA`` ``A3`` +PA05 ``A4`` ``A4`` ``A1`` ``A4`` ``A4`` ``A4`` ``D2`` / ``RX`` / ``SCL`` ``A4`` +PA06 ``A5`` ``D8`` ``A2`` ``D8`` / ``GREEN_LED`` ``NEOPIXEL`` ``D8`` ``D4`` / ``TX`` +PA07 ``A6`` ``D9`` ``A3`` ``D9`` ``D9`` ``D9`` ``D9`` ``D3`` / ``RX`` +PA08 ``D11`` / ``SDA`` ``D4`` ``MICROPHONE_DO`` ``D4`` / ``SD_CS`` ``D4`` ``D0`` / ``SDA`` +PA09 ``D12`` / ``SCL`` ``D3`` ``TEMPERATURE`` / ``A9`` ``D3`` ``D2`` / ``SCL`` +PA10 ``D2`` ``D1`` / ``TX`` ``MICROPHONE_SCK`` ``D1`` / ``TX`` ``D1`` / ``TX`` ``D1`` / ``TX`` ``D1`` / ``TX`` ``D13`` +PA11 ``D3`` ``D0`` / ``RX`` ``LIGHT`` / ``A8`` ``D0`` / ``RX`` ``D0`` / ``RX`` ``D0`` / ``RX`` ``D0`` / ``RX`` +PB10 ``D4`` ``MOSI`` ``MOSI`` ``MOSI`` ``MOSI`` ``MOSI`` +PB11 ``D5`` ``SCK`` ``SCK`` ``SCK`` ``SCK`` ``SCK`` +PA12 ``SD_MOSI`` ``MISO`` ``REMOTEIN`` / ``IR_RX`` ``MISO`` ``MISO`` ``MISO`` ``MISO`` +PA13 ``SD_SCK`` ``ACCELEROMETER_INTERRUPT`` ``FLASH_CS`` +PA14 ``SD_CS`` ``D2`` ``BUTTON_B`` / ``D5`` ``D2`` +PA15 ``SD_MISO`` ``D5`` ``SLIDE_SWITCH`` / ``D7`` ``D5`` ``D5`` ``D5`` ``D5`` +PA16 ``D8`` / ``MOSI`` ``D11`` ``MISO`` ``D11`` ``D11`` ``D11`` ``D11`` +PA17 ``D9`` / ``SCK`` ``D13`` ``D13`` ``D13`` / ``RED_LED`` ``D13`` ``D13`` ``D13`` +PA18 ``D10`` ``D10`` ``D10`` ``D10`` ``D10`` +PA19 ``D10`` / ``MISO`` ``D12`` ``D12`` ``D12`` ``D12`` ``D12`` +PA20 ``D6`` ``D6`` ``MOSI`` ``D6`` ``D6`` ``D6`` ``D6`` +PA21 ``D7`` ``D7`` ``SCK`` ``D7`` / ``SD_CD`` ``D7`` +PA22 ``D0`` ``SDA`` ``SDA`` ``SDA`` ``SDA`` ``SDA`` +PA23 ``D1`` ``SCL`` ``REMOTEOUT`` / ``IR_TX`` ``SCL`` ``SCL`` ``SCL`` ``L`` / ``D13`` ``SCL`` PA24 PA25 -PB22 ``FLASH_CS`` -PB23 ``NEOPIXEL`` / ``D8`` -PA27 -PA28 ``BUTTON_A`` / ``D4`` +PB22 ``D14`` / ``TX`` ``FLASH_CS`` +PB23 ``D13`` / ``RX`` ``NEOPIXEL`` / ``D8`` +PA27 ``SD_CD`` +PA28 ``BUTTON_A`` / ``D4`` PA29 -PA30 ``SPEAKER_ENABLE`` ``NEOPIXEL`` +PA30 ``SPEAKER_ENABLE`` ``NEOPIXEL`` PA31 -PB02 ``A5`` ``A5`` / ``SDA`` ``A5`` ``A5`` ``A5`` ``A5`` -PB03 ``A4`` / ``SCL`` -===================== =============== =========================== ====================== ================ ================== ========================= ================ ================ +PB02 ``A1`` ``A5`` ``A5`` / ``SDA`` ``A5`` ``A5`` ``A5`` ``A5`` +PB03 ``A2`` ``A4`` / ``SCL`` +===================== =================== =============== =========================== ====================== ================ ================== ========================= ================ ================ Here is a table about which pins can do what in CircuitPython terms. However, just because something is listed, doesn't mean it will always work. Existing use @@ -163,13 +170,7 @@ These commands should be executed from the root directory of the repository Build commands are run from the ``circuitpython/ports/atmel-samd`` directory. -To build for the Arduino Zero: - -.. code-block:: shell - - make - -To build for other boards you must change it by setting ``BOARD``. For example: +To build for a given board you must specify it by setting ``BOARD``. For example: .. code-block:: shell diff --git a/ports/atmel-samd/asf4 b/ports/atmel-samd/asf4 -Subproject 4007ba846bc937410f7eb8350e62e0f5fe9ed8f +Subproject 039b5f3bbc3f4ba4421e581db290560d59fef62 diff --git a/ports/atmel-samd/background.c b/ports/atmel-samd/background.c index 099cb8b23..439877d2e 100644 --- a/ports/atmel-samd/background.c +++ b/ports/atmel-samd/background.c @@ -29,22 +29,29 @@ #include "tick.h" #include "supervisor/usb.h" +#include "py/runtime.h" #include "shared-module/displayio/__init__.h" #include "shared-module/network/__init__.h" +#include "supervisor/shared/stack.h" volatile uint64_t last_finished_tick = 0; +bool stack_ok_so_far = true; + void run_background_tasks(void) { + assert_heap_ok(); #if (defined(SAMD21) && defined(PIN_PA02)) || defined(SAMD51) audio_dma_background(); #endif #ifdef CIRCUITPY_DISPLAYIO displayio_refresh_display(); #endif + #if MICROPY_PY_NETWORK network_module_background(); #endif usb_background(); + assert_heap_ok(); last_finished_tick = ticks_ms; } diff --git a/ports/atmel-samd/background.h b/ports/atmel-samd/background.h index e841049a4..8d1316e73 100644 --- a/ports/atmel-samd/background.h +++ b/ports/atmel-samd/background.h @@ -30,6 +30,7 @@ #include <stdbool.h> void run_background_tasks(void); +void run_background_vm_tasks(void); bool background_tasks_ok(void); #endif // MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h index 1e8d926fd..1deda871a 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h @@ -5,6 +5,8 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) +#define MICROPY_HW_LED_STATUS (&pin_PB23) + #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) diff --git a/ports/atmel-samd/boards/arduino_mkrzero/board.c b/ports/atmel-samd/boards/arduino_mkrzero/board.c new file mode 100644 index 000000000..0f60736a2 --- /dev/null +++ b/ports/atmel-samd/boards/arduino_mkrzero/board.c @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h new file mode 100644 index 000000000..d98da4d14 --- /dev/null +++ b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h @@ -0,0 +1,24 @@ +#define MICROPY_HW_BOARD_NAME "Arduino MKR Zero" +#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 0 + +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) + +#define DEFAULT_I2C_BUS_SCL (&pin_PA09) +#define DEFAULT_I2C_BUS_SDA (&pin_PA08) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA16) +#define DEFAULT_SPI_BUS_MISO (&pin_PA19) + +#define DEFAULT_UART_BUS_RX (&pin_PB23) +#define DEFAULT_UART_BUS_TX (&pin_PB22) + +// 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/arduino_mkrzero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk new file mode 100644 index 000000000..309351289 --- /dev/null +++ b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk @@ -0,0 +1,11 @@ +LD_FILE = boards/samd21x18-bootloader.ld +USB_VID = 0x239A +USB_PID = 0x8035 +USB_PRODUCT = "Arduino MKRZero" +USB_MANUFACTURER = "Arduino" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE + +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/arduino_mkrzero/pins.c b/ports/atmel-samd/boards/arduino_mkrzero/pins.c new file mode 100644 index 000000000..3ffd37fa6 --- /dev/null +++ b/ports/atmel-samd/boards/arduino_mkrzero/pins.c @@ -0,0 +1,47 @@ +#include "shared-bindings/board/__init__.h" + +#include "board_busses.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB23) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PA14) }, + { MP_ROM_QSTR(MP_QSTR_SD_CD), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB09) }, + { 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/arduino_zero/mpconfigboard.h b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h index 9a6256c68..7ab09d447 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h @@ -1,7 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Arduino Zero" #define MICROPY_HW_MCU_NAME "samd21g18" -// #define MICROPY_HW_LED_MSC &pin_PA17 // red +#define MICROPY_HW_LED_STATUS (&pin_PA17) + #define MICROPY_HW_LED_TX &pin_PA27 #define MICROPY_HW_LED_RX &pin_PB03 diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h index 2ad13e81c..e6a7e0676 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -1,6 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA17) + // Don't allow touch on A0 (PA02), because it's connected to the speaker. #define PA02_NO_TOUCH (true) diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index 250300858..e66d9c40e 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -1,6 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express with Crickit libraries" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA17) + // No framebuf on CRICKit version to save space. #define MICROPY_PY_FRAMEBUF (0) diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h index bcad7f18b..5587d165a 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.h @@ -20,14 +20,6 @@ #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - CIRCUITPY_INTERNAL_NVM_SIZE) -#include "external_flash/devices.h" - -// these are the labeled pins (SDA, SCL, SCK, MOSI, MISO, etc) -#define EXTERNAL_FLASH_DEVICE_COUNT 1 -#define EXTERNAL_FLASH_DEVICES W25Q128JV_PM - -#include "external_flash/external_flash.h" - #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 56fc9b2fb..63acd03b4 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -5,6 +5,8 @@ USB_PRODUCT = "CP32-M4" USB_MANUFACTURER = "Nadda-Reel Company LLC" QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" CHIP_VARIANT = SAMD51G19A CHIP_FAMILY = samd51 diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h index c28c4aafb..787a3ee55 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h @@ -1,5 +1,6 @@ // LEDs -//#define MICROPY_HW_LED_MSC PIN_PA17 // red +#define MICROPY_HW_LED_STATUS (&pin_PA17) + #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Adalogger" #define MICROPY_HW_MCU_NAME "samd21g18" diff --git a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h index d66efb36f..2a21b8f02 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h @@ -1,5 +1,5 @@ // LEDs -//#define MICROPY_HW_LED_MSC PIN_PA17 // red +#define MICROPY_HW_LED_STATUS (&pin_PA17) #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Basic" #define MICROPY_HW_MCU_NAME "samd21g18" diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h index 1f02ee995..7c10a92ec 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h @@ -1,6 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA17) + #define MICROPY_HW_NEOPIXEL (&pin_PA06) #define SPI_FLASH_MOSI_PIN &pin_PA08 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 b5544e253..abbf0b08c 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h @@ -1,6 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express with Crickit libraries" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA17) + #define MICROPY_HW_NEOPIXEL (&pin_PA06) #define SPI_FLASH_MOSI_PIN &pin_PA08 diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h index c385a97ea..a0f79ed72 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h @@ -1,5 +1,5 @@ // LEDs -//#define MICROPY_HW_LED_MSC PIN_PA17 // red +#define MICROPY_HW_LED_STATUS (&pin_PA17) #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 RFM69" #define MICROPY_HW_MCU_NAME "samd21g18" diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h index 1e3a0bda0..85c24bfd0 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h @@ -1,5 +1,5 @@ // LEDs -//#define MICROPY_HW_LED_MSC PIN_PA17 // red +#define MICROPY_HW_LED_STATUS (&pin_PA17) #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 RFM9x" #define MICROPY_HW_MCU_NAME "samd21g18" diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h index 6bf1df156..5ad265bf1 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.h @@ -3,6 +3,8 @@ #define MICROPY_HW_BOARD_NAME "Hacked Feather M0 Express with 8Mbyte SPI flash" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA17) + #define MICROPY_HW_NEOPIXEL (&pin_PA06) #define SPI_FLASH_MOSI_PIN &pin_PA08 diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h index 98906a844..ed1dfe763 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.h @@ -5,6 +5,7 @@ // Rev E +#define MICROPY_HW_LED_STATUS (&pin_PA23) #define MICROPY_HW_NEOPIXEL (&pin_PB03) // These are pins not to reset. diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h index c4e025178..7df31f3a9 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.h @@ -1,6 +1,7 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Feather RadioFruit Zigbee" #define MICROPY_HW_MCU_NAME "samr21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA27) #define MICROPY_HW_NEOPIXEL (&pin_PA22) #define SPI_FLASH_MOSI_PIN &pin_PA31 diff --git a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h index 08d1803f2..59e0b3c61 100644 --- a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h @@ -1,6 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Gemma M0" #define MICROPY_HW_MCU_NAME "samd21e18" +#define MICROPY_HW_LED_STATUS (&pin_PA23) + #define MICROPY_HW_APA102_MOSI (&pin_PA00) #define MICROPY_HW_APA102_SCK (&pin_PA01) diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h index 57078eaea..e1bef0019 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.h @@ -5,6 +5,8 @@ // This is for Rev B which is green and has the SD card slot at the edge of the board. +#define MICROPY_HW_LED_STATUS (&pin_PB01) + #define MICROPY_HW_LED_TX &(pin_PC30) #define MICROPY_HW_LED_RX &(pin_PC31) diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h index 5869c01ff..1a570092b 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.h @@ -1,6 +1,7 @@ #define MICROPY_HW_BOARD_NAME "HalloWing M0 Express" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA23) #define MICROPY_HW_NEOPIXEL (&pin_PA12) #define SPI_FLASH_MOSI_PIN &pin_PB10 diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h index 4de28d388..530e7e4c3 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.h @@ -1,6 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Adafruit ItsyBitsy M0 Express" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA17) + #define CIRCUITPY_BITBANG_APA102 #define MICROPY_HW_APA102_MOSI (&pin_PA01) #define MICROPY_HW_APA102_SCK (&pin_PA00) diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h index 5bbfec9ce..f4d17ac64 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.h @@ -4,6 +4,8 @@ #define CIRCUITPY_MCU_FAMILY samd51 // This is for Rev B +#define MICROPY_HW_LED_STATUS (&pin_PA22) + #define MICROPY_HW_APA102_MOSI (&pin_PB03) #define MICROPY_HW_APA102_SCK (&pin_PB02) diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h index f07eb9cce..fe741a0f7 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h @@ -1,6 +1,8 @@ #define MICROPY_HW_BOARD_NAME "Meow Meow" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PB23) + // These are pins not to reset. #define MICROPY_PORT_A (0) #define MICROPY_PORT_B (0) diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h index f08d129dc..4835ee7d2 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h @@ -1,6 +1,7 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Metro M0 Express" #define MICROPY_HW_MCU_NAME "samd21g18" +#define MICROPY_HW_LED_STATUS (&pin_PA17) #define MICROPY_HW_LED_TX &pin_PA27 // Comment this out if you have trouble connecting over SWD. It's one of the SWD pins. #define MICROPY_HW_LED_RX &pin_PA31 diff --git a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h index 06feb1a22..073468899 100644 --- a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.h @@ -8,6 +8,8 @@ #define MICROPY_HW_LED_TX (&pin_PA27) #define MICROPY_HW_LED_RX (&pin_PB06) +#define MICROPY_HW_LED_STATUS (&pin_PA16) + #define MICROPY_HW_NEOPIXEL (&pin_PB22) // These are pins not to reset. diff --git a/ports/atmel-samd/boards/mini_sam_m4/board.c b/ports/atmel-samd/boards/mini_sam_m4/board.c new file mode 100644 index 000000000..0f60736a2 --- /dev/null +++ b/ports/atmel-samd/boards/mini_sam_m4/board.c @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "hal/include/hal_gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.h b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.h new file mode 100644 index 000000000..cd754924e --- /dev/null +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.h @@ -0,0 +1,42 @@ +#define MICROPY_HW_BOARD_NAME "Mini SAM M4" +#define MICROPY_HW_MCU_NAME "samd51g19" + +#define CIRCUITPY_MCU_FAMILY samd51 + +#define MICROPY_HW_LED_STATUS (&pin_PA15) + +// RGB Status LED Pins +#define MICROPY_HW_APA102_MOSI (&pin_PB03) +#define MICROPY_HW_APA102_SCK (&pin_PB02) + +#define CIRCUITPY_BITBANG_APA102 + +// These are pins not to reset. +// QSPI Data pins +#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11) +// RGB Status LED pins, QSPI CS, and QSPI SCK +#define MICROPY_PORT_B (PORT_PB02 | PORT_PB03 | PORT_PB10 | PORT_PB11) +#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) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA01) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB22) +#define DEFAULT_SPI_BUS_MISO (&pin_PB23) + +#define DEFAULT_UART_BUS_RX (&pin_PA16) +#define DEFAULT_UART_BUS_TX (&pin_PA17) + +// 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/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk new file mode 100644 index 000000000..a69d2f623 --- /dev/null +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -0,0 +1,13 @@ +LD_FILE = boards/samd51x19-bootloader-external-flash.ld +USB_VID = 0x1209 +USB_PID = 0x2017 +USB_PRODUCT = "Mini SAM M4" +USB_MANUFACTURER = "Benjamin Shockley" + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "W25Q16JV_IM" +LONGINT_IMPL = MPZ + +CHIP_VARIANT = SAMD51G19A +CHIP_FAMILY = samd51 diff --git a/ports/atmel-samd/boards/mini_sam_m4/pins.c b/ports/atmel-samd/boards/mini_sam_m4/pins.c new file mode 100644 index 000000000..87e210381 --- /dev/null +++ b/ports/atmel-samd/boards/mini_sam_m4/pins.c @@ -0,0 +1,44 @@ +#include "shared-bindings/board/__init__.h" + +#include "board_busses.h" + +// This mapping only includes functional names because pins broken +// out on connectors are labeled with their MCU name available from +// microcontroller.pin. +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_PA00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA15) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB22) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) }, + + { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PB02) }, + { 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/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c new file mode 100644 index 000000000..7599f02b8 --- /dev/null +++ b/ports/atmel-samd/boards/pyportal/board.c @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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/pyportal/mpconfigboard.h b/ports/atmel-samd/boards/pyportal/mpconfigboard.h new file mode 100644 index 000000000..16b104297 --- /dev/null +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.h @@ -0,0 +1,40 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit PyPortal" +#define MICROPY_HW_MCU_NAME "samd51j20" + +#define CIRCUITPY_MCU_FAMILY samd51 + +// This is for Rev B + +#define MICROPY_HW_LED_STATUS (&pin_PA27) + +#define MICROPY_HW_NEOPIXEL (&pin_PB22) + +// These are pins not to reset. +// QSPI Data pins +#define MICROPY_PORT_A ( PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 ) +// QSPI CS, and QSPI SCK +#define MICROPY_PORT_B ( PORT_PB10 | PORT_PB11 ) +#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) + +#define DEFAULT_SPI_BUS_SCK (&pin_PA13) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA12) +#define DEFAULT_SPI_BUS_MISO (&pin_PA14) + +#define DEFAULT_UART_BUS_RX (&pin_PB13) +#define DEFAULT_UART_BUS_TX (&pin_PB12) + +// 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/pyportal/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk new file mode 100644 index 000000000..649bbb648 --- /dev/null +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk @@ -0,0 +1,14 @@ +LD_FILE = boards/samd51x20-bootloader-external-flash.ld +USB_VID = 0x239A +USB_PID = 0x8032 +USB_PRODUCT = "PyPortal" +USB_MANUFACTURER = "Adafruit Industries LLC" + +QSPI_FLASH_FILESYSTEM = 1 + +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "GD25Q64C" +LONGINT_IMPL = MPZ + +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c new file mode 100644 index 000000000..84ecbafff --- /dev/null +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -0,0 +1,55 @@ +#include "shared-bindings/board/__init__.h" + +#include "board_busses.h" + +// This mapping only includes functional names because pins broken +// out on connectors are labeled with their MCU name available from +// microcontroller.pin. +STATIC const mp_map_elem_t board_global_dict_table[] = { + { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), (mp_obj_t)&pin_PA02 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA27 }, + + // LCD pins + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RESET), (mp_obj_t)&pin_PA00 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RD), (mp_obj_t)&pin_PB04 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RS), (mp_obj_t)&pin_PB05 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_CS), (mp_obj_t)&pin_PB06 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_TE), (mp_obj_t)&pin_PB07 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_WR), (mp_obj_t)&pin_PB09 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_BACKLIGHT), (mp_obj_t)&pin_PB31 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA0), (mp_obj_t)&pin_PA16 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA1), (mp_obj_t)&pin_PA17 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA2), (mp_obj_t)&pin_PA18 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA3), (mp_obj_t)&pin_PA19 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA4), (mp_obj_t)&pin_PA20 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA5), (mp_obj_t)&pin_PA21 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA6), (mp_obj_t)&pin_PA22 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA7), (mp_obj_t)&pin_PA23 }, + + // Touch pins + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_YD), (mp_obj_t)&pin_PA04 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_XL), (mp_obj_t)&pin_PA05 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_YU), (mp_obj_t)&pin_PA06 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TOUCH_XR), (mp_obj_t)&pin_PB08 }, + + // ESP control + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_CS), (mp_obj_t)&pin_PA15 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), (mp_obj_t)&pin_PB14 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), (mp_obj_t)&pin_PB15 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), (mp_obj_t)&pin_PB16 }, + + + // SD Card + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MOSI), (mp_obj_t)&pin_PA12 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_SCK), (mp_obj_t)&pin_PA13 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), (mp_obj_t)&pin_PB30 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MISO), (mp_obj_t)&pin_PA14 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CARD_DETECT), (mp_obj_t)&pin_PA01 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB22 }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h index c311f540c..cef35983e 100644 --- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h @@ -2,6 +2,8 @@ #define MICROPY_HW_MCU_NAME "samd21e18" // Rev B - Black +#define MICROPY_HW_LED_STATUS (&pin_PA10) + #define MICROPY_HW_APA102_MOSI (&pin_PA00) #define MICROPY_HW_APA102_SCK (&pin_PA01) diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h index dfbd873b6..369d84b8b 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h @@ -2,6 +2,7 @@ #define MICROPY_HW_MCU_NAME "samd21e18" // Rev B - Black +#define MICROPY_HW_LED_STATUS (&pin_PA10) // #define MICROPY_HW_APA102_MOSI (&pin_PA00) // #define MICROPY_HW_APA102_SCK (&pin_PA01) diff --git a/ports/atmel-samd/common-hal/busio/UART.c b/ports/atmel-samd/common-hal/busio/UART.c index 71db7a8af..bb0666577 100644 --- a/ports/atmel-samd/common-hal/busio/UART.c +++ b/ports/atmel-samd/common-hal/busio/UART.c @@ -28,6 +28,7 @@ #include "shared-bindings/busio/UART.h" #include "mpconfigport.h" +#include "lib/utils/interrupt_char.h" #include "py/gc.h" #include "py/mperrno.h" #include "py/runtime.h" @@ -53,7 +54,7 @@ static void usart_async_rxc_callback(const struct usart_async_descriptor *const void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, - uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout, + uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, uint8_t receiver_buffer_size) { Sercom* sercom = NULL; uint8_t sercom_index = 255; // Unset index @@ -74,7 +75,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, self->baudrate = baudrate; self->character_bits = bits; - self->timeout_ms = timeout; + self->timeout_ms = timeout * 1000; // This assignment is only here because the usart_async routines take a *const argument. struct usart_async_descriptor * const usart_desc_p = (struct usart_async_descriptor * const) &self->usart_desc; @@ -272,12 +273,17 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t start_ticks = ticks_ms; } #ifdef MICROPY_VM_HOOK_LOOP - MICROPY_VM_HOOK_LOOP + MICROPY_VM_HOOK_LOOP ; + // Allow user to break out of a timeout with a KeyboardInterrupt. + if (mp_hal_is_interrupted()) { + break; + } #endif - // If we are zero timeout, make sure we don't loop again (in the event - // we read in under 1ms) - if (self->timeout_ms == 0) + // If we are zero timeout, make sure we don't loop again (in the event + // we read in under 1ms) + if (self->timeout_ms == 0) { break; + } } if (total_read == 0) { @@ -324,10 +330,8 @@ size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, return MP_STREAM_ERROR; } - struct usart_async_status async_status; - // Could return ERR_BUSY, but if that's true there's already a problem. - usart_async_get_status(usart_desc_p, &async_status); - return async_status.txcnt; + // All the characters got written. + return len; } uint32_t common_hal_busio_uart_get_baudrate(busio_uart_obj_t *self) { diff --git a/ports/atmel-samd/common-hal/nvm/ByteArray.c b/ports/atmel-samd/common-hal/nvm/ByteArray.c index ab9cd7d80..12a127f53 100644 --- a/ports/atmel-samd/common-hal/nvm/ByteArray.c +++ b/ports/atmel-samd/common-hal/nvm/ByteArray.c @@ -28,6 +28,8 @@ #include "hal_flash.h" +#include "supervisor/shared/stack.h" + #include <stdint.h> #include <string.h> @@ -42,6 +44,7 @@ bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self, struct flash_descriptor desc; desc.dev.hw = NVMCTRL; flash_write(&desc, (uint32_t) self->start_address + start_index, values, len); + assert_heap_ok(); return true; } diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 8df56ec4e..d0ebbfa39 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -182,7 +182,7 @@ typedef long mp_off_t; #define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51" #define PORT_HEAP_SIZE (0x20000) // 128KiB #define SPI_FLASH_MAX_BAUDRATE 24000000 -#define CIRCUITPY_DEFAULT_STACK_SIZE 8192 +#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000 #define MICROPY_CPYTHON_COMPAT (1) #define MICROPY_MODULE_WEAK_LINKS (1) #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1) @@ -432,10 +432,6 @@ extern const struct _mp_obj_module_t wiznet_module; #define MP_STATE_PORT MP_STATE_VM -void run_background_tasks(void); -#define MICROPY_VM_HOOK_LOOP run_background_tasks(); -#define MICROPY_VM_HOOK_RETURN run_background_tasks(); - #include "peripherals/samd/dma.h" #include "supervisor/flash_root_pointers.h" @@ -454,6 +450,9 @@ void run_background_tasks(void); mp_obj_t gamepad_singleton; \ NETWORK_ROOT_POINTERS \ +void run_background_tasks(void); +#define MICROPY_VM_HOOK_LOOP run_background_tasks(); +#define MICROPY_VM_HOOK_RETURN run_background_tasks(); #define CIRCUITPY_AUTORELOAD_DELAY_MS 500 #define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt" diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals -Subproject f20fcf642b5654ee68d7d551ea7db39716ef83b +Subproject f3bd5b1fd96f2ab0dde5cad61d41e607061ed46 diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 9f951b035..941838618 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -64,6 +64,9 @@ #include "reset.h" #include "tick.h" +#include "supervisor/shared/safe_mode.h" +#include "supervisor/shared/stack.h" + #include "tusb.h" #ifdef CIRCUITPY_GAMEPAD_TICKS @@ -80,7 +83,7 @@ extern volatile bool mp_msc_enabled; #define TRACE_BUFFER_SIZE (1 << (TRACE_BUFFER_MAGNITUDE_PACKETS + 1)) // Size in bytes. 4 bytes per uint32_t. #define TRACE_BUFFER_SIZE_BYTES (TRACE_BUFFER_SIZE << 2) -__attribute__((__aligned__(TRACE_BUFFER_SIZE_BYTES))) uint32_t mtb[TRACE_BUFFER_SIZE]; +__attribute__((__aligned__(TRACE_BUFFER_SIZE_BYTES))) uint32_t mtb[TRACE_BUFFER_SIZE] = {0}; #endif safe_mode_t port_init(void) { @@ -153,35 +156,6 @@ safe_mode_t port_init(void) { samd_peripherals_enable_cache(); #endif -// On power on start or external reset, set _ezero to the canary word. If it -// gets killed, we boot in safe mode. _ezero is the boundary between statically -// allocated memory including the fixed MicroPython heap and the stack. If either -// misbehaves, the canary will not be intact after soft reset. -#ifdef CIRCUITPY_CANARY_WORD -#ifdef SAMD21 - bool power_on_or_external_reset = hri_pm_get_RCAUSE_POR_bit(PM) || hri_pm_get_RCAUSE_EXT_bit(PM); - bool system_reset = hri_pm_get_RCAUSE_SYST_bit(PM); -#endif -#ifdef SAMD51 - bool power_on_or_external_reset = hri_rstc_get_RCAUSE_POR_bit(RSTC) || hri_rstc_get_RCAUSE_EXT_bit(RSTC); - bool system_reset = hri_rstc_get_RCAUSE_SYST_bit(RSTC); -#endif - if (power_on_or_external_reset) { - _ezero = CIRCUITPY_CANARY_WORD; - } else if (system_reset) { - // If we're starting from a system reset we're likely coming from the - // bootloader or hard fault handler. If we're coming from the handler - // the canary will be CIRCUITPY_SAFE_RESTART_WORD and we don't want to - // revive the canary so that a second hard fault won't restart. Resets - // from anywhere else are ok. - if (_ezero == CIRCUITPY_SAFE_RESTART_WORD) { - _ezero = ~CIRCUITPY_CANARY_WORD; - } else { - _ezero = CIRCUITPY_CANARY_WORD; - } - } -#endif - #ifdef SAMD21 hri_nvmctrl_set_CTRLB_RWS_bf(NVMCTRL, 2); _pm_init(); @@ -200,13 +174,6 @@ safe_mode_t port_init(void) { // Init the board last so everything else is ready board_init(); - #ifdef CIRCUITPY_CANARY_WORD - // Run in safe mode if the canary is corrupt. - if (_ezero != CIRCUITPY_CANARY_WORD) { - return HARD_CRASH; - } - #endif - #ifdef SAMD21 if (PM->RCAUSE.bit.BOD33 == 1 || PM->RCAUSE.bit.BOD12 == 1) { return BROWNOUT; @@ -280,15 +247,33 @@ void reset_to_bootloader(void) { reset(); } +void reset_cpu(void) { + reset(); +} + +extern uint32_t _ebss; +// Place the word to save just after our BSS section that gets blanked. +void port_set_saved_word(uint32_t value) { + _ebss = value; +} + +uint32_t port_get_saved_word(void) { + return _ebss; +} + /** * \brief Default interrupt handler for unused IRQs. */ __attribute__((used)) void HardFault_Handler(void) { +#ifdef ENABLE_MICRO_TRACE_BUFFER + // Turn off the micro trace buffer so we don't fill it up in the infinite + // loop below. + REG_MTB_MASTER = 0x00000000 + 6; +#endif + + reset_into_safe_mode(HARD_CRASH); while (true) { - asm(""); - } - for (uint32_t i = 0; i < 100000; i++) { - asm("noop;"); + asm("nop;"); } } diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile index 69226f442..d38285c91 100644 --- a/ports/esp8266/Makefile +++ b/ports/esp8266/Makefile @@ -97,6 +97,7 @@ SRC_C = \ posix_helpers.c \ hspi.c \ boards/$(BOARD)/pins.c \ + supervisor/stub/stack.c \ supervisor/shared/translate.c \ $(SRC_MOD) diff --git a/ports/esp8266/common-hal/busio/UART.c b/ports/esp8266/common-hal/busio/UART.c index e68e739f3..f10e3dc55 100644 --- a/ports/esp8266/common-hal/busio/UART.c +++ b/ports/esp8266/common-hal/busio/UART.c @@ -39,7 +39,7 @@ extern UartDevice UartDev; void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, - uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout, + uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, uint8_t receiver_buffer_size) { if (rx != mp_const_none || tx != &pin_GPIO2) { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, translate("Only tx supported on UART1 (GPIO2)."))); diff --git a/ports/nrf/background.c b/ports/nrf/background.c index f614b6bd0..f022b5bc9 100644 --- a/ports/nrf/background.c +++ b/ports/nrf/background.c @@ -28,8 +28,11 @@ #include "supervisor/usb.h" #endif +#include "supervisor/shared/stack.h" + void run_background_tasks(void) { #ifdef NRF52840 usb_background(); #endif + assert_heap_ok(); } diff --git a/ports/nrf/boards/feather_nrf52832/mpconfigboard.h b/ports/nrf/boards/feather_nrf52832/mpconfigboard.h index e751ec182..4959e1ca9 100644 --- a/ports/nrf/boards/feather_nrf52832/mpconfigboard.h +++ b/ports/nrf/boards/feather_nrf52832/mpconfigboard.h @@ -28,6 +28,8 @@ #define MICROPY_HW_MCU_NAME "nRF52832" #define MICROPY_PY_SYS_PLATFORM "nRF52" +#define MICROPY_HW_LED_STATUS (&pin_P0_17) + #define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 8) #define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6) diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h index bd1cad504..da72c085e 100644 --- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h +++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h @@ -35,6 +35,8 @@ #define MICROPY_HW_NEOPIXEL (&pin_P0_16) +#define MICROPY_HW_LED_STATUS (&pin_P1_15) + #ifdef QSPI_FLASH_FILESYSTEM #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 17) #define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22) diff --git a/ports/nrf/boards/feather_nrf52840_express/pins.c b/ports/nrf/boards/feather_nrf52840_express/pins.c index b85b72af0..56e425374 100644 --- a/ports/nrf/boards/feather_nrf52840_express/pins.c +++ b/ports/nrf/boards/feather_nrf52840_express/pins.c @@ -35,8 +35,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_13) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_15) }, - { MP_ROM_QSTR(MP_QSTR_TXD), MP_ROM_PTR(&pin_P0_25) }, - { MP_ROM_QSTR(MP_QSTR_RXD), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_24) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_12) }, diff --git a/ports/nrf/boards/particle_argon/board.c b/ports/nrf/boards/particle_argon/board.c new file mode 100644 index 000000000..f891f54a1 --- /dev/null +++ b/ports/nrf/boards/particle_argon/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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/particle_argon/mpconfigboard.h b/ports/nrf/boards/particle_argon/mpconfigboard.h new file mode 100644 index 000000000..bd9a46349 --- /dev/null +++ b/ports/nrf/boards/particle_argon/mpconfigboard.h @@ -0,0 +1,77 @@ +/* + * 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. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define FEATHER52840 + +#define MICROPY_HW_BOARD_NAME "Particle Argon" +#define MICROPY_HW_MCU_NAME "nRF52840" +#define MICROPY_PY_SYS_PLATFORM "Particle Argon" + +#define MICROPY_HW_LED_STATUS (&pin_P1_12) + +#define MICROPY_HW_RGB_LED_RED (&pin_P0_13) +#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) +#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) + +#ifdef QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17) +#endif + +#ifdef SPI_FLASH_FILESYSTEM +#define SPI_FLASH_MOSI_PIN &pin_P0_20 +#define SPI_FLASH_MISO_PIN &pin_P0_21 +#define SPI_FLASH_SCK_PIN &pin_P0_19 +#define SPI_FLASH_CS_PIN &pin_P0_17 +#endif + +#define CIRCUITPY_AUTORELOAD_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 PORT_HEAP_SIZE (128 * 1024) +// 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) +#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_P0_08) +#define DEFAULT_UART_BUS_TX (&pin_P0_06) diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.mk b/ports/nrf/boards/particle_argon/mpconfigboard.mk new file mode 100644 index 000000000..ee30c2be9 --- /dev/null +++ b/ports/nrf/boards/particle_argon/mpconfigboard.mk @@ -0,0 +1,25 @@ +USB_VID = 0x2b04 +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 +endif + +NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/particle_argon/pins.c b/ports/nrf/boards/particle_argon/pins.c new file mode 100644 index 000000000..0457f0aa8 --- /dev/null +++ b/ports/nrf/boards/particle_argon/pins.c @@ -0,0 +1,66 @@ +#include "shared-bindings/board/__init__.h" + +#include "board_busses.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&pin_P0_11) }, + + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_05) }, + + { MP_ROM_QSTR(MP_QSTR_CHARGE_STATUS), MP_ROM_PTR(&pin_P1_09) }, + + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_03) }, + + { MP_ROM_QSTR(MP_QSTR_RGB_LED_RED), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_RGB_LED_GREEN), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_RGB_LED_BLUE), MP_ROM_PTR(&pin_P0_15) }, + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_14) }, + + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_26) }, + + { MP_ROM_QSTR(MP_QSTR_ANTENNA_EXTERNAL), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_ANTENNA_PCB), MP_ROM_PTR(&pin_P0_02) }, + + + { MP_ROM_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_ESP_CTS), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_ESP_BOOT_MODE), MP_ROM_PTR(&pin_P0_16) }, + { MP_ROM_QSTR(MP_QSTR_ESP_WIFI_EN), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_ESP_HOST_WK), MP_ROM_PTR(&pin_P0_07) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/nrf/boards/particle_boron/board.c b/ports/nrf/boards/particle_boron/board.c new file mode 100644 index 000000000..f891f54a1 --- /dev/null +++ b/ports/nrf/boards/particle_boron/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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/particle_boron/mpconfigboard.h b/ports/nrf/boards/particle_boron/mpconfigboard.h new file mode 100644 index 000000000..ed675c811 --- /dev/null +++ b/ports/nrf/boards/particle_boron/mpconfigboard.h @@ -0,0 +1,77 @@ +/* + * 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. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define FEATHER52840 + +#define MICROPY_HW_BOARD_NAME "Particle Boron" +#define MICROPY_HW_MCU_NAME "nRF52840" +#define MICROPY_PY_SYS_PLATFORM "Particle Boron" + +#define MICROPY_HW_LED_STATUS (&pin_P1_12) + +#define MICROPY_HW_RGB_LED_RED (&pin_P0_13) +#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) +#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) + +#ifdef QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17) +#endif + +#ifdef SPI_FLASH_FILESYSTEM +#define SPI_FLASH_MOSI_PIN &pin_P0_20 +#define SPI_FLASH_MISO_PIN &pin_P0_21 +#define SPI_FLASH_SCK_PIN &pin_P0_19 +#define SPI_FLASH_CS_PIN &pin_P0_17 +#endif + +#define CIRCUITPY_AUTORELOAD_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 PORT_HEAP_SIZE (128 * 1024) +// 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) +#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_P0_08) +#define DEFAULT_UART_BUS_TX (&pin_P0_06) diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.mk b/ports/nrf/boards/particle_boron/mpconfigboard.mk new file mode 100644 index 000000000..ba6c57b85 --- /dev/null +++ b/ports/nrf/boards/particle_boron/mpconfigboard.mk @@ -0,0 +1,25 @@ +USB_VID = 0x2b04 +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 +endif + +NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/particle_boron/pins.c b/ports/nrf/boards/particle_boron/pins.c new file mode 100644 index 000000000..2bff0a2ce --- /dev/null +++ b/ports/nrf/boards/particle_boron/pins.c @@ -0,0 +1,64 @@ +#include "shared-bindings/board/__init__.h" + +#include "board_busses.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&pin_P0_11) }, + + { MP_ROM_QSTR(MP_QSTR_POWER_I2C_SDA), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_POWER_I2C_SCL), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_POWER_INTERRUPT), MP_ROM_PTR(&pin_P0_05) }, + + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_03) }, + + { MP_ROM_QSTR(MP_QSTR_RGB_LED_RED), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_RGB_LED_GREEN), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_RGB_LED_BLUE), MP_ROM_PTR(&pin_P0_15) }, + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_14) }, + + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_26) }, + + { MP_ROM_QSTR(MP_QSTR_ANTENNA_SWITCH), MP_ROM_PTR(&pin_P0_07) }, + + { MP_ROM_QSTR(MP_QSTR_UBLOX_TX), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_UBLOX_RX), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_UBLOX_CTS), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_UBLOX_RTS), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_UBLOX_POWER_ENABLE), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_UBLOX_POWER_MONITOR), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_UBLOX_RESET), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_UBLOX_POWER_ON), MP_ROM_PTR(&pin_P0_16) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/nrf/boards/particle_xenon/board.c b/ports/nrf/boards/particle_xenon/board.c new file mode 100644 index 000000000..f891f54a1 --- /dev/null +++ b/ports/nrf/boards/particle_xenon/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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/particle_xenon/mpconfigboard.h b/ports/nrf/boards/particle_xenon/mpconfigboard.h new file mode 100644 index 000000000..0b119b8bf --- /dev/null +++ b/ports/nrf/boards/particle_xenon/mpconfigboard.h @@ -0,0 +1,77 @@ +/* + * 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. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define FEATHER52840 + +#define MICROPY_HW_BOARD_NAME "Particle Xenon" +#define MICROPY_HW_MCU_NAME "nRF52840" +#define MICROPY_PY_SYS_PLATFORM "Particle Xenon" + +#define MICROPY_HW_LED_STATUS (&pin_P1_12) + +#define MICROPY_HW_RGB_LED_RED (&pin_P0_13) +#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) +#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) + +#ifdef QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17) +#endif + +#ifdef SPI_FLASH_FILESYSTEM +#define SPI_FLASH_MOSI_PIN &pin_P0_20 +#define SPI_FLASH_MISO_PIN &pin_P0_21 +#define SPI_FLASH_SCK_PIN &pin_P0_19 +#define SPI_FLASH_CS_PIN &pin_P0_17 +#endif + +#define CIRCUITPY_AUTORELOAD_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 PORT_HEAP_SIZE (128 * 1024) +// 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) +#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_P0_08) +#define DEFAULT_UART_BUS_TX (&pin_P0_06) diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.mk b/ports/nrf/boards/particle_xenon/mpconfigboard.mk new file mode 100644 index 000000000..5ed0677c7 --- /dev/null +++ b/ports/nrf/boards/particle_xenon/mpconfigboard.mk @@ -0,0 +1,25 @@ +USB_VID = 0x2b04 +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 +endif + +NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "MX25L3233F" diff --git a/ports/nrf/boards/particle_xenon/pins.c b/ports/nrf/boards/particle_xenon/pins.c new file mode 100644 index 000000000..11a29e927 --- /dev/null +++ b/ports/nrf/boards/particle_xenon/pins.c @@ -0,0 +1,57 @@ +#include "shared-bindings/board/__init__.h" + +#include "board_busses.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&pin_P0_11) }, + + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_05) }, + + { MP_ROM_QSTR(MP_QSTR_CHARGE_STATUS), MP_ROM_PTR(&pin_P1_09) }, + + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_03) }, + + { MP_ROM_QSTR(MP_QSTR_RGB_LED_RED), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_RGB_LED_GREEN), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_RGB_LED_BLUE), MP_ROM_PTR(&pin_P0_15) }, + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_14) }, + + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_26) }, + + { MP_ROM_QSTR(MP_QSTR_ANTENNA_EXTERNAL), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_ANTENNA_PCB), MP_ROM_PTR(&pin_P0_24) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/nrf/boards/pca10040/mpconfigboard.h b/ports/nrf/boards/pca10040/mpconfigboard.h index ebf808ce2..396102832 100644 --- a/ports/nrf/boards/pca10040/mpconfigboard.h +++ b/ports/nrf/boards/pca10040/mpconfigboard.h @@ -29,6 +29,8 @@ #define MICROPY_HW_MCU_NAME "nRF52832" #define MICROPY_PY_SYS_PLATFORM "nRF52-DK" +#define MICROPY_HW_LED_STATUS (&pin_P0_17) + #define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 8) #define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6) #define MICROPY_HW_UART_HWFC (0) diff --git a/ports/nrf/boards/pca10040/pins.c b/ports/nrf/boards/pca10040/pins.c index 9671358c9..95acd8ffd 100644 --- a/ports/nrf/boards/pca10040/pins.c +++ b/ports/nrf/boards/pca10040/pins.c @@ -21,9 +21,13 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) }, { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_17) }, { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }, + { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P0_18) }, { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_LED3), MP_ROM_PTR(&pin_P0_19) }, { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_LED4), MP_ROM_PTR(&pin_P0_20) }, { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, { MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) }, { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) }, diff --git a/ports/nrf/boards/pca10056/mpconfigboard.h b/ports/nrf/boards/pca10056/mpconfigboard.h index 83c3f66c1..8d420721f 100644 --- a/ports/nrf/boards/pca10056/mpconfigboard.h +++ b/ports/nrf/boards/pca10056/mpconfigboard.h @@ -33,6 +33,8 @@ #define PORT_HEAP_SIZE (128 * 1024) #define CIRCUITPY_AUTORELOAD_DELAY_MS 500 +#define MICROPY_HW_LED_STATUS (&pin_P0_13) + #define DEFAULT_I2C_BUS_SCL (&pin_P0_27) #define DEFAULT_I2C_BUS_SDA (&pin_P0_26) diff --git a/ports/nrf/boards/pca10059/mpconfigboard.h b/ports/nrf/boards/pca10059/mpconfigboard.h index b248011ec..03abd65e8 100644 --- a/ports/nrf/boards/pca10059/mpconfigboard.h +++ b/ports/nrf/boards/pca10059/mpconfigboard.h @@ -28,5 +28,7 @@ #define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_PY_SYS_PLATFORM "nRF52840-DK" +#define MICROPY_HW_LED_STATUS (&pin_P0_06) + #define PORT_HEAP_SIZE (128 * 1024) #define CIRCUITPY_AUTORELOAD_DELAY_MS 500 diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/README.md b/ports/nrf/boards/sparkfun_nrf52840_mini/README.md new file mode 100644 index 000000000..f80f1c27c --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/README.md @@ -0,0 +1,48 @@ +# SparkFun Pro nRF52840 Mini Breakout + +The [SparkFun Pro nRF52840 Mini](https://www.sparkfun.com/products/15025) small breakout board for Raytac's MDBT50Q-P1M module, which features an nRF52840. It breaks out as many pins as it can in an Arduino Pro Mini footprint. Also included on the board are a qwiic (I<sup>2</sup>C) connector, LiPo battery charger, and on/off switch. + +Note: the SparkFun Pro nRF52840 Mini Breakout does not include a QSPI external flash. Any Python code will need to be stored on the internal flash filesystem. + +## CircuitPython Pin Defs + +CircuitPython pin definitions try to follow those of the [Arduino Pro Mini](https://www.sparkfun.com/products/11113), which the footprint is based on. + +This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map: + +<table> +<tr><th>Board pin label</th><th>Digital Pin Reference</th><th>Additional Pin Capabilities</th><th>Pin/Port Reference</th></tr> +<tr><td>17</td><td>D1</td><td>TX</td><td>P0_17</td></tr> +<tr><td>15</td><td>D0</td><td>RX</td><td>P0_15</td></tr> +<tr><td>8</td><td></td><td>SDA</td><td>P0_08</td></tr> +<tr><td>11</td><td></td><td>SCL</td><td>P0_11</td></tr> +<tr><td>19</td><td>D3</td><td></td><td>P0_19</td></tr> +<tr><td>20</td><td>D4</td><td></td><td>P0_20</td></tr> +<tr><td>21</td><td>D5</td><td></td><td>P0_21</td></tr> +<tr><td>22</td><td>D6</td><td></td><td>P0_22</td></tr> +<tr><td>23</td><td>D7</td><td></td><td>P0_23</td></tr> +<tr><td>9</td><td>D8</td><td></td><td>P0_09</td></tr> +<tr><td>10</td><td>D9</td><td></td><td>P0_10</td></tr> +<tr><td>2</td><td>D10</td><td>A0</td><td>P0_02</td></tr> +<tr><td>3</td><td>D11</td><td>MOSI, A1</td><td>P0_03</td></tr> +<tr><td>31</td><td>D12</td><td>MISO, A7</td><td>P0_31</td></tr> +<tr><td>30</td><td>D13</td><td>SCK, A6</td><td>P0_31</td></tr> +<tr><td>29</td><td></td><td>A5</td><td>P0_29</td></tr> +<tr><td>28</td><td></td><td>A4</td><td>P0_28</td></tr> +<tr><td>5</td><td></td><td>A3</td><td>P0_05</td></tr> +<tr><td>4</td><td></td><td>A2</td><td>P0_04</td></tr> +</table> + +If a pin isn't defined as D0, D1, etc., standard port/pin references should work -- e.g. `P0_17` is pin 17, `P0_02` is pin 2, etc. + +## Bootloader Notes + +The nRF52840 Mini ships with a slightly modified (i.e pin defs and USB defs) version of the Adafruit nRF52 bootloader, which supports UF2 and CDC bootloading. + +## Hardware Reference + +The nRF52840 Mini hardware layout is open source: + +* [Schematic](https://cdn.sparkfun.com/assets/learn_tutorials/8/2/0/nrf52840-breakout-mdbt50q-v10.pdf) +* [Eagle Files](https://cdn.sparkfun.com/assets/learn_tutorials/8/2/0/nrf52840-breakout-mdbt50q-v10.zip) +* [Hookup Guide](https://learn.sparkfun.com/tutorials/sparkfun-pro-nrf52840-mini-hookup-guide)
\ No newline at end of file diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/board.c b/ports/nrf/boards/sparkfun_nrf52840_mini/board.c new file mode 100644 index 000000000..4421970ee --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/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/sparkfun_nrf52840_mini/mpconfigboard.h b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h new file mode 100644 index 000000000..353a0ad8f --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h @@ -0,0 +1,68 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "SparkFun Pro nRF52840 Mini" +#define MICROPY_HW_MCU_NAME "nRF52840" +#define MICROPY_PY_SYS_PLATFORM "SFE_NRF52840_Mini" + +#define PORT_HEAP_SIZE (128 * 1024) +#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_11) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_08) + +#define DEFAULT_SPI_BUS_SCK (&pin_P0_30) +#define DEFAULT_SPI_BUS_MOSI (&pin_P0_03) +#define DEFAULT_SPI_BUS_MISO (&pin_P0_31) + +#define DEFAULT_UART_BUS_RX (&pin_P0_15) +#define DEFAULT_UART_BUS_TX (&pin_P0_17) + +/* Note: Flash chip is not provided on SparkFun nRF52840 Mini. + * Leaving this as a reminder for future/similar versions of the board. */ +// Flash operation mode is determined by MICROPY_QSPI_DATAn pin configuration. +// A pin config is valid if it is defined and its value is not 0xFF. +// Quad mode: If all DATA0 --> DATA3 are valid +// Dual mode: If DATA0 and DATA1 are valid while either DATA2 and/or DATA3 are invalid +// Single mode: If only DATA0 is valid +/*#ifdef QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17) +#endif + +#ifdef SPI_FLASH_FILESYSTEM +#define SPI_FLASH_MOSI_PIN &pin_P0_20 +#define SPI_FLASH_MISO_PIN &pin_P0_21 +#define SPI_FLASH_SCK_PIN &pin_P0_19 +#define SPI_FLASH_CS_PIN &pin_P0_17 +#endif*/ + diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk new file mode 100644 index 000000000..d4819c855 --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk @@ -0,0 +1,25 @@ +USB_VID = 0x1B4F +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 +endif + +NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 + +QSPI_FLASH_FILESYSTEM = 0 +EXTERNAL_FLASH_DEVICE_COUNT = 0 +EXTERNAL_FLASH_DEVICES = diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c new file mode 100644 index 000000000..5c50f55c7 --- /dev/null +++ b/ports/nrf/boards/sparkfun_nrf52840_mini/pins.c @@ -0,0 +1,55 @@ +#include "shared-bindings/board/__init__.h" + +#include "board_busses.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P1_15) }, // D1/TX + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_17) }, // D0/RX + // D2 on qwiic gap + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P0_19) }, // D3 + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P0_20) }, // D4 + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P0_21) }, // D5 + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P0_22) }, // D6 + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P0_23) }, // D7 + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P0_09) }, // D8 + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_10) }, // D9 + + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P0_02) }, // D10 + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_03) }, // D11 + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_31) }, // D12 + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_30) }, // D13 + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_P0_29) }, // D14 + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_P0_28) }, // D15 + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_P0_05) }, // D16 + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_P0_04) }, // D17 + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, // A0 + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, // A1 + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_04) }, // A2 + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_05) }, // A3 + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_28) }, // A4 + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_29) }, // A5 + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_30) }, // A6 + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_P0_31) }, // A7 + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_08) }, // 8 - SDA + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_11) }, // 11 - SCL + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_31) }, // 31 - MISO + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_03) }, // 3 - MOSI + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_30) }, // 30 - SCK + + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P0_07) }, // 7 - Blue LED + + { MP_ROM_QSTR(MP_QSTR_BUTTON1), MP_ROM_PTR(&pin_P0_13) }, // 13 - Button + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_15) }, // 15 - UART RX + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_17) }, // 17 - UART TX + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_QWIIC), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/nrf/common-hal/busio/I2C.c b/ports/nrf/common-hal/busio/I2C.c index 4c42e58cd..05106d490 100644 --- a/ports/nrf/common-hal/busio/I2C.c +++ b/ports/nrf/common-hal/busio/I2C.c @@ -37,19 +37,21 @@ #include "nrfx_spim.h" #include "nrf_gpio.h" +// all TWI instances have the same max size +// 16 bits for 840, 10 bits for 810, 8 bits for 832 +#define I2C_MAX_XFER_LEN ((1UL << TWIM0_EASYDMA_MAXCNT_SIZE) - 1) + STATIC twim_peripheral_t twim_peripherals[] = { #if NRFX_CHECK(NRFX_TWIM0_ENABLED) // SPIM0 and TWIM0 share an address. { .twim = NRFX_TWIM_INSTANCE(0), - .in_use = false, - .max_xfer_size = TWIM0_EASYDMA_MAXCNT_SIZE, + .in_use = false }, #endif #if NRFX_CHECK(NRFX_TWIM1_ENABLED) // SPIM1 and TWIM1 share an address. { .twim = NRFX_TWIM_INSTANCE(1), - .in_use = false, - .max_xfer_size = TWIM1_EASYDMA_MAXCNT_SIZE, + .in_use = false }, #endif }; @@ -198,24 +200,25 @@ void common_hal_busio_i2c_unlock(busio_i2c_obj_t *self) { } uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t addr, const uint8_t *data, size_t len, bool stopBit) { - if(len == 0) + if(len == 0) { return common_hal_busio_i2c_probe(self, addr) ? 0 : MP_ENODEV; + } - const uint32_t max_xfer_size = self->twim_peripheral->max_xfer_size; - const uint32_t parts = len / max_xfer_size; - const uint32_t remainder = len % max_xfer_size; nrfx_err_t err = NRFX_SUCCESS; nrfx_twim_enable(&self->twim_peripheral->twim); - for (uint32_t i = 0; i < parts; ++i) { - err = nrfx_twim_tx(&self->twim_peripheral->twim, addr, data + i * max_xfer_size, max_xfer_size, !stopBit); - if (err != NRFX_SUCCESS) + // break into MAX_XFER_LEN transaction + while ( len ) { + const size_t xact_len = MIN(len, I2C_MAX_XFER_LEN); + + if ( NRFX_SUCCESS != (err = nrfx_twim_tx(&self->twim_peripheral->twim, addr, data, xact_len, !stopBit)) ) { break; - } + } - if ((remainder > 0) && (err == NRFX_SUCCESS)) - err = nrfx_twim_tx(&self->twim_peripheral->twim, addr, data + parts * max_xfer_size, remainder, !stopBit); + len -= xact_len; + data += xact_len; + } nrfx_twim_disable(&self->twim_peripheral->twim); @@ -223,24 +226,25 @@ uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t addr, const u } uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t addr, uint8_t *data, size_t len) { - if(len == 0) + if(len == 0) { return 0; + } - const uint32_t max_xfer_size = self->twim_peripheral->max_xfer_size; - const uint32_t parts = len / max_xfer_size; - const uint32_t remainder = len % max_xfer_size; nrfx_err_t err = NRFX_SUCCESS; nrfx_twim_enable(&self->twim_peripheral->twim); - for (uint32_t i = 0; i < parts; ++i) { - err = nrfx_twim_rx(&self->twim_peripheral->twim, addr, data + i * max_xfer_size, max_xfer_size); - if (err != NRFX_SUCCESS) + // break into MAX_XFER_LEN transaction + while ( len ) { + const size_t xact_len = MIN(len, I2C_MAX_XFER_LEN); + + if ( NRFX_SUCCESS != (err = nrfx_twim_rx(&self->twim_peripheral->twim, addr, data, xact_len)) ) { break; - } + } - if ((remainder > 0) && (err == NRFX_SUCCESS)) - err = nrfx_twim_rx(&self->twim_peripheral->twim, addr, data + parts * max_xfer_size, remainder); + len -= xact_len; + data += xact_len; + } nrfx_twim_disable(&self->twim_peripheral->twim); diff --git a/ports/nrf/common-hal/busio/I2C.h b/ports/nrf/common-hal/busio/I2C.h index c8ba84418..b75d15f00 100644 --- a/ports/nrf/common-hal/busio/I2C.h +++ b/ports/nrf/common-hal/busio/I2C.h @@ -34,7 +34,6 @@ typedef struct { nrfx_twim_t twim; bool in_use; - uint8_t max_xfer_size; } twim_peripheral_t; typedef struct { diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 516a7747d..912956369 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -27,6 +27,7 @@ #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/busio/UART.h" +#include "lib/utils/interrupt_char.h" #include "py/mpconfig.h" #include "py/gc.h" #include "py/mperrno.h" @@ -51,21 +52,56 @@ static uint32_t get_nrf_baud (uint32_t baudrate); +static uint16_t ringbuf_count(ringbuf_t *r) +{ + volatile int count = r->iput - r->iget; + if ( count < 0 ) { + count += r->size; + } + + return (uint16_t) count; +} + +static void ringbuf_clear(ringbuf_t *r) +{ + r->iput = r->iget = 0; +} + +// will overwrite old data +static void ringbuf_put_n(ringbuf_t* r, uint8_t* buf, uint8_t bufsize) +{ + for(uint8_t i=0; i < bufsize; i++) { + if ( ringbuf_put(r, buf[i]) < 0 ) { + // if full overwrite old data + (void) ringbuf_get(r); + ringbuf_put(r, buf[i]); + } + } +} + static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context) { busio_uart_obj_t* self = (busio_uart_obj_t*) context; switch ( event->type ) { case NRFX_UARTE_EVT_RX_DONE: - self->rx_count = event->data.rxtx.bytes; + ringbuf_put_n(&self->rbuf, event->data.rxtx.p_data, event->data.rxtx.bytes); + + // keep receiving + (void) nrfx_uarte_rx(&self->uarte, &self->rx_char, 1); break; case NRFX_UARTE_EVT_TX_DONE: + // nothing to do break; case NRFX_UARTE_EVT_ERROR: - if ( self->rx_count == -1 ) { - self->rx_count = 0; - } + // Possible Error source is Overrun, Parity, Framing, Break + // uint32_t errsrc = event->data.error.error_mask; + + ringbuf_put_n(&self->rbuf, event->data.error.rxtx.p_data, event->data.error.rxtx.bytes); + + // Keep receiving + (void) nrfx_uarte_rx(&self->uarte, &self->rx_char, 1); break; default: @@ -76,7 +112,7 @@ static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context) void common_hal_busio_uart_construct (busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, - uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout, + uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, uint8_t receiver_buffer_size) { if ( (tx == mp_const_none) && (rx == mp_const_none) ) { mp_raise_ValueError(translate("tx and rx cannot both be None")); @@ -109,37 +145,49 @@ void common_hal_busio_uart_construct (busio_uart_obj_t *self, // Init buffer for rx if ( rx != mp_const_none ) { - self->buffer = (uint8_t *) gc_alloc(receiver_buffer_size, false, false); - if ( !self->buffer ) { + self->rbuf.buf = (uint8_t *) gc_alloc(receiver_buffer_size, false, false); + + if ( !self->rbuf.buf ) { nrfx_uarte_uninit(&self->uarte); mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate RX buffer")); } - self->bufsize = receiver_buffer_size; + self->rbuf.size = receiver_buffer_size; + self->rbuf.iget = self->rbuf.iput = 0; + + self->rx_pin_number = rx->number; claim_pin(rx); } if ( tx != mp_const_none ) { + self->tx_pin_number = tx->number; claim_pin(tx); + } else { + self->tx_pin_number = NO_PIN; } self->baudrate = baudrate; - self->timeout_ms = timeout; + self->timeout_ms = timeout * 1000; - // queue 1-byte transfer for rx_characters_available() - self->rx_count = -1; - _VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, 1)); + // Initial wait for incoming byte + _VERIFY_ERR(nrfx_uarte_rx(&self->uarte, &self->rx_char, 1)); } bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) { - return (nrf_uarte_rx_pin_get(self->uarte.p_reg) == NRF_UARTE_PSEL_DISCONNECTED) && - (nrf_uarte_tx_pin_get(self->uarte.p_reg) == NRF_UARTE_PSEL_DISCONNECTED); + return self->rx_pin_number == NO_PIN; } void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { if ( !common_hal_busio_uart_deinited(self) ) { nrfx_uarte_uninit(&self->uarte); - gc_free(self->buffer); + reset_pin_number(self->tx_pin_number); + reset_pin_number(self->rx_pin_number); + self->tx_pin_number = NO_PIN; + self->rx_pin_number = NO_PIN; + + gc_free(self->rbuf.buf); + self->rbuf.size = 0; + self->rbuf.iput = self->rbuf.iget = 0; } } @@ -149,44 +197,33 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t mp_raise_ValueError(translate("No RX pin")); } - size_t remain = len; + size_t rx_bytes = 0; uint64_t start_ticks = ticks_ms; - while ( 1 ) { - // Wait for on-going transfer to complete - while ( (self->rx_count == -1) && (ticks_ms - start_ticks < self->timeout_ms) ) { + // Wait for all bytes received or timeout + while ( (ringbuf_count(&self->rbuf) < len) && (ticks_ms - start_ticks < self->timeout_ms) ) { #ifdef MICROPY_VM_HOOK_LOOP - MICROPY_VM_HOOK_LOOP -#endif - } - - // copy received data - if ( self->rx_count > 0 ) { - memcpy(data, self->buffer, self->rx_count); - data += self->rx_count; - remain -= self->rx_count; - - self->rx_count = 0; + MICROPY_VM_HOOK_LOOP ; + // Allow user to break out of a timeout with a KeyboardInterrupt. + if ( mp_hal_is_interrupted() ) { + return 0; } +#endif + } - // exit if complete or time up - if ( !remain || !(ticks_ms - start_ticks < self->timeout_ms) ) { - break; - } + // prevent conflict with uart irq + NVIC_DisableIRQ(nrfx_get_irq_number(self->uarte.p_reg)); - // prepare next receiving - const size_t cnt = MIN(self->bufsize, remain); - self->rx_count = -1; - _VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, cnt)); + // copy received data + rx_bytes = ringbuf_count(&self->rbuf); + rx_bytes = MIN(rx_bytes, len); + for ( uint16_t i = 0; i < rx_bytes; i++ ) { + data[i] = ringbuf_get(&self->rbuf); } - // queue 1-byte transfer for rx_characters_available() - if ( self->rx_count == 0 ) { - self->rx_count = -1; - _VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, 1)); - } + NVIC_EnableIRQ(nrfx_get_irq_number(self->uarte.p_reg)); - return len - remain; + return rx_bytes; } // Write characters. @@ -246,15 +283,14 @@ void common_hal_busio_uart_set_baudrate(busio_uart_obj_t *self, uint32_t baudrat } uint32_t common_hal_busio_uart_rx_characters_available(busio_uart_obj_t *self) { - return (self->rx_count > 0) ? self->rx_count : 0; + return ringbuf_count(&self->rbuf); } void common_hal_busio_uart_clear_rx_buffer(busio_uart_obj_t *self) { - // Discard received byte, and queue 1-byte transfer for rx_characters_available() - if ( self->rx_count > 0 ) { - self->rx_count = -1; - _VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, 1)); - } + // prevent conflict with uart irq + NVIC_DisableIRQ(nrfx_get_irq_number(self->uarte.p_reg)); + ringbuf_clear(&self->rbuf); + NVIC_EnableIRQ(nrfx_get_irq_number(self->uarte.p_reg)); } bool common_hal_busio_uart_ready_to_tx(busio_uart_obj_t *self) { @@ -317,7 +353,7 @@ static uint32_t get_nrf_baud (uint32_t baudrate) void common_hal_busio_uart_construct (busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, - uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout, + uint8_t bits, uart_parity_t parity, uint8_t stop, float timeout, uint8_t receiver_buffer_size) { mp_raise_NotImplementedError(translate("busio.UART not available")); } diff --git a/ports/nrf/common-hal/busio/UART.h b/ports/nrf/common-hal/busio/UART.h index aef377f14..a8081dc1e 100644 --- a/ports/nrf/common-hal/busio/UART.h +++ b/ports/nrf/common-hal/busio/UART.h @@ -41,9 +41,11 @@ typedef struct { uint32_t baudrate; uint32_t timeout_ms; - uint8_t* buffer; - uint32_t bufsize; - volatile int32_t rx_count; + ringbuf_t rbuf; + uint8_t rx_char; // EasyDMA buf + + uint8_t tx_pin_number; + uint8_t rx_pin_number; } busio_uart_obj_t; #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_UART_H diff --git a/ports/nrf/common-hal/neopixel_write/__init__.c b/ports/nrf/common-hal/neopixel_write/__init__.c index c4cb194f3..c9da436b8 100644 --- a/ports/nrf/common-hal/neopixel_write/__init__.c +++ b/ports/nrf/common-hal/neopixel_write/__init__.c @@ -28,6 +28,8 @@ #include "shared-bindings/neopixel_write/__init__.h" #include "nrf_pwm.h" +#include "tick.h" + // https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.cpp // [[[Begin of the Neopixel NRF52 EasyDMA implementation // by the Hackerspace San Salvador]]] @@ -95,6 +97,9 @@ static NRF_PWM_Type* find_free_pwm (void) { return NULL; } +uint64_t next_start_tick_ms = 0; +uint32_t next_start_tick_us = 1000; + void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout, uint8_t *pixels, uint32_t numBytes) { // To support both the SoftDevice + Neopixels we use the EasyDMA // feature from the NRF25. However this technique implies to @@ -117,7 +122,7 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout // only malloc if there is PWM device available if ( pwm != NULL ) { - if (numBytes == 4) { + if (pattern_size <= sizeof(one_pixel) * sizeof(uint32_t)) { pixels_pattern = (uint16_t *) one_pixel; } else { pixels_pattern = (uint16_t *) m_malloc_maybe(pattern_size, false); @@ -125,6 +130,9 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout } } + // Wait to make sure we don't append onto the last transmission. + wait_until(next_start_tick_ms, next_start_tick_us); + // Use the identified device to choose the implementation // If a PWM device is available use DMA if ( (pixels_pattern != NULL) && (pwm != NULL) ) { @@ -140,8 +148,8 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout } // Zero padding to indicate the end of sequence - pixels_pattern[++pos] = 0 | (0x8000); // Seq end - pixels_pattern[++pos] = 0 | (0x8000); // Seq end + pixels_pattern[pos++] = 0 | (0x8000); // Seq end + pixels_pattern[pos++] = 0 | (0x8000); // Seq end // Set the wave mode to count UP // Set the PWM to use the 16MHz clock @@ -274,4 +282,13 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout // Enable interrupts again __enable_irq(); } + + // Update the next start. + current_tick(&next_start_tick_ms, &next_start_tick_us); + if (next_start_tick_us < 100) { + next_start_tick_ms += 1; + next_start_tick_us = 100 - next_start_tick_us; + } else { + next_start_tick_us -= 100; + } } diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 86f5af20a..25710cea2 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -74,16 +74,16 @@ #define mp_builtin_open_obj mp_vfs_open_obj #endif -#define MICROPY_CPYTHON_COMPAT (0) +#define MICROPY_CPYTHON_COMPAT (1) #define MICROPY_STREAMS_NON_BLOCK (1) #define MICROPY_MODULE_WEAK_LINKS (1) #define MICROPY_CAN_OVERRIDE_BUILTINS (1) #define MICROPY_USE_INTERNAL_ERRNO (0) #define MICROPY_PY_FUNCTION_ATTRS (1) #define MICROPY_PY_BUILTINS_STR_UNICODE (1) -#define MICROPY_PY_BUILTINS_STR_CENTER (0) -#define MICROPY_PY_BUILTINS_STR_PARTITION (0) -#define MICROPY_PY_BUILTINS_STR_SPLITLINES (0) +#define MICROPY_PY_BUILTINS_STR_CENTER (1) +#define MICROPY_PY_BUILTINS_STR_PARTITION (1) +#define MICROPY_PY_BUILTINS_STR_SPLITLINES (1) #define MICROPY_PY_BUILTINS_MEMORYVIEW (1) #define MICROPY_PY_BUILTINS_FROZENSET (1) #define MICROPY_PY_BUILTINS_EXECFILE (0) @@ -117,7 +117,7 @@ #define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_UHASHLIB (1) #define MICROPY_PY_STRUCT (0) -#define MICROPY_PY_FRAMEBUF (1) +#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_KBD_EXCEPTION (1) @@ -155,6 +155,7 @@ typedef long mp_off_t; #define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) #define mp_type_fileio mp_type_vfs_fat_fileio +#define mp_type_textio mp_type_vfs_fat_textio // extra built in modules to add to the list of known ones diff --git a/ports/nrf/peripherals/nrf/clocks.c b/ports/nrf/peripherals/nrf/clocks.c index 811c0161a..4acb878db 100644 --- a/ports/nrf/peripherals/nrf/clocks.c +++ b/ports/nrf/peripherals/nrf/clocks.c @@ -32,4 +32,7 @@ void nrf_peripherals_clocks_init(void) { // generalized. NRF_CLOCK->LFCLKSRC = (uint32_t)((CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk); NRF_CLOCK->TASKS_LFCLKSTART = 1UL; + + // Wait for clocks to start. + while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) {} } diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index fcb3ae55c..ece5bae29 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -28,6 +28,9 @@ #include "supervisor/port.h" #include "boards/board.h" +#include "nrfx/hal/nrf_power.h" +#include "nrfx/drivers/include/nrfx_power.h" + #include "nrf/cache.h" #include "nrf/clocks.h" #include "nrf/power.h" @@ -41,37 +44,34 @@ #include "common-hal/pulseio/PulseOut.h" #include "tick.h" -safe_mode_t port_init(void) { +static void power_warning_handler(void) { + reset_into_safe_mode(BROWNOUT); +} +safe_mode_t port_init(void) { nrf_peripherals_clocks_init(); // If GPIO voltage is set wrong in UICR, this will fix it, and // will also do a reset to make the change take effect. nrf_peripherals_power_init(); + nrfx_power_pofwarn_config_t power_failure_config; + power_failure_config.handler = power_warning_handler; + power_failure_config.thr = NRF_POWER_POFTHR_V27; + #if NRF_POWER_HAS_VDDH + power_failure_config.thrvddh = NRF_POWER_POFTHRVDDH_V27; + #endif + nrfx_power_pof_init(&power_failure_config); + nrfx_power_pof_enable(&power_failure_config); + nrf_peripherals_enable_cache(); // Configure millisecond timer initialization. tick_init(); -#if 0 - #ifdef CIRCUITPY_CANARY_WORD - // Run in safe mode if the canary is corrupt. - if (_ezero != CIRCUITPY_CANARY_WORD) { - return HARD_CRASH; - } - #endif -#endif - // Will do usb_init() if chip supports USB. board_init(); -#if 0 - if (board_requests_safe_mode()) { - return USER_SAFE_MODE; - } -#endif - return NO_SAFE_MODE; } @@ -93,13 +93,26 @@ void reset_to_bootloader(void) { enum { DFU_MAGIC_SERIAL = 0x4e }; NRF_POWER->GPREGRET = DFU_MAGIC_SERIAL; + reset_cpu(); +} + +void reset_cpu(void) { NVIC_SystemReset(); } +extern uint32_t _ebss; +// Place the word to save just after our BSS section that gets blanked. +void port_set_saved_word(uint32_t value) { + _ebss = value; +} + +uint32_t port_get_saved_word(void) { + return _ebss; +} -void HardFault_Handler(void) -{ +void HardFault_Handler(void) { + reset_into_safe_mode(HARD_CRASH); while (true) { - asm(""); + asm("nop;"); } } diff --git a/ports/nrf/supervisor/qspi_flash.c b/ports/nrf/supervisor/qspi_flash.c index 048db06f2..51a9ec032 100644 --- a/ports/nrf/supervisor/qspi_flash.c +++ b/ports/nrf/supervisor/qspi_flash.c @@ -40,15 +40,13 @@ bool spi_flash_command(uint8_t command) { nrf_qspi_cinstr_conf_t cinstr_cfg = { - .opcode = 0, - .length = 0, + .opcode = command, + .length = 1, .io2_level = true, .io3_level = true, .wipwait = false, .wren = false }; - cinstr_cfg.opcode = command; - cinstr_cfg.length = 1; nrfx_qspi_cinstr_xfer(&cinstr_cfg, NULL, NULL); return true; } @@ -62,8 +60,8 @@ bool spi_flash_read_command(uint8_t command, uint8_t* response, uint32_t length) .wipwait = false, .wren = false }; - nrfx_qspi_cinstr_xfer(&cinstr_cfg, NULL, response); - return true; + return nrfx_qspi_cinstr_xfer(&cinstr_cfg, NULL, response) == NRFX_SUCCESS; + } bool spi_flash_write_command(uint8_t command, uint8_t* data, uint32_t length) { @@ -75,8 +73,7 @@ bool spi_flash_write_command(uint8_t command, uint8_t* data, uint32_t length) { .wipwait = false, .wren = false // We do this manually. }; - nrfx_qspi_cinstr_xfer(&cinstr_cfg, data, NULL); - return true; + return nrfx_qspi_cinstr_xfer(&cinstr_cfg, data, NULL) == NRFX_SUCCESS; } bool spi_flash_sector_command(uint8_t command, uint32_t address) { @@ -91,8 +88,7 @@ bool spi_flash_write_data(uint32_t address, uint8_t* data, uint32_t length) { } bool spi_flash_read_data(uint32_t address, uint8_t* data, uint32_t length) { - nrfx_qspi_read(data, length, address); - return true; + return nrfx_qspi_read(data, length, address) == NRFX_SUCCESS; } void spi_flash_init(void) { @@ -115,7 +111,7 @@ void spi_flash_init(void) { .dpmconfig = false }, .phy_if = { - .sck_freq = NRF_QSPI_FREQ_32MDIV16, // Start at a slow 2mhz and speed up once we know what we're talking to. + .sck_freq = NRF_QSPI_FREQ_32MDIV16, // Start at a slow 2MHz and speed up once we know what we're talking to. .sck_delay = 10, // min time CS must stay high before going low again. in unit of 62.5 ns .spi_mode = NRF_QSPI_MODE_0, .dpmen = false @@ -145,14 +141,18 @@ void spi_flash_init_device(const external_flash_device* device) { // Switch to single output line if the device doesn't support quad programs. if (!device->supports_qspi_writes) { NRF_QSPI->IFCONFIG0 &= ~QSPI_IFCONFIG0_WRITEOC_Msk; - NRF_QSPI->IFCONFIG0 |= QSPI_IFCONFIG0_WRITEOC_PP; + NRF_QSPI->IFCONFIG0 |= QSPI_IFCONFIG0_WRITEOC_PP << QSPI_IFCONFIG0_WRITEOC_Pos; } // Speed up as much as we can. - uint8_t sckfreq = 0; + // Start at 16 MHz and go down. + // At 32 MHz GD25Q16C doesn't work reliably on Feather 52840, even though it should work up to 104 MHz. + // sckfreq = 0 is 32 Mhz + // sckfreq = 1 is 16 MHz, etc. + uint8_t sckfreq = 1; while (32000000 / (sckfreq + 1) > device->max_clock_speed_mhz * 1000000 && sckfreq < 16) { sckfreq += 1; } NRF_QSPI->IFCONFIG1 &= ~QSPI_IFCONFIG1_SCKFREQ_Msk; - NRF_QSPI->IFCONFIG1 |= sckfreq << QSPI_IFCONFIG1_SCKDELAY_Pos; + NRF_QSPI->IFCONFIG1 |= sckfreq << QSPI_IFCONFIG1_SCKFREQ_Pos; } diff --git a/ports/unix/Makefile b/ports/unix/Makefile index 79b203b6b..8775ec11a 100644 --- a/ports/unix/Makefile +++ b/ports/unix/Makefile @@ -149,6 +149,8 @@ SRC_C = \ alloc.c \ coverage.c \ fatfs_port.c \ + supervisor/stub/serial.c \ + supervisor/stub/stack.c \ supervisor/shared/translate.c \ $(SRC_MOD) @@ -33,10 +33,12 @@ #include "py/objtype.h" #include "py/objint.h" #include "py/objstr.h" +#include "py/qstr.h" #include "py/runtime.h" #include "py/stackctrl.h" #include "py/stream.h" // for mp_obj_print +#include "supervisor/shared/stack.h" #include "supervisor/shared/translate.h" mp_obj_type_t *mp_obj_get_type(mp_const_obj_t o_in) { @@ -81,7 +83,7 @@ void mp_obj_print(mp_obj_t o_in, mp_print_kind_t kind) { // helper function to print an exception with traceback void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { - if (mp_obj_is_exception_instance(exc)) { + if (mp_obj_is_exception_instance(exc) && stack_ok()) { size_t n, *values; mp_obj_exception_get_traceback(exc, &n, &values); if (n > 0) { @@ -486,6 +488,8 @@ mp_obj_t mp_obj_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t value) { mp_obj_type_t *type = mp_obj_get_type(base); if (type->subscr != NULL) { mp_obj_t ret = type->subscr(base, index, value); + // May have called port specific C code. Make sure it didn't mess up the heap. + assert_heap_ok(); if (ret != MP_OBJ_NULL) { return ret; } diff --git a/py/stream.c b/py/stream.c index 8cf375b16..aca9b8460 100644 --- a/py/stream.c +++ b/py/stream.c @@ -250,6 +250,9 @@ void mp_stream_write_adaptor(void *self, const char *buf, size_t len) { STATIC mp_obj_t stream_write_method(size_t n_args, const mp_obj_t *args) { mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ); + if (!mp_get_stream(args[0])->is_text && MP_OBJ_IS_STR(args[1])) { + mp_raise_ValueError(translate("string not supported; use bytes or bytearray")); + } size_t max_len = (size_t)-1; size_t off = 0; if (n_args == 3) { @@ -282,6 +285,9 @@ STATIC mp_obj_t stream_readinto(size_t n_args, const mp_obj_t *args) { // https://docs.python.org/3/library/socket.html#socket.socket.recv_into mp_uint_t len = bufinfo.len; if (n_args > 2) { + if (mp_get_stream(args[0])->pyserial_compatibility) { + mp_raise_ValueError(translate("length argument not allowed for this type")); + } len = mp_obj_get_int(args[2]); if (len > bufinfo.len) { len = bufinfo.len; diff --git a/py/stream.h b/py/stream.h index 7b953138c..bcba4f234 100644 --- a/py/stream.h +++ b/py/stream.h @@ -70,6 +70,7 @@ typedef struct _mp_stream_p_t { mp_uint_t (*write)(mp_obj_t obj, const void *buf, mp_uint_t size, int *errcode); mp_uint_t (*ioctl)(mp_obj_t obj, mp_uint_t request, uintptr_t arg, int *errcode); mp_uint_t is_text : 1; // default is bytes, set this for text stream + bool pyserial_compatibility: 1; // adjust API to match pyserial more closely } mp_stream_p_t; MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_read_obj); diff --git a/shared-bindings/audioio/AudioOut.c b/shared-bindings/audioio/AudioOut.c index 18d908eef..94340d62c 100644 --- a/shared-bindings/audioio/AudioOut.c +++ b/shared-bindings/audioio/AudioOut.c @@ -101,7 +101,7 @@ STATIC mp_obj_t audioio_audioout_make_new(const mp_obj_type_t *type, size_t n_ar static const mp_arg_t allowed_args[] = { { MP_QSTR_left_channel, MP_ARG_OBJ | MP_ARG_REQUIRED }, { MP_QSTR_right_channel, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_rom_obj = mp_const_none} }, - { MP_QSTR_quiescent_value, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_int = 0x8000} }, + { MP_QSTR_quiescent_value, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x8000} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); diff --git a/shared-bindings/busio/I2C.c b/shared-bindings/busio/I2C.c index dedcc0150..9581f3a3d 100644 --- a/shared-bindings/busio/I2C.c +++ b/shared-bindings/busio/I2C.c @@ -58,7 +58,7 @@ //| :param ~microcontroller.Pin scl: The clock pin //| :param ~microcontroller.Pin sda: The data pin //| :param int frequency: The clock frequency in Hertz -//| :param int timeout: The maximum clock stretching timeut - only for bitbang +//| :param int timeout: The maximum clock stretching timeut - (used only for bitbangio.I2C; ignored for busio.I2C) //| STATIC mp_obj_t busio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) { mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, true); diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c index e7b8fc0c5..1cba386d2 100644 --- a/shared-bindings/busio/UART.c +++ b/shared-bindings/busio/UART.c @@ -31,6 +31,7 @@ #include "shared-bindings/util.h" #include "lib/utils/context_manager_helpers.h" +#include "lib/utils/interrupt_char.h" #include "py/ioctl.h" #include "py/objproperty.h" @@ -45,7 +46,7 @@ //| ================================================= //| //| -//| .. class:: UART(tx, rx, \*, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, receiver_buffer_size=64) +//| .. class:: UART(tx, rx, \*, baudrate=9600, bits=8, parity=None, stop=1, timeout=1, receiver_buffer_size=64) //| //| A common bidirectional serial protocol that uses an an agreed upon speed //| rather than a shared clock line. @@ -53,12 +54,15 @@ //| :param ~microcontroller.Pin tx: the pin to transmit with, or ``None`` if this ``UART`` is receive-only. //| :param ~microcontroller.Pin rx: the pin to receive on, or ``None`` if this ``UART`` is transmit-only. //| :param int baudrate: the transmit and receive speed. -/// :param int bits: the number of bits per byte, 7, 8 or 9. -/// :param Parity parity: the parity used for error checking. -/// :param int stop: the number of stop bits, 1 or 2. -/// :param int timeout: the timeout in milliseconds to wait for the first character and between subsequent characters. -/// :param int receiver_buffer_size: the character length of the read buffer (0 to disable). (When a character is 9 bits the buffer will be 2 * receiver_buffer_size bytes.) +//| :param int bits: the number of bits per byte, 7, 8 or 9. +//| :param Parity parity: the parity used for error checking. +//| :param int stop: the number of stop bits, 1 or 2. +//| :param int timeout: the timeout in seconds to wait for the first character and between subsequent characters. Raises ``ValueError`` if timeout >100 seconds. +//| :param int receiver_buffer_size: the character length of the read buffer (0 to disable). (When a character is 9 bits the buffer will be 2 * receiver_buffer_size bytes.) //| +//| *New in CircuitPython 4.0:* ``timeout`` has incompatibly changed units from milliseconds to seconds. +//| The new upper limit on ``timeout`` is meant to catch mistaken use of milliseconds. + typedef struct { mp_obj_base_t base; } busio_uart_parity_obj_t; @@ -83,7 +87,7 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, si { MP_QSTR_bits, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 8} }, { MP_QSTR_parity, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, { MP_QSTR_stop, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} }, - { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1000} }, + { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NEW_SMALL_INT(1)} }, { MP_QSTR_receiver_buffer_size, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 64} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -114,9 +118,14 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, si mp_raise_ValueError(translate("stop must be 1 or 2")); } + mp_float_t timeout = mp_obj_get_float(args[ARG_timeout].u_obj); + if (timeout > 100.0f) { + mp_raise_ValueError(translate("timeout >100 (units are now seconds, not msecs)")); + } + common_hal_busio_uart_construct(self, tx, rx, - args[ARG_baudrate].u_int, bits, parity, stop, args[ARG_timeout].u_int, - args[ARG_receiver_buffer_size].u_int); + args[ARG_baudrate].u_int, bits, parity, stop, timeout, + args[ARG_receiver_buffer_size].u_int); return (mp_obj_t)self; } @@ -161,14 +170,15 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_ //| :return: Data read //| :rtype: bytes or None //| -//| .. method:: readinto(buf, nbytes=None) +//| .. method:: readinto(buf) //| -//| Read bytes into the ``buf``. If ``nbytes`` is specified then read at most -//| that many bytes. Otherwise, read at most ``len(buf)`` bytes. +//| Read bytes into the ``buf``. Read at most ``len(buf)`` bytes. //| //| :return: number of bytes read and stored into ``buf`` //| :rtype: bytes or None //| +//| *New in CircuitPython 4.0:* No length parameter is permitted. + //| .. method:: readline() //| //| Read a line, ending in a newline character. @@ -180,6 +190,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_ //| //| Write the buffer of bytes to the bus. //| +//| *New in CircuitPython 4.0:* ``buf`` must be bytes, not a string. +//| //| :return: the number of bytes written //| :rtype: int or None //| @@ -353,6 +365,8 @@ STATIC const mp_stream_p_t uart_stream_p = { .write = busio_uart_write, .ioctl = busio_uart_ioctl, .is_text = false, + // Match PySerial when possible, such as disallowing optional length argument for .readinto() + .pyserial_compatibility = true, }; const mp_obj_type_t busio_uart_type = { diff --git a/shared-bindings/busio/UART.h b/shared-bindings/busio/UART.h index 513ff50c8..e171f8bb4 100644 --- a/shared-bindings/busio/UART.h +++ b/shared-bindings/busio/UART.h @@ -41,7 +41,7 @@ typedef enum { // Construct an underlying UART object. extern void common_hal_busio_uart_construct(busio_uart_obj_t *self, const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate, - uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout, + uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout, uint8_t receiver_buffer_size); extern void common_hal_busio_uart_deinit(busio_uart_obj_t *self); diff --git a/supervisor/port.h b/supervisor/port.h index dd4a82209..59898c8e4 100644 --- a/supervisor/port.h +++ b/supervisor/port.h @@ -33,12 +33,7 @@ #error "Please define PORT_HEAP_SIZE to specify heap size in bytes." #endif -typedef enum { - NO_SAFE_MODE = 0, - BROWNOUT, - HARD_CRASH, - USER_SAFE_MODE, -} safe_mode_t; +#include "supervisor/shared/safe_mode.h" // Provided by the linker; extern uint32_t _ezero; @@ -51,7 +46,10 @@ extern uint32_t _ebss; safe_mode_t port_init(void); -// Reset the microcontroller. +// Reset the microcontroller completely. +void reset_cpu(void); + +// Reset the microcontroller state. void reset_port(void); // Reset the rest of the board. @@ -60,8 +58,8 @@ void reset_board(void); // Reset to the bootloader void reset_to_bootloader(void); -#ifdef NRF52_SERIES -void HardFault_Handler(void); -#endif +// Save and retrieve a word from memory that is preserved over reset. Used for safe mode. +void port_set_saved_word(uint32_t); +uint32_t port_get_saved_word(void); #endif // MICROPY_INCLUDED_SUPERVISOR_PORT_H diff --git a/supervisor/shared/external_flash/devices.h b/supervisor/shared/external_flash/devices.h index 86e0868d0..b535016a3 100644 --- a/supervisor/shared/external_flash/devices.h +++ b/supervisor/shared/external_flash/devices.h @@ -220,10 +220,10 @@ typedef struct { .memory_type = 0x70, \ .capacity = 0x15, \ .max_clock_speed_mhz = 133, \ + .quad_enable_bit_mask = 0x02, \ .has_sector_protection = false, \ .supports_fast_read = true, \ .supports_qspi = true, \ - .has_quad_enable = true, \ .supports_qspi_writes = true, \ .write_status_register_split = false, \ } @@ -254,10 +254,10 @@ typedef struct { .memory_type = 0x70, \ .capacity = 0x16, \ .max_clock_speed_mhz = 133, \ + .quad_enable_bit_mask = 0x02, \ .has_sector_protection = false, \ .supports_fast_read = true, \ .supports_qspi = true, \ - .has_quad_enable = true, \ .supports_qspi_writes = true, \ .write_status_register_split = false, \ } @@ -275,7 +275,6 @@ typedef struct { .has_sector_protection = false, \ .supports_fast_read = true, \ .supports_qspi = true, \ - .has_quad_enable = true, \ .supports_qspi_writes = true, \ .write_status_register_split = false, \ .single_status_byte = false, \ @@ -336,6 +335,42 @@ typedef struct { .single_status_byte = false, \ } +// Settings for the Macronix MX25L1606 2MiB SPI flash. +// Datasheet: +#define MX25L1606 {\ + .total_size = (1 << 21), /* 2 MiB */ \ + .start_up_time_us = 5000, \ + .manufacturer_id = 0xc2, \ + .memory_type = 0x20, \ + .capacity = 0x15, \ + .max_clock_speed_mhz = 8, \ + .quad_enable_bit_mask = 0x40, \ + .has_sector_protection = false, \ + .supports_fast_read = true, \ + .supports_qspi = true, \ + .supports_qspi_writes = true, \ + .write_status_register_split = false, \ + .single_status_byte = true, \ +} + +// Settings for the Macronix MX25L3233F 4MiB SPI flash. +// Datasheet: http://www.macronix.com/Lists/Datasheet/Attachments/7426/MX25L3233F,%203V,%2032Mb,%20v1.6.pdf +#define MX25L3233F {\ + .total_size = (1 << 22), /* 4 MiB */ \ + .start_up_time_us = 5000, \ + .manufacturer_id = 0xc2, \ + .memory_type = 0x20, \ + .capacity = 0x16, \ + .max_clock_speed_mhz = 133, \ + .quad_enable_bit_mask = 0x40, \ + .has_sector_protection = false, \ + .supports_fast_read = true, \ + .supports_qspi = true, \ + .supports_qspi_writes = true, \ + .write_status_register_split = false, \ + .single_status_byte = true, \ +} + // Settings for the Macronix MX25R6435F 8MiB SPI flash. // Datasheet: http://www.macronix.com/Lists/Datasheet/Attachments/7428/MX25R6435F,%20Wide%20Range,%2064Mb,%20v1.4.pdf // By default its in lower power mode which can only do 8mhz. In high power mode it can do 80mhz. @@ -364,10 +399,10 @@ typedef struct { .memory_type = 0x70, \ .capacity = 0x18, \ .max_clock_speed_mhz = 133, \ + .quad_enable_bit_mask = 0x02, \ .has_sector_protection = false, \ .supports_fast_read = true, \ .supports_qspi = true, \ - .has_quad_enable = true, \ .supports_qspi_writes = true, \ .write_status_register_split = false, \ } diff --git a/supervisor/shared/rgb_led_status.h b/supervisor/shared/rgb_led_status.h index 9542b3197..83f4822d7 100644 --- a/supervisor/shared/rgb_led_status.h +++ b/supervisor/shared/rgb_led_status.h @@ -36,6 +36,8 @@ #include "py/mpconfig.h" #include "rgb_led_colors.h" +#include "supervisor/shared/safe_mode.h" + // Overall, the time module must be implemented. // To work with a DotStar, one must have MICROPY_HW_APA102_SCK and // MICROPY_HW_APA102_MOSI defined and bitbangio.SPI or busio.SPI implemented. diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c new file mode 100644 index 000000000..c1ce1fc9c --- /dev/null +++ b/supervisor/shared/safe_mode.c @@ -0,0 +1,126 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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 "supervisor/shared/safe_mode.h" + +#include "mphalport.h" +// #include "py/mpconfig.h" + +#include "shared-bindings/digitalio/DigitalInOut.h" + +#include "supervisor/serial.h" +#include "supervisor/shared/rgb_led_colors.h" +#include "supervisor/shared/rgb_led_status.h" +#include "supervisor/shared/translate.h" + +#define SAFE_MODE_DATA_GUARD 0xad0000af +#define SAFE_MODE_DATA_GUARD_MASK 0xff0000ff + +static safe_mode_t current_safe_mode; + +safe_mode_t wait_for_safe_mode_reset(void) { + uint32_t reset_state = port_get_saved_word(); + safe_mode_t safe_mode = NO_SAFE_MODE; + if ((reset_state & SAFE_MODE_DATA_GUARD_MASK) == SAFE_MODE_DATA_GUARD) { + safe_mode = (reset_state & ~SAFE_MODE_DATA_GUARD_MASK) >> 8; + } + if (safe_mode != NO_SAFE_MODE) { + port_set_saved_word(SAFE_MODE_DATA_GUARD); + current_safe_mode = safe_mode; + return safe_mode; + } + port_set_saved_word(SAFE_MODE_DATA_GUARD | (MANUAL_SAFE_MODE << 8)); + // Wait for a while to allow for reset. + temp_status_color(SAFE_MODE); + #ifdef MICROPY_HW_LED_STATUS + digitalio_digitalinout_obj_t status_led; + common_hal_digitalio_digitalinout_construct(&status_led, MICROPY_HW_LED_STATUS); + common_hal_digitalio_digitalinout_switch_to_output(&status_led, true, DRIVE_MODE_PUSH_PULL); + #endif + uint64_t start_ticks = ticks_ms; + uint64_t diff = 0; + while (diff < 700) { + #ifdef MICROPY_HW_LED_STATUS + // Blink on for 100, off for 100, on for 100, off for 100 and on for 200 + common_hal_digitalio_digitalinout_set_value(&status_led, diff > 100 && diff / 100 != 2 && diff / 100 != 4); + #endif + diff = ticks_ms - start_ticks; + } + #ifdef MICROPY_HW_LED_STATUS + common_hal_digitalio_digitalinout_deinit(&status_led); + #endif + clear_temp_status(); + port_set_saved_word(SAFE_MODE_DATA_GUARD); + return NO_SAFE_MODE; +} + +void reset_into_safe_mode(safe_mode_t reason) { + if (current_safe_mode > BROWNOUT && reason > BROWNOUT) { + while (true) { + // This very bad because it means running in safe mode didn't save us. Only ignore brownout + // because it may be due to a switch bouncing. + } + } + + port_set_saved_word(SAFE_MODE_DATA_GUARD | (reason << 8)); + reset_cpu(); +} + +void print_safe_mode_message(safe_mode_t reason) { + // Output a user safe mode string if its set. + #ifdef BOARD_USER_SAFE_MODE + if (reason == USER_SAFE_MODE) { + serial_write("\r\n"); + 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(BOARD_USER_SAFE_MODE_ACTION); + serial_write("\r\n"); + } else + #endif + if (reason != NO_SAFE_MODE) { + serial_write("\r\n"); + 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) { + 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 == 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"); + } else if (reason == MANUAL_SAFE_MODE) { + serial_write_compressed(translate("The reset button was pressed while booting CircuitPython. Press again to exit safe mode.\n")); + } + } +} diff --git a/supervisor/shared/safe_mode.h b/supervisor/shared/safe_mode.h new file mode 100644 index 000000000..eba2668ac --- /dev/null +++ b/supervisor/shared/safe_mode.h @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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. + */ + +#ifndef MICROPY_INCLUDED_SUPERVISOR_SAFE_MODE_H +#define MICROPY_INCLUDED_SUPERVISOR_SAFE_MODE_H + +typedef enum { + NO_SAFE_MODE = 0, + BROWNOUT, + HARD_CRASH, + USER_SAFE_MODE, + HEAP_OVERWRITTEN, + MANUAL_SAFE_MODE, + MICROPY_NLR_JUMP_FAIL, + MICROPY_FATAL_ERROR +} safe_mode_t; + +safe_mode_t wait_for_safe_mode_reset(void); + +void reset_into_safe_mode(safe_mode_t reason); + +void print_safe_mode_message(safe_mode_t reason); + +#endif // MICROPY_INCLUDED_SUPERVISOR_SAFE_MODE_H diff --git a/supervisor/shared/stack.c b/supervisor/shared/stack.c index 6b74742eb..311fa31b2 100755 --- a/supervisor/shared/stack.c +++ b/supervisor/shared/stack.c @@ -27,7 +27,9 @@ #include "stack.h" #include "py/mpconfig.h" +#include "py/runtime.h" #include "supervisor/cpu.h" +#include "supervisor/shared/safe_mode.h" extern uint32_t _estack; @@ -50,6 +52,17 @@ void allocate_stack(void) { } else { current_stack_size = next_stack_size; } + *stack_alloc->ptr = STACK_CANARY_VALUE; +} + +inline bool stack_ok(void) { + return stack_alloc == NULL || *stack_alloc->ptr == STACK_CANARY_VALUE; +} + +inline void assert_heap_ok(void) { + if (!stack_ok()) { + reset_into_safe_mode(HEAP_OVERWRITTEN); + } } void stack_init(void) { @@ -58,6 +71,7 @@ void stack_init(void) { void stack_resize(void) { if (next_stack_size == current_stack_size) { + *stack_alloc->ptr = STACK_CANARY_VALUE; return; } free_memory(stack_alloc); diff --git a/supervisor/shared/stack.h b/supervisor/shared/stack.h index 3a5c18e7d..1fb43be57 100755 --- a/supervisor/shared/stack.h +++ b/supervisor/shared/stack.h @@ -37,5 +37,12 @@ void stack_init(void); void stack_resize(void); void set_next_stack_size(uint32_t size); uint32_t get_current_stack_size(void); +bool stack_ok(void); + +// Use this after any calls into a library which may use a lot of stack. This will raise a Python +// exception when the stack has likely overwritten a portion of the heap. +void assert_heap_ok(void); + +#define STACK_CANARY_VALUE 0x017829ef #endif // MICROPY_INCLUDED_SUPERVISOR_STACK_H diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index 1fa361c15..aa5e4517c 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -34,6 +34,14 @@ #include "genhdr/compression.generated.h" #endif +#include "supervisor/serial.h" + +void serial_write_compressed(const compressed_string_t* compressed) { + char decompressed[compressed->length]; + decompress(compressed, decompressed); + serial_write(decompressed); +} + char* decompress(const compressed_string_t* compressed, char* decompressed) { uint8_t this_byte = 0; uint8_t this_bit = 7; diff --git a/supervisor/shared/translate.h b/supervisor/shared/translate.h index 3a1ba4076..5e8acbb6a 100644 --- a/supervisor/shared/translate.h +++ b/supervisor/shared/translate.h @@ -35,7 +35,7 @@ typedef struct { } compressed_string_t; const compressed_string_t* translate(const char* c); - +void serial_write_compressed(const compressed_string_t* compressed); char* decompress(const compressed_string_t* compressed, char* decompressed); #endif // MICROPY_INCLUDED_SUPERVISOR_TRANSLATE_H diff --git a/supervisor/stub/serial.c b/supervisor/stub/serial.c index 4f0e11873..956551914 100644 --- a/supervisor/stub/serial.c +++ b/supervisor/stub/serial.c @@ -43,4 +43,5 @@ bool serial_bytes_available(void) { } void serial_write(const char* text) { + (void) text; } diff --git a/supervisor/stub/stack.c b/supervisor/stub/stack.c new file mode 100644 index 000000000..9a9ecd32f --- /dev/null +++ b/supervisor/stub/stack.c @@ -0,0 +1,48 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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 "supervisor/shared/stack.h" + +bool stack_ok(void) { + return true; +} + +void assert_heap_ok(void) { +} + +void stack_init(void) { +} + +void stack_resize(void) { +} + +void set_next_stack_size(uint32_t size) { + (void) size; +} + +uint32_t get_current_stack_size(void) { + return 0; +} diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 73c76ebb7..56ad8a3ba 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -6,6 +6,7 @@ SRC_SUPERVISOR = \ supervisor/shared/flash.c \ supervisor/shared/micropython.c \ supervisor/shared/rgb_led_status.c \ + supervisor/shared/safe_mode.c \ supervisor/shared/stack.c \ supervisor/shared/status_leds.c \ supervisor/shared/translate.c diff --git a/tools/build_board_info.py b/tools/build_board_info.py index 0e9389a02..379cf55c4 100644 --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -21,21 +21,29 @@ HEX = ('hex',) # Default extensions extension_by_port = { - "nrf": BIN, + "nrf": UF2, "esp8266": BIN, "atmel-samd": UF2, } # Per board overrides extension_by_board = { - "feather_nrf52832": BIN, + # samd "arduino_mkr1300": BIN, "arduino_zero": BIN, "feather_m0_adalogger": BIN_UF2, "feather_m0_basic": BIN_UF2, "feather_m0_rfm69": BIN, "feather_m0_rfm9x": BIN, - "makerdiary_nrf52840_mdk": HEX + + # nrf52832 + "feather_nrf52832": BIN, + "pca10040": BIN, + + # nRF52840 dev kits that may not have UF2 bootloaders, + "makerdiary_nrf52840_mdk": HEX, + "pca10056": BIN_UF2, + "pca10059": BIN_UF2 } def get_languages(): @@ -62,7 +70,7 @@ def get_version_info(): version = None sha = git("rev-parse", "--short", "HEAD").stdout.decode("utf-8") try: - version = git("describe", "--tags", "--exact-match").stdout.decode("utf-8") + version = git("describe", "--tags", "--exact-match").stdout.decode("utf-8").strip() except sh.ErrorReturnCode_128: # No exact match pass @@ -212,7 +220,7 @@ def generate_download_info(): board_path = os.path.join("../ports", port, "boards") for board_path in os.scandir(board_path): if board_path.is_dir(): - board_files = os.listdir(board_path) + board_files = os.listdir(board_path.path) board_id = board_path.name board_info = board_mapping[board_id] @@ -236,8 +244,10 @@ def generate_download_info(): changes["new_languages"] = set(languages) - previous_languages - if changes["new_languages"]: + if changes["new_release"]: create_pr(changes, current_info, git_info) + else: + print("No new release to update") if __name__ == "__main__": if "TRAVIS_TAG" in os.environ and os.environ["TRAVIS_TAG"]: diff --git a/tools/build_adafruit_bins.py b/tools/build_release_files.py index 94c31ad33..6bf418fe6 100755 --- a/tools/build_adafruit_bins.py +++ b/tools/build_release_files.py @@ -1,6 +1,4 @@ import os -from sh import rm -from sh import make import sys import subprocess import shutil @@ -8,7 +6,7 @@ import build_board_info as build_info import time for port in build_info.SUPPORTED_PORTS: - rm("-rf", "../ports/{}/build*".format(port)) + result = subprocess.run("rm -rf ../ports/{}/build*".format(port), shell=True) ROSIE_SETUPS = ["rosie-ci"] rosie_ok = {} @@ -60,8 +58,9 @@ for board in build_boards: if travis: print('travis_fold:start:adafruit-bins-{}-{}\\r'.format(language, board)) print("Build {} for {} took {:.2f}s and {}".format(board, language, build_duration, success)) - print(make_result.stdout.decode("utf-8")) - print(other_output) + if make_result.returncode != 0: + print(make_result.stdout.decode("utf-8")) + print(other_output) # Only upload to Rosie if its a pull request. if travis: for rosie in ROSIE_SETUPS: @@ -72,6 +71,7 @@ for board in build_boards: if travis: print('travis_fold:end:adafruit-bins-{}-{}\\r'.format(language, board)) - print() + # Flush so travis will see something before 10 minutes has passed. + print(flush=True) sys.exit(exit_status) diff --git a/tools/tinytest-codegen.py b/tools/tinytest-codegen.py index 7f14db4ba..7a48f8a9a 100755 --- a/tools/tinytest-codegen.py +++ b/tools/tinytest-codegen.py @@ -23,7 +23,7 @@ def chew_filename(t): def script_to_map(test_file): r = {"name": chew_filename(test_file)["func"]} - with open(t) as test: + with open(test_file, "rb") as test: script = test.readlines() # Test for import skip_if and inject it into the test as needed. @@ -39,7 +39,11 @@ def script_to_map(test_file): continue script.insert(index + total_lines, "\t" + line) total_lines += 1 - r['script'] = escape(''.join(script)) + r['script'] = escape(b''.join(script)) + + with open(test_file + ".exp", "rb") as f: + r["output"] = escape(f.read()) + return r test_function = ( |
