summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mizyrycki <mzdaniel@glidelink.net>2021-08-08 14:15:56 -0700
committerDamien George <damien@micropython.org>2021-08-09 15:09:33 +1000
commit8645b7c23b9d55ddc4e5927f52de5aa3da05a915 (patch)
tree9fdd82befb499aab218966e081561c92e6ba208a
parent77b4cfcbc9d2f46cb275fb6027999a1bfc0feb77 (diff)
nrf: Enable source line on tracebacks.
-rw-r--r--ports/nrf/mpconfigdevice_nrf51822.h8
-rw-r--r--ports/nrf/mpconfigdevice_nrf52832.h4
-rw-r--r--ports/nrf/mpconfigdevice_nrf52840.h4
-rw-r--r--ports/nrf/mpconfigdevice_nrf9160.h4
-rw-r--r--ports/nrf/mpconfigport.h1
5 files changed, 20 insertions, 1 deletions
diff --git a/ports/nrf/mpconfigdevice_nrf51822.h b/ports/nrf/mpconfigdevice_nrf51822.h
index d10e91a79..67a81d250 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 cc7bcbe9b..fa9258f2a 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 cc7bcbe9b..fa9258f2a 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 cc7bcbe9b..fa9258f2a 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 480368aaa..af77ef69c 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)