Skip to content

Commit 7b7a69b

Browse files
committed
zephyr: Move XIAO BLE NRF52840 SENSE files into board-specific subdirectory.
Signed-off-by: Ned Konz <ned@metamagix.tech>
1 parent a3f067d commit 7b7a69b

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

ports/zephyr/boards/xiao_ble_nrf52840_sense.conf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
CONFIG_NETWORKING=n
44
CONFIG_CONSOLE_SUBSYS=n
55

6-
# for PDM microphone, set CONFIG_AUDIO=y (also enable in overlay)
6+
# for PDM microphone, set these three to y
7+
# and also enable in overlay
78
CONFIG_AUDIO=n
8-
CONFIG_AUDIO_DMIC=y
9-
CONFIG_AUDIO_DMIC_NRFX_PDM=y
9+
CONFIG_AUDIO_DMIC=n
10+
CONFIG_AUDIO_DMIC_NRFX_PDM=n
1011

1112
# Enable Bluetooth
1213
CONFIG_BT=y
1314
CONFIG_BT_PERIPHERAL=y
1415
CONFIG_BT_CENTRAL=y
15-
CONFIG_BT_DEVICE_NAME="XIAO nRF52840 Sense"
16+
CONFIG_BT_DEVICE_NAME="XIAO BLE nRF52840 Sense"
1617
CONFIG_BT_GATT_DYNAMIC_DB=y
1718
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
1819
CONFIG_BT_GATT_CLIENT=y
@@ -45,9 +46,10 @@ CONFIG_MICROPY_VFS_LFS2=y
4546
CONFIG_MICROPY_VFS_FAT=y
4647

4748
CONFIG_MICROPY_FROZEN_MODULES=y
48-
CONFIG_MICROPY_FROZEN_MANIFEST="boards/manifest_xiao_ble_nrf52840_sense.py"
49-
CONFIG_MICROPY_CONFIGFILE="boards/mpconfigport-xiao.h"
49+
CONFIG_MICROPY_FROZEN_MANIFEST="boards/xiao_ble_nrf52840_sense/manifest.py"
50+
CONFIG_MICROPY_CONFIGFILE="boards/xiao_ble_nrf52840_sense/mpconfigport.h"
5051

52+
# Using PicoLibC instead of Newlib saves around 7k of flash.
5153
CONFIG_NEWLIB_LIBC=n
5254
CONFIG_PICOLIBC=y
5355
CONFIG_PICOLIBC_USE_MODULE=n
@@ -59,7 +61,6 @@ CONFIG_THREAD_STACK_INFO=y
5961

6062
# For using the on-board LSM6DS accelerometer with the zsensor code.
6163
CONFIG_SENSOR=y
62-
CONFIG_LSM6DSL_TRIGGER_GLOBAL_THREAD=y # Not sure that this is useful.
6364

6465
CONFIG_LOG=n
6566
CONFIG_FP16=n

ports/zephyr/boards/manifest_xiao_ble_nrf52840_sense.py renamed to ports/zephyr/boards/xiao_ble_nrf52840_sense/manifest.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This is an example frozen module manifest. Enable this by configuring
2-
# the Zephyr project and enabling the frozen modules config feature.
3-
41
# freeze("../modules")
52
include("$(MPY_DIR)/extmod/asyncio")
63

ports/zephyr/boards/mpconfigport-xiao.h renamed to ports/zephyr/boards/xiao_ble_nrf52840_sense/mpconfigport.h

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,12 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include "mpconfigport.h"
27+
#include "../mpconfigport.h"
28+
29+
#undef MICROPY_CONFIG_ROM_LEVEL
30+
#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES)
2831

29-
#define MICROPY_PY_ASYNCIO (1)
30-
#define MICROPY_PY_BUILTINS_HELP_MODULES (1)
31-
#define MICROPY_PY_BUILTINS_INPUT (1)
32-
#define MICROPY_PY_COLLECTIONS_DEQUE (1)
33-
#define MICROPY_PY_JSON (1)
34-
#define MICROPY_PY_MICROPYTHON_RINGIO (1)
35-
#define MICROPY_PY_RANDOM (1)
36-
#define MICROPY_PY_RANDOM_EXTRA_FUNCS (1) // for random.uniform
37-
#define MICROPY_PY_RE (1)
38-
#define MICROPY_PY_RE_MATCH_GROUPS (1)
39-
#define MICROPY_PY_RE_SPAN_START_END (1)
40-
#define MICROPY_PY_SELECT (1)
4132
#define MICROPY_PY_SYS_MODULES (1)
42-
#define MICROPY_PY_UCTYPES (1)
4333

4434
// This is not enabled currently, pending merge of PR #17615
4535
#define MICROPY_HW_ENABLE_ADC (0)

0 commit comments

Comments
 (0)