[GitHub] [incubator-nuttx] jerpelea opened a new pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


jerpelea opened a new pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277


   ## Summary
   Gregory Nutt has submitted the SGA and we can migrate the licenses  to 
Apache.
   
   ## Impact
   NONE
   
   ## Testing
   NONE
   


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

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




[GitHub] [incubator-nuttx] jerpelea commented on pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


jerpelea commented on pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277#issuecomment-812390478


   @xiaoxiang781216 i am out of ideas howto fix the remaining nxstyle errors


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

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




[GitHub] [incubator-nuttx] jerpelea edited a comment on pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


jerpelea edited a comment on pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277#issuecomment-812390478


   @xiaoxiang781216 I am out of ideas howto fix the remaining nxstyle errors


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

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




[incubator-nuttx] branch master updated (a930b05 -> 778f050)

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

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


from a930b05  Implement getopt_long() and getopt_long_only()
 add 778f050  arch: xtensa: Author Gregory Nutt: update licenses to Apache

No new revisions were added by this update.

Summary of changes:
 arch/xtensa/include/arch.h   | 43 
 arch/xtensa/include/esp32/chip.h | 39 +++--
 arch/xtensa/include/esp32/irq.h  | 39 +++--
 arch/xtensa/include/irq.h| 39 +++--
 arch/xtensa/include/limits.h | 39 +++--
 arch/xtensa/include/lx6/chip.h   | 39 +++--
 arch/xtensa/include/lx6/irq.h| 39 +++--
 arch/xtensa/include/syscall.h| 39 +++--
 arch/xtensa/include/types.h  | 39 +++--
 arch/xtensa/src/common/xtensa.h  | 39 +++--
 arch/xtensa/src/common/xtensa_assert.c   | 39 +++--
 arch/xtensa/src/common/xtensa_blocktask.c| 39 +++--
 arch/xtensa/src/common/xtensa_checkstack.c   | 39 +++--
 arch/xtensa/src/common/xtensa_copystate.c| 39 +++--
 arch/xtensa/src/common/xtensa_cpenable.c | 39 +++--
 arch/xtensa/src/common/xtensa_cpupause.c | 39 +++--
 arch/xtensa/src/common/xtensa_createstack.c  | 39 +++--
 arch/xtensa/src/common/xtensa_exit.c | 39 +++--
 arch/xtensa/src/common/xtensa_idle.c | 39 +++--
 arch/xtensa/src/common/xtensa_initialize.c   | 39 +++--
 arch/xtensa/src/common/xtensa_initialstate.c | 39 +++--
 arch/xtensa/src/common/xtensa_interruptcontext.c | 39 +++--
 arch/xtensa/src/common/xtensa_irqdispatch.c  | 39 +++--
 arch/xtensa/src/common/xtensa_lowputs.c  | 39 +++--
 arch/xtensa/src/common/xtensa_mdelay.c   | 43 
 arch/xtensa/src/common/xtensa_modifyreg16.c  | 39 +++--
 arch/xtensa/src/common/xtensa_modifyreg32.c  | 39 +++--
 arch/xtensa/src/common/xtensa_modifyreg8.c   | 39 +++--
 arch/xtensa/src/common/xtensa_puts.c | 39 +++--
 arch/xtensa/src/common/xtensa_releasepending.c   | 39 +++--
 arch/xtensa/src/common/xtensa_releasestack.c | 39 +++--
 arch/xtensa/src/common/xtensa_schedsigaction.c   | 39 +++--
 arch/xtensa/src/common/xtensa_sigtramp.S | 41 +++---
 arch/xtensa/src/common/xtensa_stackframe.c   | 39 +++--
 arch/xtensa/src/common/xtensa_testset.c  | 39 +++--
 arch/xtensa/src/common/xtensa_udelay.c   | 39 +++--
 arch/xtensa/src/common/xtensa_unblocktask.c  | 39 +++--
 arch/xtensa/src/common/xtensa_usestack.c | 39 +++--
 arch/xtensa/src/esp32/esp32_allocateheap.c   | 39 +++--
 arch/xtensa/src/esp32/esp32_clockconfig.h| 43 
 arch/xtensa/src/esp32/esp32_config.h | 39 +++--
 arch/xtensa/src/esp32/esp32_cpuindex.S   | 39 +++--
 arch/xtensa/src/esp32/esp32_cpuint.c | 43 
 arch/xtensa/src/esp32/esp32_cpuint.h | 43 
 arch/xtensa/src/esp32/esp32_intdecode.c  | 39 +++--
 arch/xtensa/src/esp32/esp32_intercpu_interrupt.c | 39 +++--
 arch/xtensa/src/esp32/esp32_irq.c| 39 +++--
 arch/xtensa/src/esp32/esp32_region.h | 43 
 arch/xtensa/src/esp32/esp32_serial.c | 39 +++--
 arch/xtensa/src/esp32/esp32_smp.h| 39 +++--
 arch/xtensa/src/esp32/esp32_start.h  | 43 
 arch/xtensa/src/esp32/esp32_timerisr.c   | 39 +++--
 arch/xtensa/src/lx6/Toolchain.defs   | 39 +++--
 53 files changed, 650 insertions(+), 1447 deletions(-)


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3275: arch: xtensa: Author Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #3275:
URL: https://github.com/apache/incubator-nuttx/pull/3275


   


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277#issuecomment-812410053


   > @xiaoxiang781216 I am out of ideas howto fix the remaining nxstyle errors
   
   The error is also strange for me:(, anyway, let's merge the copyright fix 
first. We can address the style issue later.


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277#issuecomment-812410262


   @jerpelea some error happen here:
   
https://github.com/apache/incubator-nuttx/pull/3277/checks?check_run_id=2252301357


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

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




[GitHub] [incubator-nuttx] wswsmao opened a new pull request #3278: libc/uio: fix typos

2021-04-02 Thread GitBox


wswsmao opened a new pull request #3278:
URL: https://github.com/apache/incubator-nuttx/pull/3278


   


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

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




[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


Ouss4 commented on pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277#issuecomment-812415496


   > > @xiaoxiang781216 I am out of ideas howto fix the remaining nxstyle errors
   > 
   > The error is also strange for me:(, anyway, let's merge the copyright fix 
first. We can address the style issue later.
   
   I think it's just nxstyle that's confused with the scientific notation.


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

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




[GitHub] [incubator-nuttx] yamt commented on issue #3157: esp32: syslog messages from boot interfere with other syslog messages

2021-04-02 Thread GitBox


yamt commented on issue #3157:
URL: 
https://github.com/apache/incubator-nuttx/issues/3157#issuecomment-812462038


   i think the fundamental problem is that the expected behavior of these 
callbacks are not well documented.
   i guess the only thing we can do without having too many assumptions is
   to have a global line buffer and only flush it to nuttx syslog on a newline.
   


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

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




[GitHub] [incubator-nuttx] walbon commented on pull request #3274: board/arm/lpc17xx_40xx/mbed: userled defconfig

2021-04-02 Thread GitBox


walbon commented on pull request #3274:
URL: https://github.com/apache/incubator-nuttx/pull/3274#issuecomment-812469887


   well, that`s new for me.
   I updated and checked if working well, done.
   
   
   Thank you @xiaoxiang781216 


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

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




[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #566: WIP: crypto: Initial support for Mbed TLS

2021-04-02 Thread GitBox


yamt commented on a change in pull request #566:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/566#discussion_r606178090



##
File path: crypto/mbedtls/Makefile
##
@@ -0,0 +1,85 @@
+
+# apps/crypto/mbedtls/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+
+
+include $(APPDIR)/Make.defs
+
+# Mbed TLS crypto library
+
+# Set up build configuration and environment
+
+MBEDTLS_URL ?= "https://github.com/ARMmbed/mbedtls/archive";
+
+MBEDTLS_VERSION = $(patsubst "%",%,$(strip $(CONFIG_MBEDTLS_VERSION)))
+MBEDTLS_ZIP = v$(MBEDTLS_VERSION).zip
+
+MBEDTLS_UNPACKNAME = mbedtls
+UNPACK ?= unzip -q -o
+
+MBEDTLS_UNPACKLIBDIR = $(MBEDTLS_UNPACKNAME)$(DELIM)library
+MBEDTLS_UNPACKPROGDIR = $(MBEDTLS_UNPACKNAME)$(DELIM)programs
+
+# This lets Mbed TLS better use some of the POSIX features we have
+CFLAGS += ${shell $(DEFINE) "$(CC)" __unix__}

Review comment:
   our local port of mbedtls has:
   ```
   # Tell mbedtls that NuttX has socklen_t.
   # Note: _SOCKLEN_T is what macOS defines with socklen_t.
   CFLAGS += -D_SOCKLEN_T
   ```
   i guess this version needs it too.
   




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

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




[GitHub] [incubator-nuttx] jerpelea opened a new pull request #3279: NuttX: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


jerpelea opened a new pull request #3279:
URL: https://github.com/apache/incubator-nuttx/pull/3279


   ## Summary
   Several licenses were missed in the initial work
   
   David Sidrane has submitted the ICLA and we can migrate the licenses to 
Apache.
   
   Gregory Nutt has submitted the SGA and we can migrate the licenses to Apache.
   
   ## Impact
   NONE
   
   ## Testing
   NONE
   


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

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




[GitHub] [incubator-nuttx] acassis commented on a change in pull request #3261: esp32-c3: Add support to RNG peripheral

2021-04-02 Thread GitBox


acassis commented on a change in pull request #3261:
URL: https://github.com/apache/incubator-nuttx/pull/3261#discussion_r606204897



##
File path: arch/risc-v/src/esp32c3/esp32c3_rng.c
##
@@ -0,0 +1,273 @@
+/
+ * arch/risc-v/src/esp32c3/esp32c3_rng.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 "riscv_arch.h"
+#include "esp32c3_attr.h"
+#include "hardware/wdev_reg.h"
+#include "esp32c3_clockconfig.h"
+
+#if defined(CONFIG_ESP32C3_RNG)
+#if defined(CONFIG_DEV_RANDOM) || defined(CONFIG_DEV_URANDOM_ARCH)
+
+/
+ * Pre-processor Definitions
+ /
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+/
+ * Private Function Prototypes
+ /
+
+static int esp32c3_rng_initialize(void);
+static ssize_t esp32c3_rng_read(FAR struct file *filep, FAR char *buffer,
+size_t buflen);
+static int esp32c3_rng_open(FAR struct file *filep);
+
+/
+ * Private Types
+ /
+
+struct rng_dev_s
+{
+  uint8_t *rd_buf;
+  sem_trd_sem; /* semaphore for read RNG data */
+};
+
+/
+ * Private Data
+ /
+
+static struct rng_dev_s g_rngdev;
+
+static const struct file_operations g_rngops =
+{
+  .open  = esp32c3_rng_open,   /* open */
+  .read  = esp32c3_rng_read,   /* read */
+};
+
+/
+ * Private functions
+ /
+
+/
+ * Name: esp32c3_random
+ /
+
+uint32_t IRAM_ATTR esp_random(void)
+{
+  /* The PRNG which implements WDEV_RANDOM register gets 2 bits
+   * of extra entropy from a hardware randomness source every APB clock cycle
+   * (provided WiFi or BT are enabled). To make sure entropy is not drained
+   * faster than it is added, this function needs to wait for at least 16 APB
+   * clock cycles after reading previous word. This implementation may
+   * actually wait a bit longer due to extra time spent in arithmetic and
+   * branch statements.
+   *
+   * As a (probably unnecessary) precaution to avoid returning the
+   * RNG state as-is, the result is XORed with additional
+   * WDEV_RND_REG reads while waiting.
+   */
+
+  uint32_t cpu_to_apb_freq_ratio = esp32c3_clk_cpu_freq() /
+   esp32c3_clk_apb_freq();
+
+  static uint32_t last_ccount = 0;
+  uint32_t ccount;
+  uint32_t result = 0;
+
+  do
+{
+  ccount = esp32c3_cpu_cycle_count();
+  result ^= getreg32(WDEV_RND_REG);
+}
+  while (ccount - last_ccount < cpu_to_apb_freq_ratio * 16);
+
+  last_ccount = ccount;
+  return result ^ getreg32(WDEV_RND_REG);
+}
+
+/
+ * Name: esp32c3_rng_start
+ /
+
+static void esp32c3_rng_start(void)
+{
+  /* Nothing to do, bootloader already did it */
+}
+
+/
+ * N

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #566: WIP: crypto: Initial support for Mbed TLS

2021-04-02 Thread GitBox


xiaoxiang781216 commented on a change in pull request #566:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/566#discussion_r606208537



##
File path: crypto/mbedtls/Makefile
##
@@ -0,0 +1,85 @@
+
+# apps/crypto/mbedtls/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+
+
+include $(APPDIR)/Make.defs
+
+# Mbed TLS crypto library
+
+# Set up build configuration and environment
+
+MBEDTLS_URL ?= "https://github.com/ARMmbed/mbedtls/archive";
+
+MBEDTLS_VERSION = $(patsubst "%",%,$(strip $(CONFIG_MBEDTLS_VERSION)))
+MBEDTLS_ZIP = v$(MBEDTLS_VERSION).zip
+
+MBEDTLS_UNPACKNAME = mbedtls
+UNPACK ?= unzip -q -o
+
+MBEDTLS_UNPACKLIBDIR = $(MBEDTLS_UNPACKNAME)$(DELIM)library
+MBEDTLS_UNPACKPROGDIR = $(MBEDTLS_UNPACKNAME)$(DELIM)programs
+
+# This lets Mbed TLS better use some of the POSIX features we have
+CFLAGS += ${shell $(DEFINE) "$(CC)" __unix__}

Review comment:
   Should we add _SOCKLEN_T to our socket.h header file?




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

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




[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #566: WIP: crypto: Initial support for Mbed TLS

2021-04-02 Thread GitBox


yamt commented on a change in pull request #566:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/566#discussion_r606210446



##
File path: crypto/mbedtls/Makefile
##
@@ -0,0 +1,85 @@
+
+# apps/crypto/mbedtls/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+
+
+include $(APPDIR)/Make.defs
+
+# Mbed TLS crypto library
+
+# Set up build configuration and environment
+
+MBEDTLS_URL ?= "https://github.com/ARMmbed/mbedtls/archive";
+
+MBEDTLS_VERSION = $(patsubst "%",%,$(strip $(CONFIG_MBEDTLS_VERSION)))
+MBEDTLS_ZIP = v$(MBEDTLS_VERSION).zip
+
+MBEDTLS_UNPACKNAME = mbedtls
+UNPACK ?= unzip -q -o
+
+MBEDTLS_UNPACKLIBDIR = $(MBEDTLS_UNPACKNAME)$(DELIM)library
+MBEDTLS_UNPACKPROGDIR = $(MBEDTLS_UNPACKNAME)$(DELIM)programs
+
+# This lets Mbed TLS better use some of the POSIX features we have
+CFLAGS += ${shell $(DEFINE) "$(CC)" __unix__}

Review comment:
   maybe.
   we can add all of these.
   
https://github.com/ARMmbed/mbedtls/blob/d5200371ec383d32dd3cb9a105cb11f75749ae25/library/net_sockets.c#L319-L321




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

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




[GitHub] [incubator-nuttx-apps] patacongo commented on pull request #646: testing/ostest: Add a test of the getopt() family of interfaces.

2021-04-02 Thread GitBox


patacongo commented on pull request #646:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/646#issuecomment-812523031


   > @patacongo the patch has nxstyle warning need to be resolved.
   
   Fixed.  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.

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




[GitHub] [incubator-nuttx] jerpelea commented on pull request #3279: NuttX: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


jerpelea commented on pull request #3279:
URL: https://github.com/apache/incubator-nuttx/pull/3279#issuecomment-812524450


   please ignore the remaining errors


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

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




[GitHub] [incubator-nuttx] jerpelea commented on pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


jerpelea commented on pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277#issuecomment-812528835


   please ignore the error


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3278: libc/uio: fix typos

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #3278:
URL: https://github.com/apache/incubator-nuttx/pull/3278


   


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

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




[incubator-nuttx] branch master updated (778f050 -> 84d4458)

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

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


from 778f050  arch: xtensa: Author Gregory Nutt: update licenses to Apache
 add 84d4458  libc/uio: fix typos

No new revisions were added by this update.

Summary of changes:
 libs/libc/uio/lib_writev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3274: board/arm/lpc17xx_40xx/mbed: userled defconfig

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3274:
URL: https://github.com/apache/incubator-nuttx/pull/3274#issuecomment-812539467


   No problem, you are welcome to joint the community.


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3274: board/arm/lpc17xx_40xx/mbed: userled defconfig

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #3274:
URL: https://github.com/apache/incubator-nuttx/pull/3274


   


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

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




[incubator-nuttx] branch master updated (84d4458 -> b10c6d6)

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

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


from 84d4458  libc/uio: fix typos
 add b10c6d6  board/arm/lpc17xx_40xx/mbed: userled defconfig

No new revisions were added by this update.

Summary of changes:
 boards/arm/lpc17xx_40xx/mbed/configs/{nsh => userled}/defconfig | 6 ++
 1 file changed, 6 insertions(+)
 copy boards/arm/lpc17xx_40xx/mbed/configs/{nsh => userled}/defconfig (90%)


[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


Ouss4 commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812541444


@patacongo @xiaoxiang781216 this broke Xtensa and RISC-V (at least 
ESP32-C3).  Running `ls` for instance is crashing.
   Maybe the issue is related to 
https://github.com/apache/incubator-nuttx/issues/3241


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

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




[GitHub] [incubator-nuttx] patacongo commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


patacongo commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812543185


   > @patacongo @xiaoxiang781216 this broke Xtensa and RISC-V (at least 
ESP32-C3). Running `ls` for instance is crashing.
   > Maybe the issue is related to #3241
   
   Is that just a 'ls' with no arguments?  This should not be platform 
specific.  Can you single step through the ls command to find where the failure 
is?
   


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

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




[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


patacongo edited a comment on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812543185


   > @patacongo @xiaoxiang781216 this broke Xtensa and RISC-V (at least 
ESP32-C3). Running `ls` for instance is crashing.
   > Maybe the issue is related to #3241
   
   Is that just a 'ls' with no arguments?  This works find on the simulator and 
should not be platform specific.  Can you single step through the ls command to 
find where the failure is?
   


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

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




[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


Ouss4 commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812547102


   Yes it's `ls` without any argument.  Xtensa has a backtrace builtin, here it 
is decoded:
   
   ```
   0x400d3603: xtensa_assert at xtensa_assert.c:93
   0x400d36cd: xtensa_user_panic at xtensa_assert.c:320 (discriminator 2)
   0x400d3593: xtensa_user at esp32_user.c:390
   0x40080856: _xtensa_user_handler at xtensa_user_handler.S:257
   0x400dc5b8: getopt_common at lib_getopt_common.c:298
   0x400dc32a: getopt at lib_getopt.c:82
   0x400d5b2a: cmd_ls at nsh_fscmds.c:1098
   0x400d5632: nsh_command at nsh_command.c:1061
   0x400d50e9: nsh_execute at nsh_parse.c:741
(inlined by) nsh_parse_command at nsh_parse.c:2578
   0x400d5186: nsh_parse at nsh_parse.c:2662
   0x400d4650: nsh_session at nsh_session.c:191
   0x400d43aa: nsh_consolemain at nsh_consolemain.c:115
   0x400d4370: nsh_main at nsh_main.c:168
   0x400d239c: nxtask_startup at task_startup.c:150
   0x400d0fb8: nxtask_start at task_start.c:129
   ```
   
   The line `lib_getopt_common.c:298` is causing the issue.  I'm checking 
up_create_stack for Xtensa, I also tried with the simulator and an STM32 board, 
both work fine.


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

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




[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


patacongo edited a comment on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812547652


   I do see a problem.  Could you try changing line
   
   ```
   -  for (ndx = 0; longopts[ndx].name[0] != '\0'; ndx++)
   +  for (ndx = 0; longopts[ndx].name != NULL; ndx++)
   ```
   I will push this in a bit, but let's see if that does the job first.
   


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

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




[GitHub] [incubator-nuttx] patacongo commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


patacongo commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812547652


   I do see a problem.  Could you try changing line
   
   ```
   -  for (ndx = 0; longopts[ndx].name[0] != '\0'; ndx++)
   +  for (ndx = 0; longopts[ndx].name != NULL; ndx++)
   
   I will push this in a bit, but let's see if that does the job first.
   ```


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

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




[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


Ouss4 commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812549141


   I tried it with esp32-devkitc:nsh, still got a crash at the same line.


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

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




[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


Ouss4 commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812552522


   @patacongo a fix as you described in #3241 seems to be working in Xtensa.  
I'll do more tests and submit a 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.

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




[GitHub] [incubator-nuttx] patacongo opened a new pull request #3280: Correct some getopt() logic

2021-04-02 Thread GitBox


patacongo opened a new pull request #3280:
URL: https://github.com/apache/incubator-nuttx/pull/3280


   ## Summary
   
   1. Null pointer dereference:
   
   -  for (ndx = 0; longopts[ndx].name[0] != '\0'; ndx++)
   +  for (ndx = 0; longopts[ndx].name != NULL; ndx++)
   
   2. Handle single character long options.  An option like -x could be either 
a short option or a long option (under getopt_long_only()).  This case was not 
being handled correctly.
   
   3. Add missing support for optional arguments to short options (indicated 
with two "::"
   
   ## Impact
   
   This effects all members of the getopt() family of APIs.
   
   ## Testing
   
   Tested on the simulator using extensions to apps/testing/ostest.
   
   
   


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

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




[GitHub] [incubator-nuttx] patacongo commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


patacongo commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812558609


   @Ouss4 PR #3280 corrects the problem with the NULL pointer dereference (and 
makes other getopt() improvements that you won't really care about).


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

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




[GitHub] [incubator-nuttx] patacongo commented on pull request #3272: Implement getopt_long() and getopt_long_only()

2021-04-02 Thread GitBox


patacongo commented on pull request #3272:
URL: https://github.com/apache/incubator-nuttx/pull/3272#issuecomment-812560087


   > 
   > 
   > @patacongo a fix as you described in #3241 seems to be working in Xtensa. 
I'll do more tests and submit a PR.
   
   There is a an issue with stack checking in Xtensa.  However that would only 
be a problem if stack coloration is enabled, I think.  So I am a little 
surprised.  I hope that is all there is to it!
   


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

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




[GitHub] [incubator-nuttx-testing] v01d commented on pull request #92: move avr, risc-v, xtensa and x86 builds out of other.dat

2021-04-02 Thread GitBox


v01d commented on pull request #92:
URL: 
https://github.com/apache/incubator-nuttx-testing/pull/92#issuecomment-812567555


   > > @xiaoxiang781216 VM setup time is minimal. It is best to parallelize 
jobs.
   > 
   > It isn't true for macOS since we need install all tools from network for 
each setup.
   > Note: Unbuntu doesn't have this problem because we use docker for Unbuntu.
   
   Oh OK. I thought you mean the setup GitHub does prior to the job. I see the 
macOS image indeed downloads many things on the run. Any reason why we cant 
create a docker image with all those tools baked inside?
   I looked at how long it takes and is about ~5min. Nothing too serious 
anyway. But yeah, multiplied by 5 or 6 indeed takes quite a lot.
   
   > So, what I suggestion is:
   > 
   > 1. Create macos.dat select one config(nsh?) from each arch(not soc or 
board)/toolchain combination except sim.
   > 
   > 2. Split the sim into several sub group(2 or 3) like arm.
   
   If macos.dat takes around 1hr I don't think there's too much gain from 
splitting sim which already takes that long and will run mostly in parallel to 
the other job. I would try 1., push again, and see how long it takes.
   
   Not though, that as I mentioned, splitting other.dat helps Linux, so I would 
keep the split as it is now, but for macOS use the suggested macos.dat and 
sim.dat.
   
   I don't see how the regex works, since it seems it works for blacklisting. I 
think I would have to directly list each combination.
   I'll try this in a while.


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

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




[GitHub] [incubator-nuttx] v01d commented on issue #3157: esp32: syslog messages from boot interfere with other syslog messages

2021-04-02 Thread GitBox


v01d commented on issue #3157:
URL: 
https://github.com/apache/incubator-nuttx/issues/3157#issuecomment-812573159


   If we knew that the "important" message is emitted only in log_writev I 
would simply ignore the other two and add a newline. 
   @donghengqaz can we assume this? This way we can also drop the unneeded 
prefix.
   
   Otherwise I think that using an internal line buffer is the only solution if 
these calls will always be made separately to build the message.
   
   Related to this discussion is the fact that I think `syslog()` should 
probably handle the newline adding on its own, as per the opengroup 
specification suggests (last phrase):
   
   > The message body is generated from the message and following arguments in 
the same manner as if these were arguments to printf(), except that the 
additional conversion specification %m shall be recognized; it shall convert no 
arguments, shall cause the output of the error message string associated with 
the value of errno on entry to syslog(), and may be mixed with argument 
specifications of the "%n$" form. If a complete conversion specification with 
the m conversion specifier character is not just %m, the behavior is undefined. 
A trailing  may be added if needed.
   
   Linux has this in its manpage:
   
   > The  remaining  arguments are a format, as in printf(3), and any arguments 
required by the format, except that
   the two-character sequence %m will be replaced by the error message string 
strerror(errno).  The format string
   need not include a terminating newline character.
   
   And this is BSD:
   
   >The message is identical to a printf(3) format string, except that `%m'
is replaced by the current error message.  (As denoted by the global
variable errno; see strerror(3).)  A trailing newline is added if none 
is
present.
Newlines and other non-printable characters embedded in the message
string are printed in an alternate format.  This prevents someone from
using non-printable characters to construct misleading log messages in 
an
output file.  Newlines are printed as "\n", tabs are printed as "\t".
Other control characters are printed using a caret ("^") representation,
for example "^M" for carriage return.
   
   I think we should:
   1. make syslog append newline if not present in message
   2. replace other newlines with a printable character
   3. Remove all use of "\n" inside syslog calls
   
   This way we can avoid misuse of syslog()
   


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

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




[GitHub] [incubator-nuttx] patacongo commented on issue #3157: esp32: syslog messages from boot interfere with other syslog messages

2021-04-02 Thread GitBox


patacongo commented on issue #3157:
URL: 
https://github.com/apache/incubator-nuttx/issues/3157#issuecomment-812576691


   > Otherwise I think that using an internal line buffer is the only solution 
if these calls will always be made separately to build the message.
   
   Is this relevant?  It enables use of a IOB to parse syslog lines into, then 
dumps the buffered line all at once.
   ```
77 config SYSLOG_BUFFER
78 bool "Use buffered output"
79 default n
80 depends on SYSLOG_WRITE
81 select MM_IOB
82 ---help---
83 Enables an buffering logic that will be used to 
serialize debug
84 output from concurrent tasks. This enables allocation of 
one buffer
85 per thread, each of size CONFIG_IOB_BUFSIZE.
86
87 The use of SYSLOG buffering is optional.  If not 
enabled, however,
88 then the output from multiple tasks that attempt to 
generate SYSLOG
89 output may be interleaved and difficult to read.
   ```
   
   


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

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




[GitHub] [incubator-nuttx-testing] xiaoxiang781216 commented on pull request #92: move avr, risc-v, xtensa and x86 builds out of other.dat

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #92:
URL: 
https://github.com/apache/incubator-nuttx-testing/pull/92#issuecomment-812577590


   > If macos.dat takes around 1hr I don't think there's too much gain from 
splitting sim which already takes that long and will run mostly in parallel to 
the other job. I would try 1., push again, and see how long it takes.
   
   If we select only one config for each arch, the number of configs in 
macos.dat is around ~10, I guess it can finish in 30min from your profile 
result.


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

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




[incubator-nuttx] 01/04: net: fix nxstyle errors

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

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

commit 8975a651971534c1df3e92e8cb21a0d3c3bad514
Author: Alin Jerpelea 
AuthorDate: Fri Apr 2 07:28:21 2021 +0200

net: fix nxstyle errors

fix errors reported by nxstyle

Signed-off-by: Alin Jerpelea 
---
 net/sixlowpan/sixlowpan_hc06.c | 118 ++---
 net/sixlowpan/sixlowpan_hc1.c  |  21 +---
 net/udp/udp_devpoll.c  |   6 +--
 net/udp/udp_input.c|   4 +-
 net/usrsock/usrsock_connect.c  |   3 +-
 net/usrsock/usrsock_poll.c |  12 +++--
 6 files changed, 105 insertions(+), 59 deletions(-)

diff --git a/net/sixlowpan/sixlowpan_hc06.c b/net/sixlowpan/sixlowpan_hc06.c
index 1222588..5899679 100644
--- a/net/sixlowpan/sixlowpan_hc06.c
+++ b/net/sixlowpan/sixlowpan_hc06.c
@@ -233,7 +233,9 @@ static FAR struct sixlowpan_addrcontext_s *
 #if CONFIG_NET_6LOWPAN_MAXADDRCONTEXT > 0
   int i;
 
-  /* Remove code to avoid warnings and save flash if no address context is 
used */
+  /* Remove code to avoid warnings and save flash if no address context is
+   * used
+   */
 
   for (i = 0; i < CONFIG_NET_6LOWPAN_MAXADDRCONTEXT; i++)
 {
@@ -241,7 +243,8 @@ static FAR struct sixlowpan_addrcontext_s *
   net_ipv6addr_prefixcmp(&g_hc06_addrcontexts[i].prefix, ipaddr, 64))
 {
   ninfo("Context found for "
-"ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x Context: %d\n",
+"ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x "
+"Context: %d\n",
 ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]),
 ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]),
 ntohs(ipaddr[6]), ntohs(ipaddr[7]),
@@ -266,24 +269,26 @@ static FAR struct sixlowpan_addrcontext_s *
  *   prefpost takes a byte where the first nibble specify prefix count
  *   and the second postfix count (NOTE: 15/0xf ipaddr=16 bytes copy).
  *
- *   compress_tagaddr() accepts a remote, variable length, tagged MAC address;
+ *   compress_tagaddr() accepts a remote, variable length, tagged MAC
+ *  address;
  *   compress_laddr() accepts a local, fixed length MAC address.
  *   compress_ipaddr() is simply the common logic that does not depend on
  *   the size of the MAC address.
  *
  /
 
-static uint8_t compress_ipaddr(FAR const net_ipv6addr_t ipaddr, uint8_t bitpos)
+static uint8_t compress_ipaddr(FAR const net_ipv6addr_t ipaddr,
+   uint8_t bitpos)
 {
   if (SIXLOWPAN_IS_IID_16BIT_COMPRESSABLE(ipaddr))
 {
   /* Compress IID to 16 bits: :::::00ff:fe00: */
 
 #ifdef CONFIG_ENDIAN_BIG
-  *g_hc06ptr++ = ipaddr[7] >> 8;/* Preserve big-endian, network 
order */
+  *g_hc06ptr++ = ipaddr[7] >> 8;   /* Preserve big-endian, network order */
   *g_hc06ptr++ = ipaddr[7] & 0xff;
 #else
-  *g_hc06ptr++ = ipaddr[7] & 0xff;  /* Preserve big-endian, network 
order */
+  *g_hc06ptr++ = ipaddr[7] & 0xff; /* Preserve big-endian, network order */
   *g_hc06ptr++ = ipaddr[7] >> 8;
 #endif
 
@@ -319,8 +324,10 @@ static uint8_t compress_tagaddr(FAR const net_ipv6addr_t 
ipaddr,
 #ifdef CONFIG_DEBUG_NET_INFO
   ninfo("Compressing bitpos=%u addrlen=%u\n", bitpos, macaddr->nv_addrlen);
   ninfo("ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
-ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), ntohs(ipaddr[3]),
-ntohs(ipaddr[4]), ntohs(ipaddr[5]), ntohs(ipaddr[6]), 
ntohs(ipaddr[7]));
+ntohs(ipaddr[0]), ntohs(ipaddr[1]),
+ntohs(ipaddr[2]), ntohs(ipaddr[3]),
+ntohs(ipaddr[4]), ntohs(ipaddr[5]),
+ntohs(ipaddr[6]), ntohs(ipaddr[7]));
 
   switch (macaddr->nv_addrlen)
 {
@@ -529,8 +536,8 @@ static void uncompress_addr(FAR const struct 
netdev_varaddr_s *addr,
   srcptr += 2;
 }
 
-  /* If the IP is derived from a MAC address big enough to include the U/L 
bit,
-   * invert it.
+  /* If the IP is derived from a MAC address big enough to include the
+   * U/L bit, invert it.
*/
 
   if (usemac && postcount == 8)
@@ -552,10 +559,13 @@ static void uncompress_addr(FAR const struct 
netdev_varaddr_s *addr,
   nwarn("WARNING: No IID based configuration\n");
 }
 
-  ninfo("Uncompressing %d + %d 
ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
+  ninfo("Uncompressing %d + %d "
+"ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
 prefcount, postcount,
-ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), ntohs(ipaddr[3]),
-ntohs(ipaddr[4]), ntohs(ipaddr[5]), ntohs(ipaddr[6]), 
ntohs(ipaddr[7]));
+ntohs(ipaddr[0]), ntohs(ipaddr[1]),
+ntohs(ipaddr[2]), ntohs(ipaddr[3]),
+

[incubator-nuttx] branch master updated (b10c6d6 -> b7c451c)

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

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


from b10c6d6  board/arm/lpc17xx_40xx/mbed: userled defconfig
 new 8975a65  net: fix nxstyle errors
 new ed8e5e9  libs: fix nxstyle errors
 new d3313ee  libs: libc: lib_vikmemcpy.c: Mixed case identifier fix
 new b7c451c  libs: Gregory Nutt: update licenses to Apache

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


Summary of changes:
 libs/libc/machine/sim/arch_elf.c  |  39 ++--
 libs/libc/machine/x86/arch_elf.c  |  39 ++--
 libs/libc/math/__cos.c|   3 +-
 libs/libc/math/lib_asin.c |   3 +-
 libs/libc/math/lib_asinf.c|   3 +-
 libs/libc/math/lib_asinl.c|   4 +-
 libs/libc/math/lib_erf.c  |   3 +-
 libs/libc/math/lib_erff.c |   3 +-
 libs/libc/math/lib_erfl.c |   6 +-
 libs/libc/math/lib_floorl.c   |   1 -
 libs/libc/math/lib_log.c  |   1 -
 libs/libc/math/lib_rint.c |  43 ++--
 libs/libc/math/lib_rintf.c|  43 ++--
 libs/libc/math/lib_rintl.c|  43 ++--
 libs/libc/math/lib_sqrt.c |   3 +-
 libs/libc/math/lib_sqrtl.c|   9 +-
 libs/libc/math/lib_truncl.c   |   9 +-
 libs/libc/misc/lib_crc16.c|  20 +-
 libs/libc/misc/lib_crc32.c|   1 +
 libs/libc/misc/lib_crc8.c |   2 +-
 libs/libc/misc/lib_debug.c|  40 ++--
 libs/libc/misc/lib_envpath.c  |  56 ++
 libs/libc/misc/lib_filesem.c  |  39 ++--
 libs/libc/misc/lib_kbddecode.c|  10 +-
 libs/libc/misc/lib_kbdencode.c|   6 +-
 libs/libc/misc/lib_mkfifo.c   |  39 ++--
 libs/libc/misc/lib_ncompress.c| 361 ++
 libs/libc/misc/lib_sendfile.c |  39 ++--
 libs/libc/misc/lib_slcddecode.c   |  11 +-
 libs/libc/misc/lib_stream.c   |  40 ++--
 libs/libc/misc/lib_streamsem.c|  39 ++--
 libs/libc/misc/lib_tea_decrypt.c  |  49 ++---
 libs/libc/misc/lib_tea_encrypt.c  |  49 ++---
 libs/libc/misc/lib_uadd32x64.c|  39 ++--
 libs/libc/misc/lib_uadd64.c   |  39 ++--
 libs/libc/misc/lib_umul32.c   |  39 ++--
 libs/libc/misc/lib_umul32x64.c|  39 ++--
 libs/libc/misc/lib_umul64.c   |  39 ++--
 libs/libc/misc/lib_usub64.c   |  39 ++--
 libs/libc/misc/lib_usub64x32.c|  39 ++--
 libs/libc/net/lib_addrconfig.c|   4 +
 libs/libc/net/lib_inetpton.c  |  25 ++-
 libs/libc/signal/sig_emptyset.c   |  43 ++--
 libs/libc/spawn/lib_psfa_addopen.c|  39 ++--
 libs/libc/stdio/lib_libsnoflush.c |  43 ++--
 libs/libc/stdio/lib_lowoutstream.c|  39 ++--
 libs/libc/stdio/lib_ultoa_invert.c|   1 +
 libs/libc/stdio/lib_vdprintf.c|   6 +-
 libs/libc/stdio/lib_vfscanf.c |   4 +-
 libs/libc/stdio/lib_vsnprintf.c   |  43 ++--
 libs/libc/stdlib/lib_itoa.c   |   5 +-
 libs/libc/stdlib/lib_qsort.c  |   2 +-
 libs/libc/stdlib/lib_strtod.c |  12 +-
 libs/libc/stdlib/lib_strtof.c |  12 +-
 libs/libc/stdlib/lib_strtol.c |  39 ++--
 libs/libc/stdlib/lib_strtold.c|  12 +-
 libs/libc/string/lib_explicit_bzero.c |   2 +-
 libs/libc/string/lib_memccpy.c|  40 ++--
 libs/libc/string/lib_strncpy.c|  39 ++--
 libs/libc/string/lib_strtok.c |  39 ++--
 libs/libc/string/lib_strtokr.c|  41 ++--
 libs/libc/string/lib_vikmemcpy.c  |  17 +-
 libs/libc/wchar/lib_wcscmp.c  |   9 +-
 libs/libc/wchar/lib_wcscoll.c |   4 +-
 libs/libc/wchar/lib_wcslcpy.c |  10 +-
 libs/libc/wchar/lib_wcslen.c  |   2 +-
 libs/libc/wchar/lib_wcstoll.c |   3 +-
 libs/libc/wchar/lib_wcstoul.c |   3 +-
 libs/libc/wchar/lib_wcstoull.c|   5 +-
 libs/libc/wchar/lib_wcsxfrm.c |   8 +-
 libs/libc/wchar/lib_wmemchr.c |   1 +
 libs/libc/wchar/lib_wmemmove.c|   6 +-
 libs/libc/wctype/lib_iswctype.c   |  24 +--
 libs/libc/wctype/lib_towlower.c   |  24 +--
 libs/libc/wctype/lib_towupper.c   |  24 +--
 libs/libc/wctype/lib_wctype.c |  24 +--
 libs/libnx/nxcontext.h|  39 ++--
 net/sixlowpan/sixlowpan_hc06.c| 118 +++
 net/sixlowpan/sixlowpan_hc1.c |  21 +-
 net/udp/udp_devpoll.c |   6 +-
 net/udp/udp_input.c   |   4 +-
 net/usrsock/usrsock_connect.c |   3 +-
 net/usrsock/usrsock_poll.c|  12 +-
 83 files changed, 926 insertions(+), 1260 deletions(-)


[incubator-nuttx] 03/04: libs: libc: lib_vikmemcpy.c: Mixed case identifier fix

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

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

commit d3313eeae96f925e447fc3c43d2a607ba120f283
Author: Alin Jerpelea 
AuthorDate: Fri Apr 2 08:57:44 2021 +0200

libs: libc: lib_vikmemcpy.c: Mixed case identifier fix

fix Mixed case identifier reported by nxstyle

Signed-off-by: Alin Jerpelea 
---
 libs/libc/string/lib_vikmemcpy.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libs/libc/string/lib_vikmemcpy.c b/libs/libc/string/lib_vikmemcpy.c
index 94a51bd..3e93b17 100644
--- a/libs/libc/string/lib_vikmemcpy.c
+++ b/libs/libc/string/lib_vikmemcpy.c
@@ -203,8 +203,8 @@
 
 #define COPY_NO_SHIFT()   \
 { \
-  UIntN* dstN = (UIntN*)(dst8 PRE_LOOP_ADJUST);   \
-  UIntN* srcN = (UIntN*)(src8 PRE_LOOP_ADJUST);   \
+  uintn* dstN = (uintn*)(dst8 PRE_LOOP_ADJUST);   \
+  uintn* srcN = (uintn*)(src8 PRE_LOOP_ADJUST);   \
   size_t length = count / TYPE_WIDTH; \
   \
   while (length & 7)  \
@@ -240,13 +240,13 @@
 
 #define COPY_SHIFT(shift) \
 { \
-  UIntN* dstN  = (UIntN*)uintptr_t)dst8) PRE_LOOP_ADJUST) &   \
+  uintn* dstN  = (uintn*)uintptr_t)dst8) PRE_LOOP_ADJUST) &   \
~(TYPE_WIDTH - 1));\
-  UIntN* srcN  = (UIntN*)uintptr_t)src8) PRE_LOOP_ADJUST) &   \
+  uintn* srcN  = (uintn*)uintptr_t)src8) PRE_LOOP_ADJUST) &   \
~(TYPE_WIDTH - 1));\
   size_t length  = count / TYPE_WIDTH;\
-  UIntN srcWord = INC_VAL(srcN);  \
-  UIntN dstWord;  \
+  uintn srcWord = INC_VAL(srcN);  \
+  uintn dstWord;  \
   \
   while (length & 7)  \
 { \
@@ -284,10 +284,10 @@
  /
 
 #ifdef CONFIG_MEMCPY_64BIT
-typedef uint64_tUIntN;
+typedef uint64_tuintn;
 #  define TYPE_WIDTH8L
 #else
-typedef uint32_tUIntN;
+typedef uint32_tuintn;
 #  define TYPE_WIDTH4L
 #endif
 


[incubator-nuttx] 02/04: libs: fix nxstyle errors

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

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

commit ed8e5e971bf83d80f4ac1517e58a9bdd0331c704
Author: Alin Jerpelea 
AuthorDate: Fri Apr 2 07:44:54 2021 +0200

libs: fix nxstyle errors

fix erros reported by nxstyle

Signed-off-by: Alin Jerpelea 
---
 libs/libc/math/__cos.c|   3 +-
 libs/libc/math/lib_asin.c |   3 +-
 libs/libc/math/lib_asinf.c|   3 +-
 libs/libc/math/lib_asinl.c|   4 +-
 libs/libc/math/lib_erf.c  |   3 +-
 libs/libc/math/lib_erff.c |   3 +-
 libs/libc/math/lib_erfl.c |   6 +-
 libs/libc/math/lib_floorl.c   |   1 -
 libs/libc/math/lib_log.c  |   1 -
 libs/libc/math/lib_rint.c |   4 +
 libs/libc/math/lib_rintf.c|   4 +
 libs/libc/math/lib_rintl.c|   4 +
 libs/libc/math/lib_sqrt.c |   3 +-
 libs/libc/math/lib_sqrtl.c|   9 +-
 libs/libc/math/lib_truncl.c   |   9 +-
 libs/libc/misc/lib_crc16.c|  20 +-
 libs/libc/misc/lib_crc32.c|   1 +
 libs/libc/misc/lib_crc8.c |   2 +-
 libs/libc/misc/lib_envpath.c  |  17 +-
 libs/libc/misc/lib_kbddecode.c|  10 +-
 libs/libc/misc/lib_kbdencode.c|   6 +-
 libs/libc/misc/lib_ncompress.c| 361 ++
 libs/libc/misc/lib_slcddecode.c   |  11 +-
 libs/libc/net/lib_addrconfig.c|   4 +
 libs/libc/net/lib_inetpton.c  |  25 ++-
 libs/libc/stdio/lib_lowoutstream.c|   3 +-
 libs/libc/stdio/lib_ultoa_invert.c|   1 +
 libs/libc/stdio/lib_vdprintf.c|   6 +-
 libs/libc/stdio/lib_vfscanf.c |   4 +-
 libs/libc/stdio/lib_vsnprintf.c   |   4 +-
 libs/libc/stdlib/lib_itoa.c   |   5 +-
 libs/libc/stdlib/lib_qsort.c  |   2 +-
 libs/libc/stdlib/lib_strtod.c |  12 +-
 libs/libc/stdlib/lib_strtof.c |  12 +-
 libs/libc/stdlib/lib_strtold.c|  12 +-
 libs/libc/string/lib_explicit_bzero.c |   2 +-
 libs/libc/string/lib_memccpy.c|   1 -
 libs/libc/string/lib_strtokr.c|   2 +-
 libs/libc/string/lib_vikmemcpy.c  |   1 +
 libs/libc/wchar/lib_wcscmp.c  |   9 +-
 libs/libc/wchar/lib_wcscoll.c |   4 +-
 libs/libc/wchar/lib_wcslcpy.c |  10 +-
 libs/libc/wchar/lib_wcslen.c  |   2 +-
 libs/libc/wchar/lib_wcstoll.c |   3 +-
 libs/libc/wchar/lib_wcstoul.c |   3 +-
 libs/libc/wchar/lib_wcstoull.c|   5 +-
 libs/libc/wchar/lib_wcsxfrm.c |   8 +-
 libs/libc/wchar/lib_wmemchr.c |   1 +
 libs/libc/wchar/lib_wmemmove.c|   6 +-
 libs/libc/wctype/lib_iswctype.c   |  24 +--
 libs/libc/wctype/lib_towlower.c   |  24 +--
 libs/libc/wctype/lib_towupper.c   |  24 +--
 libs/libc/wctype/lib_wctype.c |  24 +--
 53 files changed, 417 insertions(+), 314 deletions(-)

diff --git a/libs/libc/math/__cos.c b/libs/libc/math/__cos.c
index e91a6cc..1dd82b9 100644
--- a/libs/libc/math/__cos.c
+++ b/libs/libc/math/__cos.c
@@ -115,7 +115,8 @@ double __cos(double x, double y)
   z = x * x;
   w = z * z;
   r =
-z * (g_c1 + z * (g_c2 + z * g_c3)) + w * w * (g_c4 + z * (g_c5 + z * 
g_c6));
+z * (g_c1 + z * (g_c2 + z * g_c3)) +
+ w * w * (g_c4 + z * (g_c5 + z * g_c6));
   hz = 0.5 * z;
   w = 1.0 - hz;
 
diff --git a/libs/libc/math/lib_asin.c b/libs/libc/math/lib_asin.c
index 353105e..d534f99 100644
--- a/libs/libc/math/lib_asin.c
+++ b/libs/libc/math/lib_asin.c
@@ -56,7 +56,8 @@
 static double asin_aux(double x)
 {
   long double y;
-  double y_cos, y_sin;
+  double y_cos;
+  double y_sin;
 
   y = 0.0;
   y_sin = 0.0;
diff --git a/libs/libc/math/lib_asinf.c b/libs/libc/math/lib_asinf.c
index b63fae9..c97a8d8 100644
--- a/libs/libc/math/lib_asinf.c
+++ b/libs/libc/math/lib_asinf.c
@@ -44,7 +44,8 @@
 static float asinf_aux(float x)
 {
   double y;
-  float  y_sin, y_cos;
+  float y_sin;
+  float y_cos;
 
   y = 0.0;
   y_sin = 0.0F;
diff --git a/libs/libc/math/lib_asinl.c b/libs/libc/math/lib_asinl.c
index ed56114..2e523d6 100644
--- a/libs/libc/math/lib_asinl.c
+++ b/libs/libc/math/lib_asinl.c
@@ -43,7 +43,9 @@
 
 static long double asinl_aux(long double x)
 {
-  long double y, y_cos, y_sin;
+  long double y;
+  long double y_cos;
+  long double y_sin;
 
   y = 0.0;
   y_sin = 0.0;
diff --git a/libs/libc/math/lib_erf.c b/libs/libc/math/lib_erf.c
index 5c530dc..10b3c6f 100644
--- a/libs/libc/math/lib_erf.c
+++ b/libs/libc/math/lib_erf.c
@@ -77,7 +77,8 @@ double erf(double x)
 
   z = fabs(x);
   t = 1.0 / (1.0 + P * z);
-  t = 1.0 - (A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * exp(-z * z);
+  t = 1.0 -
+  (A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * exp(-z * z);
   return copysign(t, x);
 }
 
diff --git a/libs/libc/math/lib_erff.c b/libs/libc/math/lib_erff.c
index 3fef

[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3277: libs: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #3277:
URL: https://github.com/apache/incubator-nuttx/pull/3277


   


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

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




[incubator-nuttx] 04/04: libs: Gregory Nutt: update licenses to Apache

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

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

commit b7c451c5a457352c029f440a5e2ed9f2335cdbc5
Author: Alin Jerpelea 
AuthorDate: Fri Apr 2 09:22:52 2021 +0200

libs: Gregory Nutt: update licenses to Apache

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea 
---
 libs/libc/machine/sim/arch_elf.c   | 39 ++
 libs/libc/machine/x86/arch_elf.c   | 39 ++
 libs/libc/math/lib_rint.c  | 39 ++
 libs/libc/math/lib_rintf.c | 39 ++
 libs/libc/math/lib_rintl.c | 39 ++
 libs/libc/misc/lib_debug.c | 40 ++-
 libs/libc/misc/lib_envpath.c   | 39 ++
 libs/libc/misc/lib_filesem.c   | 39 ++
 libs/libc/misc/lib_mkfifo.c| 39 ++
 libs/libc/misc/lib_sendfile.c  | 39 ++
 libs/libc/misc/lib_stream.c| 40 ++-
 libs/libc/misc/lib_streamsem.c | 39 ++
 libs/libc/misc/lib_tea_decrypt.c   | 49 +-
 libs/libc/misc/lib_tea_encrypt.c   | 49 +-
 libs/libc/misc/lib_uadd32x64.c | 39 ++
 libs/libc/misc/lib_uadd64.c| 39 ++
 libs/libc/misc/lib_umul32.c| 39 ++
 libs/libc/misc/lib_umul32x64.c | 39 ++
 libs/libc/misc/lib_umul64.c| 39 ++
 libs/libc/misc/lib_usub64.c| 39 ++
 libs/libc/misc/lib_usub64x32.c | 39 ++
 libs/libc/signal/sig_emptyset.c| 43 +++--
 libs/libc/spawn/lib_psfa_addopen.c | 39 ++
 libs/libc/stdio/lib_libsnoflush.c  | 43 +++--
 libs/libc/stdio/lib_lowoutstream.c | 40 ++-
 libs/libc/stdio/lib_vsnprintf.c| 39 ++
 libs/libc/stdlib/lib_strtol.c  | 39 ++
 libs/libc/string/lib_memccpy.c | 39 ++
 libs/libc/string/lib_strncpy.c | 39 ++
 libs/libc/string/lib_strtok.c  | 39 ++
 libs/libc/string/lib_strtokr.c | 39 ++
 libs/libnx/nxcontext.h | 39 ++
 32 files changed, 398 insertions(+), 881 deletions(-)

diff --git a/libs/libc/machine/sim/arch_elf.c b/libs/libc/machine/sim/arch_elf.c
index c599564..d1cf3eb 100644
--- a/libs/libc/machine/sim/arch_elf.c
+++ b/libs/libc/machine/sim/arch_elf.c
@@ -1,35 +1,20 @@
 /
  * libs/libc/machine/sim/arch_elf.c
  *
- *   Copyright (C) 2012, 2014, 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt 
+ * 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
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in
- *the documentation and/or other materials provided with the
- *distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *used to endorse or promote products derived from this software
- *without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * O

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3256: libc/execinfo: add backtrace support based on EABI Unwinder

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3256:
URL: https://github.com/apache/incubator-nuttx/pull/3256#issuecomment-812599457


   @anchao please provide a new patch to update g_white_list in tools/nxstyle.c.


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

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




[GitHub] [incubator-nuttx] v01d commented on issue #3157: esp32: syslog messages from boot interfere with other syslog messages

2021-04-02 Thread GitBox


v01d commented on issue #3157:
URL: 
https://github.com/apache/incubator-nuttx/issues/3157#issuecomment-812599727


   That is useful to avoid interleaved prints from concurrent tasks. The point 
is that a call to syslog corresponds to a complete message so multiple calls 
should not be used to construct one output line. The standard description and 
BSD/Linux implementations confirm that one call to syslog implies one output 
line (no more, no less).


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3279: NuttX: Gregory Nutt: update licenses to Apache

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3279:
URL: https://github.com/apache/incubator-nuttx/pull/3279#issuecomment-812603728


   @jerpelea there is conflict, please rebase your PR again, 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.

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




[GitHub] [incubator-nuttx-testing] v01d commented on pull request #92: move avr, risc-v, xtensa and x86 builds out of other.dat

2021-04-02 Thread GitBox


v01d commented on pull request #92:
URL: 
https://github.com/apache/incubator-nuttx-testing/pull/92#issuecomment-812650261


   I've selected just one or two board/config per arch for macos.dat and left 
sim the same as a test. 
   I'm not sure if the syntax `///:` works though.


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

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




[GitHub] [incubator-nuttx-testing] v01d commented on pull request #92: move avr, risc-v, xtensa and x86 builds out of other.dat

2021-04-02 Thread GitBox


v01d commented on pull request #92:
URL: 
https://github.com/apache/incubator-nuttx-testing/pull/92#issuecomment-812690115


   Ok, without changing anything to sim it is now around 40m faster in total 
(1:56 down to 1:13). This is the current situation:
   
   
![image](https://user-images.githubusercontent.com/161706/113449875-27347b00-93d5-11eb-9098-49f3938a16b1.png)
   
   Now sim  on macOS is the only one exceeding 30m. I think that we should try 
to improve this. If you really think that removing some configs from the build 
on macos is not a good idea, I think we should try to reduce the number of 
configs by merging the related ones. For example, I imagine we could have a 
general "testing" config with various kind of test applications enabled. 
There's no need to have one config per each (unless they conflict with each 
other). Same goes for some of the examples: we can provide some configs that 
contain various related examples.
   
   As this change would be done in a separate step, I suggest that we merge 
this for now, as it is already an improvement.
   I will make the acompanying PRs on nuttx/ and apps/


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

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




[GitHub] [incubator-nuttx-testing] v01d edited a comment on pull request #92: move avr, risc-v, xtensa and x86 builds out of other.dat

2021-04-02 Thread GitBox


v01d edited a comment on pull request #92:
URL: 
https://github.com/apache/incubator-nuttx-testing/pull/92#issuecomment-812690115


   Ok, without changing anything to sim it is now around 40m faster in total 
(1:56 down to 1:13). This is the current situation:
   
   
![image](https://user-images.githubusercontent.com/161706/113449875-27347b00-93d5-11eb-9098-49f3938a16b1.png)
   
   Please have a look at macos.dat and let me know if you think something else 
should be added.
   
   Now sim  on macOS is the only one exceeding 30m. I think that we should try 
to improve this. If you really think that removing some configs from the build 
on macos is not a good idea, I think we should try to reduce the number of 
configs by merging the related ones. For example, I imagine we could have a 
general "testing" config with various kind of test applications enabled. 
There's no need to have one config per each (unless they conflict with each 
other). Same goes for some of the examples: we can provide some configs that 
contain various related examples.
   
   As this change would be done in a separate step, I suggest that we merge 
this for now, as it is already an improvement.
   I will make the acompanying PRs on nuttx/ and apps/


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

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




[GitHub] [incubator-nuttx] Ouss4 merged pull request #3280: Correct some getopt() logic

2021-04-02 Thread GitBox


Ouss4 merged pull request #3280:
URL: https://github.com/apache/incubator-nuttx/pull/3280


   


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

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




[incubator-nuttx] branch master updated: Correct some getopt() logic

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

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


The following commit(s) were added to refs/heads/master by this push:
 new af3c76b  Correct some getopt() logic
af3c76b is described below

commit af3c76bb53f6194b49e2684d3d74d03c16408dfa
Author: Gregory Nutt 
AuthorDate: Fri Apr 2 08:34:25 2021 -0600

Correct some getopt() logic

1. Null pointer dereference:

-  for (ndx = 0; longopts[ndx].name[0] != '\0'; ndx++)
+  for (ndx = 0; longopts[ndx].name != NULL; ndx++)

2. Handle single character long options.  An option like -x could be either 
a short option or a long option (under getopt_long_only()).  This case was not 
being handled correctly.

3. Add missing support for optional arguments to short options (indicated 
with two "::"

This effects all members of the getopt() family of APIs.

Tested on the simulator using extensions to apps/testing/ostest.
---
 libs/libc/unistd/lib_getopt_common.c | 59 
 1 file changed, 39 insertions(+), 20 deletions(-)

diff --git a/libs/libc/unistd/lib_getopt_common.c 
b/libs/libc/unistd/lib_getopt_common.c
index 4fa0db9..86d2159 100644
--- a/libs/libc/unistd/lib_getopt_common.c
+++ b/libs/libc/unistd/lib_getopt_common.c
@@ -69,7 +69,7 @@ static int getopt_long_option(FAR struct getopt_s *go,
* The last element of the option arry must be filled with zeroes.
*/
 
-  for (ndx = 0; longopts[ndx].name[0] != '\0'; ndx++)
+  for (ndx = 0; longopts[ndx].name != NULL; ndx++)
 {
   if (strcmp(go->go_optptr, longopts[ndx].name) == 0)
 {
@@ -99,6 +99,7 @@ static int getopt_long_option(FAR struct getopt_s *go,
 if (next == NULL || next[0] == '-')
   {
 go->go_optptr = NULL;
+go->go_optarg = NULL;
 go->go_optind++;
 break;
   }
@@ -168,7 +169,6 @@ static int getopt_long_option(FAR struct getopt_s *go,
   /* This option is not in the list of valid options */
 
   go->go_optopt = *go->go_optptr;
-  go->go_optptr++;
   return '?';
 
 errout:
@@ -251,6 +251,8 @@ int getopt_common(int argc, FAR char * const argv[],
   FAR int *longindex,
   enum getopt_mode_e mode)
 {
+  int ret;
+
   /* Get thread-specific getopt() variables */
 
   FAR struct getopt_s *go = getoptvars();
@@ -360,19 +362,22 @@ int getopt_common(int argc, FAR char * const argv[],
   /* go->go_optptr now points at the next option and it is not something
* crazy.  Possibilities:
*
-   *  -o
-   *  -o reqarg
-   *  -option
-   *  -option reqarg
-   *  -option optarg
-   *  --option reqarg
-   *  --option optarg
+   *  FORM  APPLICABILITY
+   *  -ogetopt(), getopt_long_only()
+   *  -o reqarg getopt(), getopt_long_only()
+   *  -o optarg getopt_long_only()
+   *  -option   getopt_long_only()
+   *  -option reqarggetopt_long_only()
+   *  -option optarggetopt_long_only()
+   *  --option  getopt_long(), getopt_long_only()
+   *  --option reqarg   getopt_long(), getopt_long_only()
+   *  --option optarg   getopt_long(), getopt_long_only()
*
* Where:
-   *   o  - Some short option
-   *   option - Some long option
-   *   reqarg - A required argument
-   *   optarg - An optional argument
+   *  o  - Some short option
+   *  option - Some long option
+   *  reqarg - A required argument
+   *  optarg - An optional argument
*/
 
   /* Check for --option forms or -option forms */
@@ -396,14 +401,25 @@ int getopt_common(int argc, FAR char * const argv[],
* must be distinguished from the -o case forms.
*/
 
-  if (GETOPT_HAVE_LONGONLY(mode) && *(go->go_optptr + 1) != '\0')
+  else if (GETOPT_HAVE_LONGONLY(mode))
 {
-  return getopt_long_option(go, argv, longopts, longindex);
+  /* A special case is that the option is of a form like
+   * -o but is represented as a single character long option.
+   * In that case, getopt_long_option() will fail with '?' and,
+   * if it is a single character option, we can just fall
+   * through to the short option logic.
+   */
+
+  ret = getopt_long_option(go, argv, longopts, longindex);
+  if (ret != '?' ||  *(go->go_optptr + 1) != '\0')
+{
+  return ret;
+}
 }
 }
 
   /* Check if the option is in the list of valid short options.
-   * In long option modes, opstring may be NULL. However, but that is
+   * In long option modes, opstring may

[GitHub] [incubator-nuttx] cclauss opened a new pull request #3281: Lint Python code for syntax errors

2021-04-02 Thread GitBox


cclauss opened a new pull request #3281:
URL: https://github.com/apache/incubator-nuttx/pull/3281


   https://flake8.pycqa.org/en/latest/user/error-codes.html
   
   On the flake8 test selection, this PR does _not_ focus on "_style 
violations_" (the majority of flake8 error codes that 
[__psf/black__](https://github.com/psf/black) can autocorrect).  Instead, these 
tests are focus on runtime safety and correctness:
   * E9 tests are about Python syntax errors usually raised because flake8 can 
not build an Abstract Syntax Tree (AST).  Often these issues are a sign of 
unused code or code that has not been ported to Python 3.  These would be 
compile-time errors in a compiled language but in a dynamic language like 
Python, they result in the script halting/crashing on the user.
   * F63 tests are usually about the confusion between identity and equality in 
Python.  Use ==/!= to compare str, bytes, and int literals is the classic case. 
 These are areas where __a == b__ is True but __a is b__ is False (or vice 
versa).  Python >= 3.8 will raise SyntaxWarnings on these instances.
   * F7 tests logic errors and syntax errors in type hints
   * F82 tests are almost always _undefined names_ which are usually a sign of 
a typo, missing imports, or code that has not been ported to Python 3.  These 
also would be compile-time errors in a compiled language but in Python, a 
__NameError__ is raised which will halt/crash the script on the user.
   
   ## Summary
   
   ## Impact
   
   ## Testing
   
   


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

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




[incubator-nuttx-website] branch asf-site updated: Publishing web: 59c4fb7620bc9aabf46df895f9e5cdb361f50177 docs: af3c76bb53f6194b49e2684d3d74d03c16408dfa

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

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


The following commit(s) were added to refs/heads/asf-site by this push:
 new 87b2d99  Publishing web: 59c4fb7620bc9aabf46df895f9e5cdb361f50177 
docs: af3c76bb53f6194b49e2684d3d74d03c16408dfa
87b2d99 is described below

commit 87b2d9954fa7571af2dac0d0dfab48c7a130aee6
Author: Ouss4 
AuthorDate: Sat Apr 3 00:13:14 2021 +

Publishing web: 59c4fb7620bc9aabf46df895f9e5cdb361f50177 docs: 
af3c76bb53f6194b49e2684d3d74d03c16408dfa
---
 content/docs/10.0.0/index.html | 2 +-
 content/docs/10.0.1/index.html | 2 +-
 content/docs/latest/_sources/contributing/coding_style.rst.txt | 4 ++--
 content/docs/latest/_sources/introduction/about.rst.txt| 2 +-
 content/docs/latest/contributing/coding_style.html | 4 ++--
 content/docs/latest/index.html | 2 +-
 content/docs/latest/introduction/about.html| 2 +-
 content/docs/latest/searchindex.js | 2 +-
 content/feed.xml   | 4 ++--
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html
index a9bcaf3..a20fef1 100644
--- a/content/docs/10.0.0/index.html
+++ b/content/docs/10.0.0/index.html
@@ -207,7 +207,7 @@ by following these 
 NuttX Documentation¶
 NuttX is a real-time operating system (RTOS) with an emphasis on standards 
compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller 
environments, the primary governing standards in NuttX are Posix and ANSI 
standards. Additional standard APIs from Unix and other common RTOS’s (such as 
VxWorks) are adopted for functionality not available under these standards, or 
for functionality that is not appropriate for deeply-embedded environments 
(such as fork()).
-Last Updated: 02 April 21 at 00:17
+Last Updated: 03 April 21 at 00:11
 
 Table of Contents
 
diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html
index cdc27b1..913d3f5 100644
--- a/content/docs/10.0.1/index.html
+++ b/content/docs/10.0.1/index.html
@@ -211,7 +211,7 @@ by following these 
 NuttX Documentation¶
 NuttX is a real-time operating system (RTOS) with an emphasis on standards 
compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller 
environments, the primary governing standards in NuttX are Posix and ANSI 
standards. Additional standard APIs from Unix and other common RTOS’s (such as 
VxWorks) are adopted for functionality not available under these standards, or 
for functionality that is not appropriate for deeply-embedded environments 
(such as fork()).
-Last Updated: 02 April 21 at 00:17
+Last Updated: 03 April 21 at 00:11
 
 Table of Contents
 
diff --git a/content/docs/latest/_sources/contributing/coding_style.rst.txt 
b/content/docs/latest/_sources/contributing/coding_style.rst.txt
index a248815..ad80415 100644
--- a/content/docs/latest/_sources/contributing/coding_style.rst.txt
+++ b/content/docs/latest/_sources/contributing/coding_style.rst.txt
@@ -45,8 +45,8 @@ license such as the BSD or MIT licenses). If the file does not
 follow Apache 2.0 licensing, then the appropriate license
 information should be provided in the header rather than the
 Apache 2.0 licensing information and a NOTE should be included in
-the top-level ``COPYING`` file to indicate any variations from
-Apache 2.0 licensing.
+the top-level ``LICENSE`` and/or ``NOTICE`` file(s), as appropriate,
+to indicate any variations from Apache 2.0 licensing.
 
 **Grouping**. All like components in a C source or header file are
 grouped together. Definitions do not appear arbitrarily through
diff --git a/content/docs/latest/_sources/introduction/about.rst.txt 
b/content/docs/latest/_sources/introduction/about.rst.txt
index 7c76e86..281fcad 100644
--- a/content/docs/latest/_sources/introduction/about.rst.txt
+++ b/content/docs/latest/_sources/introduction/about.rst.txt
@@ -107,7 +107,7 @@ Key features of NuttX include:
 and ``rz``). Intel HEX file conversions.
 
 * FAT long file name support may be subject to certain Microsoft patent 
restrictions if enabled.
-  See the top-level ``COPYING`` file for details.
+  See the top-level ``NOTICE`` file for details.
 
 * **Device Drivers**
 
diff --git a/content/docs/latest/contributing/coding_style.html 
b/content/docs/latest/contributing/coding_style.html
index f57200b..c75e842 100644
--- a/content/docs/latest/contributing/coding_style.html
+++ b/content/docs/latest/contributing/coding_style.html
@@ -293,8 +293,8 @@ license such as the BSD or MIT licenses). If the file does 
not
 follow Apache 2.0 licensing, then the appropriate license
 information should be provided in the header rather than the
 Apach

[GitHub] [incubator-nuttx] acassis opened a new pull request #3282: esp32: Fix small typo that will trigger an error when IPv6 is enabled

2021-04-02 Thread GitBox


acassis opened a new pull request #3282:
URL: https://github.com/apache/incubator-nuttx/pull/3282


   ## Summary
   esp32: Fix small typo that will trigger an error when IPv6 is enabled
   ## Impact
   Only ESP32
   ## Testing
   ESP32-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.

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




[GitHub] [incubator-nuttx] btashton commented on pull request #3281: Lint Python code for syntax errors

2021-04-02 Thread GitBox


btashton commented on pull request #3281:
URL: https://github.com/apache/incubator-nuttx/pull/3281#issuecomment-812790171


   The GitHub super linter already can support this which we have enabled. You 
just update the config for that.
   
   It supports flake8 although to be honest I would be fine just having it use 
Black and then we have.  Easy code style for python that can be auto formated. 
   https://github.com/github/super-linter


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

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




[GitHub] [incubator-nuttx] btashton edited a comment on pull request #3281: Lint Python code for syntax errors

2021-04-02 Thread GitBox


btashton edited a comment on pull request #3281:
URL: https://github.com/apache/incubator-nuttx/pull/3281#issuecomment-812790171


   The GitHub super linter already can support this which we have enabled. You 
can just update the config for that.
   
   It supports flake8 although to be honest I would be fine just having it use 
Black and then we have.  Easy code style for python that can be auto formated. 
   https://github.com/github/super-linter


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

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




[GitHub] [incubator-nuttx] hotislandn opened a new pull request #3283: arch:rv64:add memory clobber to inline asm for syscall.

2021-04-02 Thread GitBox


hotislandn opened a new pull request #3283:
URL: https://github.com/apache/incubator-nuttx/pull/3283


   Signed-off-by: hotislandn 
   
   ## Summary
   This patch adds "memory" for the inlined asm syscalls for RV64GC.
   Without this, the compiler will remove some of the memory operations before 
syscall APIs under high optimization.
   
   ## Impact
   All RV64GC targets.
   
   ## Testing
   1. Chech the compiler output to ensure memory accesses are not eliminated.
   2. All configurations for C906 have been built and verified with QEMU.
   


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

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




[GitHub] [incubator-nuttx-apps] swkim101 opened a new pull request #647: nshlib: Disable mb, mh, and mw by default

2021-04-02 Thread GitBox


swkim101 opened a new pull request #647:
URL: https://github.com/apache/incubator-nuttx-apps/pull/647


   ## Summary
   
   - Fix https://github.com/apache/incubator-nuttx/issues/3011
   
   ## Impact
   
   ## Testing
   
   
![image](https://user-images.githubusercontent.com/72803908/113467429-eba1bb80-947d-11eb-9818-ed7416a90ea5.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.

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




[incubator-nuttx] branch master updated: esp32: Fix small typo that will trigger an error when IPv6 is enabled

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 18f88c3  esp32: Fix small typo that will trigger an error when IPv6 is 
enabled
18f88c3 is described below

commit 18f88c35fc2773d841aca1e4ab9755ff6736d4b2
Author: Alan C. Assis 
AuthorDate: Fri Apr 2 21:53:05 2021 -0300

esp32: Fix small typo that will trigger an error when IPv6 is enabled
---
 arch/xtensa/src/esp32/esp32_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/xtensa/src/esp32/esp32_wlan.c 
b/arch/xtensa/src/esp32/esp32_wlan.c
index ac82f2e..705edf9 100644
--- a/arch/xtensa/src/esp32/esp32_wlan.c
+++ b/arch/xtensa/src/esp32/esp32_wlan.c
@@ -1207,7 +1207,7 @@ static int wlan_ifup(FAR struct net_driver_s *dev)
 (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
 #endif
 #ifdef CONFIG_NET_IPv6
-  winfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
+  ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
 dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
 dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
 dev->d_ipv6addr[6], dev->d_ipv6addr[7]);


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3282: esp32: Fix small typo that will trigger an error when IPv6 is enabled

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #3282:
URL: https://github.com/apache/incubator-nuttx/pull/3282


   


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

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




[incubator-nuttx] branch master updated (18f88c3 -> b4b175c)

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

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


from 18f88c3  esp32: Fix small typo that will trigger an error when IPv6 is 
enabled
 add b4b175c  arch:rv64:add memory clobber to inline asm for syscall.

No new revisions were added by this update.

Summary of changes:
 arch/risc-v/include/rv64gc/syscall.h | 7 +++
 1 file changed, 7 insertions(+)


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3283: arch:rv64:add memory clobber to inline asm for syscall.

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #3283:
URL: https://github.com/apache/incubator-nuttx/pull/3283


   


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3212: fs/lfs: Update version to 2.4.0

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3212:
URL: https://github.com/apache/incubator-nuttx/pull/3212#issuecomment-812817710


   @btashton it is finally pass CI, coud you review again and merge it if no 
more concern?


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3273: sys/socket.h: Add "Socket"-level control message types

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3273:
URL: https://github.com/apache/incubator-nuttx/pull/3273#issuecomment-812818316


   The change is trival, macOS build error is due to the unstable of github 
infrastructure. So let's merge it.


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

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




[incubator-nuttx] branch master updated (b4b175c -> 45dc778)

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

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


from b4b175c  arch:rv64:add memory clobber to inline asm for syscall.
 add 45dc778  sys/socket.h: Add "Socket"-level control message types

No new revisions were added by this update.

Summary of changes:
 include/sys/socket.h | 6 ++
 1 file changed, 6 insertions(+)


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3273: sys/socket.h: Add "Socket"-level control message types

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #3273:
URL: https://github.com/apache/incubator-nuttx/pull/3273


   


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

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




[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #647: nshlib: Disable mb, mh, and mw by default

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #647:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/647#issuecomment-812818855


   @swkim101 you need remove all CONFIG_NSH_DISABLE_M[B|H|W]=y from 
nuttx/boards/ to fix the error reported here:
   
https://github.com/apache/incubator-nuttx-apps/pull/647/checks?check_run_id=2258212861


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

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




[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #646: testing/ostest: Add a test of the getopt() family of interfaces.

2021-04-02 Thread GitBox


xiaoxiang781216 merged pull request #646:
URL: https://github.com/apache/incubator-nuttx-apps/pull/646


   


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

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




[incubator-nuttx-apps] branch master updated: testing/ostest: Add a test of the getopt() family of interfaces.

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 99138f6  testing/ostest:  Add a test of the getopt() family of 
interfaces.
99138f6 is described below

commit 99138f6b39fa9764c6c68a9a6511768f7e092461
Author: Gregory Nutt 
AuthorDate: Thu Apr 1 14:17:07 2021 -0600

testing/ostest:  Add a test of the getopt() family of interfaces.

This new test was used to verify the new implementations of getopt_long() 
and getopt_long_only() and to verify that there are no regressions to the 
existing getopts().

Only the OS test is affect by this change.

Verified with the getopt() modifications on a modified version of the 
sim:nsh configuration.
---
 testing/ostest/Makefile  |   2 +-
 testing/ostest/getopt.c  | 476 +++
 testing/ostest/ostest.h  |   4 +
 testing/ostest/ostest_main.c |   8 +
 4 files changed, 489 insertions(+), 1 deletion(-)

diff --git a/testing/ostest/Makefile b/testing/ostest/Makefile
index f0240cf..9767675 100644
--- a/testing/ostest/Makefile
+++ b/testing/ostest/Makefile
@@ -29,7 +29,7 @@ MODULE = $(CONFIG_TESTING_OSTEST)
 
 # NuttX OS Test
 
-CSRCS   = dev_null.c restart.c sigprocmask.c sighand.c signest.c
+CSRCS   = getopt.c dev_null.c restart.c sigprocmask.c sighand.c signest.c
 MAINSRC = ostest_main.c
 
 ifeq ($(CONFIG_SIG_SIGSTOP_ACTION),y)
diff --git a/testing/ostest/getopt.c b/testing/ostest/getopt.c
new file mode 100644
index 000..96ae1f5
--- /dev/null
+++ b/testing/ostest/getopt.c
@@ -0,0 +1,476 @@
+/
+ * apps/testing/ostest/getopt.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 "ostest.h"
+
+/
+ * Pre-processor DEFINTIONS
+ /
+
+#define SHORT_RESULT_A(n) \
+ { \
+results[n].ret  = 'a'; \
+results[n].flag = 0; \
+results[n].arg  = NULL; \
+ }
+
+#define SHORT_RESULT_B(n) \
+ { \
+results[n].ret  = 'b'; \
+results[n].flag = 0; \
+results[n].arg  = NULL; \
+ }
+
+#define SHORT_RESULT_C1(n) \
+ { \
+results[n].ret  = 'c'; \
+results[n].flag = 0; \
+results[n].arg  = "Arg1"; \
+ }
+
+#define SHORT_RESULT_C2(n) \
+ { \
+results[n].ret  = 'c'; \
+results[n].flag = 0; \
+results[n].arg  = NULL; \
+ }
+
+#define SHORT_RESULT_D(n) \
+ { \
+results[n].ret  = 'd'; \
+results[n].flag = 0; \
+results[n].arg  = "Arg2"; \
+ }
+
+#define LONG_OPTION_A(n) \
+  { \
+long_options[n].name= "OptionA"; \
+long_options[n].has_arg = no_argument; \
+long_options[n].flag= NULL; \
+long_options[n].val = 'a'; \
+  }
+
+#define LONG_OPTION_B(n) \
+  { \
+long_options[n].name= "OptionB"; \
+long_options[n].has_arg = no_argument; \
+long_options[n].flag= &g_flag; \
+long_options[n].val = 'b'; \
+  }
+
+#define LONG_OPTION_C(n) \
+  { \
+long_options[n].name= "OptionC"; \
+long_options[n].has_arg = required_argument; \
+long_options[n].flag= NULL; \
+long_options[n].val = 'c'; \
+  }
+
+#define LONG_OPTION_D(n) \
+  { \
+long_options[n].name= "OptionD"; \
+long_options[n].has_arg = optional_argument; \
+long_options[n].flag= &g_flag; \
+long_options[n].val = 'd'; \
+  }
+
+#define LONG_OPTION_END(n) \
+  { \
+long_options[n].name= NULL; \
+long_options[n].has_arg = 0; \
+long_options[n].flag= NULL; \
+long_options[n].val = 0; \
+  }
+
+#define LONG_RESULT_A(n) \
+  { \
+results[n].ret  = 'a'; \
+results[n].flag = 0; \
+results[n].arg

[GitHub] [incubator-nuttx] cclauss commented on pull request #3281: Lint Python code for syntax errors

2021-04-02 Thread GitBox


cclauss commented on pull request #3281:
URL: https://github.com/apache/incubator-nuttx/pull/3281#issuecomment-812819891


   That linter might be super but it is also super slow.  In its 5 minute 
runtime it should be able to lint all programming languages known to man.
   
   The test I added takes 5 second and actually finds code that would crash on 
the user.  `black` if properly configured should should be unable to parse 
these two files.


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

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




[GitHub] [incubator-nuttx] cclauss edited a comment on pull request #3281: Lint Python code for syntax errors

2021-04-02 Thread GitBox


cclauss edited a comment on pull request #3281:
URL: https://github.com/apache/incubator-nuttx/pull/3281#issuecomment-812819891


   That linter might be super but it is also super slow.  In its 5 minute 
runtime it should be able to automatically lint all programming languages known 
to man.
   
   The test I added takes 5 second and actually finds code that would crash on 
the user.  `black` if properly configured should should be unable to parse 
these two files.


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

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




[GitHub] [incubator-nuttx] btashton commented on pull request #3281: Lint Python code for syntax errors

2021-04-02 Thread GitBox


btashton commented on pull request #3281:
URL: https://github.com/apache/incubator-nuttx/pull/3281#issuecomment-812820388


   It already includes flake8 black etc... We already have it for yaml linting 
why not just enable it for python as well?


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

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




[GitHub] [incubator-nuttx-testing] xiaoxiang781216 commented on pull request #92: move avr, risc-v, xtensa and x86 builds out of other.dat

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #92:
URL: 
https://github.com/apache/incubator-nuttx-testing/pull/92#issuecomment-812822710


   Ubuntu setup isn't free too:
   
![image](https://user-images.githubusercontent.com/18066964/113470572-6bdb0900-940b-11eb-80bb-c76e763b17ed.png)
   from the above picture(x86): total is 259s, setup is 106s(40.9%), so it 
isn't optimal scheme to split the small number of config(e.g. x86, avr 
especially the config increment for both arch is very small) from the middle 
config(e.g. other), on the other hand it can reduce the huge build time to 
split xtensa and riscv from other.
   So I still prefer to just move rsicv and xtensa from other.dat, but keep avr 
and x86/64 in other.dat, other change look fine to me.
   BTW, since macOS build don't use other.dat after change, we can remove all 
-Darwin from other.dat too.


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #3281: Lint Python code for syntax errors

2021-04-02 Thread GitBox


xiaoxiang781216 commented on pull request #3281:
URL: https://github.com/apache/incubator-nuttx/pull/3281#issuecomment-812823518


   @cclauss could you squach your patches into one?


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

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