diff options
author | Ayke van Laethem <[email protected]> | 2018-09-22 01:44:47 +0200 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2018-09-22 01:44:47 +0200 |
commit | 12298d23a776e2e8051e5b8f63591e7e5c9864c3 (patch) | |
tree | 7c7cb393d86f7953d9788da8d6b2de5c7d99d24b /targets | |
parent | 895d109fc476360be1231d813c233ba01e5a6837 (diff) | |
download | tinygo-12298d23a776e2e8051e5b8f63591e7e5c9864c3.tar.gz tinygo-12298d23a776e2e8051e5b8f63591e7e5c9864c3.zip |
all: move generic ARM bits into separate files
Diffstat (limited to 'targets')
-rw-r--r-- | targets/arm.ld | 8 | ||||
-rw-r--r-- | targets/nrf52.ld | 10 | ||||
-rw-r--r-- | targets/pca10040.json | 4 |
3 files changed, 12 insertions, 10 deletions
diff --git a/targets/arm.ld b/targets/arm.ld index e5df36013..1cf417831 100644 --- a/targets/arm.ld +++ b/targets/arm.ld @@ -1,12 +1,4 @@ -MEMORY -{ - FLASH_TEXT (rw) : ORIGIN = 0x00000000, LENGTH = 256K /* .text */ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K -} - -_stack_size = 2K; - /* define output sections */ SECTIONS { diff --git a/targets/nrf52.ld b/targets/nrf52.ld new file mode 100644 index 000000000..a388cf7e4 --- /dev/null +++ b/targets/nrf52.ld @@ -0,0 +1,10 @@ + +MEMORY +{ + FLASH_TEXT (rw) : ORIGIN = 0x00000000, LENGTH = 256K /* .text */ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K +} + +_stack_size = 2K; + +INCLUDE "targets/arm.ld" diff --git a/targets/pca10040.json b/targets/pca10040.json index 17d03769e..48f800bd3 100644 --- a/targets/pca10040.json +++ b/targets/pca10040.json @@ -1,8 +1,8 @@ { "llvm-target": "armv7em-none-eabi", - "build-tags": ["nrf", "nrf52", "nrf52832", "js", "wasm"], + "build-tags": ["nrf", "nrf52", "nrf52832", "arm", "js", "wasm"], "linker": "arm-none-eabi-gcc", - "pre-link-args": ["-nostdlib", "-nostartfiles", "-mcpu=cortex-m4", "-mthumb", "-T", "targets/arm.ld", "-Wl,--gc-sections", "-fno-exceptions", "-fno-unwind-tables", "-ffunction-sections", "-fdata-sections", "-Os", "-DNRF52832_XXAA", "-Ilib/CMSIS/CMSIS/Include", "lib/nrfx/mdk/system_nrf52.c", "src/device/nrf/nrf52.s"], + "pre-link-args": ["-nostdlib", "-nostartfiles", "-mcpu=cortex-m4", "-mthumb", "-T", "targets/nrf52.ld", "-Wl,--gc-sections", "-fno-exceptions", "-fno-unwind-tables", "-ffunction-sections", "-fdata-sections", "-Os", "-DNRF52832_XXAA", "-Ilib/CMSIS/CMSIS/Include", "lib/nrfx/mdk/system_nrf52.c", "src/device/nrf/nrf52.s"], "objcopy": "arm-none-eabi-objcopy", "flash": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset" } |