clean up menu, add DEBUG Level menu

This commit is contained in:
hathach committed 2017-02-21 23:11:38 +07:00
1 parent 48bdfa7c59
commit 06cca54daa
3 files changed
+13 -28

No files matched your search

+8 -21
View File
@@ -15,18 +15,13 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
menu.chip=Chip
#menu.softdevice=Softdevice
#menu.version=Version
menu.lfclk=Low Frequency Clock
menu.board_variant=Board Variant
menu.debug=Debug Level
feather52.name=Adafruit Bluefruit nRF52 Feather
feather52.vid.0=0x10C4
feather52.pid.0=0xEA60
#feather52.upload.tool=sandeepmistry:openocd
feather52.upload.tool=nrfutil
feather52.upload.protocol=nrfutil
feather52.upload.interface=serial
@@ -36,7 +31,6 @@ feather52.upload.use_1200bps_touch=false
feather52.upload.wait_for_upload_port=false
feather52.upload.native_usb=false
#feather52.bootloader.tool=sandeepmistry:openocd
feather52.bootloader.tool=nrfjprog
feather52.build.mcu=cortex-m4
@@ -53,18 +47,11 @@ feather52.build.nrfutil=nrfutil
feather52.build.nrfutil.windows={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/win32/nrfutil.exe
feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil
feather52.menu.lfclk.lfxo=Crystal Oscillator
feather52.menu.lfclk.lfxo.build.lfclk_flags=-DUSE_LFXO
feather52.menu.lfclk.lfrc=RC Oscillator
feather52.menu.lfclk.lfrc.build.lfclk_flags=-DUSE_LFRC
feather52.menu.lfclk.lfsynt=Synthesized
feather52.menu.lfclk.lfsynt.build.lfclk_flags=-DUSE_LFSYNT
feather52.menu.debug.l0=Level 0 (Release)
feather52.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
#feather52.menu.softdevice.none=None
#feather52.menu.softdevice.none.softdevice=none
#feather52.menu.softdevice.s132=S132
#feather52.menu.softdevice.s132.softdevice=s132
#feather52.menu.softdevice.s132.softdeviceversion=2.0.1
#feather52.menu.softdevice.s132.upload.maximum_size=409600
#feather52.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132
#feather52.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld
feather52.menu.debug.l1=Level 1 (Error Mess)
feather52.menu.debug.l1.build.debug_flags=-DCFG_DEBUG=1
feather52.menu.debug.l2=Level 2 (TBD)
feather52.menu.debug.l2.build.debug_flags=-DCFG_DEBUG=2
+1 -3
View File
@@ -47,8 +47,6 @@ extern "C"
{
#endif
#define CFG_DEBUG 1
#define RETURN_VOID
//--------------------------------------------------------------------+
@@ -66,7 +64,7 @@ extern "C"
// VERIFY Helper
//--------------------------------------------------------------------+
#if CFG_DEBUG >= 1
// #define VERIFY_MESS(format, ...) printf("[%08ld] %s: %d: verify failed\n", get_millis(), __func__, __LINE__)
// #define VERIFY_MESS(format, ...) cprintf("[%08ld] %s: %d: verify failed\n", get_millis(), __func__, __LINE__)
#define VERIFY_MESS(_status) cprintf("%s: %d: verify failed, status = 0x%04X\n", __PRETTY_FUNCTION__, __LINE__, _status);
#else
#define VERIFY_MESS(_status)
+4 -4
View File
@@ -49,7 +49,7 @@ compiler.size.cmd=arm-none-eabi-size
# this can be overriden in boards.txt
build.extra_flags=
build.lfclk_flags=
build.debug_flags=
nrf.sdk.path={build.core.path}/SDK
rtos.path={build.core.path}/freertos
@@ -70,13 +70,13 @@ compiler.elf2hex.extra_flags=
# ----------------
## Compile c files
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}"
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}"
## Compile c++ files
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}"
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}"
## Compile S files
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}"
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}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"