(nuttx) branch master updated (3cc65d5d35 -> 97ec55db46)

2024-05-29 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 3cc65d5d35 timers/mcp794xx: add option to digital trimming
 new 047c9fce40 libc.csv: Guard execv with LIBC_EXECFUNCS
 new 97ec55db46 syscall.csv: Correct macro guard of setsockopt

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:
 libs/libc/libc.csv  | 2 +-
 syscall/syscall.csv | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



(nuttx) 01/02: libc.csv: Guard execv with LIBC_EXECFUNCS

2024-05-29 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 047c9fce40a6b39bce60a08ceea45f09f4c5571b
Author: Huang Qi 
AuthorDate: Wed May 29 10:04:51 2024 +0800

libc.csv: Guard execv with LIBC_EXECFUNCS

execv only available if LIBC_EXECFUNCS enabled.

Signed-off-by: Huang Qi 
---
 libs/libc/libc.csv | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/libc/libc.csv b/libs/libc/libc.csv
index 2d7c77585d..3623e7ff62 100644
--- a/libs/libc/libc.csv
+++ b/libs/libc/libc.csv
@@ -52,7 +52,7 @@
 "dq_remfirst","nuttx/queue.h","","FAR dq_entry_t *","FAR dq_queue_t *"
 "dq_remlast","nuttx/queue.h","","FAR dq_entry_t *","FAR dq_queue_t *"
 "ether_ntoa","netinet/ether.h","","FAR char *","FAR const struct ether_addr *"
-"execv","unistd.h","","int","FAR const char *","FAR char *const[]|FAR char 
*const *"
+"execv","unistd.h","defined(CONFIG_LIBC_EXECFUNCS)","int","FAR const char 
*","FAR char *const[]|FAR char *const *"
 "exit","stdlib.h","","noreturn","int"
 "fchdir","unistd.h","!defined(CONFIG_DISABLE_ENVIRON)","int","int"
 "fclose","stdio.h","defined(CONFIG_FILE_STREAM)","int","FAR FILE *"



(nuttx) 02/02: syscall.csv: Correct macro guard of setsockopt

2024-05-29 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 97ec55db465439aec7e45288849454b8635942a9
Author: Huang Qi 
AuthorDate: Wed May 29 10:14:30 2024 +0800

syscall.csv: Correct macro guard of setsockopt

setsockopt only available if both NET and  NET_SOCKOPTS enabled.

Signed-off-by: Huang Qi 
---
 syscall/syscall.csv | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/syscall/syscall.csv b/syscall/syscall.csv
index adb54f8c72..8a17ba0cba 100644
--- a/syscall/syscall.csv
+++ b/syscall/syscall.csv
@@ -154,7 +154,7 @@
 "setgid","unistd.h","defined(CONFIG_SCHED_USER_IDENTITY)","int","gid_t"
 "sethostname","unistd.h","","int","FAR const char *","size_t"
 
"setitimer","sys/time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","int","FAR
 const struct itimerval *","FAR struct itimerval *"
-"setsockopt","sys/socket.h","defined(CONFIG_NET)","int","int","int","int","FAR 
const void *","socklen_t"
+"setsockopt","sys/socket.h","defined(CONFIG_NET) && 
defined(CONFIG_NET_SOCKOPTS)","int","int","int","int","FAR const void 
*","socklen_t"
 "settimeofday","sys/time.h","","int","FAR const struct timeval *","FAR const 
struct timezone *"
 "setuid","unistd.h","defined(CONFIG_SCHED_USER_IDENTITY)","int","uid_t"
 "shm_open","sys/mman.h","defined(CONFIG_FS_SHMFS)","int","FAR const char 
*","int","mode_t"



(nuttx-apps) branch master updated: Fix Error: usrsocktest_basic_connect.c:112:7: error: variable 'ret' set but not used

2024-05-22 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f228ee1e4 Fix Error: usrsocktest_basic_connect.c:112:7: error: 
variable 'ret' set but not used
f228ee1e4 is described below

commit f228ee1e4f7ab9861b1e6357f39395b4f2afc801
Author: Xiang Xiao 
AuthorDate: Wed May 22 09:40:40 2024 +0800

Fix Error: usrsocktest_basic_connect.c:112:7: error: variable 'ret' set but 
not used

Signed-off-by: Xiang Xiao 
---
 examples/usrsocktest/usrsocktest_basic_connect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/usrsocktest/usrsocktest_basic_connect.c 
b/examples/usrsocktest/usrsocktest_basic_connect.c
index 215cdeef7..0f639856a 100644
--- a/examples/usrsocktest/usrsocktest_basic_connect.c
+++ b/examples/usrsocktest/usrsocktest_basic_connect.c
@@ -114,13 +114,13 @@ static void teardown(void)
   if (sd >= 0)
 {
   ret = close(sd);
-  assert(ret >= 0);
+  TEST_ASSERT_TRUE(ret >= 0);
 }
 
   if (started)
 {
   ret = usrsocktest_daemon_stop();
-  assert(ret == OK);
+  TEST_ASSERT_EQUAL(OK, ret);
 }
 }
 



(nuttx-apps) branch master updated: Fix Error: logcat_service.c:69:11: error: variable 'ret' set but not used

2024-05-20 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ca310eb29 Fix Error: logcat_service.c:69:11: error: variable 'ret' set 
but not used
ca310eb29 is described below

commit ca310eb295e3de423436455cb97581f43353fe83
Author: Xiang Xiao 
AuthorDate: Mon May 20 16:16:23 2024 +0800

Fix Error: logcat_service.c:69:11: error: variable 'ret' set but not used

Signed-off-by: Xiang Xiao 
---
 system/adb/logcat_service.c | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/system/adb/logcat_service.c b/system/adb/logcat_service.c
index 2b7e73eec..37405c2eb 100644
--- a/system/adb/logcat_service.c
+++ b/system/adb/logcat_service.c
@@ -66,9 +66,7 @@ static void logcat_on_kick(struct adb_service_s *service)
   logcat_service_t *svc = container_of(service, logcat_service_t, service);
   if (!svc->wait_ack)
 {
-  int ret;
-  ret = uv_poll_start(>poll, UV_READABLE, logcat_on_data_available);
-  assert(ret == 0);
+  uv_poll_start(>poll, UV_READABLE, logcat_on_data_available);
 }
 }
 
@@ -90,12 +88,9 @@ static void close_cb(uv_handle_t *handle)
 static void logcat_on_close(struct adb_service_s *service)
 {
   int fd;
-  int ret;
   logcat_service_t *svc = container_of(service, logcat_service_t, service);
 
-  ret = uv_fileno((uv_handle_t *)>poll, );
-  assert(ret == 0);
-
+  uv_fileno((uv_handle_t *)>poll, );
   close(fd);
   uv_close((uv_handle_t *)>poll, close_cb);
 }



(nuttx) branch master updated: sys/socket.h: add the definition of SCM_TIMESTAMP.

2024-05-15 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 53a72a31fb sys/socket.h: add the definition of SCM_TIMESTAMP.
53a72a31fb is described below

commit 53a72a31fbfa7a2c993274dafea50b5b120b5adb
Author: zhanghongyu 
AuthorDate: Tue May 14 19:16:13 2024 +0800

sys/socket.h: add the definition of SCM_TIMESTAMP.

Third-party library lcm will use SCM_TIMESTAMP macro definition

Signed-off-by: zhanghongyu 
---
 include/sys/socket.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/sys/socket.h b/include/sys/socket.h
index 05b13bdaaf..d723dfccae 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -288,6 +288,7 @@
 #define SCM_RIGHTS  0x01/* rw: access rights (array of int) */
 #define SCM_CREDENTIALS 0x02/* rw: struct ucred */
 #define SCM_SECURITY0x03/* rw: security label */
+#define SCM_TIMESTAMP   SO_TIMESTAMP
 
 /* Desired design of maximum size and alignment (see RFC2553) */
 



(nuttx) branch master updated: [net][udp] fix udp wrb-iob leak when NIC was down

2024-05-14 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new d199249769 [net][udp] fix udp wrb-iob leak when NIC was down
d199249769 is described below

commit d1992497692e4265684b8211d665fd42936c3b62
Author: meijian 
AuthorDate: Tue May 7 15:25:39 2024 +0800

[net][udp] fix udp wrb-iob leak when NIC was down

Signed-off-by: meijian 
---
 net/udp/udp_sendto_buffered.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/udp/udp_sendto_buffered.c b/net/udp/udp_sendto_buffered.c
index 5bcd43e609..67236db00b 100644
--- a/net/udp/udp_sendto_buffered.c
+++ b/net/udp/udp_sendto_buffered.c
@@ -151,12 +151,6 @@ static void sendto_writebuffer_release(FAR struct 
udp_conn_s *conn)
   wrb = (FAR struct udp_wrbuffer_s *)sq_remfirst(>write_q);
   DEBUGASSERT(wrb != NULL);
 
-  /* Do not need to release wb_iob, the life cycle of wb_iob is
-   * handed over to the network device
-   */
-
-  wrb->wb_iob = NULL;
-
   udp_wrbuffer_release(wrb);
 
   /* Set up for the next packet transfer by setting the connection
@@ -455,6 +449,12 @@ static uint16_t sendto_eventhandler(FAR struct 
net_driver_s *dev,
   dev->d_sndlen = wrb->wb_iob->io_pktlen - udpiplen;
   ninfo("wrb=%p sndlen=%d\n", wrb, dev->d_sndlen);
 
+  /* Do not need to release wb_iob, the life cycle of wb_iob is
+   * handed over to the network device
+   */
+
+  wrb->wb_iob = NULL;
+
 #ifdef NEED_IPDOMAIN_SUPPORT
   /* If both IPv4 and IPv6 support are enabled, then we will need to
* select which one to use when generating the outgoing packet.



(nuttx) branch master updated: sched/posixspawn: disable tedious logging

2024-05-10 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new a35b2a5cc7 sched/posixspawn: disable tedious logging
a35b2a5cc7 is described below

commit a35b2a5cc7ac3c66b95014c3ad34bbef5b8fbd59
Author: Yanfeng Liu 
AuthorDate: Fri May 10 10:31:47 2024 +0800

sched/posixspawn: disable tedious logging

This log appears for NSH internal commands in KERNEL build and
duplicates a lot with task_spawn: log. So drop it to make the
DEBUG_SCHED_INFO logging more readable.

Signed-off-by: Yanfeng Liu 
---
 sched/task/task_posixspawn.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sched/task/task_posixspawn.c b/sched/task/task_posixspawn.c
index b6000de462..66d62e4ca6 100644
--- a/sched/task/task_posixspawn.c
+++ b/sched/task/task_posixspawn.c
@@ -218,9 +218,6 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path,
 FAR const posix_spawnattr_t *attr,
 FAR char * const argv[], FAR char * const envp[])
 {
-  sinfo("pid=%p path=%s file_actions=%p attr=%p argv=%p\n",
-pid, path, file_actions, attr, argv);
-
   return nxposix_spawn_exec(pid, path,
 file_actions != NULL ?
 *file_actions : NULL, attr, argv, envp);



(nuttx) 02/02: risc-v/virt: enable gradeful shutdown in kernel build

2024-05-07 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit c9a2e4a6c531da8f81dd7d809552c5675893f131
Author: Yanfeng Liu 
AuthorDate: Mon May 6 14:01:40 2024 +0800

risc-v/virt: enable gradeful shutdown in kernel build

This enables graceful shutdown via `poweroff` command in `knsh64`
and `knsh32` configs.

Signed-off-by: Yanfeng Liu 
---
 boards/risc-v/qemu-rv/rv-virt/configs/knsh32/defconfig |  1 +
 boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig |  2 +-
 boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c| 15 +++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knsh32/defconfig 
b/boards/risc-v/qemu-rv/rv-virt/configs/knsh32/defconfig
index b18154e5b8..8e088fe67c 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/knsh32/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/knsh32/defconfig
@@ -42,6 +42,7 @@ CONFIG_ARCH_USE_MMU=y
 CONFIG_ARCH_USE_MPU=y
 CONFIG_ARCH_USE_S_MODE=y
 CONFIG_BINFMT_ELF_EXECUTABLE=y
+CONFIG_BOARDCTL_POWEROFF=y
 CONFIG_BOARD_LOOPSPERMSEC=6366
 CONFIG_BUILD_KERNEL=y
 CONFIG_DEBUG_ASSERTIONS=y
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig 
b/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig
index 5b4f6aca9a..fca3035cc7 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig
@@ -42,6 +42,7 @@ CONFIG_ARCH_USE_MMU=y
 CONFIG_ARCH_USE_MPU=y
 CONFIG_ARCH_USE_S_MODE=y
 CONFIG_BINFMT_ELF_EXECUTABLE=y
+CONFIG_BOARDCTL_POWEROFF=y
 CONFIG_BOARD_LOOPSPERMSEC=6366
 CONFIG_BUILD_KERNEL=y
 CONFIG_DEBUG_ASSERTIONS=y
@@ -62,7 +63,6 @@ CONFIG_INIT_MOUNT_FSTYPE="hostfs"
 CONFIG_INIT_MOUNT_SOURCE=""
 CONFIG_INIT_MOUNT_TARGET="/system"
 CONFIG_INIT_STACKSIZE=3072
-CONFIG_INTELHEX_BINARY=y
 CONFIG_LIBC_ENVPATH=y
 CONFIG_LIBC_EXECFUNCS=y
 CONFIG_LIBC_PERROR_STDOUT=y
diff --git a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c 
b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c
index 357ecba97a..aa38aedd32 100644
--- a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c
+++ b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c
@@ -36,6 +36,7 @@
 
 #include 
 
+#include "riscv_internal.h"
 #include "romfs.h"
 
 /
@@ -177,3 +178,17 @@ void board_late_initialize(void)
 
 #endif
 }
+
+#ifdef CONFIG_BOARDCTL_POWEROFF
+int board_power_off(int status)
+{
+#ifdef CONFIG_BUILD_KERNEL
+  riscv_sbi_system_reset(SBI_SRST_TYPE_SHUTDOWN, SBI_SRST_REASON_NONE);
+#else
+  #warning "to be done"
+#endif
+
+  UNUSED(status);
+  return 0;
+}
+#endif



(nuttx) branch master updated (908814a575 -> c9a2e4a6c5)

2024-05-07 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 908814a575 libc/lib_bzero:Add bzero prototype.
 new c352b04155 risc-v/sbi: add SRST extenstion usage in S-mode
 new c9a2e4a6c5 risc-v/virt: enable gradeful shutdown in kernel build

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/Kconfig   |  1 +
 arch/risc-v/src/common/riscv_internal.h| 17 +
 arch/risc-v/src/common/supervisor/riscv_sbi.c  | 10 --
 boards/risc-v/qemu-rv/rv-virt/configs/knsh32/defconfig |  1 +
 boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig |  2 +-
 boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c| 15 +++
 6 files changed, 43 insertions(+), 3 deletions(-)



(nuttx) 01/02: risc-v/sbi: add SRST extenstion usage in S-mode

2024-05-07 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit c352b04155c409cf54f333e1ee452a3bd05cca9d
Author: Yanfeng Liu 
AuthorDate: Mon May 6 13:54:09 2024 +0800

risc-v/sbi: add SRST extenstion usage in S-mode

This adds SBI specfication v0.3 based `riscv_sbi_system_reset()` to
support SBI firmware based system reset in kernel mode.

Signed-off-by: Yanfeng Liu 
---
 arch/Kconfig  |  1 +
 arch/risc-v/src/common/riscv_internal.h   | 17 +
 arch/risc-v/src/common/supervisor/riscv_sbi.c | 10 --
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 3efa5849d7..4a116607c8 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -92,6 +92,7 @@ config ARCH_RISCV
select ARCH_HAVE_RDWR_MEM_CPU_RUN
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_THREAD_LOCAL
+   select ARCH_HAVE_POWEROFF
select ARCH_HAVE_LAZYFPU if ARCH_HAVE_FPU
---help---
RISC-V 32 and 64-bit RV32 / RV64 architectures.
diff --git a/arch/risc-v/src/common/riscv_internal.h 
b/arch/risc-v/src/common/riscv_internal.h
index 4365a42e60..c54c8b3fea 100644
--- a/arch/risc-v/src/common/riscv_internal.h
+++ b/arch/risc-v/src/common/riscv_internal.h
@@ -173,6 +173,7 @@
 #define SBI_EXT_HSM 0x48534D
 #define SBI_EXT_IPI 0x735049
 #define SBI_EXT_TIME0x54494D45
+#define SBI_EXT_SRST0x53525354
 
 /* SBI function IDs for TIME extension */
 
@@ -186,6 +187,21 @@
 
 #define SBI_EXT_IPI_SEND_IPI  0x0
 
+/* SBI function IDs for SRST extension */
+
+#define SBI_EXT_SRST_SYS_RESET 0x0
+
+/* SBI system reset type */
+
+#define SBI_SRST_TYPE_SHUTDOWN0
+#define SBI_SRST_TYPE_REBOOT_COLD 1
+#define SBI_SRST_TYPE_REBOOT_WARM 1
+
+/* SBI system reset reason */
+
+#define SBI_SRST_REASON_NONE  0
+#define SBI_SRST_REASON_FAILURE   1
+
 /
  * Public Types
  /
@@ -335,6 +351,7 @@ void riscv_sbi_set_timer(uint64_t stime_value);
 uint64_t riscv_sbi_get_time(void);
 uintptr_t riscv_sbi_boot_secondary(uint32_t hartid, uintptr_t addr,
uintptr_t a1);
+uintptr_t riscv_sbi_system_reset(uint32_t type, uint32_t reason);
 #endif
 
 /* Power management */
diff --git a/arch/risc-v/src/common/supervisor/riscv_sbi.c 
b/arch/risc-v/src/common/supervisor/riscv_sbi.c
index da2e4c2dc0..865a4a6f9c 100644
--- a/arch/risc-v/src/common/supervisor/riscv_sbi.c
+++ b/arch/risc-v/src/common/supervisor/riscv_sbi.c
@@ -128,14 +128,20 @@ uint64_t riscv_sbi_get_time(void)
 uintptr_t riscv_sbi_send_ipi(uint32_t hmask, uintptr_t hbase)
 {
   return sbi_ecall(SBI_EXT_IPI, SBI_EXT_IPI_SEND_IPI,
-  hmask, hbase, 0, 0, 0, 0);
+   hmask, hbase, 0, 0, 0, 0);
 }
 
 #ifndef CONFIG_NUTTSBI
+uintptr_t riscv_sbi_system_reset(uint32_t type, uint32_t reason)
+{
+  return sbi_ecall(SBI_EXT_SRST, SBI_EXT_SRST_SYS_RESET,
+   type, reason, 0, 0, 0, 0);
+}
+
 uintptr_t riscv_sbi_boot_secondary(uint32_t hartid, uintptr_t addr,
uintptr_t a1)
 {
   return sbi_ecall(SBI_EXT_HSM, SBI_EXT_HSM_HART_START,
-  hartid, addr, a1, 0, 0, 0);
+   hartid, addr, a1, 0, 0, 0);
 }
 #endif /* CONFIG_NUTTSBI */



(nuttx) branch master updated: sched: Move dump.c to sched_dumponexit.c

2024-04-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 55e3cf7e2d sched: Move dump.c to sched_dumponexit.c
55e3cf7e2d is described below

commit 55e3cf7e2d9e12a1655a47f9b3fb1f74b3ef591e
Author: Xiang Xiao 
AuthorDate: Wed Apr 17 13:34:45 2024 +0800

sched: Move dump.c to sched_dumponexit.c

The dump.c is a part of sched module, so move it to sched directory.

Signed-off-by: Xiang Xiao 
---
 sched/misc/CMakeLists.txt   | 4 
 sched/misc/Make.defs| 4 
 sched/sched/CMakeLists.txt  | 4 
 sched/sched/Make.defs   | 4 
 sched/{misc/dump.c => sched/sched_dumponexit.c} | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/sched/misc/CMakeLists.txt b/sched/misc/CMakeLists.txt
index dc410e7121..efee973ed2 100644
--- a/sched/misc/CMakeLists.txt
+++ b/sched/misc/CMakeLists.txt
@@ -24,10 +24,6 @@ if(CONFIG_ARCH_DEADLOCKDUMP)
   list(APPEND SRCS deadlock.c)
 endif()
 
-if(CONFIG_DUMP_ON_EXIT)
-  list(APPEND SRCS dump.c)
-endif()
-
 if(CONFIG_BOARD_COREDUMP_SYSLOG OR CONFIG_BOARD_COREDUMP_BLKDEV)
   list(APPEND SRCS coredump.c)
 endif()
diff --git a/sched/misc/Make.defs b/sched/misc/Make.defs
index 08142fadf3..ca27b7405c 100644
--- a/sched/misc/Make.defs
+++ b/sched/misc/Make.defs
@@ -24,10 +24,6 @@ ifeq ($(CONFIG_ARCH_DEADLOCKDUMP),y)
 CSRCS += deadlock.c
 endif
 
-ifeq ($(CONFIG_DUMP_ON_EXIT),y)
-CSRCS += dump.c
-endif
-
 ifneq ($(CONFIG_BOARD_COREDUMP_SYSLOG)$(CONFIG_BOARD_COREDUMP_BLKDEV),)
 CSRCS += coredump.c
 endif
diff --git a/sched/sched/CMakeLists.txt b/sched/sched/CMakeLists.txt
index 29ac1b6346..998c82f0c3 100644
--- a/sched/sched/CMakeLists.txt
+++ b/sched/sched/CMakeLists.txt
@@ -120,6 +120,10 @@ if(CONFIG_SCHED_BACKTRACE)
   list(APPEND SRCS sched_backtrace.c)
 endif()
 
+if(CONFIG_DUMP_ON_EXIT)
+  list(APPEND SRCS sched_dumponexit.c)
+endif()
+
 if(CONFIG_SMP_CALL)
   list(APPEND SRCS sched_smp.c)
 endif()
diff --git a/sched/sched/Make.defs b/sched/sched/Make.defs
index 422f010738..2ff311780e 100644
--- a/sched/sched/Make.defs
+++ b/sched/sched/Make.defs
@@ -96,6 +96,10 @@ ifeq ($(CONFIG_SCHED_BACKTRACE),y)
 CSRCS += sched_backtrace.c
 endif
 
+ifeq ($(CONFIG_DUMP_ON_EXIT),y)
+CSRCS += sched_dumponexit.c
+endif
+
 ifeq ($(CONFIG_SMP_CALL),y)
 CSRCS += sched_smp.c
 endif
diff --git a/sched/misc/dump.c b/sched/sched/sched_dumponexit.c
similarity index 99%
rename from sched/misc/dump.c
rename to sched/sched/sched_dumponexit.c
index d8aebbd9f0..f1a07bd946 100644
--- a/sched/misc/dump.c
+++ b/sched/sched/sched_dumponexit.c
@@ -1,5 +1,5 @@
 /
- * sched/misc/dump.c
+ * sched/sched/sched_dumponexit.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with



(nuttx) branch master updated: riscv: Add Vector CSRs to csr.h

2024-04-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 93d75129de riscv: Add Vector CSRs to csr.h
93d75129de is described below

commit 93d75129de204ba982dc046676390ebeb561e287
Author: Huang Qi 
AuthorDate: Thu Apr 18 16:44:57 2024 +0800

riscv: Add Vector CSRs to csr.h

The CSR register definitions from RVV 1.0 spec: 
https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#vector-registers

Signed-off-by: Huang Qi 
---
 arch/risc-v/include/csr.h | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/risc-v/include/csr.h b/arch/risc-v/include/csr.h
index 90d9543bdc..6102b620e5 100644
--- a/arch/risc-v/include/csr.h
+++ b/arch/risc-v/include/csr.h
@@ -304,6 +304,16 @@
 #define CSR_DSCRATCH0   0x7b2 /* Debug Scratch 0 */
 #define CSR_DSCRATCH1   0x7b3 /* Debug Scratch 1 */
 
+/* Vector CSRs */
+
+#define CSR_VSTART  0x008 /* Vector Start Position */
+#define CSR_VXSAT   0x009 /* Fixed-Point Saturate Flag */
+#define CSR_VXRM0x00a /* Fixed-Point Rounding Mode */
+#define CSR_VCSR0x00f /* Vector Control and Status */
+#define CSR_VL  0xc20 /* Vector Length */
+#define CSR_VTYPE   0xc21 /* Vector Data Type */
+#define CSR_VLENB   0xc22 /* Vector Length in Bytes (VLEN/8) */
+
 /* In mstatus register */
 
 #define MSTATUS_UIE (0x1 << 0)  /* User Interrupt Enable */



(nuttx) branch master updated: sched/irq: remove scheduling check in csection

2024-04-12 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 1b068b0d4b sched/irq: remove scheduling check in csection
1b068b0d4b is described below

commit 1b068b0d4b70a1204d0282569affe54cdeb2f07c
Author: hujun5 
AuthorDate: Wed Apr 10 10:06:27 2024 +0800

sched/irq: remove scheduling check in csection

1. The critical section does not prevent task scheduling
2. If the critical section is in sched_lock, there is no need to check,
   scheduling is not going to happen
3. If sched_lock is in the critical section, sched_unlock will also
   trigger scheduling without waiting for the exit of the critical section
4. After exiting the critical section, if there is an interrupt,
   the scheduling will be automatically triggered

Signed-off-by: hujun5 
---
 sched/irq/irq_csection.c | 29 -
 1 file changed, 29 deletions(-)

diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c
index b56ab2375d..83c4a65f7b 100644
--- a/sched/irq/irq_csection.c
+++ b/sched/irq/irq_csection.c
@@ -550,35 +550,6 @@ void leave_critical_section(irqstate_t flags)
   DEBUGASSERT(spin_is_locked(_cpu_irqlock) &&
   (g_cpu_irqset & (1 << cpu)) != 0);
 
-  /* Check if releasing the lock held by this CPU will unlock the
-   * critical section.
-   */
-
-  if ((g_cpu_irqset & ~(1 << cpu)) == 0)
-{
-  /* Yes.. Check if there are pending tasks and that pre-
-   * emption is also enabled.  This is necessary because we
-   * may have deferred the nxsched_merge_pending() call in
-   * sched_unlock() because we were within a critical
-   * section then.
-   */
-
-  if (list_pendingtasks()->head != NULL &&
-  !nxsched_islocked_global())
-{
-  /* Release any ready-to-run tasks that have collected
-   * in g_pendingtasks.  NOTE: This operation has a very
-   * high likelihood of causing this task to be switched
-   * out!
-   */
-
-  if (nxsched_merge_pending())
-{
-  up_switch_context(this_task(), rtcb);
-}
-}
-}
-
   /* Now, possibly on return from a context switch, clear our
* count on the lock.  If all CPUs have released the lock,
* then unlock the global IRQ spinlock.



(nuttx) branch master updated: net: Optimize TCP/UDP port selection

2024-04-12 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new e543a8086e net: Optimize TCP/UDP port selection
e543a8086e is described below

commit e543a8086e2a2f91b562308ebf3957b4ceaa8e08
Author: Zhe Weng 
AuthorDate: Fri Apr 12 11:11:54 2024 +0800

net: Optimize TCP/UDP port selection

Optimize TCP/UDP port selection, and fix possibly dead loop.

Finish discussion in 
https://github.com/apache/nuttx/pull/12116#discussion_r1560851977

Note:
Linux also uses EADDRINUSE for failing in finding a portno, according to 
https://man7.org/linux/man-pages/man2/bind.2.html

Signed-off-by: Zhe Weng 
---
 net/nat/nat.c | 23 --
 net/tcp/tcp_conn.c| 28 ++
 net/udp/udp.h |  3 +++
 net/udp/udp_conn.c| 46 ++-
 net/udp/udp_sendto_buffered.c |  5 +
 net/utils/utils.h | 41 ++
 6 files changed, 91 insertions(+), 55 deletions(-)

diff --git a/net/nat/nat.c b/net/nat/nat.c
index edf3bd88a0..454efd516b 100644
--- a/net/nat/nat.c
+++ b/net/nat/nat.c
@@ -32,25 +32,10 @@
 #include "nat/nat.h"
 #include "tcp/tcp.h"
 #include "udp/udp.h"
+#include "utils/utils.h"
 
 #ifdef CONFIG_NET_NAT
 
-/
- * Pre-processor Definitions
- /
-
-#define NEXT_PORT(nport, hport) \
-  do \
-{ \
-  ++(hport); \
-  if ((hport) >= CONFIG_NET_DEFAULT_MAX_PORT || \
-  (hport) < CONFIG_NET_DEFAULT_MIN_PORT) \
-{ \
-  (hport) = CONFIG_NET_DEFAULT_MIN_PORT; \
-} \
-  (nport) = HTONS(hport); \
-} while (0)
-
 /
  * Private Functions
  /
@@ -86,7 +71,7 @@ static uint16_t nat_port_select_without_stack(
   uint16_t hport = NTOHS(portno);
   while (nat_port_inuse(domain, protocol, ip, portno))
 {
-  NEXT_PORT(portno, hport);
+  NET_PORT_NEXT_NH(portno, hport);
   if (portno == local_port)
 {
   /* We have looped back, failed. */
@@ -308,7 +293,7 @@ uint16_t nat_port_select(FAR struct net_driver_s *dev,
   while (icmp_findconn(dev, id) ||
  nat_port_inuse(domain, IP_PROTO_ICMP, external_ip, id))
 {
-  NEXT_PORT(id, hid);
+  NET_PORT_NEXT_NH(id, hid);
   if (id == local_port)
 {
   /* We have looped back, failed. */
@@ -334,7 +319,7 @@ uint16_t nat_port_select(FAR struct net_driver_s *dev,
   while (icmpv6_active(id) ||
  nat_port_inuse(domain, IP_PROTO_ICMP6, external_ip, id))
 {
-  NEXT_PORT(id, hid);
+  NET_PORT_NEXT_NH(id, hid);
   if (id == local_port)
 {
   /* We have looped back, failed. */
diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c
index 1deac8d001..1ffa35fa0e 100644
--- a/net/tcp/tcp_conn.c
+++ b/net/tcp/tcp_conn.c
@@ -583,38 +583,30 @@ int tcp_selectport(uint8_t domain,
 
   if (g_last_tcp_port == 0)
 {
-  net_getrandom(_last_tcp_port, sizeof(uint16_t));
-
-  g_last_tcp_port = g_last_tcp_port %
-(CONFIG_NET_DEFAULT_MAX_PORT -
- CONFIG_NET_DEFAULT_MIN_PORT + 1);
-  g_last_tcp_port += CONFIG_NET_DEFAULT_MIN_PORT;
+  NET_PORT_RANDOM_INIT(g_last_tcp_port);
 }
 
   if (portno == 0)
 {
+  uint16_t loop_start = g_last_tcp_port;
+
   /* No local port assigned. Loop until we find a valid listen port
-   * number that is not being used by any other connection. NOTE the
-   * following loop is assumed to terminate but could not if all
-   * 32000-4096+1 ports are in used (unlikely).
+   * number that is not being used by any other connection.
*/
 
   do
 {
   /* Guess that the next available port number will be the one after
-   * the last port number assigned. Make sure that the port number
-   * is within range.
+   * the last port number assigned.
*/
 
-  ++g_last_tcp_port;
-
-  if (g_last_tcp_port > CONFIG_NET_DEFAULT_MAX_PORT ||
-  g_last_tcp_port < CONFIG_NET_DEFAULT_MIN_PORT)
+  NET_PORT_NEXT_NH(portno, g_last_tcp_port);
+  if (g_last_tcp_port == loop_start)
 {
-  g_last_tcp_port = CONFIG_NET_DEFAULT_MIN_PORT;
-}
+  /* We have looped back, fa

(nuttx) branch master updated: mm/map: minor reformating

2024-04-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 24df2cc177 mm/map: minor reformating
24df2cc177 is described below

commit 24df2cc1773953df5628c190a2354c0eaee93f43
Author: Yanfeng Liu 
AuthorDate: Thu Apr 11 10:39:48 2024 +0800

mm/map: minor reformating

This is for easier grep searching.

Signed-off-by: Yanfeng Liu 
---
 mm/map/vm_region.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/map/vm_region.c b/mm/map/vm_region.c
index 765f62bcbc..c707e57490 100644
--- a/mm/map/vm_region.c
+++ b/mm/map/vm_region.c
@@ -62,8 +62,7 @@ FAR void *vm_alloc_region(FAR struct mm_map_s *mm, FAR void 
*vaddr,
 }
   else
 {
-  ret = gran_reserve(mm->mm_map_vpages, (uintptr_t)vaddr,
- size);
+  ret = gran_reserve(mm->mm_map_vpages, (uintptr_t)vaddr, size);
 }
 }
 



(nuttx) branch master updated: riscv: Add more debug related CSR definitions

2024-04-10 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 9e78b235fe riscv: Add more debug related CSR definitions
9e78b235fe is described below

commit 9e78b235fe9baf5256652fa27468ef58d84af052
Author: Huang Qi 
AuthorDate: Wed Apr 10 15:55:44 2024 +0800

riscv: Add more debug related CSR definitions

This patch adds more debug related CSR definitions
to arch/risc-v/include/csr.h.

These definitions are from the RISC-V Debug Specification
Version 1.0 rc1 (https://github.com/riscv/riscv-debug-spec).

Signed-off-by: Huang Qi 
---
 arch/risc-v/include/csr.h | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/arch/risc-v/include/csr.h b/arch/risc-v/include/csr.h
index 00f5b15752..90d9543bdc 100644
--- a/arch/risc-v/include/csr.h
+++ b/arch/risc-v/include/csr.h
@@ -286,16 +286,23 @@
 
 /* Debug/Trace Registers */
 
-#define CSR_TSELECT 0x7a0
-#define CSR_TDATA1  0x7a1
-#define CSR_TDATA2  0x7a2
-#define CSR_TDATA3  0x7a3
+#define CSR_TSELECT 0x7a0 /* Trigger Select */
+#define CSR_TDATA1  0x7a1 /* Trigger Data 1 */
+#define CSR_TDATA2  0x7a2 /* Trigger Data 2 */
+#define CSR_TDATA3  0x7a3 /* Trigger Data 3 */
+#define CSR_TINFO   0x7a4 /* Trigger Info */
+#define CSR_TCONTROL0x7a5 /* Trigger Control */
+#define CSR_MCONTEXT0x7a8 /* Machine Context */
+#define CSR_MSCONTEXT   0x7aa /* Machine Supervisor Context */
+#define CSR_SCONTEXT0x5a8 /* Supervisor Context */
+#define CSR_HCONTEXT0x5aa /* Hypervisor Context */
 
 /* Debug interface CSRs */
 
-#define CSR_DCSR0x7b0
-#define CSR_DPC 0x7b1
-#define CSR_DSCRATCH0x7b2
+#define CSR_DCSR0x7b0 /* Debug Control and Status */
+#define CSR_DPC 0x7b1 /* Debug PC */
+#define CSR_DSCRATCH0   0x7b2 /* Debug Scratch 0 */
+#define CSR_DSCRATCH1   0x7b3 /* Debug Scratch 1 */
 
 /* In mstatus register */
 



(nuttx-apps) branch 24032801 updated (e7968e3d6 -> 6a128b4a9)

2024-03-28 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24032801
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


omit e7968e3d6 nshlib/irqaff: add irq affinity command
 add 6a128b4a9 nshlib/irqaff: add irq affinity command

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e7968e3d6)
\
 N -- N -- N   refs/heads/24032801 (6a128b4a9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 nshlib/nsh_syscmds.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



(nuttx-apps) branch 24032801 updated (eb5e922a4 -> e7968e3d6)

2024-03-28 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24032801
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


 discard eb5e922a4 nshlib/irqaff: add irq affinity command
 add e7968e3d6 nshlib/irqaff: add irq affinity command

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (eb5e922a4)
\
 N -- N -- N   refs/heads/24032801 (e7968e3d6)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:



(nuttx-apps) branch 24032801 updated (f7a6a07f4 -> eb5e922a4)

2024-03-28 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24032801
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


 discard f7a6a07f4 nshlib/irqaff: add irq affinity command
 add eb5e922a4 nshlib/irqaff: add irq affinity command

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (f7a6a07f4)
\
 N -- N -- N   refs/heads/24032801 (eb5e922a4)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 nshlib/nsh_command.c | 2 +-
 nshlib/nsh_syscmds.c | 8 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)



(nuttx-apps) 01/01: nshlib/irqaff: add irq affinity command

2024-03-28 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a commit to branch 24032801
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit f7a6a07f42b455c329ceefe773348151911381ce
Author: chao an 
AuthorDate: Thu Mar 28 18:30:10 2024 +0800

nshlib/irqaff: add irq affinity command

add support for set an IRQ affinity to CPUs by software

Signed-off-by: chao an 
---
 nshlib/Kconfig   |  5 +
 nshlib/nsh.h |  5 +
 nshlib/nsh_command.c |  5 +
 nshlib/nsh_syscmds.c | 20 
 4 files changed, 35 insertions(+)

diff --git a/nshlib/Kconfig b/nshlib/Kconfig
index c1974c5f2..40fdceea1 100644
--- a/nshlib/Kconfig
+++ b/nshlib/Kconfig
@@ -689,6 +689,11 @@ config NSH_DISABLE_RESET_CAUSE
default DEFAULT_SMALL
depends on BOARDCTL_RESET_CAUSE
 
+config NSH_DISABLE_IRQ_AFFINITY
+   bool "Disable command of irq affinity"
+   default DEFAULT_SMALL
+   depends on BOARDCTL_IRQ_AFFINITY
+
 endmenu
 
 if MMCSD
diff --git a/nshlib/nsh.h b/nshlib/nsh.h
index 24bc6c802..574150247 100644
--- a/nshlib/nsh.h
+++ b/nshlib/nsh.h
@@ -1145,6 +1145,11 @@ int cmd_switchboot(FAR struct nsh_vtbl_s *vtbl, int 
argc, FAR char **argv);
   FAR char **argv);
 #endif
 
+#if defined(CONFIG_BOARDCTL_IRQ_AFFINITY) && 
!defined(CONFIG_NSH_DISABLE_IRQ_AFFINITY)
+  int cmd_irq_affinity(FAR struct nsh_vtbl_s *vtbl, int argc,
+   FAR char **argv);
+#endif
+
 #if defined(CONFIG_RPMSG) && !defined(CONFIG_NSH_DISABLE_RPMSG)
   int cmd_rpmsg(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
 #endif
diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c
index 70cd6ca8d..b66c394e9 100644
--- a/nshlib/nsh_command.c
+++ b/nshlib/nsh_command.c
@@ -497,6 +497,11 @@ static const struct cmdmap_s g_cmdmap[] =
   CMD_MAP("resetcause", cmd_reset_cause, 1, 1, NULL),
 #endif
 
+#if defined(CONFIG_BOARDCTL_IRQ_AFFINITY) && 
!defined(CONFIG_NSH_DISABLE_IRQ_AFFINITY)
+  CMD_MAP("irqaff", cmd_irq_affinity, 3, 3,
+"irqaff [IRQ Number] [Core Number]"),
+#endif
+
 #ifdef NSH_HAVE_DIROPTS
 #  ifndef CONFIG_NSH_DISABLE_RM
   CMD_MAP("rm",   cmd_rm,   2, 3, "[-r] "),
diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c
index 33fe42db3..cd148633a 100644
--- a/nshlib/nsh_syscmds.c
+++ b/nshlib/nsh_syscmds.c
@@ -518,6 +518,26 @@ int cmd_reset_cause(FAR struct nsh_vtbl_s *vtbl, int argc, 
FAR char **argv)
 }
 #endif
 
+/
+ * Name: cmd_irq_affinity
+ /
+
+#if defined(CONFIG_BOARDCTL_IRQ_AFFINITY) && 
!defined(CONFIG_NSH_DISABLE_IRQ_AFFINITY)
+int cmd_irq_affinity(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
+{
+  int affinity[2];
+
+  if (argc == 3)
+{
+  affinity[0] = atoi(argv[1]);
+  affinity[1] = atoi(argv[2]);
+  return boardctl(BOARDIOC_IRQ_AFFINITY, (uintptr_t)affinity);
+}
+
+  return ERROR;
+}
+#endif
+
 /
  * Name: cmd_rpmsg
  /



(nuttx-apps) branch 24032801 created (now f7a6a07f4)

2024-03-28 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24032801
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


  at f7a6a07f4 nshlib/irqaff: add irq affinity command

This branch includes the following new commits:

 new f7a6a07f4 nshlib/irqaff: add irq affinity command

The 1 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.




(nuttx) 01/02: stm32h7/linum-stm32h753bi: Add FDCAN support

2024-03-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit f11bdc0cbc163a8bb89903f715e77afa560cf9b0
Author: GC2020 
AuthorDate: Mon Mar 25 20:20:56 2024 +0800

stm32h7/linum-stm32h753bi: Add FDCAN support
---
 .../linum-stm32h753bi/configs/socketcan/defconfig  | 72 ++
 .../arm/stm32h7/linum-stm32h753bi/include/board.h  | 10 +++
 .../stm32h7/linum-stm32h753bi/src/stm32_bringup.c  | 16 +
 3 files changed, 98 insertions(+)

diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig 
b/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig
new file mode 100644
index 00..2f59cb2b3a
--- /dev/null
+++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig
@@ -0,0 +1,72 @@
+#
+# 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_NET_ETHERNET is not set
+# CONFIG_NET_IPv4 is not set
+# CONFIG_STANDARD_SERIAL is not set
+# CONFIG_STM32H7_USE_LEGACY_PINMAP is not set
+CONFIG_ALLOW_GPL_COMPONENTS=y
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="linum-stm32h753bi"
+CONFIG_ARCH_BOARD_LINUM_STM32H753BI=y
+CONFIG_ARCH_CHIP="stm32h7"
+CONFIG_ARCH_CHIP_STM32H753BI=y
+CONFIG_ARCH_CHIP_STM32H7=y
+CONFIG_ARCH_CHIP_STM32H7_CORTEXM7=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARMV7M_DCACHE=y
+CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
+CONFIG_ARMV7M_DTCM=y
+CONFIG_ARMV7M_ICACHE=y
+CONFIG_BOARD_LATE_INITIALIZE=y
+CONFIG_BOARD_LOOPSPERMSEC=43103
+CONFIG_BUILTIN=y
+CONFIG_CANUTILS_CANDUMP=y
+CONFIG_CANUTILS_CANSEND=y
+CONFIG_CAN_PREALLOC_CONNS=2
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_NET=y
+CONFIG_DEBUG_NET_ERROR=y
+CONFIG_DEBUG_NET_INFO=y
+CONFIG_DEBUG_NET_WARN=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_FS_PROCFS=y
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INTELHEX_BINARY=y
+CONFIG_MM_REGIONS=4
+CONFIG_NET=y
+CONFIG_NETDEV_CAN_BITRATE_IOCTL=y
+CONFIG_NETDEV_IFINDEX=y
+CONFIG_NETDEV_LATEINIT=y
+CONFIG_NET_CAN=y
+CONFIG_NET_CAN_RAW_DEFAULT_TX_DEADLINE=500
+CONFIG_NET_CAN_RAW_TX_DEADLINE=y
+CONFIG_NET_CAN_SOCK_OPTS=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_LINELEN=64
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAMLOG=y
+CONFIG_RAMLOG_SYSLOG=y
+CONFIG_RAM_SIZE=245760
+CONFIG_RAM_START=0x2001
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_HPWORK=y
+CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=6
+CONFIG_START_MONTH=12
+CONFIG_START_YEAR=2011
+CONFIG_STM32H7_FDCAN1=y
+CONFIG_STM32H7_FDCAN2=y
+CONFIG_STM32H7_USART3=y
+CONFIG_SYSLOG_TIMESTAMP=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_TASK_NAME_SIZE=0
+CONFIG_USART3_SERIAL_CONSOLE=y
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/include/board.h 
b/boards/arm/stm32h7/linum-stm32h753bi/include/board.h
index 3fda56c61f..f7d925dff4 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/include/board.h
+++ b/boards/arm/stm32h7/linum-stm32h753bi/include/board.h
@@ -401,6 +401,16 @@
 #define GPIO_TIM17_CH1OUT  (GPIO_TIM17_CH1NOUT_1) /* PB7 */
 #define GPIO_TIM4_CH2OUT   (GPIO_TIM4_CH2OUT_1)   /* PB7 */
 
+/* FDCAN1 */
+
+#define GPIO_CAN1_RX  (GPIO_CAN1_RX_3|GPIO_SPEED_50MHz)  /* PD0 */
+#define GPIO_CAN1_TX  (GPIO_CAN1_TX_3|GPIO_SPEED_50MHz)  /* PD1 */
+
+/* FDCAN2 */
+
+#define GPIO_CAN2_RX  (GPIO_CAN2_RX_2|GPIO_SPEED_50MHz)  /* PB5 - D11 
*/
+#define GPIO_CAN2_TX  (GPIO_CAN2_TX_2|GPIO_SPEED_50MHz)  /* PB6 - D1 */
+
 /
  * Public Data
  /
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c 
b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
index 4604a28294..74c103a367 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
+++ b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
@@ -45,6 +45,10 @@
 #  include "stm32_rtc.h"
 #endif
 
+#ifdef CONFIG_STM32H7_FDCAN
+#include "stm32_fdcan_sock.h"
+#endif
+
 /
  * Private Functions
  /
@@ -216,6 +220,18 @@ int stm32_bringup(void)
 {
   syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret);
 }
+#endif
+
+#ifdef CONFIG_NETDEV_LATEINIT
+
+#  ifdef CONFIG_STM32H7_FDCAN1
+  stm32_fdcansockinitialize(0);
+#  endif
+
+#  ifdef CONFIG_STM32H7_FDCAN2
+  stm32_fdcansockinitialize(1);
+#  endif
+
 #endif
 
   return OK;



(nuttx) 02/02: fix build error

2024-03-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 4185539fa5ef7da9080b08d1c3da8bf5af70c35d
Author: GC2020 
AuthorDate: Tue Mar 26 14:59:41 2024 +0800

fix build error
---
 boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig 
b/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig
index 2f59cb2b3a..9d1f5f4b4c 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig
+++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig
@@ -65,8 +65,8 @@ CONFIG_START_MONTH=12
 CONFIG_START_YEAR=2011
 CONFIG_STM32H7_FDCAN1=y
 CONFIG_STM32H7_FDCAN2=y
-CONFIG_STM32H7_USART3=y
+CONFIG_STM32H7_USART1=y
 CONFIG_SYSLOG_TIMESTAMP=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_TASK_NAME_SIZE=0
-CONFIG_USART3_SERIAL_CONSOLE=y
+CONFIG_USART1_SERIAL_CONSOLE=y



(nuttx) branch master updated (25339b0a17 -> 4185539fa5)

2024-03-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 25339b0a17 sched/irq: spinlock should not depends on SMP
 new f11bdc0cbc stm32h7/linum-stm32h753bi: Add FDCAN support
 new 4185539fa5 fix build error

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:
 .../configs/socketcan/defconfig  | 10 +-
 boards/arm/stm32h7/linum-stm32h753bi/include/board.h | 10 ++
 boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c | 16 
 3 files changed, 31 insertions(+), 5 deletions(-)
 copy boards/arm/stm32h7/{nucleo-h743zi2 => 
linum-stm32h753bi}/configs/socketcan/defconfig (91%)



(nuttx) branch master updated: cdcecm: remove duplicate assignment statements

2024-03-21 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new a65cdce281 cdcecm: remove duplicate assignment statements
a65cdce281 is described below

commit a65cdce281c02dc00aa611e5fea52042d304ea34
Author: zhanghongyu 
AuthorDate: Wed Mar 20 14:45:59 2024 +0800

cdcecm: remove duplicate assignment statements

Signed-off-by: zhanghongyu 
---
 drivers/usbdev/cdcecm.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/usbdev/cdcecm.c b/drivers/usbdev/cdcecm.c
index d865d803d9..50ba1b0443 100644
--- a/drivers/usbdev/cdcecm.c
+++ b/drivers/usbdev/cdcecm.c
@@ -950,6 +950,7 @@ static void cdcecm_resetconfig(FAR struct cdcecm_driver_s 
*self)
 static int cdcecm_setconfig(FAR struct cdcecm_driver_s *self, uint8_t config)
 {
   struct usb_epdesc_s epdesc;
+  bool is_high_speed;
   int ret = OK;
 
   if (config == self->config)
@@ -979,7 +980,7 @@ static int cdcecm_setconfig(FAR struct cdcecm_driver_s 
*self, uint8_t config)
 
   self->epint->priv = self;
 
-  bool is_high_speed = (self->usbdev.speed == USB_SPEED_HIGH);
+  is_high_speed = (self->usbdev.speed == USB_SPEED_HIGH);
   cdcecm_mkepdesc(CDCECM_EP_BULKIN_IDX,
   , >devinfo, is_high_speed);
   ret = EP_CONFIGURE(self->epbulkin, , false);
@@ -1365,7 +1366,7 @@ static int16_t cdcecm_mkcfgdesc(FAR uint8_t *desc,
 
   if (desc)
 {
-  FAR struct usb_ifdesc_s *ifdesc = (FAR struct usb_ifdesc_s *)desc;
+  FAR struct usb_ifdesc_s *ifdesc;
 
   ifdesc = (FAR struct usb_ifdesc_s *)desc;
   ifdesc->len  = USB_SIZEOF_IFDESC;
@@ -1385,7 +1386,7 @@ static int16_t cdcecm_mkcfgdesc(FAR uint8_t *desc,
 
   if (desc)
 {
-  FAR struct usb_ifdesc_s *ifdesc = (FAR struct usb_ifdesc_s *)desc;
+  FAR struct usb_ifdesc_s *ifdesc;
 
   ifdesc = (FAR struct usb_ifdesc_s *)desc;
   ifdesc->len  = USB_SIZEOF_IFDESC;



(nuttx) branch master updated: include: format alignment

2024-03-21 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 430247cc99 include: format alignment
430247cc99 is described below

commit 430247cc99a61ba3a26d0873f7c8f3396401d7c7
Author: zhanghongyu 
AuthorDate: Wed Mar 20 14:51:17 2024 +0800

include: format alignment

Align the comments in the include directory

Signed-off-by: zhanghongyu 
---
 include/nuttx/lcd/ft80x.h  | 22 +++---
 include/nuttx/usb/cdc.h|  4 ++--
 include/nuttx/video/mipi_dsi.h |  2 +-
 include/nuttx/wireless/ioctl.h |  4 ++--
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/include/nuttx/lcd/ft80x.h b/include/nuttx/lcd/ft80x.h
index 0ed5f08e9c..0a0c532a60 100644
--- a/include/nuttx/lcd/ft80x.h
+++ b/include/nuttx/lcd/ft80x.h
@@ -295,7 +295,7 @@
 #define FT80X_REG_PLAYBACK_PLAY  0x1024bc  /* Start audio playback */
 #define FT80X_REG_PWM_HZ 0x1024c0  /* BACKLIGHT PWM output 
frequency (Hz) */
 #define FT80X_REG_PWM_DUTY   0x1024c4  /* BACKLIGHT PWM output duty 
cycle 0=0%,
-  * 128=100% */
+* 128=100% */
 #define FT80X_REG_MACRO_00x1024c8  /* Display list macro command 0 
*/
 #define FT80X_REG_MACRO_10x1024cc  /* Display list macro command 1 
*/
 
@@ -317,7 +317,7 @@
 
 #if defined(CONFIG_LCD_FT800)
 #define FT80X_REG_TOUCH_ADC_MODE 0x1024f4  /* Select single ended (low 
power) or
-  * differential (accurate) 
sampling */
+* differential (accurate) 
sampling */
 #define FT80X_REG_TOUCH_CHARGE   0x1024f8  /* Touch-screen charge time, 
units of 6 clocks */
 #define FT80X_REG_TOUCH_SETTLE   0x1024fc  /* Touch-screen settle time, 
units of 6 clocks */
 #define FT80X_REG_TOUCH_OVERSAMPLE   0x102500  /* Touch-screen oversample 
factor */
@@ -326,7 +326,7 @@
 #define FT80X_REG_TOUCH_RZ   0x10250c  /* Touch-screen resistance */
 #define FT80X_REG_TOUCH_SCREEN_XY0x102510  /* Touch-screen screen 
(x-MSB16; y-LSB16) */
 #define FT80X_REG_TOUCH_TAG_XY   0x102514  /* Touch-screen screen 
(x-MSB16; y-LSB16)
-  * used for tag lookup */
+* used for tag lookup */
 #define FT80X_REG_TOUCH_TAG  0x102518  /* Touch-screen tag result */
 #define FT80X_REG_TOUCH_TRANSFORM_A  0x10251c  /* Touch-screen transform 
coefficient (s15.16) */
 #define FT80X_REG_TOUCH_TRANSFORM_B  0x102520  /* Touch-screen transform 
coefficient (s15.16) */
@@ -349,16 +349,16 @@
 * Bits [15:8]: configure 
register value */
/* 0x1024fc - 0x102504 Reserved 
*/
 #define FT80X_REG_CTOUCH_RAW_XY  0x102508  /* Compatibility mode: 
touch-screen raw
-  * (x-MSB16; y-LSB16) */
+* (x-MSB16; y-LSB16) */
 #define FT80X_REG_CTOUCH_TOUCH1_XY   0x102508  /* Extended mode: touch-screen 
screen data for touch 1
-  * (x-MSB16; y-LSB16) */
+* (x-MSB16; y-LSB16) */
 #define FT80X_REG_CTOUCH_TOUCH4_Y0x10250c  /* Extended mode: touch-screen 
screen Y data for touch 4 */
 #define FT80X_REG_CTOUCH_SCREEN_XY   0x102510  /* Compatibility mode: 
touch-screen screen
-  * (x-MSB16; y-LSB16) */
+* (x-MSB16; y-LSB16) */
 #define FT80X_REG_CTOUCH_TOUCH0_XY   0x102510  /* Extended mode: touch-screen 
screen data for touch 0
-  * (x-MSB16; y-LSB16) */
+* (x-MSB16; y-LSB16) */
 #define FT80X_REG_CTOUCH_TAG_XY  0x102514  /* Touch-screen screen 
(x-MSB16; y-LSB16)
-  * used for tag lookup */
+* used for tag lookup */
 #define FT80X_REG_CTOUCH_TAG 0x102518  /* Touch-screen tag result */
 #define FT80X_REG_CTOUCH_TRANSFORM_A 0x10251c  /* Touch-screen transform 
coefficient (s15.16) */
 #define FT80X_REG_CTOUCH_TRANSFORM_B 0x102520  /* Touch-screen transform 
coefficient (s15.16) */
@@ -589,14 +589,14 @@
 /* FT80X_REG_TOUCH_MODE */
 
 #define TOUCH_MODE_OFF0 /* Acquisition stopped, touch 
detection
-  * interrupt is still valid. 
*/
+ * interrupt is still valid. */
 #define TOUCH_MODE_ONESHOT1

(nuttx) branch master updated (430247cc99 -> 7a2edf9414)

2024-03-21 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 430247cc99 include: format alignment
 add 7a2edf9414 stm32f7/stm32_foc.c: Set .info_get to foc_lower_ops

No new revisions were added by this update.

Summary of changes:
 arch/arm/src/stm32f7/stm32_foc.c | 1 +
 1 file changed, 1 insertion(+)



(nuttx) branch master updated (2bed7c4646 -> e622e95d5b)

2024-03-20 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 2bed7c4646 arm64_mmu: Add data synchronization barrier after page 
tables are written
 add e622e95d5b tools/ci/platforms/darwin.sh:  Removed pyyaml folder

No new revisions were added by this update.

Summary of changes:
 tools/ci/platforms/darwin.sh | 1 +
 1 file changed, 1 insertion(+)



(nuttx) branch master updated: build/cmake: add initial KERNEL mode support

2024-03-15 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ea8682572c build/cmake: add initial KERNEL mode support
ea8682572c is described below

commit ea8682572ce88bdab6e4f5307bd9c48f7f3438f4
Author: Yanfeng Liu 
AuthorDate: Thu Mar 14 15:00:46 2024 +0800

build/cmake: add initial KERNEL mode support

Currently only FLAT mode development can enjoy cmake build system. This
patch tries to add initial kernel mode support. It can build NuttX kernel
and libproxies.a, the latter will be further checked though.

This can already help to build an AMP remote node image as it can share
userland apps living in the AMP master node.

Major changes:

- in top folder:
  - CMakeLists.txtadjust for KERNEL mode, separate from PROTECTED mode.
- in `syscall`:
  - CMakeLists.txtadd mksyscall target for stubs/proxies generation
- in `syscall/stubs`:
  - CMakeLists.txtuse dependency to mksyscall
- in `syscall/proxies`:
  - CMakeLists.txtuse dependency to mksyscall
- in `arch`:
  - CMakeLists.txtseparate KERNEL from PROTECTED mode.
- in `arch/risc-v/src`:
  - CMakeLists.txtseparate from PROTECTED mode, add sub folders.
- in `arch/risc-v/common`:
  - CMakeLists.txtadd sources and sub-folders for KERNEL mode.
- in `arch/risc-v/k230`:
  - CMakeLists.txtadd sources for KERNEL mode.
- in `boards/risc-v/k230/canmv230/src`:
  - CMakeLists.txtadjust k230 specific scripts for kernel mode.

New additions:

- in `arch/risc-v/src/nuttsbi/`   add CMakeLists.txt
- in `arch/risc-v/src/common/supervisor/` add CMakeLists.txt

Signed-off-by: Yanfeng Liu 
---
 CMakeLists.txt | 29 --
 arch/CMakeLists.txt|  2 +-
 arch/risc-v/src/CMakeLists.txt |  7 +-
 arch/risc-v/src/common/CMakeLists.txt  |  7 +-
 .../src/{k230 => common/supervisor}/CMakeLists.txt | 26 +--
 arch/risc-v/src/k230/CMakeLists.txt| 20 +++
 arch/risc-v/src/{k230 => nuttsbi}/CMakeLists.txt   | 26 +--
 boards/risc-v/k230/canmv230/src/CMakeLists.txt |  8 --
 syscall/CMakeLists.txt |  8 ++
 syscall/proxies/CMakeLists.txt |  2 +-
 syscall/stubs/CMakeLists.txt   |  2 +-
 11 files changed, 72 insertions(+), 65 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f01e5ca00d..ab6a9efa9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -550,11 +550,15 @@ endif()
 
 # Add apps/ to the build (if present)
 
-if(EXISTS ${NUTTX_APPS_DIR}/CMakeLists.txt)
-  add_subdirectory(${NUTTX_APPS_DIR} apps)
-else()
-  message(
-STATUS "Application directory not found at ${NUTTX_APPS_DIR}, skipping")
+if(NOT CONFIG_BUILD_KERNEL)
+
+  if(EXISTS ${NUTTX_APPS_DIR}/CMakeLists.txt)
+add_subdirectory(${NUTTX_APPS_DIR} apps)
+  else()
+message(
+  STATUS "Application directory not found at ${NUTTX_APPS_DIR}, skipping")
+  endif()
+
 endif()
 
 # Link step ##
@@ -597,11 +601,15 @@ endif()
 file(TOUCH ${CMAKE_BINARY_DIR}/nuttx.manifest)
 
 get_property(nuttx_kernel_libs GLOBAL PROPERTY NUTTX_KERNEL_LIBRARIES)
+get_property(nuttx_extra_libs GLOBAL PROPERTY NUTTX_EXTRA_LIBRARIES)
+
 if(CONFIG_BUILD_FLAT)
   get_property(nuttx_system_libs GLOBAL PROPERTY NUTTX_SYSTEM_LIBRARIES)
 endif()
-get_property(nuttx_apps_libs GLOBAL PROPERTY NUTTX_APPS_LIBRARIES)
-get_property(nuttx_extra_libs GLOBAL PROPERTY NUTTX_EXTRA_LIBRARIES)
+
+if(NOT CONFIG_BUILD_KERNEL)
+  get_property(nuttx_apps_libs GLOBAL PROPERTY NUTTX_APPS_LIBRARIES)
+endif()
 
 set(nuttx_libs ${nuttx_kernel_libs} ${nuttx_system_libs} ${nuttx_apps_libs})
 
@@ -734,7 +742,7 @@ endif()
 
 # Userspace portion ##
 
-if(NOT CONFIG_BUILD_FLAT)
+if(CONFIG_BUILD_PROTECTED)
   add_executable(nuttx_user)
 
   get_property(nuttx_system_libs GLOBAL PROPERTY NUTTX_SYSTEM_LIBRARIES)
@@ -779,3 +787,8 @@ if(NOT CONFIG_BUILD_FLAT)
 
   # TODO: could also merge elf binaries
 endif()
+
+if(CONFIG_BUILD_KERNEL)
+  # TODO: generate nuttx-export-xxx.tar.gz for userland development
+
+endif()
diff --git a/arch/CMakeLists.txt b/arch/CMakeLists.txt
index ac8f147493..41b790a83b 100644
--- a/arch/CMakeLists.txt
+++ b/arch/CMakeLists.txt
@@ -25,7 +25,7 @@
 nuttx_add_kernel_library(arch)
 target_include_directories(arch PRIVATE ${CMAKE_SOURCE_DIR}/sched)
 
-if(NOT CONFIG_BUILD_FLAT)
+if(CONFIG_BUILD_PROTECTED)
   nuttx_add_system_library(arch_interface)
   target_include_director

(nuttx) branch master updated (e93bdfe089 -> 3956a52c58)

2024-03-13 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from e93bdfe089 tun: in tun_write, try to release iob before iob_prepare
 add 3956a52c58 net/tcp: return true only when send window updates

No new revisions were added by this update.

Summary of changes:
 net/tcp/tcp_input.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)



(nuttx) branch master updated: tun: in tun_write, try to release iob before iob_prepare

2024-03-13 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new e93bdfe089 tun: in tun_write, try to release iob before iob_prepare
e93bdfe089 is described below

commit e93bdfe0899af79467af3f3c360ac9ea1b73652c
Author: zhanghongyu 
AuthorDate: Wed Jul 12 20:05:25 2023 +0800

tun: in tun_write, try to release iob before iob_prepare

io_pktlen will incorrect when two packets are received in a row and the 
packet length decreases.

Signed-off-by: zhanghongyu 
---
 drivers/net/tun.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index e4374185b9..43067cfb19 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -990,6 +990,7 @@ static ssize_t tun_write(FAR struct file *filep, FAR const 
char *buffer,
   if (priv->write_d_len == 0)
 {
   net_lock();
+  netdev_iob_release(>dev);
   ret = netdev_iob_prepare(>dev, false, 0);
   priv->dev.d_buf = NULL;
   if (ret < 0)



(nuttx) branch master updated: mm/kconfig: fix typo in MM_DEFAULT_ALIGNMENT

2024-03-10 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 5ac401d941 mm/kconfig: fix typo in MM_DEFAULT_ALIGNMENT
5ac401d941 is described below

commit 5ac401d941da22109be4de2ec28a77b86b790144
Author: Yanfeng Liu 
AuthorDate: Mon Mar 11 09:48:47 2024 +0800

mm/kconfig: fix typo in MM_DEFAULT_ALIGNMENT

This fixes minor typo in MM_DEFAULT_ALIGNMENT

Signed-off-by: Yanfeng Liu 
---
 include/nuttx/mm/mempool.h | 4 ++--
 mm/Kconfig | 2 +-
 mm/mm_heap/mm.h| 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/nuttx/mm/mempool.h b/include/nuttx/mm/mempool.h
index 4a7c48ddc7..a46eaa091c 100644
--- a/include/nuttx/mm/mempool.h
+++ b/include/nuttx/mm/mempool.h
@@ -38,10 +38,10 @@
  * Pre-processor Definitions
  /
 
-#if CONFIG_MM_DFAULT_ALIGNMENT == 0
+#if CONFIG_MM_DEFAULT_ALIGNMENT == 0
 #  define MEMPOOL_ALIGN   (2 * sizeof(uintptr_t))
 #else
-#  define MEMPOOL_ALIGN   CONFIG_MM_DFAULT_ALIGNMENT
+#  define MEMPOOL_ALIGN   CONFIG_MM_DEFAULT_ALIGNMENT
 #endif
 
 #if CONFIG_MM_BACKTRACE >= 0
diff --git a/mm/Kconfig b/mm/Kconfig
index 0f5fa84520..f53501cff3 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -60,7 +60,7 @@ config MM_KERNEL_HEAPSIZE
user-mode heap.  This value may need to be aligned to units of 
the
size of the smallest memory protection region.
 
-config MM_DFAULT_ALIGNMENT
+config MM_DEFAULT_ALIGNMENT
int "Memory default alignment in bytes"
default 0
range 0 64
diff --git a/mm/mm_heap/mm.h b/mm/mm_heap/mm.h
index 2df5fe6528..67965686be 100644
--- a/mm/mm_heap/mm.h
+++ b/mm/mm_heap/mm.h
@@ -112,10 +112,10 @@
 #define MM_MAX_CHUNK (1 << MM_MAX_SHIFT)
 #define MM_NNODES(MM_MAX_SHIFT - MM_MIN_SHIFT + 1)
 
-#if CONFIG_MM_DFAULT_ALIGNMENT == 0
+#if CONFIG_MM_DEFAULT_ALIGNMENT == 0
 #  define MM_ALIGN   (2 * sizeof(uintptr_t))
 #else
-#  define MM_ALIGN   CONFIG_MM_DFAULT_ALIGNMENT
+#  define MM_ALIGN   CONFIG_MM_DEFAULT_ALIGNMENT
 #endif
 #define MM_GRAN_MASK (MM_ALIGN - 1)
 #define MM_ALIGN_UP(a)   (((a) + MM_GRAN_MASK) & ~MM_GRAN_MASK)



(nuttx) branch master updated: tools/minidumpserver.py: add support for rv64

2024-03-10 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2f4e90b1e9 tools/minidumpserver.py: add support for rv64
2f4e90b1e9 is described below

commit 2f4e90b1e9636b4c1d25cf5d3c5a91e970797219
Author: Yanfeng Liu 
AuthorDate: Sun Mar 10 10:54:24 2024 +0800

tools/minidumpserver.py: add support for rv64

This patch adds rv64 targets support and checked with gdb-multiarch
on Ubuntu. It also marks `-arch` parameter optional as it often can
be learnt from ELF file.

Signed-off-by: Yanfeng Liu 
---
 tools/minidumpserver.py | 54 -
 1 file changed, 45 insertions(+), 9 deletions(-)

diff --git a/tools/minidumpserver.py b/tools/minidumpserver.py
index 0c1441a312..9196bc618d 100755
--- a/tools/minidumpserver.py
+++ b/tools/minidumpserver.py
@@ -43,9 +43,16 @@ GDB_SIGNAL_DEFAULT = 7
 
 DEFAULT_GDB_INIT_CMD = "-ex 'bt full' -ex 'info reg' -ex 'display /40i $pc-40'"
 
-
 logger = logging.getLogger()
 
+# The global register table is dictionary like {arch:{reg:ndx}}
+#
+# where arch is the CPU architecture name;
+#   reg  is the name of the register as used in log file
+#   ndx  is the index of the register in GDB group registers list
+#
+# Registers with multiple convenient names can have multiple entries here, one
+# for each name and with the same index.
 reg_table = {
 "arm": {
 "R0": 0,
@@ -104,6 +111,7 @@ reg_table = {
 "PC": 15,
 "CPSR": 41,
 },
+# rv64 works with gdb-multiarch on Ubuntu
 "riscv": {
 "ZERO": 0,
 "RA": 1,
@@ -138,6 +146,8 @@ reg_table = {
 "T5": 30,
 "T6": 31,
 "PC": 32,
+"S0": 8,
+"EPC": 32,
 },
 # use xtensa-esp32s3-elf-gdb register table
 "esp32s3": {
@@ -213,6 +223,9 @@ reg_fix_value = {
 "WINDOWSTART": 1,
 "PS": 0x4,
 },
+"riscv": {
+"ZERO": 0,
+},
 }
 
 
@@ -238,10 +251,14 @@ class DumpELFFile:
 def __init__(self, elffile: str):
 self.elffile = elffile
 self.__memories = []
+self.__arch = None
+self.__xlen = None
 
 def parse(self):
 self.__memories = []
 elf = ELFFile.load_from_path(self.elffile)
+self.__arch = elf.get_machine_arch().lower().replace("-", "")
+self.__xlen = elf.elfclass
 
 for section in elf.iter_sections():
 # REALLY NEED to match exact type as all other sections
@@ -290,6 +307,12 @@ class DumpELFFile:
 def get_memories(self):
 return self.__memories
 
+def arch(self):
+return self.__arch
+
+def xlen(self):
+return self.__xlen
+
 
 class DumpLogFile:
 def __init__(self, logfile):
@@ -299,6 +322,7 @@ class DumpLogFile:
 self.reg_table = dict()
 
 def _init_register(self):
+# registers list should be able to hold the max index
 self.registers = [b"x"] * (max(self.reg_table.values()) + 1)
 
 def _parse_register(self, line):
@@ -314,6 +338,9 @@ class DumpLogFile:
 if reg_name in self.reg_table:
 reg_index = self.reg_table[reg_name]
 self.registers[reg_index] = int(reg_val, 16)
+else:
+raise Exception("Unknown register name: ", reg_name)
+
 return True
 
 def _parse_fix_register(self, arch):
@@ -394,6 +421,7 @@ class GDBStub:
 self.socket = None
 self.gdb_signal = GDB_SIGNAL_DEFAULT
 self.mem_regions = self.elffile.get_memories() + 
self.logfile.get_memories()
+self.reg_digits = elffile.xlen() // 4
 
 self.mem_regions.sort(key=lambda x: x["start"])
 
@@ -465,7 +493,7 @@ class GDBStub:
 self.put_gdb_packet(pkt)
 
 def handle_register_group_read_packet(self):
-reg_fmt = " unknown value
 # Send in ""
-pkt += b"x" * 8
+pkt += b"x" * self.reg_digits
 
 self.put_gdb_packet(pkt)
 
 def handle_register_single_read_packet(self, pkt):
-reg_fmt = "

(nuttx-apps) branch master updated: ci: Remove the codecheck from build.yml

2024-03-03 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 110fa8264 ci: Remove the codecheck from build.yml
110fa8264 is described below

commit 110fa8264d4e0dc7e6a30600b51b230c115b9d51
Author: Xiang Xiao 
AuthorDate: Tue Feb 27 04:25:03 2024 +0800

ci: Remove the codecheck from build.yml

the check isn't really enabled and enforce before
due to a mass of false alarm, but recently it break
ci frequently, so it's better to remove it now.

Signed-off-by: Xiang Xiao 
---
 .github/workflows/build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 35162ef0b..9d7f91181 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -118,7 +118,7 @@ jobs:
 
 strategy:
   matrix:
-boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, 
arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, other, risc-v, sim-01, sim-02, 
xtensa, codechecker]
+boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, 
arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, other, risc-v, sim-01, sim-02, 
xtensa]
 
 steps:
   - name: Download Source Artifact



(nuttx) branch master updated: boards/stm32f411-minimum: remove non existing include in Kconfig

2024-02-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 5ddb1fcbf7 boards/stm32f411-minimum: remove non existing include in 
Kconfig
5ddb1fcbf7 is described below

commit 5ddb1fcbf7f2419d45a313233c843c1bf65c7851
Author: Michał Łyszczek 
AuthorDate: Mon Feb 26 23:38:58 2024 +0100

boards/stm32f411-minimum: remove non existing include in Kconfig

This is leak from another feature that was not yet meant to be
pushed.

Signed-off-by: Michał Łyszczek 
---
 boards/arm/stm32/stm32f411-minimum/Kconfig | 8 
 1 file changed, 8 deletions(-)

diff --git a/boards/arm/stm32/stm32f411-minimum/Kconfig 
b/boards/arm/stm32/stm32f411-minimum/Kconfig
index da3164b395..06ca3fbe71 100644
--- a/boards/arm/stm32/stm32f411-minimum/Kconfig
+++ b/boards/arm/stm32/stm32f411-minimum/Kconfig
@@ -75,12 +75,4 @@ config STM32F411MINIMUM_HX711_DATA_PIN
 
 endif # STM32F411MINIMUM_HX711
 
-menuconfig STM32F411MINIMUM_GPIO
-   select DEV_GPIO
-   bool "enable gpio subsystem"
-
-if STM32F411MINIMUM_GPIO
-source boards/arm/stm32/stm32f411-minimum/Kconfig.gpio
-endif
-
 endif



(nuttx-apps) branch 24022701 created (now cda94db53)

2024-02-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24022701
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


  at cda94db53 system/libuv: fix compiler warning of "container_of" 
redefined

This branch includes the following new commits:

 new cda94db53 system/libuv: fix compiler warning of "container_of" 
redefined

The 1 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.




(nuttx-apps) 01/01: system/libuv: fix compiler warning of "container_of" redefined

2024-02-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a commit to branch 24022701
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit cda94db5313a8aafa9c2f2320566e89ee2ca2c01
Author: chao an 
AuthorDate: Tue Feb 27 09:04:51 2024 +0800

system/libuv: fix compiler warning of "container_of" redefined

In file included from libuv/test/runner.c:27:
libuv/test/task.h:74: warning: "container_of" redefined
   74 | #define container_of(ptr, type, member) \
  |
In file included from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/list.h:47,
     from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/tls.h:34,
     from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/sched.h:48,
     from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/arch.h:87,
     from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/userspace.h:35,
     from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/mm/mm.h:30,
     from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/kmalloc.h:34,
     from 
/home/archer/code/nuttx/n2/nuttx/include/nuttx/lib/lib.h:31,
     from /home/archer/code/nuttx/n2/nuttx/include/stdio.h:35,
 from libuv/test/runner.c:22:
/home/archer/code/nuttx/n2/nuttx/include/nuttx/nuttx.h:48: note: this is 
the location of the previous definition
   48 | #define container_of(ptr, type, member) \
  |

Signed-off-by: chao an 
---
 system/libuv/0001-libuv-port-for-nuttx.patch | 30 
 1 file changed, 30 insertions(+)

diff --git a/system/libuv/0001-libuv-port-for-nuttx.patch 
b/system/libuv/0001-libuv-port-for-nuttx.patch
index 660ed880f..7d2f1b4c4 100644
--- a/system/libuv/0001-libuv-port-for-nuttx.patch
+++ b/system/libuv/0001-libuv-port-for-nuttx.patch
@@ -3544,3 +3544,33 @@ index bbc0c305..4e7996f5 100644
  
MAKE_VALGRIND_HAPPY(loop);
return 0;
+diff --git a/src/uv-common.h b/src/uv-common.h
+index cd57e5a..f951ca8 100644
+--- a/src/uv-common.h
 b/src/uv-common.h
+@@ -54,8 +54,10 @@ extern int snprintf(char*, size_t, const char*, ...);
+ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+ #define ARRAY_END(a)  ((a) + ARRAY_SIZE(a))
+ 
++#ifndef container_of
+ #define container_of(ptr, type, member) \
+   ((type *) ((char *) (ptr) - offsetof(type, member)))
++#endif
+ 
+ /* C11 defines static_assert to be a macro which calls _Static_assert. */
+ #if defined(static_assert)
+diff --git a/test/task.h b/test/task.h
+index 25af255..b451903 100644
+--- a/test/task.h
 b/test/task.h
+@@ -71,8 +71,10 @@
+ 
+ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+ 
++#ifndef container_of
+ #define container_of(ptr, type, member) \
+   ((type *) ((char *) (ptr) - offsetof(type, member)))
++#endif
+ 
+ typedef enum {
+   TCP = 0,



(nuttx) branch master updated: arch/x86_64: add cmake support

2024-02-22 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 9b0017659c arch/x86_64: add cmake support
9b0017659c is described below

commit 9b0017659cb72b61a81c9501e220ef6e5f3803d5
Author: p-szafonimateusz 
AuthorDate: Wed Feb 7 14:46:29 2024 +0100

arch/x86_64: add cmake support

Signed-off-by: p-szafonimateusz 
---
 arch/x86_64/CMakeLists.txt |  21 
 arch/x86_64/src/CMakeLists.txt |  33 ++
 arch/x86_64/src/cmake/Toolchain.cmake  | 121 +
 arch/x86_64/src/cmake/platform.cmake   |  62 +++
 arch/x86_64/src/common/CMakeLists.txt  |  36 ++
 arch/x86_64/src/intel64/CMakeLists.txt |  56 ++
 boards/x86_64/intel64/qemu-intel64/CMakeLists.txt  |  21 
 .../x86_64/intel64/qemu-intel64/src/CMakeLists.txt |  33 ++
 libs/libc/machine/x86_64/CMakeLists.txt|  19 
 libs/libc/machine/x86_64/Kconfig   |   4 +
 10 files changed, 406 insertions(+)

diff --git a/arch/x86_64/CMakeLists.txt b/arch/x86_64/CMakeLists.txt
new file mode 100644
index 00..9aef319f33
--- /dev/null
+++ b/arch/x86_64/CMakeLists.txt
@@ -0,0 +1,21 @@
+# 
##
+# arch/x86_64/CMakeLists.txt
+#
+# 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.
+#
+# 
##
+
+nuttx_add_subdirectory()
diff --git a/arch/x86_64/src/CMakeLists.txt b/arch/x86_64/src/CMakeLists.txt
new file mode 100644
index 00..a485b1ac7c
--- /dev/null
+++ b/arch/x86_64/src/CMakeLists.txt
@@ -0,0 +1,33 @@
+# 
##
+# arch/x86_64/src/CMakeLists.txt
+#
+# 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.
+#
+# 
##
+
+add_subdirectory(${ARCH_SUBDIR})
+add_subdirectory(${NUTTX_CHIP_ABS_DIR} EXCLUDE_FROM_ALL exclude_chip)
+add_subdirectory(common)
+
+# Include directories (before system ones) as PUBLIC so that it can be exposed
+# to libboard
+target_include_directories(arch BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR} common
+  ${ARCH_SUBDIR})
+
+if(NOT CONFIG_BUILD_FLAT)
+  target_include_directories(arch_interface BEFORE PUBLIC ${NUTTX_CHIP_ABS_DIR}
+  common 
${ARCH_SUBDIR})
+endif()
diff --git a/arch/x86_64/src/cmake/Toolchain.cmake 
b/arch/x86_64/src/cmake/Toolchain.cmake
new file mode 100644
index 00..1718b486cb
--- /dev/null
+++ b/arch/x86_64/src/cmake/Toolchain.cmake
@@ -0,0 +1,121 @@
+# 
##
+# arch/x86_64/src/cmake/Toolchain.cmake
+#
+# 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

(nuttx) branch master updated (f4bc5b5c6b -> 5452f013df)

2024-02-21 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from f4bc5b5c6b cmake/toolchain: fix compiler warning on ARM32
 add 5452f013df cmake/nuttx_add_library.cmake:add target that define in 
external module CMakeLists.txt

No new revisions were added by this update.

Summary of changes:
 cmake/nuttx_add_library.cmake | 19 +++
 1 file changed, 19 insertions(+)



(nuttx) branch master updated (93d03d0418 -> 232586873a)

2024-02-20 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 93d03d0418 fs: Add VFS docs
 add 232586873a include/rpmsg/rpmsg.h: remove temp define RPMSGIOC_START, 
RPMSGIOC_STOP, RPMSGIOC_RESET

No new revisions were added by this update.

Summary of changes:
 include/nuttx/rpmsg/rpmsg.h | 3 ---
 1 file changed, 3 deletions(-)



(nuttx-apps) branch 24021901 updated (3684f5888 -> 295aea73e)

2024-02-19 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24021901
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


omit 3684f5888 nsh/uname: improve compatibility for non-GNU compilers
 add 295aea73e nsh/uname: improve compatibility for non-GNU compilers

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3684f5888)
\
 N -- N -- N   refs/heads/24021901 (295aea73e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 nshlib/nsh_syscmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



(nuttx-apps) branch 24021901 updated (1a34dd53e -> 3684f5888)

2024-02-19 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24021901
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


 discard 1a34dd53e nsh/uname: alloc dynamic heap on non-GNU compilers
 add 3684f5888 nsh/uname: improve compatibility for non-GNU compilers

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1a34dd53e)
\
 N -- N -- N   refs/heads/24021901 (3684f5888)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 nshlib/nsh_syscmds.c | 15 ++-
 1 file changed, 2 insertions(+), 13 deletions(-)



(nuttx-apps) branch 24021901 updated (84424e9ab -> 1a34dd53e)

2024-02-19 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24021901
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


 discard 84424e9ab nsh/uname: alloc dynamic heap on non-GNU compilers
 add 1a34dd53e nsh/uname: alloc dynamic heap on non-GNU compilers

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (84424e9ab)
\
 N -- N -- N   refs/heads/24021901 (1a34dd53e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 nshlib/nsh_syscmds.c | 3 +++
 1 file changed, 3 insertions(+)



(nuttx-apps) branch 24021901 created (now 84424e9ab)

2024-02-19 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a change to branch 24021901
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


  at 84424e9ab nsh/uname: alloc dynamic heap on non-GNU compilers

This branch includes the following new commits:

 new 84424e9ab nsh/uname: alloc dynamic heap on non-GNU compilers

The 1 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.




(nuttx-apps) 01/01: nsh/uname: alloc dynamic heap on non-GNU compilers

2024-02-19 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a commit to branch 24021901
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 84424e9abe0bef380188e4db9b3488e98ff05fc8
Author: chao an 
AuthorDate: Thu Feb 8 15:49:47 2024 +0800

nsh/uname: alloc dynamic heap on non-GNU compilers

The alloca() function is machine- and compiler-dependent.  For certain
applications, its use can improve efficiency compared to the use of
malloc(3) plus free(3).  In certain cases, it can also simplify memory
deallocation in applications that use longjmp(3) or siglongjmp(3).
Otherwise, its use is discouraged.

Signed-off-by: chao an 
---
 nshlib/nsh_syscmds.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c
index b5fa7af08..2e708b8cc 100644
--- a/nshlib/nsh_syscmds.c
+++ b/nshlib/nsh_syscmds.c
@@ -687,6 +687,7 @@ int cmd_rptun(FAR struct nsh_vtbl_s *vtbl, int argc, FAR 
char **argv)
 #ifndef CONFIG_NSH_DISABLE_UNAME
 int cmd_uname(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
 {
+  FAR void *putsname;
   FAR const char *str;
   struct lib_memoutstream_s stream;
   struct utsname info;
@@ -780,8 +781,12 @@ int cmd_uname(FAR struct nsh_vtbl_s *vtbl, int argc, FAR 
char **argv)
   /* Process each option */
 
   first = true;
-  lib_memoutstream(, alloca(sizeof(struct utsname)),
-   sizeof(struct utsname));
+#ifdef __GNUC__
+  putsname = alloca(sizeof(struct utsname));
+#else
+  putsname = malloc(sizeof(struct utsname));
+#endif
+  lib_memoutstream(, putsname, sizeof(struct utsname));
   for (i = 0; set != 0; i++)
 {
   unsigned int mask = (1 << i);
@@ -836,6 +841,9 @@ int cmd_uname(FAR struct nsh_vtbl_s *vtbl, int argc, FAR 
char **argv)
 
   lib_stream_putc(, '\n');
   nsh_write(vtbl, stream.buffer, stream.common.nput);
+#ifndef __GNUC__
+  free(putsname);
+#endif
   return OK;
 }
 #endif



(nuttx) branch master updated (b283e39eb5 -> 331877d4ee)

2024-02-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from b283e39eb5 Add support for hpm6360evk
 add 331877d4ee boards/raspberrypi-pico: Add autoleds and userleds support

No new revisions were added by this update.

Summary of changes:
 boards/Kconfig |  1 +
 boards/arm/rp2040/raspberrypi-pico/include/board.h | 42 ++
 boards/arm/rp2040/raspberrypi-pico/src/Make.defs   |  6 
 .../raspberrypi-pico/src/rp2040_autoleds.c}| 29 +++
 .../rp2040/raspberrypi-pico/src/rp2040_bringup.c   | 15 
 .../arm/rp2040/raspberrypi-pico/src/rp2040_pico.h  |  4 +++
 .../raspberrypi-pico/src/rp2040_userleds.c}| 34 +-
 7 files changed, 100 insertions(+), 31 deletions(-)
 copy boards/arm/{imxrt/imxrt1050-evk/src/imxrt_autoleds.c => 
rp2040/raspberrypi-pico/src/rp2040_autoleds.c} (89%)
 copy boards/arm/{stm32/omnibusf4/src/stm32_userleds.c => 
rp2040/raspberrypi-pico/src/rp2040_userleds.c} (92%)



(nuttx) branch master updated (410ac71b70 -> 0e55e461a5)

2024-02-15 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 410ac71b70 fix typo error in quickstart compiling_cmake
 add 0e55e461a5 docs/tmpfs: add initial document

No new revisions were added by this update.

Summary of changes:
 Documentation/components/filesystem/tmpfs.rst | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)



(nuttx) branch master updated: fix typo error in quickstart compiling_cmake

2024-02-15 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 410ac71b70 fix typo error in quickstart compiling_cmake
410ac71b70 is described below

commit 410ac71b701e0ff1fb97147a17593f38b13f0139
Author: KMSorSMS 
AuthorDate: Wed Feb 14 21:03:45 2024 +0800

fix typo error in quickstart compiling_cmake

"
I used

cd nuttx
cmake -B build -DBOARD_CONFIG=stm32f401rc-rs485:nsh -GNinja

to config
and when following the instruction in this official websites I found the
command to use cmake to build the target is wrong.
which is "cmake --build build -t menuconfig" also wrong the output dir
"build/nuttx".
and by the way, In my practice I find the bin file and elf file is not
in build/nuttx but in build/. So I changed these. But I'm not 100% sure
that my fix is right as I'm a beginner, but what I fix works fine in my
computer. This is my first PR to the public doc. My fix maybe totally
wrong as I am not get into the nuttx, just following the instruction and
encountered some mistakes.
thx for reviewing
"
---
 Documentation/quickstart/compiling_cmake.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/quickstart/compiling_cmake.rst 
b/Documentation/quickstart/compiling_cmake.rst
index 6a4df5aadf..86259aa6b1 100644
--- a/Documentation/quickstart/compiling_cmake.rst
+++ b/Documentation/quickstart/compiling_cmake.rst
@@ -45,10 +45,10 @@ We can now build NuttX. To do so, you can simply run:
   .. code-block:: console
 
  $ cd nuttx
- $ cmake --build build -t menuconfig 
+ $ cmake --build build 
 
 The build will complete by generating the binary outputs
-inside ``build/nuttx`` directory. Typically this includes the ``nuttx``
+inside ``build/`` directory. Typically this includes the ``nuttx``
 ELF file (suitable for debugging using ``gdb``) and a ``nuttx.bin``
 file that can be flashed to the board.
 



(nuttx) branch master updated: fs/mount: add FS_RPMSGFS as cause of NODFS_SUPPORT

2024-02-10 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ec7c876f13 fs/mount: add FS_RPMSGFS as cause of NODFS_SUPPORT
ec7c876f13 is described below

commit ec7c876f13751786daa96831b97489c8761f2e2d
Author: Yanfeng Liu 
AuthorDate: Sat Feb 10 13:09:25 2024 +0800

fs/mount: add FS_RPMSGFS as cause of NODFS_SUPPORT

It seems that RPMSGFS is missed from the list that doesn't need block or
MTD drivers. This attempts to add it.

Signed-off-by: Yanfeng Liu 
---
 fs/mount/fs_mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/mount/fs_mount.c b/fs/mount/fs_mount.c
index ac5756854b..83396035e9 100644
--- a/fs/mount/fs_mount.c
+++ b/fs/mount/fs_mount.c
@@ -68,7 +68,7 @@
 defined(CONFIG_FS_PROCFS) || defined(CONFIG_NFS) || \
 defined(CONFIG_FS_TMPFS) || defined(CONFIG_FS_USERFS) || \
 defined(CONFIG_FS_CROMFS) || defined(CONFIG_FS_UNIONFS) || \
-defined(CONFIG_FS_HOSTFS)
+defined(CONFIG_FS_HOSTFS) || defined(CONFIG_FS_RPMSGFS)
 #  define NODFS_SUPPORT
 #endif
 



(nuttx) branch master updated (980102c536 -> 5a10367312)

2024-02-05 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 980102c536 boards/arm/cxd56xx: Fix the modem reset sequence
 add 5a10367312 net/nat: Fix ICMP Error MSG Processing

No new revisions were added by this update.

Summary of changes:
 net/nat/ipv4_nat.c | 54 --
 1 file changed, 36 insertions(+), 18 deletions(-)



(nuttx) branch master updated: net/rpmsgsock: Rename rpmsg_socket_getconnname to rpmsg_socket_getpeername

2024-02-04 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 3594e3e541 net/rpmsgsock: Rename rpmsg_socket_getconnname to 
rpmsg_socket_getpeername
3594e3e541 is described below

commit 3594e3e54142a1b85e534968e988c256d96357c2
Author: Xiang Xiao 
AuthorDate: Mon Jan 29 20:53:34 2024 +0800

net/rpmsgsock: Rename rpmsg_socket_getconnname to rpmsg_socket_getpeername

to align with the naming convention of getpeername.

Signed-off-by: Xiang Xiao 
---
 net/rpmsg/rpmsg_sockif.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/rpmsg/rpmsg_sockif.c b/net/rpmsg/rpmsg_sockif.c
index 9931c9903f..7f12350fd1 100644
--- a/net/rpmsg/rpmsg_sockif.c
+++ b/net/rpmsg/rpmsg_sockif.c
@@ -146,7 +146,7 @@ static intrpmsg_socket_bind(FAR struct socket 
*psock,
 static intrpmsg_socket_getsockname(FAR struct socket *psock,
FAR struct sockaddr *addr,
FAR socklen_t *addrlen);
-static intrpmsg_socket_getconnname(FAR struct socket *psock,
+static intrpmsg_socket_getpeername(FAR struct socket *psock,
FAR struct sockaddr *addr,
FAR socklen_t *addrlen);
 static intrpmsg_socket_listen(FAR struct socket *psock, int backlog);
@@ -184,7 +184,7 @@ const struct sock_intf_s g_rpmsg_sockif =
   rpmsg_socket_addref,  /* si_addref */
   rpmsg_socket_bind,/* si_bind */
   rpmsg_socket_getsockname, /* si_getsockname */
-  rpmsg_socket_getconnname, /* si_getconnname */
+  rpmsg_socket_getpeername, /* si_getpeername */
   rpmsg_socket_listen,  /* si_listen */
   rpmsg_socket_connect, /* si_connect */
   rpmsg_socket_accept,  /* si_accept */
@@ -679,7 +679,7 @@ static int rpmsg_socket_getsockname(FAR struct socket 
*psock,
   return ret;
 }
 
-static int rpmsg_socket_getconnname(FAR struct socket *psock,
+static int rpmsg_socket_getpeername(FAR struct socket *psock,
 FAR struct sockaddr *addr,
 FAR socklen_t *addrlen)
 {



(nuttx) branch master updated: arch/Kconfig: replace RPTUN_PING with RPMSG_PING

2024-02-01 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new dbe42db611 arch/Kconfig: replace RPTUN_PING with RPMSG_PING
dbe42db611 is described below

commit dbe42db611fa2fc809c63428b239e8be9a9f3b7a
Author: Yanfeng Liu 
AuthorDate: Thu Feb 1 12:49:33 2024 +0800

arch/Kconfig: replace RPTUN_PING with RPMSG_PING

The RPTUN_PING option has been replaced by RPMSG_PING but this
use for PERF_EVENTS is left behind, so replace it here as well.

Signed-off-by: Yanfeng Liu 
---
 arch/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 3173dcf3ab..d5de8d324d 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -523,7 +523,7 @@ config ARCH_HAVE_PERF_EVENTS
 
 config ARCH_PERF_EVENTS
bool "Configure hardware performance counting"
-   default y if SCHED_CRITMONITOR || SCHED_IRQMONITOR || RPTUN_PING || 
SEGGER_SYSVIEW
+   default y if SCHED_CRITMONITOR || SCHED_IRQMONITOR || RPMSG_PING || 
SEGGER_SYSVIEW
default n
depends on ARCH_HAVE_PERF_EVENTS
---help---



(nuttx) branch master updated: arm: sama5: sam_serial: fix to compile with "UART Flow control enabled" on SAMA5D2.

2024-01-25 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 8571893435 arm: sama5: sam_serial: fix to compile with "UART Flow 
control enabled" on SAMA5D2.
8571893435 is described below

commit 857189343597cfac5c8bb287e0e7db49959ff643
Author: Takeyoshi Kikuchi 
AuthorDate: Fri Jan 26 09:17:33 2024 +0900

arm: sama5: sam_serial: fix to compile with "UART Flow control enabled" on 
SAMA5D2.

SAMA5D2 has UART (TX/RX only) and FLEXCOM USART (with control pins).
UART has only TX/RX, so if I try to use flow control with FLEXCOM USART,
there is no register definition on the UART side and get a compilation 
error.

Signed-off-by: Takeyoshi Kikuchi 
---
 arch/arm/src/sama5/sam_serial.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/src/sama5/sam_serial.c b/arch/arm/src/sama5/sam_serial.c
index 6d56c6dd31..45d74c6ee6 100644
--- a/arch/arm/src/sama5/sam_serial.c
+++ b/arch/arm/src/sama5/sam_serial.c
@@ -1019,6 +1019,7 @@ static int up_setup(struct uart_dev_s *dev)
   up_shutdown(dev);
 
 #if defined(CONFIG_SERIAL_IFLOWCONTROL) || defined(CONFIG_SERIAL_OFLOWCONTROL)
+#if defined(ATSAMA5D3) || defined(ATSAMA5D4)
   /* Setting the USART to operate with hardware handshaking is performed by
* writing the USART_MODE field in the Mode Register (US_MR) to the value
* 0x2. ... Using this mode requires using the PDC or DMAC channel for
@@ -1032,6 +1033,7 @@ static int up_setup(struct uart_dev_s *dev)
   regval = (UART_MR_MODE_HWHS | SAM_MR_USCLKS | UART_MR_CHMODE_NORMAL);
 }
   else
+#endif
 #endif
 {
 #if defined(ATSAMA5D2)



(nuttx) branch master updated: bcmf_driver:wlan interface status reset by unsolicited wpa packet

2024-01-24 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new cefb170ea7 bcmf_driver:wlan interface status reset by unsolicited wpa 
packet
cefb170ea7 is described below

commit cefb170ea7875d3df0dae305c565fb2db2f0868f
Author: xuchaojie 
AuthorDate: Tue Oct 24 12:39:04 2023 +0800

bcmf_driver:wlan interface status reset by unsolicited wpa packet

Avoid incorrect NIC flag Settings

Signed-off-by: xuchaojie 
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
index 879e8fc941..ab7b789f69 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_driver.c
@@ -632,7 +632,7 @@ void bcmf_wl_auth_event_handler(FAR struct bcmf_dev_s *priv,
 
   if (type == WLC_E_PSK_SUP)
 {
-  carrier = (reason == WLC_E_SUP_OTHER) ? 1 : 0;
+  carrier = ((reason == WLC_E_SUP_OTHER) || (reason == 0)) ? 1 : 0;
   if (priv->auth_pending)
 {
   priv->auth_status = reason;



(nuttx) branch master updated: fix build with CONFIG_SCHED_INSTRUMENTATION_FUNCTION

2024-01-22 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 81996900db fix build with CONFIG_SCHED_INSTRUMENTATION_FUNCTION
81996900db is described below

commit 81996900dbe00f7af880305b1385bf70ad63e00b
Author: YAMAMOTO Takashi 
AuthorDate: Mon Jan 22 17:58:14 2024 +0900

fix build with CONFIG_SCHED_INSTRUMENTATION_FUNCTION
---
 drivers/note/note_driver.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c
index 758f1c5a77..b02d94e98f 100644
--- a/drivers/note/note_driver.c
+++ b/drivers/note/note_driver.c
@@ -162,8 +162,8 @@ static void note_driver_instrument_leave(FAR void *this_fn,
 FAR void *call_site, FAR void *arg) noinstrument_function;
 static struct instrument_s g_note_instrument =
 {
-  .entry = note_driver_instrument_enter,
-  .exit = note_driver_instrument_leave,
+  .enter = note_driver_instrument_enter,
+  .leave = note_driver_instrument_leave,
 };
 #endif
 
@@ -1969,7 +1969,7 @@ int note_driver_register(FAR struct note_driver_s *driver)
 
   if (!initialized)
 {
-  instrument_register(g_note_instrument)
+  instrument_register(_note_instrument);
   initialized = true;
 }
 #endif



(nuttx) branch master updated: docs/comments: fix some typos

2024-01-14 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 3c327efd2f docs/comments: fix some typos
3c327efd2f is described below

commit 3c327efd2fa26a4ee8a7b8519ba063d3d2533a47
Author: Yanfeng Liu 
AuthorDate: Mon Jan 15 10:21:09 2024 +0800

docs/comments: fix some typos

Signed-off-by: Yanfeng Liu 
---
 Documentation/components/syscall.rst | 4 ++--
 arch/arm/src/common/arm_initialize.c | 2 +-
 arch/arm64/src/common/arm64_initialize.c | 2 +-
 arch/ceva/src/common/ceva_doirq.c| 2 +-
 arch/renesas/src/common/renesas_initialize.c | 2 +-
 arch/z16/src/common/z16_initialize.c | 2 +-
 arch/z80/src/common/z80_initialize.c | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Documentation/components/syscall.rst 
b/Documentation/components/syscall.rst
index 07a1310afa..9a175f1c78 100644
--- a/Documentation/components/syscall.rst
+++ b/Documentation/components/syscall.rst
@@ -202,8 +202,8 @@ mksyscall
 -
 
 mksyscall is C program that is used used during the initial NuttX build
-by the logic in the top-level ``syscall/``! directory. Information about the
+by the logic in the top-level ``syscall/`` directory. Information about the
 stubs and proxies is maintained in a comma separated value (CSV) file
-in the ``syscall/`` directory.  The mksyscall program will accept this CVS
+in the ``syscall/`` directory.  The mksyscall program will accept this CSV
 file as input and generate all of the required proxy or stub files as
 output.  See ``Documentation/components/tools/`` for additional information.
diff --git a/arch/arm/src/common/arm_initialize.c 
b/arch/arm/src/common/arm_initialize.c
index 65a09495e5..c86621280b 100644
--- a/arch/arm/src/common/arm_initialize.c
+++ b/arch/arm/src/common/arm_initialize.c
@@ -33,7 +33,7 @@
  /
 
 /* g_current_regs[] holds a references to the current interrupt level
- * register storage structure.  If is non-NULL only during interrupt
+ * register storage structure.  It is non-NULL only during interrupt
  * processing.  Access to g_current_regs[] must be through the macro
  * CURRENT_REGS for portability.
  */
diff --git a/arch/arm64/src/common/arm64_initialize.c 
b/arch/arm64/src/common/arm64_initialize.c
index 3cb4aaa325..83d30c566d 100644
--- a/arch/arm64/src/common/arm64_initialize.c
+++ b/arch/arm64/src/common/arm64_initialize.c
@@ -51,7 +51,7 @@
  /
 
 /* g_current_regs[] holds a references to the current interrupt level
- * register storage structure.  If is non-NULL only during interrupt
+ * register storage structure.  It is non-NULL only during interrupt
  * processing.  Access to g_current_regs[] must be through the macro
  * CURRENT_REGS for portability.
  */
diff --git a/arch/ceva/src/common/ceva_doirq.c 
b/arch/ceva/src/common/ceva_doirq.c
index 0763410e94..7a24a14671 100644
--- a/arch/ceva/src/common/ceva_doirq.c
+++ b/arch/ceva/src/common/ceva_doirq.c
@@ -34,7 +34,7 @@
  /
 
 /* g_current_regs[] holds a references to the current interrupt level
- * register storage structure.  If is non-NULL only during interrupt
+ * register storage structure.  It is non-NULL only during interrupt
  * processing.  Access to g_current_regs[] must be through the macro
  * CURRENT_REGS for portability.
  */
diff --git a/arch/renesas/src/common/renesas_initialize.c 
b/arch/renesas/src/common/renesas_initialize.c
index de395e4e4b..6f531076e9 100644
--- a/arch/renesas/src/common/renesas_initialize.c
+++ b/arch/renesas/src/common/renesas_initialize.c
@@ -33,7 +33,7 @@
  /
 
 /* This holds a references to the current interrupt level register storage
- * structure.  If is non-NULL only during interrupt processing.
+ * structure.  It is non-NULL only during interrupt processing.
  */
 
 /* Actually a pointer to the beginning of a uint8_t array */
diff --git a/arch/z16/src/common/z16_initialize.c 
b/arch/z16/src/common/z16_initialize.c
index ad206c13ec..0ab242f602 100644
--- a/arch/z16/src/common/z16_initialize.c
+++ b/arch/z16/src/common/z16_initialize.c
@@ -33,7 +33,7 @@
  /
 
 /* This holds a references to the current interrupt level
- * register storage structure.  If is non-NULL only during
+ * register storage structure.  It is non-NULL only during
  * interrupt processing.
  */
 
diff --git a/arch/z80/src/common/z80_initialize.c 
b/arch/z80/src/common/z80_initialize.c
index 235974fc17..7415cc12cd 100644
--- a/arch/z80/src/common

(nuttx) branch master updated: xtensa/esp32s3: Support WPA3 on softap mode

2024-01-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b739b2b18a xtensa/esp32s3: Support WPA3 on softap mode
b739b2b18a is described below

commit b739b2b18ae83151345d2cdf5c7ae73998092d0b
Author: chen...@espressif.com 
AuthorDate: Fri Dec 29 19:35:25 2023 +0800

xtensa/esp32s3: Support WPA3 on softap mode

Signed-off-by: chen...@espressif.com 
---
 arch/xtensa/src/esp32s3/Kconfig| 14 +++
 arch/xtensa/src/esp32s3/Make.defs  |  2 +-
 arch/xtensa/src/esp32s3/Wireless.mk| 32 ++
 arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c | 19 +--
 4 files changed, 64 insertions(+), 3 deletions(-)

diff --git a/arch/xtensa/src/esp32s3/Kconfig b/arch/xtensa/src/esp32s3/Kconfig
index 0568c64e74..04e4e86e10 100644
--- a/arch/xtensa/src/esp32s3/Kconfig
+++ b/arch/xtensa/src/esp32s3/Kconfig
@@ -1407,6 +1407,20 @@ config ESP32S3_WIFI_STATION_SOFTAP
 
 endchoice # ESP32S3 Wi-Fi mode
 
+config ESP_WIFI_ENABLE_SAE_PK
+   bool "Enable SAE-PK"
+   default y
+   ---help---
+   Select this option to enable SAE-PK
+
+config ESP_WIFI_ENABLE_WPA3_OWE_STA
+   bool "Enable OWE STA"
+   default y
+   ---help---
+   Select this option to allow the device to establish OWE 
connection with eligible AP's.
+   PMF (Protected Management Frames) is a prerequisite feature for 
a WPA3 connection, it needs to be
+   explicitly configured before attempting connection. Please 
refer to the Wi-Fi Driver API Guide for details.
+
 config ESP32S3_WIFI_STATIC_RXBUF_NUM
int "Wi-Fi static RX buffer number"
default 10
diff --git a/arch/xtensa/src/esp32s3/Make.defs 
b/arch/xtensa/src/esp32s3/Make.defs
index 3dd9169823..d6563457cc 100644
--- a/arch/xtensa/src/esp32s3/Make.defs
+++ b/arch/xtensa/src/esp32s3/Make.defs
@@ -191,7 +191,7 @@ endif
 
 ESP_HAL_3RDPARTY_REPO   = esp-hal-3rdparty
 ifndef ESP_HAL_3RDPARTY_VERSION
-   ESP_HAL_3RDPARTY_VERSION = 22804823777dbbb7f43925b7729b3a32331aa7cd
+   ESP_HAL_3RDPARTY_VERSION = 72cebefc6238637ae0a0ec6641fa4e2a0faa4901
 endif
 
 ifndef ESP_HAL_3RDPARTY_URL
diff --git a/arch/xtensa/src/esp32s3/Wireless.mk 
b/arch/xtensa/src/esp32s3/Wireless.mk
index 9ca8d91fa8..224f6eaf15 100644
--- a/arch/xtensa/src/esp32s3/Wireless.mk
+++ b/arch/xtensa/src/esp32s3/Wireless.mk
@@ -87,6 +87,20 @@ CHIP_CSRCS += platform.c
 CHIP_CSRCS += sha1.c
 CHIP_CSRCS += sha256.c
 CHIP_CSRCS += sha512.c
+CHIP_CSRCS += pk.c
+CHIP_CSRCS += pk_wrap.c
+CHIP_CSRCS += pkparse.c
+CHIP_CSRCS += ecdsa.c
+CHIP_CSRCS += asn1parse.c
+CHIP_CSRCS += asn1write.c
+CHIP_CSRCS += rsa.c
+CHIP_CSRCS += md5.c
+CHIP_CSRCS += oid.c
+CHIP_CSRCS += pem.c
+CHIP_CSRCS += hmac_drbg.c
+CHIP_CSRCS += hash_info.c
+CHIP_CSRCS += rsa_alt_helpers.c
+CHIP_CSRCS += ecdh.c
 
 VPATH += 
chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port
 
@@ -113,6 +127,16 @@ CFLAGS += $(DEFINE_PREFIX)ESP_SUPPLICANT
 CFLAGS += $(DEFINE_PREFIX)ESPRESSIF_USE
 CFLAGS += $(DEFINE_PREFIX)IEEE8021X_EAPOL
 CFLAGS += $(DEFINE_PREFIX)USE_WPA2_TASK
+CFLAGS += $(DEFINE_PREFIX)CONFIG_SHA256
+CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE
+
+ifeq ($(CONFIG_ESP_WIFI_ENABLE_SAE_PK),y)
+CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE_PK
+endif
+
+ifeq ($(CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA),y)
+CFLAGS += $(DEFINE_PREFIX)CONFIG_OWE_STA
+endif
 
 ifeq ($(CONFIG_ESP_WIFI_GCMP_SUPPORT),y)
 CFLAGS += $(DEFINE_PREFIX)CONFIG_GCMP
@@ -131,6 +155,7 @@ INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)
 
 CHIP_CSRCS += ap_config.c
 CHIP_CSRCS += ieee802_11.c
+CHIP_CSRCS += comeback_token.c
 CHIP_CSRCS += pmksa_cache_auth.c
 CHIP_CSRCS += sta_info.c
 CHIP_CSRCS += wpa_auth_ie.c
@@ -143,6 +168,10 @@ INCLUDES += 
$(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)
 CHIP_CSRCS += dragonfly.c
 CHIP_CSRCS += sae.c
 CHIP_CSRCS += wpa_common.c
+CHIP_CSRCS += sae_pk.c
+CHIP_CSRCS += bss.c
+CHIP_CSRCS += scan.c
+CHIP_CSRCS += ieee802_11_common.c
 
 VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)crypto
 
@@ -213,6 +242,8 @@ CHIP_CSRCS += esp_wpa_main.c
 CHIP_CSRCS += esp_wpa2.c
 CHIP_CSRCS += esp_wpa3.c
 CHIP_CSRCS += esp_wpas_glue.c
+CHIP_CSRCS += esp_owe.c
+CHIP_CSRCS += esp_scan.c
 
 VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src$(DELIM)crypto
 
@@ -223,5 +254,6 @@ CHIP_CSRCS += crypto_mbedtls-ec.c
 CHIP_CSRCS += crypto_mbedtls-rsa.c
 CHIP_CSRCS += crypto_mbedtls.c
 CHIP_CSRCS += tls_mbedtls.c
+CHIP_CSRCS += aes-siv.c
 
 endif
diff --git a/arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c 
b/arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c
index 74c40e541b..daf72babd5 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c
+++ b/arch/xtensa/src/

(nuttx) branch master updated: log messages of binfmt are very much.

2023-12-29 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 675f775494 log messages of binfmt are very much.
675f775494 is described below

commit 675f7754940160fc0ce73bcbfa5b757b64594fd4
Author: Yanfeng Liu 
AuthorDate: Fri Dec 29 14:35:25 2023 +0800

log messages of binfmt are very much.

this is to adjust levels of a few of them based on debugging
experiences. These non-critical logs were marked as errors. So we
likely can adjust them as warnings so that real errors can
stand out easily.

Signed-off-by: Yanfeng Liu 
---
 binfmt/libelf/libelf_bind.c| 2 +-
 binfmt/libelf/libelf_symbols.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/binfmt/libelf/libelf_bind.c b/binfmt/libelf/libelf_bind.c
index d6a26305e0..743ac71aeb 100644
--- a/binfmt/libelf/libelf_bind.c
+++ b/binfmt/libelf/libelf_bind.c
@@ -496,7 +496,7 @@ static int elf_relocateadd(FAR struct elf_loadinfo_s 
*loadinfo, int relidx,
 
   if (ret == -ESRCH)
 {
-  berr("Section %d reloc %d: "
+  bwarn("Section %d reloc %d: "
"Undefined symbol[%d] has no name: %d\n",
relidx, i, symidx, ret);
 }
diff --git a/binfmt/libelf/libelf_symbols.c b/binfmt/libelf/libelf_symbols.c
index cfdd41d15e..bbc232cc76 100644
--- a/binfmt/libelf/libelf_symbols.c
+++ b/binfmt/libelf/libelf_symbols.c
@@ -76,7 +76,7 @@ static int elf_symname(FAR struct elf_loadinfo_s *loadinfo,
 
   if (sym->st_name == 0)
 {
-  berr("Symbol has no name\n");
+  bwarn("Symbol has no name\n");
   return -ESRCH;
 }
 
@@ -292,7 +292,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR 
Elf_Sym *sym,
  * indicate the nameless symbol.
  */
 
-berr("SHN_UNDEF: Failed to get symbol name: %d\n", ret);
+bwarn("SHN_UNDEF: Failed to get symbol name: %d\n", ret);
 return ret;
   }
 



(nuttx) branch master updated: sim: make the cmake version of hostfs build similar to the Makefile one

2023-12-28 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f7fb816235 sim: make the cmake version of hostfs build similar to the 
Makefile one
f7fb816235 is described below

commit f7fb816235bf81247fa8841a0bc4cf623518ba72
Author: YAMAMOTO Takashi 
AuthorDate: Fri Dec 29 02:35:58 2023 +0900

sim: make the cmake version of hostfs build similar to the Makefile one
---
 arch/sim/src/sim/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/sim/src/sim/CMakeLists.txt b/arch/sim/src/sim/CMakeLists.txt
index 505d4aa63c..a01d685edf 100644
--- a/arch/sim/src/sim/CMakeLists.txt
+++ b/arch/sim/src/sim/CMakeLists.txt
@@ -229,9 +229,10 @@ list(APPEND HOST_DEFINITIONS 
CONFIG_NAME_MAX=${CONFIG_NAME_MAX})
 
 configure_file(${NUTTX_DIR}/include/nuttx/fs/hostfs.h
${CMAKE_CURRENT_BINARY_DIR}/hostfs.h COPYONLY)
+configure_file(${CMAKE_BINARY_DIR}/include/nuttx/config.h
+   ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY)
 target_include_directories(nuttx PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
 
-target_include_directories(nuttx PRIVATE ${CMAKE_BINARY_DIR}/include/nuttx)
 target_include_directories(nuttx PRIVATE ${CMAKE_CURRENT_LIST_DIR})
 
 target_include_directories(sim_head PUBLIC ${NUTTX_DIR}/sched)



(nuttx) 02/02: arch/armv7-a: Change space to tab in arm_smccc.S

2023-12-27 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 087c519dd657fb5cfa14adb25f1fd2680298953c
Author: Xiang Xiao 
AuthorDate: Tue Dec 26 12:09:03 2023 +0800

arch/armv7-a: Change space to tab in arm_smccc.S

follow the coding style from other assembler source files

Signed-off-by: Xiang Xiao 
---
 arch/arm/src/armv7-a/arm_smccc.S | 57 ++--
 1 file changed, 32 insertions(+), 25 deletions(-)

diff --git a/arch/arm/src/armv7-a/arm_smccc.S b/arch/arm/src/armv7-a/arm_smccc.S
index 51befee045..3365feb298 100644
--- a/arch/arm/src/armv7-a/arm_smccc.S
+++ b/arch/arm/src/armv7-a/arm_smccc.S
@@ -44,33 +44,40 @@
  * handled by Secure Monitor code running in EL3.
  */
 
-.text
-.syntax unified
+   .text
+   .syntax unified
+
+   .global arm_smccc_smc
+   .type   arm_smccc_smc, function
 
-.global arm_smccc_smc
-.type   arm_smccc_smc, function
 arm_smccc_smc:
-mov r12, sp
-push{r4-r7}
-ldm r12, {r4-r7}
-smc #0
-pop {r4-r7}
-ldr r12, [sp, #(4 * 4)]
-stm r12, {r0-r3}
-bx  lr
+   mov r12, sp
+   push{r4-r7}
+   ldm r12, {r4-r7}
+   smc #0
+   pop {r4-r7}
+   ldr r12, [sp, #(4 * 4)]
+   stm r12, {r0-r3}
+   bx  lr
 
-/* The HVC instruction is used to generate a synchronous exception that is
- * handled by a hypervisor running in EL2.
- */
+   .size   arm_smccc_smc, . - arm_smccc_smc
+
+   /* The HVC instruction is used to generate a synchronous exception that 
is
+* handled by a hypervisor running in EL2.
+*/
+
+   .global arm_smccc_hvc
+   .type   arm_smccc_hvc, function
 
-.global arm_smccc_hvc
-.type   arm_smccc_hvc, function
 arm_smccc_hvc:
-mov r12, sp
-push{r4-r7}
-ldm r12, {r4-r7}
-hvc #0
-pop {r4-r7}
-ldr r12, [sp, #(4 * 4)]
-stm r12, {r0-r3}
-bx  lr
+   mov r12, sp
+   push{r4-r7}
+   ldm r12, {r4-r7}
+   hvc #0
+   pop {r4-r7}
+   ldr r12, [sp, #(4 * 4)]
+   stm r12, {r0-r3}
+   bx  lr
+
+   .size   arm_smccc_hvc, . - arm_smccc_hvc
+   .end



(nuttx) branch master updated (b9bd88d9d3 -> 087c519dd6)

2023-12-27 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from b9bd88d9d3 rptun: Select OPENMAP under RPTUN
 new 770d579630 arch/arm: Move arm_vectoraddrexcptn into arm_vectors.S
 new 087c519dd6 arch/armv7-a: Change space to tab in arm_smccc.S

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/arm/src/arm/Make.defs  |  3 +-
 arch/arm/src/arm/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/arm/arm_vectors.S  | 16 +++
 arch/arm/src/armv7-a/CMakeLists.txt |  3 +-
 arch/arm/src/armv7-a/Make.defs  |  3 +-
 arch/arm/src/armv7-a/arm_smccc.S| 57 +---
 arch/arm/src/armv7-a/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/armv7-a/arm_vectors.S  | 16 +++
 arch/arm/src/armv7-r/CMakeLists.txt |  3 +-
 arch/arm/src/armv7-r/Make.defs  |  3 +-
 arch/arm/src/armv7-r/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/armv7-r/arm_vectors.S  | 16 +++
 arch/arm/src/armv8-r/Make.defs  |  3 +-
 arch/arm/src/armv8-r/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/armv8-r/arm_vectors.S  | 16 +++
 15 files changed, 102 insertions(+), 305 deletions(-)
 delete mode 100644 arch/arm/src/arm/arm_vectoraddrexcptn.S
 delete mode 100644 arch/arm/src/armv7-a/arm_vectoraddrexcptn.S
 delete mode 100644 arch/arm/src/armv7-r/arm_vectoraddrexcptn.S
 delete mode 100644 arch/arm/src/armv8-r/arm_vectoraddrexcptn.S



(nuttx) 01/02: arch/arm: Move arm_vectoraddrexcptn into arm_vectors.S

2023-12-27 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 770d579630aaf488f84d4092c31c631106b4b392
Author: Xiang Xiao 
AuthorDate: Tue Dec 26 03:38:16 2023 +0800

arch/arm: Move arm_vectoraddrexcptn into arm_vectors.S

and remove arm_vectoraddrexcptn.S like other exception handler

Signed-off-by: Xiang Xiao 
---
 arch/arm/src/arm/Make.defs  |  3 +-
 arch/arm/src/arm/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/arm/arm_vectors.S  | 16 +++
 arch/arm/src/armv7-a/CMakeLists.txt |  3 +-
 arch/arm/src/armv7-a/Make.defs  |  3 +-
 arch/arm/src/armv7-a/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/armv7-a/arm_vectors.S  | 16 +++
 arch/arm/src/armv7-r/CMakeLists.txt |  3 +-
 arch/arm/src/armv7-r/Make.defs  |  3 +-
 arch/arm/src/armv7-r/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/armv7-r/arm_vectors.S  | 16 +++
 arch/arm/src/armv8-r/Make.defs  |  3 +-
 arch/arm/src/armv8-r/arm_vectoraddrexcptn.S | 67 -
 arch/arm/src/armv8-r/arm_vectors.S  | 16 +++
 14 files changed, 70 insertions(+), 280 deletions(-)

diff --git a/arch/arm/src/arm/Make.defs b/arch/arm/src/arm/Make.defs
index cbe3fa4a8b..60a8d576da 100644
--- a/arch/arm/src/arm/Make.defs
+++ b/arch/arm/src/arm/Make.defs
@@ -29,8 +29,7 @@ CMN_CSRCS += arm_prefetchabort.c arm_schedulesigaction.c
 CMN_CSRCS += arm_sigdeliver.c arm_syscall.c arm_tcbinfo.c
 CMN_CSRCS += arm_undefinedinsn.c
 
-CMN_ASRCS += arm_cache.S arm_vectoraddrexcptn.S
-CMN_ASRCS += arm_vectors.S arm_vectortab.S
+CMN_ASRCS += arm_cache.S arm_vectors.S arm_vectortab.S
 CMN_ASRCS += arm_saveusercontext.S
 
 ifeq ($(CONFIG_PAGING),y)
diff --git a/arch/arm/src/arm/arm_vectoraddrexcptn.S 
b/arch/arm/src/arm/arm_vectoraddrexcptn.S
deleted file mode 100644
index 5d32fd0341..00
--- a/arch/arm/src/arm/arm_vectoraddrexcptn.S
+++ /dev/null
@@ -1,67 +0,0 @@
-/
- * arch/arm/src/arm/arm_vectoraddrexceptn.S
- *
- * 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.
- *
- /
-
-/
- * Included Files
- /
-
-#include 
-#include 
-
-   .file   "arm_vectoraddrexcptn.S"
-
-/
- * Pre-processor Definitions
- /
-
-/
- * Public Symbols
- /
-
-   .globl  arm_vectoraddrexcptn
-
-/
- * Assembly Macros
- /
-
-/
- * Private Functions
- /
-
-   .text
-   .syntax unified
-   .arm
-
-/
- *  Name: arm_vectoraddrexcptn
- *
- * Description:
- *   Shouldn't happen.  This exception handler is in a separate file from
- *   other vector handlers because some processors do not support the
- *   Address Exception vector.
- *
- /
-
-   .globl  arm_vectoraddrexcptn
-   .type   arm_vectoraddrexcptn, %function
-arm_vectoraddrexcptn:
-   b   arm_vectoraddrexcptn
-   .size   arm_vectoraddrexcptn, . - arm_vectoraddrexcptn
-   .end
diff --git a/arch/arm/src/arm/arm_vectors.S b/arch/arm/src/arm/arm_vectors.S
index

(nuttx) branch master updated: rptun: Select OPENMAP under RPTUN

2023-12-27 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b9bd88d9d3 rptun: Select OPENMAP under RPTUN
b9bd88d9d3 is described below

commit b9bd88d9d3ddc74983b93b0ec02041d347be7ad3
Author: Xiang Xiao 
AuthorDate: Wed Dec 27 11:15:42 2023 +0800

rptun: Select OPENMAP under RPTUN

to simplify the IPC related configuration

Signed-off-by: Xiang Xiao 
---
 boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig | 1 -
 boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig | 1 -
 boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig| 1 -
 boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig   | 1 -
 boards/arm/nrf53/nrf5340-dk/configs/rptun_cpunet/defconfig   | 1 -
 boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm4_rptun/defconfig | 1 -
 boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm7_rptun/defconfig | 1 -
 boards/arm64/qemu/qemu-armv8a/configs/fb/defconfig   | 1 -
 boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig   | 1 -
 boards/arm64/qemu/qemu-armv8a/configs/netnsh_hv/defconfig| 1 -
 boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig   | 1 -
 boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp_hv/defconfig| 1 -
 boards/risc-v/mpfs/icicle/configs/rpmsg-ch1/defconfig| 1 -
 boards/risc-v/mpfs/icicle/configs/rpmsg-ch2/defconfig| 1 -
 boards/risc-v/mpfs/icicle/configs/usb/defconfig  | 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/fb/defconfig   | 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/fb64/defconfig | 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64/defconfig| 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64_smp/defconfig| 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh/defconfig   | 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh64/defconfig | 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh64_smp/defconfig | 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh_smp/defconfig   | 1 -
 boards/sim/sim/sim/configs/rpproxy/defconfig | 1 -
 boards/sim/sim/sim/configs/rpserver/defconfig| 1 -
 drivers/rptun/Kconfig| 2 +-
 drivers/virtio/Kconfig   | 2 +-
 openamp/Kconfig  | 2 +-
 28 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig 
b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig
index 3cb64134b0..34c10bf321 100644
--- a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig
+++ b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig
@@ -42,7 +42,6 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_LINELEN=64
 CONFIG_NSH_READLINE=y
-CONFIG_OPENAMP=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_PTHREAD_MUTEX_TYPES=y
 CONFIG_RAM_SIZE=524288
diff --git 
a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig 
b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig
index 968bc25f1f..e6cddda5a2 100644
--- a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig
+++ b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig
@@ -43,7 +43,6 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_LINELEN=64
 CONFIG_NSH_READLINE=y
-CONFIG_OPENAMP=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_PTHREAD_MUTEX_TYPES=y
 CONFIG_RAM_SIZE=524288
diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig 
b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig
index 79caf2728d..dbdf033d65 100644
--- a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig
+++ b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig
@@ -33,7 +33,6 @@ CONFIG_NRF53_SDC_MAX_COUNT=2
 CONFIG_NRF53_SDC_PUB_ADDR=0x0102030405
 CONFIG_NRF53_SOFTDEVICE_CONTROLLER=y
 CONFIG_NRF53_UART0=y
-CONFIG_OPENAMP=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=65535
 CONFIG_RAM_START=0x2100
diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig 
b/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig
index 01fed5032f..a2de714a73 100644
--- a/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig
+++ b/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig
@@ -27,7 +27,6 @@ CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_LINELEN=64
 CONFIG_NSH_READLINE=y
-CONFIG_OPENAMP=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=524288
 CONFIG_RAM_START=0x2000
diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpunet

(nuttx) branch master updated: espressif/mcuboot: Fix dependency of the Espressif's port MCUboot.

2023-12-22 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new daec4cf408 espressif/mcuboot: Fix dependency of the Espressif's port 
MCUboot.
daec4cf408 is described below

commit daec4cf4082d0391ac5ca2ad73e6c866d29e6d2c
Author: Tiago Medicci Serrano 
AuthorDate: Wed Dec 20 16:50:07 2023 -0300

espressif/mcuboot: Fix dependency of the Espressif's port MCUboot.

If the MCUboot (from nuttx-apps) is selected, the Espressif's port
of the MCUboot is not used as the 2nd stage bootloader.
---
 arch/risc-v/src/esp32c3/Kconfig | 1 +
 arch/xtensa/src/esp32/Kconfig   | 1 +
 arch/xtensa/src/esp32s2/Kconfig | 1 +
 arch/xtensa/src/esp32s3/Kconfig | 1 +
 4 files changed, 4 insertions(+)

diff --git a/arch/risc-v/src/esp32c3/Kconfig b/arch/risc-v/src/esp32c3/Kconfig
index 354187bcdf..a8b1caa8f3 100644
--- a/arch/risc-v/src/esp32c3/Kconfig
+++ b/arch/risc-v/src/esp32c3/Kconfig
@@ -1051,6 +1051,7 @@ config ESP32C3_APP_FORMAT_LEGACY
 
 config ESP32C3_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32C3_HAVE_OTA_PARTITION
---help---
The Espressif port of MCUboot supports the loading of 
unsegmented firmware
diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index 9794746ce1..0e374b24d9 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -2462,6 +2462,7 @@ config ESP32_APP_FORMAT_LEGACY
 
 config ESP32_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32_HAVE_OTA_PARTITION
---help---
The ESP32 port of MCUboot supports the loading of unsegmented 
firmware
diff --git a/arch/xtensa/src/esp32s2/Kconfig b/arch/xtensa/src/esp32s2/Kconfig
index bdda62eb02..5f40582572 100644
--- a/arch/xtensa/src/esp32s2/Kconfig
+++ b/arch/xtensa/src/esp32s2/Kconfig
@@ -1211,6 +1211,7 @@ config ESP32S2_APP_FORMAT_LEGACY
 
 config ESP32S2_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32S2_HAVE_OTA_PARTITION
---help---
The Espressif port of MCUboot supports the loading of 
unsegmented firmware
diff --git a/arch/xtensa/src/esp32s3/Kconfig b/arch/xtensa/src/esp32s3/Kconfig
index 8cb56eb8c4..88e3c892ef 100644
--- a/arch/xtensa/src/esp32s3/Kconfig
+++ b/arch/xtensa/src/esp32s3/Kconfig
@@ -2169,6 +2169,7 @@ config ESP32S3_APP_FORMAT_LEGACY
 
 config ESP32S3_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32S3_HAVE_OTA_PARTITION
---help---
The Espressif port of MCUboot supports the loading of 
unsegmented firmware



(nuttx) branch master updated: xtensa/esp32s3: Support reading encrypted partitions

2023-12-22 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2cb14c55f0 xtensa/esp32s3: Support reading encrypted partitions
2cb14c55f0 is described below

commit 2cb14c55f03e8bc8c3fc1f011ef164db1c3ff16c
Author: chen...@espressif.com 
AuthorDate: Fri Dec 15 20:49:16 2023 +0800

xtensa/esp32s3: Support reading encrypted partitions

Signed-off-by: chen...@espressif.com 
---
 arch/xtensa/src/esp32s3/esp32s3_partition.c | 98 ++---
 arch/xtensa/src/esp32s3/esp32s3_partition.h | 13 
 arch/xtensa/src/esp32s3/esp32s3_spiflash.c  | 38 +++
 arch/xtensa/src/esp32s3/esp32s3_spiflash.h  | 16 +
 4 files changed, 143 insertions(+), 22 deletions(-)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_partition.c 
b/arch/xtensa/src/esp32s3/esp32s3_partition.c
index 3a2e254ab4..857f588021 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_partition.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_partition.c
@@ -32,6 +32,8 @@
 #include 
 
 #include "esp32s3_spiflash_mtd.h"
+#include "esp32s3_partition.h"
+#include "esp32s3_spiflash.h"
 
 /
  * Pre-processor Definitions
@@ -70,6 +72,10 @@
 
 #define PARTITION_MOUNT_POINT CONFIG_ESP32S3_PARTITION_MOUNTPT
 
+/* Partition encrypted flag */
+
+#define PARTITION_FLAG_ENCRYPTED  (1 << 0)
+
 /
  * Private Types
  /
@@ -162,9 +168,11 @@ struct mtd_dev_priv_s
   uint8_t  type;/* Partition type */
   uint8_t  subtype; /* Partition sub-type */
   uint32_t flags;   /* Partition flags */
-
+  uint32_t offset;  /* Partition offset in SPI Flash */
+  uint32_t size;/* Partition size in SPI Flash */
   struct mtd_dev_s  *ll_mtd;/* Low-level MTD data */
   struct mtd_dev_s  *part_mtd;  /* Partition MTD data */
+  struct mtd_geometry_s   geo;  /* Partition geometry information */
 };
 
 /* OTA data entry */
@@ -621,8 +629,11 @@ int esp32s3_partition_init(void)
   int i;
   struct partition_info_priv_s *info;
   uint8_t *pbuf;
+  bool encrypt;
+  uint32_t flags;
   struct mtd_dev_s *mtd;
-  struct mtd_dev_s *mtd_part;
+  struct mtd_dev_s *mtd_ll;
+  struct mtd_dev_s *mtd_encrypt;
   struct mtd_geometry_s geo;
   struct mtd_dev_priv_s *mtd_priv;
   int ret = 0;
@@ -632,7 +643,7 @@ int esp32s3_partition_init(void)
   char path[PARTITION_LABEL_LEN + sizeof(PARTITION_MOUNT_POINT)];
 
   pbuf = kmm_malloc(PARTITION_MAX_SIZE);
-  if (pbuf == NULL)
+  if (!pbuf)
 {
   ferr("ERROR: Failed to allocate %d byte\n", PARTITION_MAX_SIZE);
   ret = -ENOMEM;
@@ -640,22 +651,27 @@ int esp32s3_partition_init(void)
 }
 
   mtd = esp32s3_spiflash_mtd();
-  if (mtd == NULL)
+  if (!mtd)
 {
   ferr("ERROR: Failed to get SPI flash MTD\n");
-  ret = -EIO;
+  ret = -ENOSYS;
   goto errout_with_mtd;
 }
 
-  ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long));
-  if (ret < 0)
+  mtd_encrypt = esp32s3_spiflash_encrypt_mtd();
+  if (!mtd_encrypt)
 {
-  ferr("ERROR: Failed to get info from MTD\n");
-  ret = -EIO;
+  ferr("ERROR: Failed to get SPI flash encrypted MTD\n");
+  ret = -ENOSYS;
   goto errout_with_mtd;
 }
 
-  ret = MTD_READ(mtd, PARTITION_TABLE_OFFSET, PARTITION_MAX_SIZE, pbuf);
+  /* Even without SPI Flash encryption, we can also use encrypted
+   * MTD to read no-encrypted data.
+   */
+
+  ret = MTD_READ(mtd_encrypt, PARTITION_TABLE_OFFSET,
+ PARTITION_MAX_SIZE, pbuf);
   if (ret != PARTITION_MAX_SIZE)
 {
   ferr("ERROR: Failed to get read data from MTD\n");
@@ -664,7 +680,7 @@ int esp32s3_partition_init(void)
 }
 
   info = (struct partition_info_priv_s *)pbuf;
-
+  encrypt = esp32s3_flash_encryption_enabled();
   for (i = 0; i < num; i++)
 {
   if (info->magic != PARTITION_MAGIC)
@@ -674,6 +690,23 @@ int esp32s3_partition_init(void)
 
   strlcpy(label, (char *)info->label, sizeof(label));
   snprintf(path, sizeof(path), "%s%s", path_base, label);
+  mtd_ll = mtd;
+
+  /* If SPI Flash encryption is enable, "APP", "OTA data" and "NVS keys"
+   * are force to set as encryption partition.
+   */
+
+  flags = info->flags;
+  if (encrypt)
+{
+  if ((info->type == PARTITION_TYPE_DATA &&
+  info->subtype == PARTITION_SUBTYPE_DATA_OTA) ||
+  (info->type == PARTITION_TYPE_DATA &&
+  

(nuttx) 06/06: arm/sama5: Fix error: array subscript 0 is outside array bounds

2023-12-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 31a6ffa15ca4e1604f80a02646a73c16570b8cbb
Author: Xiang Xiao 
AuthorDate: Mon Dec 18 23:31:20 2023 +0800

arm/sama5: Fix error: array subscript 0 is outside array bounds

chip/sam_emaca.c: In function 'sam_emac_interrupt':
Error: 
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:140:25: 
error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 
'volatile long unsigned int[]'} [-Werror=array-bounds=]
  140 | #define getreg32(a)(*(volatile uint32_t *)(a))
  |~^~
chip/sam_emaca.c:364:37: note: in expansion of macro 'getreg32'
  364 | #  define sam_getreg(priv,addr) getreg32(addr)
  | ^~~~
chip/sam_emaca.c:1630:9: note: in expansion of macro 'sam_getreg'
 1630 |   tsr = sam_getreg(priv, SAM_EMAC_TSR_OFFSET);
  | ^~

Signed-off-by: Xiang Xiao 
---
 arch/arm/src/sama5/sam_emaca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/sama5/sam_emaca.c b/arch/arm/src/sama5/sam_emaca.c
index e5fb8c1454..c1f0e6577f 100644
--- a/arch/arm/src/sama5/sam_emaca.c
+++ b/arch/arm/src/sama5/sam_emaca.c
@@ -1627,7 +1627,7 @@ static int sam_emac_interrupt(int irq, void *context, 
void *arg)
*   a one to this bit.
*/
 
-  tsr = sam_getreg(priv, SAM_EMAC_TSR_OFFSET);
+  tsr = sam_getreg(priv, SAM_EMAC_TSR);
   if ((tsr & EMAC_TSR_COMP) != 0)
 {
   /* If a TX transfer just completed, then cancel the TX timeout so



(nuttx) branch master updated (9473267620 -> 31a6ffa15c)

2023-12-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 9473267620 risc-v/esp32c6: Add ostest defconfig
 new d267071398 stm32f4discovery/cxxtest: Fix gcc13.2 compiler error
 new 1e696425fd lpc43xx/usb: Fix gcc13.2 compiler error
 new e42780bb0f arch/arm: Disable -Warray-bound for rp2040, dm320 and 
lpc31xx
 new 0d0867484a modem/alt1250: Fix 'inst' may be used uninitialized
 new d54c79126a am335x_lcdc: Fix error: array subscript 0 is outside array 
bounds of 'volatile uint32_t[0]'
 new 31a6ffa15c arm/sama5: Fix error: array subscript 0 is outside array 
bounds

The 6 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/arm/src/a1x/a1x_boot.c |  2 +-
 arch/arm/src/am335x/am335x_boot.c   |  2 +-
 arch/arm/src/am335x/am335x_lcdc.c   | 17 -
 arch/arm/src/dm320/Make.defs|  2 ++
 arch/arm/src/dm320/dm320_boot.c |  2 +-
 arch/arm/src/imx6/imx_boot.c|  2 +-
 arch/arm/src/lpc31xx/Make.defs  |  2 ++
 arch/arm/src/lpc31xx/lpc31_boot.c   |  4 ++--
 arch/arm/src/lpc31xx/lpc31_usbdev.c |  4 ++--
 arch/arm/src/lpc43xx/lpc43_usb0dev.c|  4 ++--
 arch/arm/src/rp2040/Make.defs   |  2 ++
 arch/arm/src/sama5/sam_boot.c   |  2 +-
 arch/arm/src/sama5/sam_emaca.c  |  2 +-
 .../stm32/stm32f4discovery/configs/cxxtest/defconfig|  1 -
 drivers/modem/alt1250/alt1250.c |  4 ++--
 15 files changed, 28 insertions(+), 24 deletions(-)



(nuttx) 01/06: stm32f4discovery/cxxtest: Fix gcc13.2 compiler error

2023-12-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit d2670713983b324da55b5eaec518d4ef73546e8d
Author: Xiang Xiao 
AuthorDate: Mon Dec 18 11:07:16 2023 +0800

stm32f4discovery/cxxtest: Fix gcc13.2 compiler error

arm-none-eabi-ld: 
/tools/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libsupc++.a(eh_alloc.o):
 in function `_GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv':
eh_alloc.cc:(.text.startup._GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv+0x12): 
undefined reference to `getenv'

Signed-off-by: Xiang Xiao 
---
 boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig 
b/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig
index 7ff72a672f..3f574c4418 100644
--- a/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig
+++ b/boards/arm/stm32/stm32f4discovery/configs/cxxtest/defconfig
@@ -14,7 +14,6 @@ CONFIG_ARCH_CHIP_STM32=y
 CONFIG_ARCH_CHIP_STM32F407VG=y
 CONFIG_ARCH_STACKDUMP=y
 CONFIG_BOARD_LOOPSPERMSEC=16717
-CONFIG_DISABLE_ENVIRON=y
 CONFIG_DISABLE_MOUNTPOINT=y
 CONFIG_HAVE_CXX=y
 CONFIG_HOST_WINDOWS=y



(nuttx) 03/06: arch/arm: Disable -Warray-bound for rp2040, dm320 and lpc31xx

2023-12-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit e42780bb0f5c1bf406179fcd036d37813919addc
Author: Xiang Xiao 
AuthorDate: Mon Dec 18 17:48:07 2023 +0800

arch/arm: Disable -Warray-bound for rp2040, dm320 and lpc31xx

since gcc report the false alarm if the pointer offset from zero address:
inlined from 'up_vectormapping' at chip/dm320_boot.c:162:7,
inlined from 'arm_boot' at chip/dm320_boot.c:211:3:
Error: chip/dm320_boot.c:117:17: error: array subscript 0 is outside array 
bounds of 'uint32_t[0]' {aka 'long unsigned int[]'} [-Werror=array-bounds=]
  117 |   ctable[index] = (paddr | mmuflags);
  |   ~~^~~~

Signed-off-by: Xiang Xiao 
---
 arch/arm/src/a1x/a1x_boot.c   | 2 +-
 arch/arm/src/am335x/am335x_boot.c | 2 +-
 arch/arm/src/dm320/Make.defs  | 2 ++
 arch/arm/src/dm320/dm320_boot.c   | 2 +-
 arch/arm/src/imx6/imx_boot.c  | 2 +-
 arch/arm/src/lpc31xx/Make.defs| 2 ++
 arch/arm/src/lpc31xx/lpc31_boot.c | 4 ++--
 arch/arm/src/rp2040/Make.defs | 2 ++
 arch/arm/src/sama5/sam_boot.c | 2 +-
 9 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/arch/arm/src/a1x/a1x_boot.c b/arch/arm/src/a1x/a1x_boot.c
index 731e46e6fd..59d675661a 100644
--- a/arch/arm/src/a1x/a1x_boot.c
+++ b/arch/arm/src/a1x/a1x_boot.c
@@ -188,7 +188,7 @@ static void a1x_vectormapping(void)
 
   while (vector_paddr < end_paddr)
 {
-  mmu_l2_setentry(VECTOR_L2_VBASE,  vector_paddr, vector_vaddr,
+  mmu_l2_setentry(VECTOR_L2_VBASE, vector_paddr, vector_vaddr,
   MMU_L2_VECTORFLAGS);
   vector_paddr += 4096;
   vector_vaddr += 4096;
diff --git a/arch/arm/src/am335x/am335x_boot.c 
b/arch/arm/src/am335x/am335x_boot.c
index 4a96276f6a..ee68fad9ad 100644
--- a/arch/arm/src/am335x/am335x_boot.c
+++ b/arch/arm/src/am335x/am335x_boot.c
@@ -272,7 +272,7 @@ static void am335x_vectormapping(void)
 
   while (vector_paddr < end_paddr)
 {
-  mmu_l2_setentry(VECTOR_L2_VBASE,  vector_paddr, vector_vaddr,
+  mmu_l2_setentry(VECTOR_L2_VBASE, vector_paddr, vector_vaddr,
   MMU_L2_VECTORFLAGS);
   vector_paddr += 4096;
   vector_vaddr += 4096;
diff --git a/arch/arm/src/dm320/Make.defs b/arch/arm/src/dm320/Make.defs
index 349f9ef3ab..5507bcbabf 100644
--- a/arch/arm/src/dm320/Make.defs
+++ b/arch/arm/src/dm320/Make.defs
@@ -20,6 +20,8 @@
 
 include arm/Make.defs
 
+CFLAGS += -Wno-array-bounds
+
 CHIP_ASRCS  = dm320_lowputc.S dm320_restart.S
 
 CHIP_CSRCS  = dm320_allocateheap.c dm320_boot.c dm320_decodeirq.c
diff --git a/arch/arm/src/dm320/dm320_boot.c b/arch/arm/src/dm320/dm320_boot.c
index b1ace97494..c64ce1032f 100644
--- a/arch/arm/src/dm320/dm320_boot.c
+++ b/arch/arm/src/dm320/dm320_boot.c
@@ -102,7 +102,7 @@ static inline void
 up_setlevel2coarseentry(uint32_t ctabvaddr, uint32_t paddr,
 uint32_t vaddr, uint32_t mmuflags)
 {
-  uint32_t *ctable  = (uint32_t *)ctabvaddr;
+  uint32_t *ctable = (uint32_t *)ctabvaddr;
   uint32_t  index;
 
   /* The coarse table divides a 1Mb address space up into 256 entries, each
diff --git a/arch/arm/src/imx6/imx_boot.c b/arch/arm/src/imx6/imx_boot.c
index a78eda0c2f..764943cbd7 100644
--- a/arch/arm/src/imx6/imx_boot.c
+++ b/arch/arm/src/imx6/imx_boot.c
@@ -179,7 +179,7 @@ static void imx_vectormapping(void)
 
   while (vector_paddr < end_paddr)
 {
-  mmu_l2_setentry(VECTOR_L2_VBASE,  vector_paddr, vector_vaddr,
+  mmu_l2_setentry(VECTOR_L2_VBASE, vector_paddr, vector_vaddr,
   MMU_L2_VECTORFLAGS);
   vector_paddr += 4096;
   vector_vaddr += 4096;
diff --git a/arch/arm/src/lpc31xx/Make.defs b/arch/arm/src/lpc31xx/Make.defs
index 93d02ce3c8..c625fc0b1d 100644
--- a/arch/arm/src/lpc31xx/Make.defs
+++ b/arch/arm/src/lpc31xx/Make.defs
@@ -20,6 +20,8 @@
 
 include arm/Make.defs
 
+CFLAGS += -Wno-array-bounds
+
 CGU_CSRCS  = lpc31_bcrndx.c lpc31_clkdomain.c lpc31_clkexten.c
 CGU_CSRCS += lpc31_clkfreq.c lpc31_clkinit.c lpc31_defclk.c
 CGU_CSRCS += lpc31_esrndx.c lpc31_fdcndx.c lpc31_fdivinit.c
diff --git a/arch/arm/src/lpc31xx/lpc31_boot.c 
b/arch/arm/src/lpc31xx/lpc31_boot.c
index 913c868756..9618c2b381 100644
--- a/arch/arm/src/lpc31xx/lpc31_boot.c
+++ b/arch/arm/src/lpc31xx/lpc31_boot.c
@@ -139,7 +139,7 @@ static inline void up_setlevel2coarseentry(uint32_t 
ctabvaddr,
uint32_t vaddr,
uint32_t mmuflags)
 {
-  uint32_t *ctable  = (uint32_t *)ctabvaddr;
+  uint32_t *ctable = (uint32_t *)ctabvaddr;
   uint32_t  index;
 
   /* The coarse table divides a 1Mb address space up into 256 entries, each
@@ -246,7 +246,7 @@ static void up_vectormapping(void)
 
   while (vector_paddr < end_paddr)
 {
-  up_setlevel2coarseentry(PGTABLE_L2_COARSE_VBASE,  

(nuttx) 04/06: modem/alt1250: Fix 'inst' may be used uninitialized

2023-12-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 0d0867484a90063bab7d511df2623f4c83708d8c
Author: Xiang Xiao 
AuthorDate: Mon Dec 18 19:18:30 2023 +0800

modem/alt1250: Fix 'inst' may be used uninitialized

In function 'unlock_evtbufinst',
inlined from 'parse_altcompkt' at modem/alt1250/alt1250.c:919:7,
inlined from 'altcom_recvthread' at modem/alt1250/alt1250.c:968:21:
Error: modem/alt1250/alt1250.c:385:3: error: 'inst' may be used 
uninitialized [-Werror=maybe-uninitialized]
  385 |   nxmutex_unlock(>stat_lock);
  |   ^~~~
modem/alt1250/alt1250.c: In function 'altcom_recvthread':
modem/alt1250/alt1250.c:822:26: note: 'inst' was declared here
  822 |   FAR alt_evtbuf_inst_t *inst;
  |  ^~~~

Signed-off-by: Xiang Xiao 
---
 drivers/modem/alt1250/alt1250.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/modem/alt1250/alt1250.c b/drivers/modem/alt1250/alt1250.c
index 97a4e7e2a7..336f941fd7 100644
--- a/drivers/modem/alt1250/alt1250.c
+++ b/drivers/modem/alt1250/alt1250.c
@@ -819,7 +819,7 @@ static int parse_altcompkt(FAR struct alt1250_dev_s *dev, 
FAR uint8_t *pkt,
   uint16_t cid = parse_cid(h);
   uint16_t tid = parse_tid(h);
   parse_handler_t parser;
-  FAR alt_evtbuf_inst_t *inst;
+  FAR alt_evtbuf_inst_t *inst = NULL;
   FAR void **outparam;
   size_t outparamlen;
 
@@ -912,7 +912,7 @@ static int parse_altcompkt(FAR struct alt1250_dev_s *dev, 
FAR uint8_t *pkt,
   *bitmap = ALT1250_EVTBIT_REPLY;
 }
 }
-  else
+  else if (inst != NULL)
 {
   /* Unlock outparam because it has been updated. */
 



(nuttx) 05/06: am335x_lcdc: Fix error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]'

2023-12-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit d54c79126a8c03ec40dbae55180ae3cec52c7416
Author: Xiang Xiao 
AuthorDate: Mon Dec 18 21:32:54 2023 +0800

am335x_lcdc: Fix error: array subscript 0 is outside array bounds of 
'volatile uint32_t[0]'

Error: 
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:141:51: 
error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 
'volatile long unsigned int[]'} [-Werror=array-bounds=]
  141 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
  |~~~^~
chip/am335x_lcdc.c:387:3: note: in expansion of macro 'putreg32'
  387 |   putreg32(AM335X_CM_WKUP_CLKMODE_DPLL_DISP, 0x4);
  |   ^~~~
In function 'am335x_lcd_initialize':
cc1: note: source object is likely at address zero
In function 'am335x_set_refclk',
inlined from 'am335x_lcd_initialize' at chip/am335x_lcdc.c:607:9:
Error: 
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:141:51: 
error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 
'volatile long unsigned int[]'} [-Werror=array-bounds=]
  141 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
  |~~~^~
chip/am335x_lcdc.c:430:3: note: in expansion of macro 'putreg32'
  430 |   putreg32(AM335X_CM_WKUP_CLKMODE_DPLL_DISP, 0x7);
  |   ^~~~
In function 'am335x_lcd_initialize':
cc1: note: source object is likely at address zero
Error: 
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:141:25: 
error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 
'volatile long unsigned int[]'} [-Werror=array-bounds=]
  141 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
  | ^
chip/am335x_lcdc.c:780:3: note: in expansion of macro 'putreg32'
  780 |   putreg32(AM335X_LCD_CLKC_ENABLE,
  |   ^~~~
cc1: note: source object is likely at address zero
Error: 
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:141:25: 
error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 
'volatile long unsigned int[]'} [-Werror=array-bounds=]
  141 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
  | ^
chip/am335x_lcdc.c:784:3: note: in expansion of macro 'putreg32'
  784 |   putreg32(AM335X_LCD_CLKC_RESET, LCD_CLKC_RESET_MAIN);
  |   ^~~~
cc1: note: source object is likely at address zero
Error: 
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:141:25: 
error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 
'volatile long unsigned int[]'} [-Werror=array-bounds=]
  141 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
  | ^
chip/am335x_lcdc.c:790:3: note: in expansion of macro 'putreg32'
  790 |   putreg32(AM335X_LCD_IRQ_EN_SET, regval);
  |   ^~~~
cc1: note: source object is likely at address zero
Error: 
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:141:25: 
error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 
'volatile long unsigned int[]'} [-Werror=array-bounds=]
  141 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
  | ^
chip/am335x_lcdc.c:796:3: note: in expansion of macro 'putreg32'
  796 |   putreg32(AM335X_LCD_SYSC, LCD_SYSC_IDLE_SMART | 
LCD_SYSC_STANDBY_SMART);
  |   ^~~~

Signed-off-by: Xiang Xiao 
---
 arch/arm/src/am335x/am335x_lcdc.c | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/arm/src/am335x/am335x_lcdc.c 
b/arch/arm/src/am335x/am335x_lcdc.c
index be8e5e64c9..5e9608450e 100644
--- a/arch/arm/src/am335x/am335x_lcdc.c
+++ b/arch/arm/src/am335x/am335x_lcdc.c
@@ -384,7 +384,7 @@ static int am335x_set_refclk(uint32_t frequency)
 
   /* Bypass mode */
 
-  putreg32(AM335X_CM_WKUP_CLKMODE_DPLL_DISP, 0x4);
+  putreg32(0x4, AM335X_CM_WKUP_CLKMODE_DPLL_DISP);
 
   /* Make sure it's in bypass mode */
 
@@ -427,7 +427,7 @@ static int am335x_set_refclk(uint32_t frequency)
 
   /* Locked mode */
 
-  putreg32(AM335X_CM_WKUP_CLKMODE_DPLL_DISP, 0x7);
+  putreg32(0x7, AM335X_CM_WKUP_CLKMODE_DPLL_DISP);
 
   timeout = 1;
   while ((getreg32(AM335X_CM_WKUP_IDLEST_DPLL_DISP) & (1 << 0)) == 0 &&
@@ -777,23 +777,22 @@ int am335x_lcd_initialize(const struct 
am335x_panel_info_s *panel)
 
   putreg32(AM335X_LCD_RASTER_CTRL, regval);
 
-  putreg32(AM33

(nuttx) 02/06: lpc43xx/usb: Fix gcc13.2 compiler error

2023-12-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 1e696425fd1759b77bf36d9dd805c0960976afea
Author: Xiang Xiao 
AuthorDate: Mon Dec 18 12:38:17 2023 +0800

lpc43xx/usb: Fix gcc13.2 compiler error

Error: arch/arm/src/common/arm_internal.h:140:25: error: array subscript 0 
is outside array bounds of 'volatile uint32_t[0]' {aka 'volatile long unsigned 
int[]'} [-Werror=array-bounds=]
  140 | #define getreg32(a)(*(volatile uint32_t *)(a))
  |~^~
chip/lpc43_usb0dev.c:347:34: note: in expansion of macro 'getreg32'
  347 | #  define lpc43_getreg(addr) getreg32(addr)
  |  ^~~~
chip/lpc43_usb0dev.c:2605:15: note: in expansion of macro 'lpc43_getreg'
 2605 |   return (int)lpc43_getreg(LPC43_USBDEV_FRINDEX_OFFSET);
  |   ^~~~

Signed-off-by: Xiang Xiao 
---
 arch/arm/src/lpc31xx/lpc31_usbdev.c  | 4 ++--
 arch/arm/src/lpc43xx/lpc43_usb0dev.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/lpc31xx/lpc31_usbdev.c 
b/arch/arm/src/lpc31xx/lpc31_usbdev.c
index 9bb1176972..f848aad7a9 100644
--- a/arch/arm/src/lpc31xx/lpc31_usbdev.c
+++ b/arch/arm/src/lpc31xx/lpc31_usbdev.c
@@ -1869,7 +1869,7 @@ static int lpc31_usbinterrupt(int irq, void *context, 
void *arg)
 {
   usbtrace(TRACE_INTDECODE(LPC31_TRACEINTID_FRAME), 0);
 
-  priv->sof = (int)lpc31_getreg(LPC31_USBDEV_FRINDEX_OFFSET);
+  priv->sof = lpc31_getreg(LPC31_USBDEV_FRINDEX);
 }
 #endif
 
@@ -2557,7 +2557,7 @@ static int lpc31_getframe(struct usbdev_s *dev)
 
   /* FIXME: this actually returns the micro frame number! */
 
-  return (int)lpc31_getreg(LPC31_USBDEV_FRINDEX_OFFSET);
+  return (int)lpc31_getreg(LPC31_USBDEV_FRINDEX);
 #endif
 }
 
diff --git a/arch/arm/src/lpc43xx/lpc43_usb0dev.c 
b/arch/arm/src/lpc43xx/lpc43_usb0dev.c
index 09d8105406..d694b4c38e 100644
--- a/arch/arm/src/lpc43xx/lpc43_usb0dev.c
+++ b/arch/arm/src/lpc43xx/lpc43_usb0dev.c
@@ -1893,7 +1893,7 @@ static int lpc43_usbinterrupt(int irq, void *context, 
void *arg)
 {
   usbtrace(TRACE_INTDECODE(LPC43_TRACEINTID_FRAME), 0);
 
-  priv->sof = (int)lpc43_getreg(LPC43_USBDEV_FRINDEX_OFFSET);
+  priv->sof = lpc43_getreg(LPC43_USBDEV_FRINDEX);
 }
 #endif
 
@@ -2602,7 +2602,7 @@ static int lpc43_getframe(struct usbdev_s *dev)
 
   /* FIXME: this actually returns the micro frame number! */
 
-  return (int)lpc43_getreg(LPC43_USBDEV_FRINDEX_OFFSET);
+  return (int)lpc43_getreg(LPC43_USBDEV_FRINDEX);
 #endif
 }
 



(nuttx) branch master updated (7730201689 -> 80ca3e9308)

2023-12-14 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 7730201689 imxrt: Extend FlexIO support to 117x
 add 659c9e7f4b boards: qemu-armv8a: Add virtio-sound
 add 80ca3e9308 boards: rv-virt: Add virtio-sound

No new revisions were added by this update.

Summary of changes:
 boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig| 5 +
 boards/arm64/qemu/qemu-armv8a/configs/netnsh_hv/defconfig | 5 +
 boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig| 5 +
 boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp_hv/defconfig | 5 +
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh/defconfig| 6 ++
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh64/defconfig  | 6 ++
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh64_smp/defconfig  | 6 ++
 boards/risc-v/qemu-rv/rv-virt/configs/netnsh_smp/defconfig| 6 ++
 8 files changed, 44 insertions(+)



(nuttx) branch master updated: Fix Kconfig style

2023-12-04 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ccc0c54401 Fix Kconfig style
ccc0c54401 is described below

commit ccc0c54401b3060388b4900f1b4d766519df4cc1
Author: simbit18 <101105604+simbi...@users.noreply.github.com>
AuthorDate: Mon Dec 4 12:49:55 2023 +0100

Fix Kconfig style

Remove extra TABs
Remove spaces from Kconfig
Add comments
---
 arch/arm/src/at32/Kconfig |  9 -
 arch/arm/src/rp2040/Kconfig   |  2 +-
 arch/xtensa/src/esp32s3/Kconfig   |  5 +++--
 boards/arm/stm32/odrive36/Kconfig |  4 ++--
 drivers/sensors/Kconfig   | 30 --
 5 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/arch/arm/src/at32/Kconfig b/arch/arm/src/at32/Kconfig
index 2ad9180f8f..296fa06380 100644
--- a/arch/arm/src/at32/Kconfig
+++ b/arch/arm/src/at32/Kconfig
@@ -217,7 +217,6 @@ menu "AT32 Peripheral Support"
 # These "hidden" settings determine whether a peripheral option is available
 # for the selected MCU
 
-
 config AT32_HAVE_OVERDRIVE
bool
default n
@@ -649,7 +648,7 @@ config AT32_DAC1CH2
bool "DAC1CH2"
default n
 
-endif #AT32_DAC1
+endif # AT32_DAC1
 
 config AT32_DAC2
bool "DAC2"
@@ -663,7 +662,7 @@ config AT32_DAC2CH1
bool "DAC2CH1"
default n
 
-endif #AT32_DAC2
+endif # AT32_DAC2
 
 config AT32_DAC3
bool "DAC3"
@@ -681,7 +680,7 @@ config AT32_DAC3CH2
bool "DAC3CH2 Internal"
default n
 
-endif #AT32_DAC3
+endif # AT32_DAC3
 
 config AT32_DAC4
bool "DAC4"
@@ -699,7 +698,7 @@ config AT32_DAC4CH2
bool "DAC4CH2 Internal"
default n
 
-endif #AT32_DAC4
+endif # AT32_DAC4
 
 config AT32_DCMI
bool "DCMI"
diff --git a/arch/arm/src/rp2040/Kconfig b/arch/arm/src/rp2040/Kconfig
index d302f789e5..751f0c806c 100644
--- a/arch/arm/src/rp2040/Kconfig
+++ b/arch/arm/src/rp2040/Kconfig
@@ -247,7 +247,7 @@ config RP2040_I2C1_SLAVE_10BIT
---help---
Set to enable 10-bit mode addressing.
 
-   endif # RP2040_I2C1_SLAVE
+endif # RP2040_I2C1_SLAVE
 
 endif # RP2040_I2C_SLAVE
 
diff --git a/arch/xtensa/src/esp32s3/Kconfig b/arch/xtensa/src/esp32s3/Kconfig
index a4a6f20605..f81ca3d298 100644
--- a/arch/xtensa/src/esp32s3/Kconfig
+++ b/arch/xtensa/src/esp32s3/Kconfig
@@ -1584,7 +1584,7 @@ config ESP32S3_PHY_INIT_DATA_ERROR
 
 endif
 
-endmenu  # PHY
+endmenu # PHY
 
 menu "Timer/Counter Configuration"
depends on ESP32S3_TIMER
@@ -1743,7 +1743,8 @@ config ESP32S3_FLASH_SAMPLE_MODE_DTR
bool "DTR Mode"
 config ESP32S3_FLASH_SAMPLE_MODE_STR
bool "STR Mode"
-endchoice
+
+endchoice # ESP32S3_FLASH_SAMPLE_MODE
 
 config ESP32S3_SPI_FLASH_DONT_USE_ROM_CODE
bool "Don't use SPI flash driver in ROM"
diff --git a/boards/arm/stm32/odrive36/Kconfig 
b/boards/arm/stm32/odrive36/Kconfig
index 42bd303046..7bbf8f2d44 100644
--- a/boards/arm/stm32/odrive36/Kconfig
+++ b/boards/arm/stm32/odrive36/Kconfig
@@ -6,8 +6,8 @@
 if ARCH_BOARD_ODRIVE36
 
 choice
-   prompt "ODrive voltage version"
-   default ODRIVE_HW_VOLTAGE_56
+   prompt "ODrive voltage version"
+   default ODRIVE_HW_VOLTAGE_56
 
 config ODRIVE_HW_VOLTAGE_56
bool "ODrive 56V version"
diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig
index d32c210a75..fff31a553c 100644
--- a/drivers/sensors/Kconfig
+++ b/drivers/sensors/Kconfig
@@ -174,8 +174,8 @@ config SENSORS_BMI160_UORB
bool "BMI160 UORB Interface"
default n
---help---
-   Enables Work with the UORB or Character Device interface.
-   If not set, the Character Device is used by default.
+   Enables Work with the UORB or Character Device interface.
+   If not set, the Character Device is used by default.
 
 choice
prompt "BMI160 Interface"
@@ -193,7 +193,7 @@ config SENSORS_BMI160_SPI
---help---
Enables support for the SPI interface
 
-endchoice
+endchoice # BMI160 Interface
 
 choice
prompt "I2C Address"
@@ -210,8 +210,9 @@ config BMI160_I2C_ADDR_69
---help---
If SDO pin is pulled to VDDIO, use 0x69
 
-endchoice
-endif
+endchoice # I2C Address
+
+endif # SENSORS_BMI160
 
 config SENSORS_BMI270
bool "Bosch BMI270 Inertial Measurement Sensor support"
@@ -238,7 +239,7 @@ config SENSORS_BMI270_SPI
---help---
Enables support for the SPI interface
 
-endchoice
+endchoice # BMI270 Interface
 
 config SENSORS_BMI270_LOAD_FROM_HEAP
bool "BMI270 config loading from heap memory&quo

(nuttx) branch master updated: mm: Remove mm_spinlock

2023-11-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 0fbeea64d5 mm: Remove mm_spinlock
0fbeea64d5 is described below

commit 0fbeea64d5adac41f4cfec56534e50be36efe221
Author: Xiang Xiao 
AuthorDate: Sat Nov 11 18:31:20 2023 +0800

mm: Remove mm_spinlock

since it's enough to protect per cpu delay list by disabling interrupt

Signed-off-by: Xiang Xiao 
---
 mm/mm_heap/mm.h| 1 -
 mm/mm_heap/mm_free.c   | 4 ++--
 mm/mm_heap/mm_malloc.c | 4 ++--
 mm/tlsf/mm_tlsf.c  | 9 -
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/mm/mm_heap/mm.h b/mm/mm_heap/mm.h
index f15a7d29ed..28cf0bae0d 100644
--- a/mm/mm_heap/mm.h
+++ b/mm/mm_heap/mm.h
@@ -258,7 +258,6 @@ struct mm_heap_s
* immdiately.
*/
 
-  spinlock_t mm_spinlock;
   FAR struct mm_delaynode_s *mm_delaylist[CONFIG_SMP_NCPUS];
 
   /* The is a multiple mempool of the heap */
diff --git a/mm/mm_heap/mm_free.c b/mm/mm_heap/mm_free.c
index d2f10fff77..881b025e02 100644
--- a/mm/mm_heap/mm_free.c
+++ b/mm/mm_heap/mm_free.c
@@ -45,12 +45,12 @@ static void add_delaylist(FAR struct mm_heap_s *heap, FAR 
void *mem)
 
   /* Delay the deallocation until a more appropriate time. */
 
-  flags = spin_lock_irqsave(>mm_spinlock);
+  flags = up_irq_save();
 
   tmp->flink = heap->mm_delaylist[up_cpu_index()];
   heap->mm_delaylist[up_cpu_index()] = tmp;
 
-  spin_unlock_irqrestore(>mm_spinlock, flags);
+  up_irq_restore(flags);
 #endif
 }
 
diff --git a/mm/mm_heap/mm_malloc.c b/mm/mm_heap/mm_malloc.c
index 03691c4b1e..46f9648fea 100644
--- a/mm/mm_heap/mm_malloc.c
+++ b/mm/mm_heap/mm_malloc.c
@@ -47,12 +47,12 @@ static void free_delaylist(FAR struct mm_heap_s *heap)
 
   /* Move the delay list to local */
 
-  flags = spin_lock_irqsave(>mm_spinlock);
+  flags = up_irq_save();
 
   tmp = heap->mm_delaylist[up_cpu_index()];
   heap->mm_delaylist[up_cpu_index()] = NULL;
 
-  spin_unlock_irqrestore(>mm_spinlock, flags);
+  up_irq_restore(flags);
 
   /* Test if the delayed is empty */
 
diff --git a/mm/tlsf/mm_tlsf.c b/mm/tlsf/mm_tlsf.c
index 1bf906a4c1..8162976147 100644
--- a/mm/tlsf/mm_tlsf.c
+++ b/mm/tlsf/mm_tlsf.c
@@ -105,7 +105,6 @@ struct mm_heap_s
 
   /* Free delay list, for some situation can't do free immdiately */
 
-  spinlock_t mm_spinlock;
   struct mm_delaynode_s *mm_delaylist[CONFIG_SMP_NCPUS];
 
 #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)
@@ -178,12 +177,12 @@ static void add_delaylist(FAR struct mm_heap_s *heap, FAR 
void *mem)
 
   /* Delay the deallocation until a more appropriate time. */
 
-  flags = spin_lock_irqsave(>mm_spinlock);
+  flags = up_irq_save();
 
   tmp->flink = heap->mm_delaylist[up_cpu_index()];
   heap->mm_delaylist[up_cpu_index()] = tmp;
 
-  spin_unlock_irqrestore(>mm_spinlock, flags);
+  up_irq_restore(flags);
 #endif
 }
 
@@ -199,12 +198,12 @@ static void free_delaylist(FAR struct mm_heap_s *heap)
 
   /* Move the delay list to local */
 
-  flags = spin_lock_irqsave(>mm_spinlock);
+  flags = up_irq_save();
 
   tmp = heap->mm_delaylist[up_cpu_index()];
   heap->mm_delaylist[up_cpu_index()] = NULL;
 
-  spin_unlock_irqrestore(>mm_spinlock, flags);
+  up_irq_restore(flags);
 
   /* Test if the delayed is empty */
 



(nuttx) branch master updated (43be20d67e -> e935bc53bb)

2023-10-30 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 43be20d67e Documentation: fix warning
 new 6e9e215943 sched/task: Remove spawn_proxyattrs as obsolete 
implementation
 new e935bc53bb task/task_spawnparms.c: Set the new process's signal mask

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:
 sched/task/spawn.h   | 15 ---
 sched/task/task_posixspawn.c |  5 -
 sched/task/task_spawn.c  |  5 -
 sched/task/task_spawnparms.c | 34 +++---
 4 files changed, 11 insertions(+), 48 deletions(-)



(nuttx) 02/02: task/task_spawnparms.c: Set the new process's signal mask

2023-10-30 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit e935bc53bb72f7333fb8570dc043bf2f8fd92b29
Author: Ville Juven 
AuthorDate: Wed Oct 25 15:42:05 2023 +0300

task/task_spawnparms.c: Set the new process's signal mask

Set the newly spawned process's signal mask, if the caller has instructed
to do so by setting POSIX_SPAWN_SETSIGMASK.

This is called after the task has been created but has NOT been started
yet.
---
 sched/task/task_spawnparms.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c
index 6db333cde3..cf231b78c9 100644
--- a/sched/task/task_spawnparms.c
+++ b/sched/task/task_spawnparms.c
@@ -149,6 +149,17 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t 
*attr)
* return an error value, then we would also have to stop the task.
*/
 
+  /* Firstly, set the signal mask if requested to do so */
+
+  if ((attr->flags & POSIX_SPAWN_SETSIGMASK) != 0)
+{
+  FAR struct tcb_s *tcb = nxsched_get_tcb(pid);
+  if (tcb)
+{
+  tcb->sigprocmask = attr->sigmask;
+}
+}
+
   /* If we are only setting the priority, then call sched_setparm()
* to set the priority of the of the new task.
*/



(nuttx) 01/02: sched/task: Remove spawn_proxyattrs as obsolete implementation

2023-10-30 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 6e9e21594335dd1feced539cf940ab51f949d8d5
Author: Ville Juven 
AuthorDate: Wed Oct 25 15:41:05 2023 +0300

sched/task: Remove spawn_proxyattrs as obsolete implementation

Like the name implies, it is supposed to set the spawn attributes for
the NuttX specific "spawn proxy task" which was historically used as
a proxy to spawn new tasks. The proxy handled file actions and the signal
mask which are inherited from the parent.

The proxy task does not exist anymore, thus the proxy task attributes
do not need to be set anymore either.

Also, the function is currently still used, but the signal mask is set
for the spawning process, not the proxy process, and this is most
DEFINITELY an error (as the spawning process's signal mask changes
unexpectedly).

Setting the signal mask for the newly spawned process is simple, just
set it directly, if instructed to do so. This will be done in a later
patch!
---
 sched/task/spawn.h   | 15 ---
 sched/task/task_posixspawn.c |  5 -
 sched/task/task_spawn.c  |  5 -
 sched/task/task_spawnparms.c | 23 ---
 4 files changed, 48 deletions(-)

diff --git a/sched/task/spawn.h b/sched/task/spawn.h
index e55d6d0b4e..0c6dce55b2 100644
--- a/sched/task/spawn.h
+++ b/sched/task/spawn.h
@@ -58,19 +58,4 @@
 
 int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr);
 
-/
- * Name: spawn_proxyattrs
- *
- * Description:
- *   Set attributes of the proxy task before it has started the new child
- *   task.
- *
- * Input Parameters:
- *
- *   attr - The attributes to use
- *
- /
-
-void spawn_proxyattrs(FAR const posix_spawnattr_t *attr);
-
 #endif /* __SCHED_TASK_SPAWN_H */
diff --git a/sched/task/task_posixspawn.c b/sched/task/task_posixspawn.c
index a0ff0c0d5d..b6000de462 100644
--- a/sched/task/task_posixspawn.c
+++ b/sched/task/task_posixspawn.c
@@ -221,11 +221,6 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path,
   sinfo("pid=%p path=%s file_actions=%p attr=%p argv=%p\n",
 pid, path, file_actions, attr, argv);
 
-  if (attr != NULL)
-{
-  spawn_proxyattrs(attr);
-}
-
   return nxposix_spawn_exec(pid, path,
 file_actions != NULL ?
 *file_actions : NULL, attr, argv, envp);
diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c
index 09591a1840..44cc924f7c 100644
--- a/sched/task/task_spawn.c
+++ b/sched/task/task_spawn.c
@@ -331,11 +331,6 @@ int task_spawn(FAR const char *name, main_t entry,
   sinfo("name=%s entry=%p file_actions=%p attr=%p argv=%p\n",
 name, entry, file_actions, attr, argv);
 
-  if (attr != NULL)
-{
-  spawn_proxyattrs(attr);
-}
-
   ret = nxtask_spawn_exec(, name, entry,
   file_actions != NULL ? *file_actions : NULL,
   attr, argv, envp);
diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c
index c3198def2e..6db333cde3 100644
--- a/sched/task/task_spawnparms.c
+++ b/sched/task/task_spawnparms.c
@@ -227,29 +227,6 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t 
*attr)
   return OK;
 }
 
-/
- * Name: spawn_proxyattrs
- *
- * Description:
- *   Set attributes of the proxy task before it has started the new child
- *   task.
- *
- * Input Parameters:
- *
- *   attr - The attributes to use
- *
- /
-
-void spawn_proxyattrs(FAR const posix_spawnattr_t *attr)
-{
-  /* Check if we need to change the signal mask */
-
-  if (attr != NULL && (attr->flags & POSIX_SPAWN_SETSIGMASK) != 0)
-{
-  nxsig_procmask(SIG_SETMASK, >sigmask, NULL);
-}
-}
-
 /
  * Name: spawn_file_actions
  *



[nuttx-apps] 02/02: Application.mk:ensure that the order when AROBJS is compiled multiple times

2023-10-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 4439b242d8a0a5aacc2139339dddcbed8cad496b
Author: xuxin19 
AuthorDate: Tue Oct 17 21:07:46 2023 +0800

Application.mk:ensure that the order when AROBJS is compiled multiple times

sort the target files to ensure that the files in each batch are the same 
every time
and clean AROBJS.

Signed-off-by: xuxin19 
---
 Application.mk |  9 +
 Make.defs  | 16 +++-
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/Application.mk b/Application.mk
index 4d6fd5682..923407800 100644
--- a/Application.mk
+++ b/Application.mk
@@ -205,9 +205,10 @@ $(ZIGOBJS): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
$(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \
$(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
 
-AROBJS := 
+AROBJS :=
 ifneq ($(OBJS),)
-$(eval $(call SPLITVARIABLE,OBJS_SPILT,$(OBJS),100))
+SORTOBJS := $(sort $(OBJS))
+$(eval $(call SPLITVARIABLE,OBJS_SPILT,$(SORTOBJS),100))
 $(foreach BATCH, $(OBJS_SPILT_TOTAL), \
$(foreach obj, $(OBJS_SPILT_$(BATCH)), \
$(eval substitute := $(patsubst 
%$(OBJEXT),%_$(BATCH)$(OBJEXT),$(obj))) \
@@ -298,7 +299,7 @@ endif
  $(shell $(MKDEP) $(DEPPATH) --obj-suffix .c$(SUFFIX)$(OBJEXT) "$(CC)" 
-- $(CFLAGS) -- $(filter %.c,$(ALL_DEP_OBJS_$(BATCH))) >Make.dep) \
  $(shell $(MKDEP) $(DEPPATH) --obj-suffix .S$(SUFFIX)$(OBJEXT) "$(CC)" 
-- $(CFLAGS) -- $(filter %.S,$(ALL_DEP_OBJS_$(BATCH))) >>Make.dep) \
  $(shell $(MKDEP) $(DEPPATH) --obj-suffix $(CXXEXT)$(SUFFIX)$(OBJEXT) 
"$(CXX)" -- $(CXXFLAGS) -- $(filter %$(CXXEXT),$(ALL_DEP_OBJS_$(BATCH))) 
>>Make.dep) \
-   ) 
+   )
$(Q) touch $@
 
 depend:: .depend
@@ -306,8 +307,8 @@ depend:: .depend
 
 clean::
$(call DELFILE, .built)
+   $(call CLEANAROBJS)
$(call CLEAN)
-
 distclean:: clean
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/Make.defs b/Make.defs
index 91842102e..d13634ff9 100644
--- a/Make.defs
+++ b/Make.defs
@@ -157,7 +157,21 @@ define ARLOCK
flock $1.lock $(call ARCHIVE, $1, $(2))
 endef
 
+# dynamic AR target
+
 define AROBJSRULES
 $(1) : $(2)
cp $(2) $(1)
-endef
\ No newline at end of file
+endef
+
+# CLEANAROBJS - del AR target files exclusively
+
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+define CLEANAROBJS
+   $(call DELFILE,$(subst /,\,$(AROBJS)))
+endef
+else
+define CLEANAROBJS
+   $(Q) rm -f $(AROBJS)
+endef
+endif
\ No newline at end of file



[nuttx-apps] 01/02: archive:create a copy rule for the ojbs with the same name

2023-10-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit efa1f519154e5d66bd5e069d06f9bf9c76eea7f1
Author: xuxin19 
AuthorDate: Wed Oct 11 12:15:21 2023 +0800

archive:create a copy rule for the ojbs with the same name

when there are too many target files in archive and need to be processed in 
batches,
in order to avoid file replacement due to duplicate names,
we dynamically rename the target files here.

Signed-off-by: xuxin19 
---
 Application.mk | 16 ++--
 Make.defs  |  5 +
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/Application.mk b/Application.mk
index 269ceaa6b..4d6fd5682 100644
--- a/Application.mk
+++ b/Application.mk
@@ -205,8 +205,20 @@ $(ZIGOBJS): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
$(if $(and $(CONFIG_BUILD_LOADABLE), $(CELFFLAGS)), \
$(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
 
-.built: $(OBJS)
-   $(call SPLITVARIABLE,ALL_OBJS,$(OBJS),100)
+AROBJS := 
+ifneq ($(OBJS),)
+$(eval $(call SPLITVARIABLE,OBJS_SPILT,$(OBJS),100))
+$(foreach BATCH, $(OBJS_SPILT_TOTAL), \
+   $(foreach obj, $(OBJS_SPILT_$(BATCH)), \
+   $(eval substitute := $(patsubst 
%$(OBJEXT),%_$(BATCH)$(OBJEXT),$(obj))) \
+   $(eval AROBJS += $(substitute)) \
+   $(eval $(call AROBJSRULES, $(substitute),$(obj))) \
+   ) \
+)
+endif
+
+.built: $(AROBJS)
+   $(call SPLITVARIABLE,ALL_OBJS,$(AROBJS),100)
$(foreach BATCH, $(ALL_OBJS_TOTAL), \
$(shell $(call ARLOCK, $(call CONVERT_PATH,$(BIN)), 
$(ALL_OBJS_$(BATCH \
)
diff --git a/Make.defs b/Make.defs
index 6f3807def..91842102e 100644
--- a/Make.defs
+++ b/Make.defs
@@ -156,3 +156,8 @@ endef
 define ARLOCK
flock $1.lock $(call ARCHIVE, $1, $(2))
 endef
+
+define AROBJSRULES
+$(1) : $(2)
+   cp $(2) $(1)
+endef
\ No newline at end of file



[nuttx-apps] branch master updated (09bb3b585 -> 4439b242d)

2023-10-26 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 09bb3b585 apps:move test tools to testing.
 new efa1f5191 archive:create a copy rule for the ojbs with the same name
 new 4439b242d Application.mk:ensure that the order when AROBJS is compiled 
multiple times

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:
 Application.mk | 21 +
 Make.defs  | 19 +++
 2 files changed, 36 insertions(+), 4 deletions(-)



[nuttx] branch master updated: tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed

2023-10-20 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 0f1a49bba5 tun: Fix the error of calling tun_close when tun_txavail or 
tun_txavail_work is executed
0f1a49bba5 is described below

commit 0f1a49bba57691946e30f7bf4847b5788b5d41f9
Author: zhanghongyu 
AuthorDate: Fri Oct 20 15:17:48 2023 +0800

tun: Fix the error of calling tun_close when tun_txavail or 
tun_txavail_work is executed

When tun_txavail_work is running, switch to tun_close thread and priv->lock 
will be destroyed, then switch back to tun_txavail_work thread, an error will 
occur when nxmutex_unlock(>lock)

Signed-off-by: zhanghongyu 
---
 drivers/net/tun.c | 38 +-
 1 file changed, 33 insertions(+), 5 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3f00b0b365..e40017adf6 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -184,7 +184,7 @@ static int tun_rmmac(FAR struct net_driver_s *dev, FAR 
const uint8_t *mac);
 static int tun_dev_init(FAR struct tun_device_s *priv,
 FAR struct file *filep,
 FAR const char *devfmt, bool tun);
-static void tun_dev_uninit(FAR struct tun_device_s *priv);
+static int tun_dev_uninit(FAR struct tun_device_s *priv);
 
 /* File interface */
 
@@ -775,14 +775,22 @@ static void tun_txavail_work(FAR void *arg)
 static int tun_txavail(FAR struct net_driver_s *dev)
 {
   FAR struct tun_device_s *priv = (FAR struct tun_device_s *)dev->d_private;
+  int ret = nxmutex_lock(>lock);
+
+  if (ret < 0)
+{
+  return ret;
+}
 
   /* Schedule to perform the TX poll on the worker thread. */
 
-  if (work_available(>work))
+  if (priv->bifup && work_available(>work))
 {
   work_queue(TUNWORK, >work, tun_txavail_work, priv, 0);
 }
 
+  nxmutex_unlock(>lock);
+
   return OK;
 }
 
@@ -905,12 +913,27 @@ static int tun_dev_init(FAR struct tun_device_s *priv,
  * Name: tun_dev_uninit
  /
 
-static void tun_dev_uninit(FAR struct tun_device_s *priv)
+static int tun_dev_uninit(FAR struct tun_device_s *priv)
 {
+  int ret;
+
+  ret = nxmutex_lock(>lock);
+  if (ret < 0)
+{
+  return ret;
+}
+
   /* Put the interface in the down state */
 
   tun_ifdown(>dev);
 
+  if (!work_available(>work))
+{
+  work_cancel_sync(TUNWORK, >work);
+}
+
+  nxmutex_unlock(>lock);
+
   /* Remove the device from the OS */
 
   netdev_unregister(>dev);
@@ -918,6 +941,8 @@ static void tun_dev_uninit(FAR struct tun_device_s *priv)
   nxmutex_destroy(>lock);
   nxsem_destroy(>read_wait_sem);
   nxsem_destroy(>write_wait_sem);
+
+  return ret;
 }
 
 /
@@ -941,8 +966,11 @@ static int tun_close(FAR struct file *filep)
   ret  = nxmutex_lock(>lock);
   if (ret >= 0)
 {
-  tun->free_tuns |= (1 << intf);
-  tun_dev_uninit(priv);
+  ret = tun_dev_uninit(priv);
+  if (ret >= 0)
+{
+  tun->free_tuns |= (1 << intf);
+}
 
   nxmutex_unlock(>lock);
 }



[nuttx] branch master updated: ucans32k146/se05x: Refresh defconfig after https://github.com/apache/nuttx-apps/pull/2131

2023-10-18 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 04f834290c ucans32k146/se05x: Refresh defconfig after 
https://github.com/apache/nuttx-apps/pull/2131
04f834290c is described below

commit 04f834290c09b2b1bfb68990cd6384220f577b22
Author: Xiang Xiao 
AuthorDate: Wed Oct 18 19:17:37 2023 +0800

ucans32k146/se05x: Refresh defconfig after 
https://github.com/apache/nuttx-apps/pull/2131

Signed-off-by: Xiang Xiao 
---
 boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig 
b/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig
index a7bafc199c..a6ba699d9b 100644
--- a/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig
+++ b/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig
@@ -32,8 +32,6 @@ CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_I2C=y
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_LPUART1_SERIAL_CONSOLE=y
-CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID=y
-CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
 CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512



[nuttx] 03/03: stdio: Merge fs_fdopen into fdopen to simplify the code logi

2023-10-16 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit b1c8c84e81af0d6e76ff06747754c92cab1ba89d
Author: Xiang Xiao 
AuthorDate: Sun Oct 15 15:47:12 2023 +0800

stdio: Merge fs_fdopen into fdopen to simplify the code logi

since fs_fdopen could avoid call the kernel specific function now

Signed-off-by: Xiang Xiao 
---
 fs/vfs/CMakeLists.txt|   6 --
 fs/vfs/Make.defs |   6 --
 fs/vfs/fs_fdopen.c   | 219 ---
 include/nuttx/fs/fs.h|  14 ---
 include/sys/syscall_lookup.h |   4 -
 libs/libc/stdio/lib_fopen.c  |  87 ++---
 syscall/syscall.csv  |   1 -
 7 files changed, 72 insertions(+), 265 deletions(-)

diff --git a/fs/vfs/CMakeLists.txt b/fs/vfs/CMakeLists.txt
index 0b07ec3b68..4f9460495e 100644
--- a/fs/vfs/CMakeLists.txt
+++ b/fs/vfs/CMakeLists.txt
@@ -60,12 +60,6 @@ if(CONFIG_PSEUDOFS_FILE)
   list(APPEND SRCS fs_pseudofile.c)
 endif()
 
-# Stream support
-
-if(CONFIG_FILE_STREAM)
-  list(APPEND SRCS fs_fdopen.c)
-endif()
-
 # Support for eventfd
 
 if(CONFIG_EVENT_FD)
diff --git a/fs/vfs/Make.defs b/fs/vfs/Make.defs
index 339b4aed80..de19051342 100644
--- a/fs/vfs/Make.defs
+++ b/fs/vfs/Make.defs
@@ -39,12 +39,6 @@ ifeq ($(CONFIG_PSEUDOFS_FILE),y)
 CSRCS += fs_pseudofile.c
 endif
 
-# Stream support
-
-ifeq ($(CONFIG_FILE_STREAM),y)
-CSRCS += fs_fdopen.c
-endif
-
 # Support for eventfd
 
 ifeq ($(CONFIG_EVENT_FD),y)
diff --git a/fs/vfs/fs_fdopen.c b/fs/vfs/fs_fdopen.c
deleted file mode 100644
index 6fd88212d8..00
--- a/fs/vfs/fs_fdopen.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/
- * fs/vfs/fs_fdopen.c
- *
- * 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.
- *
- /
-
-/
- * Included Files
- /
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "inode/inode.h"
-
-/
- * Private Functions
- /
-
-/
- * Name: fs_checkfd
- *
- * Description:
- *   Check if the file descriptor is valid for the provided TCB and if it
- *   supports the requested access.
- *
- /
-
-static inline int fs_checkfd(FAR struct tcb_s *tcb, int fd, int oflags)
-{
-  FAR struct file *filep;
-  FAR struct inode *inode;
-  int ret;
-
-  DEBUGASSERT(tcb && tcb->group);
-
-  /* Get the file structure corresponding to the file descriptor. */
-
-  ret = fs_getfilep(fd, );
-  if (ret < 0)
-{
-  return ret;
-}
-
-  /* Get the inode associated with the file descriptor.  This should
-   * normally be the case if fd >= 0.  But not in the case where the
-   * called attempts to explicitly stdin with fdopen(0) but stdin has
-   * been closed.
-   */
-
-  inode = filep->f_inode;
-  if (!inode)
-{
-  /* No inode -- descriptor does not correspond to an open file */
-
-  return -ENOENT;
-}
-
-  /* Make sure that the inode supports the requested access.  In
-   * the case of fdopen, we are not actually creating the file -- in
-   * particular w and w+ do not truncate the file and any files have
-   * already been created.
-   */
-
-  if (inode_checkflags(inode, oflags) != OK)
-{
-  /* Cannot support the requested access */
-
-  return -EACCES;
-}
-
-  /* Looks good to me */
-
-  return OK;
-}
-
-/***

[nuttx] 01/03: stdio: Move lib_stream_[initialize|release] from libc/stdio to sched/tls

2023-10-16 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit b0d197534f1520b68dc55f65453bf824151e9a3c
Author: Xiang Xiao 
AuthorDate: Sun Oct 15 15:02:30 2023 +0800

stdio: Move lib_stream_[initialize|release] from libc/stdio to sched/tls

both functions aren't suitable to be put into libc,
because they call the kernel internal functions directly.

Signed-off-by: Xiang Xiao 
---
 include/nuttx/lib/lib.h |   6 --
 libs/libc/stdio/CMakeLists.txt  |   1 -
 libs/libc/stdio/Make.defs   |   4 +-
 libs/libc/stdio/lib_libstream.c | 142 
 sched/tls/task_initinfo.c   |  38 ++-
 sched/tls/task_uninitinfo.c |  73 -
 6 files changed, 109 insertions(+), 155 deletions(-)

diff --git a/include/nuttx/lib/lib.h b/include/nuttx/lib/lib.h
index c504e832a1..59fb9b9c13 100644
--- a/include/nuttx/lib/lib.h
+++ b/include/nuttx/lib/lib.h
@@ -105,13 +105,7 @@ extern "C"
  * Public Function Prototypes
  /
 
-/* Functions contained in lib_streams.c */
-
 #ifdef CONFIG_FILE_STREAM
-struct task_group_s;
-void lib_stream_initialize(FAR struct task_group_s *group);
-void lib_stream_release(FAR struct task_group_s *group);
-
 /* Functions contained in lib_getstreams.c **/
 
 FAR struct streamlist *lib_get_streams(void);
diff --git a/libs/libc/stdio/CMakeLists.txt b/libs/libc/stdio/CMakeLists.txt
index b1f0cb926e..f914b6ef4c 100644
--- a/libs/libc/stdio/CMakeLists.txt
+++ b/libs/libc/stdio/CMakeLists.txt
@@ -99,7 +99,6 @@ if(CONFIG_FILE_STREAM)
 lib_tmpfile.c
 lib_setbuf.c
 lib_setvbuf.c
-lib_libstream.c
 lib_libfilelock.c
 lib_libgetstreams.c
 lib_fputwc.c
diff --git a/libs/libc/stdio/Make.defs b/libs/libc/stdio/Make.defs
index d438ceaf6e..d94658b647 100644
--- a/libs/libc/stdio/Make.defs
+++ b/libs/libc/stdio/Make.defs
@@ -46,8 +46,8 @@ CSRCS += lib_rdflush_unlocked.c lib_wrflush_unlocked.c 
lib_putc.c lib_fputc.c
 CSRCS += lib_fputs.c lib_ungetc.c lib_fprintf.c lib_vfprintf.c
 CSRCS += lib_feof.c lib_ferror.c lib_rewind.c lib_clearerr.c
 CSRCS += lib_scanf.c lib_vscanf.c lib_fscanf.c lib_vfscanf.c lib_tmpfile.c
-CSRCS += lib_setbuf.c lib_setvbuf.c lib_libstream.c lib_libfilelock.c
-CSRCS += lib_libgetstreams.c lib_setbuffer.c lib_fputwc.c lib_putwc.c 
lib_fputws.c
+CSRCS += lib_setbuf.c lib_setvbuf.c lib_libfilelock.c lib_libgetstreams.c
+CSRCS += lib_setbuffer.c lib_fputwc.c lib_putwc.c lib_fputws.c
 endif
 
 # Add the stdio directory to the build
diff --git a/libs/libc/stdio/lib_libstream.c b/libs/libc/stdio/lib_libstream.c
deleted file mode 100644
index be6a2a1c02..00
--- a/libs/libc/stdio/lib_libstream.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/
- * libs/libc/stdio/lib_libstream.c
- *
- * 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.
- *
- /
-
-/
- * Included Files
- /
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "libc.h"
-
-#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
-
-/
- * Public Functions
- /
-
-/
- * Name: lib_stream_initialize
- *
- * Description:
- *   This function is called when a new task is allocated.  It initializes
- *   the streamlist instance that is stored in the task group.
- *
- /
-
-void lib_stream_initialize(FAR struct task_group_s *

[nuttx] 02/03: stdio: Initialize stdin, stdout and stderr directly

2023-10-16 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 62c2b1abba7f62787220dc897c650aa10fdb41d7
Author: Xiang Xiao 
AuthorDate: Sun Oct 15 14:28:39 2023 +0800

stdio: Initialize stdin, stdout and stderr directly

and then remove group_setupstreams

Signed-off-by: Xiang Xiao 
---
 fs/vfs/fs_fdopen.c | 38 +---
 sched/group/CMakeLists.txt |  1 -
 sched/group/Make.defs  |  2 +-
 sched/group/group.h|  3 --
 sched/group/group_setupidlefiles.c |  5 ---
 sched/group/group_setupstreams.c   | 74 --
 sched/group/group_setuptaskfiles.c |  6 
 sched/tls/task_initinfo.c  | 36 +++
 8 files changed, 39 insertions(+), 126 deletions(-)

diff --git a/fs/vfs/fs_fdopen.c b/fs/vfs/fs_fdopen.c
index 5f7bf7005a..6fd88212d8 100644
--- a/fs/vfs/fs_fdopen.c
+++ b/fs/vfs/fs_fdopen.c
@@ -118,14 +118,6 @@ int fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb,
   FAR FILE  *stream;
   intret = OK;
 
-  /* Check input parameters */
-
-  if (fd < 0)
-{
-  ret = -EBADF;
-  goto errout;
-}
-
   /* A NULL TCB pointer means to use this threads TCB.  This is a little
* hack the let's this function be called from user-space (via a syscall)
* without having access to the TCB.
@@ -138,13 +130,9 @@ int fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb,
 
   DEBUGASSERT(tcb && tcb->group);
 
-  if (fd >= 3)
-{
-  ret = fs_checkfd(tcb, fd, oflags);
-}
-
   /* Do we have a good descriptor of some sort? */
 
+  ret = fs_checkfd(tcb, fd, oflags);
   if (ret < 0)
 {
   /* No... return the reported error */
@@ -198,24 +186,22 @@ int fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb,
   stream = >sl_std[fd];
 }
 
-#ifndef CONFIG_STDIO_DISABLE_BUFFERING
-#if CONFIG_STDIO_BUFFER_SIZE > 0
+#if !defined(CONFIG_STDIO_DISABLE_BUFFERING) && CONFIG_STDIO_BUFFER_SIZE > 0
   /* Set up pointers */
 
   stream->fs_bufstart = stream->fs_buffer;
-  stream->fs_bufend   = >fs_bufstart[CONFIG_STDIO_BUFFER_SIZE];
+  stream->fs_bufend   = stream->fs_bufstart + CONFIG_STDIO_BUFFER_SIZE;
   stream->fs_bufpos   = stream->fs_bufstart;
   stream->fs_bufread  = stream->fs_bufstart;
   stream->fs_flags= __FS_FLAG_UBF; /* Fake setvbuf and fclose */
 
-#ifdef CONFIG_STDIO_LINEBUFFER
+#  ifdef CONFIG_STDIO_LINEBUFFER
   /* Setup buffer flags */
 
   stream->fs_flags   |= __FS_FLAG_LBF; /* Line buffering */
 
-#endif /* CONFIG_STDIO_LINEBUFFER */
-#endif /* CONFIG_STDIO_BUFFER_SIZE > 0 */
-#endif /* CONFIG_STDIO_DISABLE_BUFFERING */
+#  endif /* CONFIG_STDIO_LINEBUFFER */
+#endif /* !CONFIG_STDIO_DISABLE_BUFFERING && CONFIG_STDIO_BUFFER_SIZE > 0 */
 
   /* Save the file description and open flags.  Setting the
* file descriptor locks this stream.
@@ -224,18 +210,10 @@ int fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb,
   stream->fs_fd   = fd;
   stream->fs_oflags   = oflags;
 
-  if (filep != NULL)
-{
-  *filep = stream;
-}
-
+  *filep = stream;
   return OK;
 
 errout:
-  if (filep != NULL)
-{
-  *filep = NULL;
-}
-
+  *filep = NULL;
   return ret;
 }
diff --git a/sched/group/CMakeLists.txt b/sched/group/CMakeLists.txt
index dd3fced7f8..0f6bc8b22a 100644
--- a/sched/group/CMakeLists.txt
+++ b/sched/group/CMakeLists.txt
@@ -23,7 +23,6 @@ set(SRCS
 group_join.c
 group_leave.c
 group_find.c
-group_setupstreams.c
 group_setupidlefiles.c
 group_setuptaskfiles.c
 group_foreachchild.c
diff --git a/sched/group/Make.defs b/sched/group/Make.defs
index 0328e042f4..7115c6fa29 100644
--- a/sched/group/Make.defs
+++ b/sched/group/Make.defs
@@ -19,7 +19,7 @@
 
 
 CSRCS += group_create.c group_join.c group_leave.c group_find.c
-CSRCS += group_setupstreams.c group_setupidlefiles.c group_setuptaskfiles.c
+CSRCS += group_setupidlefiles.c group_setuptaskfiles.c
 CSRCS += group_foreachchild.c group_killchildren.c group_signal.c
 CSRCS += group_argvstr.c
 
diff --git a/sched/group/group.h b/sched/group/group.h
index ee865dad9e..7988e6c1ce 100644
--- a/sched/group/group.h
+++ b/sched/group/group.h
@@ -121,8 +121,5 @@ void group_remove_children(FAR struct task_group_s *group);
 
 int  group_setupidlefiles(FAR struct task_tcb_s *tcb);
 int  group_setuptaskfiles(FAR struct task_tcb_s *tcb);
-#ifdef CONFIG_FILE_STREAM
-int  group_setupstreams(FAR struct task_tcb_s *tcb);
-#endif
 
 #endif /* __SCHED_GROUP_GROUP_H */
diff --git a/sched/group/group_setupidlefiles.c 
b/sched/group/group_setupidlefiles.c
index d54fcb1701..91f83e83e5 100644
--- a/sched/group/group_setupidlefiles.c
+++ b/sched/group/group_setupidlefil

[nuttx] branch master updated (b892ec5c6e -> b1c8c84e81)

2023-10-16 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from b892ec5c6e libc/machine: Remove FAR from sparc
 new b0d197534f stdio: Move lib_stream_[initialize|release] from libc/stdio 
to sched/tls
 new 62c2b1abba stdio: Initialize stdin, stdout and stderr directly
 new b1c8c84e81 stdio: Merge fs_fdopen into fdopen to simplify the code logi

The 3 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:
 fs/vfs/CMakeLists.txt  |   6 -
 fs/vfs/Make.defs   |   6 -
 fs/vfs/fs_fdopen.c | 241 -
 include/nuttx/fs/fs.h  |  14 ---
 include/nuttx/lib/lib.h|   6 -
 include/sys/syscall_lookup.h   |   4 -
 libs/libc/stdio/CMakeLists.txt |   1 -
 libs/libc/stdio/Make.defs  |   4 +-
 libs/libc/stdio/lib_fopen.c|  87 ++---
 libs/libc/stdio/lib_libstream.c| 142 --
 sched/group/CMakeLists.txt |   1 -
 sched/group/Make.defs  |   2 +-
 sched/group/group.h|   3 -
 sched/group/group_setupidlefiles.c |   5 -
 sched/group/group_setupstreams.c   |  74 
 sched/group/group_setuptaskfiles.c |   6 -
 sched/tls/task_initinfo.c  |  62 +-
 sched/tls/task_uninitinfo.c|  73 ++-
 syscall/syscall.csv|   1 -
 19 files changed, 206 insertions(+), 532 deletions(-)
 delete mode 100644 fs/vfs/fs_fdopen.c
 delete mode 100644 libs/libc/stdio/lib_libstream.c
 delete mode 100644 sched/group/group_setupstreams.c



[nuttx] branch master updated: libc/machine: Remove FAR from sparc

2023-10-16 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b892ec5c6e libc/machine: Remove FAR from sparc
b892ec5c6e is described below

commit b892ec5c6eff39bd41d9d55f163bfe285e40477b
Author: Xiang Xiao 
AuthorDate: Tue Oct 17 00:10:40 2023 +0800

libc/machine: Remove FAR from sparc

since sparc is 32bit arcch, FAR is useless

Signed-off-by: Xiang Xiao 
---
 libs/libc/machine/sparc/arch_elf.c | 52 +++---
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/libs/libc/machine/sparc/arch_elf.c 
b/libs/libc/machine/sparc/arch_elf.c
index fb19702878..bbdece3cf5 100644
--- a/libs/libc/machine/sparc/arch_elf.c
+++ b/libs/libc/machine/sparc/arch_elf.c
@@ -63,7 +63,7 @@
  *
  /
 
-bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
+bool up_checkarch(const Elf32_Ehdr *ehdr)
 {
   /* Make sure it's an Sparc executable */
 
@@ -120,7 +120,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
  *
  /
 
-int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
+int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym,
 uintptr_t addr)
 {
   unsigned int relotype;
@@ -140,7 +140,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const 
Elf32_Sym *sym,
   return OK;
 }
 
-int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
+int up_relocateadd(const Elf32_Rela *rel, const Elf32_Sym *sym,
uintptr_t addr)
 {
   unsigned int relotype;
@@ -170,76 +170,76 @@ int up_relocateadd(FAR const Elf32_Rela *rel, FAR const 
Elf32_Sym *sym,
 case R_SPARC_NONE:
   break;
 case R_SPARC_8:
-(*(FAR uint8_t *)addr) = (uint8_t)value;
+(*(uint8_t *)addr) = (uint8_t)value;
 break;
 
 case R_SPARC_16:
-(*(FAR uint16_t *)addr) = (uint16_t)value;
+(*(uint16_t *)addr) = (uint16_t)value;
 break;
 
 case R_SPARC_32:
-(*(FAR uint32_t *)addr) = value;
+(*(uint32_t *)addr) = value;
 break;
 
 case R_SPARC_DISP8:
 case R_SPARC_DISP16:
 case R_SPARC_DISP32:
-(*(FAR uint32_t *)addr) = value - addr;
+(*(uint32_t *)addr) = value - addr;
 break;
 
 case R_SPARC_WDISP30:
 value  -= addr;
-(*(FAR uint32_t *)addr) &= (~0x3fff);
-(*(FAR uint32_t *)addr) |= (value >> 2) & 0x3fff;
+(*(uint32_t *)addr) &= (~0x3fff);
+(*(uint32_t *)addr) |= (value >> 2) & 0x3fff;
 break;
 
 case R_SPARC_WDISP22:
 value  -= addr;
-(*(FAR uint32_t *)addr) &= (~0x3f);
-(*(FAR uint32_t *)addr) |= (value >> 2) & 0x3f;
+(*(uint32_t *)addr) &= (~0x3f);
+(*(uint32_t *)addr) |= (value >> 2) & 0x3f;
 break;
 
 case R_SPARC_HI22:
-(*(FAR uint32_t *)addr) &= (~0x3f);
-(*(FAR uint32_t *)addr) |= (value >> 10) & 0x3f;
+(*(uint32_t *)addr) &= (~0x3f);
+(*(uint32_t *)addr) |= (value >> 10) & 0x3f;
 break;
 
 case R_SPARC_22:
-(*(FAR uint32_t *)addr) &= (~0x3f);
-(*(FAR uint32_t *)addr) |= value & 0x3f;
+(*(uint32_t *)addr) &= (~0x3f);
+(*(uint32_t *)addr) |= value & 0x3f;
 break;
 
 case R_SPARC_13:
-(*(FAR uint32_t *)addr) &= (~0x1);
-(*(FAR uint32_t *)addr) |= value & 0x1;
+(*(uint32_t *)addr) &= (~0x1);
+(*(uint32_t *)addr) |= value & 0x1;
 break;
 
 case R_SPARC_LO10:
-(*(FAR uint32_t *)addr) &= (~0x3ff);
-(*(FAR uint32_t *)addr) |= value & 0x3ff;
+(*(uint32_t *)addr) &= (~0x3ff);
+(*(uint32_t *)addr) |= value & 0x3ff;
 break;
 
 case R_SPARC_PC10:
 value  -= addr;
-(*(FAR uint32_t *)addr) &= (~0x3ff);
-(*(FAR uint32_t *)addr) |= value & 0x3ff;
+(*(uint32_t *)addr) &= (~0x3ff);
+(*(uint32_t *)addr) |= value & 0x3ff;
 break;
 
 case R_SPARC_PC22:
 value  -= addr;
-(*(FAR uint32_t *)addr) &= (~0x3f);
-(*(FAR uint32_t *)addr) |= (value >> 10) & 0x3f;
+(*(uint32_t *)addr) &= (~0x3f);
+(*(uint32_t *)addr) |= (value >> 10) & 0x3f;
 break;
 
 case R_SPARC_UA32:
 case R_SPARC_GLOB_DAT:
-(*(FAR uint32_t *)addr) = value;
+(*(uint32_t *)addr) = value;
 break;
 
 case R_SPARC_JMP_SLOT:
-(*(FAR uint32_t *)(addr + 1)) = OPCODE_SETHI_G1

[nuttx] 02/02: drivers/ioexpander: Add const to the value array of multiwritepin

2023-09-27 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit a37759a6a9cb1e8719dac5098f2c8f3b27431ecf
Author: Xiang Xiao 
AuthorDate: Tue Sep 26 00:29:31 2023 +0800

drivers/ioexpander: Add const to the value array of multiwritepin

Signed-off-by: Xiang Xiao 
---
 drivers/analog/lmp92001.c | 4 ++--
 drivers/ioexpander/ioe_dummy.c| 4 ++--
 drivers/ioexpander/iso1h812g.c| 6 +++---
 drivers/ioexpander/iso1i813t.c| 6 +++---
 drivers/ioexpander/mcp23x08.c | 4 ++--
 drivers/ioexpander/mcp23x17.c | 4 ++--
 drivers/ioexpander/pca9538.c  | 4 ++--
 drivers/ioexpander/pca9555.c  | 6 +++---
 drivers/ioexpander/pcf8574.c  | 4 ++--
 drivers/ioexpander/pcf8575.c  | 6 +++---
 drivers/ioexpander/skeleton.c | 4 ++--
 drivers/ioexpander/tca64xx.c  | 4 ++--
 include/nuttx/ioexpander/ioexpander.h | 4 ++--
 13 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/analog/lmp92001.c b/drivers/analog/lmp92001.c
index 026d60fad3..6e75a32e63 100644
--- a/drivers/analog/lmp92001.c
+++ b/drivers/analog/lmp92001.c
@@ -255,7 +255,7 @@ static int lmp92001_gpio_readpin(FAR struct 
ioexpander_dev_s *dev,
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int lmp92001_gpio_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
-   FAR bool *values, int count);
+   FAR const bool *values, int count);
 static int lmp92001_gpio_multireadpin(FAR struct ioexpander_dev_s *dev,
   FAR const uint8_t *pins,
   FAR bool *values, int count);
@@ -1376,7 +1376,7 @@ static int lmp92001_gpio_readpin(FAR struct 
ioexpander_dev_s *dev,
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int lmp92001_gpio_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
-   FAR bool *values, int count)
+   FAR const bool *values, int count)
 {
 }
 
diff --git a/drivers/ioexpander/ioe_dummy.c b/drivers/ioexpander/ioe_dummy.c
index bd2af0de6a..fb2b4a356b 100644
--- a/drivers/ioexpander/ioe_dummy.c
+++ b/drivers/ioexpander/ioe_dummy.c
@@ -119,7 +119,7 @@ static int ioe_dummy_readpin(FAR struct ioexpander_dev_s 
*dev,
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int ioe_dummy_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
-   FAR bool *values, int count);
+   FAR const bool *values, int count);
 static int ioe_dummy_multireadpin(FAR struct ioexpander_dev_s *dev,
   FAR const uint8_t *pins,
   FAR bool *values, int count);
@@ -442,7 +442,7 @@ static int ioe_dummy_readpin(FAR struct ioexpander_dev_s 
*dev,
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int ioe_dummy_multiwritepin(FAR struct ioexpander_dev_s *dev,
FAR const uint8_t *pins,
-   FAR bool *values, int count)
+   FAR const bool *values, int count)
 {
   FAR struct ioe_dummy_dev_s *priv = (FAR struct ioe_dummy_dev_s *)dev;
   uint8_t pin;
diff --git a/drivers/ioexpander/iso1h812g.c b/drivers/ioexpander/iso1h812g.c
index 93a0e3f031..36d15234ee 100644
--- a/drivers/ioexpander/iso1h812g.c
+++ b/drivers/ioexpander/iso1h812g.c
@@ -81,7 +81,7 @@ static int iso1h812g_readpin(FAR struct ioexpander_dev_s 
*dev, uint8_t pin,
  FAR bool *value);
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int iso1h812g_multiwritepin(FAR struct ioexpander_dev_s *dev,
- FAR const uint8_t *pins, FAR bool *values, int count);
+ FAR const uint8_t *pins, FAR const bool *values, int count);
 static int iso1h812g_multireadpin(FAR struct ioexpander_dev_s *dev,
  FAR const uint8_t *pins, FAR bool *values, int count);
 #endif
@@ -336,8 +336,8 @@ static int iso1h812g_readpin(FAR struct ioexpander_dev_s 
*dev, uint8_t pin,
 
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int iso1h812g_multiwritepin(FAR struct ioexpander_dev_s *dev,
-   FAR const uint8_t *pins, FAR bool *values,
-   int count)
+   FAR const uint8_t *pins,
+   FAR const bool *values, int count)
 {
   FAR struct iso1h812g_dev_s *priv = (FAR struct iso1h812g_dev_s *)dev;
   int ret;
diff --git a/drivers/ioexpander/iso1i813t.c b/drivers/ioexpander/iso1i813t.c
index 348d1d8020..144f35cdbf 100644
--- a/drivers/ioexpander/iso1i813t.c
+++ b/drivers/ioexpander/iso1i813t.c
@@ -80,7 +80,7 @@ static int

[nuttx] branch master updated (9be93addea -> a37759a6a9)

2023-09-27 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 9be93addea mpfs/mpfs_corespi: Several speed optimizations to the FPGA 
driver
 new e499c6c1c7 drivers/ioexpander: Add const to the pin array
 new a37759a6a9 drivers/ioexpander: Add const to the value array of 
multiwritepin

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:
 drivers/analog/lmp92001.c | 16 
 drivers/ioexpander/ioe_dummy.c| 16 
 drivers/ioexpander/iso1h812g.c|  6 +++---
 drivers/ioexpander/iso1i813t.c|  6 +++---
 drivers/ioexpander/mcp23x08.c | 16 
 drivers/ioexpander/mcp23x17.c | 18 +-
 drivers/ioexpander/pca9538.c  | 12 ++--
 drivers/ioexpander/pca9555.c  |  6 +++---
 drivers/ioexpander/pcf8574.c  | 12 ++--
 drivers/ioexpander/pcf8575.c  |  6 +++---
 drivers/ioexpander/skeleton.c | 19 ---
 drivers/ioexpander/tca64xx.c  | 27 ++-
 include/nuttx/ioexpander/ioexpander.h |  4 ++--
 13 files changed, 85 insertions(+), 79 deletions(-)



[nuttx] 01/02: drivers/ioexpander: Add const to the pin array

2023-09-27 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit e499c6c1c77ef1e2beb0f39601dd7cc19ef9cab4
Author: Xiang Xiao 
AuthorDate: Tue Sep 26 00:19:11 2023 +0800

drivers/ioexpander: Add const to the pin array

forget in patch: https://github.com/apache/nuttx/pull/9529

Signed-off-by: Xiang Xiao 
---
 drivers/analog/lmp92001.c  | 16 
 drivers/ioexpander/ioe_dummy.c | 16 
 drivers/ioexpander/mcp23x08.c  | 16 
 drivers/ioexpander/mcp23x17.c  | 18 +-
 drivers/ioexpander/pca9538.c   | 12 ++--
 drivers/ioexpander/pcf8574.c   | 12 ++--
 drivers/ioexpander/skeleton.c  | 19 ---
 drivers/ioexpander/tca64xx.c   | 27 ++-
 8 files changed, 71 insertions(+), 65 deletions(-)

diff --git a/drivers/analog/lmp92001.c b/drivers/analog/lmp92001.c
index 8bb51233bc..026d60fad3 100644
--- a/drivers/analog/lmp92001.c
+++ b/drivers/analog/lmp92001.c
@@ -254,11 +254,11 @@ static int lmp92001_gpio_readpin(FAR struct 
ioexpander_dev_s *dev,
  uint8_t pin, FAR bool *value);
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int lmp92001_gpio_multiwritepin(FAR struct ioexpander_dev_s *dev,
-   FAR uint8_t *pins, FAR bool *values,
-   int count);
+   FAR const uint8_t *pins,
+   FAR bool *values, int count);
 static int lmp92001_gpio_multireadpin(FAR struct ioexpander_dev_s *dev,
-  FAR uint8_t *pins, FAR bool *values,
-  int count);
+  FAR const uint8_t *pins,
+  FAR bool *values, int count);
 #endif
 #ifdef CONFIG_IOEXPANDER_INT_ENABLE
 static FAR void *lmp92001_gpio_attach(FAR struct ioexpander_dev_s *dev,
@@ -1375,8 +1375,8 @@ static int lmp92001_gpio_readpin(FAR struct 
ioexpander_dev_s *dev,
 
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int lmp92001_gpio_multiwritepin(FAR struct ioexpander_dev_s *dev,
-   FAR uint8_t *pins, FAR bool *values,
-   int count)
+   FAR const uint8_t *pins,
+   FAR bool *values, int count)
 {
 }
 
@@ -1398,8 +1398,8 @@ static int lmp92001_gpio_multiwritepin(FAR struct 
ioexpander_dev_s *dev,
  /
 
 static int lmp92001_gpio_multireadpin(FAR struct ioexpander_dev_s *dev,
-  FAR uint8_t *pins, FAR bool *values,
-  int count)
+  FAR const uint8_t *pins,
+  FAR bool *values, int count)
 {
 }
 #endif
diff --git a/drivers/ioexpander/ioe_dummy.c b/drivers/ioexpander/ioe_dummy.c
index 445f336e66..bd2af0de6a 100644
--- a/drivers/ioexpander/ioe_dummy.c
+++ b/drivers/ioexpander/ioe_dummy.c
@@ -118,11 +118,11 @@ static int ioe_dummy_readpin(FAR struct ioexpander_dev_s 
*dev,
  uint8_t pin, FAR bool *value);
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int ioe_dummy_multiwritepin(FAR struct ioexpander_dev_s *dev,
-   FAR uint8_t *pins, FAR bool *values,
-   int count);
+   FAR const uint8_t *pins,
+   FAR bool *values, int count);
 static int ioe_dummy_multireadpin(FAR struct ioexpander_dev_s *dev,
-  FAR uint8_t *pins, FAR bool *values,
-  int count);
+  FAR const uint8_t *pins,
+  FAR bool *values, int count);
 #endif
 #ifdef CONFIG_IOEXPANDER_INT_ENABLE
 static FAR void *ioe_dummy_attach(FAR struct ioexpander_dev_s *dev,
@@ -441,8 +441,8 @@ static int ioe_dummy_readpin(FAR struct ioexpander_dev_s 
*dev,
 
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int ioe_dummy_multiwritepin(FAR struct ioexpander_dev_s *dev,
-   FAR uint8_t *pins, FAR bool *values,
-   int count)
+   FAR const uint8_t *pins,
+   FAR bool *values, int count)
 {
   FAR struct ioe_dummy_dev_s *priv = (FAR struct ioe_dummy_dev_s *)dev;
   uint8_t pin;
@@ -491,8 +491,8 @@ static int ioe_dummy_multiwritepin(FAR struct 
ioexpander_dev_s *dev,
 
 #ifdef CONFIG_IOEXPANDER_MULTIPIN
 static int ioe_dummy_multireadpin(FAR struct ioexpander_dev_s *dev,
-  FAR uint8_t *pins, FAR bool *values

[nuttx] branch master updated: bcm43xxx: revert part of the previous upstream code

2023-09-23 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 03e220a271 bcm43xxx: revert part of the previous upstream code
03e220a271 is described below

commit 03e220a271c2166ca6bdb37e1e0c67f4f2059603
Author: zhanghongyu 
AuthorDate: Sat Sep 23 13:49:38 2023 +0800

bcm43xxx: revert part of the previous upstream code

Revert WPA failure reason codes to the previous community version

Signed-off-by: zhanghongyu 
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
index 9fd0e74354..5437fbb7da 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
@@ -3297,22 +3297,22 @@ typedef enum
 
   /* WPA failure reason codes carried in the WLC_E_PSK_SUP event */
 
-  WLC_E_SUP_OTHER   = 0,  /* Other reason */
-  WLC_E_SUP_DECRYPT_KEY_DATA= 1,  /* Decryption of key data failed */
-  WLC_E_SUP_BAD_UCAST_WEP128= 2,  /* Illegal use of ucast WEP128 */
-  WLC_E_SUP_BAD_UCAST_WEP40 = 3,  /* Illegal use of ucast WEP40 */
-  WLC_E_SUP_UNSUP_KEY_LEN   = 4,  /* Unsupported key length */
-  WLC_E_SUP_PW_KEY_CIPHER   = 5,  /* Unicast cipher mismatch in pairwise 
key */
-  WLC_E_SUP_MSG3_TOO_MANY_IE= 6,  /* WPA IE contains > 1 RSN IE in key msg 
3 */
-  WLC_E_SUP_MSG3_IE_MISMATCH= 7,  /* WPA IE mismatch in key message 3 */
-  WLC_E_SUP_NO_INSTALL_FLAG = 8,  /* INSTALL flag unset in 4-way msg */
-  WLC_E_SUP_MSG3_NO_GTK = 9,  /* encapsulated GTK missing from msg 3 */
-  WLC_E_SUP_GRP_KEY_CIPHER  = 10, /* Multicast cipher mismatch in group 
key */
-  WLC_E_SUP_GRP_MSG1_NO_GTK = 11, /* encapsulated GTK missing from group 
msg 1 */
-  WLC_E_SUP_GTK_DECRYPT_FAIL= 12, /* GTK decrypt failure */
-  WLC_E_SUP_SEND_FAIL   = 13, /* message send failure */
-  WLC_E_SUP_DEAUTH  = 14, /* received FC_DEAUTH */
-  WLC_E_SUP_WPA_PSK_TMO = 15, /* WPA PSK 4-way handshake timeout */
+  WLC_E_SUP_OTHER   = 0  + WLC_E_SUP_REASON_OFFSET,  /* Other 
reason */
+  WLC_E_SUP_DECRYPT_KEY_DATA= 1  + WLC_E_SUP_REASON_OFFSET,  /* Decryption 
of key data failed */
+  WLC_E_SUP_BAD_UCAST_WEP128= 2  + WLC_E_SUP_REASON_OFFSET,  /* Illegal 
use of ucast WEP128 */
+  WLC_E_SUP_BAD_UCAST_WEP40 = 3  + WLC_E_SUP_REASON_OFFSET,  /* Illegal 
use of ucast WEP40 */
+  WLC_E_SUP_UNSUP_KEY_LEN   = 4  + WLC_E_SUP_REASON_OFFSET,  /* 
Unsupported key length */
+  WLC_E_SUP_PW_KEY_CIPHER   = 5  + WLC_E_SUP_REASON_OFFSET,  /* Unicast 
cipher mismatch in pairwise key */
+  WLC_E_SUP_MSG3_TOO_MANY_IE= 6  + WLC_E_SUP_REASON_OFFSET,  /* WPA IE 
contains > 1 RSN IE in key msg 3 */
+  WLC_E_SUP_MSG3_IE_MISMATCH= 7  + WLC_E_SUP_REASON_OFFSET,  /* WPA IE 
mismatch in key message 3 */
+  WLC_E_SUP_NO_INSTALL_FLAG = 8  + WLC_E_SUP_REASON_OFFSET,  /* INSTALL 
flag unset in 4-way msg */
+  WLC_E_SUP_MSG3_NO_GTK = 9  + WLC_E_SUP_REASON_OFFSET,  /* 
encapsulated GTK missing from msg 3 */
+  WLC_E_SUP_GRP_KEY_CIPHER  = 10 + WLC_E_SUP_REASON_OFFSET,  /* Multicast 
cipher mismatch in group key */
+  WLC_E_SUP_GRP_MSG1_NO_GTK = 11 + WLC_E_SUP_REASON_OFFSET,  /* 
encapsulated GTK missing from group msg 1 */
+  WLC_E_SUP_GTK_DECRYPT_FAIL= 12 + WLC_E_SUP_REASON_OFFSET,  /* GTK 
decrypt failure */
+  WLC_E_SUP_SEND_FAIL   = 13 + WLC_E_SUP_REASON_OFFSET,  /* message 
send failure */
+  WLC_E_SUP_DEAUTH  = 14 + WLC_E_SUP_REASON_OFFSET,  /* received 
FC_DEAUTH */
+  WLC_E_SUP_WPA_PSK_TMO = 15 + WLC_E_SUP_REASON_OFFSET,  /* WPA PSK 
4-way handshake timeout */
 
   /* Reason codes for LINK */
 



[nuttx] branch master updated: ci: Update aarch64 gcc toolchain to 12.3.rel1

2023-09-19 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new f6681218f4 ci: Update aarch64 gcc toolchain to 12.3.rel1
f6681218f4 is described below

commit f6681218f4941a10ae174bc5d8f115660e32d980
Author: Xiang Xiao 
AuthorDate: Mon Sep 18 18:22:12 2023 +0800

ci: Update aarch64 gcc toolchain to 12.3.rel1

Signed-off-by: Xiang Xiao 
---
 tools/ci/docker/linux/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile
index 272d82ad97..6ce79dbaf9 100644
--- a/tools/ci/docker/linux/Dockerfile
+++ b/tools/ci/docker/linux/Dockerfile
@@ -93,7 +93,7 @@ RUN mkdir gcc-arm-none-eabi && \
 FROM nuttx-toolchain-base AS nuttx-toolchain-arm64
 # Download the latest ARM64 GCC toolchain prebuilt by ARM
 RUN mkdir gcc-aarch64-none-elf && \
-  curl -s -L  
"https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-elf.tar.xz;
 \
+  curl -s -L  
"https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-elf.tar.xz;
 \
   | tar -C gcc-aarch64-none-elf --strip-components 1 -xJ
 
 ###



[nuttx] branch master updated (a0cc455922 -> 43af86bdfe)

2023-09-14 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from a0cc455922 tools: add support for merge_config
 add a2ca68aaa7 qemu:fix ci error
 add 5217dd36f0 tools/ci: Unify the version print: command xxx --version
 add 43af86bdfe tools/ci: Fix "flock: Command not found" on macOS

No new revisions were added by this update.

Summary of changes:
 boards/arm/qemu/qemu-armv7a/src/Makefile |  2 +
 boards/arm/qemu/qemu-armv7a/src/qemu_bringup.c   |  5 ++-
 boards/arm64/qemu/qemu-armv8a/src/Makefile   |  2 +
 boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c |  5 ++-
 tools/ci/cibuild.sh  | 52 
 5 files changed, 46 insertions(+), 20 deletions(-)



[nuttx-apps] branch master updated: Fix Error: configdata_main.c:402:14: error: variable 'iteration' set but not used [-Werror,-Wunused-but-set-variable]

2023-09-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2bfb9760a Fix Error: configdata_main.c:402:14: error: variable 
'iteration' set but not used [-Werror,-Wunused-but-set-variable]
2bfb9760a is described below

commit 2bfb9760ad1ee6d8f452d8d41c8db153ca655d97
Author: Xiang Xiao 
AuthorDate: Mon Sep 11 17:36:52 2023 +0800

Fix Error: configdata_main.c:402:14: error: variable 'iteration' set but 
not used [-Werror,-Wunused-but-set-variable]

Signed-off-by: Xiang Xiao 
---
 examples/configdata/configdata_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/examples/configdata/configdata_main.c 
b/examples/configdata/configdata_main.c
index 128e03f47..7c687835b 100644
--- a/examples/configdata/configdata_main.c
+++ b/examples/configdata/configdata_main.c
@@ -399,11 +399,9 @@ static int configdata_verifyconfig(void)
   int ret;
   int errcode = OK;
   int i;
-  static int iteration = 0;
 
   /* Create a file for each unused file structure */
 
-  iteration++;
   for (i = 0; i < CONFIG_EXAMPLES_CONFIGDATA_MAXENTRIES; i++)
 {
   entry = _entries[i];



[nuttx] branch master updated (4fef475825 -> c27b470d39)

2023-09-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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


from 4fef475825 sim/crypto: support MBEDTLS_MD5_ALT config
 new d4fd9f53cd Fix error: arch/sim/src/sim/posix/sim_alsa.c:290:18: error: 
'flags' undeclared
 new 78728fc5eb Fix error: spi/qspi_flash.c:576:45: error: a function 
declaration without a prototype is deprecated in all versions of C 
[-Werror,-Wstrict-prototypes]
 new c27b470d39 Fix error: implicit declaration of function 'arc4random'; 
did you mean 'random'? [-Werror=implicit-function-declaration]

The 3 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/sim/src/sim/posix/sim_alsa.c | 2 --
 crypto/CMakeLists.txt | 4 +++-
 crypto/Makefile   | 4 +++-
 drivers/spi/qspi_flash.c  | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)



[nuttx] 01/03: Fix error: arch/sim/src/sim/posix/sim_alsa.c:290:18: error: 'flags' undeclared

2023-09-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit d4fd9f53cd53bba0fed403beecb300691a35e3eb
Author: Xiang Xiao 
AuthorDate: Mon Sep 11 16:56:42 2023 +0800

Fix error: arch/sim/src/sim/posix/sim_alsa.c:290:18: error: 'flags' 
undeclared

Signed-off-by: Xiang Xiao 
---
 arch/sim/src/sim/posix/sim_alsa.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/sim/src/sim/posix/sim_alsa.c 
b/arch/sim/src/sim/posix/sim_alsa.c
index 9fc1e148b4..a7c7450d40 100644
--- a/arch/sim/src/sim/posix/sim_alsa.c
+++ b/arch/sim/src/sim/posix/sim_alsa.c
@@ -286,8 +286,6 @@ static int sim_audio_open(struct sim_audio_s *priv)
   return 0;
 
 fail:
-  snd_pcm_close(pcm);
-  up_irq_restore(flags);
   host_uninterruptible(snd_pcm_close, pcm);
   return ret;
 }



[nuttx] 03/03: Fix error: implicit declaration of function 'arc4random'; did you mean 'random'? [-Werror=implicit-function-declaration]

2023-09-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit c27b470d396177e70af5fad3e70e7634092822c5
Author: Xiang Xiao 
AuthorDate: Mon Sep 11 18:19:18 2023 +0800

Fix error: implicit declaration of function 'arc4random'; did you mean 
'random'? [-Werror=implicit-function-declaration]

Signed-off-by: Xiang Xiao 
---
 crypto/CMakeLists.txt | 4 +++-
 crypto/Makefile   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index 68073b4836..744cfe8099 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -53,7 +53,9 @@ if(CONFIG_CRYPTO)
   list(APPEND SRCS gmac.c)
   list(APPEND SRCS cmac.c)
   list(APPEND SRCS hmac.c)
-  list(APPEND SRCS idgen.c)
+  if(CONFIG_CRYPTO_RANDOM_POOL)
+list(APPEND SRCS idgen.c)
+  endif()
   list(APPEND SRCS key_wrap.c)
   list(APPEND SRCS siphash.c)
   list(APPEND SRCS hmac_buff.c)
diff --git a/crypto/Makefile b/crypto/Makefile
index b97e2f6b89..f666175b38 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -57,7 +57,9 @@ CRYPTO_CSRCS += sha2.c
 CRYPTO_CSRCS += gmac.c
 CRYPTO_CSRCS += cmac.c
 CRYPTO_CSRCS += hmac.c
-CRYPTO_CSRCS += idgen.c
+ifeq ($(CONFIG_CRYPTO_RANDOM_POOL),y)
+  CRYPTO_CSRCS += idgen.c
+endif
 CRYPTO_CSRCS += key_wrap.c
 CRYPTO_CSRCS += siphash.c
 CRYPTO_CSRCS += hmac_buff.c



[nuttx] 02/03: Fix error: spi/qspi_flash.c:576:45: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

2023-09-11 Thread archer
This is an automated email from the ASF dual-hosted git repository.

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

commit 78728fc5eb178fcc4f5a529e8c7dc1018836ebb3
Author: Xiang Xiao 
AuthorDate: Mon Sep 11 17:31:56 2023 +0800

Fix error: spi/qspi_flash.c:576:45: error: a function declaration without a 
prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]

Signed-off-by: Xiang Xiao 
---
 drivers/spi/qspi_flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/qspi_flash.c b/drivers/spi/qspi_flash.c
index 2c8aa23e20..67bd52a899 100644
--- a/drivers/spi/qspi_flash.c
+++ b/drivers/spi/qspi_flash.c
@@ -573,7 +573,7 @@ static int qspi_flash_command(FAR struct qspi_dev_s *dev,
  *
  /
 
-FAR struct qspi_dev_s *qspi_flash_initialize()
+FAR struct qspi_dev_s *qspi_flash_initialize(void)
 {
   FAR struct qspi_flashdev_s *priv = NULL;
 



  1   2   3   >