From 8645b7c23b9d55ddc4e5927f52de5aa3da05a915 Mon Sep 17 00:00:00 2001 From: Daniel Mizyrycki Date: Sun, 8 Aug 2021 14:15:56 -0700 Subject: [PATCH] nrf: Enable source line on tracebacks. --- ports/nrf/mpconfigdevice_nrf51822.h | 8 ++++++++ ports/nrf/mpconfigdevice_nrf52832.h | 4 ++++ ports/nrf/mpconfigdevice_nrf52840.h | 4 ++++ ports/nrf/mpconfigdevice_nrf9160.h | 4 ++++ ports/nrf/mpconfigport.h | 1 - 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ports/nrf/mpconfigdevice_nrf51822.h b/ports/nrf/mpconfigdevice_nrf51822.h index d10e91a79e..67a81d2509 100644 --- a/ports/nrf/mpconfigdevice_nrf51822.h +++ b/ports/nrf/mpconfigdevice_nrf51822.h @@ -44,6 +44,14 @@ // Board overridable feature configuration. +#ifndef MICROPY_ENABLE_SOURCE_LINE +#if defined(BLUETOOTH_SD) +#define MICROPY_ENABLE_SOURCE_LINE (0) +#else +#define MICROPY_ENABLE_SOURCE_LINE (1) +#endif +#endif + #ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN #if defined(BLUETOOTH_SD) #define MICROPY_PY_ARRAY_SLICE_ASSIGN (0) diff --git a/ports/nrf/mpconfigdevice_nrf52832.h b/ports/nrf/mpconfigdevice_nrf52832.h index cc7bcbe9b4..fa9258f2ac 100644 --- a/ports/nrf/mpconfigdevice_nrf52832.h +++ b/ports/nrf/mpconfigdevice_nrf52832.h @@ -36,6 +36,10 @@ // Board overridable feature configuration. +#ifndef MICROPY_ENABLE_SOURCE_LINE +#define MICROPY_ENABLE_SOURCE_LINE (1) +#endif + #ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN #define MICROPY_PY_ARRAY_SLICE_ASSIGN (1) #endif diff --git a/ports/nrf/mpconfigdevice_nrf52840.h b/ports/nrf/mpconfigdevice_nrf52840.h index cc7bcbe9b4..fa9258f2ac 100644 --- a/ports/nrf/mpconfigdevice_nrf52840.h +++ b/ports/nrf/mpconfigdevice_nrf52840.h @@ -36,6 +36,10 @@ // Board overridable feature configuration. +#ifndef MICROPY_ENABLE_SOURCE_LINE +#define MICROPY_ENABLE_SOURCE_LINE (1) +#endif + #ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN #define MICROPY_PY_ARRAY_SLICE_ASSIGN (1) #endif diff --git a/ports/nrf/mpconfigdevice_nrf9160.h b/ports/nrf/mpconfigdevice_nrf9160.h index cc7bcbe9b4..fa9258f2ac 100644 --- a/ports/nrf/mpconfigdevice_nrf9160.h +++ b/ports/nrf/mpconfigdevice_nrf9160.h @@ -36,6 +36,10 @@ // Board overridable feature configuration. +#ifndef MICROPY_ENABLE_SOURCE_LINE +#define MICROPY_ENABLE_SOURCE_LINE (1) +#endif + #ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN #define MICROPY_PY_ARRAY_SLICE_ASSIGN (1) #endif diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 480368aaa1..af77ef69ca 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -55,7 +55,6 @@ #define MICROPY_REPL_EMACS_KEYS (0) #define MICROPY_REPL_AUTO_INDENT (1) #define MICROPY_KBD_EXCEPTION (1) -#define MICROPY_ENABLE_SOURCE_LINE (0) #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ) #if NRF51 #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_NONE)