Skip to content

Commit 539f34f

Browse files
committed
Three small changes
1. Raise an exception when creating a USB device when host isn't initialized. 2. Mark RP2040 dtcm_bss as NOLOAD since it doesn't need to be loaded (just zeroed.) 3. Fix submodule location for ulab to Jeff's copy.
1 parent cfbfd53 commit 539f34f

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
url = https://github.com/adafruit/Adafruit_CircuitPython_Register.git
107107
[submodule "extmod/ulab"]
108108
path = extmod/ulab
109-
url = https://github.com/v923z/micropython-ulab
109+
url = https://github.com/jepler/micropython-ulab
110110
[submodule "frozen/Adafruit_CircuitPython_ESP32SPI"]
111111
path = frozen/Adafruit_CircuitPython_ESP32SPI
112112
url = https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI

locale/circuitpython.pot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,10 @@ msgstr ""
15361536
msgid "No timer available"
15371537
msgstr ""
15381538

1539+
#: shared-module/usb/core/Device.c
1540+
msgid "No usb host port initialized"
1541+
msgstr ""
1542+
15391543
#: ports/nrf/common-hal/_bleio/__init__.c
15401544
msgid "Nordic system firmware out of memory"
15411545
msgstr ""

ports/raspberrypi/link.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ SECTIONS
211211
_ld_dtcm_data_flash_copy = LOADADDR(.dtcm_data);
212212
_ld_dtcm_data_size = SIZEOF(.dtcm_data);
213213

214-
.dtcm_bss :
214+
.dtcm_bss (NOLOAD) :
215215
{
216216
. = ALIGN(4);
217217

shared-module/usb/core/Device.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ void tuh_umount_cb(uint8_t dev_addr) {
5151
STATIC xfer_result_t _xfer_result;
5252
STATIC size_t _actual_len;
5353
bool common_hal_usb_core_device_construct(usb_core_device_obj_t *self, uint8_t device_number) {
54+
if (!tuh_inited()) {
55+
mp_raise_RuntimeError(translate("No usb host port initialized"));
56+
}
57+
5458
if (device_number == 0 || device_number > CFG_TUH_DEVICE_MAX + CFG_TUH_HUB) {
5559
return false;
5660
}

0 commit comments

Comments
 (0)