summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--locale/fr.po14
-rw-r--r--locale/sv.po2
-rw-r--r--ports/cxd56/supervisor/port.c15
-rw-r--r--shared-bindings/storage/__init__.c97
-rw-r--r--supervisor/shared/external_flash/devices.h18
-rw-r--r--tools/build_board_info.py2
7 files changed, 100 insertions, 67 deletions
diff --git a/Makefile b/Makefile
index f6146bfe4..55f64b17d 100644
--- a/Makefile
+++ b/Makefile
@@ -202,12 +202,25 @@ pseudoxml:
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
# phony target so we always run
+.PHONY: all-source
all-source:
locale/circuitpython.pot: all-source
find $(TRANSLATE_SOURCES) -iname "*.c" -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
+# Historically, `make translate` updated the .pot file and ran msgmerge.
+# However, this was a frequent source of merge conflicts. Weblate can perform
+# msgmerge, so make translate merely update the translation template file.
+.PHONY: translate
translate: locale/circuitpython.pot
+
+# Note that normally we rely on weblate to perform msgmerge. This reduces the
+# chance of a merge conflict between developer changes (that only add and
+# remove source strings) and weblate changes (that only add and remove
+# translated strings from po files). However, in case this is legitimately
+# needed we preserve a rule to do it.
+.PHONY: msgmerge
+msgmerge:
for po in $(shell ls locale/*.po); do msgmerge -U $$po -s --no-fuzzy-matching --add-location=file locale/circuitpython.pot; done
merge-translate:
@@ -216,8 +229,10 @@ merge-translate:
git checkout --theirs -- locale/*
make translate
-check-translate: locale/circuitpython.pot $(wildcard locale/*.po)
- $(PYTHON) tools/check_translations.py $^
+.PHONY: check-translate
+check-translate:
+ find $(TRANSLATE_SOURCES) -iname "*.c" -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot.tmp -p locale
+ $(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status
stubs:
@mkdir -p circuitpython-stubs
diff --git a/locale/fr.po b/locale/fr.po
index 82208da6a..1dcf5f004 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-06-01 08:56-0500\n"
-"PO-Revision-Date: 2020-05-26 19:37+0000\n"
-"Last-Translator: Jeff Epler <jepler@gmail.com>\n"
+"POT-Creation-Date: 2020-05-27 20:51-0500\n"
+"PO-Revision-Date: 2020-06-01 13:17+0000\n"
+"Last-Translator: David Glaude <david.glaude@gmail.com>\n"
"Language-Team: French <https://later.unpythonic.net/projects/circuitpython/"
"circuitpython-master/fr/>\n"
"Language: fr\n"
@@ -190,12 +190,12 @@ msgstr "l'objet '%s' n'est pas un itérateur"
#: py/objtype.c py/runtime.c
#, c-format
msgid "'%s' object is not callable"
-msgstr "objet '%s' n'est pas appelable"
+msgstr "l'objet '%s' n'est pas appelable"
#: py/runtime.c
#, c-format
msgid "'%s' object is not iterable"
-msgstr "objet '%s' n'est pas itérable"
+msgstr "l'objet '%s' n'est pas itérable"
#: py/obj.c
#, c-format
@@ -388,7 +388,7 @@ msgstr "La profondeur de bit doit être un multiple de 8."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Both RX and TX required for flow control"
-msgstr ""
+msgstr "RX et TX requis pour le contrôle de flux"
#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c
msgid "Both pins must support hardware interrupts"
@@ -1282,7 +1282,7 @@ msgstr "La broche ne peut être utilisée pour l'ADC"
#: shared-bindings/digitalio/DigitalInOut.c
msgid "Pin is input only"
-msgstr ""
+msgstr "La broche est entrée uniquement"
#: ports/atmel-samd/common-hal/countio/Counter.c
msgid "Pin must support hardware interrupts"
diff --git a/locale/sv.po b/locale/sv.po
index 768ec21bf..1f41b3fec 100644
--- a/locale/sv.po
+++ b/locale/sv.po
@@ -3196,7 +3196,7 @@ msgstr "oväntat nyckelordsargument '%q'"
#: py/lexer.c
msgid "unicode name escapes"
-msgstr "unicode name escapes"
+msgstr "unicode-namn flyr"
#: py/parse.c
msgid "unindent does not match any outer indentation level"
diff --git a/ports/cxd56/supervisor/port.c b/ports/cxd56/supervisor/port.c
index 9ec9dbfdf..a7e9c30a3 100644
--- a/ports/cxd56/supervisor/port.c
+++ b/ports/cxd56/supervisor/port.c
@@ -29,6 +29,8 @@
#include <sys/boardctl.h>
#include <sys/time.h>
+#include <cxd56_rtc.h>
+
#include "sched/sched.h"
#include "boards/board.h"
@@ -45,7 +47,8 @@
safe_mode_t port_init(void) {
boardctl(BOARDIOC_INIT, 0);
- board_init();
+ // Wait until RTC is available
+ while (g_rtc_enabled == false);
if (board_requests_safe_mode()) {
return USER_SAFE_MODE;
@@ -121,14 +124,10 @@ void board_timerhook(void)
}
uint64_t port_get_raw_ticks(uint8_t* subticks) {
- struct timeval tv;
- gettimeofday(&tv, NULL);
- long computed_subticks = tv.tv_usec * 1024 * 32 / 1000000;
- if (subticks != NULL) {
- *subticks = computed_subticks % 32;
- }
+ uint64_t count = cxd56_rtc_count();
+ *subticks = count % 32;
- return tv.tv_sec * 1024 + computed_subticks / 32;
+ return count / 32;
}
// Enable 1/1024 second tick.
diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c
index 8ac08d8c9..3abc5512c 100644
--- a/shared-bindings/storage/__init__.c
+++ b/shared-bindings/storage/__init__.c
@@ -167,54 +167,55 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_getmount), MP_ROM_PTR(&storage_getmount_obj) },
{ MP_ROM_QSTR(MP_QSTR_erase_filesystem), MP_ROM_PTR(&storage_erase_filesystem_obj) },
- //| class VfsFat:
- //| def __init__(self, block_device: Any): ...
- //| """Create a new VfsFat filesystem around the given block device.
- //|
- //| :param block_device: Block device the the filesystem lives on"""
- //|
- //| label: Any = ...
- //| """The filesystem label, up to 11 case-insensitive bytes. Note that
- //| this property can only be set when the device is writable by the
- //| microcontroller."""
- //|
- //| def mkfs(self, ) -> Any:
- //| """Format the block device, deleting any data that may have been there"""
- //| ...
- //|
- //| def open(self, path: Any, mode: Any) -> Any:
- //| """Like builtin ``open()``"""
- //| ...
- //|
- //| def ilistdir(self, path: Any) -> Any:
- //| """Return an iterator whose values describe files and folders within
- //| ``path``"""
- //| ...
- //|
- //| def mkdir(self, path: Any) -> Any:
- //| """Like `os.mkdir`"""
- //| ...
- //|
- //| def rmdir(self, path: Any) -> Any:
- //| """Like `os.rmdir`"""
- //| ...
- //|
- //| def stat(self, path: Any) -> Any:
- //| """Like `os.stat`"""
- //| ...
- //|
- //| def statvfs(self, path: Any) -> Any:
- //| """Like `os.statvfs`"""
- //| ...
- //|
- //| def mount(self, readonly: Any, mkfs: Any) -> Any:
- //| """Don't call this directly, call `storage.mount`."""
- //| ...
- //|
- //| def umount(self, ) -> Any:
- //| """Don't call this directly, call `storage.umount`."""
- //| ...
- //|
+//| class VfsFat:
+//| def __init__(self, block_device: Any):
+//| """Create a new VfsFat filesystem around the given block device.
+//|
+//| :param block_device: Block device the the filesystem lives on"""
+//|
+//| label: Any = ...
+//| """The filesystem label, up to 11 case-insensitive bytes. Note that
+//| this property can only be set when the device is writable by the
+//| microcontroller."""
+//| ...
+//|
+//| def mkfs(self) -> Any:
+//| """Format the block device, deleting any data that may have been there"""
+//| ...
+//|
+//| def open(self, path: Any, mode: Any) -> Any:
+//| """Like builtin ``open()``"""
+//| ...
+//|
+//| def ilistdir(self, path: Any) -> Any:
+//| """Return an iterator whose values describe files and folders within
+//| ``path``"""
+//| ...
+//|
+//| def mkdir(self, path: Any) -> Any:
+//| """Like `os.mkdir`"""
+//| ...
+//|
+//| def rmdir(self, path: Any) -> Any:
+//| """Like `os.rmdir`"""
+//| ...
+//|
+//| def stat(self, path: Any) -> Any:
+//| """Like `os.stat`"""
+//| ...
+//|
+//| def statvfs(self, path: Any) -> Any:
+//| """Like `os.statvfs`"""
+//| ...
+//|
+//| def mount(self, readonly: Any, mkfs: Any) -> Any:
+//| """Don't call this directly, call `storage.mount`."""
+//| ...
+//|
+//| def umount(self) -> Any:
+//| """Don't call this directly, call `storage.umount`."""
+//| ...
+//|
{ MP_ROM_QSTR(MP_QSTR_VfsFat), MP_ROM_PTR(&mp_fat_vfs_type) },
};
diff --git a/supervisor/shared/external_flash/devices.h b/supervisor/shared/external_flash/devices.h
index f99fad4e7..466ab49eb 100644
--- a/supervisor/shared/external_flash/devices.h
+++ b/supervisor/shared/external_flash/devices.h
@@ -187,6 +187,24 @@ typedef struct {
.single_status_byte = false, \
}
+// Settings for the Gigadevice GD25S512MD 64MiB SPI flash.
+// Datasheet: http://www.gigadevice.com/datasheet/gd25s512md/
+#define GD25S512MD {\
+ .total_size = (1 << 26), /* 64 MiB */ \
+ .start_up_time_us = 5000, \
+ .manufacturer_id = 0xc8, \
+ .memory_type = 0x40, \
+ .capacity = 0x19, \
+ .max_clock_speed_mhz = 104, /* if we need 120 then we can turn on high performance mode */ \
+ .quad_enable_bit_mask = 0x02, \
+ .has_sector_protection = false, \
+ .supports_fast_read = true, \
+ .supports_qspi = true, \
+ .supports_qspi_writes = true, \
+ .write_status_register_split = true, \
+ .single_status_byte = false, \
+}
+
// Settings for the Cypress (was Spansion) S25FL064L 8MiB SPI flash.
// Datasheet: http://www.cypress.com/file/316661/download
#define S25FL064L {\
diff --git a/tools/build_board_info.py b/tools/build_board_info.py
index 7eed2c70c..443302330 100644
--- a/tools/build_board_info.py
+++ b/tools/build_board_info.py
@@ -53,7 +53,7 @@ extension_by_board = {
# nRF52840 dev kits that may not have UF2 bootloaders,
"makerdiary_nrf52840_mdk": HEX,
- "makerdiary_nrf52840_mdk_usb_dongle": HEX,
+ "makerdiary_nrf52840_mdk_usb_dongle": HEX_UF2,
"pca10056": BIN_UF2,
"pca10059": BIN_UF2,
"electronut_labs_blip": HEX