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

2023-02-06 Thread via GitHub


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


##
sched/addrenv/addrenv.c:
##
@@ -79,13 +79,42 @@ static void addrenv_destroy(FAR void *arg)
 
   /* Destroy the address environment */
 
-  up_addrenv_destroy(>pgdir);
+  up_addrenv_destroy(>addrenv);

Review Comment:
   Oops, done 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] xiaoxiang781216 commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-06 Thread via GitHub


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


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

Review Comment:
   change to pgdir to  addrenv



##
sched/addrenv/addrenv.c:
##
@@ -79,13 +79,42 @@ static void addrenv_destroy(FAR void *arg)
 
   /* Destroy the address environment */
 
-  up_addrenv_destroy(>pgdir);
+  up_addrenv_destroy(>addrenv);

Review Comment:
   move to the second 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] xiaoxiang781216 commented on a diff in pull request #8449: build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build

2023-02-06 Thread via GitHub


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


##
tools/Win.mk:
##
@@ -571,33 +571,38 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT)
 # location: https://bitbucket.org/nuttx/tools/downloads/.  See
 # misc\tools\README.txt for additional information.
 
+KCONFIG_ENV = set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \
+  set EXTERNALDIR=$(EXTERNALDIR)& \
+  set APPSBINDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \

Review Comment:
   add sapce before all &



##
tools/Win.mk:
##
@@ -571,33 +571,38 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT)
 # location: https://bitbucket.org/nuttx/tools/downloads/.  See
 # misc\tools\README.txt for additional information.
 
+KCONFIG_ENV = set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \
+  set EXTERNALDIR=$(EXTERNALDIR)& \
+  set APPSBINDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \
+  set BINDIR=$(patsubst "%",%,${TOPDIR})&
+
 config:
$(Q) $(MAKE) clean_context
$(Q) $(MAKE) apps_preconfig
-   $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set 
EXTERNALDIR=$(EXTERNALDIR)& kconfig-conf Kconfig
+   $(Q) $() kconfig-conf Kconfig

Review Comment:
   ```suggestion
$(Q) $(KCONFIG_ENV) kconfig-conf Kconfig
   ```



##
tools/Win.mk:
##
@@ -571,33 +571,38 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT)
 # location: https://bitbucket.org/nuttx/tools/downloads/.  See
 # misc\tools\README.txt for additional information.
 
+KCONFIG_ENV = set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \
+  set EXTERNALDIR=$(EXTERNALDIR)& \
+  set APPSBINDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& \
+  set BINDIR=$(patsubst "%",%,${TOPDIR})&

Review Comment:
   ```suggestion
 set BINDIR=$(patsubst "%",%,${TOPDIR})
   ```



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

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

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



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

2023-02-06 Thread via GitHub


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


##
sched/addrenv/addrenv.c:
##
@@ -0,0 +1,562 @@
+/
+ * sched/addrenv/addrenv.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include "sched/sched.h"
+
+/
+ * Pre-processor Definitions
+ /
+
+/
+ * Private Data
+ /
+
+/* This variable holds the current address environment. These contents are
+ * _never_ NULL, besides when the system is started and there are only the
+ * initial kernel mappings available.
+ *
+ * This must only be accessed with interrupts disabled.
+ *
+ * REVISIT: Try to get rid of this, global bookkeeping for this is dangerous.
+ */
+
+static FAR struct addrenv_s *g_addrenv[CONFIG_SMP_NCPUS];
+
+/
+ * Private Functions
+ /
+
+/
+ * Name: addrenv_destroy
+ *
+ * Description:
+ *   Deferred service routine for destroying an address environment. This is
+ *   so that the heavy lifting is not done when the context is switching, or
+ *   from ISR.
+ *
+ * Input Parameters:
+ *   arg - Contains pointer to the address environment that is freed.
+ *
+ * Returned Value:
+ *   None.
+ *
+ /
+
+static void addrenv_destroy(FAR void *arg)
+{
+  FAR struct addrenv_s *addrenv = (FAR struct addrenv_s *)arg;
+
+  /* Destroy the address environment */
+
+  up_addrenv_destroy(>addrenv);
+
+  /* Then finally release the memory */
+
+  kmm_free(addrenv);
+}
+
+/
+ * Name: addrenv_clear_current
+ *
+ * Description:
+ *   Clear the current addrenv from g_addrenv, if it matches the input.
+ *
+ * Input Parameters:
+ *   addrenv - Pointer to the addrenv to free.
+ *
+ * Returned Value:
+ *   None
+ *
+ /
+
+static void addrenv_clear_current(FAR const addrenv_t *addrenv)
+{
+  int i;
+
+  /* Mark no address environment */
+
+  for (i = 0; i < CONFIG_SMP_NCPUS; i++)
+{
+  if (addrenv == g_addrenv[i])
+{
+  g_addrenv[i] = NULL;
+}
+}
+}
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: addrenv_switch
+ *
+ * Description:
+ *   Instantiate the group address environment for the current thread at the
+ *   the head of the ready to run list.
+ *
+ *   This function is called from platform-specific code after any context
+ *   switch (i.e., after any change in the thread at the head of the
+ *   ready-to-run list).  This function will change the address environment
+ *   if the new thread is part of a different task group.
+ *
+ * Input Parameters:
+ *   tcb - The TCB of thread that needs an address environment.  This should
+ * be the TCB at the head of the ready-to-run list, but that is not
+ * enough.
+ *
+ * Returned Value:
+ *   Zero (OK) is returned on success.  A negated errno value is returned on
+ *   any failure.
+ *
+ * Assumptions:
+ *   This function should only be called within critical OS 

[GitHub] [nuttx] anchao commented on a diff in pull request #6718: add CMake build system support (Enhance #3704)

2023-02-06 Thread via GitHub


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


##
CMakeLists.txt:
##
@@ -0,0 +1,664 @@
+# 
##
+# CMakeLists.txt
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##
+
+# Request a version available on latest Ubuntu LTS (20.04)
+
+cmake_minimum_required(VERSION 3.16)
+
+# Handle newer CMake versions correctly by setting policies
+
+if(POLICY CMP0115)
+  # do not auto-guess extension in target_sources()
+  cmake_policy(SET CMP0115 NEW)
+endif()
+
+# Basic CMake configuration ##
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_EXTENSIONS OFF)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+# Setup build type (Debug Release RelWithDebInfo MinSizeRel Coverage). Default
+# to minimum size release
+
+# Use nuttx optimization configuration options, workaround for cmake build type
+# TODO Integration the build type with CMAKE
+
+# if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING
+# "Build type" FORCE) endif() set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
+# STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel")
+
+# Process board config & directory locations #
+
+set(NUTTX_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set(NUTTX_APPS_DIR
+"../apps"
+CACHE FILEPATH "Relative path to apps/ directory")
+set(NUTTX_APPS_BINDIR
+"${CMAKE_BINARY_DIR}/apps"
+CACHE FILEPATH "Out of tree path to apps/ directory")

Review Comment:
   no particular reason, this is a legacy from the original author, I will 
remove the CACHE attribute



-- 
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 #6718: add CMake build system support (Enhance #3704)

2023-02-06 Thread via GitHub


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


##
CMakeLists.txt:
##
@@ -0,0 +1,664 @@
+# 
##
+# CMakeLists.txt
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##
+
+# Request a version available on latest Ubuntu LTS (20.04)
+
+cmake_minimum_required(VERSION 3.16)
+
+# Handle newer CMake versions correctly by setting policies
+
+if(POLICY CMP0115)
+  # do not auto-guess extension in target_sources()
+  cmake_policy(SET CMP0115 NEW)
+endif()
+
+# Basic CMake configuration ##
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_EXTENSIONS OFF)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+# Setup build type (Debug Release RelWithDebInfo MinSizeRel Coverage). Default
+# to minimum size release
+
+# Use nuttx optimization configuration options, workaround for cmake build type
+# TODO Integration the build type with CMAKE
+
+# if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING
+# "Build type" FORCE) endif() set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
+# STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel")
+
+# Process board config & directory locations #
+
+set(NUTTX_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set(NUTTX_APPS_DIR
+"../apps"

Review Comment:
   Thanks for your suggestion, I added support for absolute paths, which allows 
nuttx compilation to be separated from the nuttx directory:
   
   ```bash
   archer@c:~/code/nuttx/n8$ ls
   apps  incubator-nuttx
   archer@c:~/code/nuttx/n8$ cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja 
incubator-nuttx/
   -- Initializing NuttX
   --   Board:  sim
   --   Config: nsh
   --   Appdir: /home/archer/code/nuttx/n8/incubator-nuttx/../apps
   -- The C compiler identification is GNU 11.1.0
   -- The CXX compiler identification is GNU 11.1.0
   -- The ASM compiler identification is GNU
   -- Found assembler: /usr/bin/cc
   -- Detecting C compiler ABI info
   -- Detecting C compiler ABI info - done
   -- Check for working C compiler: /usr/bin/cc - skipped
   -- Detecting C compile features
   -- Detecting C compile features - done
   -- Detecting CXX compiler ABI info
   -- Detecting CXX compiler ABI info - done
   -- Check for working CXX compiler: /usr/bin/c++ - skipped
   -- Detecting CXX compile features
   -- Detecting CXX compile features - done
   -- Detected system: x86_64
   -- Configuring done
   -- Generating done
   -- Build files have been written to: /home/archer/code/nuttx/n8/build
   archer@c:~/code/nuttx/n8$ cmake --build build
   [979/979] Linking C executable nuttx
   ```
   
   



-- 
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] anchao opened a new pull request, #1544: build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build

2023-02-06 Thread via GitHub


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

   ## Summary
   
   build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build
   
   First decoupling changes from https://github.com/apache/nuttx/pull/6718
   
   Signed-off-by: chao an 
   
   ## Impact
   
   Depends on: https://github.com/apache/nuttx/pull/6718
   N/A
   
   ## Testing
   
   cmake (https://github.com/apache/nuttx/pull/6718) 


-- 
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, #8449: build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build

2023-02-06 Thread via GitHub


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

   
   ## Summary
   
   build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build
   
   First decoupling changes from https://github.com/apache/nuttx/pull/6718
   
   Signed-off-by: chao an 
   
   ## Impact
   
   N/A
   
   ## Testing
   
   cmake (https://github.com/apache/nuttx/pull/6718) 


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

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

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



[GitHub] [nuttx] xiaoxiang781216 opened a new pull request, #8448: net: Remove protocol argument from si_setup callback

2023-02-06 Thread via GitHub


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

   ## Summary
   
   since the implementor could get the same value from socket::s_proto
   
   ## Impact
   
   Minor
   
   ## Testing
   
   CI


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

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

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



[GitHub] [nuttx] PeterBee97 opened a new pull request, #8447: Add v4l2_buffer timestamp and sequence

2023-02-06 Thread via GitHub


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

   ## Summary
   Added timestamp and sequence number to captured frame.
   ## 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] xiaoxiang781216 commented on pull request #8370: include/sys/socket.h: Add SOCK_CTRL to socket type

2023-02-06 Thread via GitHub


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

   > Dear @xiaoxiang781216 san
   > 
   > > > Dear @xiaoxiang781216 san
   > > > > @SPRESENSE but how to pass the ioctl to usrsock server now?
   > > > 
   > > > 
   > > > This fix only add a new Socket Type for requests to Daemons that do 
not use the device's Socket. Therefore, the PASS method to usrsock server will 
remain the same.
   > > 
   > > 
   > > Ok, I saw SOCK_CTRL will convert to the real type: 
https://github.com/apache/nuttx/pull/8370/files#diff-098d0f88e64dc86480d735d351725fce63ff53c8b0d834ca460ba61c2eb9bb13R289-R304
 So, what's the benefit to add SOCK_CTRL?
   > 
   > The benefit of this change is that Daemon can determine not to consume 
Socket resources for devices that should not consume them.(e.g. One of modem as 
ALT1250 can use 5 internal socket only.) By adding the type SOCK_CTRL and 
specifying that type in the Socket for requests such as the ifup command or 
ifconfig command, Daemon will know not to open the Socket for the device. So 
Daemon can receive SOCK_CTRL to prevent the device from consuming Socket 
resources by not opening the Socket for the device.
   
   Ok, so the patch tries to reduce the driver consumption, but the nework 
stack self. Look reasonable, thanks.


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

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

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



[nuttx] branch master updated (5f9cb6faf4 -> 21d9163aae)

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

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


from 5f9cb6faf4 drivers/serial: Fix docstrings on UART interrupt handlers
 add 247aad82f2 arch/xtensa/esp32s2: Fix touch function typo
 add 21d9163aae arch/xtensa/esp32s2: Add support for touch pad interrupts

No new revisions were added by this update.

Summary of changes:
 arch/xtensa/src/esp32s2/esp32s2_touch.c   | 303 +-
 arch/xtensa/src/esp32s2/esp32s2_touch.h   | 104 ++--
 arch/xtensa/src/esp32s2/esp32s2_touch_lowerhalf.h |   2 +-
 arch/xtensa/src/esp32s2/hardware/esp32s2_touch.h  |  16 ++
 4 files changed, 399 insertions(+), 26 deletions(-)



[GitHub] [nuttx] xiaoxiang781216 merged pull request #8428: arch/xtensa/esp32s2: Add support for touch pad interrupts

2023-02-06 Thread via GitHub


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


-- 
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 #8414: include: Add nitems() definition to sys/param.h

2023-02-06 Thread via GitHub


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

   If nitems() cannot be used as the system's preferred macro to completely 
replace ARRAY_SIZE(), is it pointless to exist?


-- 
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 #8378: tools/makefile: silent all compile output

2023-02-06 Thread via GitHub


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

   @fjpanag I just checked the shell behavior of sh/bash/zsh, they all work as 
expected if bash is supported, what system and shell are you using?


-- 
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 a diff in pull request #5999: fs/sync: add sync api

2023-02-06 Thread via GitHub


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


##
syscall/syscall.csv:
##
@@ -165,6 +165,7 @@
 "socketpair","sys/socket.h","defined(CONFIG_NET)","int","int","int","int","int 
[2]|FAR int *"
 "stat","sys/stat.h","","int","FAR const char *","FAR struct stat *"
 "statfs","sys/statfs.h","","int","FAR const char *","FAR struct statfs *"
+"sync","unistd.h","","void"

Review Comment:
   Done!



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

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

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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #5999: fs/sync: add sync api

2023-02-06 Thread via GitHub


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

   > @xiaoxiang781216 @Donny9 can we close this PR?
   
   @pkarashchenko sync is ready for review 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] anchao commented on pull request #8378: tools/makefile: silent all compile output

2023-02-06 Thread via GitHub


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

   @fjpanag From the log information, "\033[1K\r" has not been recognized 
correctly. It seems that your system supports bash but you are not using it as 
default SHELL on terminal, right?
   
   You can check your environment by:
   
   ```
   archer@c:~/code/nuttx$ echo $SHELL
   /bin/bash
   ```
   


-- 
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 #5999: fs/sync: add sync and syncfs api

2023-02-06 Thread via GitHub


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


##
syscall/syscall.csv:
##
@@ -165,6 +165,7 @@
 "socketpair","sys/socket.h","defined(CONFIG_NET)","int","int","int","int","int 
[2]|FAR int *"
 "stat","sys/stat.h","","int","FAR const char *","FAR struct stat *"
 "statfs","sys/statfs.h","","int","FAR const char *","FAR struct statfs *"
+"sync","unistd.h","","void"

Review Comment:
   move after line 169



-- 
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] SPRESENSE commented on pull request #8370: include/sys/socket.h: Add SOCK_CTRL to socket type

2023-02-06 Thread via GitHub


SPRESENSE commented on PR #8370:
URL: https://github.com/apache/nuttx/pull/8370#issuecomment-1420115057

   Dear @xiaoxiang781216 san
   
   > > Dear @xiaoxiang781216 san
   > > > @SPRESENSE but how to pass the ioctl to usrsock server now?
   > > 
   > > 
   > > This fix only add a new Socket Type for requests to Daemons that do not 
use the device's Socket. Therefore, the PASS method to usrsock server will 
remain the same.
   > 
   > Ok, I saw SOCK_CTRL will convert to the real type: 
https://github.com/apache/nuttx/pull/8370/files#diff-098d0f88e64dc86480d735d351725fce63ff53c8b0d834ca460ba61c2eb9bb13R289-R304
 So, what's the benefit to add SOCK_CTRL?
   
   The benefit of this change is that Daemon can determine not to consume 
Socket resources for devices that should not consume them.(e.g. One of modem as 
ALT1250 can use 5 internal socket only.)
   By adding the type SOCK_CTRL and specifying that type in the Socket for 
requests such as the ifup command or ifconfig command, Daemon will know not to 
open the Socket for the device. So Daemon can receive SOCK_CTRL to prevent the 
device from consuming Socket resources by not opening the Socket for the device.


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

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

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



[GitHub] [nuttx] flyingfish89 commented on pull request #8441: fix a bug of strtold

2023-02-06 Thread via GitHub


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

   > Indeed this PR fixed the issue, and tests were able to move forward.
   > 
   > However, now there is a new Lua test failing. I guess it is related, but I 
won't have the time to investigate it today.
   > 
   > Please have a look bellow:
   > 
   > ```
   > NuttShell (NSH) NuttX-12.0.0
   > nsh> lua
   > Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
   > > assert(0e12 == 0 and .0 == 0 and 0. == 0 and .2e2 == 20 and 2.E-1 == 0.2)
   > stdin:1: malformed number near '0e12'
   > > 
   > ```
   
   could you please change strtold to look like this and then test if there are 
any other questions
   
![捕获](https://user-images.githubusercontent.com/118660407/217127952-91ce75d0-9ac3-41d8-b9ce-830bbea417b0.PNG)
   


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

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

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



[GitHub] [nuttx] hartmannathan commented on a diff in pull request #8446: esp32s3: Add pwm support using LEDC peripheral

2023-02-06 Thread via GitHub


hartmannathan commented on code in PR #8446:
URL: https://github.com/apache/nuttx/pull/8446#discussion_r1098091258


##
boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_ledc.c:
##
@@ -0,0 +1,134 @@
+/
+ * boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_ledc.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+#include "chip.h"
+#include "esp32s3_ledc.h"
+
+/
+ * Pre-processor Definitions
+ /
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: esp32s3_pwm_setup
+ *
+ * Description:
+ *   Initialize LEDC PWM and register the PWM device.
+ *
+ /
+
+int esp32s3_pwm_setup(void)
+{
+  int ret;
+  struct pwm_lowerhalf_s *pwm;
+
+#ifdef CONFIG_ESP32S3_LEDC_TIM0
+  pwm = esp32s3_ledc_init(0);
+  if (!pwm)
+{
+  syslog(LOG_ERR, "ERROR: Failed to get the LEDC PWM 0 lower half\n");
+  return -ENODEV;
+}
+
+  /* Register the PWM driver at "/dev/pwm0" */
+
+  ret = pwm_register("/dev/pwm0", pwm);
+  if (ret < 0)
+{
+  syslog(LOG_ERR, "ERROR: pwm_register failed: %d\n", ret);
+  return ret;
+}
+#endif
+
+#ifdef CONFIG_ESP32S3_LEDC_TIM1
+  pwm = esp32s3_ledc_init(1);
+  if (!pwm)
+{
+  syslog(LOG_ERR, "ERROR: Failed to get the LEDC PWM 1 lower half\n");
+  return -ENODEV;
+}
+
+  /* Register the PWM driver at "/dev/pwm1" */
+
+  ret = pwm_register("/dev/pwm1", pwm);
+  if (ret < 0)
+{
+  syslog(LOG_ERR, "ERROR: pwm_register failed: %d\n", ret);
+  return ret;
+}
+#endif
+
+#ifdef CONFIG_ESP32S3_LEDC_TIM2
+  pwm = esp32s3_ledc_init(2);
+  if (!pwm)
+{
+  syslog(LOG_ERR, "ERROR: Failed to get the LEDC PWM 2 lower half\n");
+  return -ENODEV;
+}
+
+  /* Register the PWM driver at "/dev/pwm2" */
+
+  ret = pwm_register("/dev/pwm2", pwm);
+  if (ret < 0)
+{
+  syslog(LOG_ERR, "ERROR: pwm_register failed: %d\n", ret);
+  return ret;
+}
+#endif
+
+#ifdef CONFIG_ESP32S3_LEDC_TIM3
+  pwm = esp32s3_ledc_init(3);
+  if (!pwm)
+{
+  syslog(LOG_ERR, "ERROR: Failed to get the LEDC PWM 3 lower half\n");
+  return -ENODEV;
+}
+
+  /* Register the PWM driver at "/dev/pwm3" */
+
+  ret = pwm_register("/dev/pwm3", pwm);
+  if (ret < 0)
+{
+  syslog(LOG_ERR, "ERROR: pwm_register failed: %d\n", ret);
+  return ret;
+}
+#endif
+
+  return OK;
+}

Review Comment:
   In this function, if none of `CONFIG_ESP32S3_LEDC_TIM0`, 
`CONFIG_ESP32S3_LEDC_TIM1`, `CONFIG_ESP32S3_LEDC_TIM2`, or 
`CONFIG_ESP32S3_LEDC_TIM3`, then compiler will warn about declared but unused 
`pwm` and `ret`.



##
arch/xtensa/src/esp32s3/esp32s3_ledc.c:
##
@@ -0,0 +1,813 @@
+/
+ * arch/xtensa/src/esp32s3/esp32s3_ledc.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, 

[nuttx-website] branch asf-site updated: Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: 5f9cb6faf40dec46092474446e3590e381c3ca1b

2023-02-06 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 4c3956d3 Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff 
docs: 5f9cb6faf40dec46092474446e3590e381c3ca1b
4c3956d3 is described below

commit 4c3956d38145112b70c8fb1859d5a7cbb6faa020
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue Feb 7 00:13:04 2023 +

Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: 
5f9cb6faf40dec46092474446e3590e381c3ca1b
---
 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 ee1c435b..4bc466c5 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: 06 February 23 at 00:10
+Last Updated: 07 February 23 at 00:10
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.0/searchindex.js 
b/content/docs/10.0.0/searchindex.js
index 0732be39..901c8834 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 e3dbcc55..e205de91 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: 06 February 23 at 00:10
+Last Updated: 07 February 23 at 00:10
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.1/searchindex.js 
b/content/docs/10.0.1/searchindex.js
index 0732be39..901c8834 100644
--- a/content/docs/10.0.1/searchindex.js
+++ b/content/docs/10.0.1/searchindex.js
@@ -1 +1 @@

[GitHub] [nuttx] acassis opened a new pull request, #8446: esp32s3: Add pwm support using LEDC peripheral

2023-02-06 Thread via GitHub


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

   ## Summary
   esp32s3: Add pwm support using LEDC peripheral
   ## Impact
   Users will be able to use PWM
   ## Testing
   esp32s3-devkit
   


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

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

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



[GitHub] [nuttx] acassis opened a new pull request, #8445: esp32s2: Add pwm support using LEDC peripheral

2023-02-06 Thread via GitHub


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

   ## Summary
   esp32s2: Add pwm support using LEDC peripheral
   ## Impact
   Users will be able to use PWM
   ## Testing
   esp32s2-saola-1
   


-- 
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: drivers/serial: Fix docstrings on UART interrupt handlers

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 5f9cb6faf4 drivers/serial: Fix docstrings on UART interrupt handlers
5f9cb6faf4 is described below

commit 5f9cb6faf40dec46092474446e3590e381c3ca1b
Author: Nathan Hartman <59230071+hartmannat...@users.noreply.github.com>
AuthorDate: Mon Feb 6 11:40:07 2023 -0500

drivers/serial: Fix docstrings on UART interrupt handlers
---
 arch/arm/src/a1x/a1x_serial.c|  6 +++---
 arch/arm/src/am335x/am335x_serial.c  |  6 +++---
 arch/arm/src/c5471/c5471_serial.c| 11 +--
 arch/arm/src/cxd56xx/cxd56_serial.c  |  6 +++---
 arch/arm/src/dm320/dm320_serial.c| 11 +--
 arch/arm/src/eoss3/eoss3_serial.c|  8 +---
 arch/arm/src/gd32f4/gd32f4xx_serial.c|  8 
 arch/arm/src/imx1/imx_serial.c   | 11 +--
 arch/arm/src/imx6/imx_serial.c   |  8 +---
 arch/arm/src/imxrt/imxrt_serial.c|  8 +---
 arch/arm/src/kinetis/kinetis_lpserial.c  | 10 +-
 arch/arm/src/kinetis/kinetis_serial.c|  8 
 arch/arm/src/kl/kl_serial.c  |  8 
 arch/arm/src/lc823450/lc823450_serial.c  | 11 +--
 arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c  |  6 +++---
 arch/arm/src/lpc214x/lpc214x_serial.c| 11 +--
 arch/arm/src/lpc2378/lpc23xx_serial.c| 11 +--
 arch/arm/src/lpc31xx/lpc31_serial.c  |  6 --
 arch/arm/src/lpc43xx/lpc43_serial.c  |  6 +++---
 arch/arm/src/lpc54xx/lpc54_serial.c  |  8 
 arch/arm/src/max326xx/max32660/max32660_serial.c |  8 +---
 arch/arm/src/nrf52/nrf52_serial.c|  8 
 arch/arm/src/nrf53/nrf53_serial.c|  8 
 arch/arm/src/nuc1xx/nuc_serial.c |  6 +++---
 arch/arm/src/phy62xx/uart.c  |  8 
 arch/arm/src/rp2040/rp2040_serial.c  |  6 +++---
 arch/arm/src/rtl8720c/ameba_uart.c   |  8 
 arch/arm/src/s32k1xx/s32k1xx_serial.c|  8 +---
 arch/arm/src/s32k3xx/s32k3xx_serial.c|  8 +---
 arch/arm/src/sam34/sam_serial.c  |  6 +++---
 arch/arm/src/sama5/sam_dbgu.c|  6 +++---
 arch/arm/src/sama5/sam_flexcom_serial.c  |  8 +---
 arch/arm/src/sama5/sam_serial.c  |  8 +---
 arch/arm/src/samd2l2/sam_serial.c|  6 +++---
 arch/arm/src/samd5e5/sam_serial.c|  6 +++---
 arch/arm/src/samv7/sam_serial.c  |  8 +---
 arch/arm/src/stm32/stm32_hciuart.c   | 12 ++--
 arch/arm/src/stm32/stm32_serial.c|  8 
 arch/arm/src/stm32f0l0g0/stm32_serial_v1.c   |  8 
 arch/arm/src/stm32f0l0g0/stm32_serial_v2.c   |  6 +++---
 arch/arm/src/stm32f7/stm32_serial.c  |  6 +++---
 arch/arm/src/stm32h7/stm32_serial.c  |  6 +++---
 arch/arm/src/stm32l4/stm32l4_serial.c|  6 +++---
 arch/arm/src/stm32l5/stm32l5_serial.c|  6 +++---
 arch/arm/src/stm32u5/stm32_serial.c  |  6 +++---
 arch/arm/src/stm32wb/stm32wb_serial.c|  6 +++---
 arch/arm/src/stm32wl5/stm32wl5_serial.c  |  6 +++---
 arch/arm/src/str71x/str71x_serial.c  | 11 +--
 arch/arm/src/tiva/common/tiva_hciuart.c  |  2 +-
 arch/arm/src/tiva/common/tiva_serial.c   | 11 +--
 arch/arm/src/tlsr82/tlsr82_serial.c  |  8 
 arch/arm/src/xmc4/xmc4_serial.c  |  8 
 arch/arm64/src/qemu/qemu_serial.c|  8 +---
 arch/avr/src/at32uc3/at32uc3_serial.c|  6 +++---
 arch/avr/src/at90usb/at90usb_serial.c|  2 +-
 arch/avr/src/atmega/atmega_serial.c  |  2 +-
 arch/hc/src/m9s12/m9s12_serial.c | 11 +--
 arch/mips/src/pic32mx/pic32mx_serial.c   |  6 +++---
 arch/mips/src/pic32mz/pic32mz_serial.c   |  9 +
 arch/misoc/src/common/misoc_serial.c |  6 +++---
 arch/renesas/src/m16c/m16c_serial.c  | 21 ++---
 arch/renesas/src/rx65n/rx65n_serial.c| 11 +--
 arch/renesas/src/sh1/sh1_serial.c| 11 +--
 arch/risc-v/src/bl602/bl602_serial.c |  6 +++---
 arch/risc-v/src/c906/c906_serial.c   |  6 +++---
 arch/risc-v/src/esp32c3/esp32c3_serial.c |  2 +-
 arch/risc-v/src/esp32c3/esp32c3_usbserial.c  |  9 +
 arch/risc-v/src/fe310/fe310_serial.c |  6 +++---
 arch/risc-v/src/k210/k210_serial.c   |  6 +++---
 

[GitHub] [nuttx] xiaoxiang781216 merged pull request #8444: drivers/serial: Fix docstrings on UART interrupt handlers

2023-02-06 Thread via GitHub


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


-- 
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 (14f8a6c2dd -> caa16742db)

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

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


from 14f8a6c2dd fs: support openat/fchmodat/mkfifoat/fstatat/...at api
 new 5ac638944b arm/backtrace: fix compile warning
 new d5ac2be84f bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid 
unaligned access
 new 1779433c35 wireless/bcm43xxx/qspi: try tx after rx fails
 new 5c047f634f raspberrypi-pico-w/telnet: enable more configs
 new 1b245664ad arm/rp2040: fix compile warning on boot2 build
 new caa16742db rp2040/raspberrypi-pico-w: update submodule to avoid 
invaild firmware

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


Summary of changes:
 arch/arm/src/common/arm_backtrace_unwind.c |   2 +-
 arch/arm/src/rp2040/boot2/Make.defs|   2 +-
 boards/arm/rp2040/raspberrypi-pico-w/README.txt|   6 +-
 .../raspberrypi-pico-w/configs/telnet/defconfig|  24 +-
 drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c|  54 +--
 .../ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c|   7 +-
 .../wireless/ieee80211/bcm43xxx/bcmf_interface.c   |   9 +-
 drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h   | 460 -
 8 files changed, 403 insertions(+), 161 deletions(-)



[nuttx] 04/06: raspberrypi-pico-w/telnet: enable more configs

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

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

commit 5c047f634f849f3fc9b4c7259a74ccbe24279e69
Author: chao an 
AuthorDate: Mon Feb 6 17:17:48 2023 +0800

raspberrypi-pico-w/telnet: enable more configs

Signed-off-by: chao an 
---
 .../raspberrypi-pico-w/configs/telnet/defconfig| 24 +-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig 
b/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig
index e23eaa17e3..c5c8fdddca 100644
--- a/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig
+++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig
@@ -17,11 +17,17 @@ CONFIG_ARCH_BOARD="raspberrypi-pico-w"
 CONFIG_ARCH_BOARD_RASPBERRYPI_PICO_W=y
 CONFIG_ARCH_CHIP="rp2040"
 CONFIG_ARCH_CHIP_RP2040=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
 CONFIG_ARCH_RAMVECTORS=y
 CONFIG_ARCH_STACKDUMP=y
 CONFIG_BOARDCTL_RESET=y
 CONFIG_BOARD_LOOPSPERMSEC=10450
 CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_ERROR=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DISABLE_POSIX_TIMERS=y
 CONFIG_DRIVERS_IEEE80211=y
 CONFIG_DRIVERS_WIRELESS=y
@@ -29,10 +35,16 @@ CONFIG_EXAMPLES_HELLO=y
 CONFIG_FS_PROCFS=y
 CONFIG_FS_PROCFS_REGISTER=y
 CONFIG_IEEE80211_BROADCOM_DEFAULT_COUNTRY="XX"
+CONFIG_IEEE80211_BROADCOM_DMABUF_ALIGNMENT=16
+CONFIG_IEEE80211_BROADCOM_FRAME_POOL_SIZE=32
 CONFIG_IEEE80211_BROADCOM_FULLMAC_GSPI=y
 CONFIG_IEEE80211_INFINEON_CYW43439=y
 CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_IOB_NBUFFERS=196
+CONFIG_IOB_NCHAINS=24
+CONFIG_LIBC_FLOATINGPOINT=y
 CONFIG_MM_BACKTRACE=0
+CONFIG_NDEBUG=y
 CONFIG_NET=y
 CONFIG_NETDB_DNSCLIENT=y
 CONFIG_NETDB_DNSCLIENT_RECV_TIMEOUT=3
@@ -50,6 +62,7 @@ CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_LOOPBACK=y
 CONFIG_NET_LOOPBACK_PKTSIZE=1024
 CONFIG_NET_TCP=y
+CONFIG_NET_TCP_DELAYED_ACK=y
 CONFIG_NET_UDP=y
 CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
@@ -58,19 +71,28 @@ CONFIG_RAM_SIZE=270336
 CONFIG_RAM_START=0x2000
 CONFIG_READLINE_CMD_HISTORY=y
 CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_BACKTRACE=y
 CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_WAITPID=y
+CONFIG_STACK_COLORATION=y
 CONFIG_START_DAY=9
 CONFIG_START_MONTH=2
 CONFIG_START_YEAR=2021
-CONFIG_SYSLOG_CONSOLE=y
+CONFIG_SYSLOG_BUFFER=y
+CONFIG_SYSLOG_INTBUFFER=y
+CONFIG_SYSLOG_INTBUFSIZE=2048
+CONFIG_SYSLOG_PROCESSID=y
 CONFIG_SYSTEM_DHCPC_RENEW=y
+CONFIG_SYSTEM_DUMPSTACK=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_PING=y
 CONFIG_SYSTEM_TELNET_CLIENT=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
+CONFIG_TTY_FORCE_PANIC=y
+CONFIG_TTY_SIGINT=y
+CONFIG_TTY_SIGTSTP=y
 CONFIG_UART0_SERIAL_CONSOLE=y
 CONFIG_WIRELESS_WAPI=y
 CONFIG_WIRELESS_WAPI_CMDTOOL=y



[nuttx] 05/06: arm/rp2040: fix compile warning on boot2 build

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

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

commit 1b245664ad665679fbee494994e0cf3ed0acea4b
Author: chao an 
AuthorDate: Mon Feb 6 17:29:07 2023 +0800

arm/rp2040: fix compile warning on boot2 build

ld: warning: 
boards/arm/rp2040/raspberrypi-pico-w/scripts/raspberrypi-pico-flash.ld contains 
output sections; did you forget -T?
Signed-off-by: chao an 
---
 arch/arm/src/rp2040/boot2/Make.defs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/rp2040/boot2/Make.defs 
b/arch/arm/src/rp2040/boot2/Make.defs
index 4cd3d5c39b..9d5cd01e9d 100644
--- a/arch/arm/src/rp2040/boot2/Make.defs
+++ b/arch/arm/src/rp2040/boot2/Make.defs
@@ -48,7 +48,7 @@ $(BOOT_STAGE2).bin: %.bin: %.elf
 $(BOOT_STAGE2).elf: $(BOOT2SRC)
$(Q) touch $(PICO_SDK_PATH)/src/common/pico_base/include/pico/version.h
$(Q) touch 
$(PICO_SDK_PATH)/src/common/pico_base/include/pico/config_autogen.h
-   $(CC) -nostdlib $(ARCHSCRIPT) $(BOOT2CFLAGS) -o $@ $<
+   $(CC) -nostdlib -T$(ARCHSCRIPT) $(BOOT2CFLAGS) -o $@ $<
$(DELFILE) $(PICO_SDK_PATH)/src/common/pico_base/include/pico/version.h
$(DELFILE) 
$(PICO_SDK_PATH)/src/common/pico_base/include/pico/config_autogen.h
 



[nuttx] 03/06: wireless/bcm43xxx/qspi: try tx after rx fails

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

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

commit 1779433c350f9e64678b77bc11b02e871949f9df
Author: chao an 
AuthorDate: Mon Feb 6 17:05:54 2023 +0800

wireless/bcm43xxx/qspi: try tx after rx fails

1. Try tx after rx fails to avoid gspi_thread busy to try rx
2. Add some delay if alloc frame buffer failed

Signed-off-by: chao an 
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c| 54 --
 .../ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c|  7 +--
 .../wireless/ieee80211/bcm43xxx/bcmf_interface.c   |  9 ++--
 3 files changed, 27 insertions(+), 43 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c
index f47372ef04..eacb8a0e4d 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi.c
@@ -356,7 +356,6 @@ static int bcmf_gspi_thread(int argc, char **argv)
   uint16_t   intr_flags;
   intret;
   intlength;
-  intwait_count  = 0;
   bool   wait_for_event;
   bool   enter_low_power = false;
 
@@ -424,7 +423,10 @@ static int bcmf_gspi_thread(int argc, char **argv)
 
   /* If we don't have a frame leave the loop */
 
-  if (length == 0) break;
+  if (length == 0)
+{
+  break;
+}
 
   /* Read and process frame. This updates gspi->status */
 
@@ -436,43 +438,21 @@ static int bcmf_gspi_thread(int argc, char **argv)
 }
   else
 {
-  wlerr("error reading f2 frame: %d\n", ret);
+  wlwarn("error reading f2 frame: %d\n", ret);
 }
 }
-  else
+
+  if (wait_for_event)
 {
-  /* If we don't have anything to read, try sending a packet */
+  /* Send the frame */
 
-  while ((status & CYW_REG_STATUS_F2_RECEIVE_RDY) == 0)
+  do
 {
-  /* Oops! no room for a packet.  We'll wait a bit to see
-   * if room shows up.
-   */
-
-  wlinfo(" not ready to receive\n");
-
-  if (++wait_count > 100)
-{
-  wlerr("Chip cannot receive F2 frame\n");
-  break;
-}
-
-  /* No room at the inn for an f2 frame -- wait a bit */
-
-  usleep(1);
-
+  ret = bcmf_gspi_send_f2_frame(priv);
   status = bcmf_gspi_read_reg_32(gspi,
- gspi_f0_bus,
- CYW_REG_STATUS);
+ gspi_f0_bus, CYW_REG_STATUS);
 }
-
-  /* reset the count for next time  */
-
-  wait_count = 0;
-
-  /* We have space, send the frame */
-
-  ret = bcmf_gspi_send_f2_frame(priv);
+  while (ret == OK && (status & CYW_REG_STATUS_F2_RECEIVE_RDY));
 
   if (ret == OK)
 {
@@ -480,12 +460,13 @@ static int bcmf_gspi_thread(int argc, char **argv)
 }
   else
 {
-#ifdef CONFIG_DEBUG_WIRELESS_ERROR
   if (ret != -ENODATA)
 {
+#ifdef CONFIG_DEBUG_WIRELESS_ERROR
   wlerr("error sending f2 frame: %d\n", ret);
-}
 #endif
+  nxsig_usleep(10 * 1000);
+}
 }
 }
 
@@ -511,7 +492,10 @@ static int bcmf_gspi_thread(int argc, char **argv)
 >thread_signal,
 BCMF_GSPI_LOWPOWER_TIMEOUT_TICK);
 
-  if (ret == -ETIMEDOUT) enter_low_power = true;
+  if (ret == -ETIMEDOUT)
+{
+  enter_low_power = true;
+}
 }
 }
 }
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c
index ae51d4a736..d77b719d63 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_gspi_f2_frame.c
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -40,7 +41,7 @@
 #include "bcmf_bdc.h"
 #include "bcmf_utils.h"
 
- #include "bcmf_netdev.h"
+#include "bcmf_netdev.h"
 
 #include "bcmf_sdio_regs.h"
 
@@ -327,8 +328,8 @@ int bcmf_gspi_send_f2_frame(FAR struct bcmf_dev_s *priv)
 {
   /* TODO handle this case */
 
-  wlerr("No credit to send frame\n");
-  return -EAGAIN;
+  wlwarn("No credit to send frame\n");
+  nxsig_usleep(10 * 1000);
 }
 
   if (nxmutex_lock(>queue_lock) < 0)
diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_interface.c 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_interface.c

[nuttx] 06/06: rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

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

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

commit caa16742dbe0787168004e92ab54d3ba28839b14
Author: chao an 
AuthorDate: Mon Feb 6 17:52:40 2023 +0800

rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

The cyw43-driver is a submodule in the pick-sdk, if the submodule is
not updated, the dummy firmware driver will be used, update the document
to correct the setup flow.

${PICO_SDK_PATH}/lib/cyw43-driver/firmware/43439A0-7.95.49.00.combined

Signed-off-by: chao an 
---
 boards/arm/rp2040/raspberrypi-pico-w/README.txt | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/boards/arm/rp2040/raspberrypi-pico-w/README.txt 
b/boards/arm/rp2040/raspberrypi-pico-w/README.txt
index 6c62454eee..43812d83ff 100644
--- a/boards/arm/rp2040/raspberrypi-pico-w/README.txt
+++ b/boards/arm/rp2040/raspberrypi-pico-w/README.txt
@@ -44,9 +44,11 @@ There is currently no direct user mode access to these 
RP2040 hardware features:
 Installation
 
 
-1. Download Raspberry Pi Pico SDK
+1. Download Raspberry Pi Pico SDK and update submodule(cyw43-driver)
 
-  $ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git
+  $ git clone -b 1.4.0 https://github.com/raspberrypi/pico-sdk.git
+  $ cd pico-sdk
+  $ git submodule update --init --recursive lib/cyw43-driver
 
 2. Set PICO_SDK_PATH environment variable
 



[nuttx] 02/06: bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid unaligned access

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

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

commit d5ac2be84f7e615ecd8a7b4280b0cc2c194fea04
Author: chao an 
AuthorDate: Mon Feb 6 16:50:10 2023 +0800

bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid unaligned access

Signed-off-by: chao an 
---
 drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h | 460 +--
 1 file changed, 347 insertions(+), 113 deletions(-)

diff --git a/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h 
b/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
index a4aa2d6d09..3251780905 100644
--- a/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
+++ b/drivers/wireless/ieee80211/bcm43xxx/bcmf_ioctl.h
@@ -57,28 +57,35 @@ typedef uint16_t chanspec_t;
 
 #define ACTION_FRAME_SIZE 1040
 
+begin_packed_struct
 typedef struct wl_action_frame
 {
   struct ether_addr da;
   uint16_t  len;
   uint32_t  packet_id;
   uint8_t   data[ACTION_FRAME_SIZE];
-} wl_action_frame_t;
+}
+end_packed_struct wl_action_frame_t;
 
+begin_packed_struct
 typedef struct ssid_info
 {
   uint8_t ssid_len;
   uint8_t ssid[32];
-} ssid_info_t;
+}
+end_packed_struct ssid_info_t;
 
+begin_packed_struct
 typedef struct cnt_rx
 {
   uint32_t cnt_rxundec;
   uint32_t cnt_rxframe;
-} cnt_rx_t;
+}
+end_packed_struct cnt_rx_t;
 
 #define MCSSET_LEN 16
 
+begin_packed_struct
 typedef struct wl_bss_info
 {
   uint32_t  version;/* version field */
@@ -115,17 +122,20 @@ typedef struct wl_bss_info
   /* Add new fields here */
 
   /* variable length Information Elements */
-} wl_bss_info_t;
+}
+end_packed_struct wl_bss_info_t;
 
 #define DOT11_CAP_ESS 0x0001
 #define DOT11_CAP_IBSS0x0002
 #define DOT11_CAP_PRIVACY 0x0010
 
+begin_packed_struct
 typedef struct wlc_ssid
 {
   uint32_t ssid_len;
   uint8_t  SSID[32];
-} wlc_ssid_t;
+}
+end_packed_struct wlc_ssid_t;
 
 #define WL_BSSTYPE_INFRA 1
 #define WL_BSSTYPE_INDEP 0
@@ -133,6 +143,7 @@ typedef struct wlc_ssid
 #define WL_SCANFLAGS_PASSIVE 0x01
 #define WL_SCANFLAGS_PROHIBITED0x04
 
+begin_packed_struct
 typedef struct wl_scan_params
 {
   wlc_ssid_t ssid;
@@ -145,7 +156,8 @@ typedef struct wl_scan_params
   int32_thome_time;
   int32_tchannel_num;
   uint16_t   channel_list[1];
-} wl_scan_params_t;
+}
+end_packed_struct wl_scan_params_t;
 
 #define WL_SCAN_PARAMS_FIXED_SIZE  (64)
 #define WL_SCAN_PARAMS_COUNT_MASK  (0x)
@@ -155,23 +167,27 @@ typedef struct wl_scan_params
 #define WL_SCAN_ACTION_ABORT(3)
 #define ISCAN_REQ_VERSION   (1)
 
+begin_packed_struct
 typedef struct wl_iscan_params
 {
   uint32_t  version;
   uint16_t  action;
   uint16_t  scan_duration;
   wl_scan_params_t  params;
-} wl_iscan_params_t;
+}
+end_packed_struct wl_iscan_params_t;
 
 #define WL_ISCAN_PARAMS_FIXED_SIZE (offsetof(wl_iscan_params_t, params) + 
sizeof(wlc_ssid_t))
 
+begin_packed_struct
 typedef struct wl_scan_results
 {
   uint32_t   buflen;
   uint32_t   version;
   uint32_t   count;
   wl_bss_info_t  bss_info[1];
-} wl_scan_results_t;
+}
+end_packed_struct wl_scan_results_t;
 
 #define WL_SCAN_RESULTS_FIXED_SIZE  (12)
 #define WL_SCAN_RESULTS_SUCCESS (0)
@@ -181,16 +197,19 @@ typedef struct wl_scan_results
 #define WL_SCAN_RESULTS_NO_MEM (4)
 #define ESCAN_REQ_VERSION 1
 
+begin_packed_struct
 typedef struct wl_escan_params
 {
   uint32_t  version;
   uint16_t  action;
   uint16_t  sync_id;
   wl_scan_params_t  params;
-} wl_escan_params_t;
+}
+end_packed_struct wl_escan_params_t;
 
 #define WL_ESCAN_PARAMS_FIXED_SIZE (offsetof(wl_escan_params_t, params) + 
sizeof(wlc_ssid_t))
 
+begin_packed_struct
 typedef struct wl_escan_result
 {
   uint32_t   buflen;
@@ -198,34 +217,42 @@ typedef struct wl_escan_result
   uint16_t   sync_id;
   uint16_t   bss_count;
   wl_bss_info_t  bss_info[1];
-} wl_escan_result_t;
+}
+end_packed_struct wl_escan_result_t;
 
 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - 
sizeof(wl_bss_info_t))
 
+begin_packed_struct
 typedef struct wl_iscan_results
 {
   uint32_t   status;
   wl_scan_results_t  results;
-} wl_iscan_results_t;
+}
+end_packed_struct wl_iscan_results_t;
 
 #define WL_ISCAN_RESULTS_FIXED_SIZE \
   (WL_SCAN_RESULTS_FIXED_SIZE + offsetof(wl_iscan_results_t, results))
 #define WL_MAXRATES_IN_SET  16  /* max # of rates in a rateset */
 
+begin_packed_struct
 typedef struct wl_rateset
 {
   uint32_t  count;  /* # rates in this set */
   uint8_t   rates[WL_MAXRATES_IN_SET];  /* rates in 500kbps units w/hi bit set 
if basic */
-} wl_rateset_t;
+}
+end_packed_struct wl_rateset_t;
 
+begin_packed_struct
 typedef struct wl_uint32_list
 {
   uint32_t count;
   uint32_t element[1];
-} wl_uint32_list_t;
+}
+end_packed_struct 

[GitHub] [nuttx] xiaoxiang781216 closed issue #7475: RaspberryPi-Pico-W is not getting WiFi

2023-02-06 Thread via GitHub


xiaoxiang781216 closed issue #7475: RaspberryPi-Pico-W is not getting WiFi
URL: https://github.com/apache/nuttx/issues/7475


-- 
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 merged pull request #8439: rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

2023-02-06 Thread via GitHub


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


-- 
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] 01/06: arm/backtrace: fix compile warning

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

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

commit 5ac638944b79d225aed1632c13162a891ad99766
Author: chao an 
AuthorDate: Mon Feb 6 16:47:57 2023 +0800

arm/backtrace: fix compile warning

common/arm_backtrace_unwind.c: In function 'up_backtrace':
common/arm_backtrace_unwind.c:626:27:
warning: assignment to 'long unsigned int' from 'uint8_t (*)[]'\
{aka 'unsigned char (*)[]'} makes integer from pointer without a cast 
[-Wint-conversion]

  626 |   frame.stack_top = _intstacktop;
  |
---
 arch/arm/src/common/arm_backtrace_unwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/common/arm_backtrace_unwind.c 
b/arch/arm/src/common/arm_backtrace_unwind.c
index 3eb004b0db..22ea4acd17 100644
--- a/arch/arm/src/common/arm_backtrace_unwind.c
+++ b/arch/arm/src/common/arm_backtrace_unwind.c
@@ -623,7 +623,7 @@ int up_backtrace(struct tcb_s *tcb,
 #  ifdef CONFIG_SMP
   frame.stack_top = arm_intstack_top();
 #  else
-  frame.stack_top = _intstacktop;
+  frame.stack_top = (unsigned long)_intstacktop;
 #  endif /* CONFIG_SMP */
 #endif /* CONFIG_ARCH_INTERRUPTSTACK > 7 */
 



[GitHub] [nuttx] xiaoxiang781216 merged pull request #8440: fs: support openat/fchmodat/mkfifoat/fstatat/...at api

2023-02-06 Thread via GitHub


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


-- 
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 (dad6b105ca -> 14f8a6c2dd)

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

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


from dad6b105ca tools/Config: silent print of archive objects
 add 7bbabc74fb fs/dir: provide absolute directory path for F_GETPATH by 
fcntl
 add 14f8a6c2dd fs: support openat/fchmodat/mkfifoat/fstatat/...at api

No new revisions were added by this update.

Summary of changes:
 fs/vfs/fs_dir.c|  5 +-
 include/fcntl.h| 13 +++
 include/stdio.h|  2 +
 include/sys/stat.h |  8 ++
 include/sys/time.h |  2 +
 include/unistd.h   | 10 +++
 libs/libc/libc.h   |  4 +
 libs/libc/misc/Make.defs   |  2 +
 libs/libc/misc/{lib_mkfifo.c => lib_fchmodat.c}| 61 +++---
 libs/libc/misc/{lib_mkfifo.c => lib_fstatat.c} | 62 +++---
 libs/libc/misc/{lib_mkfifo.c => lib_getfullpath.c} | 89 +++-
 libs/libc/misc/{lib_mkfifo.c => lib_mkdirat.c} | 56 ++---
 libs/libc/misc/lib_mkfifo.c| 46 ++
 libs/libc/misc/lib_mknod.c | 47 +++
 libs/libc/misc/{lib_mkfifo.c => lib_openat.c}  | 67 ---
 libs/libc/misc/{lib_mkfifo.c => lib_utimensat.c}   | 61 +++---
 libs/libc/stdio/Make.defs  |  1 +
 .../{misc/lib_mkfifo.c => stdio/lib_renameat.c}| 68 ---
 libs/libc/unistd/Make.defs |  2 +
 libs/libc/unistd/lib_access.c  | 48 +++
 .../{misc/lib_mkfifo.c => unistd/lib_fchownat.c}   | 65 +++---
 libs/libc/unistd/lib_linkat.c  | 98 ++
 .../{misc/lib_mkfifo.c => unistd/lib_readlinkat.c} | 60 ++---
 .../{misc/lib_mkfifo.c => unistd/lib_symlinkat.c}  | 57 +++--
 .../{misc/lib_mkfifo.c => unistd/lib_unlinkat.c}   | 65 +++---
 libs/libc/unistd/lib_utimes.c  | 18 
 26 files changed, 674 insertions(+), 343 deletions(-)
 copy libs/libc/misc/{lib_mkfifo.c => lib_fchmodat.c} (55%)
 copy libs/libc/misc/{lib_mkfifo.c => lib_fstatat.c} (55%)
 copy libs/libc/misc/{lib_mkfifo.c => lib_getfullpath.c} (51%)
 copy libs/libc/misc/{lib_mkfifo.c => lib_mkdirat.c} (55%)
 copy libs/libc/misc/{lib_mkfifo.c => lib_openat.c} (54%)
 copy libs/libc/misc/{lib_mkfifo.c => lib_utimensat.c} (55%)
 copy libs/libc/{misc/lib_mkfifo.c => stdio/lib_renameat.c} (50%)
 copy libs/libc/{misc/lib_mkfifo.c => unistd/lib_fchownat.c} (54%)
 create mode 100644 libs/libc/unistd/lib_linkat.c
 copy libs/libc/{misc/lib_mkfifo.c => unistd/lib_readlinkat.c} (52%)
 copy libs/libc/{misc/lib_mkfifo.c => unistd/lib_symlinkat.c} (54%)
 copy libs/libc/{misc/lib_mkfifo.c => unistd/lib_unlinkat.c} (54%)



[nuttx] branch master updated: tools/Config: silent print of archive objects

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

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


The following commit(s) were added to refs/heads/master by this push:
 new dad6b105ca tools/Config: silent print of archive objects
dad6b105ca is described below

commit dad6b105ca8dd4c8d7e2ca3a296bfb53992e1308
Author: chao an 
AuthorDate: Mon Feb 6 22:11:49 2023 +0800

tools/Config: silent print of archive objects

Signed-off-by: chao an 
---
 tools/Config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/Config.mk b/tools/Config.mk
index ec61dfc64f..bdcca55c2f 100644
--- a/tools/Config.mk
+++ b/tools/Config.mk
@@ -412,7 +412,7 @@ endef
 #   CONFIG_WINDOWS_NATIVE - Defined for a Windows native build
 
 define ARCHIVE_ADD
-   $(ECHO_BEGIN)"AR (add): ${shell basename $(1)} $(2) "
+   $(ECHO_BEGIN)"AR (add): ${shell basename $(1)} "
$(Q) $(AR) $1 $2
$(ECHO_END)
 endef



[GitHub] [nuttx] acassis merged pull request #8443: tools/Config: silent print of archive objects

2023-02-06 Thread via GitHub


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


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

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

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



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

2023-02-06 Thread via GitHub


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


##
sched/addrenv/addrenv.c:
##
@@ -0,0 +1,562 @@
+/
+ * sched/addrenv/addrenv.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include "sched/sched.h"
+
+/
+ * Pre-processor Definitions
+ /
+
+/
+ * Private Data
+ /
+
+/* This variable holds the current address environment. These contents are
+ * _never_ NULL, besides when the system is started and there are only the
+ * initial kernel mappings available.
+ *
+ * This must only be accessed with interrupts disabled.
+ *
+ * REVISIT: Try to get rid of this, global bookkeeping for this is dangerous.
+ */
+
+static FAR struct addrenv_s *g_addrenv[CONFIG_SMP_NCPUS];
+
+/
+ * Private Functions
+ /
+
+/
+ * Name: addrenv_destroy
+ *
+ * Description:
+ *   Deferred service routine for destroying an address environment. This is
+ *   so that the heavy lifting is not done when the context is switching, or
+ *   from ISR.
+ *
+ * Input Parameters:
+ *   arg - Contains pointer to the address environment that is freed.
+ *
+ * Returned Value:
+ *   None.
+ *
+ /
+
+static void addrenv_destroy(FAR void *arg)
+{
+  FAR struct addrenv_s *addrenv = (FAR struct addrenv_s *)arg;
+
+  /* Destroy the address environment */
+
+  up_addrenv_destroy(>addrenv);
+
+  /* Then finally release the memory */
+
+  kmm_free(addrenv);
+}
+
+/
+ * Name: addrenv_clear_current
+ *
+ * Description:
+ *   Clear the current addrenv from g_addrenv, if it matches the input.
+ *
+ * Input Parameters:
+ *   addrenv - Pointer to the addrenv to free.
+ *
+ * Returned Value:
+ *   None
+ *
+ /
+
+static void addrenv_clear_current(FAR const addrenv_t *addrenv)
+{
+  int i;
+
+  /* Mark no address environment */
+
+  for (i = 0; i < CONFIG_SMP_NCPUS; i++)
+{
+  if (addrenv == g_addrenv[i])
+{
+  g_addrenv[i] = NULL;
+}
+}
+}
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: addrenv_switch
+ *
+ * Description:
+ *   Instantiate the group address environment for the current thread at the
+ *   the head of the ready to run list.
+ *
+ *   This function is called from platform-specific code after any context
+ *   switch (i.e., after any change in the thread at the head of the
+ *   ready-to-run list).  This function will change the address environment
+ *   if the new thread is part of a different task group.
+ *
+ * Input Parameters:
+ *   tcb - The TCB of thread that needs an address environment.  This should
+ * be the TCB at the head of the ready-to-run list, but that is not
+ * enough.
+ *
+ * Returned Value:
+ *   Zero (OK) is returned on success.  A negated errno value is returned on
+ *   any failure.
+ *
+ * Assumptions:
+ *   This function should only be called within critical OS 

[GitHub] [nuttx] hartmannathan commented on pull request #8444: drivers/serial: Fix docstrings on UART interrupt handlers

2023-02-06 Thread via GitHub


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

   Reviewers: Please ignore the nxstyle errors in 
`arch/arm/src/phy62xx/uart.c`. Those are too deep to fix in this PR and will 
require a separate PR.


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

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

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



[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1543: bluetooth/nimble: Update to ed083b36cb85c7437b905ee905ea4aed6a1653ad

2023-02-06 Thread via GitHub


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

   CI fail is fixed here: https://github.com/apache/mynewt-nimble/pull/1459


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

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

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



[nuttx-apps] branch master updated: testing/drivertest: add timer driver test

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 8a131cb7e testing/drivertest: add timer driver test
8a131cb7e is described below

commit 8a131cb7e73df9bb15e0cbac25d310821553f4ec
Author: cuiziwei 
AuthorDate: Fri Feb 3 14:51:56 2023 +0800

testing/drivertest: add timer driver test

Signed-off-by: cuiziwei 
---
 testing/drivertest/Makefile   |   6 +
 testing/drivertest/drivertest_timer.c | 308 ++
 2 files changed, 314 insertions(+)

diff --git a/testing/drivertest/Makefile b/testing/drivertest/Makefile
index 004cab21c..a1e735a6c 100644
--- a/testing/drivertest/Makefile
+++ b/testing/drivertest/Makefile
@@ -34,4 +34,10 @@ MAINSRC  += drivertest_rtc.c
 PROGNAME += cmocka_driver_rtc
 endif
 
+ifneq ($(CONFIG_TIMER),)
+MAINSRC  += drivertest_timer.c
+PROGNAME += cmocka_driver_timer
+endif
+
+
 include $(APPDIR)/Application.mk
diff --git a/testing/drivertest/drivertest_timer.c 
b/testing/drivertest/drivertest_timer.c
new file mode 100644
index 0..676964b1e
--- /dev/null
+++ b/testing/drivertest/drivertest_timer.c
@@ -0,0 +1,308 @@
+/
+ * apps/testing/drivertest/drivertest_timer.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+/
+ * Pre-processor Definitions
+ /
+
+#define TIMER_DEFAULT_DEVPATH "/dev/timer0"
+#define TIMER_DEFAULT_INTERVAL 100
+#define TIMER_DEFAULT_NSAMPLES 20
+#define TIMER_DEFAULT_SIGNO 17
+#define TIMER_DEFAULT_RANGE 1
+
+#define OPTARG_TO_VALUE(value, type, base)\
+  do  \
+{ \
+  FAR char *ptr;  \
+  value = (type)strtoul(optarg, , base);  \
+  if (*ptr != '\0')   \
+{ \
+  printf("Parameter error: -%c %s\n", ch, optarg);\
+  show_usage(argv[0], timer_state, EXIT_FAILURE); \
+} \
+} while (0)
+
+/
+ * Private Types
+ /
+
+struct timer_state_s
+{
+  char devpath[PATH_MAX];
+  uint32_t interval;
+  uint32_t nsamples;
+  uint32_t signo;
+  uint32_t range;
+};
+
+/
+ * Private Data
+ /
+
+/
+ * Private Functions
+ /
+
+/
+ * Name: get_timestamp
+ /
+
+static uint32_t get_timestamp(void)
+{
+  struct timespec ts;
+  uint32_t ms;
+  clock_gettime(CLOCK_MONOTONIC, );
+  ms = ts.tv_sec * 1000 + ts.tv_nsec / 100;
+  return ms;
+}
+
+/
+ * Name: show_usage
+ 

[GitHub] [nuttx-apps] xiaoxiang781216 merged pull request #1534: testing/drivertest: add timer driver test

2023-02-06 Thread via GitHub


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


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

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

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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8435: Move SEEK_xxx from unistd.h to sys/types.h

2023-02-06 Thread via GitHub


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

   All three header files should define these macro from the spec(glibc do the 
same thing). To avoid too many duplicaiton, SEEK_xxx macro is mvoed to 
sys/types.h which is included by these three files, @pkarashchenko .


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

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

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



[GitHub] [nuttx] hartmannathan opened a new pull request, #8444: drivers/serial: Fix docstrings on UART interrupt handlers

2023-02-06 Thread via GitHub


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

   ## Summary
   
   Docstrings on UART/USART interrupt handlers included two wrong function 
names: `uart_transmitchars` or `uart_receivechar`. These do not exist. The 
correct names are `uart_xmitchars` or `uart_recvchars`. Fixing all occurrences.
   
   ## Impact
   
   Improves in-code documentation.
   
   ## Testing
   
   nxstyle.


-- 
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: tools/Config: stack usage(.su) file should be removed on clean phase

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 5e623da2dd tools/Config: stack usage(.su) file should be removed on 
clean phase
5e623da2dd is described below

commit 5e623da2dd7bf0ee80ee910a1275ca325c73206e
Author: chao an 
AuthorDate: Mon Feb 6 20:03:14 2023 +0800

tools/Config: stack usage(.su) file should be removed on clean phase

Signed-off-by: chao an 
---
 tools/Config.mk | 4 
 1 file changed, 4 insertions(+)

diff --git a/tools/Config.mk b/tools/Config.mk
index 63f3a3560a..ec61dfc64f 100644
--- a/tools/Config.mk
+++ b/tools/Config.mk
@@ -561,6 +561,10 @@ ifeq ($(CONFIG_ARCH_COVERAGE),y)
EXTRA = *.gcno *.gcda
 endif
 
+ifeq ($(CONFIG_STACK_USAGE),y)
+   EXTRA += *.su
+endif
+
 ifeq ($(CONFIG_WINDOWS_NATIVE),y)
 define CLEAN
$(Q) if exist *$(OBJEXT) (del /f /q *$(OBJEXT))



[GitHub] [nuttx] xiaoxiang781216 merged pull request #8442: tools/Config: stack usage(.su) file should be removed on clean phase

2023-02-06 Thread via GitHub


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


-- 
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 #8441: fix a bug of strtold

2023-02-06 Thread via GitHub


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

   Indeed this PR fixed the issue, and tests were able to move forward.
   
   However, now there is a new Lua test failing.  
   I guess it is related, but I won't have the time to investigate it today.
   
   Please have a look bellow:
   
   ```
   NuttShell (NSH) NuttX-12.0.0
   nsh> lua
   Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
   > assert(0e12 == 0 and .0 == 0 and 0. == 0 and .2e2 == 20 and 2.E-1 == 0.2)
   stdin:1: malformed number near '0e12'
   > 
   ```


-- 
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 #8378: tools/makefile: silent all compile output

2023-02-06 Thread via GitHub


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

   Also now, setting `V=1` does not produce an output as before.
   I would expect to have an option to keep the old behaviour as before.
   
   The new `V=0` option is unsuitable for me, as some terminals and the CI 
cannot use these control characters.  
   Using `V=1` on the other hand makes output much more verbose.
   
   Essentially I feel that this commit defeats its purpose on many practical 
applications.


-- 
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 #8378: tools/makefile: silent all compile output

2023-02-06 Thread via GitHub


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

   Maybe this commit needs some optimization?
   
   When parallelization is enabled in the build (i.e. `-j` make option), the 
formatting characters are not printed synchronized with the commands that they 
accompany:
   
   
![image](https://user-images.githubusercontent.com/46975045/217010455-cd5d72d1-b744-41ba-952f-74cb4beb8c67.png)
   


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

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

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



[GitHub] [nuttx] Donny9 commented on a diff in pull request #8440: fs: support openat/fchmodat/mkfifoat/fstatat/...at api

2023-02-06 Thread via GitHub


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


##
libs/libc/unistd/lib_fchownat.c:
##
@@ -0,0 +1,85 @@
+/
+ * libs/libc/unistd/lib_fchownat.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+#include "libc.h"
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: fchownat
+ *
+ * Description:
+ *   The fchownat() system call operates in exactly the same way as chown(),
+ *   except for  the  differences described here.
+ *
+ *   If the pathname given in pathname is relative, then it is interpreted
+ *   relative to the directory referred to by the file descriptor dirfd
+ *   (rather than relative to the current working directory of the calling
+ *process)
+ *
+ *   If pathname is relative and dirfd is the special value AT_FDCWD, then
+ *   pathname is interpreted relative to the current working directory of
+ *   the calling process (like chown()).
+ *
+ *   If pathname is absolute, then dirfd is ignored.
+ *
+ * Input Parameters:
+ *   dirfd - The file descriptor of directory.
+ *   path  - A pointer to the path.
+ *   owner - The owner to set.
+ *   group - The group to set.
+ *   flags - Ignored.
+ *
+ * Returned Value:
+ *   Return zero on success, or -1 if an error occurred (in which case,
+ *   errno is set appropriately).
+ *
+ /
+
+int fchownat(int dirfd, FAR const char *path, uid_t owner,
+ gid_t group, int flags)
+{
+  char fullpath[PATH_MAX];
+  int ret;
+
+  ret = lib_getfullpath(dirfd, path, fullpath);
+  if (ret < 0)
+{
+  set_errno(-ret);
+  return ERROR;
+}
+
+  if (flags & AT_SYMLINK_NOFOLLOW)

Review Comment:
   Done!



##
libs/libc/unistd/lib_unlinkat.c:
##
@@ -0,0 +1,85 @@
+/
+ * libs/libc/unistd/lib_unlinkat.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+#include "libc.h"
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: unlinkat
+ *
+ * Description:
+ *   The unlinkat() system call operates in exactly the same way as unlink(),
+ *   except for  the  differences described here.
+ *
+ *   If the pathname given in pathname is relative, then it is interpreted
+ *   relative to the directory referred to by the 

[GitHub] [nuttx] Donny9 commented on a diff in pull request #8440: fs: support openat/fchmodat/mkfifoat/fstatat/...at api

2023-02-06 Thread via GitHub


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


##
libs/libc/misc/lib_fstatat.c:
##
@@ -0,0 +1,84 @@
+/
+ * libs/libc/misc/lib_fstatat.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+#include "libc.h"
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: fstatat
+ *
+ * Description:
+ *   The fstatat() system call operates in exactly the same way as stat(),
+ *   except for the differences described here.
+ *
+ *   If the pathname given in pathname is relative, then it is interpreted
+ *   relative to the directory referred to by the file descriptor dirfd
+ *   (rather than relative to the current working directory of the calling
+ *process)
+ *
+ *   If pathname is relative and dirfd is the special value AT_FDCWD, then
+ *   pathname is interpreted relative to the current working directory of
+ *   the calling process (like stat()).
+ *
+ *   If pathname is absolute, then dirfd is ignored.
+ *
+ * Input Parameters:
+ *   dirfd - The file descriptor of directory.
+ *   path  - A pointer to the path.
+ *   buf   - The buf to get file status.
+ *   flags - Ignored.
+ *
+ * Returned Value:
+ *   Return zero on success, or -1 if an error occurred (in which case,
+ *   errno is set appropriately).
+ *
+ /
+
+int fstatat(int dirfd, FAR const char *path, FAR struct stat *buf,
+int flags)
+{
+  char fullpath[PATH_MAX];
+  int ret;
+
+  ret = lib_getfullpath(dirfd, path, fullpath);
+  if (ret < 0)
+{
+  set_errno(-ret);
+  return ERROR;
+}
+
+  if (flags & AT_SYMLINK_NOFOLLOW)

Review Comment:
   Done!



##
libs/libc/misc/lib_getfullpath.c:
##
@@ -0,0 +1,93 @@
+/
+ * libs/libc/misc/lib_getfullpath.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include "libc.h"
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: lib_getfullpath
+ *
+ * Description:
+ *   Given the directory path from dirfd.
+ *
+ /
+
+int lib_getfullpath(int dirfd, FAR const char *path, FAR char *fullpath)
+{
+  if (path == NULL || fullpath == NULL)
+{
+  return -EINVAL;
+  

[GitHub] [nuttx] Donny9 commented on a diff in pull request #8440: fs: support openat/fchmodat/mkfifoat/fstatat/...at api

2023-02-06 Thread via GitHub


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


##
include/fcntl.h:
##
@@ -112,6 +112,18 @@
 
 #define FD_CLOEXEC  1
 
+/* The flag for openat, faccessat, ... */
+
+#define AT_FDCWD  -100   /* Special value used to indicate openat 
should use the current
+  * working directory.
+  */
+#define AT_SYMLINK_NOFOLLOW   0x100  /* Do not follow symbolic links. */
+#define AT_EACCESS0x200  /* Test access permitted for effective 
IDs, not real IDs. */
+#define AT_REMOVEDIR  0x200  /* Remove directory instead of unlinking 
file. */
+#define AT_SYMLINK_FOLLOW 0x400  /* Follow symbolic links. */
+#define AT_NO_AUTOMOUNT   0x800  /* Suppress terminal automount traversal 
*/

Review Comment:
   yes, follow linux define.



##
libs/libc/misc/lib_fchmodat.c:
##
@@ -0,0 +1,83 @@
+/
+ * libs/libc/misc/lib_fchmodat.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+#include "libc.h"
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: fchmodat
+ *
+ * Description:
+ *   The fchmodat() system call operates in exactly the same way as chmod(),
+ *   except for  the  differences described here.
+ *
+ *   If the pathname given in pathname is relative, then it is interpreted
+ *   relative to the directory referred to by the file descriptor dirfd
+ *   (rather than relative to the current working directory of the calling
+ *process)
+ *
+ *   If pathname is relative and dirfd is the special value AT_FDCWD, then
+ *   pathname is interpreted relative to the current working directory of
+ *   the calling process (like chmod()).
+ *
+ *   If pathname is absolute, then dirfd is ignored.
+ *
+ * Input Parameters:
+ *   dirfd - The file descriptor of directory.
+ *   path  - A pointer to the path.
+ *   mode  - The access mode.
+ *   flags - Ignored.
+ *
+ * Returned Value:
+ *   Return zero on success, or -1 if an error occurred (in which case,
+ *   errno is set appropriately).
+ *
+ /
+
+int fchmodat(int dirfd, FAR const char *path, mode_t mode, int flags)
+{
+  char fullpath[PATH_MAX];
+  int ret;
+
+  ret = lib_getfullpath(dirfd, path, fullpath);
+  if (ret < 0)
+{
+  set_errno(-ret);
+  return ERROR;
+}
+
+  if (flags & AT_SYMLINK_NOFOLLOW)

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 #8435: include/stdio.h: Duplicate SEEK_xxx definition from unistd.h

2023-02-06 Thread via GitHub


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

   But according to 
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html
   ```
   The  header shall define the values used for l_whence, SEEK_SET, 
SEEK_CUR, and SEEK_END as described in 
[](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html).
   ```
   and https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
   ```
   The optional 
[](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html)
 header is removed from this function, since 
[](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html)
 now defines SEEK_SET, SEEK_CUR, and SEEK_END as part of the Base.
   ```
   Let me take a look into headers more carefully. Seems there is some 
conflict, but maybe there is a description in latest POSIX specs of how to 
handle those conflict


-- 
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 #8440: fs: support openat/fchmodat/mkfifoat/fstatat/...at api

2023-02-06 Thread via GitHub


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


##
include/fcntl.h:
##
@@ -112,6 +112,18 @@
 
 #define FD_CLOEXEC  1
 
+/* The flag for openat, faccessat, ... */
+
+#define AT_FDCWD  -100   /* Special value used to indicate openat 
should use the current
+  * working directory.
+  */
+#define AT_SYMLINK_NOFOLLOW   0x100  /* Do not follow symbolic links. */
+#define AT_EACCESS0x200  /* Test access permitted for effective 
IDs, not real IDs. */
+#define AT_REMOVEDIR  0x200  /* Remove directory instead of unlinking 
file. */
+#define AT_SYMLINK_FOLLOW 0x400  /* Follow symbolic links. */
+#define AT_NO_AUTOMOUNT   0x800  /* Suppress terminal automount traversal 
*/

Review Comment:
   ```suggestion
   #define AT_SYMLINK_NOFOLLOW   0x0100 /* Do not follow symbolic links. */
   #define AT_EACCESS0x0200 /* Test access permitted for effective 
IDs, not real IDs. */
   #define AT_REMOVEDIR  0x0200 /* Remove directory instead of 
unlinking file. */
   #define AT_SYMLINK_FOLLOW 0x0400 /* Follow symbolic links. */
   #define AT_NO_AUTOMOUNT   00x800 /* Suppress terminal automount 
traversal */
   ```
   Is it intentional that `AT_EACCESS` and `AT_REMOVEDIR` share the same value?



##
libs/libc/misc/lib_fstatat.c:
##
@@ -0,0 +1,84 @@
+/
+ * libs/libc/misc/lib_fstatat.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+#include 
+#include 
+
+#include "libc.h"
+
+/
+ * Public Functions
+ /
+
+/
+ * Name: fstatat
+ *
+ * Description:
+ *   The fstatat() system call operates in exactly the same way as stat(),
+ *   except for the differences described here.
+ *
+ *   If the pathname given in pathname is relative, then it is interpreted
+ *   relative to the directory referred to by the file descriptor dirfd
+ *   (rather than relative to the current working directory of the calling
+ *process)
+ *
+ *   If pathname is relative and dirfd is the special value AT_FDCWD, then
+ *   pathname is interpreted relative to the current working directory of
+ *   the calling process (like stat()).
+ *
+ *   If pathname is absolute, then dirfd is ignored.
+ *
+ * Input Parameters:
+ *   dirfd - The file descriptor of directory.
+ *   path  - A pointer to the path.
+ *   buf   - The buf to get file status.
+ *   flags - Ignored.
+ *
+ * Returned Value:
+ *   Return zero on success, or -1 if an error occurred (in which case,
+ *   errno is set appropriately).
+ *
+ /
+
+int fstatat(int dirfd, FAR const char *path, FAR struct stat *buf,
+int flags)
+{
+  char fullpath[PATH_MAX];
+  int ret;
+
+  ret = lib_getfullpath(dirfd, path, fullpath);
+  if (ret < 0)
+{
+  set_errno(-ret);
+  return ERROR;
+}
+
+  if (flags & AT_SYMLINK_NOFOLLOW)

Review Comment:
   Optional
   ```suggestion
 if ((flags & AT_SYMLINK_NOFOLLOW) != 0)
   ```



##
libs/libc/misc/lib_getfullpath.c:
##
@@ -0,0 +1,93 @@
+/
+ * libs/libc/misc/lib_getfullpath.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in 

[GitHub] [nuttx] anchao opened a new pull request, #8443: tools/Config: silent print of archive objects

2023-02-06 Thread via GitHub


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

   ## Summary
   
   tools/Config: silent print of archive objects
   
   Signed-off-by: chao an 
   
   ## Impact
   
   N/A
   
   ## Testing
   
   Before:
   
   ```
   $ make -j
   AR (add): libapps.ansh_init.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_parse.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_console.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_script.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_system.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_command.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_fscmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_ddcmd.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_proccmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_mmcmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_timcmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_envcmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_syscmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_dbgcmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_session.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_login.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_fsutils.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_builtin.c.home.archer.code.nuttx.n8.apps.nshlib.o nsh_fileapps
 .c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_romfsetc.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_mntcmds.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_consolemain.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_printf.c.home.archer.code.nuttx.n8.apps.nshlib.o 
nsh_test.c.home.archer.code.nuttx.n8.apps.nshlib.o
   LD:  nuttx
   ```
   
   After:
   ```
   $ make -j12
   LD:  nuttx
   ```


-- 
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] jerpelea merged pull request #8437: libc: Define _assert/__assert to avoid 3rd libary redefine them

2023-02-06 Thread via GitHub


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


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

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

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



[nuttx] branch master updated: libc: Define _assert/__assert to avoid 3rd libary redefine them

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 65a04c66a2 libc: Define _assert/__assert to avoid 3rd libary redefine 
them
65a04c66a2 is described below

commit 65a04c66a25c6ee4746123d1993424e33b3b36b5
Author: Xiang Xiao 
AuthorDate: Mon Feb 6 02:43:39 2023 +0800

libc: Define _assert/__assert to avoid 3rd libary redefine them

Signed-off-by: Xiang Xiao 
---
 include/assert.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/include/assert.h b/include/assert.h
index 2099157cb3..c72a3b998b 100644
--- a/include/assert.h
+++ b/include/assert.h
@@ -78,6 +78,11 @@
 #  define assert(f) ASSERT(f)
 #endif
 
+/* Suppress 3rd party library redefine _assert/__assert */
+
+#define _assert _assert
+#define __assert __assert
+
 /* Definition required for C11 compile-time assertion checking.  The
  * static_assert macro simply expands to the _Static_assert keyword.
  */



[GitHub] [nuttx-apps] jerpelea commented on pull request #1542: graphics/ft80x: Fix error: implicit declaration of function 'getpid

2023-02-06 Thread via GitHub


jerpelea commented on PR #1542:
URL: https://github.com/apache/nuttx-apps/pull/1542#issuecomment-1419110093

   it would be nicer to have 2 patches 
   1 with the actual changes and 1 with the nxstyle fixes


-- 
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 #8129: net/tcp: correct behavior of SO_LINGER

2023-02-06 Thread via GitHub


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

   I just had the time to properly test this.  
   It seems to be working nicely, 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] anchao commented on a diff in pull request #8442: tools/Config: stack usage(.su) file should be removed on clean phase

2023-02-06 Thread via GitHub


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


##
tools/Config.mk:
##
@@ -570,10 +570,11 @@ define CLEAN
$(call DELFILE,$(subst /,\,$(OBJS)))
$(Q) if exist $(BIN) (del /f /q  $(subst /,\,$(BIN)))
$(Q) if exist $(EXTRA) (del /f /q  $(subst /,\,$(EXTRA)))
+   $(Q) if exist *.su (del /f /q *.su)
 endef
 else
 define CLEAN
-   $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp $(OBJS) $(BIN) $(EXTRA)
+   $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp $(OBJS) $(BIN) $(EXTRA) *.su

Review Comment:
   Done



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

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

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



[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8442: tools/Config: stack usage(.su) file should be removed on clean phase

2023-02-06 Thread via GitHub


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


##
tools/Config.mk:
##
@@ -570,10 +570,11 @@ define CLEAN
$(call DELFILE,$(subst /,\,$(OBJS)))
$(Q) if exist $(BIN) (del /f /q  $(subst /,\,$(BIN)))
$(Q) if exist $(EXTRA) (del /f /q  $(subst /,\,$(EXTRA)))
+   $(Q) if exist *.su (del /f /q *.su)
 endef
 else
 define CLEAN
-   $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp $(OBJS) $(BIN) $(EXTRA)
+   $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp $(OBJS) $(BIN) $(EXTRA) *.su

Review Comment:
   let's add .su to EXTRA like this:
   ```
   ifeq ($(CONFIG_ARCH_COVERAGE),y)
EXTRA = *.gcno *.gcda
   endif
   ```



-- 
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 #8439: rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

2023-02-06 Thread via GitHub


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


##
arch/arm/src/rp2040/rp2040_serial.c:
##
@@ -884,8 +884,7 @@ static bool up_rxavailable(struct uart_dev_s *dev)
 
 static void up_send(struct uart_dev_s *dev, int ch)
 {
-  struct up_dev_s *priv = (struct up_dev_s *)dev->priv;
-  up_serialout(priv, RP2040_UART_UARTDR_OFFSET, (uint32_t)ch);
+  up_putc(ch);

Review Comment:
   Done, use arm_lowputc() instead of up_putc()



-- 
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 #8439: rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

2023-02-06 Thread via GitHub


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


##
arch/arm/src/rp2040/rp2040_serial.c:
##
@@ -884,8 +884,7 @@ static bool up_rxavailable(struct uart_dev_s *dev)
 
 static void up_send(struct uart_dev_s *dev, int ch)
 {
-  struct up_dev_s *priv = (struct up_dev_s *)dev->priv;
-  up_serialout(priv, RP2040_UART_UARTDR_OFFSET, (uint32_t)ch);
+  up_putc(ch);

Review Comment:
   how to handle the non default device?



-- 
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: boards: Enable assert for citest

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

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


The following commit(s) were added to refs/heads/master by this push:
 new d8a8c2fdd8 boards: Enable assert for citest
d8a8c2fdd8 is described below

commit d8a8c2fdd896b14fd6cd4cdc256a78f33cf5aca6
Author: Xiang Xiao 
AuthorDate: Mon Jan 30 12:55:26 2023 +0800

boards: Enable assert for citest

Signed-off-by: Xiang Xiao 
---
 boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig | 2 ++
 boards/sim/sim/sim/configs/citest/defconfig| 2 ++
 2 files changed, 4 insertions(+)

diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig 
b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig
index c6aa9888eb..a080275da0 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig
@@ -30,6 +30,8 @@ CONFIG_ARCH_RISCV=y
 CONFIG_ARCH_STACKDUMP=y
 CONFIG_BOARD_LOOPSPERMSEC=6366
 CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_FEATURES=y
 CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
diff --git a/boards/sim/sim/sim/configs/citest/defconfig 
b/boards/sim/sim/sim/configs/citest/defconfig
index 639991dd18..4da8691099 100644
--- a/boards/sim/sim/sim/configs/citest/defconfig
+++ b/boards/sim/sim/sim/configs/citest/defconfig
@@ -19,6 +19,8 @@ CONFIG_BOARDCTL_POWEROFF=y
 CONFIG_BOARD_LOOPSPERMSEC=0
 CONFIG_BOOT_RUNFROMEXTSRAM=y
 CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_FEATURES=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_GPIO=y
 CONFIG_DEV_LOOP=y



[GitHub] [nuttx] masayuki2009 merged pull request #8364: boards: Enable assert for citest

2023-02-06 Thread via GitHub


masayuki2009 merged PR #8364:
URL: https://github.com/apache/nuttx/pull/8364


-- 
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: fix a bug of strtold

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

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


The following commit(s) were added to refs/heads/master by this push:
 new de21025702 fix a bug of strtold
de21025702 is described below

commit de21025702aa86a0d3aa883b518d7db4e1873aa9
Author: lilei19 
AuthorDate: Mon Feb 6 18:45:37 2023 +0800

fix a bug of strtold

  if input is -1e308,The output should be -1..
  but the output is -inf
---
 libs/libc/stdlib/lib_strtold.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libs/libc/stdlib/lib_strtold.c b/libs/libc/stdlib/lib_strtold.c
index 4814578bac..5338b7c183 100644
--- a/libs/libc/stdlib/lib_strtold.c
+++ b/libs/libc/stdlib/lib_strtold.c
@@ -401,12 +401,10 @@ static long_double decfloat(FAR char *ptr, FAR char 
**endptr)
   else if (num_digit + num_decimal > ldbl_max_10_exp)
 {
   errno = ERANGE;
-  return ldbl_max * ldbl_max;
 }
   else if (num_digit + num_decimal < ldbl_min_10_exp)
 {
   errno = ERANGE;
-  return ldbl_min * ldbl_min;
 }
 
   if (k % 9)



[GitHub] [nuttx] xiaoxiang781216 merged pull request #8441: fix a bug of strtold

2023-02-06 Thread via GitHub


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


-- 
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, #8442: tools/Config: stack usage(.su) file should be removed on clean phase

2023-02-06 Thread via GitHub


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

   ## Summary
   
   tools/Config: stack usage(.su) file should be removed on clean phase
   
   Signed-off-by: chao an 
   
   enable CONFIG_STACK_USAGE, garbage persists after distclean:
   ```
   nuttx$ make distclean
   nuttx$ git status --ignored
   HEAD detached at 9ea809fced
   Ignored files:
 (use "git add -f ..." to include in what will be committed)
.version
arch/arm/src/arm_allocateheap.su
arch/arm/src/arm_backtrace_unwind.su
arch/arm/src/arm_checkstack.su
arch/arm/src/arm_createstack.su
arch/arm/src/arm_doirq.su
arch/arm/src/arm_dumpnvic.su
arch/arm/src/arm_exit.su
arch/arm/src/arm_getintstack.su
arch/arm/src/arm_hardfault.su
arch/arm/src/arm_idle.su
arch/arm/src/arm_initialize.su
arch/arm/src/arm_initialstate.su
arch/arm/src/arm_lowputs.su
arch/arm/src/arm_mdelay.su
arch/arm/src/arm_modifyreg16.su
   ```
   
   Link PR:
   https://github.com/apache/nuttx/pull/8177
   
   ## Impact
   
   N/A
   
   ## Testing
   
   enable  CONFIG_STACK_USAGE, and distclean the garbage
   
   
   


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

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

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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8440: fs: support openat/fchmodat/mkfifoat/fstatat/...at api

2023-02-06 Thread via GitHub


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

   @yamt openat api is ready for review.


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

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

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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8370: include/sys/socket.h: Add SOCK_CTRL to socket type

2023-02-06 Thread via GitHub


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

   > Dear @xiaoxiang781216 san
   > 
   > > @SPRESENSE but how to pass the ioctl to usrsock server now?
   > 
   > This fix only add a new Socket Type for requests to Daemons that do not 
use the device's Socket. Therefore, the PASS method to usrsock server will 
remain the same.
   
   Ok, I saw SOCK_CTRL will convert to the real type:
   
https://github.com/apache/nuttx/pull/8370/files#diff-098d0f88e64dc86480d735d351725fce63ff53c8b0d834ca460ba61c2eb9bb13R289-R304
   So, what's the benefit to add SOCK_CTRL?


-- 
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 #8428: arch/xtensa/esp32s2: Add support for touch pad interrupts

2023-02-06 Thread via GitHub


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

   > @lucasssvaz why is it as Draft?
   
   Bc it required the other PR first. I'll open it 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] xiaoxiang781216 commented on pull request #7525: Improvements in TCP connections allocation.

2023-02-06 Thread via GitHub


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

   > Hmm, why is this check failing? I think that `checkpatch.sh` picks up 
other commits than the two actually in this PR?
   
   Please rebase your patch to the last master to fix this problem.


-- 
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] SPRESENSE commented on pull request #8370: include/sys/socket.h: Add SOCK_CTRL to socket type

2023-02-06 Thread via GitHub


SPRESENSE commented on PR #8370:
URL: https://github.com/apache/nuttx/pull/8370#issuecomment-141402

   > @SPRESENSE but how to pass the ioctl to usrsock server now?
   
   This fix only add a new Socket Type for requests to Daemons that do not use 
the device's Socket.
   Therefore, the PASS method to usrsock server will remain the same.


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

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

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



[GitHub] [nuttx] flyingfish89 opened a new pull request, #8441: fix a bug of strtold

2023-02-06 Thread via GitHub


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

   ## Summary
 if input is -1e308,The output should be -1..
 but the output is -inf
   ## 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] fjpanag commented on pull request #7525: Improvements in TCP connections allocation.

2023-02-06 Thread via GitHub


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

   Hmm, why is this check failing?  
   I think that `checkpatch.sh` picks up other commits than the two actually in 
this 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] flyingfish89 commented on pull request #7992: modify the strtof

2023-02-06 Thread via GitHub


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

   > @flyingfish89 I just applied this, and the tests now pass.
   
   ok.thanks!


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

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

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



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

2023-02-06 Thread via GitHub


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

   @flyingfish89 I just applied this, and the tests now pass.


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

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

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



[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8364: boards: Enable assert for citest

2023-02-06 Thread via GitHub


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

   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] Donny9 opened a new pull request, #8440: fs: support openat/fchmodat/mkfifoat/fstatat/...at api

2023-02-06 Thread via GitHub


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

   ## Summary
   fs: support openat/fchmodat/mkfifoat/fstatat/...at api
   Refs to:
   https://linux.die.net/man/2/openat
   ## Impact
   support file api with relative directory path spicified dirfd
   ## 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-apps] xiaoxiang781216 opened a new pull request, #1543: bluetooth/nimble: Update to ed083b36cb85c7437b905ee905ea4aed6a1653ad

2023-02-06 Thread via GitHub


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

   ## Summary
   
   which contain the fix: https://github.com/apache/mynewt-nimble/pull/1457
   
   ## Impact
   
   nimble
   
   ## Testing
   
   CI


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

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

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



[GitHub] [nuttx] masayuki2009 commented on pull request #8364: boards: Enable assert for citest

2023-02-06 Thread via GitHub


masayuki2009 commented on PR #8364:
URL: https://github.com/apache/nuttx/pull/8364#issuecomment-1418859292

   @xiaoxiang781216 
   Please remove boards/arm/imx6/sabre-6quad/configs/citest/defconfig from this 
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



[nuttx] 02/03: boards: sabre-6quad: Update README.txt

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

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

commit 25a6448a1ab3b001d055ca61edd4a75fc3849a3c
Author: Masayuki Ishikawa 
AuthorDate: Mon Feb 6 14:37:51 2023 +0900

boards: sabre-6quad: Update README.txt

Summary:
- This commit updates README.txt regarding QEMU with DEBUG_ASSERTIONS=y

Impact:
- None

Testing:
- Tested with QEMU-7.1

Signed-off-by: Masayuki Ishikawa 
---
 boards/arm/imx6/sabre-6quad/README.txt | 31 +++
 1 file changed, 7 insertions(+), 24 deletions(-)

diff --git a/boards/arm/imx6/sabre-6quad/README.txt 
b/boards/arm/imx6/sabre-6quad/README.txt
index 4c24e59671..78416f21f7 100644
--- a/boards/arm/imx6/sabre-6quad/README.txt
+++ b/boards/arm/imx6/sabre-6quad/README.txt
@@ -609,30 +609,13 @@ index b15becbb51..3ad4d13ad7 100644
 2. Please note that QEMU does not report PL310 (L2CC) related
registers correctly, so if you enable CONFIG_DEBUG_ASSERTION
the nuttx will stop with DEBUGASSERT(). To avoid this,
-   comment out the following lines.
-
 a/arch/arm/src/armv7-a/arm_l2cc_pl310.c
-+++ b/arch/arm/src/armv7-a/arm_l2cc_pl310.c
-@@ -333,7 +333,7 @@ void arm_l2ccinitialize(void)
- #if defined(CONFIG_ARMV7A_ASSOCIATIVITY_8WAY)
-   DEBUGASSERT((getreg32(L2CC_ACR) & L2CC_ACR_ASS) == 0);
- #elif defined(CONFIG_ARMV7A_ASSOCIATIVITY_16WAY)
-- DEBUGASSERT((getreg32(L2CC_ACR) & L2CC_ACR_ASS) == L2CC_ACR_ASS);
-+ //DEBUGASSERT((getreg32(L2CC_ACR) & L2CC_ACR_ASS) == L2CC_ACR_ASS);
- #else
- # error No associativity selected
- #endif
-@@ -345,8 +345,8 @@ void arm_l2ccinitialize(void)
-   DEBUGASSERT((getreg32(L2CC_ACR) & L2CC_ACR_WAYSIZE_MASK) ==
-   L2CC_ACR_WAYSIZE_32KB);
- #elif defined(CONFIG_ARMV7A_WAYSIZE_64KB)
-- DEBUGASSERT((getreg32(L2CC_ACR) & L2CC_ACR_WAYSIZE_MASK) ==
-- L2CC_ACR_WAYSIZE_64KB);
-+ // DEBUGASSERT((getreg32(L2CC_ACR) & L2CC_ACR_WAYSIZE_MASK) ==
-+ // L2CC_ACR_WAYSIZE_64KB);
- #elif defined(CONFIG_ARMV7A_WAYSIZE_128KB)
-   DEBUGASSERT((getreg32(L2CC_ACR) & L2CC_ACR_WAYSIZE_MASK) ==
-   L2CC_ACR_WAYSIZE_128KB);
+   comment out the following configs in defconfig
+
+-CONFIG_ARMV7A_ASSOCIATIVITY_16WAY=y
+-CONFIG_ARMV7A_L2CC_PL310=y
+-CONFIG_ARMV7A_WAYSIZE_64KB=y
+-CONFIG_PL310_LOCKDOWN_BY_LINE=y
+-CONFIG_PL310_LOCKDOWN_BY_MASTER=y
 
 3. Run QEMU
 



[GitHub] [nuttx] xiaoxiang781216 merged pull request #8438: Update sabre-6quad with QEMU

2023-02-06 Thread via GitHub


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


-- 
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] 01/03: boards: sabre-6quad: Enable DEBUG_ASSERTION in citest

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

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

commit 50989430cd1acfb9ee3696dc04b8a19cbc9d8fa9
Author: Masayuki Ishikawa 
AuthorDate: Mon Feb 6 14:30:44 2023 +0900

boards: sabre-6quad: Enable DEBUG_ASSERTION in citest

Summary:
- Since QEMU does not report L2CC information correctly,
  NuttX stops if DEBUG_ASSERTIONS=y.
- This commit adds DEBUG_ASSERTIONS=y to citest/defconfigs
  and disables L2CC related configs.
- Also, it disables RAMLOG to show the crash information

Impact:
- None

Testing:
- Tested with QEMU-7.1

Signed-off-by: Masayuki Ishikawa 
---
 boards/arm/imx6/sabre-6quad/configs/citest/defconfig | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/boards/arm/imx6/sabre-6quad/configs/citest/defconfig 
b/boards/arm/imx6/sabre-6quad/configs/citest/defconfig
index 709097128b..a883e9ff38 100644
--- a/boards/arm/imx6/sabre-6quad/configs/citest/defconfig
+++ b/boards/arm/imx6/sabre-6quad/configs/citest/defconfig
@@ -19,12 +19,11 @@ CONFIG_ARCH_INTERRUPTSTACK=2048
 CONFIG_ARCH_IRQBUTTONS=y
 CONFIG_ARCH_LOWVECTORS=y
 CONFIG_ARCH_STACKDUMP=y
-CONFIG_ARMV7A_ASSOCIATIVITY_16WAY=y
-CONFIG_ARMV7A_L2CC_PL310=y
-CONFIG_ARMV7A_WAYSIZE_64KB=y
 CONFIG_BOARD_LOOPSPERMSEC=99369
 CONFIG_BOOT_RUNFROMSDRAM=y
 CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_FEATURES=y
 CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
@@ -48,13 +47,8 @@ CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
-CONFIG_PL310_LOCKDOWN_BY_LINE=y
-CONFIG_PL310_LOCKDOWN_BY_MASTER=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_PSEUDOFS_SOFTLINKS=y
-CONFIG_RAMLOG=y
-CONFIG_RAMLOG_BUFSIZE=16384
-CONFIG_RAMLOG_SYSLOG=y
 CONFIG_RAM_SIZE=1073741824
 CONFIG_RAM_START=0x1000
 CONFIG_RAM_VSTART=0x1000



[nuttx] branch master updated (9d8f7de81c -> 79704620f8)

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

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


from 9d8f7de81c build(deps): bump docker/build-push-action from 3 to 4
 new 50989430cd boards: sabre-6quad: Enable DEBUG_ASSERTION in citest
 new 25a6448a1a boards: sabre-6quad: Update README.txt
 new 79704620f8 tools: ci: Fix testrun/utins/common.py for sabrelite (QEMU)

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


Summary of changes:
 boards/arm/imx6/sabre-6quad/README.txt | 31 +-
 .../arm/imx6/sabre-6quad/configs/citest/defconfig  | 10 ++-
 tools/ci/testrun/utils/common.py   |  2 +-
 3 files changed, 10 insertions(+), 33 deletions(-)



[nuttx] 03/03: tools: ci: Fix testrun/utins/common.py for sabrelite (QEMU)

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

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

commit 79704620f8d7efe34984e67621bfa00ccbf72127
Author: Masayuki Ishikawa 
AuthorDate: Mon Feb 6 16:44:57 2023 +0900

tools: ci: Fix testrun/utins/common.py for sabrelite (QEMU)

Summary:
- I noticed that nuttx crashes if DEBUG_ASSERTIONS=y
- This commit fixes this issue by changing QEMU options

Impact:
- None

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa 
---
 tools/ci/testrun/utils/common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ci/testrun/utils/common.py b/tools/ci/testrun/utils/common.py
index 17fd7855f3..c1f5db7a0f 100644
--- a/tools/ci/testrun/utils/common.py
+++ b/tools/ci/testrun/utils/common.py
@@ -214,7 +214,7 @@ class start:
 "bash",
 [
 "-c",
-"qemu-system-arm -M sabrelite -smp 1 -bios none -kernel 
./nuttx -nographic | tee %s"
+"qemu-system-arm -semihosting -M sabrelite -m 1024 -smp 4 
-kernel ./nuttx -nographic | tee %s"
 % self.log,
 ],
 )



[GitHub] [nuttx] anchao commented on issue #7475: RaspberryPi-Pico-W is not getting WiFi

2023-02-06 Thread via GitHub


anchao commented on issue #7475:
URL: https://github.com/apache/nuttx/issues/7475#issuecomment-1418835020

   Please note that the setup process of the cyw43 driver has changed:
   
   ```
   1. Download Raspberry Pi Pico SDK and update submodule(cyw43-driver)
   
 $ git clone -b 1.4.0 https://github.com/raspberrypi/pico-sdk.git
 $ cd pico-sdk
 $ git submodule update --init --recursive lib/cyw43-driver
   ...
   ```
   


-- 
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 issue #7475: RaspberryPi-Pico-W is not getting WiFi

2023-02-06 Thread via GitHub


anchao commented on issue #7475:
URL: https://github.com/apache/nuttx/issues/7475#issuecomment-1418815688

   @acassis @TA1DB please help to review PR 
https://github.com/apache/nuttx/pull/8439 , which fixed CYW43 not working 
properly on pico-W


-- 
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, #8439: rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware

2023-02-06 Thread via GitHub


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

   ## Summary
   
   1. rp2040/raspberrypi-pico-w: update submodule to avoid invaild firmware
   
   The cyw43-driver is a submodule in the pick-sdk, if the submodule is
   not updated, the dummy firmware driver will be used, update the document
   to correct the setup flow.
   ```
   ${PICO_SDK_PATH}/lib/cyw43-driver/firmware/43439A0-7.95.49.00.combined
   ```
   Signed-off-by: chao an 
   
   2. arm/rp2040: fix compile warning on boot2 build
   
   ```
   ld: warning: 
boards/arm/rp2040/raspberrypi-pico-w/scripts/raspberrypi-pico-flash.ld contains 
output sections; did you forget -T?
   ```
   Signed-off-by: chao an 
   
   3. raspberrypi-pico-w/telnet: enable more configs
   
   Signed-off-by: chao an 
   
   4. wireless/bcm43xxx/qspi: try tx after rx fails
   
   1. Try tx after rx fails to avoid gspi_thread busy to try rx
   2. Add some delay if alloc frame buffer failed
   
   Signed-off-by: chao an 
   
   5. bcm43xxx/bcmf_ioctl.h: pack wl_* structure to avoid unaligned access
   
   Signed-off-by: chao an 
   
   6. arm/rp2040: check tx holding register before send
   
   Signed-off-by: chao an 
   
   7. arm/backtrace: fix compile warning
   
   ```
   common/arm_backtrace_unwind.c: In function 'up_backtrace':
   common/arm_backtrace_unwind.c:626:27:
   warning: assignment to 'long unsigned int' from 'uint8_t (*)[]'\
   {aka 'unsigned char (*)[]'} makes integer from pointer without a cast 
[-Wint-conversion]
   
 626 |   frame.stack_top = _intstacktop;
 |
   
   ```
   
   ## Impact
   
   N/A
   
   ## Testing
   
   raspberrypi-pico-w:telnet


-- 
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] masayuki2009 commented on pull request #8438: Update sabre-6quad with QEMU

2023-02-06 Thread via GitHub


masayuki2009 commented on PR #8438:
URL: https://github.com/apache/nuttx/pull/8438#issuecomment-1418806130

   @jerpelea 
   Please merge this 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] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-06 Thread via GitHub


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


##
binfmt/binfmt_execmodule.c:
##
@@ -164,23 +164,23 @@ int exec_module(FAR const struct binary_s *binp,
 #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
   /* Instantiate the address environment containing the user heap */
 
-  ret = up_addrenv_select(>addrenv, );
+  ret = addrenv_select((struct addrenv_s *)>addrenv);

Review Comment:
   Sure, I can do that



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

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

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



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

2023-02-06 Thread via GitHub


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


##
binfmt/binfmt_execmodule.c:
##
@@ -164,23 +164,23 @@ int exec_module(FAR const struct binary_s *binp,
 #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
   /* Instantiate the address environment containing the user heap */
 
-  ret = up_addrenv_select(>addrenv, );
+  ret = addrenv_select((struct addrenv_s *)>addrenv);

Review Comment:
   should we change binp prototype to reflect the 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] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-06 Thread via GitHub


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


##
include/nuttx/addrenv.h:
##
@@ -218,13 +225,27 @@
  (CONFIG_ARCH_PGPOOL_VBASE + CONFIG_ARCH_PGPOOL_SIZE)
 
 #endif
+/
+ * Public Type Definitions
+ /
+
+struct tcb_s;  /* Forward reference to TCB */
 
 /
  * Public Types
  /
 
 #ifndef __ASSEMBLY__
 
+struct addrenv_s
+{
+  struct arch_addrenv_s pgdir; /* The address environment page directory*/

Review Comment:
   In the 3rd 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] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-06 Thread via GitHub


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


##
binfmt/binfmt_execmodule.c:
##
@@ -164,23 +164,23 @@ int exec_module(FAR const struct binary_s *binp,
 #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
   /* Instantiate the address environment containing the user heap */
 
-  ret = up_addrenv_select(>addrenv, );
+  ret = addrenv_select((struct addrenv_s *)>addrenv);
   if (ret < 0)
 {
-  berr("ERROR: up_addrenv_select() failed: %d\n", ret);
+  berr("ERROR: addrenv_select() failed: %d\n", ret);
   goto errout_with_envp;
 }
 
-  ret = up_addrenv_vheap(>addrenv, );
+  ret = up_addrenv_vheap(>addrenv.pgdir, );

Review Comment:
   Done



##
binfmt/libelf/libelf_addrenv.c:
##
@@ -89,27 +90,32 @@ int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, 
size_t textsize,
 
   /* Create an address environment for the new ELF task */
 
-  ret = up_addrenv_create(textsize, datasize, heapsize, >addrenv);
+  ret = up_addrenv_create(textsize, datasize, heapsize,
+  >addrenv.pgdir);

Review Comment:
   Done



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

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

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



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

2023-02-06 Thread via GitHub


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


##
include/nuttx/addrenv.h:
##
@@ -218,13 +220,24 @@
  (CONFIG_ARCH_PGPOOL_VBASE + CONFIG_ARCH_PGPOOL_SIZE)
 
 #endif
+/
+ * Public Type Definitions
+ /
+
+struct tcb_s;  /* Forward reference to TCB */
 
 /
  * Public Types
  /
 
 #ifndef __ASSEMBLY__
 
+struct addrenv_s
+{
+  struct arch_addrenv_s pgdir; /* The address environment page directory  */
+};
+
+typedef struct addrenv_s addrenv_t;

Review Comment:
   Done



##
include/nuttx/addrenv.h:
##
@@ -269,6 +282,83 @@ struct addrenv_reserve_s
  * Public Function Prototypes
  /
 
+/
+ * Name: addrenv_allocate
+ *
+ * Description:
+ *   Allocate an address environment for a new process.
+ *
+ * Input Parameters:
+ *   tcb   - The tcb of the newly created task.
+ *   ttype - The type of the task.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_allocate(FAR struct tcb_s *tcb, uint8_t ttype);
+
+/
+ * Name: addrenv_free
+ *
+ * Description:
+ *   Free an address environment for a process.
+ *
+ * Input Parameters:
+ *   tcb - The tcb of the task.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_free(FAR struct tcb_s *tcb);
+
+/
+ * Name: addrenv_switch
+ *
+ * Description:
+ *   Switch to an address environment
+ *
+ * Input Parameters:
+ *   tcb - The tcb of the task to switch to, or NULL to use the task at the
+ * head of the ready-to-run list.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_switch(FAR struct tcb_s *tcb);
+
+/
+ * Name: addrenv_attach
+ *
+ * Description:
+ *   Attach address environment to a newly process. Called by exec() right
+ *   before injecting the new process into the system.
+ *
+ * Input Parameters:
+ *   tcb - The tcb of the newly loaded task.
+ *   addrenv - The address environment that is attached.
+ *
+ * Returned Value:
+ *   This is a NuttX internal function so it follows the convention that
+ *   0 (OK) is returned on success and a negated errno is returned on
+ *   failure.
+ *
+ /
+
+int addrenv_attach(FAR struct tcb_s *tcb,
+   FAR const struct arch_addrenv_s *addrenv);

Review Comment:
   In the 3rd 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] pussuw commented on a diff in pull request #8355: arch/addrenv: Refactor address environment handling, by moving tg_addrenv out of the group structure

2023-02-06 Thread via GitHub


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


##
binfmt/binfmt_execmodule.c:
##
@@ -164,23 +164,23 @@ int exec_module(FAR const struct binary_s *binp,
 #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
   /* Instantiate the address environment containing the user heap */
 
-  ret = up_addrenv_select(>addrenv, );
+  ret = addrenv_select((struct addrenv_s *)>addrenv);

Review Comment:
   Because binp is declared as const here, but the reference counter is needed 
in addrenv_select() so it must be made mutable



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

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

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



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

2023-02-06 Thread via GitHub


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


##
arch/arm/src/armv7-a/arm_addrenv.c:
##
@@ -778,22 +671,18 @@ int up_addrenv_clone(const arch_addrenv_t *src,
  *   is created that needs to share the address environment of its task
  *   group.
  *
- *   NOTE: In some platforms, nothing will need to be done in this case.
- *   Simply being a member of the group that has the address environment
- *   may be sufficient.
- *
  * Input Parameters:
- *   group - The task group to which the new thread belongs.
- *   tcb   - The TCB of the thread needing the address environment.
+ *   ptcb  - The tcb of the parent task.
+ *   tcb   - The tcb of the thread needing the address environment.
  *
  * Returned Value:
  *   Zero (OK) on success; a negated errno value on failure.
  *
  /
 
-int up_addrenv_attach(struct task_group_s *group, struct tcb_s *tcb)
+int up_addrenv_attach(struct tcb_s *ptcb, struct tcb_s *tcb)

Review Comment:
   I'm not sure what this function is supposed to do. It is implemented as 
blank by all 3 platforms where it exists.
   
   However, to keep the meaning of the original function ptcb is needed, 
"attach" means to join the parent's address environment.



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

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

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



  1   2   >