Skip to content

Commit a170c5e

Browse files
authored
Merge branch 'master' into update-ulab
2 parents 7f3fd20 + bdbb16e commit a170c5e

File tree

7 files changed

+100
-67
lines changed

7 files changed

+100
-67
lines changed

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,25 @@ pseudoxml:
202202
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
203203

204204
# phony target so we always run
205+
.PHONY: all-source
205206
all-source:
206207

207208
locale/circuitpython.pot: all-source
208209
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
209210

211+
# Historically, `make translate` updated the .pot file and ran msgmerge.
212+
# However, this was a frequent source of merge conflicts. Weblate can perform
213+
# msgmerge, so make translate merely update the translation template file.
214+
.PHONY: translate
210215
translate: locale/circuitpython.pot
216+
217+
# Note that normally we rely on weblate to perform msgmerge. This reduces the
218+
# chance of a merge conflict between developer changes (that only add and
219+
# remove source strings) and weblate changes (that only add and remove
220+
# translated strings from po files). However, in case this is legitimately
221+
# needed we preserve a rule to do it.
222+
.PHONY: msgmerge
223+
msgmerge:
211224
for po in $(shell ls locale/*.po); do msgmerge -U $$po -s --no-fuzzy-matching --add-location=file locale/circuitpython.pot; done
212225

213226
merge-translate:
@@ -216,8 +229,10 @@ merge-translate:
216229
git checkout --theirs -- locale/*
217230
make translate
218231

219-
check-translate: locale/circuitpython.pot $(wildcard locale/*.po)
220-
$(PYTHON) tools/check_translations.py $^
232+
.PHONY: check-translate
233+
check-translate:
234+
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
235+
$(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status
221236

222237
stubs:
223238
@mkdir -p circuitpython-stubs

locale/fr.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: 0.1\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-06-01 08:56-0500\n"
12-
"PO-Revision-Date: 2020-05-26 19:37+0000\n"
13-
"Last-Translator: Jeff Epler <jepler@gmail.com>\n"
11+
"POT-Creation-Date: 2020-05-27 20:51-0500\n"
12+
"PO-Revision-Date: 2020-06-01 13:17+0000\n"
13+
"Last-Translator: David Glaude <david.glaude@gmail.com>\n"
1414
"Language-Team: French <https://later.unpythonic.net/projects/circuitpython/"
1515
"circuitpython-master/fr/>\n"
1616
"Language: fr\n"
@@ -190,12 +190,12 @@ msgstr "l'objet '%s' n'est pas un itérateur"
190190
#: py/objtype.c py/runtime.c
191191
#, c-format
192192
msgid "'%s' object is not callable"
193-
msgstr "objet '%s' n'est pas appelable"
193+
msgstr "l'objet '%s' n'est pas appelable"
194194

195195
#: py/runtime.c
196196
#, c-format
197197
msgid "'%s' object is not iterable"
198-
msgstr "objet '%s' n'est pas itérable"
198+
msgstr "l'objet '%s' n'est pas itérable"
199199

200200
#: py/obj.c
201201
#, c-format
@@ -388,7 +388,7 @@ msgstr "La profondeur de bit doit être un multiple de 8."
388388

389389
#: ports/mimxrt10xx/common-hal/busio/UART.c
390390
msgid "Both RX and TX required for flow control"
391-
msgstr ""
391+
msgstr "RX et TX requis pour le contrôle de flux"
392392

393393
#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c
394394
msgid "Both pins must support hardware interrupts"
@@ -1282,7 +1282,7 @@ msgstr "La broche ne peut être utilisée pour l'ADC"
12821282

12831283
#: shared-bindings/digitalio/DigitalInOut.c
12841284
msgid "Pin is input only"
1285-
msgstr ""
1285+
msgstr "La broche est entrée uniquement"
12861286

12871287
#: ports/atmel-samd/common-hal/countio/Counter.c
12881288
msgid "Pin must support hardware interrupts"

locale/sv.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3196,7 +3196,7 @@ msgstr "oväntat nyckelordsargument '%q'"
31963196

31973197
#: py/lexer.c
31983198
msgid "unicode name escapes"
3199-
msgstr "unicode name escapes"
3199+
msgstr "unicode-namn flyr"
32003200

32013201
#: py/parse.c
32023202
msgid "unindent does not match any outer indentation level"

ports/cxd56/supervisor/port.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include <sys/boardctl.h>
3030
#include <sys/time.h>
3131

32+
#include <cxd56_rtc.h>
33+
3234
#include "sched/sched.h"
3335

3436
#include "boards/board.h"
@@ -45,7 +47,8 @@
4547
safe_mode_t port_init(void) {
4648
boardctl(BOARDIOC_INIT, 0);
4749

48-
board_init();
50+
// Wait until RTC is available
51+
while (g_rtc_enabled == false);
4952

5053
if (board_requests_safe_mode()) {
5154
return USER_SAFE_MODE;
@@ -121,14 +124,10 @@ void board_timerhook(void)
121124
}
122125

123126
uint64_t port_get_raw_ticks(uint8_t* subticks) {
124-
struct timeval tv;
125-
gettimeofday(&tv, NULL);
126-
long computed_subticks = tv.tv_usec * 1024 * 32 / 1000000;
127-
if (subticks != NULL) {
128-
*subticks = computed_subticks % 32;
129-
}
127+
uint64_t count = cxd56_rtc_count();
128+
*subticks = count % 32;
130129

131-
return tv.tv_sec * 1024 + computed_subticks / 32;
130+
return count / 32;
132131
}
133132

134133
// Enable 1/1024 second tick.

shared-bindings/storage/__init__.c

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -167,54 +167,55 @@ STATIC const mp_rom_map_elem_t storage_module_globals_table[] = {
167167
{ MP_ROM_QSTR(MP_QSTR_getmount), MP_ROM_PTR(&storage_getmount_obj) },
168168
{ MP_ROM_QSTR(MP_QSTR_erase_filesystem), MP_ROM_PTR(&storage_erase_filesystem_obj) },
169169

170-
//| class VfsFat:
171-
//| def __init__(self, block_device: Any): ...
172-
//| """Create a new VfsFat filesystem around the given block device.
173-
//|
174-
//| :param block_device: Block device the the filesystem lives on"""
175-
//|
176-
//| label: Any = ...
177-
//| """The filesystem label, up to 11 case-insensitive bytes. Note that
178-
//| this property can only be set when the device is writable by the
179-
//| microcontroller."""
180-
//|
181-
//| def mkfs(self, ) -> Any:
182-
//| """Format the block device, deleting any data that may have been there"""
183-
//| ...
184-
//|
185-
//| def open(self, path: Any, mode: Any) -> Any:
186-
//| """Like builtin ``open()``"""
187-
//| ...
188-
//|
189-
//| def ilistdir(self, path: Any) -> Any:
190-
//| """Return an iterator whose values describe files and folders within
191-
//| ``path``"""
192-
//| ...
193-
//|
194-
//| def mkdir(self, path: Any) -> Any:
195-
//| """Like `os.mkdir`"""
196-
//| ...
197-
//|
198-
//| def rmdir(self, path: Any) -> Any:
199-
//| """Like `os.rmdir`"""
200-
//| ...
201-
//|
202-
//| def stat(self, path: Any) -> Any:
203-
//| """Like `os.stat`"""
204-
//| ...
205-
//|
206-
//| def statvfs(self, path: Any) -> Any:
207-
//| """Like `os.statvfs`"""
208-
//| ...
209-
//|
210-
//| def mount(self, readonly: Any, mkfs: Any) -> Any:
211-
//| """Don't call this directly, call `storage.mount`."""
212-
//| ...
213-
//|
214-
//| def umount(self, ) -> Any:
215-
//| """Don't call this directly, call `storage.umount`."""
216-
//| ...
217-
//|
170+
//| class VfsFat:
171+
//| def __init__(self, block_device: Any):
172+
//| """Create a new VfsFat filesystem around the given block device.
173+
//|
174+
//| :param block_device: Block device the the filesystem lives on"""
175+
//|
176+
//| label: Any = ...
177+
//| """The filesystem label, up to 11 case-insensitive bytes. Note that
178+
//| this property can only be set when the device is writable by the
179+
//| microcontroller."""
180+
//| ...
181+
//|
182+
//| def mkfs(self) -> Any:
183+
//| """Format the block device, deleting any data that may have been there"""
184+
//| ...
185+
//|
186+
//| def open(self, path: Any, mode: Any) -> Any:
187+
//| """Like builtin ``open()``"""
188+
//| ...
189+
//|
190+
//| def ilistdir(self, path: Any) -> Any:
191+
//| """Return an iterator whose values describe files and folders within
192+
//| ``path``"""
193+
//| ...
194+
//|
195+
//| def mkdir(self, path: Any) -> Any:
196+
//| """Like `os.mkdir`"""
197+
//| ...
198+
//|
199+
//| def rmdir(self, path: Any) -> Any:
200+
//| """Like `os.rmdir`"""
201+
//| ...
202+
//|
203+
//| def stat(self, path: Any) -> Any:
204+
//| """Like `os.stat`"""
205+
//| ...
206+
//|
207+
//| def statvfs(self, path: Any) -> Any:
208+
//| """Like `os.statvfs`"""
209+
//| ...
210+
//|
211+
//| def mount(self, readonly: Any, mkfs: Any) -> Any:
212+
//| """Don't call this directly, call `storage.mount`."""
213+
//| ...
214+
//|
215+
//| def umount(self) -> Any:
216+
//| """Don't call this directly, call `storage.umount`."""
217+
//| ...
218+
//|
218219
{ MP_ROM_QSTR(MP_QSTR_VfsFat), MP_ROM_PTR(&mp_fat_vfs_type) },
219220
};
220221

supervisor/shared/external_flash/devices.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,24 @@ typedef struct {
187187
.single_status_byte = false, \
188188
}
189189

190+
// Settings for the Gigadevice GD25S512MD 64MiB SPI flash.
191+
// Datasheet: http://www.gigadevice.com/datasheet/gd25s512md/
192+
#define GD25S512MD {\
193+
.total_size = (1 << 26), /* 64 MiB */ \
194+
.start_up_time_us = 5000, \
195+
.manufacturer_id = 0xc8, \
196+
.memory_type = 0x40, \
197+
.capacity = 0x19, \
198+
.max_clock_speed_mhz = 104, /* if we need 120 then we can turn on high performance mode */ \
199+
.quad_enable_bit_mask = 0x02, \
200+
.has_sector_protection = false, \
201+
.supports_fast_read = true, \
202+
.supports_qspi = true, \
203+
.supports_qspi_writes = true, \
204+
.write_status_register_split = true, \
205+
.single_status_byte = false, \
206+
}
207+
190208
// Settings for the Cypress (was Spansion) S25FL064L 8MiB SPI flash.
191209
// Datasheet: http://www.cypress.com/file/316661/download
192210
#define S25FL064L {\

tools/build_board_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
# nRF52840 dev kits that may not have UF2 bootloaders,
5555
"makerdiary_nrf52840_mdk": HEX,
56-
"makerdiary_nrf52840_mdk_usb_dongle": HEX,
56+
"makerdiary_nrf52840_mdk_usb_dongle": HEX_UF2,
5757
"pca10056": BIN_UF2,
5858
"pca10059": BIN_UF2,
5959
"electronut_labs_blip": HEX

0 commit comments

Comments
 (0)