summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2021-01-20 16:47:18 -0800
committerScott Shawcroft <scott@tannewt.org>2021-01-20 19:16:56 -0800
commit733094aead6e84b42da54655b2b0a5d0dbd1a503 (patch)
tree2ff6a1aabf8b5ea8a042fdd012deb7682eca6864 /tools
parenteff68b0d9fb101176a808cb68f0158e1615ed8bf (diff)
Add initial RP2040 support
The RP2040 is new microcontroller from Raspberry Pi that features two Cortex M0s and eight PIO state machines that are good for crunching lots of data. It has 264k RAM and a built in UF2 bootloader too. Datasheet: https://pico.raspberrypi.org/files/rp2040_datasheet.pdf
Diffstat (limited to 'tools')
-rw-r--r--tools/build_board_info.py2
-rw-r--r--tools/build_memory_info.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/build_board_info.py b/tools/build_board_info.py
index ce9d45fe2..7b556ee5d 100644
--- a/tools/build_board_info.py
+++ b/tools/build_board_info.py
@@ -26,6 +26,7 @@ SUPPORTED_PORTS = [
"litex",
"mimxrt10xx",
"nrf",
+ "raspberrypi",
"stm",
]
@@ -47,6 +48,7 @@ extension_by_port = {
"mimxrt10xx": HEX_UF2,
"litex": DFU,
"esp32s2": BIN_UF2,
+ "raspberrypi": UF2,
}
# Per board overrides
diff --git a/tools/build_memory_info.py b/tools/build_memory_info.py
index 26697b974..89aedf0f4 100644
--- a/tools/build_memory_info.py
+++ b/tools/build_memory_info.py
@@ -9,10 +9,10 @@ import re
import sys
# Handle size constants with K or M suffixes (allowed in .ld but not in Python).
-K_PATTERN = re.compile(r'([0-9]+)K')
+K_PATTERN = re.compile(r'([0-9]+)[kK]')
K_REPLACE = r'(\1*1024)'
-M_PATTERN = re.compile(r'([0-9]+)M')
+M_PATTERN = re.compile(r'([0-9]+)[mM]')
M_REPLACE = r'(\1*1024*1024)'
print()