Skip to content

Commit 1180391

Browse files
committed
Cleanup boards/build.
Former-commit-id: e7265f6
1 parent ceb9de4 commit 1180391

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1397
-1774
lines changed

boards.txt

Lines changed: 1127 additions & 1065 deletions
Large diffs are not rendered by default.

cores/nRF5/nordic/linker/gcc_startup_nrf51.S

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#if defined(ARDUINO) && defined(NRF51)
22
/*
3-
3+
44
Copyright (c) 2009-2020 ARM Limited. All rights reserved.
55
66
SPDX-License-Identifier: Apache-2.0
@@ -38,6 +38,14 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA.
3838
#elif defined(__STACK_SIZE)
3939
.align 3
4040
.equ Stack_Size, __STACK_SIZE
41+
#elif defined(DEVICE_RAM_SIZE)
42+
#if DEVICE_RAM_SIZE > 16
43+
.align 3
44+
.equ Stack_Size, 1024
45+
#else
46+
.align 3
47+
.equ Stack_Size, 400
48+
#endif
4149
#else
4250
.align 3
4351
.equ Stack_Size, 2048
@@ -141,7 +149,7 @@ __isr_vector:
141149
Reset_Handler:
142150

143151
MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
144-
152+
145153
LDR R0, =NRF_POWER_RAMON_ADDRESS
146154
LDR R2, [R0]
147155
ORRS R2, R1

cores/nRF5/nordic/linker/gcc_startup_nrf52.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#if defined(ARDUINO) && defined(NRF52832_XXAA)
22
/*
3-
3+
44
Copyright (c) 2009-2020 ARM Limited. All rights reserved.
55
66
SPDX-License-Identifier: Apache-2.0
@@ -40,7 +40,7 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA.
4040
.equ Stack_Size, __STACK_SIZE
4141
#else
4242
.align 3
43-
.equ Stack_Size, 4096
43+
.equ Stack_Size, 2048
4444
#endif
4545
.globl __StackTop
4646
.globl __StackLimit

cores/nRF5/nordic/linker/gcc_startup_nrf52833.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#if defined(ARDUINO) && defined(NRF52833_XXAA)
22
/*
3-
3+
44
Copyright (c) 2009-2020 ARM Limited. All rights reserved.
55
66
SPDX-License-Identifier: Apache-2.0
@@ -40,7 +40,7 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA.
4040
.equ Stack_Size, __STACK_SIZE
4141
#else
4242
.align 3
43-
.equ Stack_Size, 8192
43+
.equ Stack_Size, 2048
4444
#endif
4545
.globl __StackTop
4646
.globl __StackLimit

cores/nRF5/nordic/linker/gcc_startup_nrf52840.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#if defined(ARDUINO) && defined(NRF52840_XXAA)
22
/*
3-
3+
44
Copyright (c) 2009-2020 ARM Limited. All rights reserved.
55
66
SPDX-License-Identifier: Apache-2.0
@@ -40,7 +40,7 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA.
4040
.equ Stack_Size, __STACK_SIZE
4141
#else
4242
.align 3
43-
.equ Stack_Size, 16384
43+
.equ Stack_Size, 2048
4444
#endif
4545
.globl __StackTop
4646
.globl __StackLimit

platform.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ compiler.define=-DARDUINO=
5151

5252
# this can be overriden in boards.txt
5353
build.extra_flags=
54-
build.lfclk_flags=
5554
build.dfu_pattern=echo
5655

57-
nrf52.dfu_pattern="{tools.nrfutil.cmd}" pkg generate --hw-version 52 --debug-mode --sd-req 0 --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
56+
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
57+
nrfutil.dfu_pattern="{tools.nrfutil.cmd}" pkg generate --hw-version 52 --debug-mode --sd-req 0 --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
5858
nordic.path={build.core.path}/nordic
5959

6060
compiler.nrf.flags=-DNRF5 -DARDUINO_ARCH_NRF5 "-I{build.core.path}/nimble_config" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{build.core.path}/CMSIS/Include" "-I{build.core.path}/FC_Store" "-I{build.core.path}/BLEBond_nvs" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src"
@@ -84,13 +84,13 @@ recipe.hooks.prebuild.2.pattern.windows=cmd /c if not exist "{build.path}\build_
8484
# ----------------
8585

8686
## Compile c files
87-
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} {compiler.c.extra_flags} {build.extra_flags} {compiler.nrf.flags} {build.lfclk_flags} "@{build.opt.path}" {includes} "{source_file}" -o "{object_file}"
87+
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} {compiler.c.extra_flags} {build.extra_flags} {compiler.nrf.flags} "@{build.opt.path}" {includes} "{source_file}" -o "{object_file}"
8888

8989
## Compile c++ files
90-
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.nrf.flags} {build.lfclk_flags} "@{build.opt.path}" {includes} "{source_file}" -o "{object_file}"
90+
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.nrf.flags} "@{build.opt.path}" {includes} "{source_file}" -o "{object_file}"
9191

9292
## Compile S files
93-
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} {compiler.S.extra_flags} {build.extra_flags} {build.lfclk_flags} "@{build.opt.path}" {includes} "{source_file}" -o "{object_file}"
93+
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} {compiler.S.extra_flags} {build.extra_flags} "@{build.opt.path}" {includes} "{source_file}" -o "{object_file}"
9494

9595
## Create archives
9696
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
@@ -184,4 +184,8 @@ tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/nrfutil/nrfutil-mac
184184

185185
tools.nrfutil.upload.params.verbose=
186186
tools.nrfutil.upload.params.quiet=
187-
tools.nrfutil.upload.pattern="{cmd}" dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200
187+
tools.nrfutil.upload.pattern="{cmd}" dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200
188+
189+
tools.nrfutil.program.params.verbose=
190+
tools.nrfutil.program.params.quiet=
191+
tools.nrfutil.program.pattern="{cmd}" dfu serial -pkg "{build.path}/{build.project_name}.zip" -p {serial.port} -b 115200

programmers.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,31 @@ jlink.communication=USB
33
jlink.protocol=jlink
44
jlink.program.protocol=jlink
55
jlink.program.tool=openocd
6+
jlink.bootloader.tool=openocd
67
jlink.program.setup_command=transport select swd; set WORKAREASIZE 0;
78

89
stlink.name=ST-Link V2
910
stlink.communication=USB
1011
stlink.protocol=stlink
1112
stlink.program.protocol=stlink
1213
stlink.program.tool=openocd
14+
stlink.bootloader.tool=openocd
1315
stlink.program.setup_command=transport select hla_swd; set WORKAREASIZE 0x4000;
1416

1517
cmsisdap.name=CMSIS-DAP
1618
cmsisdap.communication=USB
1719
cmsisdap.protocol=cmsis-dap
1820
cmsisdap.program.protocol=cmsis-dap
1921
cmsisdap.program.tool=openocd
20-
cmsisdap.program.setup_command=;
22+
cmsisdap.bootloader.tool=openocd
23+
cmsisdap.program.setup_command=transport select hla_swd;
2124

2225
blackmagicprobe.name=Black Magic Probe (GDB)
2326
blackmagicprobe.communication=USB
2427
blackmagicprobe.protocol=
2528
blackmagicprobe.program.protocol=
2629
blackmagicprobe.program.tool=blackmagicprobe
30+
blackmagicprobe.bootloader.tool=blackmagicprobe
2731
blackmagicprobe.program.extra_params=;
2832

2933
nrfutil.name=nrfutil

variants/BBCmicrobit/pins_arduino.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

variants/BBCmicrobit/variant.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
/** Master clock frequency */
2121
#define VARIANT_MCK (16000000ul)
22+
#define USE_LFRC
2223

2324
/*----------------------------------------------------------------------------
2425
* Headers

variants/BBCmicrobitV2/pins_arduino.h

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)