Skip to content

Commit 06cca54

Browse files
committed
clean up menu, add DEBUG Level menu
1 parent 48bdfa7 commit 06cca54

File tree

3 files changed

+13
-28
lines changed

3 files changed

+13
-28
lines changed

boards.txt

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,13 @@
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717

18-
menu.chip=Chip
19-
#menu.softdevice=Softdevice
20-
#menu.version=Version
21-
menu.lfclk=Low Frequency Clock
22-
menu.board_variant=Board Variant
18+
menu.debug=Debug Level
2319

2420
feather52.name=Adafruit Bluefruit nRF52 Feather
2521

2622
feather52.vid.0=0x10C4
2723
feather52.pid.0=0xEA60
2824

29-
#feather52.upload.tool=sandeepmistry:openocd
3025
feather52.upload.tool=nrfutil
3126
feather52.upload.protocol=nrfutil
3227
feather52.upload.interface=serial
@@ -36,7 +31,6 @@ feather52.upload.use_1200bps_touch=false
3631
feather52.upload.wait_for_upload_port=false
3732
feather52.upload.native_usb=false
3833

39-
#feather52.bootloader.tool=sandeepmistry:openocd
4034
feather52.bootloader.tool=nrfjprog
4135

4236
feather52.build.mcu=cortex-m4
@@ -53,18 +47,11 @@ feather52.build.nrfutil=nrfutil
5347
feather52.build.nrfutil.windows={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/win32/nrfutil.exe
5448
feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil
5549

56-
feather52.menu.lfclk.lfxo=Crystal Oscillator
57-
feather52.menu.lfclk.lfxo.build.lfclk_flags=-DUSE_LFXO
58-
feather52.menu.lfclk.lfrc=RC Oscillator
59-
feather52.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
60-
feather52.menu.lfclk.lfsynt=Synthesized
61-
feather52.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
50+
feather52.menu.debug.l0=Level 0 (Release)
51+
feather52.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
6252

63-
#feather52.menu.softdevice.none=None
64-
#feather52.menu.softdevice.none.softdevice=none
65-
#feather52.menu.softdevice.s132=S132
66-
#feather52.menu.softdevice.s132.softdevice=s132
67-
#feather52.menu.softdevice.s132.softdeviceversion=2.0.1
68-
#feather52.menu.softdevice.s132.upload.maximum_size=409600
69-
#feather52.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132
70-
#feather52.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld
53+
feather52.menu.debug.l1=Level 1 (Error Mess)
54+
feather52.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
55+
56+
feather52.menu.debug.l2=Level 2 (TBD)
57+
feather52.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2

cores/nRF5/verify.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ extern "C"
4747
{
4848
#endif
4949

50-
#define CFG_DEBUG 1
51-
5250
#define RETURN_VOID
5351

5452
//--------------------------------------------------------------------+
@@ -66,7 +64,7 @@ extern "C"
6664
// VERIFY Helper
6765
//--------------------------------------------------------------------+
6866
#if CFG_DEBUG >= 1
69-
// #define VERIFY_MESS(format, ...) printf("[%08ld] %s: %d: verify failed\n", get_millis(), __func__, __LINE__)
67+
// #define VERIFY_MESS(format, ...) cprintf("[%08ld] %s: %d: verify failed\n", get_millis(), __func__, __LINE__)
7068
#define VERIFY_MESS(_status) cprintf("%s: %d: verify failed, status = 0x%04X\n", __PRETTY_FUNCTION__, __LINE__, _status);
7169
#else
7270
#define VERIFY_MESS(_status)

platform.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ compiler.size.cmd=arm-none-eabi-size
4949

5050
# this can be overriden in boards.txt
5151
build.extra_flags=
52-
build.lfclk_flags=
52+
build.debug_flags=
5353

5454
nrf.sdk.path={build.core.path}/SDK
5555
rtos.path={build.core.path}/freertos
@@ -70,13 +70,13 @@ compiler.elf2hex.extra_flags=
7070
# ----------------
7171

7272
## Compile c files
73-
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.nrf.flags} {build.lfclk_flags} {includes} "{source_file}" -o "{object_file}"
73+
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {build.debug_flags} {compiler.nrf.flags} {includes} "{source_file}" -o "{object_file}"
7474

7575
## Compile c++ files
76-
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {compiler.nrf.flags} {build.lfclk_flags} {includes} "{source_file}" -o "{object_file}"
76+
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.debug_flags} {compiler.nrf.flags} {includes} "{source_file}" -o "{object_file}"
7777

7878
## Compile S files
79-
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.lfclk_flags} {includes} "{source_file}" -o "{object_file}"
79+
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.debug_flags} {includes} "{source_file}" -o "{object_file}"
8080

8181
## Create archives
8282
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

0 commit comments

Comments
 (0)