summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glennbakke@gmail.com>2020-07-23 21:25:50 +0200
committerDamien George <damien@micropython.org>2021-08-08 23:17:55 +1000
commit4326e0880273431d5ee8fcc0b9b081e848fdc736 (patch)
tree34b1266498c8dbae8cf39dd929c1f63c0555149a
parentb0fd4372c4cb8fce22b6e90eb4deb5c7e34b9c21 (diff)
nrf/boards: Enable needed features for FAT/LFS1/LFS2.
Enable the following features for all boards except nrf51 boards with SoftDevice present: - MICROPY_VFS - MICROPY_PY_NRF - MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
-rw-r--r--ports/nrf/mpconfigdevice_nrf51822.h28
-rw-r--r--ports/nrf/mpconfigdevice_nrf52832.h16
-rw-r--r--ports/nrf/mpconfigdevice_nrf52840.h16
-rw-r--r--ports/nrf/mpconfigdevice_nrf9160.h16
4 files changed, 70 insertions, 6 deletions
diff --git a/ports/nrf/mpconfigdevice_nrf51822.h b/ports/nrf/mpconfigdevice_nrf51822.h
index 2f85c9f4c..d10e91a79 100644
--- a/ports/nrf/mpconfigdevice_nrf51822.h
+++ b/ports/nrf/mpconfigdevice_nrf51822.h
@@ -27,11 +27,19 @@
// Board overridable build configuration.
#ifndef MICROPY_MBFS
+#if defined(BLUETOOTH_SD)
#define MICROPY_MBFS (1)
+#else
+#define MICROPY_MBFS (0)
+#endif
#endif
#ifndef MICROPY_VFS
+#if defined(BLUETOOTH_SD)
#define MICROPY_VFS (0)
+#else
+#define MICROPY_VFS (1)
+#endif
#endif
// Board overridable feature configuration.
@@ -59,3 +67,23 @@
#define MICROPY_PY_UBINASCII (1)
#endif
#endif
+
+// Board overridable port specific feature configuration.
+
+#ifndef MICROPY_PY_NRF
+#if defined(BLUETOOTH_SD)
+#define MICROPY_PY_NRF (0)
+#else
+#define MICROPY_PY_NRF (1)
+#endif
+#endif
+
+// Board overridable hardware configuration.
+
+#ifndef MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
+#if defined(BLUETOOTH_SD)
+#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
+#else
+#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)
+#endif
+#endif
diff --git a/ports/nrf/mpconfigdevice_nrf52832.h b/ports/nrf/mpconfigdevice_nrf52832.h
index 2bfd047ca..cc7bcbe9b 100644
--- a/ports/nrf/mpconfigdevice_nrf52832.h
+++ b/ports/nrf/mpconfigdevice_nrf52832.h
@@ -27,11 +27,11 @@
// Board overridable build configuration.
#ifndef MICROPY_MBFS
-#define MICROPY_MBFS (1)
+#define MICROPY_MBFS (0)
#endif
#ifndef MICROPY_VFS
-#define MICROPY_VFS (0)
+#define MICROPY_VFS (1)
#endif
// Board overridable feature configuration.
@@ -47,3 +47,15 @@
#ifndef MICROPY_PY_UBINASCII
#define MICROPY_PY_UBINASCII (1)
#endif
+
+// Board overridable port specific feature configuration.
+
+#ifndef MICROPY_PY_NRF
+#define MICROPY_PY_NRF (1)
+#endif
+
+// Board overridable hardware configuration.
+
+#ifndef MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
+#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)
+#endif
diff --git a/ports/nrf/mpconfigdevice_nrf52840.h b/ports/nrf/mpconfigdevice_nrf52840.h
index 2bfd047ca..cc7bcbe9b 100644
--- a/ports/nrf/mpconfigdevice_nrf52840.h
+++ b/ports/nrf/mpconfigdevice_nrf52840.h
@@ -27,11 +27,11 @@
// Board overridable build configuration.
#ifndef MICROPY_MBFS
-#define MICROPY_MBFS (1)
+#define MICROPY_MBFS (0)
#endif
#ifndef MICROPY_VFS
-#define MICROPY_VFS (0)
+#define MICROPY_VFS (1)
#endif
// Board overridable feature configuration.
@@ -47,3 +47,15 @@
#ifndef MICROPY_PY_UBINASCII
#define MICROPY_PY_UBINASCII (1)
#endif
+
+// Board overridable port specific feature configuration.
+
+#ifndef MICROPY_PY_NRF
+#define MICROPY_PY_NRF (1)
+#endif
+
+// Board overridable hardware configuration.
+
+#ifndef MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
+#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)
+#endif
diff --git a/ports/nrf/mpconfigdevice_nrf9160.h b/ports/nrf/mpconfigdevice_nrf9160.h
index 2bfd047ca..cc7bcbe9b 100644
--- a/ports/nrf/mpconfigdevice_nrf9160.h
+++ b/ports/nrf/mpconfigdevice_nrf9160.h
@@ -27,11 +27,11 @@
// Board overridable build configuration.
#ifndef MICROPY_MBFS
-#define MICROPY_MBFS (1)
+#define MICROPY_MBFS (0)
#endif
#ifndef MICROPY_VFS
-#define MICROPY_VFS (0)
+#define MICROPY_VFS (1)
#endif
// Board overridable feature configuration.
@@ -47,3 +47,15 @@
#ifndef MICROPY_PY_UBINASCII
#define MICROPY_PY_UBINASCII (1)
#endif
+
+// Board overridable port specific feature configuration.
+
+#ifndef MICROPY_PY_NRF
+#define MICROPY_PY_NRF (1)
+#endif
+
+// Board overridable hardware configuration.
+
+#ifndef MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE
+#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1)
+#endif