Skip to content

Commit 0c2ab89

Browse files
deadprogramconejoninja
authored andcommitted
targets: add target for Microbit v2 with SoftDevice S140 support for both peripheral and central
Signed-off-by: deadprogram <[email protected]>
1 parent 8d5b771 commit 0c2ab89

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

GNUmakefile

+2
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,8 @@ endif
626626
@$(MD5SUM) test.hex
627627
$(TINYGO) build -size short -o test.hex -target=microbit-v2-s113v7 examples/microbit-blink
628628
@$(MD5SUM) test.hex
629+
$(TINYGO) build -size short -o test.hex -target=microbit-v2-s140v7 examples/microbit-blink
630+
@$(MD5SUM) test.hex
629631
$(TINYGO) build -size short -o test.hex -target=nrf52840-mdk examples/blinky1
630632
@$(MD5SUM) test.hex
631633
$(TINYGO) build -size short -o test.hex -target=pca10031 examples/blinky1

targets/microbit-v2-s140v7.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"inherits": ["microbit-v2", "nrf52833-s140v7"],
3+
"flash-method": "openocd"
4+
}

targets/nrf52833-s140v7.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"build-tags": ["softdevice", "s140v7"],
3+
"linkerscript": "targets/nrf52833-s140v7.ld",
4+
"ldflags": [
5+
"--defsym=__softdevice_stack=0x700"
6+
]
7+
}

targets/nrf52833-s140v7.ld

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
MEMORY
3+
{
4+
FLASH_TEXT (rw) : ORIGIN = 0x00000000 + 0x00027000, LENGTH = 0x80000 - 0x00027000
5+
RAM (xrw) : ORIGIN = 0x20000000 + 0x000039c0, LENGTH = 0x20000 - 0x000039c0
6+
}
7+
8+
_stack_size = 4K + __softdevice_stack;
9+
10+
/* These values are needed for the Nordic SoftDevice. */
11+
__app_ram_base = ORIGIN(RAM);
12+
__softdevice_stack = DEFINED(__softdevice_stack) ? __softdevice_stack : 0;
13+
14+
INCLUDE "targets/arm.ld"

0 commit comments

Comments
 (0)