aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets
diff options
context:
space:
mode:
authorJesús Espino <[email protected]>2022-12-19 12:15:03 +0100
committerGitHub <[email protected]>2022-12-19 12:15:03 +0100
commitd304e6706b9a347506e4c906c16c5f8481e0f361 (patch)
treea033b6c2abe9ec5ebdf134e25bcd43c6fe1edf35 /targets
parentc5c6464175652252ef73ea7878e1c9dbee8482d6 (diff)
downloadtinygo-d304e6706b9a347506e4c906c16c5f8481e0f361.tar.gz
tinygo-d304e6706b9a347506e4c906c16c5f8481e0f361.zip
Adding support for waveshare rp2040-zero (#3321)
machine: adding support for waveshare rp2040-zero
Diffstat (limited to 'targets')
-rw-r--r--targets/waveshare-rp2040-zero.json11
-rw-r--r--targets/waveshare-rp2040-zero.ld10
2 files changed, 21 insertions, 0 deletions
diff --git a/targets/waveshare-rp2040-zero.json b/targets/waveshare-rp2040-zero.json
new file mode 100644
index 000000000..878969afa
--- /dev/null
+++ b/targets/waveshare-rp2040-zero.json
@@ -0,0 +1,11 @@
+{
+ "inherits": [
+ "rp2040"
+ ],
+ "serial-port": ["2e8a:0003"],
+ "build-tags": ["waveshare_rp2040_zero"],
+ "linkerscript": "targets/waveshare-rp2040-zero.ld",
+ "extra-files": [
+ "targets/pico-boot-stage2.S"
+ ]
+}
diff --git a/targets/waveshare-rp2040-zero.ld b/targets/waveshare-rp2040-zero.ld
new file mode 100644
index 000000000..7e06d7a0a
--- /dev/null
+++ b/targets/waveshare-rp2040-zero.ld
@@ -0,0 +1,10 @@
+
+MEMORY
+{
+ /* Reserve exactly 256 bytes at start of flash for second stage bootloader */
+ BOOT2_TEXT (rx) : ORIGIN = 0x10000000, LENGTH = 256
+ FLASH_TEXT (rx) : ORIGIN = 0x10000000 + 256, LENGTH = 1020K - 256
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 256k
+}
+
+INCLUDE "targets/rp2040.ld"