[GitHub] [nuttx] zyfeier opened a new pull request, #9019: arch/arm: change up_saveusercontext to assembly code

2023-04-12 Thread via GitHub


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

   ## Summary
   
   gdb will backtrace failure when use C code to save user context, because the 
stack push operation in C code can disrupt the stack information.
   
   ## Impact
   
   debug
   
   ## Testing
   
   tools/checkpatch.sh


-- 
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] zyfeier opened a new pull request, #9018: arch/arm: update running task when context switch occurred

2023-04-12 Thread via GitHub


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

   ## Summary
   
   Fix the issue of arm, armv7-ar and arm64 not updating the running task 
during context switch.
   
   ## Impact
   
   Debug
   
   ## Testing
   
   sabre-6quad:nsh


-- 
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 #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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


##
arch/sim/src/sim/win/sim_hostfs.c:
##
@@ -120,6 +120,11 @@ int host_open(const char *pathname, int flags, 
nuttx_mode_t mode)
   mapflags |= O_TRUNC;
 }
 
+  if (flags & NUTTX_O_BINARY)
+{
+  mapflags |= O_BINARY;
+}

Review Comment:
   Just ordinary developers, their habits are accumulated on the windows 
platform, now this PR changed the default mode to O_BINARY, I thinks this meets 
your suggestion



-- 
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 #9016: ci/cibuild.sh: upgrade esptool to 4.5.1

2023-04-12 Thread via GitHub


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

   emm... strange, there should be a issue with the python tool used in esptool


-- 
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, #9017: [DO NOT MERGE]esp32c6: comment out postbuild to confirm the ci issue

2023-04-12 Thread via GitHub


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

   ## Summary
   
   [DO NOT MERGE]esp32c6: comment out postbuild to confirm the ci issue
   
   
   ## Impact
   
   N/A
   
   ## Testing
   
   ci check


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

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

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



[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8773: drivers/dma: support dma driver model

2023-04-12 Thread via GitHub


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


##
include/nuttx/dma/dma.h:
##
@@ -0,0 +1,318 @@
+/
+ * include/nuttx/dma/dma.h
+ *
+ * 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.
+ *
+ /
+
+#ifndef __INCLUDE_NUTTX_DMA_DMA_H
+#define __INCLUDE_NUTTX_DMA_DMA_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+/
+ * Pre-processor Definitions
+ /
+
+/* DMA transfer direction indicator */
+
+#define DMA_MEM_TO_MEM  1
+#define DMA_MEM_TO_DEV  2
+#define DMA_DEV_TO_MEM  3
+#define DMA_DEV_TO_DEV  4
+
+#ifdef CONFIG_DMA_LINK
+#  define DMA_BLOCK_MODE0
+#  define DMA_SRC_LINK_MODE 1
+#  define DMA_DST_LINK_MODE 2
+#  define DMA_DUAL_LINK_MODE3
+#endif
+
+/
+ * Name: DMA_GET_CHAN
+ *
+ * Description:
+ *   Get a DMA channel. This function gives the caller mutually exclusive
+ *   access to the DMA channel specified by the 'ident' argument.
+ *
+ *   If the DMA channel is not available, then DMA_GET_CHAN will wait
+ *   until the holder of the channel relinquishes the channel by calling
+ *   DMA_PUT_CHAN().  WARNING: If you have two devices sharing a DMA
+ *   channel and the code never releases the channel, the DMA_GET_CHAN
+ *   call for the other will hang forever in this function!
+ *
+ * Input Parameters:
+ *   ident - Identifies the channel resource
+ *
+ * Returned Value:
+ *   Provided that 'ident' is valid, this function ALWAYS returns a non-NULL,
+ *   dma_chan_s instance.  (If 'ident' is invalid, the function will assert
+ *   if debug is enabled or do something ignorant otherwise).
+ *
+ /
+
+#define DMA_GET_CHAN(dev, ident) (dev)->get_chan(dev, ident)
+
+/
+ * Name: DMA_PUT_CHAN
+ *
+ * Description:
+ *   Release a DMA channel. If another thread is waiting for this DMA channel
+ *   in a call to DMA_GET_CHAN, then this function will re-assign the DMA
+ *   channel to that thread and wake it up. NOTE: The 'chan' used in this
+ *   argument must NEVER be used again until DMA_GET_CHAN() is called again
+ *   to re-gain access to the channel.
+ *
+ * Returned Value:
+ *   None
+ *
+ /
+
+#define DMA_PUT_CHAN(dev, chan) (dev)->put_chan(dev, chan)
+
+/
+ * Name: DMA_CONFIG
+ *
+ * Description:
+ *   Configure DMA before using
+ *
+ /
+
+#define DMA_CONFIG(chan, cfg) (chan)->ops->config(chan, cfg)
+
+/
+ * Name: DMA_START
+ *
+ * Description:
+ *   Start the DMA transfer. NOTE: The DMA module does *NOT* perform any
+ *   cache operations. It is the responsibility of the DMA client to clean
+ *   DMA buffers after staring of the DMA TX operations.
+ *
+ * Input Parameters:
+ *   chan - The channel to start
+ *   callback - The callback when the transfer finish
+ *   arg  - The argument will pass to callback
+ *   dst  - The destination address
+ *   src  - The source address
+ *   len  - The length to transfer
+ *
+ * Returned Value:
+ *   The error code
+ *
+ /
+
+#define DMA_START(chan, callback, arg, dst, src, len) \
+(chan)->ops->start(chan, callback, arg, dst, src, len)
+

[GitHub] [nuttx] Donny9 commented on a diff in pull request #8773: drivers/dma: support dma driver model

2023-04-12 Thread via GitHub


Donny9 commented on code in PR #8773:
URL: https://github.com/apache/nuttx/pull/8773#discussion_r1165005468


##
include/nuttx/dma/dma.h:
##
@@ -0,0 +1,313 @@
+/
+ * include/nuttx/dma/dma.h
+ *
+ * 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.
+ *
+ /
+
+#ifndef __INCLUDE_NUTTX_DMA_DMA_H
+#define __INCLUDE_NUTTX_DMA_DMA_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+/
+ * Pre-processor Definitions
+ /
+
+/* DMA transfer direction indicator */
+
+#define DMA_MEM_TO_MEM  1
+#define DMA_MEM_TO_DEV  2
+#define DMA_DEV_TO_MEM  3
+#define DMA_DEV_TO_DEV  4
+
+#ifdef CONFIG_DMA_LINK
+#  define DMA_BLOCK_MODE0
+#  define DMA_SRC_LINK_MODE 1
+#  define DMA_DST_LINK_MODE 2
+#  define DMA_DUAL_LINK_MODE3
+#endif
+
+/
+ * Name: DMA_GET_CHAN
+ *
+ * Description:
+ *   Get a DMA channel. This function gives the caller mutually exclusive
+ *   access to the DMA channel specified by the 'ident' argument.
+ *
+ *   If the DMA channel is not available, then DMA_GET_CHAN will wait
+ *   until the holder of the channel relinquishes the channel by calling
+ *   DMA_PUT_CHAN().  WARNING: If you have two devices sharing a DMA
+ *   channel and the code never releases the channel, the DMA_GET_CHAN
+ *   call for the other will hang forever in this function!
+ *
+ * Input Parameters:
+ *   ident - Identifies the channel resource
+ *
+ * Returned Value:
+ *   Provided that 'ident' is valid, this function ALWAYS returns a non-NULL,
+ *   dma_chan_s instance.  (If 'ident' is invalid, the function will assert
+ *   if debug is enabled or do something ignorant otherwise).
+ *
+ /
+
+#define DMA_GET_CHAN(dev, ident) (dev)->get_chan(dev, ident)
+
+/
+ * Name: DMA_PUT_CHAN
+ *
+ * Description:
+ *   Release a DMA channel. If another thread is waiting for this DMA channel
+ *   in a call to DMA_GET_CHAN, then this function will re-assign the DMA
+ *   channel to that thread and wake it up. NOTE: The 'chan' used in this
+ *   argument must NEVER be used again until DMA_GET_CHAN() is called again
+ *   to re-gain access to the channel.
+ *
+ * Returned Value:
+ *   None
+ *
+ /
+
+#define DMA_PUT_CHAN(dev, chan) (dev)->put_chan(dev, chan)
+
+/
+ * Name: DMA_CONFIG
+ *
+ * Description:
+ *   Configure DMA before using
+ *
+ /
+
+#define DMA_CONFIG(chan, cfg) (chan)->ops->config(chan, cfg)
+
+/
+ * Name: DMA_START
+ *
+ * Description:
+ *   Start the DMA transfer. NOTE: The DMA module does *NOT* perform any
+ *   cache operations. It is the responsibility of the DMA client to clean
+ *   DMA buffers after staring of the DMA TX operations.
+ *
+ * Input Parameters:
+ *   chan - The channel to start
+ *   callback - The callback when the transfer finish
+ *   arg  - The argument will pass to callback
+ *   dst  - The destination address
+ *   src  - The source address
+ *   len  - The length to transfer
+ *
+ * Returned Value:
+ *   The error code
+ *
+ /
+
+#define DMA_START(chan, callback, arg, dst, src, len) \
+(chan)->ops->start(chan, callback, arg, dst, src, len)
+

[GitHub] [nuttx] Donny9 commented on pull request #9007: sched/wqueue: fix issue about worker can't wake up thread before work_thread running

2023-04-12 Thread via GitHub


Donny9 commented on PR #9007:
URL: https://github.com/apache/nuttx/pull/9007#issuecomment-1506346361

   > What is the impact on LPWORK?
   
   Same impact for lpwork and hpwork. Because the priority of AppBringup is 
higher lpwork and hpwork.


-- 
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: 1fb7c7509c1d4c2677c5326e56b3014daf79f24d docs: 41f1044fa01edacab4537f8f17cb2e58b3db5c37

2023-04-12 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 9b3d0cf2 Publishing web: 1fb7c7509c1d4c2677c5326e56b3014daf79f24d 
docs: 41f1044fa01edacab4537f8f17cb2e58b3db5c37
9b3d0cf2 is described below

commit 9b3d0cf246682c7bb102abced7c7d3961c1776fa
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Thu Apr 13 00:11:31 2023 +

Publishing web: 1fb7c7509c1d4c2677c5326e56b3014daf79f24d docs: 
41f1044fa01edacab4537f8f17cb2e58b3db5c37
---
 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 025670f8..c9118802 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: 12 April 23 at 05:44
+Last Updated: 13 April 23 at 00:08
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.0/searchindex.js 
b/content/docs/10.0.0/searchindex.js
index 69ce1644..2b8d2de0 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 7da2334a..51cd3ff1 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: 12 April 23 at 05:44
+Last Updated: 13 April 23 at 00:09
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.1/searchindex.js 
b/content/docs/10.0.1/searchindex.js
index 69ce1644..bf01eed6 100644
--- a/content/docs/10.0.1/searchindex.js
+++ b/content/docs/10.0.1/searchindex.js
@@ -1 +1 @@

[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #9010: Added missing checks in strdup'ed strings.

2023-04-12 Thread via GitHub


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


##
drivers/wireless/gs2200m.c:
##
@@ -3531,6 +3537,7 @@ FAR void *gs2200m_register(FAR const char *devpath,
 
 errout:
   nxmutex_destroy(>dev_lock);
+  kmm_free(dev->path);

Review Comment:
   ```suggestion
 lib_free(dev->path);
   ```



-- 
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 a diff in pull request #7464: sched: fix context switching with locked scheduler

2023-04-12 Thread via GitHub


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


##
sched/sched/sched_reprioritizertr.c:
##
@@ -57,34 +57,67 @@ bool nxsched_reprioritize_rtr(FAR struct tcb_s *tcb, int 
priority)
 {
   bool switch_needed;
 
-  /* Remove the tcb task from the ready-to-run list.
-   * nxsched_remove_readytorun will return true if we just
-   * remove the head of the ready to run list.
+  /* We are not allowed to do a context switch if priority of a currently
+   * running task changes and the scheduler is locked
*/
 
-  switch_needed = nxsched_remove_readytorun(tcb, false);
+  if (tcb == this_task() && tcb->lockcount > 0)
+{
+  FAR struct tcb_s *ptcb;
 
-  /* Setup up the new task priority */
+  /* Setup up the new task priority */
 
-  tcb->sched_priority = (uint8_t)priority;
+  tcb->sched_priority = (uint8_t)priority;
 
-  /* Return the task to the specified blocked task list.
-   * nxsched_add_readytorun will return true if the task was
-   * added to the new list.  We will need to perform a context
-   * switch only if the EXCLUSIVE or of the two calls is non-zero
-   * (i.e., one and only one the calls changes the head of the
-   * ready-to-run list).
-   */
+  /* Move all tasks with the higher or equal priority to a newly assigned
+   * priority from ready-to-run to pending list
+   */
 
-  switch_needed ^= nxsched_add_readytorun(tcb);
+  for (ptcb = tcb->flink;

Review Comment:
   I will think about 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] pkarashchenko commented on pull request #9016: ci/cibuild.sh: upgrade esptool to 4.5.1

2023-04-12 Thread via GitHub


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

   Seems like it didn't help :(


-- 
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 closed issue #8927: Potential problem regarding `sigdeliver` when SMP is enabled

2023-04-12 Thread via GitHub


tmedicci closed issue #8927: Potential problem regarding `sigdeliver` when SMP 
is enabled
URL: https://github.com/apache/nuttx/issues/8927


-- 
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 issue #8927: Potential problem regarding `sigdeliver` when SMP is enabled

2023-04-12 Thread via GitHub


tmedicci commented on issue #8927:
URL: https://github.com/apache/nuttx/issues/8927#issuecomment-1505882700

   As explained in the updated PR's description 
(https://github.com/apache/nuttx/pull/8926). The bug is specific to xtensa 
devices and should not affect other architectures. 


-- 
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 pull request #8926: xtensa/sigdeliver: fix signal deliver when task is running on ther CPU

2023-04-12 Thread via GitHub


tmedicci commented on PR #8926:
URL: https://github.com/apache/nuttx/pull/8926#issuecomment-1505881019

   @masayuki2009 , @acassis , @lucasssvaz and @acassis : the PR was updated 
with an alternative (correct) fix for the problem. In fact, this a 
xtensa-specific behavior (other architectures aren't affected by this) and the 
proposal was explained in the commit's message, in the PR description, and in 
the code itself.
   
   The same approach was used by the software interrupt in  
https://github.com/apache/nuttx/blob/45394eb6dcd7d5c5ca651b8a28a038c3e3795536/arch/xtensa/src/common/xtensa_swint.c#L421
   
   Could you please take a look at 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



[nuttx] branch master updated (3f05df3fbb -> 41f1044fa0)

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

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


from 3f05df3fbb sim/win/hosttime: calculate sec/ms independently to avoid 
overflow
 add 41f1044fa0 ci/cibuild.sh: upgrade esptool to 4.5.1

No new revisions were added by this update.

Summary of changes:
 tools/ci/cibuild.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[GitHub] [nuttx] pkarashchenko merged pull request #9016: ci/cibuild.sh: upgrade esptool to 4.5.1

2023-04-12 Thread via GitHub


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


-- 
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 #9016: ci/cibuild.sh: upgrade esptool to 4.5.1

2023-04-12 Thread via GitHub


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

   I think we need to merge this PR. At least I can build the failing 
configuration with `esptool` 4.5


-- 
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] TimJTi commented on pull request #9012: APDS9922

2023-04-12 Thread via GitHub


TimJTi commented on PR #9012:
URL: https://github.com/apache/nuttx/pull/9012#issuecomment-1505828132

   Seems the risc-v tests are failing quite often. Anything I need to do to or 
is it unrelated to my 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] lucasssvaz commented on pull request #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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

   @anchao Nice catch! I had only checked the `Dockerfile`, I forgot about the 
`cibuild.sh`. Thanks for the help and the patch!


-- 
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 #9016: ci/cibuild.sh: upgrade esptool to 4.5.1

2023-04-12 Thread via GitHub


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

   This PR will fix the ci break when building esp32c6-devkit/coremark:
   https://github.com/apache/nuttx/pull/8997#issuecomment-1505715638


-- 
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 #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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

   > EDIT2: Nope, same thing happens. I'll try to build the docker image 
locally.
   
   @lucasssvaz 
   I can reproduce this problem if force esptool version to 3.3.1:
   
   ```bash
   $ pip install esptool==3.3.1
   $ make -j12
   CPP:  
/home/archer/code/nuttx/n1/nuttx/boards/risc-v/esp32c6/esp32c6-devkit/../common/scripts/esp32c6_rom.ld->
 /home/archer/code/nuttx/n1/nuttx/boards/risc-v/esp32c6/esp32c6-devkiCPP:  
/home/archer/code/nuttx/n1/nuttx/boards/risc-v/esp32c6/esp32c6-devkit/../common/scripts/flat_memory.ld->
 /home/archer/code/nuttx/n1/nuttx/boards/risc-v/esp32c6/esp32c6-devkiCPP:  
/home/archer/code/nuttx/n1/nuttx/boards/risc-v/esp32c6/esp32c6-devkit/../common/scripts/legacy_sections.ld->
 /home/archer/code/nuttx/n1/nuttx/boards/risc-v/esp32c6/esp32c6-dLD: nuttx
   CP: nuttx.hex
   MKIMAGE: ESP32-C6 binary
   esptool.py --chip esp32c6 elf2image --flash_mode dio --flash_size "4MB" -o 
nuttx.bin nuttx
   usage: esptool [-h] [--chip 
{auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2}]
 [--port PORT] [--baud BAUD]
  [--before 
{default_reset,usb_reset,no_reset,no_reset_no_sync}] [--after 
{hard_reset,soft_reset,no_reset,no_reset_stub}] [--no-stub] [--trace]
  [--override-vddsdio [{1.8V,1.9V,OFF}]] [--connect-attempts 
CONNECT_ATTEMPTS]
  
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,merge_bin,get_security_info,version}
  ...
   esptool: error: argument --chip/-c: invalid choice: 'esp32c6' (choose from 
'auto', 'esp8266', 'esp32', 'esp32s2', 'esp32s3beta2', 'esp32s3', 'esp32c3', 
'esp32c6beta', 'esp32h2beta1', 'esp32h2beta2', 'esp32c2')
   make: *** [tools/Unix.mk:527: nuttx] Error 2
   ```
   
   I think upgrade the esptool version to 4.5.1 should be able to fix this 
issue:
   https://github.com/apache/nuttx/pull/9016


-- 
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, #9016: ci/cibuild.sh: upgrade esptool to 4.5.1

2023-04-12 Thread via GitHub


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

   ## Summary
   
   ci/cibuild.sh: upgrade esptool to 4.5.1
   
   ## Impact
   
   N/A
   
   ## Testing
   
   ci check


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

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

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



[GitHub] [nuttx] davids5 commented on pull request #9006: stm32h7/rcc: make VOS0 configurable from board.h

2023-04-12 Thread via GitHub


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

   @raiden00pl Please add the "how to"  VOS0 can be selected from board.h to 
the commit message. and here  
https://github.com/apache/nuttx/blob/00fcbd97bdd586922ec4090f1217c80f7c234d4c/arch/arm/src/stm32h7/stm32h7x3xx_rcc.c#L108
 by adding xx to the board.h


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

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

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



[GitHub] [nuttx] davids5 commented on a diff in pull request #8943: stm32_eth: Added error handling for abnormal interrupts.

2023-04-12 Thread via GitHub


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


##
arch/arm/src/stm32/stm32_eth.c:
##
@@ -2046,8 +2042,23 @@ static void stm32_interrupt_work(void *arg)
   /* Clear the pending abnormal summary interrupt */
 
   stm32_putreg(ETH_DMAINT_AIS, STM32_ETH_DMASR);
+
+  /* As per the datasheet's recommendation, the MAC
+   * needs to be reset for all abnormal events. The
+   * scheduled job will take the interface down and
+   * up again.
+   */
+
+  work_queue(ETHWORK, >irqwork, stm32_txtimeout_work, priv, 0);

Review Comment:
   Do you need a delay to ensure this code exits with the net_unlock before 
stm32_txtimeout_work is called?



-- 
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 closed pull request #9014: ci: esptool upgrade

2023-04-12 Thread via GitHub


lucasssvaz closed pull request #9014: ci: esptool upgrade
URL: https://github.com/apache/nuttx/pull/9014


-- 
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 #9011: drivers/mtd:fix uninit data in mtd_config_fs

2023-04-12 Thread via GitHub


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

   @XinStellaris Since yesterday this config started breaking the CI. We are 
currently investigating this issue as this config is already a month old and 
only started to break things now.


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

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

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



[GitHub] [nuttx] davids5 commented on pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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

   ehhh F1's are going to be a a bit more work.
   
   Doing the conversions is not an issue, but since all the pins had no 
suffixes the only way to get the entries that should go into board.h is to 
parse the defonfig to get the IP blocks used. 


-- 
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 opened a new pull request, #9015: boards/xtensa/esp32: Add ESP32-PICO-KIT support

2023-04-12 Thread via GitHub


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

   ## Summary
   
   Add support for the ESP32-PICO-KIT board based on the ESP32-PICO-D4 SoP.
   
   ## Impact
   
   Improved support for ESP32 boards.
   
   ## Testing
   
   Tested using the provided `nsh` config.


-- 
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 opened a new pull request, #9014: ci: esptool upgrade

2023-04-12 Thread via GitHub


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

   ## Summary
   
   Test upgrading esptool
   
   ## 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] XinStellaris commented on pull request #9011: drivers/mtd:fix uninit data in mtd_config_fs

2023-04-12 Thread via GitHub


XinStellaris commented on PR #9011:
URL: https://github.com/apache/nuttx/pull/9011#issuecomment-1505586656

   Configuration/Tool: esp32c6-devkit/coremark
   

 Cleaning...
 Configuring...
 Building NuttX...
 % Total% Received % Xferd  Average Speed   TimeTime Time  
Current
Dload  Upload   Total   SpentLeft  Speed
   
 0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
 0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
   
   100  475k  100  475k0 0  1003k  0 --:--:-- --:--:-- --:--:-- 
1003k
   make: *** [tools/Unix.mk:527: nuttx] Error 2
   make: Target 'all' not remade because of errors.
 Normalize esp32c6-devkit/coremark
   
   it doesn't seem rightthis patch has nothing to do with esp32c6
   @pkarashchenko can you take a look at this ?


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

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

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



[GitHub] [nuttx] lucasssvaz commented on pull request #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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

   > @pkarashchenko @lucasssvaz It should fail in POSTBUILD, I need some time 
to align the environment with ci docker, maybe related to esptool:
   > 
   > https://github.com/apache/nuttx/blob/master/tools/esp32c6/Config.mk#L46-L62
   
   I don't know which version of `esptool` the CI is using but the latest 
releases had tons of improvements regarding C6 and H2.


-- 
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] yamt commented on a diff in pull request #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


yamt commented on code in PR #8997:
URL: https://github.com/apache/nuttx/pull/8997#discussion_r1164362036


##
arch/sim/src/sim/win/sim_hostfs.c:
##
@@ -120,6 +120,11 @@ int host_open(const char *pathname, int flags, 
nuttx_mode_t mode)
   mapflags |= O_TRUNC;
 }
 
+  if (flags & NUTTX_O_BINARY)
+{
+  mapflags |= O_BINARY;
+}

Review Comment:
   > > > > the semantics of nuttx (and many of unix-like systems) is "always 
O_BINARY". it seems a bit awkward to distinguish binary/text only for hostfs. 
isn't it simpler to always use O_BINARY in hostfs for windows?
   > > > 
   > > > 
   > > > we have some windows developers hope that the hosfs could be support 
both un/translated, I think bring back the O_BINARY define is a simply 
resolution for this case...
   > > 
   > > 
   > > what apps are they using? usually apps for nuttx (or unix in general) 
doesn't specify their text/binary intention. iirc posix even states fopen "b" 
mode is no-op.
   > 
   > If you don't pass O_BINARY on Windows, Windows will do the \n<->\r\n. By 
default, Windows do \n <-> \r\n converson, but Linux/macOS not. We need shield 
OS difference to keep the consistent behaviour.
   
   my point is that apps for nuttx usually don't specify binary/text.
   thus, regardless of this change, they might not work as you expected.
   
   > 
   > > i guess an alternative is to have a mount flag of hostfs.
   > 
   > Option isn't a good choice here. If you open a file with O_BINARY 
regardless the simulator run on Linux/macOS/Windows, VFS shouldn't do any 
conversion.
   
   



-- 
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 #8991: procfs: add total time running time of task

2023-04-12 Thread via GitHub


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


##
fs/procfs/fs_procfsproc.c:
##
@@ -854,9 +854,24 @@ static ssize_t proc_critmon(FAR struct proc_file_s 
*procfile,
 
   /* Generate output for maximum time thread running */
 
-  linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, "%lu.%09lu\n",
- (unsigned long)maxtime.tv_sec,
- (unsigned long)maxtime.tv_nsec);
+  linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, "%lu.%09lu,",
+ (unsigned long)ts.tv_sec,
+ (unsigned long)ts.tv_nsec);
+  copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining,
+   );
+
+  totalsize += copysize;
+  buffer+= copysize;
+  remaining -= copysize;
+
+  /* Show the total running time of the task */
+
+  up_perf_convert(tcb->run_time, );
+
+  linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,

Review Comment:
   merge to line 860



-- 
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 #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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

   @pkarashchenko @lucasssvaz It should fail in POSTBUILD, I need some time to 
align the environment with ci docker, maybe related to esptool:
   
   https://github.com/apache/nuttx/blob/master/tools/esp32c6/Config.mk#L46-L62


-- 
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 #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)

2023-04-12 Thread via GitHub


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


##
drivers/pipes/pipe_common.c:
##
@@ -171,56 +173,109 @@ int pipecommon_open(FAR struct file *filep)
 {
   dev->d_nwriters++;
 
-  /* If this is the first writer, then the read semaphore indicates the
-   * number of readers waiting for the first writer.  Wake them all up.
+  /* If this is the first writer, then the n-writers semaphore
+   * indicates the number of readers waiting for the first writer.
+   * Wake them all up!
*/
 
   if (dev->d_nwriters == 1)
 {
-  while (nxsem_get_value(>d_rdsem, ) == 0 && sval <= 0)
+  while (nxsem_get_value(>d_nwrsem, ) == OK && sval <= 0)
 {
-  nxsem_post(>d_rdsem);
+  nxsem_post(>d_nwrsem);
 }
 }
 }
 
+  while ((filep->f_oflags & O_NONBLOCK) == 0 && /* Blocking */
+ (filep->f_oflags & O_RDWR) == O_WRONLY &&  /* Write-only */

Review Comment:
   Yes, you are right. But I think we can move the while loop into if block. 



-- 
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 #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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


##
arch/sim/src/sim/win/sim_hostfs.c:
##
@@ -120,6 +120,11 @@ int host_open(const char *pathname, int flags, 
nuttx_mode_t mode)
   mapflags |= O_TRUNC;
 }
 
+  if (flags & NUTTX_O_BINARY)
+{
+  mapflags |= O_BINARY;
+}

Review Comment:
   > > > the semantics of nuttx (and many of unix-like systems) is "always 
O_BINARY". it seems a bit awkward to distinguish binary/text only for hostfs. 
isn't it simpler to always use O_BINARY in hostfs for windows?
   > > 
   > > 
   > > we have some windows developers hope that the hosfs could be support 
both un/translated, I think bring back the O_BINARY define is a simply 
resolution for this case...
   > 
   > what apps are they using? usually apps for nuttx (or unix in general) 
doesn't specify their text/binary intention. iirc posix even states fopen "b" 
mode is no-op.
   > 
   
   If you don't pass O_BINARY on Windows, Windows will do the \n<->\r\n. By 
default, Windows do \n <-> \r\n converson, but Linux/macOS not. We need shield 
OS difference to keep the consistent behaviour.
   
   > i guess an alternative is to have a mount flag of hostfs.
   
   Option isn't a good choice here. If you open a file with O_BINARY regardless 
the simulator run on Linux/macOS/Windows, VFS shouldn't do any conversion.



-- 
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 #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)

2023-04-12 Thread via GitHub


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


##
drivers/pipes/pipe_common.c:
##
@@ -105,6 +105,8 @@ FAR struct pipe_dev_s *pipecommon_allocdev(size_t bufsize)
   nxmutex_init(>d_bflock);
   nxsem_init(>d_rdsem, 0, 0);
   nxsem_init(>d_wrsem, 0, 0);
+  nxsem_init(>d_nrdsem, 0, 0);
+  nxsem_init(>d_nwrsem, 0, 0);

Review Comment:
   since the old design reuse rdsem, I would prefer that we follow the original 
design to minimize the code change. If you think the separation, make the code 
clean, it's better to do the refactor in a new patch either before or after 
this change.



-- 
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] slorquet commented on pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


slorquet commented on PR #8992:
URL: https://github.com/apache/nuttx/pull/8992#issuecomment-1505511366

   OK. I'll see what your tool does, and based on what it says, I will change 
my board.h to adapt the new non-legacy pinmap. Thank you for bringing this to 
our attention.


-- 
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] fjpanag opened a new pull request, #1713: Fixes in asprintf usage.

2023-04-12 Thread via GitHub


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

   ## Summary
   
   Similarly to [this](https://github.com/apache/nuttx/pull/9009), this PR 
fixes uses of `asprintf()` that their return value is not checked.
   
   ## Impact
   
   Potential bug fix.
   
   ## Testing
   
   CI only.
   


-- 
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 pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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

   > I am busy with radically different matters, sorry for that. 
   
   No worries. We are all busy
   
   >This looks quite complex. Is it executed automatically and what does it do 
if already executed on a board ?
   
   No. It is manual and will not modify any files. It will generate the legacy 
file if it does not exist and will not touch it after that.
   
   > At least I know to expect GPIO breakage, and if that does not work I will 
fix it. TBH we have frozen the version of nuttx we use, because we are not 
uh... happy with endless unexpected nuttx commit surprises.
   
   Yep.
   
   > 
   > Looking at my code it looks like you already had problems and told me so, 
my board.h already has macros to erase and re-apply speed settings on spi ports.
   
   Yes. The bummer is that we could not fix all pins before this PR.
   
   > 
   > So let's go ahead and we'll see. Sorry that my answer is not as 
authoritative as can be expected.
   
   Will do.
   
   


-- 
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] simbit18 opened a new pull request, #9013: drivers/sensors/Kconfig: Fix bmp280 texts in Kconfig

2023-04-12 Thread via GitHub


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

   ## Summary
   Fix SENSORS_BMP280 texts in Kconfig
   ## Impact
   none
   ## 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] slorquet commented on pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


slorquet commented on PR #8992:
URL: https://github.com/apache/nuttx/pull/8992#issuecomment-1505461608

   I am busy with radically different matters, sorry for that. This looks quite 
complex. Is it executed automatically and what does it do if already executed 
on a board ?
   
   At least I know to expect GPIO breakage, and if that does not work I will 
fix it. TBH we have frozen the version of nuttx we use, because we are not 
uh... happy with endless unexpected nuttx commit surprises.
   
   Looking at my code it looks like you already had problems and told me so, my 
board.h already has macros to erase and re-apply speed settings on spi ports.
   
   So let's go ahead and we'll see. Sorry that my answer is not as 
authoritative as can be expected.


-- 
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] TimJTi opened a new pull request, #9012: APDS9922

2023-04-12 Thread via GitHub


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

   ## Summary
   Add Broadcom APDS9922 ambient light and proximity sensor device driver. 
Attempt 3 and have now - hopefully - sorted my github issues (origin branch 
names not matching local repo names it seems).
   
   ## Impact
   None.
   
   ## Testing
   Custom board with ATSAMA5D27C-D1G and 2x apds9922 devices.


-- 
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 pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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

   > I looked at the F103 and the SPEED setting is coupled with making the pin 
an output. It is 0 for input.
   > 
   > ```
   > 00: Input mode (reset state)
   > 01: Output mode, max speed 10 MHz.
   > 10: Output mode, max speed 2 MHz.
   > 11: Output mode, max speed 50 MHz.
   > ```
   > 
   > So we would have to replace all SPEED_XXX with the lowest speed. Then 
provide a STM32_ADJUST_SPEED(pinset, speed) macro. to allow changing it at the 
board level.
   > 
   
   #define GPIO_USART1_RX STM32F1_ADJUST_MODE(GPIO_USART1_RX_0, 
GPIO_MODE_10MHz)`
   
   @slorquet,  @raiden00pl does this seem like a reasonable approach?
   
   


-- 
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 #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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


##
arch/arm/src/stm32/hardware/stm32_pinmap.h:
##
@@ -34,7 +34,11 @@
 /* STM32L15xx family */
 

Review Comment:
   @raiden00pl I think I will move the #pragma to the gpio.c file so there is 
only one warning.
   



-- 
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] XinStellaris opened a new pull request, #9011: drivers/mtd:fix uninit data in mtd_config_fs

2023-04-12 Thread via GitHub


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

   ## Summary
   There is an uninitialized data access in nvs_startup.
   
   ## Impact
   impact on NVS only
   
   ## Testing
   tested on cortex-m0+.
   


-- 
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 pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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

   > > Great job David! Later, I can help with upstream boards migration.
   > > If someone wonders why L5, U5, WB and WL5 are not affected in this PR 
(like me a moment ago), they are already OK.
   > 
   > I was thinking about this a bit more. I think we need to repeat the 
pattern on these arches as well. so that the board.h can change the pins 
characteristic on non suffixed pins. i.e. GPIO_UART5_TX -> GPIO_UART5_TX_0
   
   @raiden00pl I have done the stm32wb and stm32l5.
   
L5, U5 do not need to be done
   
   - arch/arm/src/stm32u5/hardware/stm32u585xx_pinmap.h - not needed all pins 
already suffixed
   - arch/arm/src/stm32wl5/hardware/stm32wl5_pinmap.h   - not needed all pins 
already suffixed
   
Also
   
   -   arch/arm/src/stm32/hardware/stm32g4xxp_pinmap.h- not needed all 
empty error place holder
   
   So what is left is the F1.


-- 
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 opened a new pull request, #9010: Added missing checks in strdup'ed strings.

2023-04-12 Thread via GitHub


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

   ## Summary
   
   Inspired by [this](https://github.com/apache/nuttx/pull/9009) I did a quick 
check on `strdup()`'s that their return string is not checked.
   
   This PR fixes a couple of such cases.
   
   ## Impact
   
   Potential bug fix.
   
   ## Testing
   
   CI & build test only.
   


-- 
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 #8972: ostest: Enabled KASAN, UBSAN & assertions.

2023-04-12 Thread via GitHub


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

   I ended up disabling the ostest  build in macOS...
   
   I think that the CI failure is unrelated?


-- 
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 #8943: stm32_eth: Added error handling for abnormal interrupts.

2023-04-12 Thread via GitHub


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

   Someone to review this, please?


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

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

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



[GitHub] [nuttx] fjpanag opened a new pull request, #9009: Fixes in asprintf usage.

2023-04-12 Thread via GitHub


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

   ## Summary
   
   Fixes the usage of asprintf, wherever the return value was not checked 
correctly.
   
   More information 
[here](https://lists.apache.org/thread/0m2llcc6osj8wlpnsojkvbfg2ltwj48w).
   
   ## Impact
   
   Potential bug fixes.
   
   ## Testing
   
   CI / build only.


-- 
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] raiden00pl commented on pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


raiden00pl commented on PR #8992:
URL: https://github.com/apache/nuttx/pull/8992#issuecomment-1505198573

   > I was thinking about this a bit more. I think we need to repeat the 
pattern on these arches as well. so that the board.h can change the pins 
characteristic on non suffixed pins. i.e. GPIO_UART5_TX -> GPIO_UART5_TX_0
   
   True. I forgot that this PR adds the _0 suffix. Better to keep all STM32s in 
sync as much as possible.


-- 
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] raiden00pl opened a new pull request, #9008: arch/nrf52: add QSPI support

2023-04-12 Thread via GitHub


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

   ## Summary
   
   - arch/nrf52: add QSPI support
   - boards/nrf52840-dk: add MX25 QSPI memory support
   
   ## Impact
   
   ## Testing
   Littlefs works on MX25 QSPI memory
   


-- 
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 issue #8917: nxsem_wait_irq with MMU

2023-04-12 Thread via GitHub


pussuw commented on issue #8917:
URL: https://github.com/apache/nuttx/issues/8917#issuecomment-1505177124

   I finally have time to dig into this issue. 
   
   I will fix the waitobj issue by mapping any such object into kernel 
addressable memory. I think semaphores and mqueues qualify as such (more?).
   
This achieves two things:
   - It once and for all fixes accessing (user) synchronization structures from 
the kernel
   - It avoids the unnecessary TLB flush / performance penalty when swapping 
mappings
   
   Patches related to this will start coming soonish.


-- 
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 #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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

   @anchao @pkarashchenko I'm testing why this config broke. Locally it builds 
fine as you said.
   It appears to be some change that was introduced in the last couple of days 
and is affecting only the CI. Was there any change to the CI 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] pkarashchenko commented on pull request #9002: sched/pthread: repalce sched_lcok to enter_critical_section

2023-04-12 Thread via GitHub


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

   Please fix commit message `sched_lcok` -> sched_lock


-- 
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 #9007: sched/wqueue: fix issue about worker can't wake up thread before work_thread running

2023-04-12 Thread via GitHub


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

   What is the impact on LPWORK?


-- 
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 #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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


##
tools/stm32_pinmap_tool.py:
##
@@ -0,0 +1,345 @@
+#!/usr/bin/env python3
+

Review Comment:
   Thnks 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] davids5 commented on a diff in pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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


##
arch/arm/src/stm32/hardware/stm32_pinmap.h:
##
@@ -101,26 +105,49 @@
 /* STM32 F2 Family **/
 
 #elif defined(CONFIG_STM32_STM32F20XX)
-#  include "hardware/stm32f20xxx_pinmap.h"
-
+#  if defined(STM32_USE_LEGACY_PINMAP)

Review Comment:
   Thanks 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] tmedicci commented on a diff in pull request #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)

2023-04-12 Thread via GitHub


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


##
drivers/pipes/pipe_common.c:
##
@@ -105,6 +105,8 @@ FAR struct pipe_dev_s *pipecommon_allocdev(size_t bufsize)
   nxmutex_init(>d_bflock);
   nxsem_init(>d_rdsem, 0, 0);
   nxsem_init(>d_wrsem, 0, 0);
+  nxsem_init(>d_nrdsem, 0, 0);
+  nxsem_init(>d_nwrsem, 0, 0);

Review Comment:
   `d_wrsem` (and `d_rdsem`) could both be reused (in fact, `d_rdsem` was being 
reused prior this PR). However, these semaphores had well-defined meanings:
   ```
 sem_t  d_rdsem;   /* Empty buffer - Reader waits for data write */
 sem_t  d_wrsem;   /* Full buffer - Writer waits for data read */
   ```
   
   I preferred not to reuse them following the _explicit is better than 
implicit_. Let me know if you prefer to save some bytes instead and I'll change 
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] tmedicci commented on a diff in pull request #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)

2023-04-12 Thread via GitHub


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


##
drivers/pipes/pipe.c:
##
@@ -243,22 +264,48 @@ int pipe2(int fd[2], int flags)
   return ERROR;
 }
 
-  /* Get a write file descriptor */
+  /* Check for the O_NONBLOCK bit on flags */
+
+  blocking = (flags & O_NONBLOCK) == 0;
+
+  /* Get a write file descriptor setting O_NONBLOCK temporarily */
 
-  fd[1] = open(devname, O_WRONLY | flags);
+  fd[1] = open(devname, O_WRONLY | O_NONBLOCK | flags);
   if (fd[1] < 0)
 {
   goto errout_with_driver;
 }
 
-  /* Get a read file descriptor */
+  /* Clear O_NONBLOCK if it was set previously */
+
+  if (blocking)
+{
+  ret = fcntl(fd[1], F_SETFL, flags & (~O_NONBLOCK));
+  if (ret < 0)
+{
+  goto errout_with_driver;
+}
+}
+
+  /* Get a read file descriptor setting O_NONBLOCK temporarily */
 
-  fd[0] = open(devname, O_RDONLY | flags);
+  fd[0] = open(devname, O_RDONLY | O_NONBLOCK | flags);

Review Comment:
   Yes! Only one side must be changed to nonblocking temporarily. There is no 
need to make the same for the other side. I'll revert 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] pkarashchenko commented on a diff in pull request #8773: drivers/dma: support dma driver model

2023-04-12 Thread via GitHub


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


##
include/nuttx/dma/dma.h:
##
@@ -0,0 +1,313 @@
+/
+ * include/nuttx/dma/dma.h
+ *
+ * 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.
+ *
+ /
+
+#ifndef __INCLUDE_NUTTX_DMA_DMA_H
+#define __INCLUDE_NUTTX_DMA_DMA_H
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+/
+ * Pre-processor Definitions
+ /
+
+/* DMA transfer direction indicator */
+
+#define DMA_MEM_TO_MEM  1
+#define DMA_MEM_TO_DEV  2
+#define DMA_DEV_TO_MEM  3
+#define DMA_DEV_TO_DEV  4
+
+#ifdef CONFIG_DMA_LINK
+#  define DMA_BLOCK_MODE0
+#  define DMA_SRC_LINK_MODE 1
+#  define DMA_DST_LINK_MODE 2
+#  define DMA_DUAL_LINK_MODE3
+#endif
+
+/
+ * Name: DMA_GET_CHAN
+ *
+ * Description:
+ *   Get a DMA channel. This function gives the caller mutually exclusive
+ *   access to the DMA channel specified by the 'ident' argument.
+ *
+ *   If the DMA channel is not available, then DMA_GET_CHAN will wait
+ *   until the holder of the channel relinquishes the channel by calling
+ *   DMA_PUT_CHAN().  WARNING: If you have two devices sharing a DMA
+ *   channel and the code never releases the channel, the DMA_GET_CHAN
+ *   call for the other will hang forever in this function!
+ *
+ * Input Parameters:
+ *   ident - Identifies the channel resource
+ *
+ * Returned Value:
+ *   Provided that 'ident' is valid, this function ALWAYS returns a non-NULL,
+ *   dma_chan_s instance.  (If 'ident' is invalid, the function will assert
+ *   if debug is enabled or do something ignorant otherwise).
+ *
+ /
+
+#define DMA_GET_CHAN(dev, ident) (dev)->get_chan(dev, ident)
+
+/
+ * Name: DMA_PUT_CHAN
+ *
+ * Description:
+ *   Release a DMA channel. If another thread is waiting for this DMA channel
+ *   in a call to DMA_GET_CHAN, then this function will re-assign the DMA
+ *   channel to that thread and wake it up. NOTE: The 'chan' used in this
+ *   argument must NEVER be used again until DMA_GET_CHAN() is called again
+ *   to re-gain access to the channel.
+ *
+ * Returned Value:
+ *   None
+ *
+ /
+
+#define DMA_PUT_CHAN(dev, chan) (dev)->put_chan(dev, chan)
+
+/
+ * Name: DMA_CONFIG
+ *
+ * Description:
+ *   Configure DMA before using
+ *
+ /
+
+#define DMA_CONFIG(chan, cfg) (chan)->ops->config(chan, cfg)
+
+/
+ * Name: DMA_START
+ *
+ * Description:
+ *   Start the DMA transfer. NOTE: The DMA module does *NOT* perform any
+ *   cache operations. It is the responsibility of the DMA client to clean
+ *   DMA buffers after staring of the DMA TX operations.
+ *
+ * Input Parameters:
+ *   chan - The channel to start
+ *   callback - The callback when the transfer finish
+ *   arg  - The argument will pass to callback
+ *   dst  - The destination address
+ *   src  - The source address
+ *   len  - The length to transfer
+ *
+ * Returned Value:
+ *   The error code
+ *
+ /
+
+#define DMA_START(chan, callback, arg, dst, src, len) \
+(chan)->ops->start(chan, callback, arg, dst, src, len)
+

[GitHub] [nuttx] tmedicci commented on a diff in pull request #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)

2023-04-12 Thread via GitHub


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


##
drivers/pipes/pipe_common.c:
##
@@ -284,7 +339,8 @@ int pipecommon_close(FAR struct file *filep)
 
   poll_notify(dev->d_fds, CONFIG_DEV_PIPE_NPOLLWAITERS, POLLHUP);
 
-  while (nxsem_get_value(>d_rdsem, ) == 0 && sval <= 0)
+  while (nxsem_get_value(>d_rdsem, ) == OK &&

Review Comment:
   Alright! I'll do 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] tmedicci commented on a diff in pull request #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)

2023-04-12 Thread via GitHub


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


##
drivers/pipes/pipe_common.c:
##
@@ -171,56 +173,109 @@ int pipecommon_open(FAR struct file *filep)
 {
   dev->d_nwriters++;
 
-  /* If this is the first writer, then the read semaphore indicates the
-   * number of readers waiting for the first writer.  Wake them all up.
+  /* If this is the first writer, then the n-writers semaphore
+   * indicates the number of readers waiting for the first writer.
+   * Wake them all up!
*/
 
   if (dev->d_nwriters == 1)
 {
-  while (nxsem_get_value(>d_rdsem, ) == 0 && sval <= 0)
+  while (nxsem_get_value(>d_nwrsem, ) == OK && sval <= 0)
 {
-  nxsem_post(>d_rdsem);
+  nxsem_post(>d_nwrsem);
 }
 }
 }
 
+  while ((filep->f_oflags & O_NONBLOCK) == 0 && /* Blocking */
+ (filep->f_oflags & O_RDWR) == O_WRONLY &&  /* Write-only */
+ dev->d_nreaders < 1 && /* No readers on the pipe 
*/
+ dev->d_wrndx == dev->d_rdndx)  /* Buffer is empty */
+{
+  /* If opened for write-only, then wait for at least one reader
+   * on the pipe.
+   */
+
+  nxmutex_unlock(>d_bflock);
+
+  ret = nxsem_wait(>d_nrdsem);
+  if (ret < 0)
+{
+  ferr("ERROR: nxsem_wait failed: %d\n", ret);
+
+  /* Immediately close the pipe that we just opened */
+
+  pipecommon_close(filep);
+  return ret;
+}
+
+  /* The nxmutex_lock() call should fail if we are awakened by a
+   * signal or if the task is canceled.
+   */
+
+  ret = nxmutex_lock(>d_bflock);
+  if (ret < 0)
+{
+  ferr("ERROR: nxmutex_lock failed: %d\n", ret);
+
+  /* Immediately close the pipe that we just opened */
+
+  pipecommon_close(filep);
+  return ret;
+}
+}
+
   /* If opened for reading, increment the count of reader on on the pipe
* instance.
*/
 
   if ((filep->f_oflags & O_RDOK) != 0)
 {
   dev->d_nreaders++;
+
+  /* If this is the first reader, then the n-readers semaphore
+   * indicates the number of writers waiting for the first reader.
+   * Wake them all up.
+   */
+
+  if (dev->d_nreaders == 1)
+{
+  while (nxsem_get_value(>d_nrdsem, ) == OK && sval <= 0)
+{
+  nxsem_post(>d_nrdsem);
+}
+}
 }
 
-  while ((filep->f_oflags & O_NONBLOCK) == 0 &&/* Non-blocking */
- (filep->f_oflags & O_RDWR) == O_RDONLY && /* Read-only */
- dev->d_nwriters < 1 &&/* No writers on the pipe */
- dev->d_wrndx == dev->d_rdndx) /* Buffer is empty */
+  while ((filep->f_oflags & O_NONBLOCK) == 0 && /* Blocking */
+ (filep->f_oflags & O_RDWR) == O_RDONLY &&  /* Read-only */

Review Comment:
   Please check the above comment 
(https://github.com/apache/nuttx/pull/8985#discussion_r1164010390)



-- 
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 #8985: drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant (blocking `open`)

2023-04-12 Thread via GitHub


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


##
drivers/pipes/pipe_common.c:
##
@@ -171,56 +173,109 @@ int pipecommon_open(FAR struct file *filep)
 {
   dev->d_nwriters++;
 
-  /* If this is the first writer, then the read semaphore indicates the
-   * number of readers waiting for the first writer.  Wake them all up.
+  /* If this is the first writer, then the n-writers semaphore
+   * indicates the number of readers waiting for the first writer.
+   * Wake them all up!
*/
 
   if (dev->d_nwriters == 1)
 {
-  while (nxsem_get_value(>d_rdsem, ) == 0 && sval <= 0)
+  while (nxsem_get_value(>d_nwrsem, ) == OK && sval <= 0)
 {
-  nxsem_post(>d_rdsem);
+  nxsem_post(>d_nwrsem);
 }
 }
 }
 
+  while ((filep->f_oflags & O_NONBLOCK) == 0 && /* Blocking */
+ (filep->f_oflags & O_RDWR) == O_WRONLY &&  /* Write-only */

Review Comment:
   I'm afraid that the logic wouldn't be the same if we move this `while` block 
into `if` block at 172 + removing the `O_WRONLY` check: 
   
   `if ((filep->f_oflags & O_WROK) != 0)` only checks if the file is open for 
writing (it could be open for writing and reading and this check would still be 
valid). But the logic for blocking open, according to IEEE Std 1003.1-2017, is 
valid only when is being opened for writing/reading-only (`(filep->f_oflags & 
O_RDWR) == O_WRONLY` assures that). An intermediary solution would be moving 
but letting the `O_WRONLY` check.
   
   Am I missing something?



-- 
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] Donny9 opened a new pull request, #9007: sched/wqueue: fix issue about worker can't wake up thread before work_thread running

2023-04-12 Thread via GitHub


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

   
   ## Summary
   sched/wqueue: fix issue about worker can't wake up thread before work_thread 
running_thread running
   
   Problem:
   AppBringup task in default priority 240 ->
   board_late_initialize() ->
  some driver called work_queue() ->
 nxsem_post(&(wqueue).sem) failed because sem_count is 0
   
   hp work_thread in default priority 224 ->
 nxsem_wait_uninterruptible(>sem);
   
   so hp_work_thread can't wake up, worker can't run immediately.
   
   Signed-off-by: dongjiuzhu1 
   ## Impact
   start work queue at board_late_initialize step.
   ## Testing
   local test
   


-- 
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] Donny9 commented on pull request #8802: libc/locale: support iconv_open,iconv,iconv_close

2023-04-12 Thread via GitHub


Donny9 commented on PR #8802:
URL: https://github.com/apache/nuttx/pull/8802#issuecomment-1505103505

   > > > my question was why you are referring this particular (seemingly old) 
fork of musl
   > > > instead of the official one: https://git.musl-libc.org/cgit/musl
   > > 
   > > 
   > > @yamt Sorry, i wrote wrong link about musl, it's 
https://github.com/bminor/musl, It is close to the official version.
   > > djz:musl$ git remote -v origin 
[g...@github.com](mailto:g...@github.com):bminor/musl.git (fetch) origin 
[g...@github.com](mailto:g...@github.com):bminor/musl.git (push)
   > 
   > ok. it makes sense then.
   
   @yamt Please merge this pr, thank you~


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

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

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



[GitHub] [nuttx] Donny9 commented on pull request #8773: drivers/dma: support dma driver model

2023-04-12 Thread via GitHub


Donny9 commented on PR #8773:
URL: https://github.com/apache/nuttx/pull/8773#issuecomment-1505102053

   @pkarashchenko please merge this driver model, thank you !


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

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

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



[GitHub] [nuttx-apps] simbit18 opened a new pull request, #1712: apps/examples: Fix mistakes in comments

2023-04-12 Thread via GitHub


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

   ## Summary
   Fix mistakes in comments
   ## Impact
   none
   ## 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] davids5 commented on pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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

   > Great job David! Later, I can help with upstream boards migration.
   > 
   > If someone wonders why L5, U5, WB and WL5 are not affected in this PR 
(like me a moment ago), they are already OK.
   
   I was thinking about this a bit more. I think we need to repeat the pattern 
on these arches as well. so that the board.h can change the pins characteristic 
 on non suffixed pins. i.e. GPIO_UART5_TX -> GPIO_UART5_TX_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



[GitHub] [nuttx] davids5 commented on a diff in pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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


##
arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h:
##
@@ -0,0 +1,685 @@
+/
+ * arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h
+ *
+ * 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.
+ *
+ /
+
+#ifndef __ARCH_ARM_SRC_STM32_HARDWARE_STM32F20XXX_PINMAP_LEGACY.H
+#define __ARCH_ARM_SRC_STM32_HARDWARE_STM32F20XXX_PINMAP_LEGACY.H

Review Comment:
   @raiden00pl Thanks Got these in last push



-- 
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 #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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


##
tools/stm32_pinmap_tool.py:
##
@@ -0,0 +1,345 @@
+#!/usr/bin/env python3
+

Review Comment:
   yes



-- 
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 #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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


##
arch/arm/src/stm32/hardware/stm32_pinmap.h:
##
@@ -34,7 +34,11 @@
 /* STM32L15xx family */
 

Review Comment:
   @raiden00pl I think I will move the #pragma to the gpio.c file so there is 
only one waring.
   



-- 
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 #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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

   I just tried to rebuild it locally and build was successful


-- 
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] TimJTi commented on pull request #9005: Apds9922

2023-04-12 Thread via GitHub


TimJTi commented on PR #9005:
URL: https://github.com/apache/nuttx/pull/9005#issuecomment-1505001645

   Still making a mess of github...will delete until I am 100% sorted out!


-- 
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] TimJTi closed pull request #9005: Apds9922

2023-04-12 Thread via GitHub


TimJTi closed pull request #9005: Apds9922
URL: https://github.com/apache/nuttx/pull/9005


-- 
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] raiden00pl commented on pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


raiden00pl commented on PR #8992:
URL: https://github.com/apache/nuttx/pull/8992#issuecomment-1504945202

   Great job David! 
   Later, I can help with upstream boards migration.
   
   If someone wonders why L5, U5, WB and WL5 are not affected in this PR (like 
me a moment ago), they are already OK.


-- 
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] raiden00pl commented on a diff in pull request #8992: stm32{f7|h7|F4|F12} Remove GPIO_SPEED_xxx and provide a legacy path for lazy migration

2023-04-12 Thread via GitHub


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


##
arch/arm/src/stm32/hardware/stm32_pinmap.h:
##
@@ -101,26 +105,49 @@
 /* STM32 F2 Family **/
 
 #elif defined(CONFIG_STM32_STM32F20XX)
-#  include "hardware/stm32f20xxx_pinmap.h"
-
+#  if defined(STM32_USE_LEGACY_PINMAP)

Review Comment:
   should be CONFIG_STM32_USE_LEGACY_PINMAP. Same in other places.



##
arch/arm/src/stm32f0l0g0/hardware/stm32_pinmap.h:
##
@@ -28,20 +28,37 @@
 #include 
 #include "chip.h"
 
-#if defined(CONFIG_STM32F0L0G0_STM32F03X)
-#  include "hardware/stm32f03x_pinmap.h"
-#elif defined(CONFIG_STM32F0L0G0_STM32F05X)
-#  include "hardware/stm32f05x_pinmap.h"
-#elif defined(CONFIG_STM32F0L0G0_STM32F07X)
-#  include "hardware/stm32f07x_pinmap.h"
-#elif defined(CONFIG_STM32F0L0G0_STM32F09X)
-#  include "hardware/stm32f09x_pinmap.h"
-#elif defined(CONFIG_ARCH_CHIP_STM32L0)
-#  include "hardware/stm32l0_pinmap.h"
-#elif defined(CONFIG_ARCH_CHIP_STM32G0)
-#  include "hardware/stm32g0_pinmap.h"
+#if defined(CONFIG_STM32F0G0L0_USE_LEGACY_PINMAP)
+#  if defined(CONFIG_STM32F0L0G0_STM32F03X)

Review Comment:
   missing pragma warning



##
arch/arm/src/stm32/hardware/stm32_pinmap.h:
##
@@ -34,7 +34,11 @@
 /* STM32L15xx family */
 

Review Comment:
   missing pragma warning that a legacy pinmap is in use



##
arch/arm/src/stm32l4/hardware/stm32l4_pinmap.h:
##
@@ -27,17 +27,30 @@
 
 #include 
 #include "chip.h"
-
-#if defined(CONFIG_STM32L4_STM32L4X3)
-#  include "hardware/stm32l4x3xx_pinmap.h"
-#elif defined(CONFIG_STM32L4_STM32L4X5)
-#  include "hardware/stm32l4x5xx_pinmap.h"
-#elif defined(CONFIG_STM32L4_STM32L4X6)
-#  include "hardware/stm32l4x6xx_pinmap.h"
-#elif defined(CONFIG_STM32L4_STM32L4XR)
-#  include "hardware/stm32l4xrxx_pinmap.h"
+#if defined(CONFIG_STM32L4_USE_LEGACY_PINMAP)
+#  if defined(CONFIG_STM32L4_STM32L4X3)

Review Comment:
   missing pragma warning



##
tools/stm32_pinmap_tool.py:
##
@@ -0,0 +1,345 @@
+#!/usr/bin/env python3
+

Review Comment:
   will you change it to the Apache header ?



##
tools/stm32_pinmap_tool.py:
##
@@ -0,0 +1,345 @@
+#!/usr/bin/env python3
+
+#
+#   Copyright (c) 2012-2017 PX4 Development Team. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in
+#the documentation and/or other materials provided with the
+#distribution.
+# 3. Neither the name PX4 nor the names of its contributors may be
+#used to endorse or promote products derived from this software
+#without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+
+#
+# Serial firmware uploader for the PX4FMU bootloader

Review Comment:
   looks like a comment from another tool



##
arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h:
##
@@ -0,0 +1,685 @@
+/
+ * arch/arm/src/stm32/hardware/stm32f20xxx_pinmap_legacy.h
+ *
+ * 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 

[GitHub] [nuttx] raiden00pl opened a new pull request, #9006: stm32h7/rcc: make VOS0 configurable from board.h

2023-04-12 Thread via GitHub


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

   ## Summary
   Follow up to https://github.com/apache/nuttx/pull/8945
   It seems that over-drive is not required for ULPI but it can be a workaround 
solution for boards with poor signal integrity.
   Higher core voltage means faster clock signal edges, which may be sufficient 
to synchronize the high-speed clock and data on poorly designed boards.
   
   ## Impact
   VOS0 can be selected from board.h even if we aren't using the max frequency
   
   ## Testing
   STM32H743II with USB3300 ULPI transceiver
   


-- 
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 commented on pull request #9002: sched/pthread: repalce sched_lcok to enter_critical_section

2023-04-12 Thread via GitHub


Gary-Hobson commented on PR #9002:
URL: https://github.com/apache/nuttx/pull/9002#issuecomment-1504825499

   > I'm in the middle of implementation for `ostest` for scheduler lock/unlock 
and has draft change to fix it #7464 Could you please try if the change helps 
in this particular case?
   > 
   > UPDATE: No, the changes are still not ready
   
   This change has nothing to do with priority inheritance.
   It is encountered when running the libuv test set, and there is a case 
(uv_run_test async) that will busy wait for a mutex.
   
   The time to turn off scheduling in pthread_mutex_timedlock is too long. 
After turning on the time slice rotation, every time an interrupt is triggered, 
it is in the state of off scheduling, resulting in the task not being able to 
switch tasks.


-- 
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 #1709: critmon: add total time running time of task

2023-04-12 Thread via GitHub


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


##
system/critmon/critmon.c:
##
@@ -381,7 +391,7 @@ static void critmon_global_crit(void)
 
   /* Finally, output the stack info that we gleaned from the procfs */
 
-  printf("%11s %11s --- - CPU %s\n",
+  printf("%11s %11s --- -  CPU %s\n",

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] Gary-Hobson commented on a diff in pull request #8868: fs/hostfs: add sim hostfs path convert

2023-04-12 Thread via GitHub


Gary-Hobson commented on code in PR #8868:
URL: https://github.com/apache/nuttx/pull/8868#discussion_r1163714289


##
arch/sim/src/sim/posix/sim_hostfs.c:
##
@@ -36,10 +36,66 @@
 
 #include "hostfs.h"
 
+#ifdef CONFIG_HOST_MACOS
+#include 
+#include 
+#endif
+
 /
  * Private Functions
  /
 
+/
+ * Name: host_path_convert
+ /
+
+static int host_path_convert(const char *path, char *abspath,
+ uint32_t buflen)
+{
+#ifndef CONFIG_SIM_HOSTFS_PATH_CONVERSION
+  strncpy(abspath, path, buflen);
+  abspath[buflen - 1] = '\0';
+  return 0;
+#else
+  int ret;
+  char *name;
+
+  if (path[0] == '/')
+{
+  strncpy(abspath, path, buflen);
+  abspath[buflen - 1] = '\0';
+  return 0;
+}
+
+  /* Get the absolute path of the executable file */
+
+#  ifdef CONFIG_HOST_LINUX
+  ret = readlink("/proc/self/exe", abspath, buflen);

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] yamt commented on a diff in pull request #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


yamt commented on code in PR #8997:
URL: https://github.com/apache/nuttx/pull/8997#discussion_r1163704388


##
arch/sim/src/sim/win/sim_hostfs.c:
##
@@ -120,6 +120,11 @@ int host_open(const char *pathname, int flags, 
nuttx_mode_t mode)
   mapflags |= O_TRUNC;
 }
 
+  if (flags & NUTTX_O_BINARY)
+{
+  mapflags |= O_BINARY;
+}

Review Comment:
   > > the semantics of nuttx (and many of unix-like systems) is "always 
O_BINARY". it seems a bit awkward to distinguish binary/text only for hostfs. 
isn't it simpler to always use O_BINARY in hostfs for windows?
   > 
   > we have some windows developers hope that the hosfs could be support both 
un/translated, I think bring back the O_BINARY define is a simply resolution 
for this case...
   
   what apps are they using?
   usually apps for nuttx (or unix in general) doesn't specify their 
text/binary intention.
   iirc posix even states fopen "b" mode is no-op.
   
   i guess an alternative is to have a mount flag of hostfs.
   



-- 
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 #8996: sim/win/hostuart: only read key event from console

2023-04-12 Thread via GitHub


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


##
arch/sim/src/sim/win/sim_hostuart.c:
##
@@ -94,12 +102,34 @@ int host_uart_puts(int fd, const char *buf, size_t size)
 
 int host_uart_gets(int fd, char *buf, size_t size)
 {
-  DWORD nread;
-  int ret;
+  INPUT_RECORD input[NUM_INPUT];
+  char *pos = buf;
+  DWORD ninput;
+  int i;
 
-  ret = ReadConsole(g_stdin_handle, buf, size, , 0);
+  while (size > 0 && host_uart_checkin(fd))
+{
+  ninput = size > NUM_INPUT ? NUM_INPUT : size;
+  if (ReadConsoleInput(g_stdin_handle,
+   (void *), ninput, ) <= 0 ||

Review Comment:
   cast is necessary:
   
   ```
   D:\code\n5\incubator-nuttx\arch\sim\src\sim\win\sim_hostuart.c(113,50): 
warning C4047: “函数”:“PINPUT_RECORD”与“INPUT_RECORD (*)[16]”的间接级别不同 
[D:\code\n5\incubator-nuttx\vs2022\nuttx.vcxproj]   
   
   D:\code\n5\incubator-nuttx\arch\sim\src\sim\win\sim_hostuart.c(113,44): 
warning C4024: “ReadConsoleInputA”: 形参和实参 2 的类型不同 
[D:\code\n5\incubator-nuttx\vs2022\nuttx.vcxproj]
   ```



##
arch/sim/src/sim/win/sim_hostuart.c:
##
@@ -36,6 +42,8 @@ static HANDLE g_stdout_handle;
  * Public Functions
  /
 
+bool host_uart_checkin(int fd);

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] pkarashchenko commented on pull request #8997: sim/hostfs: pass flag O_BINARY to host

2023-04-12 Thread via GitHub


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

   Nothing I'm aware of. Have you tried to rebuild that configuration locally?


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

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

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



[nuttx] branch master updated (2309eacf9f -> 3f05df3fbb)

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

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


from 2309eacf9f drivers/sensors/Kconfig: Fix bmi160 help texts in Kconfig
 add 3f05df3fbb sim/win/hosttime: calculate sec/ms independently to avoid 
overflow

No new revisions were added by this update.

Summary of changes:
 arch/sim/src/sim/win/sim_hosttime.c | 25 -
 1 file changed, 16 insertions(+), 9 deletions(-)



[GitHub] [nuttx] jerpelea merged pull request #8995: sim/win/hosttime: calculate sec/ms independently to avoid overflow

2023-04-12 Thread via GitHub


jerpelea merged PR #8995:
URL: https://github.com/apache/nuttx/pull/8995


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