Merge pull request #1294 from tannewt/stack_check

Add stack validity check and raise an error when it happens.
This commit is contained in:
Dan Halbert 2018-12-07 15:34:43 -05:00 committed by GitHub
commit 2fbaceb2b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 1376 additions and 800 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -151,70 +151,37 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr "" msgstr ""
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
msgstr "" msgstr ""
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "" msgstr ""
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "" msgstr ""
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "" msgstr ""
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "" msgstr ""
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr ""
#: main.c:254
msgid "To exit, please reset the board without "
msgstr ""
#: main.c:261
msgid ""
"You are running in safe mode which means something really bad happened.\n"
msgstr ""
#: main.c:263
msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
msgstr ""
#: main.c:264
msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n"
msgstr ""
#: main.c:267
msgid ""
"The microcontroller's power dipped. Please make sure your power supply "
"provides\n"
msgstr ""
#: main.c:268
msgid ""
"enough power for the whole circuit and press reset (after ejecting "
"CIRCUITPY).\n"
msgstr ""
#: main.c:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "" msgstr ""
@ -443,7 +410,7 @@ msgid "pop from an empty PulseIn"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "" msgstr ""
@ -1349,116 +1316,116 @@ msgstr ""
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "" msgstr ""
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr "" msgstr ""
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr "" msgstr ""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr "" msgstr ""
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" msgid "can't convert to int"
msgstr "" msgstr ""
#: py/obj.c:260 #: py/obj.c:262
#, c-format #, c-format
msgid "can't convert %s to int" msgid "can't convert %s to int"
msgstr "" msgstr ""
#: py/obj.c:320 #: py/obj.c:322
msgid "can't convert to float" msgid "can't convert to float"
msgstr "" msgstr ""
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "" msgstr ""
#: py/obj.c:353 #: py/obj.c:355
msgid "can't convert to complex" msgid "can't convert to complex"
msgstr "" msgstr ""
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "" msgstr ""
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "" msgstr ""
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "" msgstr ""
#: py/obj.c:385 #: py/obj.c:387
msgid "tuple/list has wrong length" msgid "tuple/list has wrong length"
msgstr "" msgstr ""
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "" msgstr ""
#: py/obj.c:400 #: py/obj.c:402
msgid "indices must be integers" msgid "indices must be integers"
msgstr "" msgstr ""
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "" msgstr ""
#: py/obj.c:423 #: py/obj.c:425
msgid "%q index out of range" msgid "%q index out of range"
msgstr "" msgstr ""
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "" msgstr ""
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "" msgstr ""
#: py/obj.c:496 #: py/obj.c:500
msgid "object does not support item deletion" msgid "object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:503 #: py/obj.c:507
msgid "object is not subscriptable" msgid "object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:544 #: py/obj.c:548
msgid "object with buffer protocol required" msgid "object with buffer protocol required"
msgstr "" msgstr ""
@ -2524,3 +2491,58 @@ msgstr ""
#: shared-module/usb_hid/Device.c:59 #: shared-module/usb_hid/Device.c:59
msgid "USB Error" msgid "USB Error"
msgstr "" 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 ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Sebastian Plamauer\n" "Last-Translator: Sebastian Plamauer\n"
"Language-Team: \n" "Language-Team: \n"
@ -151,11 +151,11 @@ msgstr "ungültige argumente"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "kompilieren von Skripten ist nicht unterstützt" msgstr "kompilieren von Skripten ist nicht unterstützt"
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr " Ausgabe:\n" msgstr " Ausgabe:\n"
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
@ -163,67 +163,29 @@ msgstr ""
"Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie " "Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie "
"auszuführen oder verbinde dich mit der REPL um zu deaktivieren.\n" "auszuführen oder verbinde dich mit der REPL um zu deaktivieren.\n"
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n" msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n"
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "Automatisches Neuladen ist deaktiviert.\n" msgstr "Automatisches Neuladen ist deaktiviert.\n"
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n" msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n"
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "WARNUNG: Der Dateiname deines codes hat zwei Dateityperweiterungen\n" msgstr "WARNUNG: Der Dateiname deines codes hat zwei Dateityperweiterungen\n"
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr "Du hast das Starten im Sicherheitsmodus ausgelöst durch "
#: main.c:254
msgid "To exit, please reset the board without "
msgstr "Zum beenden bitte resette das board ohne "
#: main.c:261
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:263
msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
msgstr "CircuitPython ist abgestürzt. Ups!\n"
#: main.c:264
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:267
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:268
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:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
"Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu " "Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu "
"laden" "laden"
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "soft reboot\n" msgstr "soft reboot\n"
@ -452,7 +414,7 @@ msgid "pop from an empty PulseIn"
msgstr "pop von einem leeren PulseIn" msgstr "pop von einem leeren PulseIn"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "index außerhalb der Reichweite" msgstr "index außerhalb der Reichweite"
@ -1369,116 +1331,116 @@ msgstr ""
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "" msgstr ""
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr "" msgstr ""
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr "" msgstr ""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr "" msgstr ""
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" msgid "can't convert to int"
msgstr "" msgstr ""
#: py/obj.c:260 #: py/obj.c:262
#, c-format #, c-format
msgid "can't convert %s to int" msgid "can't convert %s to int"
msgstr "" msgstr ""
#: py/obj.c:320 #: py/obj.c:322
msgid "can't convert to float" msgid "can't convert to float"
msgstr "" msgstr ""
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "" msgstr ""
#: py/obj.c:353 #: py/obj.c:355
msgid "can't convert to complex" msgid "can't convert to complex"
msgstr "" msgstr ""
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "" msgstr ""
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "" msgstr ""
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "" msgstr ""
#: py/obj.c:385 #: py/obj.c:387
msgid "tuple/list has wrong length" msgid "tuple/list has wrong length"
msgstr "" msgstr ""
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "" msgstr ""
#: py/obj.c:400 #: py/obj.c:402
msgid "indices must be integers" msgid "indices must be integers"
msgstr "" msgstr ""
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "" msgstr ""
#: py/obj.c:423 #: py/obj.c:425
msgid "%q index out of range" msgid "%q index out of range"
msgstr "" msgstr ""
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "" msgstr ""
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "" msgstr ""
#: py/obj.c:496 #: py/obj.c:500
msgid "object does not support item deletion" msgid "object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:503 #: py/obj.c:507
msgid "object is not subscriptable" msgid "object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:544 #: py/obj.c:548
msgid "object with buffer protocol required" msgid "object with buffer protocol required"
msgstr "" msgstr ""
@ -2550,32 +2512,106 @@ msgstr "USB beschäftigt"
msgid "USB Error" msgid "USB Error"
msgstr "USB Fehler" msgstr "USB Fehler"
#~ msgid "Invalid Service type" #: supervisor/shared/safe_mode.c:97
#~ msgstr "Ungültiger Diensttyp" msgid "You requested starting safe mode by "
msgstr "Du hast das Starten im Sicherheitsmodus ausgelöst durch "
#~ msgid "Can not query for the device address." #: supervisor/shared/safe_mode.c:100
#~ msgstr "Kann nicht nach der Geräteadresse suchen." msgid "To exit, please reset the board without "
msgstr "Zum beenden bitte resette das board ohne "
#~ msgid "Cannot set PPCP parameters." #: supervisor/shared/safe_mode.c:107
#~ msgstr "Kann PPCP Parameter nicht setzen." #, fuzzy
msgid ""
"You are running in safe mode which means something unanticipated happened.\n"
msgstr "Sicherheitsmodus aktiv, etwas wirklich schlechtes ist passiert.\n"
#~ msgid "Cannot apply GAP parameters." #: supervisor/shared/safe_mode.c:109
#~ msgstr "Kann GAP Parameter nicht anwenden." 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 not encode UUID, to check length." #: supervisor/shared/safe_mode.c:111
#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen." msgid "Crash into the HardFault_Handler.\n"
msgstr ""
#~ msgid "Can encode UUID into the advertisement packet." #: supervisor/shared/safe_mode.c:113
#~ msgstr "Kann UUID in das advertisement packet kodieren." msgid "MicroPython NLR jump failed. Likely memory corruption.\n"
msgstr ""
#~ msgid "Can not apply device name in the stack." #: supervisor/shared/safe_mode.c:115
#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden." msgid "MicroPython fatal error.\n"
msgstr ""
#~ msgid "Can not apply advertisement data. status: 0x%02x" #: supervisor/shared/safe_mode.c:118
#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x" #, 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 "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr "CircuitPython ist abgestürzt. Ups!\n"
#~ 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 "Can not add Service." #~ msgid "Can not add Service."
#~ msgstr "Kann den Dienst nicht hinzufügen." #~ msgstr "Kann den Dienst nicht hinzufügen."
#~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Kann UUID in das advertisement packet kodieren."
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen."
#~ msgid "Can not add Characteristic." #~ msgid "Can not add Characteristic."
#~ msgstr "Kann das Merkmal nicht hinzufügen." #~ msgstr "Kann das Merkmal nicht hinzufügen."
#~ msgid "Can not query for the device address."
#~ msgstr "Kann nicht nach der Geräteadresse suchen."
#~ 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 "Cannot set PPCP parameters."
#~ msgstr "Kann PPCP Parameter nicht setzen."
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden."
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Kann GAP Parameter nicht anwenden."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x"
#~ msgid "Invalid Service type"
#~ msgstr "Ungültiger Diensttyp"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -151,70 +151,37 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr "" msgstr ""
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
msgstr "" msgstr ""
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "" msgstr ""
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "" msgstr ""
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "" msgstr ""
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "" msgstr ""
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr ""
#: main.c:254
msgid "To exit, please reset the board without "
msgstr ""
#: main.c:261
msgid ""
"You are running in safe mode which means something really bad happened.\n"
msgstr ""
#: main.c:263
msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
msgstr ""
#: main.c:264
msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n"
msgstr ""
#: main.c:267
msgid ""
"The microcontroller's power dipped. Please make sure your power supply "
"provides\n"
msgstr ""
#: main.c:268
msgid ""
"enough power for the whole circuit and press reset (after ejecting "
"CIRCUITPY).\n"
msgstr ""
#: main.c:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "" msgstr ""
@ -443,7 +410,7 @@ msgid "pop from an empty PulseIn"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "" msgstr ""
@ -1349,116 +1316,116 @@ msgstr ""
msgid "Invalid argument" msgid "Invalid argument"
msgstr "" msgstr ""
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "" msgstr ""
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr "" msgstr ""
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr "" msgstr ""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr "" msgstr ""
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" msgid "can't convert to int"
msgstr "" msgstr ""
#: py/obj.c:260 #: py/obj.c:262
#, c-format #, c-format
msgid "can't convert %s to int" msgid "can't convert %s to int"
msgstr "" msgstr ""
#: py/obj.c:320 #: py/obj.c:322
msgid "can't convert to float" msgid "can't convert to float"
msgstr "" msgstr ""
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "" msgstr ""
#: py/obj.c:353 #: py/obj.c:355
msgid "can't convert to complex" msgid "can't convert to complex"
msgstr "" msgstr ""
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "" msgstr ""
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "" msgstr ""
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "" msgstr ""
#: py/obj.c:385 #: py/obj.c:387
msgid "tuple/list has wrong length" msgid "tuple/list has wrong length"
msgstr "" msgstr ""
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "" msgstr ""
#: py/obj.c:400 #: py/obj.c:402
msgid "indices must be integers" msgid "indices must be integers"
msgstr "" msgstr ""
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "" msgstr ""
#: py/obj.c:423 #: py/obj.c:425
msgid "%q index out of range" msgid "%q index out of range"
msgstr "" msgstr ""
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "" msgstr ""
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "" msgstr ""
#: py/obj.c:496 #: py/obj.c:500
msgid "object does not support item deletion" msgid "object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:503 #: py/obj.c:507
msgid "object is not subscriptable" msgid "object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:544 #: py/obj.c:548
msgid "object with buffer protocol required" msgid "object with buffer protocol required"
msgstr "" msgstr ""
@ -2524,3 +2491,58 @@ msgstr ""
#: shared-module/usb_hid/Device.c:59 #: shared-module/usb_hid/Device.c:59
msgid "USB Error" msgid "USB Error"
msgstr "" 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 ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -152,11 +152,11 @@ msgstr "argumentos inválidos"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "script de compilación no soportado" msgstr "script de compilación no soportado"
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr " salida:\n" msgstr " salida:\n"
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
@ -164,70 +164,28 @@ msgstr ""
"Auto-reload habilitado. Simplemente guarda los archivos via USB para " "Auto-reload habilitado. Simplemente guarda los archivos via USB para "
"ejecutarlos o entra al REPL para desabilitarlos.\n" "ejecutarlos o entra al REPL para desabilitarlos.\n"
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n" msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n"
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "Auto-recarga deshabilitada.\n" msgstr "Auto-recarga deshabilitada.\n"
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" msgstr "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n"
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "ADVERTENCIA: El nombre de archivo de tu código tiene dos extensiones\n" msgstr "ADVERTENCIA: El nombre de archivo de tu código tiene dos extensiones\n"
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr "Solicitaste iniciar en modo seguro por "
#: main.c:254
msgid "To exit, please reset the board without "
msgstr "Para salir, por favor reinicia la tarjeta sin "
#: main.c:261
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:263
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:264
#, 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"
#: main.c:267
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:268
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:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
"Presiona cualquier tecla para entrar al REPL. Usa CTRL-D para recargar." "Presiona cualquier tecla para entrar al REPL. Usa CTRL-D para recargar."
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "reinicio suave\n" msgstr "reinicio suave\n"
@ -458,7 +416,7 @@ msgid "pop from an empty PulseIn"
msgstr "pop de un PulseIn vacío" msgstr "pop de un PulseIn vacío"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "index fuera de rango" msgstr "index fuera de rango"
@ -1378,116 +1336,116 @@ msgstr "Operación no soportada"
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argumento inválido" msgstr "Argumento inválido"
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "" msgstr ""
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr " Archivo \"%q\", línea %d" msgstr " Archivo \"%q\", línea %d"
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr " Archivo \"%q\"" msgstr " Archivo \"%q\""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr ", en %q\n" msgstr ", en %q\n"
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" msgid "can't convert to int"
msgstr "no se puede convertir a int" msgstr "no se puede convertir a int"
#: py/obj.c:260 #: py/obj.c:262
#, c-format #, c-format
msgid "can't convert %s to int" msgid "can't convert %s to int"
msgstr "no se puede convertir %s a int" msgstr "no se puede convertir %s a int"
#: py/obj.c:320 #: py/obj.c:322
msgid "can't convert to float" msgid "can't convert to float"
msgstr "no se puede convertir a float" msgstr "no se puede convertir a float"
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "no se puede convertir %s a float" msgstr "no se puede convertir %s a float"
#: py/obj.c:353 #: py/obj.c:355
msgid "can't convert to complex" msgid "can't convert to complex"
msgstr "no se puede convertir a complejo" msgstr "no se puede convertir a complejo"
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "no se puede convertir %s a complejo" msgstr "no se puede convertir %s a complejo"
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "tupla/lista esperada" msgstr "tupla/lista esperada"
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "el objeto '%s' no es una tupla o lista" msgstr "el objeto '%s' no es una tupla o lista"
#: py/obj.c:385 #: py/obj.c:387
msgid "tuple/list has wrong length" msgid "tuple/list has wrong length"
msgstr "tupla/lista tiene una longitud incorrecta" msgstr "tupla/lista tiene una longitud incorrecta"
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "longitud solicitada %d pero el objeto tiene longitud %d" msgstr "longitud solicitada %d pero el objeto tiene longitud %d"
#: py/obj.c:400 #: py/obj.c:402
msgid "indices must be integers" msgid "indices must be integers"
msgstr "indices deben ser enteros" msgstr "indices deben ser enteros"
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "%q indices deben ser enteros, no %s" msgstr "%q indices deben ser enteros, no %s"
#: py/obj.c:423 #: py/obj.c:425
msgid "%q index out of range" msgid "%q index out of range"
msgstr "%w indice fuera de rango" msgstr "%w indice fuera de rango"
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "el objeto no tiene longitud" msgstr "el objeto no tiene longitud"
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "el objeto de tipo '%s' no tiene len()" msgstr "el objeto de tipo '%s' no tiene len()"
#: py/obj.c:496 #: py/obj.c:500
msgid "object does not support item deletion" msgid "object does not support item deletion"
msgstr "object no soporta la eliminación de elementos" msgstr "object no soporta la eliminación de elementos"
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "objeto '%s' no soporta la eliminación de elementos" msgstr "objeto '%s' no soporta la eliminación de elementos"
#: py/obj.c:503 #: py/obj.c:507
msgid "object is not subscriptable" msgid "object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "el objeto no soporta la asignación de elementos" msgstr "el objeto no soporta la asignación de elementos"
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "el objeto '%s' no soporta la asignación de elementos" 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" msgid "object with buffer protocol required"
msgstr "objeto con protocolo de buffer requerido" msgstr "objeto con protocolo de buffer requerido"
@ -2566,9 +2524,100 @@ msgstr "USB ocupado"
msgid "USB Error" msgid "USB Error"
msgstr "Error USB" msgstr "Error USB"
#: supervisor/shared/safe_mode.c:97
msgid "You requested starting safe mode by "
msgstr "Solicitaste iniciar en modo seguro por "
#: supervisor/shared/safe_mode.c:100
msgid "To exit, please reset the board without "
msgstr "Para salir, por favor reinicia la tarjeta sin "
#: 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 ""
#, 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"
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
#~ 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 "Cannot set PPCP parameters."
#~ msgstr "No se pueden establecer los parámetros PPCP."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x"
#~ msgid "Baud rate too high for this SPI peripheral" #~ msgid "Baud rate too high for this SPI peripheral"
#~ msgstr "Baud rate demasiado alto para este periférico SPI" #~ msgstr "Baud rate demasiado alto para este periférico SPI"
#~ msgid "Can not query for the device address."
#~ msgstr "No se puede consultar la dirección del dispositivo."
#~ msgid "Can not add Service."
#~ msgstr "No se puede agregar el Servicio."
#~ msgid "Invalid Service type" #~ msgid "Invalid Service type"
#~ msgstr "Tipo de Servicio inválido" #~ msgstr "Tipo de Servicio inválido"
@ -2578,12 +2627,6 @@ msgstr "Error USB"
#~ msgid "Can not encode UUID, to check length." #~ msgid "Can not encode UUID, to check length."
#~ msgstr "No se puede codificar el UUID, para revisar la longitud." #~ msgstr "No se puede codificar el UUID, para revisar la longitud."
#~ msgid "Can not query for the device address."
#~ msgstr "No se puede consultar la dirección del dispositivo."
#~ 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." #~ msgid "Can not apply device name in the stack."
#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack." #~ msgstr "No se puede aplicar el nombre del dispositivo en el stack."
@ -2592,9 +2635,3 @@ msgstr "Error USB"
#~ msgid "Cannot apply GAP parameters." #~ msgid "Cannot apply GAP parameters."
#~ msgstr "No se pueden aplicar los parámetros GAP." #~ 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."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: 2018-08-30 23:04-0700\n" "PO-Revision-Date: 2018-08-30 23:04-0700\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n" "Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n" "Language-Team: fil\n"
@ -151,11 +151,11 @@ msgstr "mali ang mga argumento"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "script kompilasyon hindi supportado" msgstr "script kompilasyon hindi supportado"
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr " output:\n" msgstr " output:\n"
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
@ -163,70 +163,29 @@ msgstr ""
"Ang awtomatikong pag re-reload ay ON. i-save lamang ang mga files sa USB " "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" "para patakbuhin sila o pasukin ang REPL para i-disable ito.\n"
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n" msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n"
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "Awtomatikong pag re-reload ay OFF.\n" msgstr "Awtomatikong pag re-reload ay OFF.\n"
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n" msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n"
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "BABALA: Ang pangalan ng file ay may dalawang extension\n" msgstr "BABALA: Ang pangalan ng file ay may dalawang extension\n"
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng "
#: main.c:254
msgid "To exit, please reset the board without "
msgstr "Para lumabas, paki-reset ang board na wala ang "
#: main.c:261
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:263
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:264
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:267
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:268
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:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
"Pindutin ang anumang key upang ipasok ang REPL. Gamitin ang CTRL-D upang i-" "Pindutin ang anumang key upang ipasok ang REPL. Gamitin ang CTRL-D upang i-"
"reload." "reload."
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "malambot na reboot\n" msgstr "malambot na reboot\n"
@ -455,7 +414,7 @@ msgid "pop from an empty PulseIn"
msgstr "pop mula sa walang laman na PulseIn" msgstr "pop mula sa walang laman na PulseIn"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "index wala sa sakop" msgstr "index wala sa sakop"
@ -1380,116 +1339,116 @@ msgstr "Hindi sinusuportahang operasyon"
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Maling argumento" msgstr "Maling argumento"
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "Traceback (pinakahuling huling tawag): \n" msgstr "Traceback (pinakahuling huling tawag): \n"
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr " File \"%q\", line %d" msgstr " File \"%q\", line %d"
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr " File \"%q\"" msgstr " File \"%q\""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr ", sa %q\n" msgstr ", sa %q\n"
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" msgid "can't convert to int"
msgstr "hindi ma-convert sa int" msgstr "hindi ma-convert sa int"
#: py/obj.c:260 #: py/obj.c:262
#, c-format #, c-format
msgid "can't convert %s to int" msgid "can't convert %s to int"
msgstr "hindi ma-convert %s sa int" msgstr "hindi ma-convert %s sa int"
#: py/obj.c:320 #: py/obj.c:322
msgid "can't convert to float" msgid "can't convert to float"
msgstr "hindi ma-convert sa float" msgstr "hindi ma-convert sa float"
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "hindi ma-convert %s sa int" msgstr "hindi ma-convert %s sa int"
#: py/obj.c:353 #: py/obj.c:355
msgid "can't convert to complex" msgid "can't convert to complex"
msgstr "hindi ma-convert sa complex" msgstr "hindi ma-convert sa complex"
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "hindi ma-convert %s sa complex" msgstr "hindi ma-convert %s sa complex"
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "umaasa ng tuple/list" msgstr "umaasa ng tuple/list"
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "object '%s' ay hindi tuple o list" msgstr "object '%s' ay hindi tuple o list"
#: py/obj.c:385 #: py/obj.c:387
msgid "tuple/list has wrong length" msgid "tuple/list has wrong length"
msgstr "mali ang haba ng tuple/list" msgstr "mali ang haba ng tuple/list"
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "hiniling ang haba %d ngunit may haba ang object na %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" msgid "indices must be integers"
msgstr "ang mga indeks ay dapat na integer" msgstr "ang mga indeks ay dapat na integer"
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "%q indeks ay dapat integers, hindi %s" msgstr "%q indeks ay dapat integers, hindi %s"
#: py/obj.c:423 #: py/obj.c:425
msgid "%q index out of range" msgid "%q index out of range"
msgstr "%q indeks wala sa sakop" msgstr "%q indeks wala sa sakop"
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "object walang len" msgstr "object walang len"
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "object na type '%s' walang len()" msgstr "object na type '%s' walang len()"
#: py/obj.c:496 #: py/obj.c:500
msgid "object does not support item deletion" msgid "object does not support item deletion"
msgstr "ang object ay hindi sumusuporta sa pagbura ng item" msgstr "ang object ay hindi sumusuporta sa pagbura ng item"
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "'%s' object ay hindi sumusuporta sa pagtanggal ng item" msgstr "'%s' object ay hindi sumusuporta sa pagtanggal ng item"
#: py/obj.c:503 #: py/obj.c:507
msgid "object is not subscriptable" msgid "object is not subscriptable"
msgstr "ang bagay ay hindi maaaring ma-subscript" msgstr "ang bagay ay hindi maaaring ma-subscript"
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "'%s' object ay hindi maaaring i-subscript" msgstr "'%s' object ay hindi maaaring i-subscript"
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "ang object na '%s' ay hindi maaaring i-subscript" msgstr "ang object na '%s' ay hindi maaaring i-subscript"
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "'%s' object hindi sumusuporta ng item assignment" msgstr "'%s' object hindi sumusuporta ng item assignment"
#: py/obj.c:544 #: py/obj.c:548
msgid "object with buffer protocol required" msgid "object with buffer protocol required"
msgstr "object na may buffer protocol kinakailangan" msgstr "object na may buffer protocol kinakailangan"
@ -2598,10 +2557,100 @@ msgstr "Busy ang USB"
msgid "USB Error" msgid "USB Error"
msgstr "May pagkakamali ang USB" msgstr "May pagkakamali ang USB"
#: supervisor/shared/safe_mode.c:97
msgid "You requested starting safe mode by "
msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng "
#: supervisor/shared/safe_mode.c:100
msgid "To exit, please reset the board without "
msgstr "Para lumabas, paki-reset ang board na wala ang "
#: supervisor/shared/safe_mode.c:107
#, fuzzy
msgid ""
"You are running in safe mode which means something unanticipated happened.\n"
msgstr ""
"Ikaw ay tumatakbo sa safe mode, ang ibig sabihin nito ay 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 ""
#: 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 ""
"Ang kapangyarihan ng mikrokontroller ay bumaba. Mangyaring suriin ang power "
"supply \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 ""
#~ "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"
#~ 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 ""
#~ "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 "Cannot set PPCP parameters."
#~ msgstr "Hindi ma-set ang PPCP parameters."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
#, fuzzy #, fuzzy
#~ msgid "palette must be displayio.Palette" #~ msgid "palette must be displayio.Palette"
#~ msgstr "ang palette ay dapat 32 bytes ang haba" #~ msgstr "ang palette ay dapat 32 bytes ang haba"
#~ msgid "Can not query for the device address."
#~ msgstr "Hindi maaaring mag-query para sa address ng device."
#~ msgid "Can not add Service."
#~ msgstr "Hindi maidaragdag ang serbisyo."
#~ msgid "Invalid Service type" #~ msgid "Invalid Service type"
#~ msgstr "Mali ang tipo ng serbisyo" #~ msgstr "Mali ang tipo ng serbisyo"
@ -2611,12 +2660,6 @@ msgstr "May pagkakamali ang USB"
#~ msgid "Can not encode UUID, to check length." #~ msgid "Can not encode UUID, to check length."
#~ msgstr "Hindi ma-encode UUID, para suriin ang haba." #~ msgstr "Hindi ma-encode UUID, para suriin ang haba."
#~ msgid "Can not query for the device address."
#~ msgstr "Hindi maaaring mag-query para sa address ng device."
#~ 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." #~ msgid "Can not apply device name in the stack."
#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack." #~ msgstr "Hindi maaaring ma-aplay ang device name sa stack."
@ -2625,9 +2668,3 @@ msgstr "May pagkakamali ang USB"
#~ msgid "Cannot apply GAP parameters." #~ msgid "Cannot apply GAP parameters."
#~ msgstr "Hindi ma-apply ang 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."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.1\n" "Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: 2018-08-14 11:01+0200\n" "PO-Revision-Date: 2018-08-14 11:01+0200\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n" "Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n" "Language-Team: fr\n"
@ -150,11 +150,11 @@ msgstr "arguments invalides"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilation du script non supporté" msgstr "compilation du script non supporté"
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr " sortie:\n" msgstr " sortie:\n"
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
@ -162,66 +162,27 @@ msgstr ""
"Auto-chargement activé. Copiez simplement les fichiers en USB pour les " "Auto-chargement activé. Copiez simplement les fichiers en USB pour les "
"lancer ou entrez sur REPL pour le désactiver.\n" "lancer ou entrez sur REPL pour le désactiver.\n"
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Mode sans-échec. Auto-rechargement désactivé.\n" msgstr "Mode sans-échec. Auto-rechargement désactivé.\n"
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "Auto-rechargement désactivé.\n" msgstr "Auto-rechargement désactivé.\n"
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "Mode sans-échec! Le code sauvegardé ne s'éxecute pas.\n" msgstr "Mode sans-échec! Le code sauvegardé ne s'éxecute pas.\n"
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "ATTENTION: le nom de fichier de votre code a deux extensions\n" msgstr "ATTENTION: le nom de fichier de votre code a deux extensions\n"
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr "Vous avez demandé à démarrer en mode sans-échec par "
#: main.c:254
msgid "To exit, please reset the board without "
msgstr "Pour quitter, redémarrez la carte SVP sans "
#: main.c:261
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:263
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:264
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:267
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:268
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:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." 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." msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger."
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "redémarrage logiciel\n" msgstr "redémarrage logiciel\n"
@ -451,7 +412,7 @@ msgid "pop from an empty PulseIn"
msgstr "'pop' d'une entrée PulseIn vide" msgstr "'pop' d'une entrée PulseIn vide"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "index hors gamme" msgstr "index hors gamme"
@ -1370,116 +1331,116 @@ msgstr "Opération non supportée"
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argument invalide" msgstr "Argument invalide"
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "Trace (appels les plus récents en dernier):\n" msgstr "Trace (appels les plus récents en dernier):\n"
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr " Fichier \"%q\", ligne %d" msgstr " Fichier \"%q\", ligne %d"
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr " Fichier \"%q\"" msgstr " Fichier \"%q\""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr ", dans %q\n" msgstr ", dans %q\n"
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" 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 #, c-format
msgid "can't convert %s to int" 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" msgid "can't convert to float"
msgstr "ne peut convertir en nombre à virgule flottante (float)" msgstr "ne peut convertir en nombre à virgule flottante (float)"
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "ne peut convertir %s en nombre à virgule flottante (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" msgid "can't convert to complex"
msgstr "ne peut convertir en nombre complexe" msgstr "ne peut convertir en nombre complexe"
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "ne peut convertir %s en nombre complexe" msgstr "ne peut convertir %s en nombre complexe"
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "un tuple ou une liste est attendu" msgstr "un tuple ou une liste est attendu"
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "l'objet '%s' n'est pas un tuple ou une liste" 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" msgid "tuple/list has wrong length"
msgstr "tuple/liste a une mauvaise longueur" msgstr "tuple/liste a une mauvaise longueur"
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "la longueur requise est %d mais l'objet est long de %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" msgid "indices must be integers"
msgstr "les indices doivent être des entiers" msgstr "les indices doivent être des entiers"
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "les indices %q doivent être des entiers, pas %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" msgid "%q index out of range"
msgstr "index %q hors gamme" msgstr "index %q hors gamme"
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "l'objet n'a pas de len" msgstr "l'objet n'a pas de len"
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "l'objet de type '%s' n'a pas de 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" msgid "object does not support item deletion"
msgstr "l'objet ne supporte pas la suppression d'éléments" msgstr "l'objet ne supporte pas la suppression d'éléments"
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "l'objet '%s' ne supporte pas la suppression d'éléments" 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" msgid "object is not subscriptable"
msgstr "l'objet n'est pas sous-scriptable" msgstr "l'objet n'est pas sous-scriptable"
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "l'objet '%s' n'est pas sous-scriptable" msgstr "l'objet '%s' n'est pas sous-scriptable"
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "l'objet ne supporte pas l'assignation d'éléments" msgstr "l'objet ne supporte pas l'assignation d'éléments"
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "l'objet '%s' ne supporte pas l'assignation d'éléments" 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" msgid "object with buffer protocol required"
msgstr "un objet avec un protocol de tampon est nécessaire" msgstr "un objet avec un protocol de tampon est nécessaire"
@ -2596,34 +2557,111 @@ msgstr "USB occupé"
msgid "USB Error" msgid "USB Error"
msgstr "Erreur USB" 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 #, fuzzy
#~ msgid "palette must be displayio.Palette" msgid ""
#~ msgstr "palettre doit être displayio.Palette" "You are running in safe mode which means something unanticipated happened.\n"
msgstr ""
"Vous êtes en mode sans-échec ce qui signifie que quelque chose demauvais est "
"arrivé.\n"
#~ msgid "Can not query for the device address." #: supervisor/shared/safe_mode.c:109
#~ msgstr "Impossible d'obtenir l'adresse du périphérique" 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 "Cannot set PPCP parameters." #: supervisor/shared/safe_mode.c:111
#~ msgstr "Impossible d'appliquer les paramètres PPCP" msgid "Crash into the HardFault_Handler.\n"
msgstr ""
#~ msgid "Cannot apply GAP parameters." #: supervisor/shared/safe_mode.c:113
#~ msgstr "Impossible d'appliquer les paramètres GAP" msgid "MicroPython NLR jump failed. Likely memory corruption.\n"
msgstr ""
#~ msgid "Can not encode UUID, to check length." #: supervisor/shared/safe_mode.c:115
#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur." 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 ""
"L'alimentation du microcontroleur a chuté. Merci de vérifier que votre "
"alimentation fournit\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 "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" #~ msgid "Invalid Service type"
#~ msgstr "Type de service invalide" #~ 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." #~ msgid "Can not apply device name in the stack."
#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile" #~ 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 #, fuzzy
#~ msgid "value_size must be power of two" #~ msgid "value_size must be power of two"
#~ msgstr "value_size est une puissance de deux" #~ msgstr "value_size est une puissance de deux"
#~ msgid "Can not add Service." #, fuzzy
#~ msgstr "Impossible d'ajouter le Service" #~ msgid "palette must be displayio.Palette"
#~ msgstr "palettre doit être displayio.Palette"
#~ msgid "Can not add Characteristic."
#~ msgstr "Impossible d'ajouter la Characteristic."

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n" "Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -151,11 +151,11 @@ msgstr "argomenti non validi"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilazione dello scrip non suportata" msgstr "compilazione dello scrip non suportata"
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr " output:\n" msgstr " output:\n"
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
@ -163,71 +163,28 @@ msgstr ""
"L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL " "L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL "
"per disabilitarlo.\n" "per disabilitarlo.\n"
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n" msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n"
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "Auto-reload disattivato.\n" msgstr "Auto-reload disattivato.\n"
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n" msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n"
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\n" msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\n"
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr "È stato richiesto l'avvio in modalità sicura da "
#: main.c:254
msgid "To exit, please reset the board without "
msgstr "Per uscire resettare la scheda senza "
#: main.c:261
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:263
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:264
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:267
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:268
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:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
"Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare." "Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare."
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "soft reboot\n" msgstr "soft reboot\n"
@ -459,7 +416,7 @@ msgid "pop from an empty PulseIn"
msgstr "pop sun un PulseIn vuoto" msgstr "pop sun un PulseIn vuoto"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "indice fuori intervallo" msgstr "indice fuori intervallo"
@ -1379,116 +1336,116 @@ msgstr "Operazione non supportata"
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argomento non valido" msgstr "Argomento non valido"
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "Traceback (chiamata più recente per ultima):\n" msgstr "Traceback (chiamata più recente per ultima):\n"
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr " File \"%q\", riga %d" msgstr " File \"%q\", riga %d"
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr " File \"%q\"" msgstr " File \"%q\""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr ", in %q\n" msgstr ", in %q\n"
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" msgid "can't convert to int"
msgstr "non è possibile convertire a int" msgstr "non è possibile convertire a int"
#: py/obj.c:260 #: py/obj.c:262
#, c-format #, c-format
msgid "can't convert %s to int" msgid "can't convert %s to int"
msgstr "non è possibile convertire %s a int" msgstr "non è possibile convertire %s a int"
#: py/obj.c:320 #: py/obj.c:322
msgid "can't convert to float" msgid "can't convert to float"
msgstr "non è possibile convertire a float" msgstr "non è possibile convertire a float"
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "non è possibile convertire %s a float" msgstr "non è possibile convertire %s a float"
#: py/obj.c:353 #: py/obj.c:355
msgid "can't convert to complex" msgid "can't convert to complex"
msgstr "non è possibile convertire a complex" msgstr "non è possibile convertire a complex"
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "non è possibile convertire a complex" msgstr "non è possibile convertire a complex"
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "lista/tupla prevista" msgstr "lista/tupla prevista"
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "oggetto '%s' non è una tupla o una lista" msgstr "oggetto '%s' non è una tupla o una lista"
#: py/obj.c:385 #: py/obj.c:387
msgid "tuple/list has wrong length" msgid "tuple/list has wrong length"
msgstr "tupla/lista ha la lunghezza sbagliata" msgstr "tupla/lista ha la lunghezza sbagliata"
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "lunghezza %d richiesta ma l'oggetto ha lunghezza %d" msgstr "lunghezza %d richiesta ma l'oggetto ha lunghezza %d"
#: py/obj.c:400 #: py/obj.c:402
msgid "indices must be integers" msgid "indices must be integers"
msgstr "gli indici devono essere interi" msgstr "gli indici devono essere interi"
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "gli indici %q devono essere interi, non %s" msgstr "gli indici %q devono essere interi, non %s"
#: py/obj.c:423 #: py/obj.c:425
msgid "%q index out of range" msgid "%q index out of range"
msgstr "indice %q fuori intervallo" msgstr "indice %q fuori intervallo"
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "l'oggetto non ha lunghezza" msgstr "l'oggetto non ha lunghezza"
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "l'oggetto di tipo '%s' non implementa 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" msgid "object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:503 #: py/obj.c:507
msgid "object is not subscriptable" msgid "object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:544 #: py/obj.c:548
msgid "object with buffer protocol required" msgid "object with buffer protocol required"
msgstr "" msgstr ""
@ -2583,32 +2540,111 @@ msgstr "USB occupata"
msgid "USB Error" msgid "USB Error"
msgstr "Errore USB" msgstr "Errore USB"
#~ msgid "Invalid Service type" #: supervisor/shared/safe_mode.c:97
#~ msgstr "Tipo di servizio non valido" msgid "You requested starting safe mode by "
msgstr "È stato richiesto l'avvio in modalità sicura da "
#~ msgid "Can not query for the device address." #: supervisor/shared/safe_mode.c:100
#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo." msgid "To exit, please reset the board without "
msgstr "Per uscire resettare la scheda senza "
#~ msgid "Cannot set PPCP parameters." #: supervisor/shared/safe_mode.c:107
#~ msgstr "Impossibile impostare i parametri PPCP." #, fuzzy
msgid ""
"You are running in safe mode which means something unanticipated happened.\n"
msgstr ""
"Sei nella modalità sicura che significa che qualcosa di molto brutto è "
"successo.\n"
#~ msgid "Cannot apply GAP parameters." #: supervisor/shared/safe_mode.c:109
#~ msgstr "Impossibile applicare i parametri GAP." 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 not encode UUID, to check length." #: supervisor/shared/safe_mode.c:111
#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare." msgid "Crash into the HardFault_Handler.\n"
msgstr ""
#~ msgid "Can encode UUID into the advertisement packet." #: supervisor/shared/safe_mode.c:113
#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement." msgid "MicroPython NLR jump failed. Likely memory corruption.\n"
msgstr ""
#~ msgid "Can not apply device name in the stack." #: supervisor/shared/safe_mode.c:115
#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista." msgid "MicroPython fatal error.\n"
msgstr ""
#~ msgid "Can not apply advertisement data. status: 0x%02x" #: supervisor/shared/safe_mode.c:118
#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x" #, 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 "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. "
#~ "Whoops!\n"
#~ 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 "Can not add Service." #~ msgid "Can not add Service."
#~ msgstr "Non è possibile aggiungere Service." #~ msgstr "Non è possibile aggiungere Service."
#~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
#~ msgid "Can not encode UUID, to check length."
#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
#~ msgid "Can not add Characteristic." #~ msgid "Can not add Characteristic."
#~ msgstr "Non è possibile aggiungere Characteristic." #~ msgstr "Non è possibile aggiungere Characteristic."
#~ msgid "Can not query for the device address."
#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo."
#~ 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 "Cannot set PPCP parameters."
#~ msgstr "Impossibile impostare i parametri PPCP."
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Impossibile applicare i parametri GAP."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x"
#~ msgid "Invalid Service type"
#~ msgstr "Tipo di servizio non valido"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-04 16:17-0500\n" "POT-Creation-Date: 2018-12-06 17:04-0800\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -151,70 +151,37 @@ msgstr "argumentos inválidos"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilação de script não suportada" msgstr "compilação de script não suportada"
#: main.c:155 #: main.c:150
msgid " output:\n" msgid " output:\n"
msgstr " saída:\n" msgstr " saída:\n"
#: main.c:169 main.c:242 #: main.c:164 main.c:237
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
msgstr "" msgstr ""
#: main.c:171 #: main.c:166
msgid "Running in safe mode! Auto-reload is off.\n" msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Rodando em modo seguro! Atualização automática está desligada.\n" msgstr "Rodando em modo seguro! Atualização automática está desligada.\n"
#: main.c:173 main.c:244 #: main.c:168 main.c:239
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
msgstr "A atualização automática está desligada.\n" msgstr "A atualização automática está desligada.\n"
#: main.c:187 #: main.c:182
msgid "Running in safe mode! Not running saved code.\n" msgid "Running in safe mode! Not running saved code.\n"
msgstr "Rodando em modo seguro! Não está executando o código salvo.\n" msgstr "Rodando em modo seguro! Não está executando o código salvo.\n"
#: main.c:203 #: main.c:198
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "AVISO: Seu arquivo de código tem duas extensões\n" msgstr "AVISO: Seu arquivo de código tem duas extensões\n"
#: main.c:251 #: main.c:244
msgid "You requested starting safe mode by "
msgstr "Você solicitou o início do modo de segurança"
#: main.c:254
msgid "To exit, please reset the board without "
msgstr "Para sair, por favor, reinicie a placa sem "
#: main.c:261
msgid ""
"You are running in safe mode which means something really bad happened.\n"
msgstr ""
#: main.c:263
msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
msgstr ""
#: main.c:264
msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n"
msgstr ""
#: main.c:267
msgid ""
"The microcontroller's power dipped. Please make sure your power supply "
"provides\n"
msgstr ""
#: main.c:268
msgid ""
"enough power for the whole circuit and press reset (after ejecting "
"CIRCUITPY).\n"
msgstr ""
#: main.c:272
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "" msgstr ""
#: main.c:430 #: main.c:407
msgid "soft reboot\n" msgid "soft reboot\n"
msgstr "" msgstr ""
@ -443,7 +410,7 @@ msgid "pop from an empty PulseIn"
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237 #: 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" msgid "index out of range"
msgstr "Índice fora do intervalo" msgstr "Índice fora do intervalo"
@ -1355,116 +1322,116 @@ msgstr ""
msgid "Invalid argument" msgid "Invalid argument"
msgstr "Argumento inválido" msgstr "Argumento inválido"
#: py/obj.c:90 #: py/obj.c:92
msgid "Traceback (most recent call last):\n" msgid "Traceback (most recent call last):\n"
msgstr "" msgstr ""
#: py/obj.c:94 #: py/obj.c:96
msgid " File \"%q\", line %d" msgid " File \"%q\", line %d"
msgstr " Arquivo \"%q\", linha %d" msgstr " Arquivo \"%q\", linha %d"
#: py/obj.c:96 #: py/obj.c:98
msgid " File \"%q\"" msgid " File \"%q\""
msgstr " Arquivo \"%q\"" msgstr " Arquivo \"%q\""
#: py/obj.c:100 #: py/obj.c:102
msgid ", in %q\n" msgid ", in %q\n"
msgstr "" msgstr ""
#: py/obj.c:257 #: py/obj.c:259
msgid "can't convert to int" msgid "can't convert to int"
msgstr "" msgstr ""
#: py/obj.c:260 #: py/obj.c:262
#, c-format #, c-format
msgid "can't convert %s to int" msgid "can't convert %s to int"
msgstr "" msgstr ""
#: py/obj.c:320 #: py/obj.c:322
msgid "can't convert to float" msgid "can't convert to float"
msgstr "" msgstr ""
#: py/obj.c:323 #: py/obj.c:325
#, c-format #, c-format
msgid "can't convert %s to float" msgid "can't convert %s to float"
msgstr "" msgstr ""
#: py/obj.c:353 #: py/obj.c:355
msgid "can't convert to complex" msgid "can't convert to complex"
msgstr "" msgstr ""
#: py/obj.c:356 #: py/obj.c:358
#, c-format #, c-format
msgid "can't convert %s to complex" msgid "can't convert %s to complex"
msgstr "" msgstr ""
#: py/obj.c:371 #: py/obj.c:373
msgid "expected tuple/list" msgid "expected tuple/list"
msgstr "" msgstr ""
#: py/obj.c:374 #: py/obj.c:376
#, c-format #, c-format
msgid "object '%s' is not a tuple or list" msgid "object '%s' is not a tuple or list"
msgstr "" msgstr ""
#: py/obj.c:385 #: py/obj.c:387
msgid "tuple/list has wrong length" msgid "tuple/list has wrong length"
msgstr "" msgstr ""
#: py/obj.c:387 #: py/obj.c:389
#, c-format #, c-format
msgid "requested length %d but object has length %d" msgid "requested length %d but object has length %d"
msgstr "" msgstr ""
#: py/obj.c:400 #: py/obj.c:402
msgid "indices must be integers" msgid "indices must be integers"
msgstr "" msgstr ""
#: py/obj.c:403 #: py/obj.c:405
msgid "%q indices must be integers, not %s" msgid "%q indices must be integers, not %s"
msgstr "" msgstr ""
#: py/obj.c:423 #: py/obj.c:425
msgid "%q index out of range" msgid "%q index out of range"
msgstr "" msgstr ""
#: py/obj.c:455 #: py/obj.c:457
msgid "object has no len" msgid "object has no len"
msgstr "" msgstr ""
#: py/obj.c:458 #: py/obj.c:460
#, c-format #, c-format
msgid "object of type '%s' has no len()" msgid "object of type '%s' has no len()"
msgstr "" msgstr ""
#: py/obj.c:496 #: py/obj.c:500
msgid "object does not support item deletion" msgid "object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:499 #: py/obj.c:503
#, c-format #, c-format
msgid "'%s' object does not support item deletion" msgid "'%s' object does not support item deletion"
msgstr "" msgstr ""
#: py/obj.c:503 #: py/obj.c:507
msgid "object is not subscriptable" msgid "object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:506 #: py/obj.c:510
#, c-format #, c-format
msgid "'%s' object is not subscriptable" msgid "'%s' object is not subscriptable"
msgstr "" msgstr ""
#: py/obj.c:510 #: py/obj.c:514
msgid "object does not support item assignment" msgid "object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:513 #: py/obj.c:517
#, c-format #, c-format
msgid "'%s' object does not support item assignment" msgid "'%s' object does not support item assignment"
msgstr "" msgstr ""
#: py/obj.c:544 #: py/obj.c:548
msgid "object with buffer protocol required" msgid "object with buffer protocol required"
msgstr "" msgstr ""
@ -2535,6 +2502,67 @@ msgstr "USB ocupada"
msgid "USB Error" msgid "USB Error"
msgstr "Erro na USB" msgstr "Erro na USB"
#: supervisor/shared/safe_mode.c:97
msgid "You requested starting safe mode by "
msgstr "Você solicitou o início do modo de segurança"
#: supervisor/shared/safe_mode.c:100
msgid "To exit, please reset the board without "
msgstr "Para sair, por favor, reinicie a placa sem "
#: 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 ""
#~ msgid "Can not add Service."
#~ msgstr "Não é possível adicionar o serviço."
#~ msgid "Can not apply advertisement data. status: 0x%02x"
#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
#~ msgid "Baud rate too high for this SPI peripheral" #~ msgid "Baud rate too high for this SPI peripheral"
#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI" #~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
@ -2547,20 +2575,14 @@ msgstr "Erro na USB"
#~ msgid "Cannot apply GAP parameters." #~ msgid "Cannot apply GAP parameters."
#~ msgstr "Não é possível aplicar parâmetros GAP." #~ msgstr "Não é possível aplicar parâmetros GAP."
#~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Pode codificar o UUID no pacote de anúncios."
#~ 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 apply device name in the stack."
#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
#~ msgid "Invalid Service type" #~ msgid "Invalid Service type"
#~ msgstr "Tipo de serviço inválido" #~ msgstr "Tipo de serviço inválido"
#~ msgid "Can not add Service." #~ msgid "Can encode UUID into the advertisement packet."
#~ msgstr "Não é possível adicionar o serviço." #~ msgstr "Pode codificar o UUID no pacote de anúncios."
#~ msgid "Can not add Characteristic." #~ msgid "Can not add Characteristic."
#~ msgstr "Não é possível adicionar Característica." #~ msgstr "Não é possível adicionar Característica."
#~ msgid "Can not apply device name in the stack."
#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."

63
main.c
View File

@ -51,6 +51,7 @@
#include "supervisor/shared/autoreload.h" #include "supervisor/shared/autoreload.h"
#include "supervisor/shared/translate.h" #include "supervisor/shared/translate.h"
#include "supervisor/shared/rgb_led_status.h" #include "supervisor/shared/rgb_led_status.h"
#include "supervisor/shared/safe_mode.h"
#include "supervisor/shared/status_leds.h" #include "supervisor/shared/status_leds.h"
#include "supervisor/shared/stack.h" #include "supervisor/shared/stack.h"
#include "supervisor/serial.h" #include "supervisor/serial.h"
@ -140,12 +141,6 @@ const char* first_existing_file_in_list(const char ** filenames) {
return NULL; 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) { bool maybe_run_list(const char ** filenames, pyexec_result_t* exec_result) {
const char* filename = first_existing_file_in_list(filenames); const char* filename = first_existing_file_in_list(filenames);
if (filename == NULL) { if (filename == NULL) {
@ -166,11 +161,11 @@ bool run_code_py(safe_mode_t safe_mode) {
if (serial_connected_at_start) { if (serial_connected_at_start) {
serial_write("\n"); serial_write("\n");
if (autoreload_is_enabled()) { 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) { } 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()) { } else if (!autoreload_is_enabled()) {
write_compressed(translate("Auto-reload is off.\n")); serial_write_compressed(translate("Auto-reload is off.\n"));
} }
} }
#endif #endif
@ -184,7 +179,7 @@ bool run_code_py(safe_mode_t safe_mode) {
bool found_main = false; bool found_main = false;
if (safe_mode != NO_SAFE_MODE) { 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 { } else {
new_status_color(MAIN_RUNNING); new_status_color(MAIN_RUNNING);
@ -200,7 +195,7 @@ bool run_code_py(safe_mode_t safe_mode) {
if (!found_main){ if (!found_main){
found_main = maybe_run_list(double_extension_filenames, &result); found_main = maybe_run_list(double_extension_filenames, &result);
if (found_main) { 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(); stop_mp();
@ -220,8 +215,8 @@ bool run_code_py(safe_mode_t safe_mode) {
rgb_status_animation_t animation; rgb_status_animation_t animation;
prep_rgb_status_animation(&result, found_main, safe_mode, &animation); prep_rgb_status_animation(&result, found_main, safe_mode, &animation);
while (true) { while (true) {
#ifdef MICROPY_VM_HOOK_LOOP #ifdef CIRCUITPY_SUPERVISOR_BACKGROUND
MICROPY_VM_HOOK_LOOP CIRCUITPY_SUPERVISOR_BACKGROUND
#endif #endif
if (reload_requested) { if (reload_requested) {
return true; return true;
@ -239,37 +234,14 @@ bool run_code_py(safe_mode_t safe_mode) {
if (!serial_connected_at_start) { if (!serial_connected_at_start) {
if (autoreload_is_enabled()) { 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 { } else {
write_compressed(translate("Auto-reload is off.\n")); serial_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"));
} }
} }
print_safe_mode_message(safe_mode);
serial_write("\n"); 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()) { if (serial_connected_before_animation && !serial_connected()) {
serial_connected_at_start = false; serial_connected_at_start = false;
@ -394,6 +366,11 @@ int __attribute__((used)) main(void) {
init_status_leds(); init_status_leds();
rgb_led_status_init(); 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(); stack_init();
// Create a new filesystem only if we're not in a safe mode. // 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 (exit_code == PYEXEC_FORCED_EXIT) {
if (!first_run) { if (!first_run) {
write_compressed(translate("soft reboot\n")); serial_write_compressed(translate("soft reboot\n"));
} }
first_run = false; first_run = false;
skip_repl = run_code_py(safe_mode); skip_repl = run_code_py(safe_mode);
@ -455,12 +432,12 @@ void gc_collect(void) {
} }
void NORETURN nlr_jump_fail(void *val) { void NORETURN nlr_jump_fail(void *val) {
HardFault_Handler(); reset_into_safe_mode(MICROPY_NLR_JUMP_FAIL);
while (true) {} while (true) {}
} }
void NORETURN __fatal_error(const char *msg) { void NORETURN __fatal_error(const char *msg) {
HardFault_Handler(); reset_into_safe_mode(MICROPY_FATAL_ERROR);
while (true) {} while (true) {}
} }

View File

@ -78,6 +78,7 @@ endif
SRC_C = \ SRC_C = \
main.c \ main.c \
gccollect.c \ gccollect.c \
supervisor/stub/stack.c \
supervisor/shared/translate.c supervisor/shared/translate.c
# Add fmode when compiling with mingw gcc # Add fmode when compiling with mingw gcc

View File

@ -29,11 +29,15 @@
#include "tick.h" #include "tick.h"
#include "supervisor/usb.h" #include "supervisor/usb.h"
#include "py/runtime.h"
#include "shared-module/displayio/__init__.h" #include "shared-module/displayio/__init__.h"
#include "shared-module/network/__init__.h" #include "shared-module/network/__init__.h"
#include "supervisor/shared/stack.h"
volatile uint64_t last_finished_tick = 0; volatile uint64_t last_finished_tick = 0;
bool stack_ok_so_far = true;
void run_background_tasks(void) { void run_background_tasks(void) {
#if (defined(SAMD21) && defined(PIN_PA02)) || defined(SAMD51) #if (defined(SAMD21) && defined(PIN_PA02)) || defined(SAMD51)
audio_dma_background(); audio_dma_background();
@ -41,6 +45,7 @@ void run_background_tasks(void) {
#ifdef CIRCUITPY_DISPLAYIO #ifdef CIRCUITPY_DISPLAYIO
displayio_refresh_display(); displayio_refresh_display();
#endif #endif
#if MICROPY_PY_NETWORK #if MICROPY_PY_NETWORK
network_module_background(); network_module_background();
#endif #endif
@ -49,6 +54,12 @@ void run_background_tasks(void) {
last_finished_tick = ticks_ms; last_finished_tick = ticks_ms;
} }
void run_background_vm_tasks(void) {
assert_heap_ok();
run_background_tasks();
assert_heap_ok();
}
bool background_tasks_ok(void) { bool background_tasks_ok(void) {
return ticks_ms - last_finished_tick < 1000; return ticks_ms - last_finished_tick < 1000;
} }

View File

@ -30,6 +30,7 @@
#include <stdbool.h> #include <stdbool.h>
void run_background_tasks(void); void run_background_tasks(void);
void run_background_vm_tasks(void);
bool background_tasks_ok(void); bool background_tasks_ok(void);
#endif // MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H #endif // MICROPY_INCLUDED_ATMEL_SAMD_BACKGROUND_H

View File

@ -5,6 +5,8 @@
#define MICROPY_PORT_B (0) #define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0) #define MICROPY_PORT_C (0)
#define MICROPY_HW_LED_STATUS (&pin_PB23)
#define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define CIRCUITPY_INTERNAL_NVM_SIZE 0
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) #define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000)

View File

@ -1,7 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Arduino Zero" #define MICROPY_HW_BOARD_NAME "Arduino Zero"
#define MICROPY_HW_MCU_NAME "samd21g18" #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_TX &pin_PA27
#define MICROPY_HW_LED_RX &pin_PB03 #define MICROPY_HW_LED_RX &pin_PB03

View File

@ -1,6 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express" #define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express"
#define MICROPY_HW_MCU_NAME "samd21g18" #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. // Don't allow touch on A0 (PA02), because it's connected to the speaker.
#define PA02_NO_TOUCH (true) #define PA02_NO_TOUCH (true)

View File

@ -1,6 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express with Crickit libraries" #define MICROPY_HW_BOARD_NAME "Adafruit CircuitPlayground Express with Crickit libraries"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA17)
// No framebuf on CRICKit version to save space. // No framebuf on CRICKit version to save space.
#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_PY_FRAMEBUF (0)

View File

@ -1,5 +1,6 @@
// LEDs // 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_BOARD_NAME "Adafruit Feather M0 Adalogger"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"

View File

@ -1,5 +1,5 @@
// LEDs // 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_BOARD_NAME "Adafruit Feather M0 Basic"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"

View File

@ -1,6 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express" #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_NEOPIXEL (&pin_PA06) #define MICROPY_HW_NEOPIXEL (&pin_PA06)
#define SPI_FLASH_MOSI_PIN &pin_PA08 #define SPI_FLASH_MOSI_PIN &pin_PA08

View File

@ -1,6 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express with Crickit libraries" #define MICROPY_HW_BOARD_NAME "Adafruit Feather M0 Express with Crickit libraries"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_NEOPIXEL (&pin_PA06) #define MICROPY_HW_NEOPIXEL (&pin_PA06)
#define SPI_FLASH_MOSI_PIN &pin_PA08 #define SPI_FLASH_MOSI_PIN &pin_PA08

View File

@ -1,5 +1,5 @@
// LEDs // 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_BOARD_NAME "Adafruit Feather M0 RFM69"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"

View File

@ -1,5 +1,5 @@
// LEDs // 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_BOARD_NAME "Adafruit Feather M0 RFM9x"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"

View File

@ -3,6 +3,8 @@
#define MICROPY_HW_BOARD_NAME "Hacked Feather M0 Express with 8Mbyte SPI flash" #define MICROPY_HW_BOARD_NAME "Hacked Feather M0 Express with 8Mbyte SPI flash"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_NEOPIXEL (&pin_PA06) #define MICROPY_HW_NEOPIXEL (&pin_PA06)
#define SPI_FLASH_MOSI_PIN &pin_PA08 #define SPI_FLASH_MOSI_PIN &pin_PA08

View File

@ -5,6 +5,7 @@
// Rev E // Rev E
#define MICROPY_HW_LED_STATUS (&pin_PA23)
#define MICROPY_HW_NEOPIXEL (&pin_PB03) #define MICROPY_HW_NEOPIXEL (&pin_PB03)
// These are pins not to reset. // These are pins not to reset.

View File

@ -1,6 +1,7 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Feather RadioFruit Zigbee" #define MICROPY_HW_BOARD_NAME "Adafruit Feather RadioFruit Zigbee"
#define MICROPY_HW_MCU_NAME "samr21g18" #define MICROPY_HW_MCU_NAME "samr21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA27)
#define MICROPY_HW_NEOPIXEL (&pin_PA22) #define MICROPY_HW_NEOPIXEL (&pin_PA22)
#define SPI_FLASH_MOSI_PIN &pin_PA31 #define SPI_FLASH_MOSI_PIN &pin_PA31

View File

@ -1,6 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Gemma M0" #define MICROPY_HW_BOARD_NAME "Adafruit Gemma M0"
#define MICROPY_HW_MCU_NAME "samd21e18" #define MICROPY_HW_MCU_NAME "samd21e18"
#define MICROPY_HW_LED_STATUS (&pin_PA23)
#define MICROPY_HW_APA102_MOSI (&pin_PA00) #define MICROPY_HW_APA102_MOSI (&pin_PA00)
#define MICROPY_HW_APA102_SCK (&pin_PA01) #define MICROPY_HW_APA102_SCK (&pin_PA01)

View File

@ -5,6 +5,8 @@
// This is for Rev B which is green and has the SD card slot at the edge of the board. // 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_TX &(pin_PC30)
#define MICROPY_HW_LED_RX &(pin_PC31) #define MICROPY_HW_LED_RX &(pin_PC31)

View File

@ -1,6 +1,7 @@
#define MICROPY_HW_BOARD_NAME "HalloWing M0 Express" #define MICROPY_HW_BOARD_NAME "HalloWing M0 Express"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA23)
#define MICROPY_HW_NEOPIXEL (&pin_PA12) #define MICROPY_HW_NEOPIXEL (&pin_PA12)
#define SPI_FLASH_MOSI_PIN &pin_PB10 #define SPI_FLASH_MOSI_PIN &pin_PB10

View File

@ -1,6 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Adafruit ItsyBitsy M0 Express" #define MICROPY_HW_BOARD_NAME "Adafruit ItsyBitsy M0 Express"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define CIRCUITPY_BITBANG_APA102 #define CIRCUITPY_BITBANG_APA102
#define MICROPY_HW_APA102_MOSI (&pin_PA01) #define MICROPY_HW_APA102_MOSI (&pin_PA01)
#define MICROPY_HW_APA102_SCK (&pin_PA00) #define MICROPY_HW_APA102_SCK (&pin_PA00)

View File

@ -4,6 +4,8 @@
#define CIRCUITPY_MCU_FAMILY samd51 #define CIRCUITPY_MCU_FAMILY samd51
// This is for Rev B // This is for Rev B
#define MICROPY_HW_LED_STATUS (&pin_PA22)
#define MICROPY_HW_APA102_MOSI (&pin_PB03) #define MICROPY_HW_APA102_MOSI (&pin_PB03)
#define MICROPY_HW_APA102_SCK (&pin_PB02) #define MICROPY_HW_APA102_SCK (&pin_PB02)

View File

@ -1,6 +1,8 @@
#define MICROPY_HW_BOARD_NAME "Meow Meow" #define MICROPY_HW_BOARD_NAME "Meow Meow"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PB23)
// These are pins not to reset. // These are pins not to reset.
#define MICROPY_PORT_A (0) #define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0) #define MICROPY_PORT_B (0)

View File

@ -1,6 +1,7 @@
#define MICROPY_HW_BOARD_NAME "Adafruit Metro M0 Express" #define MICROPY_HW_BOARD_NAME "Adafruit Metro M0 Express"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_LED_TX &pin_PA27 #define MICROPY_HW_LED_TX &pin_PA27
// Comment this out if you have trouble connecting over SWD. It's one of the SWD pins. // Comment this out if you have trouble connecting over SWD. It's one of the SWD pins.
#define MICROPY_HW_LED_RX &pin_PA31 #define MICROPY_HW_LED_RX &pin_PA31

View File

@ -8,6 +8,8 @@
#define MICROPY_HW_LED_TX (&pin_PA27) #define MICROPY_HW_LED_TX (&pin_PA27)
#define MICROPY_HW_LED_RX (&pin_PB06) #define MICROPY_HW_LED_RX (&pin_PB06)
#define MICROPY_HW_LED_STATUS (&pin_PA16)
#define MICROPY_HW_NEOPIXEL (&pin_PB22) #define MICROPY_HW_NEOPIXEL (&pin_PB22)
// These are pins not to reset. // These are pins not to reset.

View File

@ -3,6 +3,8 @@
#define CIRCUITPY_MCU_FAMILY samd51 #define CIRCUITPY_MCU_FAMILY samd51
#define MICROPY_HW_LED_STATUS (&pin_PA15)
// RGB Status LED Pins // RGB Status LED Pins
#define MICROPY_HW_APA102_MOSI (&pin_PB03) #define MICROPY_HW_APA102_MOSI (&pin_PB03)
#define MICROPY_HW_APA102_SCK (&pin_PB02) #define MICROPY_HW_APA102_SCK (&pin_PB02)

View File

@ -2,6 +2,8 @@
#define MICROPY_HW_MCU_NAME "samd21e18" #define MICROPY_HW_MCU_NAME "samd21e18"
// Rev B - Black // Rev B - Black
#define MICROPY_HW_LED_STATUS (&pin_PA10)
#define MICROPY_HW_APA102_MOSI (&pin_PA00) #define MICROPY_HW_APA102_MOSI (&pin_PA00)
#define MICROPY_HW_APA102_SCK (&pin_PA01) #define MICROPY_HW_APA102_SCK (&pin_PA01)

View File

@ -2,6 +2,7 @@
#define MICROPY_HW_MCU_NAME "samd21e18" #define MICROPY_HW_MCU_NAME "samd21e18"
// Rev B - Black // Rev B - Black
#define MICROPY_HW_LED_STATUS (&pin_PA10)
// #define MICROPY_HW_APA102_MOSI (&pin_PA00) // #define MICROPY_HW_APA102_MOSI (&pin_PA00)
// #define MICROPY_HW_APA102_SCK (&pin_PA01) // #define MICROPY_HW_APA102_SCK (&pin_PA01)

View File

@ -28,6 +28,8 @@
#include "hal_flash.h" #include "hal_flash.h"
#include "supervisor/shared/stack.h"
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
@ -42,6 +44,7 @@ bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self,
struct flash_descriptor desc; struct flash_descriptor desc;
desc.dev.hw = NVMCTRL; desc.dev.hw = NVMCTRL;
flash_write(&desc, (uint32_t) self->start_address + start_index, values, len); flash_write(&desc, (uint32_t) self->start_address + start_index, values, len);
assert_heap_ok();
return true; return true;
} }

View File

@ -182,7 +182,7 @@ typedef long mp_off_t;
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51" #define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
#define PORT_HEAP_SIZE (0x20000) // 128KiB #define PORT_HEAP_SIZE (0x20000) // 128KiB
#define SPI_FLASH_MAX_BAUDRATE 24000000 #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_CPYTHON_COMPAT (1)
#define MICROPY_MODULE_WEAK_LINKS (1) #define MICROPY_MODULE_WEAK_LINKS (1)
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (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 #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 "peripherals/samd/dma.h"
#include "supervisor/flash_root_pointers.h" #include "supervisor/flash_root_pointers.h"
@ -454,6 +450,11 @@ void run_background_tasks(void);
mp_obj_t gamepad_singleton; \ mp_obj_t gamepad_singleton; \
NETWORK_ROOT_POINTERS \ NETWORK_ROOT_POINTERS \
void run_background_tasks(void);
void run_background_vm_tasks(void);
#define MICROPY_VM_HOOK_LOOP run_background_vm_tasks();
#define MICROPY_VM_HOOK_RETURN run_background_vm_tasks();
#define CIRCUITPY_SUPERVISOR_BACKGROUND run_background_tasks();
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 #define CIRCUITPY_AUTORELOAD_DELAY_MS 500
#define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt" #define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt"

View File

@ -64,6 +64,9 @@
#include "reset.h" #include "reset.h"
#include "tick.h" #include "tick.h"
#include "supervisor/shared/safe_mode.h"
#include "supervisor/shared/stack.h"
#include "tusb.h" #include "tusb.h"
#ifdef CIRCUITPY_GAMEPAD_TICKS #ifdef CIRCUITPY_GAMEPAD_TICKS
@ -80,7 +83,7 @@ extern volatile bool mp_msc_enabled;
#define TRACE_BUFFER_SIZE (1 << (TRACE_BUFFER_MAGNITUDE_PACKETS + 1)) #define TRACE_BUFFER_SIZE (1 << (TRACE_BUFFER_MAGNITUDE_PACKETS + 1))
// Size in bytes. 4 bytes per uint32_t. // Size in bytes. 4 bytes per uint32_t.
#define TRACE_BUFFER_SIZE_BYTES (TRACE_BUFFER_SIZE << 2) #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 #endif
safe_mode_t port_init(void) { safe_mode_t port_init(void) {
@ -153,35 +156,6 @@ safe_mode_t port_init(void) {
samd_peripherals_enable_cache(); samd_peripherals_enable_cache();
#endif #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 #ifdef SAMD21
hri_nvmctrl_set_CTRLB_RWS_bf(NVMCTRL, 2); hri_nvmctrl_set_CTRLB_RWS_bf(NVMCTRL, 2);
_pm_init(); _pm_init();
@ -200,13 +174,6 @@ safe_mode_t port_init(void) {
// Init the board last so everything else is ready // Init the board last so everything else is ready
board_init(); 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 #ifdef SAMD21
if (PM->RCAUSE.bit.BOD33 == 1 || PM->RCAUSE.bit.BOD12 == 1) { if (PM->RCAUSE.bit.BOD33 == 1 || PM->RCAUSE.bit.BOD12 == 1) {
return BROWNOUT; return BROWNOUT;
@ -280,15 +247,33 @@ void reset_to_bootloader(void) {
reset(); 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. * \brief Default interrupt handler for unused IRQs.
*/ */
__attribute__((used)) void HardFault_Handler(void) __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) { while (true) {
asm(""); asm("nop;");
}
for (uint32_t i = 0; i < 100000; i++) {
asm("noop;");
} }
} }

View File

@ -97,6 +97,7 @@ SRC_C = \
posix_helpers.c \ posix_helpers.c \
hspi.c \ hspi.c \
boards/$(BOARD)/pins.c \ boards/$(BOARD)/pins.c \
supervisor/stub/stack.c \
supervisor/shared/translate.c \ supervisor/shared/translate.c \
$(SRC_MOD) $(SRC_MOD)

View File

@ -28,6 +28,8 @@
#define MICROPY_HW_MCU_NAME "nRF52832" #define MICROPY_HW_MCU_NAME "nRF52832"
#define MICROPY_PY_SYS_PLATFORM "nRF52" #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_RX NRF_GPIO_PIN_MAP(0, 8)
#define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6) #define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6)

View File

@ -35,6 +35,8 @@
#define MICROPY_HW_NEOPIXEL (&pin_P0_16) #define MICROPY_HW_NEOPIXEL (&pin_P0_16)
#define MICROPY_HW_LED_STATUS (&pin_P1_15)
#ifdef QSPI_FLASH_FILESYSTEM #ifdef QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 17) #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 17)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22) #define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22)

View File

@ -33,6 +33,8 @@
#define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "Particle Argon" #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_RED (&pin_P0_13)
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) #define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) #define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)

View File

@ -33,6 +33,8 @@
#define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "Particle Boron" #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_RED (&pin_P0_13)
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) #define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) #define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)

View File

@ -33,6 +33,8 @@
#define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "Particle Xenon" #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_RED (&pin_P0_13)
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) #define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) #define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)

View File

@ -29,6 +29,8 @@
#define MICROPY_HW_MCU_NAME "nRF52832" #define MICROPY_HW_MCU_NAME "nRF52832"
#define MICROPY_PY_SYS_PLATFORM "nRF52-DK" #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_RX NRF_GPIO_PIN_MAP(0, 8)
#define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6) #define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6)
#define MICROPY_HW_UART_HWFC (0) #define MICROPY_HW_UART_HWFC (0)

View File

@ -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_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_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_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_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_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_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_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_22), MP_ROM_PTR(&pin_P0_22) },
{ MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) }, { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) },

View File

@ -33,6 +33,8 @@
#define PORT_HEAP_SIZE (128 * 1024) #define PORT_HEAP_SIZE (128 * 1024)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 #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_SCL (&pin_P0_27)
#define DEFAULT_I2C_BUS_SDA (&pin_P0_26) #define DEFAULT_I2C_BUS_SDA (&pin_P0_26)

View File

@ -28,5 +28,7 @@
#define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_HW_MCU_NAME "nRF52840"
#define MICROPY_PY_SYS_PLATFORM "nRF52840-DK" #define MICROPY_PY_SYS_PLATFORM "nRF52840-DK"
#define MICROPY_HW_LED_STATUS (&pin_P0_06)
#define PORT_HEAP_SIZE (128 * 1024) #define PORT_HEAP_SIZE (128 * 1024)
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 #define CIRCUITPY_AUTORELOAD_DELAY_MS 500

View File

@ -28,6 +28,8 @@
#include "shared-bindings/neopixel_write/__init__.h" #include "shared-bindings/neopixel_write/__init__.h"
#include "nrf_pwm.h" #include "nrf_pwm.h"
#include "tick.h"
// https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.cpp // https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.cpp
// [[[Begin of the Neopixel NRF52 EasyDMA implementation // [[[Begin of the Neopixel NRF52 EasyDMA implementation
// by the Hackerspace San Salvador]]] // by the Hackerspace San Salvador]]]
@ -95,6 +97,9 @@ static NRF_PWM_Type* find_free_pwm (void) {
return NULL; 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) { 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 // To support both the SoftDevice + Neopixels we use the EasyDMA
// feature from the NRF25. However this technique implies to // 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 // only malloc if there is PWM device available
if ( pwm != NULL ) { if ( pwm != NULL ) {
if (numBytes == 4) { if (pattern_size <= sizeof(one_pixel) * sizeof(uint32_t)) {
pixels_pattern = (uint16_t *) one_pixel; pixels_pattern = (uint16_t *) one_pixel;
} else { } else {
pixels_pattern = (uint16_t *) m_malloc_maybe(pattern_size, false); 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 // Use the identified device to choose the implementation
// If a PWM device is available use DMA // If a PWM device is available use DMA
if ( (pixels_pattern != NULL) && (pwm != NULL) ) { 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 // 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 wave mode to count UP
// Set the PWM to use the 16MHz clock // 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 interrupts again
__enable_irq(); __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;
}
} }

View File

@ -32,4 +32,7 @@ void nrf_peripherals_clocks_init(void) {
// generalized. // generalized.
NRF_CLOCK->LFCLKSRC = (uint32_t)((CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk); NRF_CLOCK->LFCLKSRC = (uint32_t)((CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) & CLOCK_LFCLKSRC_SRC_Msk);
NRF_CLOCK->TASKS_LFCLKSTART = 1UL; NRF_CLOCK->TASKS_LFCLKSTART = 1UL;
// Wait for clocks to start.
while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) {}
} }

View File

@ -28,6 +28,9 @@
#include "supervisor/port.h" #include "supervisor/port.h"
#include "boards/board.h" #include "boards/board.h"
#include "nrfx/hal/nrf_power.h"
#include "nrfx/drivers/include/nrfx_power.h"
#include "nrf/cache.h" #include "nrf/cache.h"
#include "nrf/clocks.h" #include "nrf/clocks.h"
#include "nrf/power.h" #include "nrf/power.h"
@ -41,37 +44,34 @@
#include "common-hal/pulseio/PulseOut.h" #include "common-hal/pulseio/PulseOut.h"
#include "tick.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(); nrf_peripherals_clocks_init();
// If GPIO voltage is set wrong in UICR, this will fix it, and // If GPIO voltage is set wrong in UICR, this will fix it, and
// will also do a reset to make the change take effect. // will also do a reset to make the change take effect.
nrf_peripherals_power_init(); 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(); nrf_peripherals_enable_cache();
// Configure millisecond timer initialization. // Configure millisecond timer initialization.
tick_init(); 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. // Will do usb_init() if chip supports USB.
board_init(); board_init();
#if 0
if (board_requests_safe_mode()) {
return USER_SAFE_MODE;
}
#endif
return NO_SAFE_MODE; return NO_SAFE_MODE;
} }
@ -93,13 +93,26 @@ void reset_to_bootloader(void) {
enum { DFU_MAGIC_SERIAL = 0x4e }; enum { DFU_MAGIC_SERIAL = 0x4e };
NRF_POWER->GPREGRET = DFU_MAGIC_SERIAL; NRF_POWER->GPREGRET = DFU_MAGIC_SERIAL;
reset_cpu();
}
void reset_cpu(void) {
NVIC_SystemReset(); 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;
}
void HardFault_Handler(void) uint32_t port_get_saved_word(void) {
{ return _ebss;
}
void HardFault_Handler(void) {
reset_into_safe_mode(HARD_CRASH);
while (true) { while (true) {
asm(""); asm("nop;");
} }
} }

View File

@ -149,6 +149,8 @@ SRC_C = \
alloc.c \ alloc.c \
coverage.c \ coverage.c \
fatfs_port.c \ fatfs_port.c \
supervisor/stub/serial.c \
supervisor/stub/stack.c \
supervisor/shared/translate.c \ supervisor/shared/translate.c \
$(SRC_MOD) $(SRC_MOD)

View File

@ -33,10 +33,12 @@
#include "py/objtype.h" #include "py/objtype.h"
#include "py/objint.h" #include "py/objint.h"
#include "py/objstr.h" #include "py/objstr.h"
#include "py/qstr.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "py/stackctrl.h" #include "py/stackctrl.h"
#include "py/stream.h" // for mp_obj_print #include "py/stream.h" // for mp_obj_print
#include "supervisor/shared/stack.h"
#include "supervisor/shared/translate.h" #include "supervisor/shared/translate.h"
mp_obj_type_t *mp_obj_get_type(mp_const_obj_t o_in) { 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 // helper function to print an exception with traceback
void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { 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; size_t n, *values;
mp_obj_exception_get_traceback(exc, &n, &values); mp_obj_exception_get_traceback(exc, &n, &values);
if (n > 0) { 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); mp_obj_type_t *type = mp_obj_get_type(base);
if (type->subscr != NULL) { if (type->subscr != NULL) {
mp_obj_t ret = type->subscr(base, index, value); 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) { if (ret != MP_OBJ_NULL) {
return ret; return ret;
} }

View File

@ -33,12 +33,7 @@
#error "Please define PORT_HEAP_SIZE to specify heap size in bytes." #error "Please define PORT_HEAP_SIZE to specify heap size in bytes."
#endif #endif
typedef enum { #include "supervisor/shared/safe_mode.h"
NO_SAFE_MODE = 0,
BROWNOUT,
HARD_CRASH,
USER_SAFE_MODE,
} safe_mode_t;
// Provided by the linker; // Provided by the linker;
extern uint32_t _ezero; extern uint32_t _ezero;
@ -51,7 +46,10 @@ extern uint32_t _ebss;
safe_mode_t port_init(void); 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); void reset_port(void);
// Reset the rest of the board. // Reset the rest of the board.
@ -60,8 +58,8 @@ void reset_board(void);
// Reset to the bootloader // Reset to the bootloader
void reset_to_bootloader(void); void reset_to_bootloader(void);
#ifdef NRF52_SERIES // Save and retrieve a word from memory that is preserved over reset. Used for safe mode.
void HardFault_Handler(void); void port_set_saved_word(uint32_t);
#endif uint32_t port_get_saved_word(void);
#endif // MICROPY_INCLUDED_SUPERVISOR_PORT_H #endif // MICROPY_INCLUDED_SUPERVISOR_PORT_H

View File

@ -36,6 +36,8 @@
#include "py/mpconfig.h" #include "py/mpconfig.h"
#include "rgb_led_colors.h" #include "rgb_led_colors.h"
#include "supervisor/shared/safe_mode.h"
// Overall, the time module must be implemented. // Overall, the time module must be implemented.
// To work with a DotStar, one must have MICROPY_HW_APA102_SCK and // 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. // MICROPY_HW_APA102_MOSI defined and bitbangio.SPI or busio.SPI implemented.

View File

@ -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"));
}
}
}

View File

@ -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

View File

@ -27,7 +27,9 @@
#include "stack.h" #include "stack.h"
#include "py/mpconfig.h" #include "py/mpconfig.h"
#include "py/runtime.h"
#include "supervisor/cpu.h" #include "supervisor/cpu.h"
#include "supervisor/shared/safe_mode.h"
extern uint32_t _estack; extern uint32_t _estack;
@ -50,6 +52,17 @@ void allocate_stack(void) {
} else { } else {
current_stack_size = next_stack_size; current_stack_size = next_stack_size;
} }
*stack_alloc->ptr = STACK_CANARY_VALUE;
}
inline bool stack_ok(void) {
return *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) { void stack_init(void) {
@ -58,6 +71,7 @@ void stack_init(void) {
void stack_resize(void) { void stack_resize(void) {
if (next_stack_size == current_stack_size) { if (next_stack_size == current_stack_size) {
*stack_alloc->ptr = STACK_CANARY_VALUE;
return; return;
} }
free_memory(stack_alloc); free_memory(stack_alloc);

View File

@ -37,5 +37,12 @@ void stack_init(void);
void stack_resize(void); void stack_resize(void);
void set_next_stack_size(uint32_t size); void set_next_stack_size(uint32_t size);
uint32_t get_current_stack_size(void); 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 #endif // MICROPY_INCLUDED_SUPERVISOR_STACK_H

View File

@ -34,6 +34,14 @@
#include "genhdr/compression.generated.h" #include "genhdr/compression.generated.h"
#endif #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) { char* decompress(const compressed_string_t* compressed, char* decompressed) {
uint8_t this_byte = 0; uint8_t this_byte = 0;
uint8_t this_bit = 7; uint8_t this_bit = 7;

View File

@ -35,7 +35,7 @@ typedef struct {
} compressed_string_t; } compressed_string_t;
const compressed_string_t* translate(const char* c); 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); char* decompress(const compressed_string_t* compressed, char* decompressed);
#endif // MICROPY_INCLUDED_SUPERVISOR_TRANSLATE_H #endif // MICROPY_INCLUDED_SUPERVISOR_TRANSLATE_H

View File

@ -43,4 +43,5 @@ bool serial_bytes_available(void) {
} }
void serial_write(const char* text) { void serial_write(const char* text) {
(void) text;
} }

48
supervisor/stub/stack.c Normal file
View File

@ -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;
}

View File

@ -6,6 +6,7 @@ SRC_SUPERVISOR = \
supervisor/shared/flash.c \ supervisor/shared/flash.c \
supervisor/shared/micropython.c \ supervisor/shared/micropython.c \
supervisor/shared/rgb_led_status.c \ supervisor/shared/rgb_led_status.c \
supervisor/shared/safe_mode.c \
supervisor/shared/stack.c \ supervisor/shared/stack.c \
supervisor/shared/status_leds.c \ supervisor/shared/status_leds.c \
supervisor/shared/translate.c supervisor/shared/translate.c