Re: [PR] arch/risc-v/litex/litex_emac: Add support for KSZ8061 ethernet PHY. [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11024:
URL: https://github.com/apache/nuttx/pull/11024


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated (ac5800386c -> cd851b3144)

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

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


from ac5800386c arch/risc-v/litex/litex_emac: Add support for KSZ8061 
ethernet PHY.
 add cd851b3144 audio: add amr format support

No new revisions were added by this update.

Summary of changes:
 include/nuttx/audio/audio.h | 1 +
 1 file changed, 1 insertion(+)



Re: [PR] audio: add amr format support [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11025:
URL: https://github.com/apache/nuttx/pull/11025


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated: arch/risc-v/litex/litex_emac: Add support for KSZ8061 ethernet PHY.

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

xiaoxiang 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 ac5800386c arch/risc-v/litex/litex_emac: Add support for KSZ8061 
ethernet PHY.
ac5800386c is described below

commit ac5800386c668a365b479040f79781d0829011c3
Author: Stuart Ianna 
AuthorDate: Wed Oct 25 13:11:47 2023 +1100

arch/risc-v/litex/litex_emac: Add support for KSZ8061 ethernet PHY.

Adds support for using the microchip KSZ8061 ethernet PHY instead of the 
default DP83848C.
---
 arch/risc-v/src/litex/litex_emac.c | 15 ++-
 include/nuttx/net/mii.h| 19 +--
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/arch/risc-v/src/litex/litex_emac.c 
b/arch/risc-v/src/litex/litex_emac.c
index 1a1fcd15cf..3fb975efbd 100644
--- a/arch/risc-v/src/litex/litex_emac.c
+++ b/arch/risc-v/src/litex/litex_emac.c
@@ -110,9 +110,21 @@
 #  define BOARD_PHYID1  MII_PHYID1_DP83848C
 #  define BOARD_PHYID2  MII_PHYID2_DP83848C
 #  define BOARD_PHY_STATUS  MII_DP83848C_STS
+#  define BOARD_PHY_INT_REG MII_DP83848C_MISR
+#  define BOARD_PHY_SETEN   MII_DP83848C_LINK_INT_EN
 #  define BOARD_PHY_10BASET(s)  (((s) & MII_DP83848C_PHYSTS_SPEED) != 0)
 #  define BOARD_PHY_100BASET(s) (((s) & MII_DP83848C_PHYSTS_SPEED) == 0)
 #  define BOARD_PHY_ISDUPLEX(s) (((s) & MII_DP83848C_PHYSTS_DUPLEX) != 0)
+#elif defined(CONFIG_ETH0_PHY_KSZ8061)
+#  define BOARD_PHY_NAME"KSZ8061"
+#  define BOARD_PHYID1  MII_PHYID1_KSZ8061
+#  define BOARD_PHYID2  MII_PHYID2_KSZ8061
+#  define BOARD_PHY_STATUS  MII_KSZ8061_PHY_CTRL_1
+#  define BOARD_PHY_INT_REG MII_KSZ8061_INTR_CTRL_STAT
+#  define BOARD_PHY_SETEN   MII_KSZ80X1_INT_LDEN | MII_KSZ80X1_INT_LUEN
+#  define BOARD_PHY_10BASET(s)  (((s) & MII_KSZ8061_PC2_10T) != 0)
+#  define BOARD_PHY_100BASET(s) (((s) & MII_KSZ8061_PC2_100T) != 0)
+#  define BOARD_PHY_ISDUPLEX(s) (((s) & MII_KSZ8061_PC2_FD) != 0)
 #else
 #  error EMAC PHY unrecognized
 #endif
@@ -1220,7 +1232,7 @@ static int litex_phyfind(struct litex_emac_s *priv, 
uint8_t phyaddr)
   model = (phyval[1] & 0x03f0) >> 4;
   revision = (phyval[1] & 0x000f);
 
-  ninfo("%s: PHY Found - OUI: 0x%04" PRIx32 "MODEL: %u REV: %u\n",
+  ninfo("%s: PHY Found - OUI: 0x%04" PRIx32 " MODEL: %u REV: %u\n",
 BOARD_PHY_NAME, oui, model, revision);
 
   return OK;
@@ -1246,6 +1258,7 @@ static int litex_phyinit(struct litex_emac_s *priv)
 
   /* Reset PHY */
 
+  ninfo("%s: PHY RESET\n", BOARD_PHY_NAME);
   putreg32(1, LITEX_ETHPHY_CRG_RESET);
   nxsig_usleep(LITEX_PHY_RESETTIMEOUT);
   putreg32(0, LITEX_ETHPHY_CRG_RESET);
diff --git a/include/nuttx/net/mii.h b/include/nuttx/net/mii.h
index bae8a1dcd0..1125c73ef8 100644
--- a/include/nuttx/net/mii.h
+++ b/include/nuttx/net/mii.h
@@ -633,6 +633,9 @@
 #define MII_PHYID1_KSZ8051   0x0022/* ID1 value for Micrel KSZ8051 
*/
 #define MII_PHYID2_KSZ8051   0x1550/* ID2 value for Micrel KSZ8051 
*/
 
+#define MII_PHYID1_KSZ8061   0x0022/* ID1 value for Micrel KSZ8061 
*/
+#define MII_PHYID2_KSZ8061   0x1573/* ID2 value for Micrel KSZ8061 
*/
+
 #define MII_PHYID1_KSZ8081   0x0022/* ID1 value for Micrel KSZ8081 
*/
 #define MII_PHYID2_KSZ8081   0x1560/* ID2 value for Micrel KSZ8081 
*/
 
@@ -642,7 +645,7 @@
 #define KSZ8081_DRCTRL_PLLOFF(1 << 4)  /* Bit 4: Turn PLL off in EDPD 
mode */
/* Bits 0-3: Reserved */
 
-/* KSZ8041/51/81 Register 0x1b: Interrupt control/status */
+/* KSZ8041/51/61/81 Register 0x1b: Interrupt control/status */
 
 #define MII_KSZ80X1_INT_JEN  (1 << 15) /* Jabber interrupt enable */
 #define MII_KSZ80X1_INT_REEN (1 << 14) /* Receive error interrupt 
enable */
@@ -662,6 +665,18 @@
 #define MII_KSZ80X1_INT_RF   (1 << 1)  /* Remote fault interrupt */
 #define MII_KSZ80X1_INT_LU   (1 << 0)  /* Link up interrupt */
 
+/* KSZ8061 Register 0x1e: PHY Control 1 */
+
+#define MII_KSZ8061_PC2_PE   (1 << 9)  /* Enable pause (flow control) 
*/
+#define MII_KSZ8061_PC2_LS   (1 << 8)  /* Link status */
+#define MII_KSZ8061_PC2_PS   (1 << 7)  /* Polarity status */
+#define MII_KSZ8061_PC2_XS   (1 << 5)  /* MID/MDI-X Status */
+#define MII_KSZ8061_PC2_ED   (1 << 4)  /* Energy detect */
+#define MII_KSZ8061_PC2_PI   (1 << 3)  /* PHY isolate */
+#define MII_KSZ8061_PC2_FD   (1 << 2)  /* Full duplex */
+#define MII_KSZ8061_PC2_100T (1 << 1)  /* 100base-tx speed */
+#define MII_KSZ8061_PC2_10T  (1 << 0)  /* 10base-t speed */
+
 /* KSZ8041 Register 0x1e: PHY Control 1 -- To be provided */
 
 /* KSZ8041 Register 0x1f: PHY Control 2 */
@@ -689,7 +704,7 @@
 #define MII_PHYCTRL2_SEQTEST (1 << 1)  /* Bit 

Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


davids5 commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1371163923


##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -1373,6 +1373,7 @@ static inline void imxrt_serialout(struct imxrt_uart_s 
*priv,
 static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
 {
   int dmaresidual = imxrt_dmach_getcount(priv->rxdma);
+  DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE);

Review Comment:
   I will look into t this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] assert: rename __ASSERT to __NXASSERT to avoid confilt [nuttx]

2023-10-24 Thread via GitHub


anchao opened a new pull request, #11027:
URL: https://github.com/apache/nuttx/pull/11027

   ## Summary
   
   assert: rename __ASSERT to __NXASSERT to avoid confilt
   
   The definition of __ASSERT has special define in some OS and librarys, 
rename to __NXASSERT to avoid confilt
   
   ## Impact
   
   N/A
   
   ## Testing
   
   ci-check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] kernel: replace all sem_* to nxsem_*: in kernel space [nuttx]

2023-10-24 Thread via GitHub


anchao opened a new pull request, #11026:
URL: https://github.com/apache/nuttx/pull/11026

   ## Summary
   
   1. kernel: replace all sem_* to nxsem_*: in kernel space
   2. kernel: replace all usleep to nxsig_usleep in kernel space
   
   ## Impact
   
   N/A
   
   ## Testing
   
   ci-check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] group/killchildren: replace syscall(2) to kernel api [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 commented on PR #11018:
URL: https://github.com/apache/nuttx/pull/11018#issuecomment-1778400962

   need include `nuttx/signal.h`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] testing/sd_stress: Port sdstress testing utility from PX4-Autopilot. [nuttx-apps]

2023-10-24 Thread via GitHub


xiaoxiang781216 commented on code in PR #2150:
URL: https://github.com/apache/nuttx-apps/pull/2150#discussion_r1371050372


##
testing/sd_stress/sd_stress_main.c:
##
@@ -0,0 +1,404 @@
+/
+ * apps/testing/sd_stress/sd_stress_main.c
+ *
+ * Original Licence:
+ *
+ *   Copyright (c) 2016-2021 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ *used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ /
+
+/* Originally ported from PX4 https://github.com/PX4/PX4-Autopilot,
+ * with the following additions:
+ *
+ * - The number of files can be specified from the command line.
+ * - Bytes are written and read back from created files to verify integrity.
+ * - The bytes written are obtained from a static set,
+ *   rather than a constant 0xAA
+ * - The results are reported as a floating point, millisecond value.
+ */
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static const size_t MAX_PATH_LEN = 52;
+
+static const char *TEMPDIR = CONFIG_TESTING_SD_STRESS_DEVICE"/stress";
+static const char *TEMPDIR2 = CONFIG_TESTING_SD_STRESS_DEVICE"/moved";
+static const char *TEMPFILE = "tmp";
+
+const size_t max_runs = 1;
+const size_t min_runs = 1;
+const size_t default_runs = 32;
+
+const size_t max_bytes = 1;
+const size_t min_bytes = 1;
+const size_t default_bytes = 4096;
+
+const size_t max_files = 999;
+const size_t min_files = 1;
+const size_t default_files = 64;
+
+/
+ * Private Functions
+ /
+
+static void usage(void)
+{
+  printf("Stress test on a mount point\n");
+  printf(CONFIG_TESTING_SD_STRESS_PROGNAME ": [-r] [-b] [-f]\n");
+  printf("  -r   Number of runs (%u-%u), default %u\n",
+  min_runs, max_runs, default_runs);

Review Comment:
   no:(, the suggestion just come from my reading the source code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] audio: add amr format support [nuttx]

2023-10-24 Thread via GitHub


jinxiuxu opened a new pull request, #11025:
URL: https://github.com/apache/nuttx/pull/11025

   ## Summary
   
   ## Impact
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] arch/risc-v/litex/litex_emac: Add support for KSZ8061 ethernet PHY. [nuttx]

2023-10-24 Thread via GitHub


g2gps opened a new pull request, #11024:
URL: https://github.com/apache/nuttx/pull/11024

   ## Summary
   
   Adds support for using the microchip KSZ8061 ethernet PHY instead of the 
default DP83848C.
   
   ## Impact
   
   KSZ8061 is available to use on Litex, using custom hardware.
   
   ## Testing
   
   Custom hardware running Litex and using KSZ8061 PHY.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] testing/sd_stress: Port sdstress testing utility from PX4-Autopilot. [nuttx-apps]

2023-10-24 Thread via GitHub


g2gps commented on code in PR #2150:
URL: https://github.com/apache/nuttx-apps/pull/2150#discussion_r1371006872


##
testing/sd_stress/sd_stress_main.c:
##
@@ -0,0 +1,404 @@
+/
+ * apps/testing/sd_stress/sd_stress_main.c
+ *
+ * Original Licence:
+ *
+ *   Copyright (c) 2016-2021 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ *used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ /
+
+/* Originally ported from PX4 https://github.com/PX4/PX4-Autopilot,
+ * with the following additions:
+ *
+ * - The number of files can be specified from the command line.
+ * - Bytes are written and read back from created files to verify integrity.
+ * - The bytes written are obtained from a static set,
+ *   rather than a constant 0xAA
+ * - The results are reported as a floating point, millisecond value.
+ */
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static const size_t MAX_PATH_LEN = 52;
+
+static const char *TEMPDIR = CONFIG_TESTING_SD_STRESS_DEVICE"/stress";
+static const char *TEMPDIR2 = CONFIG_TESTING_SD_STRESS_DEVICE"/moved";
+static const char *TEMPFILE = "tmp";
+
+const size_t max_runs = 1;
+const size_t min_runs = 1;
+const size_t default_runs = 32;
+
+const size_t max_bytes = 1;
+const size_t min_bytes = 1;
+const size_t default_bytes = 4096;
+
+const size_t max_files = 999;
+const size_t min_files = 1;
+const size_t default_files = 64;
+
+/
+ * Private Functions
+ /
+
+static void usage(void)
+{
+  printf("Stress test on a mount point\n");
+  printf(CONFIG_TESTING_SD_STRESS_PROGNAME ": [-r] [-b] [-f]\n");
+  printf("  -r   Number of runs (%u-%u), default %u\n",
+  min_runs, max_runs, default_runs);

Review Comment:
   @xiaoxiang781216 These stylistic changes aren't picked up by 
`tools/checkpatch.sh`. Is there an additional tool you're using to pick up 
these discrepancies? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated: sched/pthread/barrierwait: replace syscall(2) to kernel api

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

xiaoxiang 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 cdec5c80c2 sched/pthread/barrierwait: replace syscall(2) to kernel api
cdec5c80c2 is described below

commit cdec5c80c20042040fc90170f625be2177dfa276
Author: chao an 
AuthorDate: Tue Oct 24 22:16:00 2023 +0800

sched/pthread/barrierwait: replace syscall(2) to kernel api

syscall(2) cannot be called from kernel space

Signed-off-by: chao an 
---
 sched/pthread/pthread_barrierwait.c | 56 +
 1 file changed, 26 insertions(+), 30 deletions(-)

diff --git a/sched/pthread/pthread_barrierwait.c 
b/sched/pthread/pthread_barrierwait.c
index add1748b56..169e247da1 100644
--- a/sched/pthread/pthread_barrierwait.c
+++ b/sched/pthread/pthread_barrierwait.c
@@ -25,8 +25,8 @@
 #include 
 
 #include 
+#include 
 #include 
-#include 
 #include 
 #include 
 
@@ -80,11 +80,11 @@
 
 int pthread_barrier_wait(FAR pthread_barrier_t *barrier)
 {
-  int semcount;
-  int ret = OK;
   irqstate_t flags;
+  int semcount;
+  int ret;
 
-  if (!barrier)
+  if (barrier == NULL)
 {
   return EINVAL;
 }
@@ -95,11 +95,11 @@ int pthread_barrier_wait(FAR pthread_barrier_t *barrier)
 
   /* Find out how many threads are already waiting at the barrier */
 
-  ret = sem_getvalue(>sem, );
+  ret = nxsem_get_value(>sem, );
   if (ret != OK)
 {
   leave_critical_section(flags);
-  return get_errno();
+  return -ret;
 }
 
   /* If the number of waiters would be equal to the count, then we are done */
@@ -110,8 +110,8 @@ int pthread_barrier_wait(FAR pthread_barrier_t *barrier)
 
   while (semcount < 0)
 {
-  sem_post(>sem);
-  sem_getvalue(>sem, );
+  nxsem_post(>sem);
+  nxsem_get_value(>sem, );
 }
 
   /* Then return PTHREAD_BARRIER_SERIAL_THREAD to the final thread */
@@ -119,32 +119,28 @@ int pthread_barrier_wait(FAR pthread_barrier_t *barrier)
   leave_critical_section(flags);
   return PTHREAD_BARRIER_SERIAL_THREAD;
 }
-  else
+
+  /* Otherwise, this thread must wait as well */
+
+  while ((ret = nxsem_wait(>sem)) != OK)
 {
-  /* Otherwise, this thread must wait as well */
+  /* If the thread is awakened by a signal, just continue to wait */
 
-  while (sem_wait(>sem) != OK)
+  if (ret != -EINTR)
 {
-  /* If the thread is awakened by a signal, just continue to wait */
-
-  int errornumber = get_errno();
-  if (errornumber != EINTR)
-{
-  /* If it is awakened by some other error, then there is a
-   * problem
-   */
-
-  leave_critical_section(flags);
-  return errornumber;
-}
+  /* If it is awakened by some other error, then there is a
+   * problem
+   */
+
+  break;
 }
+}
 
-  /* We will only get here when we are one of the N-1 threads that were
-   * waiting for the final thread at the barrier.  We just need to return
-   * zero.
-   */
+  /* We will only get here when we are one of the N-1 threads that were
+   * waiting for the final thread at the barrier.  We just need to return
+   * zero.
+   */
 
-  leave_critical_section(flags);
-  return 0;
-}
+  leave_critical_section(flags);
+  return -ret;
 }



Re: [PR] sched/pthread/barrierwait: replace syscall(2) to kernel api [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11017:
URL: https://github.com/apache/nuttx/pull/11017


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated: Documentation: Add entry for sd_stress tool.

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

xiaoxiang 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 c19c943835 Documentation: Add entry for sd_stress tool.
c19c943835 is described below

commit c19c943835fcc54424c09f3ff5ffb18b9342eee5
Author: Stuart Ianna 
AuthorDate: Wed Oct 25 11:12:07 2023 +1100

Documentation: Add entry for sd_stress tool.
---
 .../applications/testing/sd_stress/index.rst   | 42 ++
 1 file changed, 42 insertions(+)

diff --git a/Documentation/applications/testing/sd_stress/index.rst 
b/Documentation/applications/testing/sd_stress/index.rst
new file mode 100644
index 00..81f16ed1d6
--- /dev/null
+++ b/Documentation/applications/testing/sd_stress/index.rst
@@ -0,0 +1,42 @@
+
+``sd_stress`` SD card or mount point stress test
+
+
+Performs stress testing on SD card or other mount points using the file system 
layer.
+
+A single test run.
+
+- Creates a staging directory
+- Creates multiple files in this directory. Writing, reading and verifying a 
set of bytes from each one.
+- Renames the staging directory.
+- Remove the created files from the renamed directory.
+- Remove the renamed directory.
+
+The following runtime options are available::
+
+  nsh> sdstress -h
+  Stress test on a mount point
+  sdstress: [-r] [-b] [-f]
+-r   Number of runs (1-1), default 32
+-b   Number of bytes (1-1), default 4096
+-f   Number of files (1-999), default 64
+
+
+An example of a completed test::
+
+  nsh> sdstress -b 4096 -f 32 -r 5
+  Start stress test with 32 files, 4096 bytes and 5 iterations.
+  iteration 0 took 4063.445 ms: OK
+  iteration 1 took 4158.073 ms: OK
+  iteration 2 took 4216.130 ms: OK
+  iteration 3 took 4295.138 ms: OK
+  iteration 4 took 4352.903 ms: OK
+  Test OK: Average time: 4217.138 ms
+
+The following Kconfig options can be used to configure the application at 
compile time.
+
+- ``CONFIG_TESTING_SD_STRESS`` - Enable the stress test utility.
+- ``CONFIG_TESTING_SD_STRESS_PROGNAME`` - The name of the program registered 
with nsh.
+- ``CONFIG_TESTING_SD_STRESS_PRIORITY`` - The priority of the task.
+- ``CONFIG_TESTING_SD_STRESS_STACKSIZE`` - The stacksize of the task.
+- ``CONFIG_TESTING_SD_STRESS_STACKSIZE`` - The mountpoint of the filesystem to 
test.



Re: [PR] Documentation: Add entry for sd_stress tool. [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11023:
URL: https://github.com/apache/nuttx/pull/11023


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] testing/sd_stress: Port sdstress testing utility from PX4-Autopilot. [nuttx-apps]

2023-10-24 Thread via GitHub


xiaoxiang781216 commented on code in PR #2150:
URL: https://github.com/apache/nuttx-apps/pull/2150#discussion_r1370988332


##
testing/sd_stress/sd_stress_main.c:
##
@@ -0,0 +1,404 @@
+/
+ * apps/testing/sd_stress/sd_stress_main.c
+ *
+ * Original Licence:
+ *
+ *   Copyright (c) 2016-2021 PX4 Development Team. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ *used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ /
+
+/* Originally ported from PX4 https://github.com/PX4/PX4-Autopilot,
+ * with the following additions:
+ *
+ * - The number of files can be specified from the command line.
+ * - Bytes are written and read back from created files to verify integrity.
+ * - The bytes written are obtained from a static set,
+ *   rather than a constant 0xAA
+ * - The results are reported as a floating point, millisecond value.
+ */
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static const size_t MAX_PATH_LEN = 52;
+
+static const char *TEMPDIR = CONFIG_TESTING_SD_STRESS_DEVICE"/stress";
+static const char *TEMPDIR2 = CONFIG_TESTING_SD_STRESS_DEVICE"/moved";
+static const char *TEMPFILE = "tmp";
+
+const size_t max_runs = 1;
+const size_t min_runs = 1;
+const size_t default_runs = 32;
+
+const size_t max_bytes = 1;
+const size_t min_bytes = 1;
+const size_t default_bytes = 4096;
+
+const size_t max_files = 999;
+const size_t min_files = 1;
+const size_t default_files = 64;
+
+/
+ * Private Functions
+ /
+
+static void usage(void)
+{
+  printf("Stress test on a mount point\n");
+  printf(CONFIG_TESTING_SD_STRESS_PROGNAME ": [-r] [-b] [-f]\n");
+  printf("  -r   Number of runs (%u-%u), default %u\n",
+  min_runs, max_runs, default_runs);
+  printf("  -b   Number of bytes (%u-%u), default %u\n",
+  min_bytes, max_bytes, default_bytes);
+  printf("  -f   Number of files (%u-%u), default %u\n",
+  min_files, max_files, default_files);
+}
+
+static bool create_dir(const char *path)
+{
+  int ret = mkdir(TEMPDIR, S_IRWXU | S_IRWXG | S_IRWXO);
+
+  if (ret < 0)
+{
+  printf("mkdir %s failed, ret: %d, errno: %d -> %s\n",
+ path, ret, errno, strerror(errno));
+  return false;
+}
+
+  return true;
+}
+
+static bool remove_dir(const char *path)
+{
+  int ret = rmdir(TEMPDIR2);
+
+  if (ret < 0)
+{
+  printf("rmdir %s failed, ret: %d, errno: %d -> %s\n",
+ path, ret, errno, strerror(errno));
+  return false;
+}
+
+  return true;
+}
+
+static bool create_files(const char *dir, const char *name,
+ size_t num_files, char *bytes, size_t num_bytes)
+{
+  bool passed = true;
+  if (num_files > 999)
+{
+  printf("too many files\n");
+  return false;
+}
+
+  char *read_bytes = (char *)malloc(num_bytes);
+
+  if (!read_bytes)
+{
+  printf("malloc failed for read bytes bufffer\n");
+  return false;
+}
+
+  size_t path_len = strlen(dir) + strlen(name);
+
+  if 

Re: [PR] testing/sd_stress: Port sdstress testing utility from PX4-Autopilot. [nuttx-apps]

2023-10-24 Thread via GitHub


g2gps commented on PR #2150:
URL: https://github.com/apache/nuttx-apps/pull/2150#issuecomment-1778273037

   > @g2gps please add an entry in the doc about this new tool 
https://github.com/apache/nuttx/blob/master/Documentation/applications/testing/index.rst
   
   Documentation entry added in https://github.com/apache/nuttx/pull/11023


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Documentation: Add entry for sd_stress tool. [nuttx]

2023-10-24 Thread via GitHub


g2gps opened a new pull request, #11023:
URL: https://github.com/apache/nuttx/pull/11023

   ## Summary
   
   Adds documentation for new testing utility. See 
https://github.com/apache/nuttx-apps/pull/2150
   
   ## Impact
   
   Documentation.
   
   ## Testing
   
   Building documentation locally.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Documentation: Add entry for sd_stress tool. [nuttx]

2023-10-24 Thread via GitHub


g2gps closed pull request #11022: Documentation: Add entry for sd_stress tool.
URL: https://github.com/apache/nuttx/pull/11022


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Documentation: Add entry for sd_stress tool. [nuttx]

2023-10-24 Thread via GitHub


g2gps opened a new pull request, #11022:
URL: https://github.com/apache/nuttx/pull/11022

   ## Summary
   
   Adds documentation entry for sd_stress. See 
https://github.com/apache/nuttx-apps/pull/2150
   
   ## Impact
   -
   
   ## Testing
-
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1370809227


##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -1373,6 +1373,7 @@ static inline void imxrt_serialout(struct imxrt_uart_s 
*priv,
 static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
 {
   int dmaresidual = imxrt_dmach_getcount(priv->rxdma);
+  DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE);

Review Comment:
   I've tested by adding a DEBUGASSERT and can confirm that it is possible to 
get 0 for `dmaresidual`. It took awhile though, at _least_ 500 seconds, 
probably closer to a 1000 (I wasn't present after 500s but my debugger caught 
the reset exception).  Please add the conditional that I did in my branch to 
all affected files: https://github.com/apache/nuttx/pull/10911/files
   
   Edit: assertion occured a second time at 900 seconds



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


hartmannathan commented on PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#issuecomment-1778126328

   Under "Impact" where it says "There is dropped data at high baud rates" do 
you mean that this change _fixes_ the dropped data at high baud rates, or do 
you mean that data is continues to be dropped at high baud rates despite the 
fix? (Not saying that the latter should block merging; in fact, it's probably 
better to merge a change that improves things, even if not perfect yet.) Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1370809227


##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -1373,6 +1373,7 @@ static inline void imxrt_serialout(struct imxrt_uart_s 
*priv,
 static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
 {
   int dmaresidual = imxrt_dmach_getcount(priv->rxdma);
+  DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE);

Review Comment:
   I've tested by adding a DEBUGASSERT and can confirm that it is possible to 
get 0 for `dmaresidual`. It took awhile though, at _least_ 500 seconds, 
probably closer to a 1000 (I wasn't present after 500s but my debugger caught 
the reset exception).  Please add the conditional that I did in my branch to 
all affected files: https://github.com/apache/nuttx/pull/10911/files



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1370757990


##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -1373,6 +1373,7 @@ static inline void imxrt_serialout(struct imxrt_uart_s 
*priv,
 static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
 {
   int dmaresidual = imxrt_dmach_getcount(priv->rxdma);
+  DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE);

Review Comment:
   I like this DEBUGASSERT but I would like to change it to 
`DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE && dmaresidual > 0`). I could 
have sworn `imxrt_dmach_getcount()` returned 0 before; I will test again today 
and let you know. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1370757990


##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -1373,6 +1373,7 @@ static inline void imxrt_serialout(struct imxrt_uart_s 
*priv,
 static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
 {
   int dmaresidual = imxrt_dmach_getcount(priv->rxdma);
+  DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE);

Review Comment:
   I like this DEBUGASSERT but I would like to change it to include 
`DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE && dmaresidual >= 0`). I could 
have sworn `imxrt_dmach_getcount()` returned 0 before; I will test again today 
and let you know. 



##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -1373,6 +1373,7 @@ static inline void imxrt_serialout(struct imxrt_uart_s 
*priv,
 static int imxrt_dma_nextrx(struct imxrt_uart_s *priv)
 {
   int dmaresidual = imxrt_dmach_getcount(priv->rxdma);
+  DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE);

Review Comment:
   I like this DEBUGASSERT but I would like to change it to include 
`DEBUGASSERT(dmaresidual <= RXDMA_BUFFER_SIZE && dmaresidual > 0`). I could 
have sworn `imxrt_dmach_getcount()` returned 0 before; I will test again today 
and let you know. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc closed pull request #10911: imxrt:serial rxdma reporting 
incorrect characters
URL: https://github.com/apache/nuttx/pull/10911


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1777950659

   > So strike this. See 
https://github.com/apache/nuttx/issues/10912#issuecomment-1777212451
   
   > You might want to rebase on master after 
https://github.com/apache/nuttx/pull/11020 comes in and bring in all the other 
bits not related to serial or DMA
   
   Per david, he has found the cause to the issue and is fixing in his PR. See 
https://github.com/apache/nuttx/pull/10911#issuecomment-1777940825 for what I 
will add in followup PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1777940825

   
   > So strike this. See [#10912 
(comment)](https://github.com/apache/nuttx/issues/10912#issuecomment-1777212451)
   > 
   > You might want to rebase on master after #11020 comes in and bring in all 
the other bits not related to serial or DMA
   
   Thanks david, I will close this PR and create a new one for the leftover 
changes. This will be:
   - typos
   - adding `IMXRT_SERIAL_RXDMA_BUFFER_SIZE` as a kconfig
   - add missing `uintptr_t base;` declaration to 
`arch/arm/src/imxrt/imxrt_edma.c` so compiling with `CONFIG_DEBUG_DMA=y` works
   - enabling `LPUART_CTRL_ORIE` for overruns in 
`arch/arm/src/imxrt/imxrt_serial.c`. It's an error condition just like the 
noise, framing, and parity error interrupts we have enabled and we are already 
explicitly clearing it in 
[here](https://github.com/apache/nuttx/blob/master/arch/arm/src/imxrt/imxrt_serial.c#L1792)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


danielappiagyei-bc commented on PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#issuecomment-1777918843

   excellent findings david, im sure this took a lot of hardcore debugging! 
thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] readme: Updating README [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 commented on PR #10980:
URL: https://github.com/apache/nuttx/pull/10980#issuecomment-1777901299

   > > @fdcavalcanti should we move the original README.md to the related 
documentation section?
   > 
   > @xiaoxiang781216 Do you mean something like 
`nuttx/Documentation/legacy_README.md`? Maybe an actual page?
   
   Yes, a new page or exist page
   
   > I mean, its all versioned anyway. Not sure what is available on the README 
that can't be found on the actual documentation.
   
   I don't think so, could you point out Documentation which contain the 
similar information in README.md?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] readme: Updating README [nuttx]

2023-10-24 Thread via GitHub


fdcavalcanti commented on PR #10980:
URL: https://github.com/apache/nuttx/pull/10980#issuecomment-133999

   > @fdcavalcanti should we move the original README.md to the related 
documentation section?
   Do you mean something like `nuttx/Documentation/legacy_README.md`? Maybe an 
actual page?
   I mean, its all versioned anyway. Not sure what is available on the README 
that can't be found on the actual documentation.
   
   > I think we can include a field about the license for example:
   > 
   > ```
   > ## License
   > The code in this repository is all under either the Apache 2 license, or a
   > license compatible with the Apache 2 license.  See the  [LICENSE 
file](https://nuttx.apache.org/docs/latest/introduction/licensing.html) for more
   > information.
   > ```
   I think we can improve this text. Maybe more details regarding other 
licenses that we see on menuconfig? Updated with this text for now.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] readme: Updating README [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 commented on PR #10980:
URL: https://github.com/apache/nuttx/pull/10980#issuecomment-1777684348

   @fdcavalcanti should we move the original README.md to the related 
documentation section?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated: net/local: Support `SO_SNDBUF` option in `getsockopt`

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

xiaoxiang 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 9ef2a48919 net/local: Support `SO_SNDBUF` option in `getsockopt`
9ef2a48919 is described below

commit 9ef2a489191a0cb665085a6f7fb79ed96ebb0a1f
Author: Zhe Weng 
AuthorDate: Tue Oct 24 17:41:14 2023 +0800

net/local: Support `SO_SNDBUF` option in `getsockopt`

For datagram unix sockets, the `SO_SNDBUF` value imposes an upper limit on 
the size of outgoing datagrams.

Note: We don't support to change the buffer size yet, so only add support 
to getsockopt now.
Refs: https://man7.org/linux/man-pages/man7/unix.7.html

Signed-off-by: Zhe Weng 
---
 net/local/local.h|  2 ++
 net/local/local_sendpacket.c |  2 +-
 net/local/local_sockif.c | 35 ++-
 3 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/net/local/local.h b/net/local/local.h
index 8804c783e1..411d45b8f9 100644
--- a/net/local/local.h
+++ b/net/local/local.h
@@ -49,6 +49,8 @@
 #define LOCAL_NPOLLWAITERS 2
 #define LOCAL_NCONTROLFDS  4
 
+#define LOCAL_SEND_LIMIT   (CONFIG_DEV_FIFO_SIZE - sizeof(uint16_t))
+
 /
  * Public Type Definitions
  /
diff --git a/net/local/local_sendpacket.c b/net/local/local_sendpacket.c
index f941dc0de0..a922a05520 100644
--- a/net/local/local_sendpacket.c
+++ b/net/local/local_sendpacket.c
@@ -130,7 +130,7 @@ int local_send_packet(FAR struct file *filep, FAR const 
struct iovec *buf,
   len16 += iov->iov_len;
 }
 
-  if (len16 > CONFIG_DEV_FIFO_SIZE - sizeof(uint16_t))
+  if (len16 > LOCAL_SEND_LIMIT)
 {
   nerr("ERROR: Packet is too big: %d\n", len16);
   return -EMSGSIZE;
diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c
index 77b5abb55e..93035ee0ab 100644
--- a/net/local/local_sockif.c
+++ b/net/local/local_sockif.c
@@ -562,20 +562,37 @@ static int local_getsockopt(FAR struct socket *psock, int 
level, int option,
 {
   DEBUGASSERT(psock->s_domain == PF_LOCAL);
 
-#ifdef CONFIG_NET_LOCAL_SCM
-  if (level == SOL_SOCKET && option == SO_PEERCRED)
+  if (level == SOL_SOCKET)
 {
-  FAR struct local_conn_s *conn = psock->s_conn;
-  if (*value_len != sizeof(struct ucred))
+  switch (option)
 {
-  return -EINVAL;
-}
+#ifdef CONFIG_NET_LOCAL_SCM
+  case SO_PEERCRED:
+{
+  FAR struct local_conn_s *conn = psock->s_conn;
+  if (*value_len != sizeof(struct ucred))
+{
+  return -EINVAL;
+}
 
-  memcpy(value, >lc_peer->lc_cred, sizeof(struct ucred));
-  return OK;
-}
+  memcpy(value, >lc_peer->lc_cred, sizeof(struct ucred));
+  return OK;
+}
 #endif
 
+  case SO_SNDBUF:
+{
+  if (*value_len != sizeof(int))
+{
+  return -EINVAL;
+}
+
+  *(FAR int *)value = LOCAL_SEND_LIMIT;
+  return OK;
+}
+}
+}
+
   return -ENOPROTOOPT;
 }
 



[nuttx] 02/02: tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed

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

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

commit 5374af077bf22dd00fedfb8f621d214202c09960
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 | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3f00b0b365..bd7e01567a 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -775,14 +775,21 @@ 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;
+  irqstate_t flags;
+
+  flags = enter_critical_section(); /* No interrupts */
 
-  /* Schedule to perform the TX poll on the worker thread. */
+  /* Schedule to perform the TX poll on the worker thread when priv->bifup
+   * is true.
+   */
 
-  if (work_available(>work))
+  if (priv->bifup && work_available(>work))
 {
   work_queue(TUNWORK, >work, tun_txavail_work, priv, 0);
 }
 
+  leave_critical_section(flags);
+
   return OK;
 }
 
@@ -911,6 +918,8 @@ static void tun_dev_uninit(FAR struct tun_device_s *priv)
 
   tun_ifdown(>dev);
 
+  work_cancel_sync(TUNWORK, >work);
+
   /* Remove the device from the OS */
 
   netdev_unregister(>dev);



[nuttx] 01/02: Revert "tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed"

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

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

commit 3b469271d73197f473c559589c8d2b0341892c8e
Author: zhanghongyu 
AuthorDate: Tue Oct 24 15:20:33 2023 +0800

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

This reverts commit 0f1a49bba57691946e30f7bf4847b5788b5d41f9.

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

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index e40017adf6..3f00b0b365 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 int tun_dev_uninit(FAR struct tun_device_s *priv);
+static void tun_dev_uninit(FAR struct tun_device_s *priv);
 
 /* File interface */
 
@@ -775,22 +775,14 @@ 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 (priv->bifup && work_available(>work))
+  if (work_available(>work))
 {
   work_queue(TUNWORK, >work, tun_txavail_work, priv, 0);
 }
 
-  nxmutex_unlock(>lock);
-
   return OK;
 }
 
@@ -913,27 +905,12 @@ static int tun_dev_init(FAR struct tun_device_s *priv,
  * Name: tun_dev_uninit
  /
 
-static int tun_dev_uninit(FAR struct tun_device_s *priv)
+static void 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);
@@ -941,8 +918,6 @@ static int tun_dev_uninit(FAR struct tun_device_s *priv)
   nxmutex_destroy(>lock);
   nxsem_destroy(>read_wait_sem);
   nxsem_destroy(>write_wait_sem);
-
-  return ret;
 }
 
 /
@@ -966,11 +941,8 @@ static int tun_close(FAR struct file *filep)
   ret  = nxmutex_lock(>lock);
   if (ret >= 0)
 {
-  ret = tun_dev_uninit(priv);
-  if (ret >= 0)
-{
-  tun->free_tuns |= (1 << intf);
-}
+  tun->free_tuns |= (1 << intf);
+  tun_dev_uninit(priv);
 
   nxmutex_unlock(>lock);
 }



Re: [PR] tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11009:
URL: https://github.com/apache/nuttx/pull/11009


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated (8cb65d9b3b -> 5374af077b)

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

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


from 8cb65d9b3b s32k1xx:lpi2c end only on stop with end of packet
 new 3b469271d7 Revert "tun: Fix the error of calling tun_close when 
tun_txavail or tun_txavail_work is executed"
 new 5374af077b tun: Fix the error of calling tun_close when tun_txavail or 
tun_txavail_work is executed

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/net/tun.c | 41 +++--
 1 file changed, 11 insertions(+), 30 deletions(-)



Re: [PR] net/local: Support `SO_SNDBUF` option in `getsockopt` [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11015:
URL: https://github.com/apache/nuttx/pull/11015


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


davids5 commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1370532073


##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -2345,14 +2346,26 @@ static bool imxrt_rxflowcontrol(struct uart_dev_s *dev,
 #ifdef SERIAL_HAVE_RXDMA
 static int imxrt_dma_receive(struct uart_dev_s *dev, unsigned int *status)
 {
-  struct imxrt_uart_s *priv = (struct imxrt_uart_s *)dev;
-  uint32_t nextrx = imxrt_dma_nextrx(priv);
-  int c = 0;
+  struct imxrt_uart_s *priv   = (struct imxrt_uart_s *)dev;
+  static uint32_t last_nextrx = -1;
+  uint32_t nextrx = imxrt_dma_nextrx(priv);
+  int c   = 0;
 
   /* Check if more data is available */
 
   if (nextrx != priv->rxdmanext)
 {
+  /* Now we must ensure the cache is updated if the DMA has
+   * updated again.
+   */
+
+  if (last_nextrx != nextrx)
+{
+  up_invalidate_dcache((uintptr_t)priv->rxfifo,
+   (uintptr_t)priv->rxfifo + RXDMA_BUFFER_SIZE);
+  last_nextrx = nextrx;
+}

Review Comment:
   Yes. We always have: The Rx is used in circular mode. Looping the data in 
the the "fifo".  If you invalidate in the callback only that is not enough.  
The above code detect that the DMA moved and re-invalidates. It saves about 
14/15 invalidates.
   
   I think we need this fix across all the arches that use this  "rxfifo" and 
have a dcache  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] libc: add support for memory buffer stream with fmemopen() [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 commented on code in PR #11011:
URL: https://github.com/apache/nuttx/pull/11011#discussion_r1370496054


##
libs/libc/stdio/lib_fmemopen.c:
##
@@ -0,0 +1,291 @@
+/
+ * libs/libc/stdio/lib_fmemopen.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 "libc.h"
+
+/
+ * Private Types
+ /
+
+struct fmemopen_cookie_s
+{
+  FAR char *buf;/* Memory buffer */
+  off_t pos;/* Current position in the buffer */
+  off_t end;/* End buffer position */
+  size_t size;  /* Buffer size */
+  bool custom;  /* True if custom buffer is used */
+};
+
+/
+ * Private Functions
+ /
+
+/
+ * Name: fmemopen_read
+ /
+
+static ssize_t fmemopen_read(FAR void *c, FAR char *buf, size_t size)
+{
+  FAR struct fmemopen_cookie_s *fmemopen_cookie =
+(FAR struct fmemopen_cookie_s *)c;
+  if (fmemopen_cookie->pos + size > fmemopen_cookie->end)
+{
+  size = fmemopen_cookie->end - fmemopen_cookie->pos;
+}
+
+  if (size < 0)

Review Comment:
   impossible



##
libs/libc/stdio/lib_fmemopen.c:
##
@@ -0,0 +1,291 @@
+/
+ * libs/libc/stdio/lib_fmemopen.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 "libc.h"
+
+/
+ * Private Types
+ /
+
+struct fmemopen_cookie_s
+{
+  FAR char *buf;/* Memory buffer */
+  off_t pos;/* Current position in the buffer */
+  off_t end;/* End buffer position */
+  size_t size;  /* Buffer size */
+  bool custom;  /* True if custom buffer is used */
+};
+
+/
+ * Private Functions
+ /
+
+/
+ * Name: fmemopen_read
+ /
+
+static ssize_t fmemopen_read(FAR void *c, FAR char *buf, size_t size)
+{
+  FAR struct fmemopen_cookie_s 

Re: [PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


pkarashchenko commented on code in PR #11020:
URL: https://github.com/apache/nuttx/pull/11020#discussion_r1370501788


##
arch/arm/src/imxrt/imxrt_serial.c:
##
@@ -2345,14 +2346,26 @@ static bool imxrt_rxflowcontrol(struct uart_dev_s *dev,
 #ifdef SERIAL_HAVE_RXDMA
 static int imxrt_dma_receive(struct uart_dev_s *dev, unsigned int *status)
 {
-  struct imxrt_uart_s *priv = (struct imxrt_uart_s *)dev;
-  uint32_t nextrx = imxrt_dma_nextrx(priv);
-  int c = 0;
+  struct imxrt_uart_s *priv   = (struct imxrt_uart_s *)dev;
+  static uint32_t last_nextrx = -1;
+  uint32_t nextrx = imxrt_dma_nextrx(priv);
+  int c   = 0;
 
   /* Check if more data is available */
 
   if (nextrx != priv->rxdmanext)
 {
+  /* Now we must ensure the cache is updated if the DMA has
+   * updated again.
+   */
+
+  if (last_nextrx != nextrx)
+{
+  up_invalidate_dcache((uintptr_t)priv->rxfifo,
+   (uintptr_t)priv->rxfifo + RXDMA_BUFFER_SIZE);
+  last_nextrx = nextrx;
+}

Review Comment:
   So we simply can do a read while DMA is running? Is that correct?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx-apps] branch master updated: testing: add fmemopen function test tool

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

xiaoxiang 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 d3508b6ac testing: add fmemopen function test tool
d3508b6ac is described below

commit d3508b6acd5a68bee4e0af4bc7b9591f7656bbe3
Author: Michal Lenc 
AuthorDate: Mon Oct 23 15:49:42 2023 +0200

testing: add fmemopen function test tool

Test tool application for fmemopen for CI testing. Performs basic
read/write/seek/append operations.

Signed-off-by: Michal Lenc 
---
 testing/fmemopen/Kconfig|  13 ++
 testing/fmemopen/Make.defs  |  23 +++
 testing/fmemopen/Makefile   |  32 +
 testing/fmemopen/fmemopen.c | 343 
 4 files changed, 411 insertions(+)

diff --git a/testing/fmemopen/Kconfig b/testing/fmemopen/Kconfig
new file mode 100644
index 0..1c17ffea2
--- /dev/null
+++ b/testing/fmemopen/Kconfig
@@ -0,0 +1,13 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config TESTING_FMEMOPEN_TEST
+   tristate "Fmemopen test tool"
+   default n
+   ---help---
+   Performs a basic operations with fmemopen call.
+
+if TESTING_FMEMOPEN_TEST
+endif
diff --git a/testing/fmemopen/Make.defs b/testing/fmemopen/Make.defs
new file mode 100644
index 0..03c3981fe
--- /dev/null
+++ b/testing/fmemopen/Make.defs
@@ -0,0 +1,23 @@
+
+# apps/testing/fmemopen/Make.defs
+#
+# 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.
+#
+
+
+ifneq ($(CONFIG_TESTING_FMEMOPEN_TEST),)
+CONFIGURED_APPS += $(APPDIR)/testing/fmemopen
+endif
diff --git a/testing/fmemopen/Makefile b/testing/fmemopen/Makefile
new file mode 100644
index 0..4b712aef1
--- /dev/null
+++ b/testing/fmemopen/Makefile
@@ -0,0 +1,32 @@
+
+# apps/testing/fmemopen/Makefile
+#
+# 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.
+#
+
+
+include $(APPDIR)/Make.defs
+
+# SMART filesystem test tool
+
+PROGNAME = fmemopen_test
+PRIORITY = SCHED_PRIORITY_DEFAULT
+STACKSIZE = 4096
+MODULE = $(CONFIG_TESTING_FMEMOPEN_TEST)
+
+MAINSRC = fmemopen.c
+
+include $(APPDIR)/Application.mk
diff --git a/testing/fmemopen/fmemopen.c b/testing/fmemopen/fmemopen.c
new file mode 100644
index 0..909fa6b50
--- /dev/null
+++ b/testing/fmemopen/fmemopen.c
@@ -0,0 +1,343 @@
+/
+ * apps/testing/fmemopen/fmemopen.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 

Re: [I] imxrt/lpi2c multibyte read broken following DMA addition [nuttx]

2023-10-24 Thread via GitHub


pkarashchenko closed issue #10853: imxrt/lpi2c multibyte read broken following 
DMA addition
URL: https://github.com/apache/nuttx/issues/10853


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] testing: add fmemopen function test tool [nuttx-apps]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #2155:
URL: https://github.com/apache/nuttx-apps/pull/2155


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] NXP I2C non-DMA end only on stop with end of packet [nuttx]

2023-10-24 Thread via GitHub


pkarashchenko merged PR #11012:
URL: https://github.com/apache/nuttx/pull/11012


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated (962d46186d -> 8cb65d9b3b)

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

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


from 962d46186d Documentation/netutils: ignore header for TOC
 add 119bf660a4 imxrt:lpi2c end only on stop with end of packet
 add b2b5826b80 s32k3xx:lpi2c end only on stop with end of packet
 add 8cb65d9b3b s32k1xx:lpi2c end only on stop with end of packet

No new revisions were added by this update.

Summary of changes:
 arch/arm/src/imxrt/imxrt_lpi2c.c | 36 ++--
 arch/arm/src/s32k1xx/s32k1xx_lpi2c.c | 36 ++--
 arch/arm/src/s32k3xx/s32k3xx_lpi2c.c | 36 ++--
 3 files changed, 66 insertions(+), 42 deletions(-)



[nuttx] branch master updated (0616796185 -> 962d46186d)

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

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


from 0616796185 esp32-devkitc/ble: Enable SMP for BLE defconfig
 add d1ebe6cd24 Documentation: add dummy apps descriptions
 add 962d46186d Documentation/netutils: ignore header for TOC

No new revisions were added by this update.

Summary of changes:
 .../applications/audioutils/fmsynt/index.rst   |  4 ++
 Documentation/applications/audioutils/index.rst|  3 --
 .../applications/audioutils/nxaudio/index.rst  |  3 ++
 .../applications/benchmarks/coremark/index.rst |  3 ++
 Documentation/applications/benchmarks/index.rst|  8 +++-
 .../applications/canutils/candump/index.rst|  3 ++
 .../applications/canutils/canlib/index.rst |  3 ++
 .../applications/canutils/cansend/index.rst|  3 ++
 Documentation/applications/canutils/index.rst  | 16 +++
 .../applications/canutils/lely-canopen/index.rst   |  3 ++
 .../applications/canutils/libcanutils/index.rst|  3 ++
 .../applications/canutils/libdronecan/index.rst|  3 ++
 .../applications/canutils/libobd2/index.rst|  3 ++
 .../applications/canutils/libopecyphal/index.rst   |  3 ++
 .../applications/canutils/slcan/index.rst  |  3 ++
 .../applications/crypto/controlse/index.rst|  3 ++
 Documentation/applications/crypto/index.rst|  8 
 .../applications/crypto/libsodium/index.rst|  3 ++
 .../applications/crypto/libtomcrypt/index.rst  |  3 ++
 .../applications/crypto/mbedtls/index.rst  |  3 ++
 .../applications/crypto/tinycrypt/index.rst|  3 ++
 .../applications/crypto/tinydtls/index.rst |  3 ++
 .../applications/fsutils/flash_eraseall/index.rst  |  3 ++
 Documentation/applications/fsutils/index.rst   | 10 -
 Documentation/applications/fsutils/inih/index.rst  |  3 ++
 Documentation/applications/fsutils/ipcfg/index.rst |  3 ++
 .../applications/fsutils/libtinycbor/index.rst |  3 ++
 .../applications/fsutils/mkfatfs/index.rst |  3 ++
 Documentation/applications/fsutils/mkgpt/index.rst |  3 ++
 Documentation/applications/fsutils/mkmbr/index.rst |  3 ++
 .../applications/fsutils/mksmartfs/index.rst   |  3 ++
 .../applications/fsutils/passwd/index.rst  |  3 ++
 .../applications/games/brickmatch/index.rst|  6 +--
 .../applications/graphics/ft80x/index.rst  |  3 ++
 Documentation/applications/graphics/index.rst  |  7 ---
 .../applications/graphics/libjpeg/index.rst|  3 ++
 .../applications/graphics/libyuv/index.rst |  3 ++
 .../applications/graphics/screenshot/index.rst |  3 ++
 Documentation/applications/graphics/slcd/index.rst |  3 ++
 Documentation/applications/industry/foc/index.rst  |  3 ++
 Documentation/applications/industry/index.rst  |  4 --
 Documentation/applications/industry/scpi/index.rst |  3 ++
 Documentation/applications/inertial/index.rst  |  8 +++-
 .../applications/inertial/madgwick/index.rst   |  3 ++
 .../applications/interpreters/duktape/index.rst|  3 ++
 Documentation/applications/interpreters/index.rst  |  8 
 .../applications/interpreters/lua/index.rst|  8 
 .../applications/interpreters/luajit/index.rst |  3 ++
 .../applications/interpreters/quickjs/index.rst|  3 ++
 .../applications/interpreters/toywasm/index.rst|  3 ++
 .../applications/interpreters/wamr/index.rst   |  3 ++
 .../applications/interpreters/wasm3/index.rst  |  3 ++
 Documentation/applications/lte/alt1250/index.rst   |  3 ++
 Documentation/applications/lte/index.rst   |  9 +++-
 Documentation/applications/lte/lapi/index.rst  |  3 ++
 Documentation/applications/math/index.rst  |  8 +++-
 .../applications/math/libtommath/index.rst |  3 ++
 .../applications/mlearing/cmsis/index.rst  |  3 ++
 .../applications/mlearing/darknet/index.rst|  3 ++
 Documentation/applications/mlearing/index.rst  | 10 +++--
 .../applications/mlearing/libnnablart/index.rst|  3 ++
 Documentation/applications/netutils/chat/index.rst |  3 ++
 .../applications/netutils/codecs/index.rst |  4 ++
 .../applications/netutils/cwebsocket/index.rst |  3 ++
 .../applications/netutils/dhcp6c/index.rst |  3 ++
 Documentation/applications/netutils/index.rst  | 23 ++
 .../applications/netutils/iptables/index.rst   |  3 ++
 .../applications/netutils/libcurl4nx/index.rst |  3 ++
 .../applications/netutils/mqttc/index.rst  |  3 ++
 .../applications/netutils/netinit/index.rst|  3 ++
 .../applications/netutils/netlib/index.rst |  3 ++
 Documentation/applications/netutils/nng/index.rst  |  3 ++
 Documentation/applications/netutils/pppd/index.rst |  3 ++
 Documentation/applications/netutils/ptpd/index.rst |  3 ++
 .../applications/netutils/rexec/index.rst  |  3 ++
 

Re: [PR] Documentation: list all apps in table of content [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11019:
URL: https://github.com/apache/nuttx/pull/11019


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] NXP I2C non-DMA end only on stop with end of packet [nuttx]

2023-10-24 Thread via GitHub


davids5 commented on PR #11012:
URL: https://github.com/apache/nuttx/pull/11012#issuecomment-1777589857

   Merge Please


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] imxrt:serial rxdma reporting incorrect characters [nuttx]

2023-10-24 Thread via GitHub


davids5 commented on PR #10911:
URL: https://github.com/apache/nuttx/pull/10911#issuecomment-1777584962

   > > > @danielappiagyei-bc Great! - The residual change needs to be applied 
the S32K, and K66
   > > 
   > > 
   > > Hi @davids5 , I've now applied these changes to the S32K devices but 
couldn't find a "k66", could you point me to the file? Also I didn't enable an 
interrupt for overruns on these S32K devices, would you like me to? Thanks
   > 
   > Sorry I called it by name not family 
https://github.com/apache/nuttx/blob/master/arch/arm/src/kinetis/kinetis_edma.c
   
   So strike this.  See 
https://github.com/apache/nuttx/issues/10912#issuecomment-1777212451
   
   You might want to rebase on master after 
https://github.com/apache/nuttx/pull/11020 comes in and bring in all the other 
bits not related to serial or DMA


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] imxrt: serial dma rx occasionally reports incorrect byte [nuttx]

2023-10-24 Thread via GitHub


davids5 commented on issue #10912:
URL: https://github.com/apache/nuttx/issues/10912#issuecomment-1777579092

   @danielappiagyei-bc  This resolve the issue 
https://github.com/apache/nuttx/pull/11020


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] imxrt:serial Ensure the cache is updated if the DMA has updated again [nuttx]

2023-10-24 Thread via GitHub


davids5 opened a new pull request, #11020:
URL: https://github.com/apache/nuttx/pull/11020

   ## Summary
   
  The DMA can bring in more rx data, than the number of
  DMA completions call backs. The call backs happen on
  idle, 1/2 and full events. But in between these events
  the DMA can write more data to the buffers memory that
  need to be brought in to the cache. (invalidate)
   
  We do the invalidate on the reads from the fifo memory
  if the the DMA as commited since the last read.
   
   ## Impact
   
   There is dropped data at high baud rates.
   
   ## Testing
   
   imxrt1170 px4 nxp_fmurt1170-v1
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Documentation: list all apps in table of content [nuttx]

2023-10-24 Thread via GitHub


raiden00pl opened a new pull request, #11019:
URL: https://github.com/apache/nuttx/pull/11019

   ## Summary
   The last batch of commits regarding the apps documentation from me (I hope 
so):
   
   - Documentation: add dummy apps descriptions  
 The apps description is empty for now but allows to generate nice tables 
of content with all nuttx-apps functionalities.
   - Documentation/netutils: ignore header for TOC
   
   ## Impact
   Now all tools/libs/apps are listed in table of content as:
   ```
   * 
   **  
   ```
   
   https://github.com/apache/nuttx/assets/6563055/d928c779-e575-46e0-a5b5-467e07be6257;>
   
   Most of apps still lack a detailed description, but at least we have a 
standardized place where to put such a description :)
   
   
   ## Testing
   local
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] wireless/bluetooth: Add option to set the HCI TX thread affinity while running with SMP enabled [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 merged PR #11013:
URL: https://github.com/apache/nuttx/pull/11013


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] 03/03: esp32-devkitc/ble: Enable SMP for BLE defconfig

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

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

commit 061679618559c0b066585a65c20e45ad178daed9
Author: Tiago Medicci Serrano 
AuthorDate: Tue Oct 10 08:26:59 2023 -0300

esp32-devkitc/ble: Enable SMP for BLE defconfig

This defconfig also pins the HCI TX thread to the same core of the
BLE task.
---
 boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig 
b/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig
index aba8265a86..b09264fa44 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig
@@ -6,6 +6,7 @@
 # modifications.
 #
 # CONFIG_ARCH_LEDS is not set
+# CONFIG_NDEBUG is not set
 # CONFIG_NSH_ARGCAT is not set
 # CONFIG_NSH_CMDOPT_HEXDUMP is not set
 CONFIG_ALLOW_BSD_COMPONENTS=y
@@ -16,6 +17,7 @@ CONFIG_ARCH_BOARD_ESP32_DEVKITC=y
 CONFIG_ARCH_CHIP="esp32"
 CONFIG_ARCH_CHIP_ESP32=y
 CONFIG_ARCH_CHIP_ESP32WROVER=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
 CONFIG_ARCH_STACKDUMP=y
 CONFIG_ARCH_XTENSA=y
 CONFIG_BOARD_LOOPSPERMSEC=16717
@@ -49,7 +51,8 @@ CONFIG_RAM_SIZE=114688
 CONFIG_RAM_START=0x2000
 CONFIG_RR_INTERVAL=200
 CONFIG_SCHED_WAITPID=y
-CONFIG_SPINLOCK=y
+CONFIG_SMP=y
+CONFIG_SMP_NCPUS=2
 CONFIG_START_DAY=6
 CONFIG_START_MONTH=12
 CONFIG_START_YEAR=2011



[nuttx] branch master updated (ef1ad691c3 -> 0616796185)

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

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


from ef1ad691c3 net/icmpv6: Fix net mask logic in `icmpv6_setaddresses`
 new fe156a40e3 wireless/bluetooth: Add option to set the HCI TX thread 
affinity
 new 41c1b153e3 esp32/bluetooth: Select option to pin the HCI TX thread to 
CPU core
 new 0616796185 esp32-devkitc/ble: Enable SMP for BLE defconfig

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/xtensa/src/esp32/Kconfig  |  1 +
 .../esp32/esp32-devkitc/configs/ble/defconfig  |  5 +++-
 wireless/bluetooth/Kconfig | 19 +++
 wireless/bluetooth/bt_hcicore.c| 27 --
 4 files changed, 49 insertions(+), 3 deletions(-)



[nuttx] 01/03: wireless/bluetooth: Add option to set the HCI TX thread affinity

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

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

commit fe156a40e3012407768d24263676348610c7d4b6
Author: Tiago Medicci Serrano 
AuthorDate: Mon Oct 9 17:15:18 2023 -0300

wireless/bluetooth: Add option to set the HCI TX thread affinity

By enabling the config `CONFIG_BLUETOOTH_TXCMD_PINNED_TO_CORE` and
setting the value of `CONFIG_BLUETOOTH_TXCMD_CORE`, it's possible
to pin the HCI TX thread to a specific core on a SMP-enabled setup.
This is necessary for devices that require that the function that
sends data (`bt_send`) to be called from a specific core.
---
 wireless/bluetooth/Kconfig  | 19 +++
 wireless/bluetooth/bt_hcicore.c | 27 +--
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/wireless/bluetooth/Kconfig b/wireless/bluetooth/Kconfig
index d5c60c2dc5..fbe17788af 100644
--- a/wireless/bluetooth/Kconfig
+++ b/wireless/bluetooth/Kconfig
@@ -193,6 +193,25 @@ config BLUETOOTH_TXCONN_NMSGS
int "Tx connection thread mqueue size"
default 16
 
+config BLUETOOTH_TXCMD_PINNED_TO_CORE
+   bool "Pin Tx command thread to specific core"
+   depends on SMP
+   default n
+   ---help---
+   This option enables us to set the affinity of the Tx command 
thread
+   to make it run on a specific core.
+
+if BLUETOOTH_TXCMD_PINNED_TO_CORE
+
+config BLUETOOTH_TXCMD_CORE
+   int "Tx command thread CPU core"
+   default 1
+   range 1 SMP_NCPUS
+   ---help---
+   Select the core to pin the Tx command thread.
+
+endif # BLUETOOTH_TXCMD_PINNED_TO_CORE
+
 endmenu # Kernel Thread Configuration
 
 config BLUETOOTH_SMP_SELFTEST
diff --git a/wireless/bluetooth/bt_hcicore.c b/wireless/bluetooth/bt_hcicore.c
index 1d95f0ea1b..d7e192247e 100644
--- a/wireless/bluetooth/bt_hcicore.c
+++ b/wireless/bluetooth/bt_hcicore.c
@@ -1499,6 +1499,10 @@ static void cmd_queue_deinit(void)
 static void cmd_queue_init(void)
 {
   int ret;
+#ifdef CONFIG_BLUETOOTH_TXCMD_PINNED_TO_CORE
+  cpu_set_t cpuset;
+#endif
+  int pid;
 
   /* When there is a command to be sent to the Bluetooth driver, it queued on
* the Tx queue and received by logic on the Tx kernel thread.
@@ -1512,10 +1516,29 @@ static void cmd_queue_init(void)
 
   g_btdev.ncmd = 1;
   g_btdev.tx_status = OK;
-  ret = kthread_create("BT HCI Tx", CONFIG_BLUETOOTH_TXCMD_PRIORITY,
+
+#ifdef CONFIG_BLUETOOTH_TXCMD_PINNED_TO_CORE
+  sched_lock();
+#endif
+
+  pid = kthread_create("BT HCI Tx", CONFIG_BLUETOOTH_TXCMD_PRIORITY,
CONFIG_BLUETOOTH_TXCMD_STACKSIZE,
hci_tx_kthread, NULL);
-  DEBUGASSERT(ret > 0);
+  DEBUGASSERT(pid > 0);
+
+#ifdef CONFIG_BLUETOOTH_TXCMD_PINNED_TO_CORE
+  CPU_ZERO();
+  CPU_SET((CONFIG_BLUETOOTH_TXCMD_CORE - 1), );
+  ret = nxsched_set_affinity(pid, sizeof(cpuset), );
+  if (ret)
+{
+  wlerr("Failed to set affinity error=%d\n", ret);
+  DEBUGPANIC();
+}
+
+  sched_unlock();
+#endif
+
   UNUSED(ret);
 }
 



[nuttx] 02/03: esp32/bluetooth: Select option to pin the HCI TX thread to CPU core

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

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

commit 41c1b153e34d623719402a18bbea60abac3784ee
Author: Tiago Medicci Serrano 
AuthorDate: Tue Oct 10 08:23:38 2023 -0300

esp32/bluetooth: Select option to pin the HCI TX thread to CPU core

When ESP32's BLE is enabled, select the option to pin the HCI TX
thread to a specific core. This is necessary to avoid problems
with the BLE task that runs pinned to the PRO CPU (core 0) while
running with SMP enabled.
---
 arch/xtensa/src/esp32/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index 4a86dc4b4c..24c6605ee5 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -720,6 +720,7 @@ config ESP32_BLE
bool "BLE"
default n
select ESP32_WIRELESS
+   select BLUETOOTH_TXCMD_PINNED_TO_CORE if SMP
---help---
Enable BLE support
 



[PR] group/killchildren: replace syscall(2) to kernel api [nuttx]

2023-10-24 Thread via GitHub


anchao opened a new pull request, #11018:
URL: https://github.com/apache/nuttx/pull/11018

   ## Summary
   
   1. group/killchildren: replace syscall(2) to kernel api
   syscall(2) cannot be called from kernel space
   
   2. sched: fix the minor style issue
   
   ## Impact
   
   N/A
   
   ## Testing
   
   ci-check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] sched/pthread/barrierwait: replace syscall(2) to kernel api [nuttx]

2023-10-24 Thread via GitHub


anchao opened a new pull request, #11017:
URL: https://github.com/apache/nuttx/pull/11017

   
   ## Summary
   
   sched/pthread/barrierwait: replace syscall(2) to kernel api
   
   syscall(2) cannot be called from kernel space
   
   
   ## Impact
   
   Regression: https://github.com/apache/nuttx/pull/9066
   
   ## Testing
   
   ci-check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] nuttx and Olimex A64-OLinuXino [nuttx]

2023-10-24 Thread via GitHub


acassis commented on issue #11004:
URL: https://github.com/apache/nuttx/issues/11004#issuecomment-1777229917

   @Photogphred see here: https://nuttx.apache.org/community/
   
   The CPU Allwinner A64 is supported, but this board Olimex_A64-OLinuXino is 
not included yet.
   
   Porting NuttX to a new board is very straightforward, please take a look:
   https://archive.org/details/nutt-x-porting-board-guide 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed [nuttx]

2023-10-24 Thread via GitHub


acassis commented on code in PR #11009:
URL: https://github.com/apache/nuttx/pull/11009#discussion_r1370165228


##
drivers/net/tun.c:
##
@@ -775,14 +775,19 @@ 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;
+  irqstate_t flags;
+
+  flags = enter_critical_section(); /* No interrupts */
 
   /* Schedule to perform the TX poll on the worker thread. */
 
-  if (work_available(>work))
+  if (priv->bifup && work_available(>work))

Review Comment:
   Please update the above comment, now it only updates if bifup is true



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Documentation: add fmemopen test entry [nuttx]

2023-10-24 Thread via GitHub


michallenc commented on code in PR #11016:
URL: https://github.com/apache/nuttx/pull/11016#discussion_r1370163873


##
Documentation/applications/testing/index.rst:
##
@@ -26,6 +26,8 @@ with little value as usage examples.
 - drivertest - vela cmocka driver test
 - fatutf8 - FAT UTF8 test
 - fdsantest - vela cmocka fdsan test
+- fmemopen - fmemopen() test

Review Comment:
   pull requests created https://github.com/apache/nuttx/pull/11011 
https://github.com/apache/nuttx-apps/pull/2155



##
Documentation/applications/testing/index.rst:
##
@@ -26,6 +26,8 @@ with little value as usage examples.
 - drivertest - vela cmocka driver test
 - fatutf8 - FAT UTF8 test
 - fdsantest - vela cmocka fdsan test
+- fmemopen - fmemopen() test

Review Comment:
   @xiaoxiang781216  pull requests created 
https://github.com/apache/nuttx/pull/11011 
https://github.com/apache/nuttx-apps/pull/2155



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] libc: add support for memory buffer stream with fmemopen() [nuttx]

2023-10-24 Thread via GitHub


michallenc commented on PR #11011:
URL: https://github.com/apache/nuttx/pull/11011#issuecomment-1777213698

   > @michallenc any idea why it is failing to pass in CI ?
   
   @acassis I have added new test specially for `fmemopen`, it has to be merged 
first to `nuttx-apps` (https://github.com/apache/nuttx-apps/pull/2155). CI does 
not see the application and thus fails.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] net/icmpv6: Fix net mask logic in `icmpv6_setaddresses` [nuttx]

2023-10-24 Thread via GitHub


acassis merged PR #11010:
URL: https://github.com/apache/nuttx/pull/11010


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] imxrt: serial dma rx occasionally reports incorrect byte [nuttx]

2023-10-24 Thread via GitHub


davids5 commented on issue #10912:
URL: https://github.com/apache/nuttx/issues/10912#issuecomment-1777212451

   @danielappiagyei-bc - I am looking into this. The DMA count when using the 
channel is circular mode counts from RXDMA_BUFFER_SIZE 32-311-32 in HW and 
is never 0 So that RXDMA_BUFFER_SIZE - dmaresidual will be 0 - 31.
   Unless that is a race on the read. I have added an ASSERT and continue to 
test this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated (6e9cd74e81 -> ef1ad691c3)

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

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


from 6e9cd74e81 Documentaion: migrate tools/readme
 add ef1ad691c3 net/icmpv6: Fix net mask logic in `icmpv6_setaddresses`

No new revisions were added by this update.

Summary of changes:
 net/icmpv6/icmpv6_rnotify.c| 2 +-
 net/utils/net_ipv6_pref2mask.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



Re: [PR] libc: add support for memory buffer stream with fmemopen() [nuttx]

2023-10-24 Thread via GitHub


acassis commented on PR #11011:
URL: https://github.com/apache/nuttx/pull/11011#issuecomment-1777210292

   @michallenc any idea why it is failing to pass in CI ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] 08/13: Documentaion: migrate examples/bastest/readme without test cases

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

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

commit a008eb8669d3335188ca99eb83311edf711f799c
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:24:00 2023 +0200

Documentaion: migrate examples/bastest/readme without test cases
---
 .../applications/examples/bastest/index.rst| 43 ++
 1 file changed, 43 insertions(+)

diff --git a/Documentation/applications/examples/bastest/index.rst 
b/Documentation/applications/examples/bastest/index.rst
index 5aa888645b..603ad69dac 100644
--- a/Documentation/applications/examples/bastest/index.rst
+++ b/Documentation/applications/examples/bastest/index.rst
@@ -15,3 +15,46 @@ containing the BASIC test files extracted from the Bas 
``2.4`` release. See
   This must match ``EXAMPLES_BASTEST_DEVMINOR``. Used for registering the RAM
   block driver that will hold the ROMFS file system containing the BASIC files
   to be tested. Default: ``/dev/ram0``.
+
+Background
+--
+
+Bas is an interpreter for the classic dialect of the programming language 
BASIC.
+It is pretty compatible to typical BASIC interpreters of the 1980s, unlike some
+other UNIX BASIC interpreters, that implement a different syntax, breaking
+compatibility to existing programs. Bas offers many ANSI BASIC statements for
+structured programming, such as procedures, local variables and various loop
+types. Further there are matrix operations, automatic LIST indentation and many
+statements and functions found in specific classic dialects. Line numbers are
+not required.
+
+The interpreter tokenises the source and resolves references to variables and
+jump targets before running the program. This compilation pass increases
+efficiency and catches syntax errors, type errors and references to variables
+that are never initialised. Bas is written in ANSI C for UNIX systems.
+
+License
+---
+
+BAS `2.4` is released as part of NuttX under the standard 3-clause BSD license
+use by all components of NuttX. This is not incompatible with the original BAS
+`2.4` licensing
+
+Copyright (c) 1999-2014 Michael Haardt
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



[nuttx] 05/13: Documentaion: migrate modbus/readme

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

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

commit 7e2a5f6f3fa83adeb5275b3377b84599ec5ce916
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:22:46 2023 +0200

Documentaion: migrate modbus/readme
---
 Documentation/applications/industry/index.rst  |   2 +-
 .../applications/industry/modbus/index.rst | 123 +
 2 files changed, 124 insertions(+), 1 deletion(-)

diff --git a/Documentation/applications/industry/index.rst 
b/Documentation/applications/industry/index.rst
index 90c4f6ae4e..5622707dbc 100644
--- a/Documentation/applications/industry/index.rst
+++ b/Documentation/applications/industry/index.rst
@@ -7,7 +7,7 @@ Industrial Applications
:maxdepth: 3
:titlesonly:

-   abnt_codi/index.rst
+   */*
 
 - foc - Field Oriented Control user-space library
 - scpi - SCPI instrument side parser
diff --git a/Documentation/applications/industry/modbus/index.rst 
b/Documentation/applications/industry/modbus/index.rst
new file mode 100644
index 00..a74b25939d
--- /dev/null
+++ b/Documentation/applications/industry/modbus/index.rst
@@ -0,0 +1,123 @@
+==
+``modbus`` FreeModBus port
+==
+
+This directory contains a port of last open source version of FreeModBus (BSD
+license). The code in this directory is a subset of FreeModBus version 1.5.0
+(June 6, 2010) that can be downloaded in its entirety from
+http://developer.berlios.de/project/showfiles.php?group_id=6120.
+
+Includes extensions to support RTU master mode by Armink(383016...@qq.com):
+https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32. Ported to NuttX by
+Darcy Gong.
+
+Directory Structure / Relation to freemodbus-v1.5.0
+---
+
+The original FreeModBus download consists of several directories. This subset
+takes only the contents of one directory, ``modbus/``, that implements the core
+modbus logic and integrates that directory into the NuttX build system. The
+mapping between ``freemodbus-v1.5.0`` and the nuttx directories is shown 
below::
+
+  --- --
+  freemodbus-v1.5.0   NuttX
+  --- --
+   All top level .txt filesNot included
+   demo/   Not included. This directory contains demo
+   and porting code for a variety of platforms.
+   The NuttX demo was ported from the LINUX
+   demo in this directory and can be found at
+   apps/examples/modbus.
+   doc/Not included. This directory contains Doxygen
+   support files.
+   modbus/ Included in its entirety in various locations:
+   ascii  apps/modbus/ascii
+   functions  apps/modbus/functions
+   includeapps/include/modbus
+   mb.c   apps/modbus/mb.c
+   rtuapps/modbus/rtu
+   tcpapps/modbus/tcp
+   tools/  Not included. This directory contains Doxygen
+   tools.
+  --- --
+
+So this directory is equivalent to the ``freemodbus-v1.5.0/modbus`` directory
+except that (1) it may include modifications for the integration with NuttX and
+(2) the modbus/include directory was moved to ``apps/modbus``.
+
+The original, unmodified ``freemodbus-v1.5.0`` was checked in as SVN revision
+``4960``.
+
+The other directory here, ``nuttx/``, implements the NuttX modbus interface. It
+derives from the ``freemodbus-v1.5.0/demo/LINUX/port`` directory.
+
+Configuration Options
+-
+
+In the original ``freemodbus-v1.5.0`` release, the FreeModBus configuration was
+controlled by the header file ``mbconfig.h``. This header file was eliminated
+(post revision ``4960``) and the FreeModBus configuration was integrated into 
the
+NuttX configuration system.
+
+The NuttX-named configuration options that are available include:
+
+- ``CONFIG_MODBUS`` – General ModBus support.
+- ``CONFIG_MB_ASCII_ENABLED`` – Modbus ASCII support.
+- ``CONFIG_MB_ASCII_MASTER`` – Modbus ASCII master support.
+- ``CONFIG_MB_RTU_ENABLED`` – Modbus RTU support.
+- ``CONFIG_MB_RTU_MASTER`` – Modbus RTU master support.
+- ``CONFIG_MB_TCP_ENABLED`` – Modbus TCP support.
+- ``CONFIG_MB_ASCII_TIMEOUT_SEC`` – Character timeout value for Modbus ASCII. 
The
+  character timeout value is not fixed for Modbus ASCII and is therefore a
+  configuration option. It should be set to the maximum expected delay time of
+  the network. Default: ``1``.
+- 

[nuttx] 03/13: Documentaion: migrate graphics/readme

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

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

commit 05b0b7c9f30557cc5a9ebff37951de357823bff4
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:22:19 2023 +0200

Documentaion: migrate graphics/readme
---
 Documentation/applications/graphics/index.rst  |   4 -
 Documentation/applications/graphics/lvgl/index.rst |   6 +-
 .../applications/graphics/nxwidgets/index.rst  | 368 +++
 Documentation/applications/graphics/nxwm/index.rst |  85 +
 .../applications/graphics/pdcurs34/index.rst   |   5 +
 Documentation/applications/graphics/tiff/index.rst |  15 +
 .../applications/graphics/twm4nx/index.rst | 396 +
 7 files changed, 872 insertions(+), 7 deletions(-)

diff --git a/Documentation/applications/graphics/index.rst 
b/Documentation/applications/graphics/index.rst
index 48494352c5..92779321fc 100644
--- a/Documentation/applications/graphics/index.rst
+++ b/Documentation/applications/graphics/index.rst
@@ -12,10 +12,6 @@ Graphics Support
 - ft80x - FTDI/BridgeTek FT80x library
 - libjpeg - libjpeg JPEG image encoding
 - libyuv - libyuv
-- nxwidgets - NxWidgets
-- nxwm - NuttX Tiny Window Manager (NxWM)
-- pdcurs34 - pdcurses Text User Interface (TUI)
 - screenshot - TIFF screenshot utility
 - slcd - Segment LCD Emulaton
-- tiff - TIFF file generation library
 - twm4nx - Minimal Tom's Window Manager (TWM) for NuttX (Twm4Nx)
diff --git a/Documentation/applications/graphics/lvgl/index.rst 
b/Documentation/applications/graphics/lvgl/index.rst
index 0a18e1251c..0b0f1385ff 100644
--- a/Documentation/applications/graphics/lvgl/index.rst
+++ b/Documentation/applications/graphics/lvgl/index.rst
@@ -1,6 +1,6 @@
-
-LVGL
-
+=
+``lvgl`` LVGL
+=
 
 Usage
 -
diff --git a/Documentation/applications/graphics/nxwidgets/index.rst 
b/Documentation/applications/graphics/nxwidgets/index.rst
new file mode 100644
index 00..ef9bd79f20
--- /dev/null
+++ b/Documentation/applications/graphics/nxwidgets/index.rst
@@ -0,0 +1,368 @@
+===
+``nxwidgets`` NXWidgets
+===
+
+In order to better support NuttX based platforms, a special graphical user
+interface has been created called NXWidgets. NXWidgets is written in C++ and
+integrates seamlessly with the NuttX NX graphics subsystem in order to provide
+graphic objects, or _widgets_, in the NX Graphics Subsystem
+
+Some of the features of NXWidgets include:
+
+- Conservative C++
+
+  NXWidgets is written entirely in C++ but using only selected "embedded
+  friendly" C++ constructs that are fully supported under NuttX. No additional
+  C++ support libraries are required.
+
+- NX Integration
+
+  NXWidgets integrate seamlessly with the NX graphics system. Think of the X
+  server under Linux – the NX graphics system is like a tiny X server that
+  provides windowing under NuttX. By adding NXWidgets, you can support graphics
+  objects like buttons and text boxes in the NX windows and toolbars.
+
+- Small Footprint
+
+  NXWidgets is tailored for use MCUs in embedded applications. It is ideally
+  suited for mid- and upper-range of most MCU families. A complete NXWidgets is
+  possible in as little as 40Kb of FLASH and maybe 4Kb of SRAM.
+
+- Output Devices
+
+  NXWidgets will work on the high-end frame buffer devices as well as on LCDs
+  connected via serial or parallel ports to a small MCU.
+
+- Input Devices
+
+  NXWidgets will accept position and selection inputs from a mouse or a
+  touchscreen. It will also support character input from a keyboard such as a
+  USB keyboard. NXWidgets supports on very special widget called ``CKeypad`` 
that
+  will provide keyboard input via an on-screen keypad that can be operated via
+  mouse or touchscreen inputs.
+
+- Many Graphic Objects
+
+  Some of the graphic objects supported by NXWidgets include labels, buttons,
+  text boxes, button arrays, check boxes, cycle buttons, images, sliders,
+  scrollable list boxes, progress bars, and more.
+
+**Note**: Many of the fundamental classed in NxWidgets derive from the Antony
+Dzeryn's _Woopsi_ project: http://woopsi.org/ which also has a BSD style
+license. See the ``COPYING`` file for details.
+
+Directory Structure
+---
+
+- ``Kconfig``
+
+  This is a ``Kconfig`` file that should be provided at 
``apps/NxWidgets/Kconfig``.
+  When copied to that location, it will be used by the NuttX configuration
+  systems to configure settings for NxWidgets and NxWM
+
+- ``nxwidgets``
+
+  The source code, header files, and build environment for NxWidgets is 
provided
+  in this directory.
+
+- ``UnitTests``
+
+  Provides a collection of unit-level tests for many of the individual widgets
+  provided by ``nxwidgets``.
+
+Doxygen
+---
+
+Installing the necessary packages in Ubuntu
+~~~
+
+1. Install the 

[nuttx] 06/13: Documentaion: migrate netutils/readme

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

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

commit a9a1d719dabf773344ee2bb49174c21be0a10cf6
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:22:59 2023 +0200

Documentaion: migrate netutils/readme
---
 .../applications/netutils/cjson/index.rst  | 11 +++
 .../applications/netutils/dhcpc/index.rst  |  6 ++
 .../applications/netutils/dhcpd/index.rst  | 20 +
 .../applications/netutils/discover/index.rst   | 12 +++
 .../applications/netutils/esp8266/index.rst|  5 ++
 .../applications/netutils/esp8266/index/rst|  0
 Documentation/applications/netutils/ftpc/index.rst | 87 +++
 Documentation/applications/netutils/ftpd/index.rst |  5 ++
 Documentation/applications/netutils/index.rst  | 40 -
 Documentation/applications/netutils/iper/index.rst | 98 ++
 .../applications/netutils/netcat/index.rst | 81 ++
 .../applications/netutils/ntpclient/index.rst  |  6 ++
 Documentation/applications/netutils/ping/index.rst | 11 +++
 Documentation/applications/netutils/smtp/index.rst |  6 ++
 .../applications/netutils/telnetc/index.rst| 10 +++
 .../applications/netutils/telnetd/index.rst| 30 +++
 .../applications/netutils/tftpc/index.rst  |  5 ++
 .../applications/netutils/thttpd/index.rst | 12 +++
 .../applications/netutils/webclient/index.rst  |  6 ++
 .../applications/netutils/webserver/index.rst  |  5 ++
 .../applications/netutils/xmlrpc/index.rst |  6 ++
 21 files changed, 443 insertions(+), 19 deletions(-)

diff --git a/Documentation/applications/netutils/cjson/index.rst 
b/Documentation/applications/netutils/cjson/index.rst
new file mode 100644
index 00..4f5c598c07
--- /dev/null
+++ b/Documentation/applications/netutils/cjson/index.rst
@@ -0,0 +1,11 @@
+===
+``cjson`` cJSON library
+===
+
+cJSON is an ultra-lightweight, portable, single-file,
+simple-as-can-be ANSI-C compliant JSON parser, under MIT license. Embeddable
+Lightweight XML-RPC Server discussed at
+http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364.
+
+This code was taken from http://sourceforge.net/projects/cjson/ and adapted
+for NuttX by Darcy Gong.
diff --git a/Documentation/applications/netutils/dhcpc/index.rst 
b/Documentation/applications/netutils/dhcpc/index.rst
new file mode 100644
index 00..a9984c8fe8
--- /dev/null
+++ b/Documentation/applications/netutils/dhcpc/index.rst
@@ -0,0 +1,6 @@
+=
+``dhcpc`` DHCP client
+=
+
+Dynamic Host Configuration Protocol (DHCP) client. See
+``apps/include/netutils/dhcpc.h`` for interface information.
diff --git a/Documentation/applications/netutils/dhcpd/index.rst 
b/Documentation/applications/netutils/dhcpd/index.rst
new file mode 100644
index 00..26b102d47b
--- /dev/null
+++ b/Documentation/applications/netutils/dhcpd/index.rst
@@ -0,0 +1,20 @@
+=
+``dhcpd`` DHCP server
+=
+
+See ``apps/include/netutils/dhcpd.h`` for interface information.
+
+Tips for Using DHCPC
+
+
+If you use DHCPC/D, then some special configuration network options are
+required. These include:
+
+- ``CONFIG_NET=y``
+- ``CONFIG_NET_UDP=y`` – UDP support is required for DHCP (as well as various
+  other UDP-related configuration settings).
+- ``CONFIG_NET_BROADCAST=y`` – UDP broadcast support is needed.
+- ``CONFIG_NET_ETH_PKTSIZE=650`` or larger. The client must be prepared to 
receive
+  DHCP messages of up to ``576`` bytes (excluding Ethernet, IP  or UDP headers 
and
+  FCS). **Note**: Note that the actual MTU setting will depend upon the 
specific
+  link protocol. Here Ethernet is indicated.
diff --git a/Documentation/applications/netutils/discover/index.rst 
b/Documentation/applications/netutils/discover/index.rst
new file mode 100644
index 00..f4ce04d410
--- /dev/null
+++ b/Documentation/applications/netutils/discover/index.rst
@@ -0,0 +1,12 @@
+==
+``discover`` Network Discovery Utility
+==
+
+This daemon is useful for discovering devices in local networks,
+especially with DHCP configured devices. It listens for UDP broadcasts which
+also can include a device class so that groups of devices can be discovered.
+It is also possible to address all classes with a kind of broadcast discover.
+
+See `nuttx/tools/discover.py` for a client example.
+
+(Contributed by Max Holtzberg).
diff --git a/Documentation/applications/netutils/esp8266/index.rst 
b/Documentation/applications/netutils/esp8266/index.rst
new file mode 100644
index 00..972980b912
--- /dev/null
+++ b/Documentation/applications/netutils/esp8266/index.rst
@@ -0,0 +1,5 @@
+===

[nuttx] 10/13: Documentation: fix warnings from games

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

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

commit e229528d5adb5d92ca7b5b27e1a647b4ce1e2560
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:40:26 2023 +0200

Documentation: fix warnings from games
---
 .../applications/games/{brickmatch.rst => brickmatch/index.rst}| 4 ++--
 Documentation/applications/games/index.rst | 7 ---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/Documentation/applications/games/brickmatch.rst 
b/Documentation/applications/games/brickmatch/index.rst
similarity index 98%
rename from Documentation/applications/games/brickmatch.rst
rename to Documentation/applications/games/brickmatch/index.rst
index 4049054b74..3c0820f730 100644
--- a/Documentation/applications/games/brickmatch.rst
+++ b/Documentation/applications/games/brickmatch/index.rst
@@ -17,7 +17,7 @@ walls, floor and ceil in direction to the center of the board 
to make
 the cells of same color to match.
 
 Basic Test
-==
+--
 
 The best way to play brickmatch is using an APA102 RGB 16x16 matrix
 and Gesture sensor APDS9960. There are some board examples already
@@ -29,7 +29,7 @@ If you don't have an APA102 matrix you can also play it using 
an LCD
 display and a digital joystick (DJOYSTICK) or the console input. 
 
 Then you can configure and compile the game to play in your board,
-i.e. for ESP32-Devkitc there is already an example using the APA102:
+i.e. for ESP32-Devkitc there is already an example using the APA102::
 
 
 $ ./tools/configure.sh esp32-devkitc:brickmatch
diff --git a/Documentation/applications/games/index.rst 
b/Documentation/applications/games/index.rst
index 54201e9d65..9eb7a93c21 100644
--- a/Documentation/applications/games/index.rst
+++ b/Documentation/applications/games/index.rst
@@ -12,7 +12,8 @@ It is a raycasting game that Greg Nutt developed from 
scratch, similar
 to Doom in many ways. That game is not part of Apache NuttX.
 
 .. toctree::
-  :maxdepth: 2
-  :caption: Contents
+   :glob:
+   :maxdepth: 1
+   :titlesonly:
 
-  brichmatch.rst
+   */index*



[nuttx] 07/13: Documentaion: migrate system/readme

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

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

commit cffc74c6647ec48a19729097e39a64258478bc4d
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:23:16 2023 +0200

Documentaion: migrate system/readme
---
 Documentation/applications/system/cdcacm/index.rst |  38 +++
 .../applications/system/cfgdata/index.rst  |  22 ++
 .../applications/system/composite/index.rst|  71 ++
 .../applications/system/flash_eraseall/index.rst   |  14 ++
 Documentation/applications/system/index.rst|  18 +-
 Documentation/applications/system/libuv/index.rst  |  19 ++
 Documentation/applications/system/nsh/index.rst|  44 
 Documentation/applications/system/nxdiag/index.rst |   8 +-
 .../applications/system/nxplayer/index.rst |  16 ++
 Documentation/applications/system/psmq/index.rst   |  53 
 Documentation/applications/system/spi/index.rst| 247 ++
 .../applications/system/termcurses/index.rst   |  54 
 Documentation/applications/system/trace/index.rst  |   5 +
 Documentation/applications/system/usbmsc/index.rst |  83 +++
 Documentation/applications/system/ymodem/index.rst |  61 +
 Documentation/applications/system/zmodem/index.rst | 276 +
 16 files changed, 1009 insertions(+), 20 deletions(-)

diff --git a/Documentation/applications/system/cdcacm/index.rst 
b/Documentation/applications/system/cdcacm/index.rst
new file mode 100644
index 00..5eb5af9ecb
--- /dev/null
+++ b/Documentation/applications/system/cdcacm/index.rst
@@ -0,0 +1,38 @@
+==
+``cdcacm`` USB CDC/ACM Device Commands
+==
+
+This very simple add-on allows the USB CDC/ACM serial device can be dynamically
+connected and disconnected from a host. This add-on can only be used as an NSH
+built-in command. If built-in, then two new NSH commands will be supported:
+
+1. ``sercon`` – Connect the CDC/ACM serial device
+2. ``serdis`` – Disconnect the CDC/ACM serial device
+
+Configuration prerequisites (not complete):
+
+- ``CONFIG_USBDEV=y`` – USB device support must be enabled
+- ``CONFIG_CDCACM=y`` – The CDC/ACM driver must be built
+
+Configuration options specific to this add-on:
+
+- ``CONFIG_SYSTEM_CDCACM_DEVMINOR`` – The minor number of the CDC/ACM device,
+  i.e., the ``x`` in ``/dev/ttyACMx``.
+
+If ``CONFIG_USBDEV_TRACE`` is enabled (or ``CONFIG_DEBUG_FEATURES`` and
+``CONFIG_DEBUG_USB``, or ``CONFIG_USBDEV_TRACE``), then the add-on code will 
also
+initialize the USB trace output. The amount of trace output can be controlled
+using:
+
+- ``CONFIG_SYSTEM_CDCACM_TRACEINIT`` – Show initialization events.
+- ``CONFIG_SYSTEM_CDCACM_TRACECLASS`` – Show class driver events.
+- ``CONFIG_SYSTEM_CDCACM_TRACETRANSFERS`` – Show data transfer events.
+- ``CONFIG_SYSTEM_CDCACM_TRACECONTROLLER`` – Show controller events.
+- ``CONFIG_SYSTEM_CDCACM_TRACEINTERRUPTS`` – Show interrupt-related events.
+
+**Note**: This add-on is only enables or disable USB CDC/ACM via the NSH
+``sercon`` and ``serdis`` command. It will enable and disable tracing per the
+settings before enabling and after disabling the CDC/ACM device. It will not,
+however, monitor buffered trace data in the interim. If 
``CONFIG_USBDEV_TRACE`` is
+defined (and the debug options are not), other application logic will need to
+monitor the buffered trace data.
diff --git a/Documentation/applications/system/cfgdata/index.rst 
b/Documentation/applications/system/cfgdata/index.rst
new file mode 100644
index 00..87e94ee7a6
--- /dev/null
+++ b/Documentation/applications/system/cfgdata/index.rst
@@ -0,0 +1,22 @@
+===
+``cfgdata`` Cfgdata Command
+===
+
+
+This application provides a command line interface for managing platform
+specific configdata within the ``/dev/config`` device.
+
+Usage::
+
+  config  [arguments]
+
+Where  is one of:
+
+- ``all`` – show all config entries
+- ``print`` – display a specific config entry
+- ``set`` – set or change a config entry
+- ``unset`` – delete a config entry
+
+
+Author: Ken Pettit
+Date: 18 December 2018
diff --git a/Documentation/applications/system/composite/index.rst 
b/Documentation/applications/system/composite/index.rst
new file mode 100644
index 00..473abeb60e
--- /dev/null
+++ b/Documentation/applications/system/composite/index.rst
@@ -0,0 +1,71 @@
+===
+``composite`` USB Composite Device Commands
+===
+
+This logic adds a NSH command to control a USB composite device. The only
+supported devices in the composite are CDC/ACM serial and a USB mass storage
+device. Which devices are enclosed in a composite device is configured with an
+array of configuration-structs, handed over to the function
+``composite_initialize()``.
+
+Required 

[nuttx] branch master updated (8f042f527e -> 6e9cd74e81)

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

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


from 8f042f527e Documentation: add fmemopen test entry
 new 203f6cd4a9 Documentaion: migrate audioutils/readme
 new 454e3a210b Documentaion: migrate crypto/readme
 new 05b0b7c9f3 Documentaion: migrate graphics/readme
 new 0979fd0ab7 Documentaion: migrate interpreters/readme
 new 7e2a5f6f3f Documentaion: migrate modbus/readme
 new a9a1d719da Documentaion: migrate netutils/readme
 new cffc74c664 Documentaion: migrate system/readme
 new a008eb8669 Documentaion: migrate examples/bastest/readme without test 
cases
 new 4520d8676a Documentaion: migrate wireless/readme
 new e229528d5a Documentation: fix warnings from games
 new 931096f3f6 Documentation: various cosmetic changes
 new abdcc8d17c Documentation: unify applications/xxx/index.rst
 new 6e9cd74e81 Documentaion: migrate tools/readme

The 13 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:
 Documentation/applications/audioutils/index.rst|   9 +-
 .../applications/audioutils/mml_parser/index.rst   | 221 
 Documentation/applications/boot/index.rst  |   5 +-
 Documentation/applications/boot/mcuboot/index.rst  |   6 +-
 Documentation/applications/boot/miniboot/index.rst |   6 +-
 Documentation/applications/crypto/index.rst|  10 +-
 .../applications/crypto/wolfssl/index.rst  | 112 ++
 .../applications/examples/bastest/index.rst|  43 +++
 Documentation/applications/examples/index.rst  |   5 +-
 Documentation/applications/fsutils/index.rst   |   5 +-
 .../games/{brickmatch.rst => brickmatch/index.rst} |   4 +-
 Documentation/applications/games/index.rst |   8 +-
 Documentation/applications/graphics/index.rst  |  11 +-
 Documentation/applications/graphics/lvgl/index.rst |   6 +-
 .../applications/graphics/nxwidgets/index.rst  | 368 +++
 Documentation/applications/graphics/nxwm/index.rst |  85 +
 .../applications/graphics/pdcurs34/index.rst   |   5 +
 Documentation/applications/graphics/tiff/index.rst |  15 +
 .../applications/graphics/twm4nx/index.rst | 396 +
 Documentation/applications/index.rst   |   1 +
 .../applications/industry/abnt_codi/index.rst  |   6 +-
 Documentation/applications/industry/index.rst  |   5 +-
 .../applications/industry/modbus/index.rst | 123 +++
 .../applications/interpreters/bas/index.rst|  64 
 .../applications/interpreters/ficl/index.rst   |  44 +++
 Documentation/applications/interpreters/index.rst  |  15 +-
 .../applications/interpreters/lua/index.rst|  17 +
 .../applications/interpreters/minibasic/index.rst  |  11 +
 .../applications/logging/embedlog/index.rst|   6 +-
 Documentation/applications/logging/index.rst   |   5 +-
 .../applications/logging/nxscope/index.rst |   6 +-
 .../applications/netutils/cjson/index.rst  |  11 +
 .../applications/netutils/dhcpc/index.rst  |   6 +
 .../applications/netutils/dhcpd/index.rst  |  20 ++
 .../applications/netutils/discover/index.rst   |  12 +
 .../applications/netutils/esp8266/index.rst|   5 +
 .../applications/netutils/esp8266/index/rst|   0
 Documentation/applications/netutils/ftpc/index.rst |  87 +
 Documentation/applications/netutils/ftpd/index.rst |   5 +
 Documentation/applications/netutils/index.rst  |  41 ++-
 Documentation/applications/netutils/iper/index.rst |  98 +
 .../applications/netutils/netcat/index.rst |  81 +
 .../applications/netutils/ntpclient/index.rst  |   6 +
 Documentation/applications/netutils/ping/index.rst |  11 +
 Documentation/applications/netutils/smtp/index.rst |   6 +
 .../applications/netutils/telnetc/index.rst|  10 +
 .../applications/netutils/telnetd/index.rst|  30 ++
 .../applications/netutils/tftpc/index.rst  |   5 +
 .../applications/netutils/thttpd/index.rst |  12 +
 .../applications/netutils/webclient/index.rst  |   6 +
 .../applications/netutils/webserver/index.rst  |   5 +
 .../applications/netutils/xmlrpc/index.rst |   6 +
 Documentation/applications/system/cdcacm/index.rst |  38 ++
 .../applications/system/cfgdata/index.rst  |  22 ++
 .../applications/system/composite/index.rst|  71 
 .../applications/system/flash_eraseall/index.rst   |  14 +
 Documentation/applications/system/index.rst|  21 +-
 Documentation/applications/system/libuv/index.rst  |  19 +
 Documentation/applications/system/nsh/index.rst|  44 +++
 Documentation/applications/system/nxdiag/index.rst |   8 +-
 

[nuttx] 01/13: Documentaion: migrate audioutils/readme

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

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

commit 203f6cd4a90ea4b6b6c2a3874c0a9675df5169ef
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:21:54 2023 +0200

Documentaion: migrate audioutils/readme
---
 Documentation/applications/audioutils/index.rst|   8 +-
 .../applications/audioutils/mml_parser/index.rst   | 221 +
 2 files changed, 228 insertions(+), 1 deletion(-)

diff --git a/Documentation/applications/audioutils/index.rst 
b/Documentation/applications/audioutils/index.rst
index f5252deed3..5aca2ab1b9 100644
--- a/Documentation/applications/audioutils/index.rst
+++ b/Documentation/applications/audioutils/index.rst
@@ -2,6 +2,12 @@
 Audio Utility libraries
 ===
 
+.. toctree::
+   :glob:
+   :maxdepth: 3
+   :titlesonly:
+   
+   */*
+
 - fmsynth - FM Synthesizer Library
-- mml_parser - Music Macro Language(MML) Library 
 - nxaudio - NX Audio Library
diff --git a/Documentation/applications/audioutils/mml_parser/index.rst 
b/Documentation/applications/audioutils/mml_parser/index.rst
new file mode 100644
index 00..cabf451a60
--- /dev/null
+++ b/Documentation/applications/audioutils/mml_parser/index.rst
@@ -0,0 +1,221 @@
+
+``mml_parser`` Music Macro Language (MML) Parser library
+
+
+MML has often been used as a language for describing music in strings, for 
example,
+in the BASIC language. The mml_parser is a minimalistic Music Macro Language 
parser
+library written in pure C intended for resource-constrained platforms, 
especially
+microcontrollers and other embedded systems.
+
+Supported Syntax on this library
+
+
+Notes
+~
+
+* **C** (Do)
+* **D** (Re)
+* **E** (Mi)
+* **F** (Fa)
+* **G** (Sol)
+* **A** (La)
+* **B** (Ti)
+
+Sharp and Flat
+~~
+
+Add "#" or "+" after the note indicates Sharp. ex: ``"C#"`` ``"C+."``
+Add "-" after the note indicates Flat. ex: ``"C-"``
+
+Length
+~~
+
+Length of the tone can be specified in two ways.
+One is to specify a length for each note. Add a number after the note in 1, 2, 
4, 8, 16, 32 or 64.
+ex: ``"C8 C16 C#4."``
+
+The other is to use ``L`` . The ``L`` sets default length. If the note without 
length, the number which is
+indicated by the "L" is used.  The number followed after the "L" can be in 1, 
2, 4, 8, 16, 32 or 64.
+ex: ``"L4 A"`` means "A" with length 4.
+
+In addition, dot is supported. For example, length of "C4." is 4 + 8. Length 
of "C16.." is 4 + 8 + 16.
+
+Rest
+
+
+Rest is represented by "R".
+Length of the rest is following after the "R" as the same as the note length.  
If no length is
+specified, the length specified by the ”L" is used.
+
+Chord
+~
+
+Chord is supported. If some notes are enclosed in parentheses by ``[`` and 
``]``, they are interpreted as
+a chord. ex: ``"[CEG]"`` is a chord of Do, Mi and Sol.
+Chord's length can be put after ``]`` . ex: ``"[CEG]4"`` is a chord with 4 
length.
+
+Note: Max notes in a chord is defined as MAX_CHORD_NOTES in ``mml_parser.h``.
+
+Tuplet
+~~
+
+Tuplet is supported. If some notes and Chord are enclosed in parentheses by 
``{`` and ``}``, they are
+interpreted as a tuplet. ex: ``"{C E G [CEG]}"`` is a tuplet with C, E, G and 
chord of CEG.
+Tuplet's length can be put after "}", and the length is divided equally among 
each note.
+ex: in ``"{C E G [CEG]}4"`` case, C, E, G and chord CEG has each a quarter of 
the L4 length.
+
+Octave
+~~
+
+Octarve is controlled by "O", ">" or "<".
+When "O" is used, the O is followed by a number indicating the octave.
+When ">" is used, the value of the new octave is the current octave plus one.
+When "<" is used, the value of the new octave is the current octave minus one.
+ex: ``"CDEFGAB > C R C < BAGFEDC"``, ``"O4 CDEFGAB O5 C R C O4 BAGFEDC"``
+
+Tempo
+~
+
+Tempo is indicated as "T" and numter following after the "T".
+Tempo number decide a speed of the score. This value is used for culculating 
sample number for
+the note (or rest).
+ex: ``"T120"``
+
+Volume
+~~
+
+Volume can be controlled by "V". And numter following after the "V".
+ex: ``"V4"``
+
+Example of a score
+--
+
+The beginning of the Do Re Mi Song
+~~
+
+Tempo 120, Voulume 10, Octave 4, Default length is 4.
+
+``"T120 V10 O4 L4 C. D8 E. C8 E C E2 D. E8 {FF} {ED} F2"``
+
+Provided C Functions
+
+
+mml_parser is providing just 2 functions.
+
+init_mml()
+~~
+
+Initialize an instance of mml parser.
+
+.. code-block:: c
+
+   #include 
+
+   int init_mml(FAR struct music_macro_lang_s *mml,
+int fs, int tempo, int octave, int length);
+
+The function initializes ``struct music_macro_lang_s`` instance provided as 
1st argument.
+The argument ``fs`` 

Re: [PR] Documentation: add fmemopen test entry [nuttx]

2023-10-24 Thread via GitHub


xiaoxiang781216 commented on code in PR #11016:
URL: https://github.com/apache/nuttx/pull/11016#discussion_r1370157928


##
Documentation/applications/testing/index.rst:
##
@@ -26,6 +26,8 @@ with little value as usage examples.
 - drivertest - vela cmocka driver test
 - fatutf8 - FAT UTF8 test
 - fdsantest - vela cmocka fdsan test
+- fmemopen - fmemopen() test

Review Comment:
   @michallenc have we implemented fmemopen?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] 04/13: Documentaion: migrate interpreters/readme

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

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

commit 0979fd0ab727f838a1d30691c7c697121fbc957a
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:22:36 2023 +0200

Documentaion: migrate interpreters/readme
---
 .../applications/interpreters/bas/index.rst| 64 ++
 .../applications/interpreters/ficl/index.rst   | 44 +++
 Documentation/applications/interpreters/index.rst  | 14 +++--
 .../applications/interpreters/lua/index.rst| 17 ++
 .../applications/interpreters/minibasic/index.rst  | 11 
 5 files changed, 146 insertions(+), 4 deletions(-)

diff --git a/Documentation/applications/interpreters/bas/index.rst 
b/Documentation/applications/interpreters/bas/index.rst
new file mode 100644
index 00..4ae28961aa
--- /dev/null
+++ b/Documentation/applications/interpreters/bas/index.rst
@@ -0,0 +1,64 @@
+=
+``bas`` Bas BASIC Interpreter
+=
+
+Introduction
+
+
+Bas is an interpreter for the classic dialect of the programming language 
BASIC.
+It is pretty compatible to typical BASIC interpreters of the 1980s, unlike some
+other UNIX BASIC interpreters, that implement a different syntax, breaking
+compatibility to existing programs. Bas offers many ANSI BASIC statements for
+structured programming, such as procedures, local variables and various loop
+types. Further there are matrix operations, automatic LIST indentation and many
+statements and functions found in specific classic dialects. Line numbers are
+not required.
+
+The interpreter tokenises the source and resolves references to variables and
+jump targets before running the program. This compilation pass increases
+efficiency and catches syntax errors, type errors and references to variables
+that are never initialised. Bas is written in ANSI C for UNIX systems.
+
+License
+---
+
+BAS 2.4 is released as part of NuttX under the standard 3-clause BSD license 
use
+by all components of NuttX. This is not incompatible with the original BAS 2.4
+licensing
+
+Copyright (c) 1999-2014 Michael Haardt
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Bas 2.4 Release Notes
+-
+
+Changes compared to version ``2.3``
+
+- Matrix inversion on integer arrays with option base 1 fixed.
+- ``PRINT USING`` behaviour for ``!`` fixed.
+- ``PRINT``, separator should advance to the next zone, even if the current
+  position is at the start of a zone.
+- Added ``ip()``, ``frac()``, ``fp()``, ``log10()``, ``log2()``, ``min()`` and 
``max()``.
+- Fixed ``NEXT`` checking the variable case sensitive.
+- Use ``terminfo`` capability cr to make use of its padding.
+- ``LET`` segmentation fault fixed.
+- ``PRINT`` now uses print items.
+- ``-r`` for restricted operation.
+- ``MAT INPUT`` does not drop excess arguments, but uses them for the next row.
+- License changed to MIT.
diff --git a/Documentation/applications/interpreters/ficl/index.rst 
b/Documentation/applications/interpreters/ficl/index.rst
new file mode 100644
index 00..1f9c8c2e43
--- /dev/null
+++ b/Documentation/applications/interpreters/ficl/index.rst
@@ -0,0 +1,44 @@
+===
+``ficl`` Ficl Forth interpreter
+===
+
+Ficl is a programming language interpreter designed to be embedded into other
+systems as a command, macro, and development prototyping language.
+
+This is DIY port of Ficl (the "Forth Inspired Command Language"). See
+http://ficl.sourceforge.net/. It is a "" port because the Ficl source is not
+in that directory, only an environment and instructions that will let you build
+Ficl under NuttX. The rest is up to you.
+
+Build Instructions
+--
+
+Disclaimer: This installation steps have only been exercised using Ficl 4.1.0.
+With new versions you will likely have to make some adjustments 

[nuttx] 12/13: Documentation: unify applications/xxx/index.rst

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

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

commit abdcc8d17c066b2b96155f43d4b7a7ea40ea54ae
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:51:23 2023 +0200

Documentation: unify applications/xxx/index.rst
---
 Documentation/applications/audioutils/index.rst   | 5 +++--
 Documentation/applications/boot/index.rst | 5 +++--
 Documentation/applications/crypto/index.rst   | 5 +++--
 Documentation/applications/examples/index.rst | 5 +++--
 Documentation/applications/fsutils/index.rst  | 5 +++--
 Documentation/applications/games/index.rst| 1 +
 Documentation/applications/graphics/index.rst | 7 ---
 Documentation/applications/industry/index.rst | 5 +++--
 Documentation/applications/interpreters/index.rst | 5 +++--
 Documentation/applications/logging/index.rst  | 5 +++--
 Documentation/applications/netutils/index.rst | 5 +++--
 Documentation/applications/system/index.rst   | 3 ++-
 Documentation/applications/testing/index.rst  | 5 +++--
 Documentation/applications/wireless/index.rst | 1 +
 14 files changed, 38 insertions(+), 24 deletions(-)

diff --git a/Documentation/applications/audioutils/index.rst 
b/Documentation/applications/audioutils/index.rst
index 5aca2ab1b9..23f456aed9 100644
--- a/Documentation/applications/audioutils/index.rst
+++ b/Documentation/applications/audioutils/index.rst
@@ -4,10 +4,11 @@ Audio Utility libraries
 
 .. toctree::
:glob:
-   :maxdepth: 3
+   :maxdepth: 1
:titlesonly:
+   :caption: Contents

-   */*
+   */index*
 
 - fmsynth - FM Synthesizer Library
 - nxaudio - NX Audio Library
diff --git a/Documentation/applications/boot/index.rst 
b/Documentation/applications/boot/index.rst
index d70a419ac6..128234a1de 100644
--- a/Documentation/applications/boot/index.rst
+++ b/Documentation/applications/boot/index.rst
@@ -4,7 +4,8 @@ Bootloader Utilities
 
 .. toctree::
:glob:
-   :maxdepth: 3
+   :maxdepth: 1
:titlesonly:
+   :caption: Contents

-   */*
+   */index*
diff --git a/Documentation/applications/crypto/index.rst 
b/Documentation/applications/crypto/index.rst
index f7d9420fb9..536936c851 100644
--- a/Documentation/applications/crypto/index.rst
+++ b/Documentation/applications/crypto/index.rst
@@ -4,10 +4,11 @@ Cryptography Library Support
 
 .. toctree::
:glob:
-   :maxdepth: 3
+   :maxdepth: 1
:titlesonly:
+   :caption: Contents

-   wolfssl/index.rst
+   */index*
 
 - controlse - Control Secure Element device
 - libsodium - Libsodium Cryptography Library
diff --git a/Documentation/applications/examples/index.rst 
b/Documentation/applications/examples/index.rst
index ba7b557c96..a47509d910 100644
--- a/Documentation/applications/examples/index.rst
+++ b/Documentation/applications/examples/index.rst
@@ -33,7 +33,8 @@ Supported examples
 
 .. toctree::
:glob:
-   :maxdepth: 3
+   :maxdepth: 1
:titlesonly:
+   :caption: Contents

-   */*
+   */index*
diff --git a/Documentation/applications/fsutils/index.rst 
b/Documentation/applications/fsutils/index.rst
index 965afc4adc..d1ed4182aa 100644
--- a/Documentation/applications/fsutils/index.rst
+++ b/Documentation/applications/fsutils/index.rst
@@ -4,10 +4,11 @@ File System Utilities
 
 .. toctree::
:glob:
-   :maxdepth: 3
+   :maxdepth: 1
:titlesonly:
+   :caption: Contents

-   */*
+   */index*
 
 - flash_eraseall - flash_eraseall() function
 - inih - inih ini file parser
diff --git a/Documentation/applications/games/index.rst 
b/Documentation/applications/games/index.rst
index 9eb7a93c21..d7a38840ca 100644
--- a/Documentation/applications/games/index.rst
+++ b/Documentation/applications/games/index.rst
@@ -15,5 +15,6 @@ to Doom in many ways. That game is not part of Apache NuttX.
:glob:
:maxdepth: 1
:titlesonly:
+   :caption: Contents
 
*/index*
diff --git a/Documentation/applications/graphics/index.rst 
b/Documentation/applications/graphics/index.rst
index 92779321fc..91c9c4eebe 100644
--- a/Documentation/applications/graphics/index.rst
+++ b/Documentation/applications/graphics/index.rst
@@ -4,10 +4,11 @@ Graphics Support
 
 .. toctree::
:glob:
-   :maxdepth: 3
+   :maxdepth: 1
:titlesonly:
-   
-   */*
+   :caption: Contents
+
+   */index*
 
 - ft80x - FTDI/BridgeTek FT80x library
 - libjpeg - libjpeg JPEG image encoding
diff --git a/Documentation/applications/industry/index.rst 
b/Documentation/applications/industry/index.rst
index 5622707dbc..76721d705f 100644
--- a/Documentation/applications/industry/index.rst
+++ b/Documentation/applications/industry/index.rst
@@ -4,10 +4,11 @@ Industrial Applications
 
 .. toctree::
:glob:
-   :maxdepth: 3
+   :maxdepth: 1
:titlesonly:
+   :caption: Contents

-   */*
+   */index*
 
 - foc - Field Oriented Control user-space library
 - scpi - SCPI instrument side parser
diff --git 

[nuttx] 13/13: Documentaion: migrate tools/readme

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

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

commit 6e9cd74e810dcc1868754aae0979a13c73a7702d
Author: raiden00pl 
AuthorDate: Tue Oct 24 13:06:26 2023 +0200

Documentaion: migrate tools/readme
---
 Documentation/applications/index.rst   |  1 +
 Documentation/applications/tools/index.rst | 33 ++
 2 files changed, 34 insertions(+)

diff --git a/Documentation/applications/index.rst 
b/Documentation/applications/index.rst
index 2a7a06d267..926844e753 100644
--- a/Documentation/applications/index.rst
+++ b/Documentation/applications/index.rst
@@ -34,6 +34,7 @@ more information at the repository.
sdr/index.rst
system/index.rst
testing/index.rst
+   tools/index.rst
wireless/index.rst
 
examples/index.rst
diff --git a/Documentation/applications/tools/index.rst 
b/Documentation/applications/tools/index.rst
new file mode 100644
index 00..1504ed7be7
--- /dev/null
+++ b/Documentation/applications/tools/index.rst
@@ -0,0 +1,33 @@
+===
+Host Side Tools
+===
+
+NxWidgets ``bitmap_converter.py``
+-
+
+This script converts from any image type supported by Python imaging library to
+the RLE-encoded format used by NxWidgets.
+
+RLE (Run Length Encoding) is a very simply encoding that compress quite well
+with certain kinds of images: Images that that have many pixels of the same
+color adjacent on a row (like simple graphics). It does not work well with
+photographic images.
+
+But even simple graphics may not encode compactly if, for example, they have
+been resized. Resizing an image can create hundreds of unique colors that may
+differ by only a bit or two in the RGB representation. This "color smear" is 
the
+result of pixel interpolation (and might be eliminated if your graphics 
software
+supports resizing via pixel replication instead of interpolation).
+
+When a simple graphics image does not encode well, the symptom is that the
+resulting RLE data structures are quite large. The palette structure, in
+particular, may have hundreds of colors in it. There is a way to fix the 
graphic
+image in this case. Here is what I do (in fact, I do this on all images prior 
to
+conversion just to be certain):
+
+- Open the original image in GIMP.
+- Select the option to select the number of colors in the image.
+- Pick the smallest number of colors that will represent the image faithfully.
+  For most simple graphic images this might be as few as 6 or 8 colors.
+- Save the image as PNG or other lossless format (NOT jpeg).
+- Then generate the image.



[nuttx] 11/13: Documentation: various cosmetic changes

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

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

commit 931096f3f676324ffa11234896dac477251e4b0b
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:49:37 2023 +0200

Documentation: various cosmetic changes
---
 Documentation/applications/boot/mcuboot/index.rst| 6 +++---
 Documentation/applications/boot/miniboot/index.rst   | 6 +++---
 Documentation/applications/industry/abnt_codi/index.rst  | 6 +++---
 Documentation/applications/logging/embedlog/index.rst| 6 +++---
 Documentation/applications/logging/nxscope/index.rst | 6 +++---
 Documentation/applications/testing/arch_libc/index.rst   | 6 +++---
 Documentation/applications/testing/cxxtest/index.rst | 6 +++---
 Documentation/applications/testing/fopencookie/index.rst | 6 +++---
 Documentation/applications/testing/fstest/index.rst  | 6 +++---
 Documentation/applications/testing/mm/index.rst  | 6 +++---
 Documentation/applications/testing/nxfss/index.rst   | 6 +++---
 Documentation/applications/testing/ostest/index.rst  | 6 +++---
 Documentation/applications/testing/smp/index.rst | 6 +++---
 Documentation/applications/testing/unity/index.rst   | 6 +++---
 14 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/Documentation/applications/boot/mcuboot/index.rst 
b/Documentation/applications/boot/mcuboot/index.rst
index 761f741b92..c043349574 100644
--- a/Documentation/applications/boot/mcuboot/index.rst
+++ b/Documentation/applications/boot/mcuboot/index.rst
@@ -1,6 +1,6 @@
-===
-MCUboot
-===
+===
+``mcuboot`` MCUboot
+===
 
 Description
 ---
diff --git a/Documentation/applications/boot/miniboot/index.rst 
b/Documentation/applications/boot/miniboot/index.rst
index 084fecda0b..fd05dbf2a5 100644
--- a/Documentation/applications/boot/miniboot/index.rst
+++ b/Documentation/applications/boot/miniboot/index.rst
@@ -1,6 +1,6 @@
-
-miniboot
-
+===
+``miniboot`` Minimal bootloader
+===
 
 Minimal bootloader based on NuttX.
 
diff --git a/Documentation/applications/industry/abnt_codi/index.rst 
b/Documentation/applications/industry/abnt_codi/index.rst
index 362e0b1bc0..842ed8d3a9 100644
--- a/Documentation/applications/industry/abnt_codi/index.rst
+++ b/Documentation/applications/industry/abnt_codi/index.rst
@@ -1,6 +1,6 @@
-=
-abnt_codi
-=
+===
+``abnt_codi`` ABNT CODI
+===
 
 The ABNT CODI is an old energy meter standard used in Brazil.
 
diff --git a/Documentation/applications/logging/embedlog/index.rst 
b/Documentation/applications/logging/embedlog/index.rst
index 186de02b00..17dfd6cf98 100644
--- a/Documentation/applications/logging/embedlog/index.rst
+++ b/Documentation/applications/logging/embedlog/index.rst
@@ -1,6 +1,6 @@
-
-Embedlog Library
-
+=
+``embedlog`` Embedlog Library
+=
 
 Highly configurable logger for embedded devices. Documentation and
 more info available on: https://embedlog.bofc.pl
diff --git a/Documentation/applications/logging/nxscope/index.rst 
b/Documentation/applications/logging/nxscope/index.rst
index db36877b4c..7a4cbbdb75 100644
--- a/Documentation/applications/logging/nxscope/index.rst
+++ b/Documentation/applications/logging/nxscope/index.rst
@@ -1,6 +1,6 @@
-===
-NxScope Library
-===
+===
+``nxscope`` NxScope Library
+===
 
 This library provides real-time data logging functionality for NuttX.
 
diff --git a/Documentation/applications/testing/arch_libc/index.rst 
b/Documentation/applications/testing/arch_libc/index.rst
index f6b054fa9a..6c03e3aac3 100644
--- a/Documentation/applications/testing/arch_libc/index.rst
+++ b/Documentation/applications/testing/arch_libc/index.rst
@@ -1,6 +1,6 @@
-===
-``arch_libc`` - Arch-specific libc Test
-===
+=
+``arch_libc`` Arch-specific libc Test
+=
 
 This is a test for arch-specific libc function. Arch-specific libc functions 
are often implemented in
 assembly language, here is the test for these functions. The test focuses on 
key features in assembly
diff --git a/Documentation/applications/testing/cxxtest/index.rst 
b/Documentation/applications/testing/cxxtest/index.rst
index 72ed911da3..12fa1a2ce0 100644
--- a/Documentation/applications/testing/cxxtest/index.rst
+++ b/Documentation/applications/testing/cxxtest/index.rst
@@ -1,6 +1,6 @@
-==
-``cxxtest`` - C++ test program
-==
+
+``cxxtest`` C++ test program
+
 
 This is a test of 

[nuttx] 02/13: Documentaion: migrate crypto/readme

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

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

commit 454e3a210b4f51e5c9a3339c03d07241cfae0d5b
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:22:05 2023 +0200

Documentaion: migrate crypto/readme
---
 Documentation/applications/crypto/index.rst|   9 +-
 .../applications/crypto/wolfssl/index.rst  | 112 +
 2 files changed, 120 insertions(+), 1 deletion(-)

diff --git a/Documentation/applications/crypto/index.rst 
b/Documentation/applications/crypto/index.rst
index 3ce466..f7d9420fb9 100644
--- a/Documentation/applications/crypto/index.rst
+++ b/Documentation/applications/crypto/index.rst
@@ -2,10 +2,17 @@
 Cryptography Library Support
 
 
+.. toctree::
+   :glob:
+   :maxdepth: 3
+   :titlesonly:
+   
+   wolfssl/index.rst
+
 - controlse - Control Secure Element device
 - libsodium - Libsodium Cryptography Library
 - libtomcrypt - LibTomCrypt CrypographyLibrary
 - mbedtls - Mbed TLS Cryptography Library
 - tinycrypt - TinyCrypt cryptography library
 - tinydtls - Eclipse Tinydtls
-- wolfssl - wolfSSL SSL/TLS Cryptography Library
+- wolfssl - 
diff --git a/Documentation/applications/crypto/wolfssl/index.rst 
b/Documentation/applications/crypto/wolfssl/index.rst
new file mode 100644
index 00..15953c6edc
--- /dev/null
+++ b/Documentation/applications/crypto/wolfssl/index.rst
@@ -0,0 +1,112 @@
+.. warning::
+  wolfSSL is GPL
+
+
+``wolfSSL`` wolfSSL SSL/TLS Cryptography Library
+
+
+Installation
+
+
+Installing from nuttx-apps
+~~
+
+Skip to step 6
+
+Installing from wolfssl
+~~~
+
+1) Create working directory (e.g. ~/nuttxspace)::
+
+$ cd ~
+$ mkdir nuttxspace
+
+2) Install dependencies::
+
+$ cd ~/nuttxspace
+$ sudo apt install -y bison flex gettext texinfo libncurses5-dev 
libncursesw5-dev gperf automake libtool pkg-config build-essential gperf 
genromfs libgmp-dev libmpc-dev libmpfr-dev libisl-dev binutils-dev libelf-dev 
libexpat-dev gcc-multilib g++-multilib picocom u-boot-tools util-linux
+$ sudo apt install -y kconfig-frontends
+$ sudo apt install -y gcc-arm-none-eabi binutils-arm-none-eabi
+
+3) Clone nuttx and nuttx-apps into working directory::
+
+$ git clone https://github.com/apache/nuttx.git nuttx
+$ git clone https://github.com/apache/nuttx-apps apps
+
+4) Copy this directory into the working directory applications::
+
+$ cp -R RTOS/nuttx/wolfssl ~/nuttxspace/apps/crypto/wolfssl
+
+5) Setup wolfSSL in preparation for the build, ``WOLFSSL_DIR`` must be the 
path to the original wolfssl repo::
+
+$ cd ~/nuttxspace/apps/crypto/wolfssl
+$ WOLFSSL_DIR= ./setup-wolfssl.sh
+
+6) Setup baseline NuttX configuration (board + NuttX Shell)::
+
+ $ cd ~/nuttxspace/nuttx
+ $ ./tools/configure.sh -l :nsh
+
+If you are using wolfSSL for TLS you should use the ``netnsh`` target if 
your board supports it::
+
+  $ ./tools/configure.sh -l :netnsh
+
+EXAMPLES:
+
+- For NuttX Simulator: ``$ ./tools/configure.sh sim:nsh``
+- For BL602 (RISC-V): ``$ ./tools/configure.sh -l bl602evb:nsh``
+- For NUCLEO-L552ZE-Q (Cortex-M33): ``$ ./tools/configure.sh -l 
nucleo-l552ze:nsh``
+- For NUCLEO-H753ZI: ``$ ./tools/configure.sh -l nucleo-h743zi:nsh``
+- For NUCLEO-F756ZG: ``./tools/configure.sh -l nucleo-144:f746-nsh``
+
+7) Start custom configuration system::
+
+ $ make menuconfig
+
+8) Configure NuttX to enable the wolfSSL crypto library test applications:
+
+- From main menu select: **Application Configuration > Cryptography 
Library Support**
+- Enable and then select **wolfSSL SSL/TLS Cryptography Library**
+- Enable and then select **wolfSSL applications**
+- Enable applications:
+
+- **wolfCrypt Benchmark application**
+- **wolfCrypt Test application**
+- **wolfSSL client and server example**
+
+- Select Save from bottom menu, saving to ``.config`` file
+- Exit configuration tool
+
+If you are using wolfSSL for TLS you should use the ``netnsh`` target and 
should enable an NTP or some for of system time keeping so that wolfSSL has the 
current date to check certificates. You will also need to set the right 
networking settings for NuttX to connect to the internet.
+
+9) Build NuttX and wolfSSL::
+
+ $ make
+
+10) Flash the target::
+
+  ### Simulator
+  ./nuttx
+  ### STM32 Targets (address may vary)
+  STM32_Programmer_CLI -c port=swd -d ./nuttx.bin 0x0800
+
+11) Connect to the target with a serial monitoring tool, the device on linux 
is usually ``/dev/ttyACM0`` but it may vary::
+
+  minicom -D /dev/ttyACM0
+
+12) Run the wolfcrypt benchmark and/or test in the NuttX Shell::
+
+  nsh> wolfcrypt_test
+

[nuttx] 09/13: Documentaion: migrate wireless/readme

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

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

commit 4520d8676a415dacd42bd6a6933ff4d7e34c422c
Author: raiden00pl 
AuthorDate: Tue Oct 24 12:24:14 2023 +0200

Documentaion: migrate wireless/readme
---
 .../applications/wireless/btsak/index.rst  | 147 ++
 .../applications/wireless/i8sak/index.rst  | 172 +
 Documentation/applications/wireless/index.rst  |   7 +-
 .../applications/wireless/nimble/index.rst |   6 +-
 Documentation/applications/wireless/wapi/index.rst |   9 +-
 5 files changed, 327 insertions(+), 14 deletions(-)

diff --git a/Documentation/applications/wireless/btsak/index.rst 
b/Documentation/applications/wireless/btsak/index.rst
new file mode 100644
index 00..ea59b11126
--- /dev/null
+++ b/Documentation/applications/wireless/btsak/index.rst
@@ -0,0 +1,147 @@
+
+``btsak`` Bluetooth Swiss Army Knife
+
+
+Commands
+
+
+help::
+
+  Command:  help
+  Description:  Should overall command help
+  Usage:bt  help
+
+info::
+
+  Command:  info
+  Description:  Show Bluetooth driver information
+  Usage:bt  info [-h]
+
+features::
+
+  Command:  features
+  Description:  Show Bluetooth driver information
+  Usage:bt  features [-h] [le]
+  Where:le - Selects LE features vs BR/EDR features
+
+scan::
+
+  Command:  scan
+  Description:  Bluetooth scan commands
+  Usage:bt  scan [-h] 
+  Where:start - Starts scanning.  The -d option enables duplicate
+filtering.
+get   - Shows new accumulated scan results
+stop  - Stops scanning
+
+advertise::
+
+  Command:  advertise
+  Description:  Bluetooth advertise commands
+  Usage:bt  advertise [-h] 
+  Where:start - Starts advertising
+stop  - Stops advertising
+
+security::
+
+  Command:  security
+  Description:  Enable security (encryption) for a connection:
+If device is paired, key encryption will be enabled.  If
+the link is already encrypted with sufficiently strong
+key this command does nothing.
+
+If the device is not paired pairing will be initiated. If
+the device is paired and keys are too weak but input output
+capabilities allow for strong enough keys pairing will be
+initiated.
+
+This command may return error if required level of security
+is not possible to achieve due to local or remote device
+limitation (eg input output capabilities).
+
+bt::
+
+  Usage:bt  security [-h]  public|random 
+  Where:  - The 6-byte address of the connected peer
+ - Security level, on of:
+
+  low - No encryption and no authentication
+  medium  - Encryption and no authentication (no MITM)
+  high- Encryption and authentication (MITM)
+  fips- Authenticated LE secure connections and encryption
+
+gatt::
+
+  Command:  gatt
+  Description:  Generic Attribute (GATT) commands
+  Usage:bt  gatt [-h]  [option [option [option...]]]
+  Where:See "GATT Commands" below
+
+GATT Commands
+-
+
+exchange-mtu::
+
+  Command:  exchange-mtu
+  Description:  Set MTU to out maximum and negotiate MTU with peer
+  Usage:bt  gatt exchange-mtu [-h]  public|random
+
+mget::
+
+  Command:  mget
+  Description:  Get the pass/fail result of the last GATT 'exchange-mtu' 
command
+  Usage:bt  gatt mget [-h]
+
+discover::
+
+  Command:  discover
+  Description:  Initiate discovery
+  Usage:bt  gatt discover [-h]  public|random  
[ []]
+
+characteristic::
+
+  Command:  characteristic
+  Description:  Initiate characteristics discovery
+  Usage:bt  gatt characteristic [-h]  public|random 
[ []]
+
+descriptor::
+
+  Command:  descriptor
+  Description:  Initiate characteristics discovery
+  Usage:bt  gatt descriptor [-h]  public|random [ 
[]]
+
+dget::
+
+  Command:  dget
+  Description:  Get the result of the last discovery action
+  Usage:bt  gatt dget [-h]
+
+read::
+
+  Command:  read
+  Description:  Initiate a GATT read operation.
+  Usage:bt  gatt read [-h]  public|random  
[]
+
+read-multiple::
+
+  Command:  read-multiple
+  Description:  Initiate a GATT read-multiple operation.
+  Usage:bt  gatt read-multiple [-h]  public|random 
 [ []..]
+
+rget::
+
+  Command:  rget
+  Description:  Get the data resulting from the last read operation
+  Usage:bt  gatt rget [-h]
+
+write::
+
+  Command:  write
+  Description:  Initiate a GATT write operation.
+  Usage:   

Re: [PR] Documentation: migrate more nuttx-apps readmes [nuttx]

2023-10-24 Thread via GitHub


acassis merged PR #11014:
URL: https://github.com/apache/nuttx/pull/11014


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[nuttx] branch master updated: Documentation: add fmemopen test entry

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 8f042f527e Documentation: add fmemopen test entry
8f042f527e is described below

commit 8f042f527e884f630f52992b389d1f21c3fc04b9
Author: Michal Lenc 
AuthorDate: Tue Oct 24 13:54:13 2023 +0200

Documentation: add fmemopen test entry

Test tool for fmemopen() function added to documentation.

Signed-off-by: Michal Lenc 
---
 Documentation/applications/testing/fmemopen/index.rst | 11 +++
 Documentation/applications/testing/index.rst  |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/Documentation/applications/testing/fmemopen/index.rst 
b/Documentation/applications/testing/fmemopen/index.rst
new file mode 100644
index 00..253c4cde51
--- /dev/null
+++ b/Documentation/applications/testing/fmemopen/index.rst
@@ -0,0 +1,11 @@
+===
+``fmemopen`` - fmemopen test tool
+===
+
+``CONFIG_TESTING_FMEMOPEN_TEST=y``
+
+Performs a basic operations with fmemopen call.
+
+Usage::
+
+fmemopen_test
diff --git a/Documentation/applications/testing/index.rst 
b/Documentation/applications/testing/index.rst
index 8fbbbd2993..9bca51ff56 100644
--- a/Documentation/applications/testing/index.rst
+++ b/Documentation/applications/testing/index.rst
@@ -26,6 +26,8 @@ with little value as usage examples.
 - drivertest - vela cmocka driver test
 - fatutf8 - FAT UTF8 test
 - fdsantest - vela cmocka fdsan test
+- fmemopen - fmemopen() test
+- fopencookie - fopencookie() test
 - getprime - getprime example
 - iozone - IOzone, filesystem benchmark tool
 - irtest - IR driver test



Re: [PR] Documentation: add fmemopen test entry [nuttx]

2023-10-24 Thread via GitHub


acassis merged PR #11016:
URL: https://github.com/apache/nuttx/pull/11016


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] imxrt/lpi2c multibyte read broken following DMA addition [nuttx]

2023-10-24 Thread via GitHub


thebolt commented on issue #10853:
URL: https://github.com/apache/nuttx/issues/10853#issuecomment-1777197727

   Thanks for the fix. I will try to test it over the next few days (working on 
another product atm and takes a bit to switch over the lab setup); I'll let you 
know and close this once I verified it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] readme: Updating README [nuttx]

2023-10-24 Thread via GitHub


simbit18 commented on PR #10980:
URL: https://github.com/apache/nuttx/pull/10980#issuecomment-1777179731

   I think we can include a field about the license
   for example:
   
   ```html
   ## License
   The code in this repository is all under either the Apache 2 license, or a
   license compatible with the Apache 2 license.  See the  [LICENSE 
file](https://nuttx.apache.org/docs/latest/introduction/licensing.html) for more
   information.
   ``` 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Remove READMEs migrated to nuttx/Documentation [nuttx-apps]

2023-10-24 Thread via GitHub


raiden00pl opened a new pull request, #2157:
URL: https://github.com/apache/nuttx-apps/pull/2157

   ## Summary
   
   
   Remove READMEs migrated to nuttx/Documentation.
   
   **I'm keeping this as DRAFT and waiting for community feedback in** 
https://github.com/apache/nuttx-apps/issues/2156
   
   What is left:
   ```
   [raiden00:~/git/RTOS/nuttx/apps]$ find -name "*.md"  


 (doc_migrate) 
   ./nshlib/README.md
   ./wireless/wapi/README.md
   ./.github/PULL_REQUEST_TEMPLATE.md
   ./examples/bastest/testcases.md
   ./README.md
   ./graphics/pdcurs34/pdcurses/README.md
   ./graphics/pdcurs34/README.md
   ```
   
   ## Impact
   
   - Documentation in one place. 
   - Easier to maintain. 
   - Separation doc from code (for some a disadvantage, for some an advantage)
   - `nuttx-apps` structure is preserved in `Documentation/applications` for 
easier use for all terminal lovers
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] testing: add fmemopen function test tool [nuttx-apps]

2023-10-24 Thread via GitHub


michallenc commented on PR #2155:
URL: https://github.com/apache/nuttx-apps/pull/2155#issuecomment-1777067204

   > @michallenc please add an entry in the doc about this new tool (instead of 
readme?) 
https://github.com/apache/nuttx/blob/master/Documentation/applications/testing/index.rst
   
   Sure, have missed that one was already merged. [PR 
created](https://github.com/apache/nuttx/pull/11016).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Documentation: add fmemopen test entry [nuttx]

2023-10-24 Thread via GitHub


michallenc opened a new pull request, #11016:
URL: https://github.com/apache/nuttx/pull/11016

   ## Summary
   Test tool for fmemopen() function added to documentation.
   
   ## Impact
   Docs only. Should be merged with [testing: add fmemopen function test 
tool](https://github.com/apache/nuttx-apps/pull/2155).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] net/local: Support `SO_SNDBUF` option in `getsockopt` [nuttx]

2023-10-24 Thread via GitHub


wengzhe opened a new pull request, #11015:
URL: https://github.com/apache/nuttx/pull/11015

   ## Summary
   For datagram unix sockets, the `SO_SNDBUF` value imposes an upper limit on 
the size of outgoing datagrams.
   
   Note: We don't support to change the buffer size yet, so only add support to 
getsockopt now.
   Refs: https://man7.org/linux/man-pages/man7/unix.7.html
   
   ## Impact
   `getsockopt` of local socket
   
   ## Testing
   CI
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] testing: add fmemopen function test tool [nuttx-apps]

2023-10-24 Thread via GitHub


raiden00pl commented on PR #2155:
URL: https://github.com/apache/nuttx-apps/pull/2155#issuecomment-1777048574

   @michallenc please add an entry in the doc about this new tool 
https://github.com/apache/nuttx/blob/master/Documentation/applications/testing/index.rst


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] testing/sd_stress: Port sdstress testing utility from PX4-Autopilot. [nuttx-apps]

2023-10-24 Thread via GitHub


raiden00pl commented on PR #2150:
URL: https://github.com/apache/nuttx-apps/pull/2150#issuecomment-1777047732

   @g2gps please add an entry in the doc about this new tool 
https://github.com/apache/nuttx/blob/master/Documentation/applications/testing/index.rst


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] readme: Updating README [nuttx]

2023-10-24 Thread via GitHub


raiden00pl commented on code in PR #10980:
URL: https://github.com/apache/nuttx/pull/10980#discussion_r1370023592


##
README.md:
##
@@ -1,2530 +1,30 @@
-# APACHE NUTTX
+
+https://raw.githubusercontent.com/apache/nuttx/master/Documentation/_static/NuttX320.png;
 width="150">
+
 
-* Introduction
-* Community
-  - Getting Help
-  - Mailing Lists
-  - Issue Tracker
-  - Source Code
-  - Website Source Code
-* Environments
-  - Installing Cygwin
-  - Ubuntu Bash under Windows 10
-  - Using macOS
-* Installation
-  - Download and Unpack
-  - Semi-Optional apps/ Package
-  - Installation Directories with Spaces in the Path
-  - Downloading from Repositories
-  - Related Repositories
-  - Notes about Header Files
-* Configuring NuttX
-  - Instantiating "Canned" Configurations
-  - Refreshing Configurations
-  - NuttX Configuration Tool
-  - Finding Selections in the Configuration Menus
-  - Reveal Hidden Configuration Options
-  - Make Sure that You are on the Right Platform
-  - Comparing Two Configurations
-  - Making defconfig Files
-  - Incompatibilities with Older Configurations
-  - NuttX Configuration Tool under DOS
-* Toolchains
-  - Cross-Development Toolchains
-  - NuttX Buildroot Toolchain
-* Shells
-* Building NuttX
-  - Building
-  - Re-building
-  - Build Targets and Options
-  - Native Windows Build
-  - Installing GNUWin32
-* Cygwin Build Problems
-  - Strange Path Problems
-  - Window Native Toolchain Issues
-* Documentation
+![POSIX 
Badge](https://img.shields.io/badge/POSIX-Compliant-green?style=flat=POSIX)
+![Issues Tracking 
Badge](https://img.shields.io/badge/issue_track-github-blue?style=flat=Issue%20Tracking)
+[![GitHub Build 
Badge](https://github.com/apache/nuttx/workflows/Build/badge.svg)](https://github.com/apache/nuttx/actions/workflows/build.yml)
+[![GitHub Documentation Build 
Badge](https://github.com/apache/nuttx/workflows/Build%20Documentation/badge.svg)](https://github.com/apache/nuttx/actions/workflows/doc.yml)

Review Comment:
   there is `[![GitHub 
release](https://img.shields.io/github/release/apache/nuttx.svg)](https://github.com/apache/nuttx/releases)`
 but it doesn't seem to work with NuttX. Probably this works only with Github 
releases which is empty in our case https://github.com/apache/nuttx/releases



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] readme: Updating README [nuttx]

2023-10-24 Thread via GitHub


fdcavalcanti commented on PR #10980:
URL: https://github.com/apache/nuttx/pull/10980#issuecomment-1777023311

   > > There's a chain icon on the NuttX logo appearing for me. Does anyone 
know why it's there? I can't see it on the PNG.
   > 
   > @fdcavalcanti try with
   > 
   > ```
   > 
   > https://raw.githubusercontent.com/apache/nuttx/master/Documentation/_static/NuttX320.png;
 width="150">
   > 
   > ```
   
   Thanks, it worked! Really starting to look good.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Documentation: migrate more nuttx-apps readmes [nuttx]

2023-10-24 Thread via GitHub


raiden00pl opened a new pull request, #11014:
URL: https://github.com/apache/nuttx/pull/11014

   ## Summary
   
   - Documentaion: migrate audioutils/readme
   - Documentaion: migrate crypto/readme
   - Documentaion: migrate graphics/readme
   - Documentaion: migrate interpreters/readme
   - Documentaion: migrate modbus/readme
   - Documentaion: migrate netutils/readme
   - Documentaion: migrate system/readme
   - Documentaion: migrate examples/bastest/readme without test cases
   - Documentaion: migrate wireless/readme
   -  Documentation: fix warnings from games
   - Documentation: various cosmetic changes
   - Documentation: unify applications/xxx/index.rst
   - Documentaion: migrate tools/readme
   
   What is left:
   
   - examples/bastest - there is a large section `# Test Overview` which I see 
no point in moving
   - nshlib/README.md - I'm not sure if everything was moved before 
   - wireless/wapi/README.md - original WAPI readme
   - README.md - the content of this file should probably also be moved to doc
   - graphics/pdcurs34/README.md and graphics/pdcurs34/pdcurses/README.md - 
probably pdcurs34 origial files ?
   
   ## Impact
   
   ## Testing
   local
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] wireless/bluetooth: Add option to set the HCI TX thread affinity while running with SMP enabled [nuttx]

2023-10-24 Thread via GitHub


tmedicci opened a new pull request, #11013:
URL: https://github.com/apache/nuttx/pull/11013

   ## Summary
   
   * wireless/bluetooth: Add an option to set the HCI TX thread affinity
   
   By enabling the config `CONFIG_BLUETOOTH_TXCMD_PINNED_TO_CORE` and setting 
the value of `CONFIG_BLUETOOTH_TXCMD_CORE`, it's possible to pin the HCI TX 
thread to a specific core on an SMP-enabled setup. This is necessary for 
devices requiring the function that sends data (`bt_send`) to be called from a 
specific core.
   
   For instance, this configuration is selected for ESP32's BLE: when ESP32's 
BLE is enabled, select the option to pin the HCI TX thread to a specific core. 
This is necessary to avoid problems with the BLE task pinned to the PRO CPU 
(core 0) while running with SMP enabled.
   
   ## Impact
   
   Enable SMP + BLE for ESP32.
   
   ## Testing
   
   Internal CI testing + ESP32 DevKitC v4 + NuttX CI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] to support LIN , how about to add a Individual character driver [nuttx]

2023-10-24 Thread via GitHub


pkarashchenko commented on issue #10454:
URL: https://github.com/apache/nuttx/issues/10454#issuecomment-1776968933

   There are few differences to discuss about SocketLIN:
   1. Linux slin use some extra bits in CAN-ID to "enable cache response" or 
"request extended checksum"
   ```
   #define LIN_CANFR_FLAGS_OFFS 6 /* Lower 6 bits in can_id correspond to LIN 
ID */
   
   #define LIN_CACHE_RESPONSE   (1 << (LIN_CANFR_FLAGS_OFFS))
   #define LIN_CHECKSUM_EXTENDED(1 << (LIN_CANFR_FLAGS_OFFS + 1))
   #define LIN_SINGLE_RESPONSE (1 << (LIN_CANFR_FLAGS_OFFS + 2))
   ```
   as well as for error reporting
   ```
   /* Error flags */
   #define LIN_ERR_RX_TIMEOUT   (1 << (LIN_CANFR_FLAGS_OFFS + 8))
   #define LIN_ERR_CHECKSUM (1 << (LIN_CANFR_FLAGS_OFFS + 9))
   #define LIN_ERR_FRAMING  (1 << (LIN_CANFR_FLAGS_OFFS + 10))
   ```
   while currently in my draft I used `CAN_EFF_FLAG` for selection of extended 
vs classical checksum,
   2. slin uses `CAN_EFF_FLAG` flag for configure frame cache
   ```
   #define LIN_CTRL_FRAME   CAN_EFF_FLAG
   ```
   and in my PR I use TX frames as a regular frames while RX frames are always 
done via RTR.
   
   I suppose that frame caching is needed for LIN slave mode as 
https://github.com/apache/nuttx/pull/11002 adds only LIN master support. Adding 
a LIN slave may require slight rework as all TX data should be cached until 
master requests with a proper LIN-ID, so in CAN language "we will need COB 
(communication object)" to be allocated for each TX ID in case of LIN slave.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



  1   2   >