diff --git a/Makefile b/Makefile index bc54d52a..740aeb0d 100644 --- a/Makefile +++ b/Makefile @@ -187,6 +187,8 @@ smoketest: $(TINYGO) build -o test.wasm -tags=pca10056 examples/blinky2 @$(MD5SUM) test.wasm # test all targets/boards + $(TINYGO) build -size short -o test.hex -target=pca10040-s132v6 examples/blinky1 + @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=microbit examples/echo @$(MD5SUM) test.hex $(TINYGO) build -size short -o test.hex -target=nrf52840-mdk examples/blinky1 diff --git a/targets/nrf52-s132v6.json b/targets/nrf52-s132v6.json new file mode 100644 index 00000000..476b9f69 --- /dev/null +++ b/targets/nrf52-s132v6.json @@ -0,0 +1,4 @@ +{ + "build-tags": ["softdevice"], + "linkerscript": "targets/nrf52-s132v6.ld" +} diff --git a/targets/nrf52-s132v6.ld b/targets/nrf52-s132v6.ld new file mode 100644 index 00000000..2515fca8 --- /dev/null +++ b/targets/nrf52-s132v6.ld @@ -0,0 +1,10 @@ + +MEMORY +{ + FLASH_TEXT (rw) : ORIGIN = 0x00000000 + 0x00026000 , LENGTH = 256K - 0x00026000 /* .text */ + RAM (xrw) : ORIGIN = 0x20000000 + 0x000039c0, LENGTH = 64K - 0x000039c0 +} + +_stack_size = 4K; + +INCLUDE "targets/arm.ld" diff --git a/targets/nrf52.json b/targets/nrf52.json index f26a71c5..d48c9d33 100644 --- a/targets/nrf52.json +++ b/targets/nrf52.json @@ -7,7 +7,8 @@ "-mfloat-abi=soft", "-Qunused-arguments", "-DNRF52832_XXAA", - "-I{root}/lib/CMSIS/CMSIS/Include" + "-I{root}/lib/CMSIS/CMSIS/Include", + "-I{root}/lib/nrfx/mdk" ], "linkerscript": "targets/nrf52.ld", "extra-files": [ diff --git a/targets/pca10040-s132v6.json b/targets/pca10040-s132v6.json new file mode 100644 index 00000000..d8342546 --- /dev/null +++ b/targets/pca10040-s132v6.json @@ -0,0 +1,4 @@ +{ + "inherits": ["pca10040", "nrf52-s132v6"], + "ldscript": "targets/nrf52-s132v6.ld" +}