You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/10/05 11:45:45 UTC

[incubator-nuttx] branch master updated (867c6d0 -> 0a1b3c1)

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 867c6d0  esp32: Add initial support to Bluetooth Low Energy
     new 47e804b  risc-v/esp32c3: Make BLE adapter code compliant to nxstyle
     new 0a1b3c1  risc-v/esp32c3-devkit: Add BLE defconfig

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c      | 12 +++++-----
 .../configs/{sotest => ble}/defconfig              | 27 ++++++++++++----------
 .../esp32c3-devkit/scripts/esp32c3.template.ld     |  2 ++
 .../nsh_romfsimg.h => scripts/esp32c3_aliases.ld}  | 14 +++++++----
 boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile  |  2 +-
 5 files changed, 33 insertions(+), 24 deletions(-)
 copy boards/risc-v/esp32c3/esp32c3-devkit/configs/{sotest => ble}/defconfig (74%)
 copy boards/risc-v/esp32c3/esp32c3-devkit/{include/nsh_romfsimg.h => scripts/esp32c3_aliases.ld} (72%)

[incubator-nuttx] 01/02: risc-v/esp32c3: Make BLE adapter code compliant to nxstyle

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 47e804b167f00769140bee8a082d60c74fa7d5cd
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Fri Oct 1 15:53:48 2021 -0300

    risc-v/esp32c3: Make BLE adapter code compliant to nxstyle
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c      | 12 ++++-----
 .../esp32c3-devkit/scripts/esp32c3.template.ld     |  2 ++
 .../esp32c3-devkit/scripts/esp32c3_aliases.ld      | 29 ++++++++++++++++++++++
 boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile  |  2 +-
 4 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c b/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c
index 62f9dc0..a2be855 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_ble_adapter.c
@@ -330,9 +330,9 @@ extern int btdm_hci_tl_io_event_post(int event);
 
 /* VHCI */
 
-extern bool API_vhci_host_check_send_available(void); /* Functions in bt lib */
-extern void API_vhci_host_send_packet(uint8_t * data, uint16_t len);
-extern int API_vhci_host_register_callback(const vhci_host_callback_t
+extern bool api_vhci_host_check_send_available(void); /* Functions in bt lib */
+extern void api_vhci_host_send_packet(uint8_t * data, uint16_t len);
+extern int api_vhci_host_register_callback(const vhci_host_callback_t
                                            *callback);
 
 /* TX power */
@@ -2404,7 +2404,7 @@ bool esp32c3_vhci_host_check_send_available(void)
       return false;
     }
 
-  return API_vhci_host_check_send_available();
+  return api_vhci_host_check_send_available();
 }
 
 /****************************************************************************
@@ -2428,7 +2428,7 @@ void esp32c3_vhci_host_send_packet(uint8_t *data, uint16_t len)
       return;
     }
 
-  API_vhci_host_send_packet(data, len);
+  api_vhci_host_send_packet(data, len);
 }
 
 /****************************************************************************
@@ -2452,7 +2452,7 @@ int esp32c3_vhci_register_callback(const esp_vhci_host_callback_t *callback)
       return ret;
     }
 
-  ret = API_vhci_host_register_callback(
+  ret = api_vhci_host_register_callback(
             (const vhci_host_callback_t *)callback) == 0 ? 0 : -1;
   return ret;
 }
diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld
index 82a3398..c637f53 100644
--- a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld
+++ b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3.template.ld
@@ -30,6 +30,8 @@
 
 #include <nuttx/config.h>
 
+#include "esp32c3_aliases.ld"
+
 #define SRAM_IRAM_START     0x4037c000
 #define SRAM_DRAM_START     0x3fc7c000
 
diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld
new file mode 100644
index 0000000..965d592
--- /dev/null
+++ b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld
@@ -0,0 +1,29 @@
+/****************************************************************************
+ * boards/risc-v/esp32c3/esp32c3-devkit/scripts/esp32c3_aliases.ld
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_ESP32C3_BLE
+
+/* Lower-case aliases for BLE library symbols not compliant to nxstyle */
+
+api_vhci_host_check_send_available = API_vhci_host_check_send_available;
+api_vhci_host_send_packet = API_vhci_host_send_packet;
+api_vhci_host_register_callback = API_vhci_host_register_callback;
+
+#endif
diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile b/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile
index f46c6cb..61ae8cf 100644
--- a/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile
+++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/Makefile
@@ -115,7 +115,7 @@ SCRIPTOUT = $(SCRIPTDIR)$(DELIM)esp32c3_out.ld
 .PHONY = context distclean
 
 $(SCRIPTOUT): $(SCRIPTIN) $(CONFIGFILE)
-	$(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(SCRIPTIN) -o $@
+	$(Q) $(CC) -isystem $(TOPDIR)/include -I $(BOARD_DIR)/scripts -C -P -x c -E $(SCRIPTIN) -o $@
 
 context:: $(SCRIPTOUT)
 

[incubator-nuttx] 02/02: risc-v/esp32c3-devkit: Add BLE defconfig

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 0a1b3c1331ed5cfba8466d7eeb0d660234075618
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Fri Oct 1 15:37:29 2021 -0300

    risc-v/esp32c3-devkit: Add BLE defconfig
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 .../esp32c3/esp32c3-devkit/configs/ble/defconfig   | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/ble/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/ble/defconfig
new file mode 100644
index 0000000..6e41ceb
--- /dev/null
+++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/ble/defconfig
@@ -0,0 +1,50 @@
+#
+# 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_ALLOW_BSD_COMPONENTS=y
+CONFIG_ARCH="risc-v"
+CONFIG_ARCH_BOARD="esp32c3-devkit"
+CONFIG_ARCH_BOARD_ESP32C3_DEVKIT=y
+CONFIG_ARCH_CHIP="esp32c3"
+CONFIG_ARCH_CHIP_ESP32C3=y
+CONFIG_ARCH_CHIP_ESP32C3WROOM02=y
+CONFIG_ARCH_INTERRUPTSTACK=1536
+CONFIG_ARCH_RISCV=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=16717
+CONFIG_BTSAK=y
+CONFIG_BUILTIN=y
+CONFIG_DRIVERS_BLUETOOTH=y
+CONFIG_DRIVERS_IEEE80211=y
+CONFIG_DRIVERS_WIRELESS=y
+CONFIG_ESP32C3_BLE=y
+CONFIG_FS_PROCFS=y
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+CONFIG_IDLETHREAD_STACKSIZE=3072
+CONFIG_INTELHEX_BINARY=y
+CONFIG_NAME_MAX=48
+CONFIG_NET_BLUETOOTH=y
+CONFIG_NET_SOCKOPTS=y
+CONFIG_NET_TCP=y
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_LINELEN=64
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_PTHREAD_MUTEX_TYPES=y
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_SIG_DEFAULT=y
+CONFIG_SPINLOCK=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+CONFIG_USER_ENTRYPOINT="nsh_main"
+CONFIG_WIRELESS=y
+CONFIG_WIRELESS_BLUETOOTH=y