Skip to content

Commit d18ebcc

Browse files
authored
Merge branch 'adafruit:main' into wasm
2 parents a563241 + 85dfa9c commit d18ebcc

12 files changed

Lines changed: 182 additions & 12 deletions

File tree

locale/circuitpython.pot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,10 @@ msgstr ""
844844
msgid "Coordinate arrays types have different sizes"
845845
msgstr ""
846846

847+
#: shared-module/usb/core/Device.c
848+
msgid "Could not allocate DMA capable buffer"
849+
msgstr ""
850+
847851
#: ports/espressif/common-hal/rclcpy/Publisher.c
848852
msgid "Could not publish to ROS topic"
849853
msgstr ""

locale/cs.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,10 @@ msgstr "Pole souřadnic mají různé délky"
861861
msgid "Coordinate arrays types have different sizes"
862862
msgstr ""
863863

864+
#: shared-module/usb/core/Device.c
865+
msgid "Could not allocate DMA capable buffer"
866+
msgstr ""
867+
864868
#: ports/espressif/common-hal/rclcpy/Publisher.c
865869
msgid "Could not publish to ROS topic"
866870
msgstr ""

locale/el.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,10 @@ msgstr ""
867867
msgid "Coordinate arrays types have different sizes"
868868
msgstr ""
869869

870+
#: shared-module/usb/core/Device.c
871+
msgid "Could not allocate DMA capable buffer"
872+
msgstr ""
873+
870874
#: ports/espressif/common-hal/rclcpy/Publisher.c
871875
msgid "Could not publish to ROS topic"
872876
msgstr ""

locale/hi.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,10 @@ msgstr ""
846846
msgid "Coordinate arrays types have different sizes"
847847
msgstr ""
848848

849+
#: shared-module/usb/core/Device.c
850+
msgid "Could not allocate DMA capable buffer"
851+
msgstr ""
852+
849853
#: ports/espressif/common-hal/rclcpy/Publisher.c
850854
msgid "Could not publish to ROS topic"
851855
msgstr ""

locale/ko.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,10 @@ msgstr "좌표 배열의 길이가 다릅니다"
890890
msgid "Coordinate arrays types have different sizes"
891891
msgstr "좌표 배열 유형은 크기가 다릅니다"
892892

893+
#: shared-module/usb/core/Device.c
894+
msgid "Could not allocate DMA capable buffer"
895+
msgstr ""
896+
893897
#: ports/espressif/common-hal/rclcpy/Publisher.c
894898
msgid "Could not publish to ROS topic"
895899
msgstr ""

locale/ru.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,10 @@ msgstr "Координатные массивы имеют разные длин
870870
msgid "Coordinate arrays types have different sizes"
871871
msgstr "Типы массивов координат имеют разные размеры"
872872

873+
#: shared-module/usb/core/Device.c
874+
msgid "Could not allocate DMA capable buffer"
875+
msgstr ""
876+
873877
#: ports/espressif/common-hal/rclcpy/Publisher.c
874878
msgid "Could not publish to ROS topic"
875879
msgstr ""

locale/tr.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,10 @@ msgstr ""
860860
msgid "Coordinate arrays types have different sizes"
861861
msgstr ""
862862

863+
#: shared-module/usb/core/Device.c
864+
msgid "Could not allocate DMA capable buffer"
865+
msgstr ""
866+
863867
#: ports/espressif/common-hal/rclcpy/Publisher.c
864868
msgid "Could not publish to ROS topic"
865869
msgstr ""

ports/raspberrypi/mpconfigport.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ CIRCUITPY_CYW43_INIT_DELAY ?= 1000
5959
endif
6060

6161
ifeq ($(CHIP_VARIANT),RP2350)
62+
# RP2350 has PSRAM that is not DMA-capable
63+
CIRCUITPY_ALL_MEMORY_DMA_CAPABLE = 0
64+
6265
# This needs to be implemented.
6366
CIRCUITPY_ALARM = 0
6467
# Default PICODVI on because it doesn't require much code in RAM to talk to HSTX.

ports/raspberrypi/supervisor/port.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,14 @@ void *port_realloc(void *ptr, size_t size, bool dma_capable) {
302302
return new_ptr;
303303
}
304304

305+
#if !CIRCUITPY_ALL_MEMORY_DMA_CAPABLE
306+
bool port_buffer_is_dma_capable(const void *ptr) {
307+
// For RP2350, DMA can only access SRAM, not PSRAM
308+
// PSRAM addresses are below SRAM_BASE
309+
return ptr != NULL && ((size_t)ptr) >= SRAM_BASE;
310+
}
311+
#endif
312+
305313
static bool max_size_walker(void *ptr, size_t size, int used, void *user) {
306314
size_t *max_size = (size_t *)user;
307315
if (!used && *max_size < size) {

py/circuitpy_mpconfig.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ CFLAGS += -DCIRCUITPY_ALARM=$(CIRCUITPY_ALARM)
9898
CIRCUITPY_ALARM_TOUCH ?= $(CIRCUITPY_ALARM)
9999
CFLAGS += -DCIRCUITPY_ALARM_TOUCH=$(CIRCUITPY_ALARM_TOUCH)
100100

101+
# Enable DMA buffer management for platforms where not all memory is DMA-capable
102+
# Platforms with PSRAM or other non-DMA memory should set this to 0
103+
CIRCUITPY_ALL_MEMORY_DMA_CAPABLE ?= 1
104+
CFLAGS += -DCIRCUITPY_ALL_MEMORY_DMA_CAPABLE=$(CIRCUITPY_ALL_MEMORY_DMA_CAPABLE)
105+
101106
CIRCUITPY_ANALOGBUFIO ?= 0
102107
CFLAGS += -DCIRCUITPY_ANALOGBUFIO=$(CIRCUITPY_ANALOGBUFIO)
103108

0 commit comments

Comments
 (0)