Skip to content

Commit 5f795d4

Browse files
committed
TEST: Add nRF52 target without softdevice
1 parent 600e7fd commit 5f795d4

File tree

10 files changed

+967
-0
lines changed

10 files changed

+967
-0
lines changed

boards.txt

+35
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,38 @@ nrf52840.upload.native_usb=true
9898
nrf52840.upload.maximum_size=1000000
9999
nrf52840.upload.maximum_data_size=1000000
100100

101+
##############################################################
102+
103+
nrf52840_nosd.name=Arduino Nano33BLE (Cordio)
104+
nrf52840_nosd.build.core=arduino
105+
nrf52840_nosd.build.crossprefix=arm-none-eabi-
106+
nrf52840_nosd.build.compiler_path={runtime.tools.arm-none-eabi-gcc.path}/bin/
107+
108+
nrf52840_nosd.build.variant=NRF52840_DK_NOSD
109+
nrf52840_nosd.build.mcu=cortex-m4
110+
nrf52840_nosd.build.extra_flags=
111+
nrf52840_nosd.build.architecture=cortex-m4
112+
nrf52840_nosd.build.board=NRF52840_DK_NOSD
113+
nrf52840_nosd.build.ldscript=linker_script.ld
114+
nrf52840_nosd.compiler.mbed.defines={build.variant.path}/defines.txt
115+
nrf52840_nosd.compiler.mbed.ldflags={build.variant.path}/ldflags.txt
116+
nrf52840_nosd.compiler.mbed.cflags={build.variant.path}/cflags.txt
117+
nrf52840_nosd.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt
118+
nrf52840_nosd.compiler.mbed.includes={build.variant.path}/includes.txt
119+
nrf52840_nosd.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
120+
nrf52840_nosd.compiler.mbed="{build.variant.path}/libs/libmbed.a"
121+
nrf52840_nosd.vid.0=0x2341
122+
nrf52840_nosd.pid.0=0x005a
123+
124+
nrf52840_nosd.build.sd_name=s132
125+
nrf52840_nosd.build.sd_version=6.1.1
126+
nrf52840_nosd.build.sd_fwid=0xFFFE
127+
128+
nrf52840_nosd.upload.tool=nrfutil
129+
nrf52840_nosd.upload.protocol=nrfutil
130+
nrf52840_nosd.upload.use_1200bps_touch=true
131+
nrf52840_nosd.upload.wait_for_upload_port=true
132+
nrf52840_nosd.upload.native_usb=true
133+
nrf52840_nosd.upload.maximum_size=1000000
134+
nrf52840_nosd.upload.maximum_data_size=1000000
135+

variants/NRF52840_DK_NOSD/cflags.txt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-std=gnu11
2+
-DMBED_TRAP_ERRORS_ENABLED=1
3+
-Os
4+
-Wall
5+
-Wextra
6+
-Wno-missing-field-initializers
7+
-Wno-unused-parameter
8+
-c
9+
-fdata-sections
10+
-ffunction-sections
11+
-fmessage-length=0
12+
-fno-delete-null-pointer-checks
13+
-fno-exceptions
14+
-fomit-frame-pointer
15+
-funsigned-char
16+
-g1
17+
-mcpu=cortex-m4
18+
-mfloat-abi=softfp
19+
-mfpu=fpv4-sp-d16
20+
-mthumb
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-Wvla
2+
-fno-rtti
3+
-std=gnu++14
4+
-DMBED_TRAP_ERRORS_ENABLED=1
5+
-Os
6+
-Wall
7+
-Wextra
8+
-Wno-missing-field-initializers
9+
-Wno-unused-parameter
10+
-c
11+
-fdata-sections
12+
-ffunction-sections
13+
-fmessage-length=0
14+
-fno-delete-null-pointer-checks
15+
-fno-exceptions
16+
-fomit-frame-pointer
17+
-funsigned-char
18+
-g1
19+
-mcpu=cortex-m4
20+
-mfloat-abi=softfp
21+
-mfpu=fpv4-sp-d16
22+
-mthumb

variants/NRF52840_DK_NOSD/defines.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-DTARGET_NRF52 -DCONFIG_GPIO_AS_PINRESET -DTARGET_SDK_15_0 -DMBED_MPU_CUSTOM -D__MBED__=1 -D__MBED_CMSIS_RTOS_CM -DNRF52840_XXAA -DDEVICE_SERIAL=1 -DTARGET_RELEASE -DTARGET_CORTEX_M -D__CMSIS_RTOS -DDEVICE_INTERRUPTIN=1 -DNRF52_ERRATA_20 -DDEVICE_PORTOUT=1 -DFEATURE_CRYPTOCELL310=1 -DBOARD_PCA10056 -DTARGET_FF_ARDUINO -DFEATURE_BLE=1 -DTOOLCHAIN_GCC -DCMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\" -DWSF_MAX_HANDLERS=10 -DDEVICE_LPTICKER=1 -DDEVICE_PWMOUT=1 -DTARGET_MCU_NRF52840 -DDEVICE_SYSTICK_CLK_OFF_DURING_SLEEP=1 -DTARGET_M4 -DDEVICE_TRNG=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DTARGET_RTOS_M4_M7 -DDEVICE_SLEEP=1 -DTARGET_SOFTDEVICE_NONE -DTARGET_NORDIC -DDEVICE_QSPI=1 -DDEVICE_FLASH=1 -DDEVICE_SPI_ASYNCH=1 -DDEVICE_SERIAL_FC=1 -DMBED_BUILD_TIMESTAMP=1560779358.162094 -DDEVICE_I2C_ASYNCH=1 -DCMSIS_VECTAB_VIRTUAL -DTARGET_LIKE_CORTEX_M4 -DTARGET_NAME=NRF52840_DK -DTARGET_NORDIC_CORDIO -DDEVICE_I2C=1 -DDEVICE_ANALOGIN=1 -DDEVICE_USTICKER=1 -DTARGET_LIKE_MBED -DCOMPONENT_QSPIF=1 -DDEVICE_SERIAL_ASYNCH=1 -DTARGET_NRF52840_DK -DARM_MATH_CM4 -DTARGET_NRF52840 -DTARGET_CORDIO -DDEVICE_USBDEVICE=1 -DDEVICE_PORTIN=1 -D__CORTEX_M4 -DMBEDTLS_CONFIG_HW_SUPPORT -DDEVICE_ITM=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DTARGET_NRF5x -DCOMPONENT_NSPE=1 -DTOOLCHAIN_GCC_ARM -DMBED_TICKLESS -DDEVICE_PORTINOUT=1 -DTARGET_CORDIO_LL -DTARGET_CORTEX -D__FPU_PRESENT=1 -DDEVICE_SPI=1
2+
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1

variants/NRF52840_DK_NOSD/includes.txt

+365
Large diffs are not rendered by default.

variants/NRF52840_DK_NOSD/ldflags.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-DMBED_BOOT_STACK_SIZE=2048
2+
-Wl,--gc-sections
3+
-Wl,--wrap,_calloc_r
4+
-Wl,--wrap,_free_r
5+
-Wl,--wrap,_malloc_r
6+
-Wl,--wrap,_memalign_r
7+
-Wl,--wrap,_realloc_r
8+
-Wl,--wrap,atexit
9+
-Wl,--wrap,exit
10+
-Wl,--wrap,main
11+
-Wl,-n
12+
-mcpu=cortex-m4
13+
-mfloat-abi=softfp
14+
-mfpu=fpv4-sp-d16
15+
-mthumb
14.4 MB
Binary file not shown.
+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
MEMORY
2+
{
3+
FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x100000
4+
RAM_NVIC (rwx) : ORIGIN = 0x20000000, LENGTH = 0x100
5+
RAM_CRASH_DATA (rwx) : ORIGIN = (0x20000000 + 0x100), LENGTH = 0x100
6+
RAM (rwx) : ORIGIN = ((0x20000000 + 0x100) + 0x100), LENGTH = (0x40000 - (0x100 + 0x100))
7+
}
8+
OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
9+
ENTRY(Reset_Handler)
10+
SECTIONS
11+
{
12+
.text :
13+
{
14+
KEEP(*(.Vectors))
15+
*(.text*)
16+
KEEP(*(.init))
17+
KEEP(*(.fini))
18+
*crtbegin.o(.ctors)
19+
*crtbegin?.o(.ctors)
20+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
21+
*(SORT(.ctors.*))
22+
*(.ctors)
23+
*crtbegin.o(.dtors)
24+
*crtbegin?.o(.dtors)
25+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
26+
*(SORT(.dtors.*))
27+
*(.dtors)
28+
*(.rodata*)
29+
KEEP(*(.eh_frame*))
30+
} > FLASH
31+
.sdh_soc_observers :
32+
{
33+
PROVIDE(__start_sdh_soc_observers = .);
34+
KEEP(*(SORT(.sdh_soc_observers*)))
35+
PROVIDE(__stop_sdh_soc_observers = .);
36+
} > FLASH
37+
.sdh_stack_observers :
38+
{
39+
PROVIDE(__start_sdh_stack_observers = .);
40+
KEEP(*(SORT(.sdh_stack_observers*)))
41+
PROVIDE(__stop_sdh_stack_observers = .);
42+
} > FLASH
43+
.sdh_req_observers :
44+
{
45+
PROVIDE(__start_sdh_req_observers = .);
46+
KEEP(*(SORT(.sdh_req_observers*)))
47+
PROVIDE(__stop_sdh_req_observers = .);
48+
} > FLASH
49+
.sdh_state_observers :
50+
{
51+
PROVIDE(__start_sdh_state_observers = .);
52+
KEEP(*(SORT(.sdh_state_observers*)))
53+
PROVIDE(__stop_sdh_state_observers = .);
54+
} > FLASH
55+
.sdh_ble_observers :
56+
{
57+
PROVIDE(__start_sdh_ble_observers = .);
58+
KEEP(*(SORT(.sdh_ble_observers*)))
59+
PROVIDE(__stop_sdh_ble_observers = .);
60+
} > FLASH
61+
.ARM.extab :
62+
{
63+
*(.ARM.extab* .gnu.linkonce.armextab.*)
64+
. = ALIGN(8);
65+
} > FLASH
66+
__exidx_start = .;
67+
.ARM.exidx :
68+
{
69+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
70+
. = ALIGN(8);
71+
} > FLASH
72+
__exidx_end = .;
73+
__etext = .;
74+
.data : AT (__etext)
75+
{
76+
__data_start__ = .;
77+
*(vtable)
78+
*(.data*)
79+
. = ALIGN(8);
80+
PROVIDE_HIDDEN (__preinit_array_start = .);
81+
KEEP(*(.preinit_array))
82+
PROVIDE_HIDDEN (__preinit_array_end = .);
83+
. = ALIGN(8);
84+
PROVIDE_HIDDEN (__init_array_start = .);
85+
KEEP(*(SORT(.init_array.*)))
86+
KEEP(*(.init_array))
87+
PROVIDE_HIDDEN (__init_array_end = .);
88+
. = ALIGN(8);
89+
PROVIDE_HIDDEN (__fini_array_start = .);
90+
KEEP(*(SORT(.fini_array.*)))
91+
KEEP(*(.fini_array))
92+
PROVIDE_HIDDEN (__fini_array_end = .);
93+
. = ALIGN(8);
94+
PROVIDE(__start_fs_data = .);
95+
KEEP(*(.fs_data))
96+
PROVIDE(__stop_fs_data = .);
97+
*(.jcr)
98+
. = ALIGN(8);
99+
__data_end__ = .;
100+
} > RAM
101+
__edata = .;
102+
.nvictable (NOLOAD) :
103+
{
104+
PROVIDE(__start_nvictable = .);
105+
KEEP(*(.nvictable))
106+
PROVIDE(__stop_nvictable = .);
107+
} > RAM_NVIC
108+
.crash_data_ram :
109+
{
110+
. = ALIGN(8);
111+
__CRASH_DATA_RAM__ = .;
112+
__CRASH_DATA_RAM_START__ = .;
113+
KEEP(*(.keep.crash_data_ram))
114+
*(.m_crash_data_ram)
115+
. += 0x100;
116+
. = ALIGN(8);
117+
__CRASH_DATA_RAM_END__ = .;
118+
} > RAM_CRASH_DATA
119+
.noinit (NOLOAD) :
120+
{
121+
PROVIDE(__start_noinit = .);
122+
KEEP(*(.noinit))
123+
PROVIDE(__stop_noinit = .);
124+
} > RAM
125+
.bss :
126+
{
127+
. = ALIGN(8);
128+
__bss_start__ = .;
129+
*(.bss*)
130+
*(COMMON)
131+
. = ALIGN(8);
132+
__bss_end__ = .;
133+
} > RAM
134+
.heap (NOLOAD):
135+
{
136+
__end__ = .;
137+
end = __end__;
138+
*(.heap*);
139+
ASSERT(. <= (ORIGIN(RAM) + LENGTH(RAM) - 2048), "heap region overflowed into stack");
140+
. = ORIGIN(RAM) + LENGTH(RAM) - 2048;
141+
__HeapLimit = .;
142+
} > RAM
143+
PROVIDE(__heap_start = ADDR(.heap));
144+
PROVIDE(__heap_size = SIZEOF(.heap));
145+
PROVIDE(__mbed_sbrk_start = ADDR(.heap));
146+
PROVIDE(__mbed_krbs_start = ADDR(.heap) + SIZEOF(.heap));
147+
.stack (NOLOAD):
148+
{
149+
__StackLimit = .;
150+
*(.stack*)
151+
. = ORIGIN(RAM) + LENGTH(RAM);
152+
} > RAM
153+
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
154+
__StackLimit = __StackTop - 2048;
155+
PROVIDE(__stack = __StackTop);
156+
}

0 commit comments

Comments
 (0)