aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets/nano-rp2040.json
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2023-03-30 20:36:52 +0200
committerRon Evans <[email protected]>2023-03-30 23:49:02 +0200
commite0bf376068ac7f103b0d663460ca9371152e6e0f (patch)
tree0c9407b9ab288ec39d7fec96d74f523baace84f4 /targets/nano-rp2040.json
parentb044d4ff3d672664df560190df68470b4e3eec77 (diff)
downloadtinygo-e0bf376068ac7f103b0d663460ca9371152e6e0f.tar.gz
tinygo-e0bf376068ac7f103b0d663460ca9371152e6e0f.zip
rp2040: unify all linker scripts using LDFLAGS
The only thing that's different between all these chips is the flash size, which can easily be passed as a linker flag instead. This removes a bunch of duplicate code in an uncommon language (linker script). I've also fixed a few boards with incorrect flash sizes: * nano-rp2040 has 16MB instead of 2MB * macropad-rp2040 has 8MB instead of 2MB * gopher-badge has 8MB instead of 1MB
Diffstat (limited to 'targets/nano-rp2040.json')
-rw-r--r--targets/nano-rp2040.json4
1 files changed, 3 insertions, 1 deletions
diff --git a/targets/nano-rp2040.json b/targets/nano-rp2040.json
index f1623dfe8..313fead9c 100644
--- a/targets/nano-rp2040.json
+++ b/targets/nano-rp2040.json
@@ -4,7 +4,9 @@
],
"serial-port": ["2341:005e"],
"build-tags": ["nano_rp2040"],
- "linkerscript": "targets/pico.ld",
+ "ldflags": [
+ "--defsym=__flash_size=16M"
+ ],
"extra-files": [
"targets/pico-boot-stage2.S"
]