From 285ffe4536cbc60dd36fa55113e6effb952c48cb Mon Sep 17 00:00:00 2001 From: Laczen JMS Date: Fri, 13 Dec 2024 17:23:52 +0100 Subject: [PATCH 1/2] boards: add nimble defconfig to esp32c3-generic Add a configuration for ble using nimble on esp32c3-generic Signed-off-by: Laczen JMS --- .../esp32c3-generic/configs/nimble/defconfig | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 boards/risc-v/esp32c3/esp32c3-generic/configs/nimble/defconfig diff --git a/boards/risc-v/esp32c3/esp32c3-generic/configs/nimble/defconfig b/boards/risc-v/esp32c3/esp32c3-generic/configs/nimble/defconfig new file mode 100644 index 0000000000000..bb3ae405fca72 --- /dev/null +++ b/boards/risc-v/esp32c3/esp32c3-generic/configs/nimble/defconfig @@ -0,0 +1,70 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_NETDEVICES is not set +# CONFIG_NIMBLE_PORTING_EXAMPLE is not set +# CONFIG_NSH_ARGCAT is not set +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +# CONFIG_WIRELESS_BLUETOOTH_HOST is not set +CONFIG_ALLOW_BSD_COMPONENTS=y +CONFIG_ARCH="risc-v" +CONFIG_ARCH_BOARD="esp32c3-generic" +CONFIG_ARCH_BOARD_COMMON=y +CONFIG_ARCH_BOARD_ESP32C3_GENERIC=y +CONFIG_ARCH_CHIP="esp32c3" +CONFIG_ARCH_CHIP_ESP32C3_GENERIC=y +CONFIG_ARCH_INTERRUPTSTACK=1536 +CONFIG_ARCH_RISCV=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_BOARDCTL_RESET=y +CONFIG_BOARD_LOOPSPERMSEC=15000 +CONFIG_BUILTIN=y +CONFIG_DEV_ZERO=y +CONFIG_DRIVERS_BLUETOOTH=y +CONFIG_DRIVERS_WIRELESS=y +CONFIG_ESPRESSIF_BLE=y +CONFIG_ESPRESSIF_USBSERIAL=y +CONFIG_EXAMPLES_NIMBLE=y +CONFIG_FS_PROCFS=y +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +CONFIG_IDLETHREAD_STACKSIZE=2048 +CONFIG_INIT_ENTRYPOINT="nsh_main" +CONFIG_INTELHEX_BINARY=y +CONFIG_IOB_NBUFFERS=24 +CONFIG_IOB_NCHAINS=24 +CONFIG_LIBC_PERROR_STDOUT=y +CONFIG_LIBC_STRERROR=y +CONFIG_NAME_MAX=48 +CONFIG_NETDEV_LATEINIT=y +CONFIG_NET_BLUETOOTH=y +CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 +CONFIG_NIMBLE=y +CONFIG_NIMBLE_ROLE_PERIPHERAL=y +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_DISABLE_DATE=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_READLINE=y +CONFIG_NSH_STRERROR=y +CONFIG_PREALLOC_MQ_MSGS=32 +CONFIG_PREALLOC_TIMERS=0 +CONFIG_PTHREAD_MUTEX_TYPES=y +CONFIG_RR_INTERVAL=200 +CONFIG_RTC_ALARM=y +CONFIG_SCHED_BACKTRACE=y +CONFIG_SCHED_WAITPID=y +CONFIG_SIG_DEFAULT=y +CONFIG_SIG_EVTHREAD=y +CONFIG_START_DAY=13 +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2024 +CONFIG_SYSTEM_DUMPSTACK=y +CONFIG_SYSTEM_NSH=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_BLUETOOTH=y From 3d84e680865a02d8a5d6ec0e4ebf947ec9b54390 Mon Sep 17 00:00:00 2001 From: Laczen JMS Date: Fri, 13 Dec 2024 17:54:31 +0100 Subject: [PATCH 2/2] Documentation: add (nim)ble on esp32c3 Modify documentation of esp32c3 and add nimble section to esp32c3-generic. Signed-off-by: Laczen JMS --- .../risc-v/esp32c3/boards/esp32c3-generic/index.rst | 12 ++++++++++++ Documentation/platforms/risc-v/esp32c3/index.rst | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst index c4685a347b0b4..cfa22f8fc2f74 100644 --- a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst +++ b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst @@ -171,6 +171,18 @@ You can scan for all I2C devices using the following command:: nsh> i2c dev 0x00 0x7f +nimble +------ + +This configuration can be used to test ble using the nimble library. The +``nimble`` example starts advertising and can be connected to or disconnected +from. Before starting the ``nimble`` example make sure the bnep0 interface is +up by issuing:: + + nsh> ifup bnep0 + ifup bnep0...OK + nsh> nimble & + nsh --- diff --git a/Documentation/platforms/risc-v/esp32c3/index.rst b/Documentation/platforms/risc-v/esp32c3/index.rst index 39873414813b2..d4e8808fac7e9 100644 --- a/Documentation/platforms/risc-v/esp32c3/index.rst +++ b/Documentation/platforms/risc-v/esp32c3/index.rst @@ -287,7 +287,7 @@ Peripheral Support NOTES =========== ======= ==================== ADC No AES No -Bluetooth No +Bluetooth Yes CAN/TWAI Yes CDC Console Yes Rev.3 DMA Yes