aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets
diff options
context:
space:
mode:
authorPatrick Ting <[email protected]>2024-03-29 22:37:40 -0700
committerRon Evans <[email protected]>2024-04-19 20:50:00 +0200
commit22bf045c9a5194001b1d52c094094cf8926823a1 (patch)
tree2d56d86c651fd734e6f59291353901b9382a7ac1 /targets
parent39029cc37604c175c8b512478ba60ab617e79960 (diff)
downloadtinygo-22bf045c9a5194001b1d52c094094cf8926823a1.tar.gz
tinygo-22bf045c9a5194001b1d52c094094cf8926823a1.zip
add stm32 nucleol476rg support
Diffstat (limited to 'targets')
-rw-r--r--targets/nucleo-l476rg.json12
-rw-r--r--targets/stm32l4x6.ld11
2 files changed, 23 insertions, 0 deletions
diff --git a/targets/nucleo-l476rg.json b/targets/nucleo-l476rg.json
new file mode 100644
index 000000000..73eddee81
--- /dev/null
+++ b/targets/nucleo-l476rg.json
@@ -0,0 +1,12 @@
+{
+ "inherits": ["cortex-m4"],
+ "build-tags": ["nucleol476rg", "stm32l476", "stm32l4x6", "stm32l4", "stm32"],
+ "serial": "uart",
+ "linkerscript": "targets/stm32l4x6.ld",
+ "extra-files": [
+ "src/device/stm32/stm32l4x6.s"
+ ],
+ "flash-method": "openocd",
+ "openocd-interface": "stlink-v2-1",
+ "openocd-target": "stm32l4x"
+ }
diff --git a/targets/stm32l4x6.ld b/targets/stm32l4x6.ld
new file mode 100644
index 000000000..4f1ed7732
--- /dev/null
+++ b/targets/stm32l4x6.ld
@@ -0,0 +1,11 @@
+
+MEMORY
+{
+ FLASH_TEXT (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
+ RAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K
+}
+
+_stack_size = 4K;
+
+INCLUDE "targets/arm.ld"