[GitHub] [nuttx] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


pussuw commented on code in PR #8355:
URL: https://github.com/apache/nuttx/pull/8355#discussion_r1095453141


##
include/nuttx/sched.h:
##
@@ -532,6 +526,12 @@ struct tcb_s
 
   FAR struct task_group_s *group;  /* Pointer to shared task group data */
 
+  /* Address Environment /
+
+#ifdef CONFIG_ARCH_ADDRENV
+  FAR struct addrenv_s *mm_own; /* Task (group) own memory mappings */

Review Comment:
   Done



##
sched/addrenv/addrenv.c:
##
@@ -52,6 +53,39 @@
 
 static FAR struct addrenv_s *g_addrenv[CONFIG_SMP_NCPUS];
 
+/
+ * Private Functions
+ /
+
+/
+ * Name: addrenv_dsr
+ *
+ * Description:
+ *   Deferred service routine for destroying an address environment. This is
+ *   so that the heavy lifting is not done when the context is switching, or
+ *   from ISR.
+ *
+ * Input Parameters:
+ *   arg - Contains pointer to the address environment that is freed.
+ *
+ * Returned Value:
+ *   None.
+ *
+ /
+
+static void addrenv_dsr(FAR void *arg)

Review Comment:
   Done



-- 
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



[GitHub] [nuttx] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


pussuw commented on code in PR #8355:
URL: https://github.com/apache/nuttx/pull/8355#discussion_r1095451693


##
include/nuttx/addrenv.h:
##
@@ -359,6 +367,117 @@ int addrenv_switch(FAR struct tcb_s *tcb);
 int addrenv_attach(FAR struct tcb_s *tcb,
FAR const struct arch_addrenv_s *addrenv);
 
+/
+ * Name: addrenv_join
+ *
+ * Description:
+ *   Join the parent process's address environment.
+ *
+ * Input Parameters:
+ *   ptcb - The tcb of the parent process.
+ *   tcb  - The tcb of the child process.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_join(FAR struct tcb_s *ptcb, FAR struct tcb_s *tcb);
+
+/
+ * Name: addrenv_leave
+ *
+ * Description:
+ *   Leave a process's address environment.
+ *
+ * Input Parameters:
+ *   tcb  - The tcb of the process.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_leave(FAR struct tcb_s *tcb);
+
+/
+ * Name: addrenv_take
+ *
+ * Description:
+ *   Take a reference to an address environment.
+ *
+ * Input Parameters:
+ *   addrenv - The address environment.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+void addrenv_take(FAR struct addrenv_s *addrenv);
+
+/
+ * Name: addrenv_take
+ *
+ * Description:
+ *   Take a reference to an address environment.
+ *
+ * Input Parameters:
+ *   addrenv - The address environment.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+void addrenv_take(FAR struct addrenv_s *addrenv);

Review Comment:
   Done



-- 
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



[GitHub] [nuttx] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


pussuw commented on code in PR #8355:
URL: https://github.com/apache/nuttx/pull/8355#discussion_r1095450990


##
arch/arm/src/armv7-a/arm_addrenv.c:
##
@@ -98,8 +98,6 @@
 #include 
 #include 
 
-#include 

Review Comment:
   Done



-- 
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



[GitHub] [nuttx-apps] bestvvstar opened a new pull request, #1536: testing/drivertest:add watchdog test case.

2023-02-02 Thread via GitHub


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

   ## Summary
   add watchdog test case.
   ## 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



[nuttx] branch master updated: libc: Keep printf("%pS", p) behavior consistent

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

pkarashchenko 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 35ae47788b libc: Keep printf("%pS", p) behavior consistent
35ae47788b is described below

commit 35ae47788b75f7b092c1a813c0df9269cfc0c455
Author: yinshengkai 
AuthorDate: Fri Feb 3 11:06:37 2023 +0800

libc: Keep printf("%pS", p) behavior consistent

When ALLSYMS is not turned on, %pS will be treated as %p

Signed-off-by: yinshengkai 
---
 libs/libc/stdio/lib_libvsprintf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libs/libc/stdio/lib_libvsprintf.c 
b/libs/libc/stdio/lib_libvsprintf.c
index 31a9a0239e..c0481c6272 100644
--- a/libs/libc/stdio/lib_libvsprintf.c
+++ b/libs/libc/stdio/lib_libvsprintf.c
@@ -1145,10 +1145,10 @@ str_lpad:
   continue;
 }
 
-#ifdef CONFIG_ALLSYMS
   case 'S':
   case 's':
 {
+#ifdef CONFIG_ALLSYMS
   FAR const struct symtab_s *symbol;
   FAR void *addr = (FAR void *)(uintptr_t)x;
   size_t symbolsize;
@@ -1171,10 +1171,9 @@ str_lpad:
 
   continue;
 }
-
+#endif
   break;
 }
-#endif
 
   default:
 fmt_ungetc(fmt);



[GitHub] [nuttx] pkarashchenko merged pull request #8418: libc: Keep printf("%pS", p) behavior consistent

2023-02-02 Thread via GitHub


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


-- 
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



[GitHub] [nuttx-apps] bestvvstar opened a new pull request, #1535: testing/drivertest: add pwm driver test

2023-02-02 Thread via GitHub


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

   ## Summary
   add pwm driver test
   ## 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



[GitHub] [nuttx-apps] bestvvstar opened a new pull request, #1534: testing/drivertest: add timer driver test

2023-02-02 Thread via GitHub


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

   ## Summary
   add timer driver test
   ## 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



[GitHub] [nuttx-apps] bestvvstar opened a new pull request, #1533: testing/drivertest:add rtc test case.

2023-02-02 Thread via GitHub


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

   ## Summary
   
   Add rtc test case.
   
   ## Impact
   N/A
   ## Testing
   N/A
   


-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


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


##
sched/sched/sched_releasetcb.c:
##
@@ -154,7 +154,11 @@ int nxsched_release_tcb(FAR struct tcb_s *tcb, uint8_t 
ttype)
 #ifdef CONFIG_ARCH_ADDRENV
   /* Release this thread's reference to the address environment */
 
-  ret = up_addrenv_detach(tcb->group, tcb);
+  ret = up_addrenv_detach(tcb);
+  if (ttype == TCB_FLAG_TTYPE_TASK)

Review Comment:
   Both patch is very big, let's keep as 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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


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


##
include/nuttx/sched.h:
##
@@ -532,6 +526,12 @@ struct tcb_s
 
   FAR struct task_group_s *group;  /* Pointer to shared task group data */
 
+  /* Address Environment /
+
+#ifdef CONFIG_ARCH_ADDRENV
+  FAR struct addrenv_s *mm_own; /* Task (group) own memory mappings */

Review Comment:
   could be, I think addrenv is better prefix than mm since many place use 
addrenv.



-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8391: tools: ARCHIVE uses the full path

2023-02-02 Thread via GitHub


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

   @zouboan fix is here #8419. It's better to enable Windows CI at least for 
one board, otherwise nobody can ensure the change doesn't break the build 
system you care about.


-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8419: tools: use relative paths when reverting to compile

2023-02-02 Thread via GitHub


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


##
tools/Config.mk:
##
@@ -48,7 +48,7 @@ else ifeq ($(V),)
 endif
 
 ifeq ($(ECHO_BEGIN),)
-  export ECHO_BEGIN=@echo 

Review Comment:
   why change this line



-- 
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: esp32c3: reserve CPUINTs 5 and 8 for BLE

2023-02-02 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 e710ae5daf226bab118d268983e7b878bf1bd392
Author: Alan Carvalho de Assis 
AuthorDate: Thu Feb 2 16:10:55 2023 -0300

esp32c3: reserve CPUINTs 5 and 8 for BLE
---
 arch/risc-v/src/esp32c3/esp32c3_irq.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/risc-v/src/esp32c3/esp32c3_irq.c 
b/arch/risc-v/src/esp32c3/esp32c3_irq.c
index 8159bfd941..c27e40e2c0 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_irq.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_irq.c
@@ -88,6 +88,14 @@
 #  define ESP32C3_WIFI_RESERVE_INT  (1 << ESP32C3_CPUINT_ALWAYS_RSVD)
 #endif
 
+#ifdef CONFIG_ESP32C3_BLE
+#  define ESP32C3_BLE_RESERVE_INT ((1 << ESP32C3_CPUINT_ALWAYS_RSVD) | \
+   (1 << ESP32C3_CPUINT_BT_BB) | \
+   (1 << ESP32C3_CPUINT_RWBLE))
+#else
+#  define ESP32C3_BLE_RESERVE_INT  (1 << ESP32C3_CPUINT_ALWAYS_RSVD)
+#endif
+
 /
  * Private Data
  /
@@ -103,7 +111,8 @@ static volatile uint8_t g_irqmap[NR_IRQS];
  */
 
 static uint32_t g_cpu_freeints = ESP32C3_CPUINT_PERIPHSET &
- (~ESP32C3_WIFI_RESERVE_INT);
+ (~ESP32C3_WIFI_RESERVE_INT &
+  ~ESP32C3_BLE_RESERVE_INT);
 
 /
  * Private Functions



[nuttx] 01/03: esp32c3: Always reserve CPU INT 0 and fix cpu init order

2023-02-02 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 e950e53df297f9004c7e1f6a51277b5a08f9e5de
Author: Alan Carvalho de Assis 
AuthorDate: Wed Feb 1 17:38:12 2023 -0300

esp32c3: Always reserve CPU INT 0 and fix cpu init order

Co-author: Tiago Medicci 
Co-author: Gustavo Henrique Nihei 
---
 arch/risc-v/include/esp32c3/irq.h | 12 +++-
 arch/risc-v/src/esp32c3/esp32c3_irq.c | 26 +-
 2 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/arch/risc-v/include/esp32c3/irq.h 
b/arch/risc-v/include/esp32c3/irq.h
index 9775a7a199..20dc46e377 100644
--- a/arch/risc-v/include/esp32c3/irq.h
+++ b/arch/risc-v/include/esp32c3/irq.h
@@ -46,8 +46,7 @@
 
 /* RESERVED interrupts: 0 to 14 */
 
-#define ESP32C3_PERIPH_MAC 0  /* Reserved, but needed by WiFi 
driver */
-#define ESP32C3_PERIPH_MAC_NMI 1  /* Reserved, but needed by WiFi 
driver */
+#define ESP32C3_PERIPH_WMAC1  /* Reserved, but needed by WiFi 
driver */
 
 #define ESP32C3_PERIPH_BT_BB   5 /* Reserved, but needed by BLE 
driver */
 #define ESP32C3_PERIPH_RWBLE   8 /* Reserved, but needed by BLE 
driver */
@@ -119,11 +118,7 @@
 #define ESP32C3_NCPUINTS   32
 #define ESP32C3_CPUINT_MAX (ESP32C3_NCPUINTS - 1)
 
-#define ESP32C3_CPUINT_MAC 0
-#define ESP32C3_CPUINT_MAC_NMI 1
-
-#define ESP32C3_CPUINT_BT_BB   5
-#define ESP32C3_CPUINT_RWBLE_IRQ   8
+#define ESP32C3_CPUINT_ALWAYS_RSVD 0
 
 #define ESP32C3_CPUINT_PERIPHSET   0x
 
@@ -149,8 +144,7 @@
 
 /* Peripheral IRQs */
 
-#define ESP32C3_IRQ_MAC (ESP32C3_IRQ_FIRSTPERIPH + 
ESP32C3_PERIPH_MAC)
-#define ESP32C3_IRQ_MAC_NMI (ESP32C3_IRQ_FIRSTPERIPH + 
ESP32C3_PERIPH_MAC_NMI)
+#define ESP32C3_IRQ_WMAC(ESP32C3_IRQ_FIRSTPERIPH + 
ESP32C3_PERIPH_WMAC)
 
 #define ESP32C3_IRQ_BT_BB   (ESP32C3_IRQ_FIRSTPERIPH + 
ESP32C3_PERIPH_BT_BB)
 #define ESP32C3_IRQ_RWBLE   (ESP32C3_IRQ_FIRSTPERIPH + 
ESP32C3_PERIPH_RWBLE)
diff --git a/arch/risc-v/src/esp32c3/esp32c3_irq.c 
b/arch/risc-v/src/esp32c3/esp32c3_irq.c
index 5b95ceed4a..8159bfd941 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_irq.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_irq.c
@@ -82,10 +82,10 @@
 #define ESP32C3_PRIO_INDEX(p)   ((p) - ESP32C3_MIN_PRIORITY)
 
 #ifdef CONFIG_ESP32C3_WIFI
-#  define ESP32C3_WIFI_RESERVE_INT  ((1 << ESP32C3_CPUINT_MAC | \
-  1 << ESP32C3_CPUINT_MAC_NMI))
+#  define ESP32C3_WIFI_RESERVE_INT  ((1 << ESP32C3_CPUINT_ALWAYS_RSVD | \
+  1 << ESP32C3_CPUINT_WMAC))
 #else
-#  define ESP32C3_WIFI_RESERVE_INT  0
+#  define ESP32C3_WIFI_RESERVE_INT  (1 << ESP32C3_CPUINT_ALWAYS_RSVD)
 #endif
 
 /
@@ -196,11 +196,15 @@ void up_irqinitialize(void)
   g_irqmap[i] = IRQ_UNMAPPED;
 }
 
+  /* Initialize CPU interrupts */
+
+  esp32c3_cpuint_initialize();
+
   /* Hard code special cases. */
 
 #ifdef CONFIG_ESP32C3_WIFI
-  g_irqmap[ESP32C3_IRQ_MAC_NMI] = ESP32C3_CPUINT_MAC_NMI;
-  g_cpu_intmap[ESP32C3_CPUINT_MAC_NMI]  = CPUINT_ASSIGN(ESP32C3_IRQ_MAC_NMI);
+  g_irqmap[ESP32C3_IRQ_WMAC] = ESP32C3_CPUINT_WMAC;
+  g_cpu_intmap[ESP32C3_CPUINT_WMAC]  = CPUINT_ASSIGN(ESP32C3_IRQ_WMAC);
 #endif
 
 #ifdef CONFIG_ESP32C3_BLE
@@ -211,10 +215,6 @@ void up_irqinitialize(void)
   g_cpu_intmap[ESP32C3_CPUINT_RWBLE] = CPUINT_ASSIGN(ESP32C3_IRQ_RWBLE);
 #endif
 
-  /* Initialize CPU interrupts */
-
-  esp32c3_cpuint_initialize();
-
   /* Attach the common interrupt handler */
 
   riscv_exception_attach();
@@ -248,7 +248,7 @@ void up_enable_irq(int irq)
 
   irqinfo("irq=%d | cpuint=%d \n", irq, cpuint);
 
-  DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32C3_CPUINT_MAX);
+  DEBUGASSERT(cpuint >= 1 && cpuint <= ESP32C3_CPUINT_MAX);
 
   irqstate = enter_critical_section();
   setbits(1 << cpuint, INTERRUPT_CPU_INT_ENABLE_REG);
@@ -269,7 +269,7 @@ void up_disable_irq(int irq)
 
   irqinfo("irq=%d | cpuint=%d \n", irq, cpuint);
 
-  DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32C3_CPUINT_MAX);
+  DEBUGASSERT(cpuint >= 1 && cpuint <= ESP32C3_CPUINT_MAX);
 
   if (cpuint == IRQ_UNMAPPED)
 {
@@ -358,7 +358,7 @@ int esp32c3_cpuint_initialize(void)
 {
   /* Disable all CPU interrupts on this CPU */
 
-  for (int i = 0; i < ESP32C3_NCPUINTS; i++)
+  for (int i = 1; i <= ESP32C3_CPUINT_MAX; i++)
 {
   putreg32(0, INTERRUPT_CPU_INT_PRI_0_REG + i * 4);
 }
@@ -473,7 +473,7 @@ int esp32c3_setup_irq(int periphid, int priority, int type)
   irq = ESP32C3_PERIPH2IRQ(periphid);
 
   DEBUGASSERT(periphid >= 0 && periphid < ESP32C3_NPERIPHERALS);
-  DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32C3_CPUINT_MAX);
+  DEBUGASSERT(cpuint >= 1 && cpuint <= 

[nuttx] 02/03: esp32c3: Fix WiFi adapter to use WMAC instead of MAC_NMI

2023-02-02 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 c12a60cb5aa0e714ad6e579d78a547464c6e3216
Author: Alan Carvalho de Assis 
AuthorDate: Wed Feb 1 18:07:40 2023 -0300

esp32c3: Fix WiFi adapter to use WMAC instead of MAC_NMI
---
 arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c 
b/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c
index 9b7bd06858..1d91f8bec7 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c
@@ -979,7 +979,7 @@ static void esp32c3_ints_on(uint32_t mask)
 
   wlinfo("INFO mask=%08lx irq=%d\n", mask, n);
 
-  up_enable_irq(ESP32C3_IRQ_MAC_NMI);
+  up_enable_irq(ESP32C3_IRQ_WMAC);
 }
 
 /
@@ -1002,7 +1002,7 @@ static void esp32c3_ints_off(uint32_t mask)
 
   wlinfo("INFO mask=%08lx irq=%d\n", mask, n);
 
-  up_disable_irq(ESP32C3_IRQ_MAC_NMI);
+  up_disable_irq(ESP32C3_IRQ_WMAC);
 }
 
 /



[nuttx] branch master updated (8845e6bb38 -> e710ae5daf)

2023-02-02 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 8845e6bb38 sensor: Report more gps info
 new e950e53df2 esp32c3: Always reserve CPU INT 0 and fix cpu init order
 new c12a60cb5a esp32c3: Fix WiFi adapter to use WMAC instead of MAC_NMI
 new e710ae5daf esp32c3: reserve CPUINTs 5 and 8 for BLE

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/risc-v/include/esp32c3/irq.h  | 12 +++--
 arch/risc-v/src/esp32c3/esp32c3_irq.c  | 37 --
 arch/risc-v/src/esp32c3/esp32c3_wifi_adapter.c |  4 +--
 3 files changed, 28 insertions(+), 25 deletions(-)



[GitHub] [nuttx] xiaoxiang781216 merged pull request #8415: esp32c3: fix cpuint issue

2023-02-02 Thread via GitHub


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


-- 
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



[GitHub] [nuttx] flyingfish89 commented on pull request #7992: modify the strtof

2023-02-02 Thread via GitHub


flyingfish89 commented on PR #7992:
URL: https://github.com/apache/nuttx/pull/7992#issuecomment-1414899118

   > This PR broke our tests.
   > 
   > Specifically the Lua test fails on the following line:
   > 
   > ```lua
   > assert(string.len(string.format('%99.99f', -1e308)) >= 100)
   > ```
   > 
   > `string.format('%99.99f', -1e308)` returns the following:
   > 
   > ```
   >
-inf
   > ```
   > 
   > Before this PR, the output was:
   > 
   > ```
   > 
-1.000
   > ```
   > 
   > **EDIT:** I tried the same on my computer. I am running Lua 5.4.4 on 
Fedora 37. The output now is:
   > 
   > ```
   > 
-11097906362944045541740492309677311846336810682903157585404911491537163328978494688899061249669721172515611590283743140088328307009198146046031271664502933027185697489699588559043338384466165001178426897626212945177628091195786707458122783970171784415105291802893207873272974885715430223118336.000
   > ```
   
   could you describe how this scenario would have been triggered


-- 
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



[GitHub] [nuttx] flyingfish89 commented on pull request #7992: modify the strtof

2023-02-02 Thread via GitHub


flyingfish89 commented on PR #7992:
URL: https://github.com/apache/nuttx/pull/7992#issuecomment-1414874429

   > If not CONFIG_HAVE_DOUBLE then should there be some adjustment to the 
strtox function to deal with different overflow levels etc?
   
   em,if not config_have_double ,the return is -inf when input is -1e138


-- 
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



[GitHub] [nuttx] Gary-Hobson opened a new pull request, #8419: tools: use relative paths when reverting to compile

2023-02-02 Thread via GitHub


Gary-Hobson opened a new pull request, #8419:
URL: https://github.com/apache/nuttx/pull/8419

   ## Summary
   Using the full path will make __FILE__ longer, which will lead to a larger 
flash footprint
   Revert 9c6c9fb0cdd3b8ada447463af56538c9ba1c1cbb && 
e14309a92da1502917d253b5f1dffa6d8d48e2a5
   
   
   ## 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



[GitHub] [nuttx] hartmannathan commented on pull request #7992: modify the strtof

2023-02-02 Thread via GitHub


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

   If not CONFIG_HAVE_DOUBLE then should there be some adjustment to the strtox 
function to deal with different overflow levels etc?


-- 
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



[GitHub] [nuttx-apps] Gary-Hobson closed pull request #1530: fix dump_string format error when CONFIG_ALLSYMS is not enabled

2023-02-02 Thread via GitHub


Gary-Hobson closed pull request #1530: fix dump_string format error when 
CONFIG_ALLSYMS is not enabled
URL: https://github.com/apache/nuttx-apps/pull/1530


-- 
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



[GitHub] [nuttx-apps] Gary-Hobson commented on a diff in pull request #1530: fix dump_string format error when CONFIG_ALLSYMS is not enabled

2023-02-02 Thread via GitHub


Gary-Hobson commented on code in PR #1530:
URL: https://github.com/apache/nuttx-apps/pull/1530#discussion_r1095315735


##
system/trace/trace_dump.c:
##
@@ -643,12 +643,21 @@ static int trace_dump_one(trace_dump_t type, FAR FILE 
*out, FAR uint8_t *p,
   (nst->nst_data[0] == 'B' ||
nst->nst_data[0] == 'E'))
 {
+#ifdef CONFIG_ALLSYMS
   fprintf(out, "tracing_mark_write: %c|%d|%pS\n",
   nst->nst_data[0], pid, (FAR void *)ip);
+#else
+  fprintf(out, "tracing_mark_write: %c|%d|%p\n",

Review Comment:
   PR has been submitted : https://github.com/apache/nuttx/pull/8418



-- 
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



[GitHub] [nuttx] Gary-Hobson opened a new pull request, #8418: libc: Keep printf("%pS", p) behavior consistent

2023-02-02 Thread via GitHub


Gary-Hobson opened a new pull request, #8418:
URL: https://github.com/apache/nuttx/pull/8418

   ## Summary
   libc: Keep printf("%pS", p) behavior consistent
   When ALLSYMS is not enable , %pS will be treated as %p
   
   ## 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



[GitHub] [nuttx] flyingfish89 closed issue #8327: a little question of esp32c3

2023-02-02 Thread via GitHub


flyingfish89 closed issue #8327: a little question of esp32c3
URL: https://github.com/apache/nuttx/issues/8327


-- 
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



[GitHub] [nuttx] flyingfish89 commented on issue #8327: a little question of esp32c3

2023-02-02 Thread via GitHub


flyingfish89 commented on issue #8327:
URL: https://github.com/apache/nuttx/issues/8327#issuecomment-1414731230

   > @flyingfish89 please test #8415 and let me know if it fixed the issue
   
   yes,it fixed the issue.


-- 
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



[GitHub] [nuttx] flyingfish89 commented on pull request #7992: modify the strtof

2023-02-02 Thread via GitHub


flyingfish89 commented on PR #7992:
URL: https://github.com/apache/nuttx/pull/7992#issuecomment-1414644171

   Have you configured CONFIG_HAVE_DOUBLE


-- 
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



[GitHub] [nuttx] flyingfish89 commented on pull request #7992: modify the strtof

2023-02-02 Thread via GitHub


flyingfish89 commented on PR #7992:
URL: https://github.com/apache/nuttx/pull/7992#issuecomment-1414637178

   
![捕获](https://user-images.githubusercontent.com/118660407/216494168-5b95bb1b-0cec-464b-92ee-169493625305.PNG)
   


-- 
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



[GitHub] [nuttx] flyingfish89 commented on pull request #7992: modify the strtof

2023-02-02 Thread via GitHub


flyingfish89 commented on PR #7992:
URL: https://github.com/apache/nuttx/pull/7992#issuecomment-1414627080

   > This PR broke our tests.
   > 
   > Specifically the Lua test fails on the following line:
   > 
   > ```lua
   > assert(string.len(string.format('%99.99f', -1e308)) >= 100)
   > ```
   > 
   > `string.format('%99.99f', -1e308)` returns the following:
   > 
   > ```
   >
-inf
   > ```
   > 
   > Before this PR, the output was:
   > 
   > ```
   > 
-1.000
   > ```
   > 
   > **EDIT:** I tried the same on my computer. I am running Lua 5.4.4 on 
Fedora 37. The output now is:
   > 
   > ```
   > 
-11097906362944045541740492309677311846336810682903157585404911491537163328978494688899061249669721172515611590283743140088328307009198146046031271664502933027185697489699588559043338384466165001178426897626212945177628091195786707458122783970171784415105291802893207873272974885715430223118336.000
   > ```
   
   I  have tried this test and return is 
   
![捕获](https://user-images.githubusercontent.com/118660407/216493401-53992786-d5cc-4925-b288-3d3cf4c36538.PNG)
   


-- 
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-website] branch asf-site updated: Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: 8845e6bb386e58ba1b82d68482a5a8302d3df573

2023-02-02 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/nuttx-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 1abd6fbb Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff 
docs: 8845e6bb386e58ba1b82d68482a5a8302d3df573
1abd6fbb is described below

commit 1abd6fbb7e15643b43684685b37ddb942fb2
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Fri Feb 3 00:13:24 2023 +

Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: 
8845e6bb386e58ba1b82d68482a5a8302d3df573
---
 content/docs/10.0.0/index.html | 2 +-
 content/docs/10.0.0/searchindex.js | 2 +-
 content/docs/10.0.1/index.html | 2 +-
 content/docs/10.0.1/searchindex.js | 2 +-
 content/docs/10.1.0/index.html | 2 +-
 content/docs/10.1.0/searchindex.js | 2 +-
 content/docs/10.2.0/index.html | 2 +-
 content/docs/10.2.0/searchindex.js | 2 +-
 content/docs/10.3.0/index.html | 2 +-
 content/docs/10.3.0/searchindex.js | 2 +-
 content/docs/11.0.0/index.html | 2 +-
 content/docs/11.0.0/searchindex.js | 2 +-
 content/docs/12.0.0/index.html | 2 +-
 content/docs/12.0.0/searchindex.js | 2 +-
 content/docs/latest/index.html | 2 +-
 content/docs/latest/searchindex.js | 2 +-
 content/feed.xml   | 4 ++--
 17 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html
index a5967426..c8908c20 100644
--- a/content/docs/10.0.0/index.html
+++ b/content/docs/10.0.0/index.html
@@ -133,7 +133,7 @@ by following these 
 NuttX Documentation
 NuttX is a real-time operating system (RTOS) with an emphasis on standards 
compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller 
environments, the primary governing standards in NuttX are Posix and ANSI 
standards. Additional standard APIs from Unix and other common RTOS’s (such as 
VxWorks) are adopted for functionality not available under these standards, or 
for functionality that is not appropriate for deeply-embedded environments 
(such as fork()).
-Last Updated: 02 February 23 at 00:10
+Last Updated: 03 February 23 at 00:10
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.0/searchindex.js 
b/content/docs/10.0.0/searchindex.js
index 81398e97..789b4c2a 100644
--- a/content/docs/10.0.0/searchindex.js
+++ b/content/docs/10.0.0/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen
 [...]
\ No newline at end of file
+Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen
 [...]
\ No newline at end of file
diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html
index c0534f4a..319a6f82 100644
--- a/content/docs/10.0.1/index.html
+++ b/content/docs/10.0.1/index.html
@@ -147,7 +147,7 @@ by following these 
 NuttX Documentation
 NuttX is a real-time operating system (RTOS) with an emphasis on standards 
compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller 
environments, the primary governing standards in NuttX are Posix and ANSI 
standards. Additional standard APIs from Unix and other common RTOS’s (such as 
VxWorks) are adopted for functionality not available under these standards, or 
for functionality that is not appropriate for deeply-embedded environments 
(such as fork()).
-Last Updated: 02 February 23 at 00:10
+Last Updated: 03 February 23 at 00:10
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.1/searchindex.js 
b/content/docs/10.0.1/searchindex.js
index 81398e97..789b4c2a 100644
--- a/content/docs/10.0.1/searchindex.js
+++ b/content/docs/10.0.1/searchindex.js
@@ -1 +1 @@

[nuttx-apps] branch master updated: Fix sensortest.c:168:40: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

2023-02-02 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-apps.git


The following commit(s) were added to refs/heads/master by this push:
 new 28d71b79a Fix sensortest.c:168:40: error: format specifies type 
'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') 
[-Werror,-Wformat]
28d71b79a is described below

commit 28d71b79a2fcbc8e98a1aaa83dd10d0215d0a80b
Author: Xiang Xiao 
AuthorDate: Fri Feb 3 01:53:38 2023 +0800

Fix sensortest.c:168:40: error: format specifies type 'unsigned long' but 
the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

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

diff --git a/testing/sensortest/sensortest.c b/testing/sensortest/sensortest.c
index 1c8e55137..3fd24d027 100644
--- a/testing/sensortest/sensortest.c
+++ b/testing/sensortest/sensortest.c
@@ -164,8 +164,8 @@ static void print_valf3(const char *buffer, const char 
*name)
 static void print_ecg(const char *buffer, const char *name)
 {
   struct sensor_ecg *event = (struct sensor_ecg *)buffer;
-  printf("%s: timestamp:%" PRIu64 " ecg:%.4f status:%lx", name,
- event->timestamp, event->ecg, event->status);
+  printf("%s: timestamp:%" PRIu64 " ecg:%.4f status:%" PRIu32,
+ name, event->timestamp, event->ecg, event->status);
 }
 
 static void print_ppgd(const char *buffer, const char *name)



[GitHub] [nuttx-apps] acassis merged pull request #1532: Fix sensortest.c:168:40: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wform

2023-02-02 Thread via GitHub


acassis merged PR #1532:
URL: https://github.com/apache/nuttx-apps/pull/1532


-- 
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



[GitHub] [nuttx] acassis commented on a diff in pull request #8411: Hpmicro

2023-02-02 Thread via GitHub


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


##
arch/risc-v/src/hpmicro/hpm6750/hpm_irq.c:
##
@@ -0,0 +1,214 @@
+/
+ * arch/risc-v/src/hpm6750/hpm6750_irq.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 "riscv_internal.h"
+#include "board.h"
+#include "hpm_interrupt.h"
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: up_irqinitialize
+ /
+
+void up_irqinitialize(void)
+{
+  int id;
+  uint32_t val;
+
+  /* Disable Machine interrupts */
+
+  up_irq_save();
+
+  /* Disable all global interrupts */
+
+  for (id = 1; id <= 127; id++)

Review Comment:
   If you want you can declare "int id = 1" here. Inside your arch/ you don't 
need to follow the C89 since you know that there is an up to date C compiler



##
arch/risc-v/src/hpmicro/hpm6750/Make.defs:
##
@@ -0,0 +1,28 @@
+
+# arch/risc-v/src/hpm6750/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.
+#
+
+
+include common/Make.defs
+
+# Specify our C code within this directory to be included
+CHIP_CSRCS = hpmicro$(DELIM)hpm6750$(DELIM)hpm_allocateheap.c 
hpmicro$(DELIM)hpm6750$(DELIM)hpm_clockconfig.c
+CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_irq.c 
hpmicro$(DELIM)hpm6750$(DELIM)hpm_irq_dispatch.c
+CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_lowputc.c 
hpmicro$(DELIM)hpm6750$(DELIM)hpm_serial.c
+CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_start.c 
hpmicro$(DELIM)hpm6750$(DELIM)hpm_timerisr.c
+CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_printf.c

Review Comment:
   You don't need to pass the entire patch, all file are already inside your 
hpm6750/
   Please look how it is done in other RISC-V chip like 
arch/risc-v/src/esp32c3/Make.defs



-- 
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



[GitHub] [nuttx] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


pussuw commented on code in PR #8355:
URL: https://github.com/apache/nuttx/pull/8355#discussion_r1095087265


##
include/nuttx/sched.h:
##
@@ -532,6 +526,12 @@ struct tcb_s
 
   FAR struct task_group_s *group;  /* Pointer to shared task group data */
 
+  /* Address Environment /
+
+#ifdef CONFIG_ARCH_ADDRENV
+  FAR struct addrenv_s *mm_own; /* Task (group) own memory mappings */

Review Comment:
   Should I change mm_curr to addrenv_curr too ?



-- 
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



[GitHub] [nuttx] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


pussuw commented on code in PR #8355:
URL: https://github.com/apache/nuttx/pull/8355#discussion_r1095086783


##
sched/sched/sched_releasetcb.c:
##
@@ -154,7 +154,11 @@ int nxsched_release_tcb(FAR struct tcb_s *tcb, uint8_t 
ttype)
 #ifdef CONFIG_ARCH_ADDRENV
   /* Release this thread's reference to the address environment */
 
-  ret = up_addrenv_detach(tcb->group, tcb);
+  ret = up_addrenv_detach(tcb);
+  if (ttype == TCB_FLAG_TTYPE_TASK)

Review Comment:
   It is fixed by the reference counter in the second patch. I think the 1st 
patch on itself does not work properly, the reference counter is needed as 
well. If you think it is better to merge / squash the first 2 patches I can do 
that ?



-- 
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



[GitHub] [nuttx] tmedicci commented on a diff in pull request #8415: esp32c3: fix cpuint issue

2023-02-02 Thread via GitHub


tmedicci commented on code in PR #8415:
URL: https://github.com/apache/nuttx/pull/8415#discussion_r1094991958


##
arch/risc-v/src/esp32c3/esp32c3_irq.c:
##
@@ -82,10 +82,18 @@
 #define ESP32C3_PRIO_INDEX(p)   ((p) - ESP32C3_MIN_PRIORITY)
 
 #ifdef CONFIG_ESP32C3_WIFI
-#  define ESP32C3_WIFI_RESERVE_INT  ((1 << ESP32C3_CPUINT_MAC | \
-  1 << ESP32C3_CPUINT_MAC_NMI))
+#  define ESP32C3_WIFI_RESERVE_INT  ((1 << ESP32C3_CPUINT_ALWAYS_RSVD | \
+  1 << ESP32C3_CPUINT_WMAC))
 #else
-#  define ESP32C3_WIFI_RESERVE_INT  0
+#  define ESP32C3_WIFI_RESERVE_INT  (1 << ESP32C3_CPUINT_ALWAYS_RSVD)
+#endif
+
+#ifdef CONFIG_ESP32C3_BLE
+#  define ESP32C3_BLE_RESERVE_INT ((1 << ESP32C3_CPUINT_ALWAYS_RSVD) | \
+   (1 << ESP32C3_CPUINT_BT_BB) | \
+   (1 << ESP32C3_CPUINT_RWBLE))
+#else
+#  define ESP32C3_BLE_RESERVE_INT  (1 << ESP32C3_CPUINT_ALWAYS_RSVD)

Review Comment:
   I think we should consider the Wi-Fi + BLE situation, shouldn't we?



-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-02 Thread via GitHub


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


##
arch/arm/src/armv7-a/arm_addrenv.c:
##
@@ -98,8 +98,6 @@
 #include 
 #include 
 
-#include 

Review Comment:
   move to the first patch



##
include/nuttx/sched.h:
##
@@ -532,6 +526,12 @@ struct tcb_s
 
   FAR struct task_group_s *group;  /* Pointer to shared task group data */
 
+  /* Address Environment /
+
+#ifdef CONFIG_ARCH_ADDRENV
+  FAR struct addrenv_s *mm_own; /* Task (group) own memory mappings */

Review Comment:
   mm_own->addrenv



##
include/nuttx/addrenv.h:
##
@@ -359,6 +367,117 @@ int addrenv_switch(FAR struct tcb_s *tcb);
 int addrenv_attach(FAR struct tcb_s *tcb,
FAR const struct arch_addrenv_s *addrenv);
 
+/
+ * Name: addrenv_join
+ *
+ * Description:
+ *   Join the parent process's address environment.
+ *
+ * Input Parameters:
+ *   ptcb - The tcb of the parent process.
+ *   tcb  - The tcb of the child process.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_join(FAR struct tcb_s *ptcb, FAR struct tcb_s *tcb);
+
+/
+ * Name: addrenv_leave
+ *
+ * Description:
+ *   Leave a process's address environment.
+ *
+ * Input Parameters:
+ *   tcb  - The tcb of the process.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_leave(FAR struct tcb_s *tcb);
+
+/
+ * Name: addrenv_take
+ *
+ * Description:
+ *   Take a reference to an address environment.
+ *
+ * Input Parameters:
+ *   addrenv - The address environment.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+void addrenv_take(FAR struct addrenv_s *addrenv);
+
+/
+ * Name: addrenv_take
+ *
+ * Description:
+ *   Take a reference to an address environment.
+ *
+ * Input Parameters:
+ *   addrenv - The address environment.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+void addrenv_take(FAR struct addrenv_s *addrenv);

Review Comment:
   remove dup with line 423



##
sched/addrenv/addrenv.c:
##
@@ -52,6 +53,39 @@
 
 static FAR struct addrenv_s *g_addrenv[CONFIG_SMP_NCPUS];
 
+/
+ * Private Functions
+ /
+
+/
+ * Name: addrenv_dsr
+ *
+ * Description:
+ *   Deferred service routine for destroying an address environment. This is
+ *   so that the heavy lifting is not done when the context is switching, or
+ *   from ISR.
+ *
+ * Input Parameters:
+ *   arg - Contains pointer to the address environment that is freed.
+ *
+ * Returned Value:
+ *   None.
+ *
+ /
+
+static void addrenv_dsr(FAR void *arg)

Review Comment:
   addrenv_dsr->addrenv_destroy



##
sched/sched/sched_releasetcb.c:
##
@@ -154,7 +154,11 @@ int nxsched_release_tcb(FAR struct tcb_s *tcb, uint8_t 
ttype)
 #ifdef CONFIG_ARCH_ADDRENV
   /* Release this thread's reference to the address environment */
 
-  ret = up_addrenv_detach(tcb->group, tcb);
+  ret = up_addrenv_detach(tcb);
+  if (ttype == TCB_FLAG_TTYPE_TASK)

Review Comment:
   how to handle the main thread exit before other threads in the same task



-- 
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



[GitHub] [nuttx] anchao commented on a diff in pull request #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


anchao commented on code in PR #8416:
URL: https://github.com/apache/nuttx/pull/8416#discussion_r1094956210


##
libs/libc/misc/lib_mutex.c:
##
@@ -300,14 +322,19 @@ int nxmutex_unlock(FAR mutex_t *mutex)
 {
   int ret;
 
+  if (nxmutex_is_reset(mutex))
+{
+  return OK;
+}
+
   DEBUGASSERT(nxmutex_is_hold(mutex));
 
   mutex->holder = NXMUTEX_NO_HOLDER;
 
   ret = _SEM_POST(>sem);
   if (ret < 0)
 {
-  return _SEM_ERRVAL(ret);

Review Comment:
   Done



-- 
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



[GitHub] [nuttx-apps] xiaoxiang781216 opened a new pull request, #1532: Fix sensortest.c:168:40: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')

2023-02-02 Thread via GitHub


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

   ## Summary
   
   ## Impact
   
   ## 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



[GitHub] [nuttx] anchao commented on a diff in pull request #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


anchao commented on code in PR #8416:
URL: https://github.com/apache/nuttx/pull/8416#discussion_r1094955256


##
libs/libc/misc/lib_mutex.c:
##
@@ -329,15 +356,9 @@ int nxmutex_unlock(FAR mutex_t *mutex)
 #if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
 int nxmutex_reset(FAR mutex_t *mutex)
 {
-  int ret;
+  mutex->holder = NXMUTEX_RESET;
 
-  ret = nxsem_reset(>sem, 1);
-  if (ret >= 0)
-{
-  mutex->holder = NXMUTEX_NO_HOLDER;
-}
-
-  return ret;
+  return nxsem_reset(>sem, 1);

Review Comment:
   Done



-- 
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



[GitHub] [nuttx] anchao commented on a diff in pull request #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


anchao commented on code in PR #8416:
URL: https://github.com/apache/nuttx/pull/8416#discussion_r1094953219


##
include/nuttx/mutex.h:
##
@@ -35,6 +35,7 @@
  /
 
 #define NXMUTEX_NO_HOLDER  ((pid_t)-1)
+#define NXMUTEX_RESET  ((pid_t)-2)

Review Comment:
   Done



-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


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


##
libs/libc/misc/lib_mutex.c:
##
@@ -329,15 +356,9 @@ int nxmutex_unlock(FAR mutex_t *mutex)
 #if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
 int nxmutex_reset(FAR mutex_t *mutex)
 {
-  int ret;
+  mutex->holder = NXMUTEX_RESET;
 
-  ret = nxsem_reset(>sem, 1);
-  if (ret >= 0)
-{
-  mutex->holder = NXMUTEX_NO_HOLDER;
-}
-
-  return ret;
+  return nxsem_reset(>sem, 1);

Review Comment:
   if we don't handle nxsem_reset error, it's better  change the return type of 
nxmutex_reset to void



##
libs/libc/misc/lib_mutex.c:
##
@@ -300,14 +322,19 @@ int nxmutex_unlock(FAR mutex_t *mutex)
 {
   int ret;
 
+  if (nxmutex_is_reset(mutex))
+{
+  return OK;
+}
+
   DEBUGASSERT(nxmutex_is_hold(mutex));
 
   mutex->holder = NXMUTEX_NO_HOLDER;
 
   ret = _SEM_POST(>sem);
   if (ret < 0)
 {
-  return _SEM_ERRVAL(ret);

Review Comment:
   should we restore the hold:
   mutex->holder = _SCHED_GETTID();



##
include/nuttx/mutex.h:
##
@@ -35,6 +35,7 @@
  /
 
 #define NXMUTEX_NO_HOLDER  ((pid_t)-1)
+#define NXMUTEX_RESET  ((pid_t)-2)

Review Comment:
   move to 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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


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

   > We are "playing around" with nxmutex for a while. Maybe we can consider 
implementing a separate kernel object instead of relying on semaphores?
   
   Unlock has to handle the abnormal case If mutex still support reset 
operation regardless whether you implement mutex from scratch or on top of 
semphare.


-- 
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



[GitHub] [nuttx] anchao commented on pull request #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


anchao commented on PR #8416:
URL: https://github.com/apache/nuttx/pull/8416#issuecomment-1414192532

   > We are "playing around" with nxmutex for a while. Maybe we can consider 
implementing a separate kernel object instead of relying on semaphores?
   
   Haha, yes, separated kernel object is a correct route, we will consider and 
plan to refactor mutex in recently.


-- 
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



[GitHub] [nuttx] gustavonihei commented on a diff in pull request #8417: Remove the remain MIN/MAX like macro

2023-02-02 Thread via GitHub


gustavonihei commented on code in PR #8417:
URL: https://github.com/apache/nuttx/pull/8417#discussion_r1094905475


##
fs/partition/fs_gpt.c:
##
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 

Review Comment:
   ```suggestion
   #include 
   ```



##
drivers/lcd/ssd1351.c:
##
@@ -24,6 +24,7 @@
 
 #include 
 
+#include 

Review Comment:
   ```suggestion
   #include 
   ```



-- 
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



[GitHub] [nuttx] pkarashchenko commented on pull request #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


pkarashchenko commented on PR #8416:
URL: https://github.com/apache/nuttx/pull/8416#issuecomment-1414158358

   We are "playing around" with nxmutex for a while. Maybe we can consider 
implementing a separate kernel object instead of relying on semaphores?


-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8417: Remove the remain MIN/MAX like macro

2023-02-02 Thread via GitHub


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


##
arch/sim/src/sim/posix/sim_alsa.c:
##
@@ -707,7 +701,7 @@ static void sim_audio_process(struct sim_audio_s *priv)
   else
 {
   expect = priv->playback ? apb->nbytes / priv->frame_size
-  : AUDMIN(apb->nmaxbytes, priv->buffer_size)
+  : MIN(apb->nmaxbytes, priv->buffer_size)

Review Comment:
   Done.



##
drivers/lcd/ssd1351.c:
##
@@ -105,9 +105,7 @@
 
 /* Macro Helpers /
 
-#define SSD1351_MAX(a, b)((a) > (b) ? (a) : (b))
-#define SSD1351_MIN(a, b)((a) < (b) ? (a) : (b))
-#define SSD1351_CLAMP(n, a, b)   SSD1351_MIN(SSD1351_MAX(n, a), b)
+#define SSD1351_CLAMP(n, a, b)   MIN(MAX(n, a), b)

Review Comment:
   Done.



-- 
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/sensortest: Fix the typo for ecg sensor

2023-02-02 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-apps.git


The following commit(s) were added to refs/heads/master by this push:
 new fea1b197d testing/sensortest: Fix the typo for ecg sensor
fea1b197d is described below

commit fea1b197d4c75f22664e9e3417eb510cb4c8aff7
Author: Xiang Xiao 
AuthorDate: Thu Feb 2 23:01:07 2023 +0800

testing/sensortest: Fix the typo for ecg sensor

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

diff --git a/testing/sensortest/sensortest.c b/testing/sensortest/sensortest.c
index 35975e9ce..1c8e55137 100644
--- a/testing/sensortest/sensortest.c
+++ b/testing/sensortest/sensortest.c
@@ -163,7 +163,7 @@ static void print_valf3(const char *buffer, const char 
*name)
 
 static void print_ecg(const char *buffer, const char *name)
 {
-  struct sensor_event_ecg *event = (struct sensor_event_ecg *)buffer;
+  struct sensor_ecg *event = (struct sensor_ecg *)buffer;
   printf("%s: timestamp:%" PRIu64 " ecg:%.4f status:%lx", name,
  event->timestamp, event->ecg, event->status);
 }



[GitHub] [nuttx-apps] acassis merged pull request #1531: testing/sensortest: Fix the typo for ecg sensor

2023-02-02 Thread via GitHub


acassis merged PR #1531:
URL: https://github.com/apache/nuttx-apps/pull/1531


-- 
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



[GitHub] [nuttx] acassis commented on a diff in pull request #8415: esp32c3: fix cpuint issue

2023-02-02 Thread via GitHub


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


##
arch/risc-v/src/esp32c3/esp32c3_irq.c:
##
@@ -211,10 +215,6 @@ void up_irqinitialize(void)
   g_cpu_intmap[ESP32C3_CPUINT_RWBLE] = CPUINT_ASSIGN(ESP32C3_IRQ_RWBLE);
 #endif
 
-  /* Initialize CPU interrupts */
-
-  esp32c3_cpuint_initialize();
-

Review Comment:
   The `esp32c3_cpuint_initialize` will initialize (memset) the g_cpu_intmap[] 
with UNASSIGNED, then these hardcode values attributed later are fine. So to 
keep it in since with ESP32 I will move it on ESP32 too.



-- 
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



[GitHub] [nuttx] gustavonihei commented on a diff in pull request #8417: Remove the remain MIN/MAX like macro

2023-02-02 Thread via GitHub


gustavonihei commented on code in PR #8417:
URL: https://github.com/apache/nuttx/pull/8417#discussion_r1094843401


##
drivers/lcd/ssd1351.c:
##
@@ -105,9 +105,7 @@
 
 /* Macro Helpers /
 
-#define SSD1351_MAX(a, b)((a) > (b) ? (a) : (b))
-#define SSD1351_MIN(a, b)((a) < (b) ? (a) : (b))
-#define SSD1351_CLAMP(n, a, b)   SSD1351_MIN(SSD1351_MAX(n, a), b)
+#define SSD1351_CLAMP(n, a, b)   MIN(MAX(n, a), b)

Review Comment:
   Need to include `sys/param.h` in this file.



-- 
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



[GitHub] [nuttx] gustavonihei commented on a diff in pull request #8417: Remove the remain MIN/MAX like macro

2023-02-02 Thread via GitHub


gustavonihei commented on code in PR #8417:
URL: https://github.com/apache/nuttx/pull/8417#discussion_r1094842381


##
arch/sim/src/sim/posix/sim_alsa.c:
##
@@ -707,7 +701,7 @@ static void sim_audio_process(struct sim_audio_s *priv)
   else
 {
   expect = priv->playback ? apb->nbytes / priv->frame_size
-  : AUDMIN(apb->nmaxbytes, priv->buffer_size)
+  : MIN(apb->nmaxbytes, priv->buffer_size)

Review Comment:
   Need to include `sys/param.h` in this file.



-- 
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



[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #8417: Remove the remain MIN/MAX like macro

2023-02-02 Thread via GitHub


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

   ## Summary
   
   Cotinue the work https://github.com/apache/nuttx/pull/8397
   
   ## Impact
   
   Minor
   
   ## 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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8201: Make 64-bit time_t unsigned

2023-02-02 Thread via GitHub


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


##
libs/libxx/libcxx.defs:
##
@@ -71,6 +71,23 @@ libcxx/src/locale.cpp_CXXFLAGS += -Wno-shadow
 libcxx/src/filesystem/directory_iterator.cpp_CXXFLAGS += -Wno-shadow
 libcxx/src/filesystem/operations.cpp_CXXFLAGS += -Wno-shadow
 
+# The following warning was observed with icicle:knsh config.
+# Looking at the code in question, it seems harmless to ignore.
+#
+# Note: For some reasons, GCC -Wall enables a different set of warnings
+# for C and C++.
+#
+# References:
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10604
+# 
https://github.com/gcc-mirror/gcc/blob/e54375d85d4aa5889869c2672158083b2106b623/gcc/c-family/c.opt#L1285-L1287
+#
+# CXX:  libcxx/src/condition_variable.cpp
+# libcxx/src/condition_variable.cpp: In member function 'void 
std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock&,
 std::__1::chrono::time_point > >)':
+# libcxx/src/condition_variable.cpp:64:19: error: comparison of integer 
expressions of different signedness: 'std::__1::chrono::duration::rep' {aka 'long long int'} and 'std::__1::__libcpp_numeric_limits::type' {aka 'long unsigned int'} [-Werror=sign-compare]
+#  if (s.count() < ts_sec_max)
+#  ~~^~~~
+libcxx/src/condition_variable.cpp_CXXFLAGS += -Wno-sign-compare

Review Comment:
   look like the patch can't pass CI, @yamt ?



-- 
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



[GitHub] [nuttx] gustavonihei commented on a diff in pull request #8415: esp32c3: fix cpuint issue

2023-02-02 Thread via GitHub


gustavonihei commented on code in PR #8415:
URL: https://github.com/apache/nuttx/pull/8415#discussion_r1094810636


##
arch/risc-v/src/esp32c3/esp32c3_irq.c:
##
@@ -211,10 +215,6 @@ void up_irqinitialize(void)
   g_cpu_intmap[ESP32C3_CPUINT_RWBLE] = CPUINT_ASSIGN(ESP32C3_IRQ_RWBLE);
 #endif
 
-  /* Initialize CPU interrupts */
-
-  esp32c3_cpuint_initialize();
-

Review Comment:
   This should not be moved above. Instead move the attribution of 
`g_cpu_intmap` for the special cases after `esp32c3_cpuint_initialize`, as it 
is done for ESP32:
   
https://github.com/apache/nuttx/blob/8845e6bb386e58ba1b82d68482a5a8302d3df573/arch/xtensa/src/esp32/esp32_irq.c#L452-L483



-- 
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



[GitHub] [nuttx] gustavonihei commented on a diff in pull request #8414: include: Add nitems() definition to sys/param.h

2023-02-02 Thread via GitHub


gustavonihei commented on code in PR #8414:
URL: https://github.com/apache/nuttx/pull/8414#discussion_r1094802707


##
include/sys/param.h:
##
@@ -43,6 +43,12 @@
 #  define MAX(a,b)  (((a) > (b)) ? (a) : (b))
 #endif  /* MAX */
 
+/* Macros for number of items. */
+
+#ifndef nitems

Review Comment:
   I suggest to keep both then. Since `nitems` is commonly defined in 
`sys/params.h`, it might be useful when integrating 3rd party apps.



##
include/sys/param.h:
##
@@ -43,6 +43,12 @@
 #  define MAX(a,b)  (((a) > (b)) ? (a) : (b))
 #endif  /* MAX */
 
+/* Macros for number of items. */
+
+#ifndef nitems

Review Comment:
   I suggest to keep both then. Since `nitems` is commonly defined in 
`sys/param.h`, it might be useful when integrating 3rd party apps.



-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8411: Hpmicro

2023-02-02 Thread via GitHub


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

   @chenzhihong007 please fix the check and compiler error.
   BTW, it's wrong to bring in the whole SDK into repo.


-- 
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



[GitHub] [nuttx] gustavonihei commented on a diff in pull request #8414: include: Add nitems() definition to sys/param.h

2023-02-02 Thread via GitHub


gustavonihei commented on code in PR #8414:
URL: https://github.com/apache/nuttx/pull/8414#discussion_r1094802707


##
include/sys/param.h:
##
@@ -43,6 +43,12 @@
 #  define MAX(a,b)  (((a) > (b)) ? (a) : (b))
 #endif  /* MAX */
 
+/* Macros for number of items. */
+
+#ifndef nitems

Review Comment:
   I suggest to keep both then. Having `nitems` declared might be useful when 
integrating 3rd party apps.



-- 
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



[GitHub] [nuttx] fjpanag commented on pull request #7992: modify the strtof

2023-02-02 Thread via GitHub


fjpanag commented on PR #7992:
URL: https://github.com/apache/nuttx/pull/7992#issuecomment-1414032529

   This PR broke our tests.
   
   Specifically the Lua test fails on the following line:
   
   ```lua
   assert(string.len(string.format('%99.99f', -1e308)) >= 100)
   ```
   
   `string.format('%99.99f', -1e308)` returns the following:
   
   ```

  -inf
   ```
   
   Before this PR, the output was:
   
   ```
   
-1.000
   ```


-- 
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



[GitHub] [nuttx] anchao opened a new pull request, #8416: misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()

2023-02-02 Thread via GitHub


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

   ## Summary
   
   misc/mutex: fix assertion if nxmutex_reset() before nxmutex_unlock()
   
   
   sim/rpserver
   
   ```
   NuttShell (NSH) NuttX-12.0.0
   server> cu
   _assert: Current Version: NuttX server 12.0.0 3ead669e7a-dirty Feb  2 2023 
23:53:48 sim
   _assert: Assertion failed : at file: libs/libc/misc/lib_mutex.c:303 task: cu 
0x5662fff4
   ```
   
   
   ## Impact
   
   N/A
   
   ## Testing
   
   sim/rpserver


-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8415: esp32c3: fix cpuint issue

2023-02-02 Thread via GitHub


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

   Sorry, fix here: https://github.com/apache/nuttx-apps/pull/1531


-- 
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



[GitHub] [nuttx-apps] xiaoxiang781216 opened a new pull request, #1531: testing/sensortest: Fix the typo for ecg sensor

2023-02-02 Thread via GitHub


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

   ## Summary
   
   ## Impact
   
   sensnortest
   
   ## 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



[GitHub] [nuttx] anchao commented on a diff in pull request #8414: include: Add nitems() definition to sys/param.h

2023-02-02 Thread via GitHub


anchao commented on code in PR #8414:
URL: https://github.com/apache/nuttx/pull/8414#discussion_r1094762275


##
include/sys/param.h:
##
@@ -43,6 +43,12 @@
 #  define MAX(a,b)  (((a) > (b)) ? (a) : (b))
 #endif  /* MAX */
 
+/* Macros for number of items. */
+
+#ifndef nitems

Review Comment:
   Yes, agree with you, ARRAY_SIZE() looks better than nitems(), let me keep 
the ARRAY_SIZE



-- 
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



[GitHub] [nuttx] davids5 commented on a diff in pull request #8414: include: Add nitems() definition to sys/param.h

2023-02-02 Thread via GitHub


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


##
include/sys/param.h:
##
@@ -43,6 +43,12 @@
 #  define MAX(a,b)  (((a) > (b)) ? (a) : (b))
 #endif  /* MAX */
 
+/* Macros for number of items. */
+
+#ifndef nitems

Review Comment:
   it was obvious  ARRAY_SIZE was macro when read in code. This look to be a 
function call.  It may not get found by someone adding code looking for and 
Array operation and then get duplicated again. 
   Can you use ARRAY_SIZE?



-- 
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



[GitHub] [nuttx] anchao commented on a diff in pull request #8414: include: Add nitems() definition to sys/param.h

2023-02-02 Thread via GitHub


anchao commented on code in PR #8414:
URL: https://github.com/apache/nuttx/pull/8414#discussion_r1094719031


##
include/sys/param.h:
##
@@ -43,6 +43,12 @@
 #  define MAX(a,b)  (((a) > (b)) ? (a) : (b))
 #endif  /* MAX */
 
+/* Macros for number of items. */
+
+#ifndef nitems
+#  define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))

Review Comment:
   Done



-- 
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



[GitHub] [nuttx] lucasssvaz commented on pull request #8415: esp32c3: fix cpuint issue

2023-02-02 Thread via GitHub


lucasssvaz commented on PR #8415:
URL: https://github.com/apache/nuttx/pull/8415#issuecomment-1413955475

   The CI failing doesn't seem related to the 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



[GitHub] [nuttx-apps] xiaoxiang781216 closed issue #1516: Unable to build cJSON

2023-02-02 Thread via GitHub


xiaoxiang781216 closed issue #1516: Unable to build cJSON
URL: https://github.com/apache/nuttx-apps/issues/1516


-- 
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



[GitHub] [nuttx] acassis opened a new pull request, #8415: esp32c3: fix cpuint issue

2023-02-02 Thread via GitHub


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

   ## Summary
   The CPUINT 0 is reserved, but it was allowed to be allocated
   ## Impact
   It will avoid issues with allocating CPU INT
   ## Testing
   esp32c3-devkit
   


-- 
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



[GitHub] [nuttx] acassis commented on issue #8327: a little question of esp32c3

2023-02-02 Thread via GitHub


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

   @flyingfish89 please test https://github.com/apache/nuttx/pull/8415 and let 
me know if it fixed the issue


-- 
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 (c375f3e6f -> bf140bcaa)

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

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


from c375f3e6f testing/drivertest: modify the test source code name
 new 57af6174f fix: sensor: update hall data type
 new bf140bcaa fix: sensor: support ECG event lead info

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:
 system/uorb/sensor/ecg.c|  5 +++--
 system/uorb/sensor/hall.c   |  3 ++-
 testing/sensortest/sensortest.c | 12 ++--
 3 files changed, 15 insertions(+), 5 deletions(-)



[nuttx-apps] 02/02: fix: sensor: support ECG event lead info

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

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

commit bf140bcaae313243c2ea88700721f3f7244e2ea7
Author: liucheng5 
AuthorDate: Wed Sep 28 11:06:27 2022 +0800

fix: sensor: support ECG event lead info

Lead info is added into sensor_ecg event struct. Uorb and sensortest shall 
be modified.

Signed-off-by: liucheng5 
---
 system/uorb/sensor/ecg.c|  5 +++--
 testing/sensortest/sensortest.c | 10 +-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/system/uorb/sensor/ecg.c b/system/uorb/sensor/ecg.c
index fdc050e83..f267c4c76 100644
--- a/system/uorb/sensor/ecg.c
+++ b/system/uorb/sensor/ecg.c
@@ -35,9 +35,10 @@ static void print_sensor_ecg_message(FAR const struct 
orb_metadata *meta,
   FAR const struct sensor_ecg *message = buffer;
   const orb_abstime now = orb_absolute_time();
 
-  uorbinfo_raw("%s:\ttimestamp: %" PRIu64 " (%" PRIu64 " us ago) ecg: %.4f",
+  uorbinfo_raw("%s:\ttimestamp: %" PRIu64 " (%" PRIu64 " us ago) ecg: %.4f "
+   "status:0x%" PRIx32 "",
meta->o_name, message->timestamp, now - message->timestamp,
-   message->ecg);
+   message->ecg, message->status);
 }
 #endif
 
diff --git a/testing/sensortest/sensortest.c b/testing/sensortest/sensortest.c
index 11c1b400e..35975e9ce 100644
--- a/testing/sensortest/sensortest.c
+++ b/testing/sensortest/sensortest.c
@@ -63,6 +63,7 @@ static void print_valf2(FAR const char *buffer, FAR const 
char *name);
 static void print_valf(FAR const char *buffer, FAR const char *name);
 static void print_valb(FAR const char *buffer, FAR const char *name);
 static void print_vali2(FAR const char *buffer, FAR const char *name);
+static void print_ecg(FAR const char *buffer, FAR const char *name);
 static void print_ppgd(FAR const char *buffer, FAR const char *name);
 static void print_ppgq(FAR const char *buffer, FAR const char *name);
 static void print_cap(FAR const char *buffer, FAR const char *name);
@@ -83,7 +84,7 @@ static const struct sensor_info g_sensor_info[] =
   {print_cap,   sizeof(struct sensor_cap),   "cap"},
   {print_valf,  sizeof(struct sensor_co2),   "co2"},
   {print_valf,  sizeof(struct sensor_dust),  "dust"},
-  {print_valf,  sizeof(struct sensor_ecg),   "ecg"},
+  {print_ecg,   sizeof(struct sensor_ecg),   "ecg"},
   {print_gps,   sizeof(struct sensor_gps),   "gps"},
   {print_gps_satellite,
 sizeof(struct sensor_gps_satellite), "gps_satellite"},
@@ -160,6 +161,13 @@ static void print_valf3(const char *buffer, const char 
*name)
  name, event->timestamp, event->r, event->g, event->b);
 }
 
+static void print_ecg(const char *buffer, const char *name)
+{
+  struct sensor_event_ecg *event = (struct sensor_event_ecg *)buffer;
+  printf("%s: timestamp:%" PRIu64 " ecg:%.4f status:%lx", name,
+ event->timestamp, event->ecg, event->status);
+}
+
 static void print_ppgd(const char *buffer, const char *name)
 {
   FAR struct sensor_ppgd *event = (FAR struct sensor_ppgd *)buffer;



[nuttx] branch master updated (2c8c35431d -> 8845e6bb38)

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

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


from 2c8c35431d fs/procfs: fix the issue of /proc/cpuload in SMP
 add 709da0fae4 fix: sensor: update hall data type
 add 70c6803db6 sensor: Add the calibration status flag
 add 1bcfb7af39 sensor: Enable ambient light sensor report ir strength
 add 2395c0f157 sensor: fix miwear sensor bb
 add 8845e6bb38 sensor: Report more gps info

No new revisions were added by this update.

Summary of changes:
 include/nuttx/sensors/sensor.h | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)



[nuttx-apps] 01/02: fix: sensor: update hall data type

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

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

commit 57af6174f05cd6c15c89325809d7c5dc7d7c8c74
Author: jinxudong 
AuthorDate: Tue Sep 6 11:27:14 2022 +0800

fix: sensor: update hall data type

update hall data type to int32_t

Signed-off-by: jinxudong 
---
 system/uorb/sensor/hall.c   | 3 ++-
 testing/sensortest/sensortest.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/system/uorb/sensor/hall.c b/system/uorb/sensor/hall.c
index f55409ff6..fa97e4e4d 100644
--- a/system/uorb/sensor/hall.c
+++ b/system/uorb/sensor/hall.c
@@ -35,7 +35,8 @@ static void print_sensor_hall_message(FAR const struct 
orb_metadata *meta,
   FAR const struct sensor_hall *message = buffer;
   const orb_abstime now = orb_absolute_time();
 
-  uorbinfo_raw("%s:\ttimestamp: %" PRIu64 " (%" PRIu64 " us ago) hall: %d",
+  uorbinfo_raw("%s:\ttimestamp: %" PRIu64 " (%" PRIu64 " us ago) "
+   "hall: %" PRIi32 "",
meta->o_name, message->timestamp, now - message->timestamp,
message->hall);
 }
diff --git a/testing/sensortest/sensortest.c b/testing/sensortest/sensortest.c
index 4a4b27f3a..11c1b400e 100644
--- a/testing/sensortest/sensortest.c
+++ b/testing/sensortest/sensortest.c
@@ -128,7 +128,7 @@ static void print_vec3(const char *buffer, const char *name)
 static void print_valb(const char *buffer, const char *name)
 {
   FAR struct sensor_hall *event = (FAR struct sensor_hall *)buffer;
-  printf("%s: timestamp:%" PRIu64 " value:%d\n",
+  printf("%s: timestamp:%" PRIu64 " value:%" PRIi32 "\n",
  name, event->timestamp, event->hall);
 }
 



[GitHub] [nuttx] GUIDINGLI merged pull request #8278: Minor sensor improvement

2023-02-02 Thread via GitHub


GUIDINGLI merged PR #8278:
URL: https://github.com/apache/nuttx/pull/8278


-- 
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



[GitHub] [nuttx-apps] GUIDINGLI merged pull request #1507: log hall and ecg sensor info correctly

2023-02-02 Thread via GitHub


GUIDINGLI merged PR #1507:
URL: https://github.com/apache/nuttx-apps/pull/1507


-- 
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: fs/procfs: fix the issue of /proc/cpuload in SMP

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

ligd 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 2c8c35431d fs/procfs: fix the issue of /proc/cpuload in SMP
2c8c35431d is described below

commit 2c8c35431db8e76255c8b16f3d5a41de212921b7
Author: fangxiang 
AuthorDate: Tue Jun 14 13:49:18 2022 +0800

fs/procfs: fix the issue of /proc/cpuload in SMP

Signed-off-by: ligd 
---
 fs/procfs/fs_procfscpuload.c | 28 +---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/fs/procfs/fs_procfscpuload.c b/fs/procfs/fs_procfscpuload.c
index b6850f21a8..39376e0bc4 100644
--- a/fs/procfs/fs_procfscpuload.c
+++ b/fs/procfs/fs_procfscpuload.c
@@ -201,7 +201,8 @@ static ssize_t cpuload_read(FAR struct file *filep, FAR 
char *buffer,
 
   if (filep->f_pos == 0)
 {
-  struct cpuload_s cpuload;
+  uint32_t total = 0;
+  uint32_t active = 0;
   uint32_t intpart;
   uint32_t fracpart;
 
@@ -209,18 +210,39 @@ static ssize_t cpuload_read(FAR struct file *filep, FAR 
char *buffer,
* fail if the PID is not valid.  This, however, should never happen
* for the IDLE thread.
*/
+#ifdef CONFIG_SMP
+  struct cpuload_s cpuloads[CONFIG_SMP_NCPUS];
+  uint32_t i;
+
+  for (i = 0; i < CONFIG_SMP_NCPUS; i++)
+{
+  DEBUGVERIFY(clock_cpuload(i, [i]));
+  active += cpuloads[i].active;
+}
+
+  total = cpuloads[0].total;
+#else
+  struct cpuload_s cpuload;
 
   DEBUGVERIFY(clock_cpuload(0, ));
+  active = cpuload.active;
+  total = cpuload.total;
+#endif
+
+  if (active > total)
+{
+  active = total;
+}
 
   /* On the simulator, you may hit cpuload.total == 0, but probably never
* on real hardware.
*/
 
-  if (cpuload.total > 0)
+  if (total > 0)
 {
   uint32_t tmp;
 
-  tmp  = 1000 - (1000 * cpuload.active) / cpuload.total;
+  tmp  = 1000 - (1000 * active) / total;
   intpart  = tmp / 10;
   fracpart = tmp - 10 * intpart;
 }



[GitHub] [nuttx] GUIDINGLI merged pull request #8270: fs/procfs: fix the issue of /proc/cpuload in SMP

2023-02-02 Thread via GitHub


GUIDINGLI merged PR #8270:
URL: https://github.com/apache/nuttx/pull/8270


-- 
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 (be1c84c96a -> 7e7d4ab744)

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

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


from be1c84c96a mm/mempool: Initialize spinlock with spin_initialize
 add 7e7d4ab744 touch: Add ioctl to enable/disable gesture

No new revisions were added by this update.

Summary of changes:
 include/nuttx/input/touchscreen.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



[GitHub] [nuttx] GUIDINGLI merged pull request #8275: touch: Add ioctl to enable/disable gesture

2023-02-02 Thread via GitHub


GUIDINGLI merged PR #8275:
URL: https://github.com/apache/nuttx/pull/8275


-- 
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 (984208f6a2 -> be1c84c96a)

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

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


from 984208f6a2 tools: parsememdump.py support show total pid memory
 new 555c4fede3 spinlock: Move spinlock_init to public macros
 new be1c84c96a mm/mempool: Initialize spinlock with spin_initialize

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:
 include/nuttx/spinlock.h | 39 ---
 mm/mempool/mempool.c |  2 +-
 2 files changed, 21 insertions(+), 20 deletions(-)



[nuttx] 01/02: spinlock: Move spinlock_init to public macros

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

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

commit 555c4fede3c19b862eb9466761c4f9a4f79c8f86
Author: anjiahao 
AuthorDate: Mon Nov 28 16:59:25 2022 +0800

spinlock: Move spinlock_init to public macros

Signed-off-by: anjiahao 
---
 include/nuttx/spinlock.h | 39 ---
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h
index 4d77b8611f..d3b858e9f0 100644
--- a/include/nuttx/spinlock.h
+++ b/include/nuttx/spinlock.h
@@ -128,25 +128,6 @@ static inline spinlock_t up_testset(volatile FAR 
spinlock_t *lock)
 }
 #endif
 
-/
- * Name: spin_initialize
- *
- * Description:
- *   Initialize a non-reentrant spinlock object to its initial,
- *   unlocked state.
- *
- * Input Parameters:
- *   lock  - A reference to the spinlock object to be initialized.
- *   state - Initial state of the spinlock {SP_LOCKED or SP_UNLOCKED)
- *
- * Returned Value:
- *   None.
- *
- /
-
-/* void spin_initialize(FAR spinlock_t *lock, spinlock_t state); */
-#define spin_initialize(l,s) do { *(l) = (s); } while (0)
-
 /
  * Name: spin_lock
  *
@@ -351,6 +332,26 @@ void spin_clrbit(FAR volatile cpu_set_t *set, unsigned int 
cpu,
 
 #endif /* CONFIG_SPINLOCK */
 
+/
+ * Name: spin_initialize
+ *
+ * Description:
+ *   Initialize a non-reentrant spinlock object to its initial,
+ *   unlocked state.
+ *
+ * Input Parameters:
+ *   lock  - A reference to the spinlock object to be initialized.
+ *   state - Initial state of the spinlock {SP_LOCKED or SP_UNLOCKED)
+ *
+ * Returned Value:
+ *   None.
+ *
+ /
+
+/* void spin_initialize(FAR spinlock_t *lock, spinlock_t state); */
+
+#define spin_initialize(l,s) do { *(l) = (s); } while (0)
+
 /
  * Name: spin_lock_irqsave
  *



[nuttx] 02/02: mm/mempool: Initialize spinlock with spin_initialize

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

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

commit be1c84c96af4c69507b18d1051702e71f12608d0
Author: Xiang Xiao 
AuthorDate: Fri Jan 27 20:51:57 2023 +0800

mm/mempool: Initialize spinlock with spin_initialize

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

diff --git a/mm/mempool/mempool.c b/mm/mempool/mempool.c
index 22641fe28f..297e84a6ac 100644
--- a/mm/mempool/mempool.c
+++ b/mm/mempool/mempool.c
@@ -206,7 +206,7 @@ int mempool_init(FAR struct mempool_s *pool, FAR const char 
*name)
   kasan_poison(base, size);
 }
 
-  pool->lock = 0;
+  spin_initialize(>lock, 0);
   if (pool->wait && pool->expandsize == 0)
 {
   nxsem_init(>waitsem, 0, 0);



[GitHub] [nuttx] GUIDINGLI merged pull request #8284: spinlock: Move spinlock_init to public macros

2023-02-02 Thread via GitHub


GUIDINGLI merged PR #8284:
URL: https://github.com/apache/nuttx/pull/8284


-- 
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 (eca4951021 -> 984208f6a2)

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

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


from eca4951021 nuttx: Use MIN/MAX definitions from "sys/param.h"
 add 984208f6a2 tools: parsememdump.py support show total pid memory

No new revisions were added by this update.

Summary of changes:
 tools/parsememdump.py | 17 +
 1 file changed, 17 insertions(+)
 mode change 100755 => 100644 tools/parsememdump.py



[GitHub] [nuttx] GUIDINGLI merged pull request #8307: tools: parsememdump.py support show total pid memory

2023-02-02 Thread via GitHub


GUIDINGLI merged PR #8307:
URL: https://github.com/apache/nuttx/pull/8307


-- 
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



[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1530: fix dump_string format error when CONFIG_ALLSYMS is not enabled

2023-02-02 Thread via GitHub


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


##
system/trace/trace_dump.c:
##
@@ -643,12 +643,21 @@ static int trace_dump_one(trace_dump_t type, FAR FILE 
*out, FAR uint8_t *p,
   (nst->nst_data[0] == 'B' ||
nst->nst_data[0] == 'E'))
 {
+#ifdef CONFIG_ALLSYMS
   fprintf(out, "tracing_mark_write: %c|%d|%pS\n",
   nst->nst_data[0], pid, (FAR void *)ip);
+#else
+  fprintf(out, "tracing_mark_write: %c|%d|%p\n",

Review Comment:
   let's fix printf to rmove S suffix instead.



-- 
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



[GitHub] [nuttx-apps] Gary-Hobson opened a new pull request, #1530: fix dump_string format error when CONFIG_ALLSYMS is not enabled

2023-02-02 Thread via GitHub


Gary-Hobson opened a new pull request, #1530:
URL: https://github.com/apache/nuttx-apps/pull/1530

   ## Summary
   When allsyms is not enabled, using trace dump -a will print one more 
character 'S'
   
  hello-7   [0]   4.18160: tracing_mark_write: B|7|0x56780da8S
  hello-7   [0]   5.18170: tracing_mark_write: E|7|0x5678113bS
   
   ## 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



[nuttx] branch master updated (df102d1f06 -> eca4951021)

2023-02-02 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 df102d1f06 Remove OK macro from the code base
 add eca4951021 nuttx: Use MIN/MAX definitions from "sys/param.h"

No new revisions were added by this update.

Summary of changes:
 arch/arm/src/phy62xx/types.h | 11 +++
 1 file changed, 3 insertions(+), 8 deletions(-)



[GitHub] [nuttx] xiaoxiang781216 merged pull request #8413: nuttx: Use MIN/MAX definitions from "sys/param.h"

2023-02-02 Thread via GitHub


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


-- 
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 (9ccff7b34 -> c375f3e6f)

2023-02-02 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-apps.git


from 9ccff7b34 apps/Application.mk: silent all compile output
 new 0a9b58ff8 testing/drivertest: add drivertest for cmocka driver 
testcases
 new c375f3e6f testing/drivertest: modify the test source code name

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:
 testing/drivertest/Kconfig | 26 ++
 {canutils/libobd2 => testing/drivertest}/Make.defs |  6 ++--
 .../flash_eraseall => testing/drivertest}/Makefile | 11 +++---
 .../drivertest/drivertest_simple.c | 40 +-
 4 files changed, 59 insertions(+), 24 deletions(-)
 create mode 100644 testing/drivertest/Kconfig
 copy {canutils/libobd2 => testing/drivertest}/Make.defs (88%)
 copy {fsutils/flash_eraseall => testing/drivertest}/Makefile (77%)
 copy graphics/lvgl/port/lv_port_syslog.c => 
testing/drivertest/drivertest_simple.c (74%)



[nuttx-apps] 02/02: testing/drivertest: modify the test source code name

2023-02-02 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

commit c375f3e6fce218092b2f30ba83c319f44f711342
Author: yintao 
AuthorDate: Tue Oct 25 10:55:32 2022 +0800

testing/drivertest: modify the test source code name

Signed-off-by: yintao 
---
 testing/drivertest/Makefile  |  2 +-
 .../{cmocka_driver_simple.c => drivertest_simple.c}  | 12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/testing/drivertest/Makefile b/testing/drivertest/Makefile
index 95f0dbc3d..7eb455851 100644
--- a/testing/drivertest/Makefile
+++ b/testing/drivertest/Makefile
@@ -25,7 +25,7 @@ STACKSIZE = $(CONFIG_TESTING_DRIVER_TEST_STACKSIZE)
 MODULE= $(CONFIG_TESTING_DRIVER_TEST)
 
 ifneq ($(CONFIG_TESTING_DRIVER_TEST_SIMPLE),)
-MAINSRC  += cmocka_driver_simple.c
+MAINSRC  += drivertest_simple.c
 PROGNAME += cmocka_driver_simple
 endif
 
diff --git a/testing/drivertest/cmocka_driver_simple.c 
b/testing/drivertest/drivertest_simple.c
similarity index 91%
rename from testing/drivertest/cmocka_driver_simple.c
rename to testing/drivertest/drivertest_simple.c
index bac383a5f..25cee8f9b 100644
--- a/testing/drivertest/cmocka_driver_simple.c
+++ b/testing/drivertest/drivertest_simple.c
@@ -1,5 +1,5 @@
 /
- * apps/testing/drivertest/cmocka_driver_simple.c
+ * apps/testing/drivertest/drivertest_simple.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -31,15 +31,15 @@
  * Private Functions
  /
 
-static void test_case_01(void **state)
+static void test_case_01(FAR void **state)
 {
-  (void) state;
+  UNUSED(state);
   assert_int_equal(0, 0);
 }
 
-static void test_case_02(void **state)
+static void test_case_02(FAR void **state)
 {
-  (void)state;
+  UNUSED(state);
   assert_string_not_equal("hello", "world");
 }
 
@@ -48,7 +48,7 @@ static void test_case_02(void **state)
  /
 
 /
- * cmocka_driver_simple_main
+ * drivertest_simple_main
  /
 
 int main(int argc, FAR char *argv[])



[nuttx-apps] 01/02: testing/drivertest: add drivertest for cmocka driver testcases

2023-02-02 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

commit 0a9b58ff8875d0a2c2dbadcca3b2e8710c05e159
Author: yintao 
AuthorDate: Mon Oct 24 20:14:47 2022 +0800

testing/drivertest: add drivertest for cmocka driver testcases

Signed-off-by: yintao 
---
 testing/drivertest/Kconfig| 26 +
 testing/drivertest/Make.defs  | 23 +++
 testing/drivertest/Makefile   | 32 
 testing/drivertest/cmocka_driver_simple.c | 63 +++
 4 files changed, 144 insertions(+)

diff --git a/testing/drivertest/Kconfig b/testing/drivertest/Kconfig
new file mode 100644
index 0..47fa1cd30
--- /dev/null
+++ b/testing/drivertest/Kconfig
@@ -0,0 +1,26 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config TESTING_DRIVER_TEST
+   tristate "vela cmocka driver test"
+   default n
+   ---help---
+   Enable the cmocka driver test
+
+if TESTING_DRIVER_TEST
+
+config TESTING_DRIVER_TEST_PRIORITY
+   int "Task priority"
+   default 100
+
+config TESTING_DRIVER_TEST_STACKSIZE
+   int "Stack size"
+   default DEFAULT_TASK_STACKSIZE
+
+config TESTING_DRIVER_TEST_SIMPLE
+   bool "Enable cmocka driver simple test"
+   default n
+
+endif
diff --git a/testing/drivertest/Make.defs b/testing/drivertest/Make.defs
new file mode 100644
index 0..4c397380e
--- /dev/null
+++ b/testing/drivertest/Make.defs
@@ -0,0 +1,23 @@
+
+# apps/testing/drivertest/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_DRIVER_TEST),)
+CONFIGURED_APPS += $(APPDIR)/testing/drivertest
+endif
diff --git a/testing/drivertest/Makefile b/testing/drivertest/Makefile
new file mode 100644
index 0..95f0dbc3d
--- /dev/null
+++ b/testing/drivertest/Makefile
@@ -0,0 +1,32 @@
+
+# apps/testing/drivertest/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
+
+PRIORITY  = $(CONFIG_TESTING_DRIVER_TEST_PRIORITY)
+STACKSIZE = $(CONFIG_TESTING_DRIVER_TEST_STACKSIZE)
+MODULE= $(CONFIG_TESTING_DRIVER_TEST)
+
+ifneq ($(CONFIG_TESTING_DRIVER_TEST_SIMPLE),)
+MAINSRC  += cmocka_driver_simple.c
+PROGNAME += cmocka_driver_simple
+endif
+
+include $(APPDIR)/Application.mk
diff --git a/testing/drivertest/cmocka_driver_simple.c 
b/testing/drivertest/cmocka_driver_simple.c
new file mode 100644
index 0..bac383a5f
--- /dev/null
+++ b/testing/drivertest/cmocka_driver_simple.c
@@ -0,0 +1,63 @@
+/
+ * apps/testing/drivertest/cmocka_driver_simple.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 

[GitHub] [nuttx-apps] xiaoxiang781216 merged pull request #1525: testing/drivertest: add drivertest for cmocka driver testcases

2023-02-02 Thread via GitHub


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


-- 
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



[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1525: testing/drivertest: add drivertest for cmocka driver testcases

2023-02-02 Thread via GitHub


xiaoxiang781216 commented on PR #1525:
URL: https://github.com/apache/nuttx-apps/pull/1525#issuecomment-1413811271

   let's ignore the Mix Case error


-- 
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: apps/Application.mk: silent all compile output

2023-02-02 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 9ccff7b34 apps/Application.mk: silent all compile output
9ccff7b34 is described below

commit 9ccff7b3498341900f6a01f3677c27a48d029bd8
Author: chao an 
AuthorDate: Thu Feb 2 17:54:29 2023 +0800

apps/Application.mk: silent all compile output

Signed-off-by: chao an 
---
 Application.mk | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/Application.mk b/Application.mk
index 158007549..43682cc50 100644
--- a/Application.mk
+++ b/Application.mk
@@ -109,34 +109,40 @@ all:: $(OBJS)
 .PRECIOUS: $(BIN)
 
 define ELFASSEMBLE
-   @echo "AS: $1"
+   $(ECHO_BEGIN)"AS: $1 "
$(Q) $(CC) -c $(AELFFLAGS) $($(strip $1)_AELFFLAGS) $1 -o $2
+   $(ECHO_END)
 endef
 
 define ELFCOMPILE
-   @echo "CC: $1"
+   $(ECHO_BEGIN)"CC: $1 "
$(Q) $(CC) -c $(CELFFLAGS) $($(strip $1)_CELFFLAGS) $1 -o $2
+   $(ECHO_END)
 endef
 
 define ELFCOMPILEXX
-   @echo "CXX: $1"
+   $(ECHO_BEGIN)"CXX: $1 "
$(Q) $(CXX) -c $(CXXELFFLAGS) $($(strip $1)_CXXELFFLAGS) $1 -o $2
+   $(ECHO_END)
 endef
 
 define ELFCOMPILERUST
-   @echo "RUSTC: $1"
+   $(ECHO_BEGIN)"RUSTC: $1 "
$(Q) $(RUSTC) --emit obj $(RUSTELFFLAGS) $($(strip $1)_RUSTELFFLAGS) $1 
-o $2
+   $(ECHO_END)
 endef
 
 define ELFCOMPILEZIG
-   @echo "ZIG: $1"
+   $(ECHO_BEGIN)"ZIG: $1 "
# Remove target suffix here since zig compiler add .o automatically
$(Q) $(ZIG) build-obj $(ZIGELFFLAGS) $($(strip $1)_ZIGELFFLAGS) --name 
$(basename $2) $1 
+   $(ECHO_END)
 endef
 
 define ELFLD
-   @echo "LD: $2"
+   $(ECHO_BEGIN)"LD: $2 "
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) $(ARCHCRT0OBJ) $1 $(LDSTARTGROUP) 
$(LDLIBS) $(LDENDGROUP) -o $2
+   $(ECHO_END)
 endef
 
 $(RAOBJS): %.s$(SUFFIX)$(OBJEXT): %.s



[GitHub] [nuttx-apps] xiaoxiang781216 merged pull request #1529: apps/Application.mk: silent all compile output

2023-02-02 Thread via GitHub


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


-- 
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: nxrecorder: add support to record media file.

2023-02-02 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 61c4050d3 nxrecorder: add support to record media file.
61c4050d3 is described below

commit 61c4050d31b13816fa619fca54be713f38bea7bf
Author: qiaohaijiao1 
AuthorDate: Wed Jan 18 13:49:25 2023 +0800

nxrecorder: add support to record media file.

Signed-off-by: qiaohaijiao1 
---
 include/system/nxrecorder.h |   9 +-
 system/nxrecorder/Kconfig   |  10 ++
 system/nxrecorder/nxrecorder.c  | 276 +---
 system/nxrecorder/nxrecorder_main.c |  91 +++-
 4 files changed, 353 insertions(+), 33 deletions(-)

diff --git a/include/system/nxrecorder.h b/include/system/nxrecorder.h
index 129a23170..a06d86df4 100644
--- a/include/system/nxrecorder.h
+++ b/include/system/nxrecorder.h
@@ -153,7 +153,7 @@ int nxrecorder_setdevice(FAR struct nxrecorder_s *precorder,
  FAR const char *device);
 
 /
- * Name: nxrecorder_recordraw
+ * Name: nxrecorder_recordinternal
  *
  *   Plays the specified media file (from the filesystem) using the
  *   Audio system.  If a preferred device has been set, that device
@@ -173,9 +173,10 @@ int nxrecorder_setdevice(FAR struct nxrecorder_s 
*precorder,
  *
  /
 
-int nxrecorder_recordraw(FAR struct nxrecorder_s *precorder,
- FAR const char *filename, uint8_t nchannels,
- uint8_t bpsamp, uint32_t samprate, uint8_t chmap);
+int nxrecorder_recordinternal(FAR struct nxrecorder_s *precorder,
+  FAR const char *filename, int filefmt,
+  uint8_t nchannels, uint8_t bpsamp,
+  uint32_t samprate, uint8_t chmap);
 
 /
  * Name: nxrecorder_stop
diff --git a/system/nxrecorder/Kconfig b/system/nxrecorder/Kconfig
index 4dee937c4..dd274eb2e 100644
--- a/system/nxrecorder/Kconfig
+++ b/system/nxrecorder/Kconfig
@@ -43,5 +43,15 @@ config NXRECORDER_INCLUDE_HELP
Compiles in the NxRecorder help text to provide online help
for available commands with syntax.
 
+config NXRECORDER_FMT_FROM_EXT
+   bool "Include code to determine Audio format from extension"
+   default y
+   ---help---
+   Compiles in extra code to determine audio format based
+   on the filename extension for known file types.
+   This feature is used if the format is not manually
+   specified, and will take priority over the more lengthy
+   file content detection approach.
+
 endif
 endif
diff --git a/system/nxrecorder/nxrecorder.c b/system/nxrecorder/nxrecorder.c
index 9b6cb4372..cc6f3fa20 100644
--- a/system/nxrecorder/nxrecorder.c
+++ b/system/nxrecorder/nxrecorder.c
@@ -58,6 +58,62 @@
 #  define CONFIG_NXRECORDER_RECORDTHREAD_STACKSIZE1500
 #endif
 
+/
+ * Private Type Declarations
+ /
+
+#ifdef CONFIG_NXRECORDER_FMT_FROM_EXT
+struct nxrecorder_ext_fmt_s
+{
+  FAR const char *ext;
+  uint16_t   format;
+  CODE int   (*getsubformat)(int fd);
+};
+#endif
+
+/
+ * Private Function Prototypes
+ /
+
+#ifdef CONFIG_AUDIO_FORMAT_MP3
+int nxrecorder_getmp3subformat(int fd);
+#endif
+
+/
+ * Private Data
+ /
+
+#ifdef CONFIG_NXRECORDER_FMT_FROM_EXT
+static const struct nxrecorder_ext_fmt_s g_known_ext[] =
+{
+#ifdef CONFIG_AUDIO_FORMAT_AC3
+  { "ac3",  AUDIO_FMT_AC3, NULL },
+#endif
+#ifdef CONFIG_AUDIO_FORMAT_MP3
+  { "mp3",  AUDIO_FMT_MP3, nxrecorder_getmp3subformat },
+#endif
+#ifdef CONFIG_AUDIO_FORMAT_DTS
+  { "dts",  AUDIO_FMT_DTS, NULL },
+#endif
+#ifdef CONFIG_AUDIO_FORMAT_WMA
+  { "wma",  AUDIO_FMT_WMA, NULL },
+#endif
+#ifdef CONFIG_AUDIO_FORMAT_PCM
+  { "wav",  AUDIO_FMT_PCM, NULL },
+#endif
+#ifdef CONFIG_AUDIO_FORMAT_MIDI
+  { "mid",  AUDIO_FMT_MIDI, NULL },
+  { "midi", AUDIO_FMT_MIDI, NULL },
+#endif
+#ifdef CONFIG_AUDIO_FORMAT_OGG_VORBIS
+  { "ogg",  AUDIO_FMT_OGG_VORBIS, NULL }
+#endif
+};
+
+static const int g_known_ext_count = sizeof(g_known_ext) /
+sizeof(struct nxrecorder_ext_fmt_s);
+#endif
+
 

[GitHub] [nuttx-apps] xiaoxiang781216 merged pull request #1523: nxrecorder: add support to record media file.

2023-02-02 Thread via GitHub


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


-- 
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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8414: include: Add nitems() definition to sys/param.h

2023-02-02 Thread via GitHub


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


##
include/sys/param.h:
##
@@ -43,6 +43,12 @@
 #  define MAX(a,b)  (((a) > (b)) ? (a) : (b))
 #endif  /* MAX */
 
+/* Macros for number of items. */
+
+#ifndef nitems
+#  define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))

Review Comment:
   ```suggestion
   #  define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
   ```



-- 
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   >