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
This commit is contained in:
Ayke van Laethem
2023-03-30 20:36:52 +02:00
committed by Ron Evans
parent b044d4ff3d
commit e0bf376068
26 changed files with 50 additions and 114 deletions
+3 -1
View File
@@ -4,7 +4,9 @@
],
"serial-port": ["239a:80f1"],
"build-tags": ["feather_rp2040"],
"linkerscript": "targets/feather-rp2040.ld",
"ldflags": [
"--defsym=__flash_size=8192K"
],
"extra-files": [
"targets/feather-rp2040-boot-stage2.S"
]