Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

. #1556

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

. #1556

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 71 additions & 51 deletions Friend/firmware/firmware_v1.0/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,78 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "build_xiao_ble_sense_devkitv1",
"displayName": "Devkit V1",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with no external modules",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1.conf"
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "build_xiao_ble_sense_devkitv1",
"displayName": "Devkit V1",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with no external modules",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1.conf"
}
},{
"name": "build_xiao_ble_sense_devkitv1-spisd.",
"displayName": "Devkit V1 (with SPI SD)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with external SPI SD card module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1-spisd",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1-spisd.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv1-spisd.overlay"
},
{
"name": "build_xiao_ble_sense_devkitv1-spisd.",
"displayName": "Devkit V1 (with SPI SD)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v1 device with external SPI SD card module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv1-spisd",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv1-spisd.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv1-spisd.overlay"
}
},{
"name": "build_xiao_ble_sense_devkitv2-adafruit.",
"displayName": "Devkit V2 (with Adafruit BFF Module)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v2 device with adafruit audio bff module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv2-adafruit",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv2-adafruit.overlay"
},
{
"name": "build_xiao_ble_sense_devkitv2-adafruit.",
"displayName": "Devkit V2 (with Adafruit BFF Module)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v2 device with adafruit audio bff module",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv2-adafruit",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf52840",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-adafruit.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv2-adafruit.overlay"
}
},
{
"name": "build_xiao_ble_sense_devkitv2-5340.",
"displayName": "Devkit V2 (with nrf5340)",
"configuration": "Debug",
"hidden": false,
"description": "Debug build for devkit v2 device with nrf5340",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/build_xiao_ble_sense_devkitv2-5340",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_BUILD_TYPE": "Debug",
"PLATFORM": "nrf5340",
"BOARD": "xiao_ble_sense",
"CACHED_CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-5340.conf",
"CONF_FILE": "${sourceDir}/prj_xiao_ble_sense_devkitv2-5340.conf",
"DTC_OVERLAY_FILE": "${sourceDir}/overlay/xiao_ble_sense_devkitv2-5340.overlay"
}
}
]
Expand Down
12 changes: 10 additions & 2 deletions Friend/firmware/firmware_v1.0/Kconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
source "Kconfig.zephyr"

menu "Friend Configuration"
menu "Omi Configuration"
config CODEC_OPUS
bool "Opus Audio Codec Support"
default n

config OFFLINE_STORAGE
bool "Offline SD Card Storage Support"
default n
Expand All @@ -18,3 +17,12 @@ config ENABLE_SPEAKER
bool "Enable the speaker!!"
default n
endmenu

menu "Build Configuration"
config LEGACY_SDK
bool "Using the legacy SDK(<=2.7.0)!!"
default y
config LEGACY_SOC
bool "Using the legacy SOC(nrf52840)!!"
default y
endmenu
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@

//&i2s0 {
// status = "okay";
// pinctrl-0 = <&i2s0_default>;
// pinctrl-names = "default";
// label = "I2S_0";
//};
//
//&pinctrl {
// i2s0_default: i2s0_default {
// group1 {
// psels = <NRF_PSEL(I2S_SCK_M, 0, 29)>, // SCK pin (bit clock) A3
// <NRF_PSEL(I2S_LRCK_M, 0, 28)>, // LRCK pin (word select clock) A2
// <NRF_PSEL(I2S_SDOUT, 0, 3)>; // SDOUT pin (data out) A1
// };
// };
//};
//
//&spi2 {
// status = "okay";
// pinctrl-0 = <&custom_spi>;
// pinctrl-1 = <&custom_spi>;
// pinctrl-names = "default", "sleep";
// cs-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; // CS pin on P0.28
//
// sdhc0: sdhc@0 {
// compatible = "zephyr,sdhc-spi-slot";
// reg = <0>;
// status = "okay";
// label = "SDHC_0";
// mmc {
// compatible = "zephyr,sdmmc-disk";
// status = "okay";
// };
// spi-max-frequency = <24000000>; // 24 MHz SPI speed for SD card
// };
//};
//
//&pinctrl {
// custom_spi: custom_spi {
// group1 {
// psels = <NRF_PSEL(SPIM_SCK, 1, 13)>, // SCK on P1.13
// <NRF_PSEL(SPIM_MOSI, 1, 15)>, // MOSI on P1.15
// <NRF_PSEL(SPIM_MISO, 1, 14)>; // MISO on P1.14
// };
// };
//};
//
//&uart0 {
// status = "disabled";
//};
//
//// &qspi {
//// status = "disabled";
//// };
//
//&i2c0 {
// lsm6ds3tr_c: lsm6ds3tr-c@6a {
// compatible = "st,lsm6dsl";
// reg = <0x6a>;
// irq-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
// status = "okay";
// label = "b";
// // wakeup-source = true;
// };
//};
//
//&i2c1{
// status = "disabled";
//};
//
//&temp {
// status = "disabled";
//};
//
//


//FOR 7002DK, ref: /opt/nordic/ncs/v2.8.0/zephyr/boards/nordic/nrf7002dk/nrf5340_cpuapp_common.dtsi
/ {
aliases {
led0 = &led0;
led1 = &led1;
led2 = &led1; // Fake led2
pwm-led0 = &pwm_led0;
sw0 = &button0;
sw1 = &button1;
bootloader-led0 = &led0;
mcuboot-button0 = &button0;
mcuboot-led0 = &led0;
watchdog0 = &wdt0;
};
};

// Fake accel
&i2c1 {
lsm6dsl: lsm6dsl@6b {
compatible = "st,lsm6dsl";
reg = <0x6b>;
label = "LSM6DSL";
};
};
Loading