[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #4186: libc: Implement times function

2021-07-19 Thread GitBox


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


   ## Summary
   
   ## Impact
   
   ## Testing
   
   


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

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

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




[GitHub] [incubator-nuttx] yamt commented on issue #4181: TCP iob_free.c assert

2021-07-19 Thread GitBox


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


   @anchao i think https://github.com/apache/incubator-nuttx/pull/4185 fixes 
this issue.


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

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

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




[GitHub] [incubator-nuttx] yamt opened a new pull request #4185: iob_trimhead: fix an integer truncation

2021-07-19 Thread GitBox


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


   ## Summary
   I guess this fixes https://github.com/apache/incubator-nuttx/issues/4181
   
   ## Impact
   tcp
   
   ## Testing
   tested using a modified version of apps/netutils/iperf on esp32 with the 
rest of https://github.com/apache/incubator-nuttx/pull/4184
   especially the "mm/iob: Perform some sanity checks on IOB chain" commit.


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

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

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




[GitHub] [incubator-nuttx] yamt opened a new pull request #4184: tcp related wip things

2021-07-19 Thread GitBox


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


   ## Summary
   
   ## Impact
   
   ## Testing
   
   


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

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

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




[GitHub] [incubator-nuttx] SPRESENSE opened a new pull request #4183: sched/task: Fix wrong return value from nxspawn_open()

2021-07-19 Thread GitBox


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


   ## Summary
   nxspawn_open() is expected to return "OK" when it success, but
   it doesn't return it in case of executing dup2.
   Because of this, the "Command as parameter" couldn't work with
   Builtin Apps.
   
   ## Impact
   Related on task_spawn().
   
   ## Testing
   In CONFIG_FS_TMPFS=y and CONFIG_EXAMPLES_HELLO=y,
   Before fixing, it fails as below:
   ```
   nsh> mount -t tmpfs /tmp
   nsh> set FOO `hello`
   nsh: ``: exec failed: 1
   ```
   By this commit, confirm that it works well.
   ```
   nsh> mount -t tmpfs /tmp
   nsh> set FOO `hello`
   nsh> echo $FOO
   Hello, World!!
   ```
   


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

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

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




[GitHub] [incubator-nuttx] yamt commented on issue #4181: TCP iob_free.c assert

2021-07-19 Thread GitBox


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


   i will take a look.


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

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

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




[incubator-nuttx] branch master updated: Fix typos in comments and identifiers

2021-07-19 Thread gustavonihei
This is an automated email from the ASF dual-hosted git repository.

gustavonihei 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 609ee6b  Fix typos in comments and identifiers
609ee6b is described below

commit 609ee6b54bb322e58fb21a70c3987de763d81ff9
Author: Nathan Hartman <59230071+hartmannat...@users.noreply.github.com>
AuthorDate: Fri Jul 16 17:37:45 2021 -0400

Fix typos in comments and identifiers
---
 Kconfig| 10 ++
 arch/arm/src/armv7-a/arm_cpupause.c|  2 +-
 arch/arm/src/armv7-m/Kconfig   |  2 +-
 arch/arm/src/armv7-m/arm_ramvec_initialize.c   |  2 +-
 arch/arm/src/armv7-m/ram_vectors.h |  2 +-
 arch/arm/src/armv8-m/Kconfig   |  2 +-
 arch/arm/src/armv8-m/arm_ramvec_initialize.c   |  2 +-
 arch/arm/src/armv8-m/ram_vectors.h |  2 +-
 arch/arm/src/cxd56xx/cxd56_adc.h   |  2 +-
 arch/arm/src/cxd56xx/cxd56_cpupause.c  |  4 ++--
 arch/arm/src/cxd56xx/cxd56_emmc.h  |  2 +-
 arch/arm/src/cxd56xx/cxd56_gnss_api.h  |  2 +-
 arch/arm/src/cxd56xx/cxd56_sph.h   |  2 +-
 arch/arm/src/stm32/stm32_foc.c |  2 +-
 arch/arm/src/stm32/stm32_gpio.h|  4 ++--
 arch/arm/src/stm32f0l0g0/stm32_gpio.c  |  4 ++--
 arch/arm/src/stm32f0l0g0/stm32_gpio.h  |  4 ++--
 arch/arm/src/stm32f7/stm32_gpio.c  |  2 +-
 arch/arm/src/stm32f7/stm32_gpio.h  |  2 +-
 arch/arm/src/stm32h7/stm32_gpio.h  |  2 +-
 arch/arm/src/stm32l4/stm32l4_adc.h |  2 +-
 arch/arm/src/stm32l4/stm32l4_gpio.c|  4 ++--
 arch/arm/src/stm32l4/stm32l4_gpio.h|  4 ++--
 arch/arm/src/stm32l5/stm32l5_gpio.c|  4 ++--
 arch/arm/src/stm32l5/stm32l5_gpio.h|  4 ++--
 arch/renesas/src/rx65n/rx65n_eth.c |  4 ++--
 boards/Kconfig |  2 +-
 boards/arm/rp2040/common/src/rp2040_lcd_backpack.c |  2 +-
 boards/arm/stm32/common/src/stm32_lcd_backpack.c   |  2 +-
 boards/arm/stm32h7/nucleo-h743zi2/README.txt   |  2 +-
 drivers/motor/foc/Kconfig  |  2 +-
 include/dsp.h  |  2 +-
 include/dspb16.h   |  2 +-
 libs/libc/unistd/Kconfig   |  4 ++--
 libs/libc/unistd/lib_daemon.c  |  6 +++---
 libs/libdsp/lib_foc.c  | 12 ++--
 libs/libdsp/lib_foc_b16.c  | 12 ++--
 libs/libdsp/lib_motor.c|  2 +-
 libs/libdsp/lib_svm.c  |  2 +-
 libs/libdsp/lib_svm_b16.c  |  2 +-
 libs/libxx/cxx.defs|  2 +-
 41 files changed, 68 insertions(+), 66 deletions(-)

diff --git a/Kconfig b/Kconfig
index e841572..4d8d71b 100644
--- a/Kconfig
+++ b/Kconfig
@@ -1759,14 +1759,16 @@ config STACK_COLORATION
Only supported by a few architectures.
 
 config STACK_USAGE_SAFE_PERCENT
-   int "Stack usage safe precent"
+   int "Stack usage safe percent"
default 0
range 0 100
depends on STACK_COLORATION
---help---
-   Stack usage precent = up_check_tcbstack() * 100 / 
tcb->adj_stack_size,
-   this should lower then STACK_USAGE_SAFE_PERCENT.
-   Idle thread will timely check stack usage when this macro value 
> 0.
+   Stack usage percent = up_check_tcbstack() * 100 / 
tcb->adj_stack_size,
+   this should be lower than STACK_USAGE_SAFE_PERCENT.
+
+   Idle thread will periodically check stack usage when this macro
+   value > 0.
 
N.B. This feature should not be used in production code.
 
diff --git a/arch/arm/src/armv7-a/arm_cpupause.c 
b/arch/arm/src/armv7-a/arm_cpupause.c
index fbb6c38..c479039 100644
--- a/arch/arm/src/armv7-a/arm_cpupause.c
+++ b/arch/arm/src/armv7-a/arm_cpupause.c
@@ -130,7 +130,7 @@ int up_cpu_paused(int cpu)
 
   arm_savestate(tcb->xcp.regs);
 
-  /* Release the g_cpu_puased spinlock to synchronize with the
+  /* Release the g_cpu_paused spinlock to synchronize with the
* requesting CPU.
*/
 
diff --git a/arch/arm/src/armv7-m/Kconfig b/arch/arm/src/armv7-m/Kconfig
index 7bd5001..61d89f7 100644
--- a/arch/arm/src/armv7-m/Kconfig
+++ b/arch/arm/src/armv7-m/Kconfig
@@ -63,7 +63,7 @@ config ARMV7M_USEBASEPRI
WARNING:  If CONFIG_ARCH_HIPRI_INTERRUPT is selected, then you
MUST select CONFIG_ARMV7M_USEBASEPRI.  The Kconfig dependencies
here will permit to select an invalid configuration because it
-  

[GitHub] [incubator-nuttx] gustavonihei merged pull request #4182: Fix typos in comments and identifiers

2021-07-19 Thread GitBox


gustavonihei merged pull request #4182:
URL: https://github.com/apache/incubator-nuttx/pull/4182


   


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

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

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




[incubator-nuttx] branch master updated (b9ec006 -> 38c5837)

2021-07-19 Thread gustavonihei
This is an automated email from the ASF dual-hosted git repository.

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


from b9ec006  Remove duplicated Documentation of the bl602evb
 add 92eec01  socket_rpmsg: fix recv block when remote close early
 add 38c5837  socket_rpmsg: add lock to bind list, reject if list more than 
backlog

No new revisions were added by this update.

Summary of changes:
 net/rpmsg/rpmsg_sockif.c | 44 +---
 1 file changed, 33 insertions(+), 11 deletions(-)


[GitHub] [incubator-nuttx] gustavonihei merged pull request #4179: Update socket rpmsg

2021-07-19 Thread GitBox


gustavonihei merged pull request #4179:
URL: https://github.com/apache/incubator-nuttx/pull/4179


   


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

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

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




[GitHub] [incubator-nuttx] SunJun8 commented on pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


SunJun8 commented on pull request #4178:
URL: https://github.com/apache/incubator-nuttx/pull/4178#issuecomment-882980624


   @acassis well, noticed that it has been deleted in the new commit, thanks


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

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

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




[incubator-nuttx-website] branch asf-site updated: Publishing web: 934a4647f20f1ab1148ce00d3b05b97fb19ad702 docs: b9ec0063bc847d4ddf01dbf37027b3636c4c62a5

2021-07-19 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 401829b  Publishing web: 934a4647f20f1ab1148ce00d3b05b97fb19ad702 
docs: b9ec0063bc847d4ddf01dbf37027b3636c4c62a5
401829b is described below

commit 401829b16007134bc3486b9f0a69c09615a689af
Author: Nathan <59230071+hartmannat...@users.noreply.github.com>
AuthorDate: Tue Jul 20 00:08:36 2021 +

Publishing web: 934a4647f20f1ab1148ce00d3b05b97fb19ad702 docs: 
b9ec0063bc847d4ddf01dbf37027b3636c4c62a5
---
 content/docs/10.0.0/index.html |   2 +-
 content/docs/10.0.1/index.html |   2 +-
 content/docs/10.1.0/index.html |   2 +-
 .../_sources/platforms/risc-v/bl602/index.rst.txt  | 212 +-
 content/docs/latest/index.html |   2 +-
 content/docs/latest/objects.inv| Bin 33013 -> 33084 bytes
 .../docs/latest/platforms/risc-v/bl602/index.html  | 247 -
 content/docs/latest/searchindex.js |   2 +-
 content/feed.xml   |   4 +-
 9 files changed, 451 insertions(+), 22 deletions(-)

diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html
index 3ee8776..00a0f34 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: 19 July 21 at 00:05
+Last Updated: 20 July 21 at 00:05
 
 Table of Contents
 
diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html
index 5585390..0b743c1 100644
--- a/content/docs/10.0.1/index.html
+++ b/content/docs/10.0.1/index.html
@@ -213,7 +213,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: 19 July 21 at 00:05
+Last Updated: 20 July 21 at 00:06
 
 Table of Contents
 
diff --git a/content/docs/10.1.0/index.html b/content/docs/10.1.0/index.html
index 2a282e7..05f2ec1 100644
--- a/content/docs/10.1.0/index.html
+++ b/content/docs/10.1.0/index.html
@@ -213,7 +213,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 64-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: 19 July 21 at 00:05
+Last Updated: 20 July 21 at 00:06
 
 Table of Contents
 
diff --git a/content/docs/latest/_sources/platforms/risc-v/bl602/index.rst.txt 
b/content/docs/latest/_sources/platforms/risc-v/bl602/index.rst.txt
index 3e3b017..d9bce20 100644
--- a/content/docs/latest/_sources/platforms/risc-v/bl602/index.rst.txt
+++ b/content/docs/latest/_sources/platforms/risc-v/bl602/index.rst.txt
@@ -2,11 +2,211 @@
 Bouffalo Lab BL602
 ==
 
-Toolchain
-=
+BL602/BL604 is Wi-Fi + BLE combo chipset for ultra-low-cost and
+low-power application. Wireless subsystem contains 2.4G radio, Wi-Fi
+802.11b/g/n and BLE 5.0 baseband/MAC designs. Microcontroller subsystem
+contains a low-power 32-bit RISC CPU, high-speed cache and memories.
+Power Management Unit controls low-power modes. Moreover, variety of
+security features are supported.
 
-OpenOCD

+-  32-bit RISC CPU with FPU (floating point unit)
 
-Peripheral Support
-==
+-  276KB RAM
+
+-  128KB ROM
+
+-  1Kb eFuse
+
+-  Embedded Flash (Optional)
+
+-  Four DMA channels
+
+BL602 Toolchain
+===
+
+Toolchain can be obtained from
+`bl_iot_sdk/toolchain/riscv 
`__
+
+In 

[GitHub] [incubator-nuttx] michallenc commented on issue #3765: GSoC: NuttX support for pysimCoder (info thread)

2021-07-19 Thread GitBox


michallenc commented on issue #3765:
URL: 
https://github.com/apache/incubator-nuttx/issues/3765#issuecomment-882899549


   Hello,
   
   my implementation of tickless mode for iMXRT MCU mentioned above was tested 
on real time DC motor control application and [merged into mainline during the 
past week](https://github.com/apache/incubator-nuttx/pull/4138). A problematic 
pattern in my code and in STM32 tickless mode code has been later noticed by 
@ppisa and [described in NuttX mailing list in 
detail](http://mail-archives.apache.org/mod_mbox/nuttx-dev/202107.mbox/browser).
 This problem does occur minimally as the overflow of the timer does not occur 
to often, but still should be prevented to happen. I plan to introduce a fix 
for both iMXRT and STM32, but firstly I need to do some tests of tickless mode 
with STM32.
   
   After finishing the work on tickless mode, I started getting into the ADC 
support for iMXRT. As I mentioned last week, there are some problems when using 
multiple channels. It seems that sometimes the wrong channel is read and/or 
saved. The DMA support is missing in this case, but first option was to try 
avoid the problem by using multiple trigger control and read registers. That 
didn´t work out as only the first trigger register supports software trigger, 
the others support only hardware trigger. Althought this might not be a problem 
in the future as the ADC triggering should by done by PWM for the control of 
PMSM motor, it seems that using multiple channels with software trigger will 
need the DMA support.


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

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

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




[GitHub] [incubator-nuttx] hartmannathan opened a new pull request #4182: Fix typos in comments and identifiers

2021-07-19 Thread GitBox


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


   ## Summary
   
   Fix typos in comments and identifiers in these files:
   
   - tools/nxstyle Kconfig
   - tools/nxstyle arch/arm/src/armv7-a/arm_cpupause.c
   - tools/nxstyle arch/arm/src/armv7-m/Kconfig
   - tools/nxstyle arch/arm/src/armv7-m/arm_ramvec_initialize.c
   - tools/nxstyle arch/arm/src/armv7-m/ram_vectors.h
   - tools/nxstyle arch/arm/src/armv8-m/Kconfig
   - tools/nxstyle arch/arm/src/armv8-m/arm_ramvec_initialize.c
   - tools/nxstyle arch/arm/src/armv8-m/ram_vectors.h
   - tools/nxstyle arch/arm/src/cxd56xx/cxd56_adc.h
   - tools/nxstyle arch/arm/src/cxd56xx/cxd56_cpupause.c
   - tools/nxstyle arch/arm/src/cxd56xx/cxd56_emmc.h
   - tools/nxstyle arch/arm/src/cxd56xx/cxd56_gnss_api.h
   - tools/nxstyle arch/arm/src/cxd56xx/cxd56_sph.h
   - tools/nxstyle arch/arm/src/stm32/stm32_foc.c
   - tools/nxstyle arch/arm/src/stm32/stm32_gpio.h
   - tools/nxstyle arch/arm/src/stm32f0l0g0/stm32_gpio.c
   - tools/nxstyle arch/arm/src/stm32f0l0g0/stm32_gpio.h
   - tools/nxstyle arch/arm/src/stm32f7/stm32_gpio.c
   - tools/nxstyle arch/arm/src/stm32f7/stm32_gpio.h
   - tools/nxstyle arch/arm/src/stm32h7/stm32_gpio.h
   - tools/nxstyle arch/arm/src/stm32l4/stm32l4_adc.h
   - tools/nxstyle arch/arm/src/stm32l4/stm32l4_gpio.c
   - tools/nxstyle arch/arm/src/stm32l4/stm32l4_gpio.h
   - tools/nxstyle arch/arm/src/stm32l5/stm32l5_gpio.c
   - tools/nxstyle arch/arm/src/stm32l5/stm32l5_gpio.h
   - tools/nxstyle arch/renesas/src/rx65n/rx65n_eth.c
   - tools/nxstyle boards/Kconfig
   - tools/nxstyle boards/arm/rp2040/common/src/rp2040_lcd_backpack.c
   - tools/nxstyle boards/arm/stm32/common/src/stm32_lcd_backpack.c
   - tools/nxstyle boards/arm/stm32h7/nucleo-h743zi2/README.txt
   - tools/nxstyle drivers/motor/foc/Kconfig
   - tools/nxstyle include/dsp.h
   - tools/nxstyle include/dspb16.h
   - tools/nxstyle libs/libc/unistd/Kconfig
   - tools/nxstyle libs/libc/unistd/lib_daemon.c
   - tools/nxstyle libs/libdsp/lib_foc.c
   - tools/nxstyle libs/libdsp/lib_foc_b16.c
   - tools/nxstyle libs/libdsp/lib_motor.c
   - tools/nxstyle libs/libdsp/lib_svm.c
   - tools/nxstyle libs/libdsp/lib_svm_b16.c
   - tools/nxstyle libs/libxx/cxx.defs
   
   ## Impact
   
   Most changes affect comments and documentation only.
   
   Some identifiers have been renamed in the process; however they were not 
widely used so the impact should be minimal.
   
   Some files had spelling mistakes in section headings; these are fixed, which 
should help them pass nxstyle.
   
   ## Testing
   
   nxstyle


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

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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4179: Update socket rpmsg

2021-07-19 Thread GitBox


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



##
File path: net/rpmsg/rpmsg_sockif.c
##
@@ -510,8 +502,25 @@ static void rpmsg_socket_ns_bind(FAR struct rpmsg_device 
*rdev,
   strcpy(new->rpaddr.rp_cpu, rpmsg_get_cpuname(rdev));
   strcpy(new->rpaddr.rp_name, name);
 
+  rpmsg_socket_lock(>recvlock);
+
+  for (tmp = server; tmp->next; tmp = tmp->next)
+{
+  if (++cnt >= server->backlog)
+{
+  /* Reject the connection */
+
+  rpmsg_destroy_ept(>ept);
+  rpmsg_socket_free(new);
+  rpmsg_socket_unlock(>recvlock);

Review comment:
   move before line 513




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

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

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




[GitHub] [incubator-nuttx] anchao opened a new issue #4181: TCP iob_free.c assert

2021-07-19 Thread GitBox


anchao opened a new issue #4181:
URL: https://github.com/apache/incubator-nuttx/issues/4181


   Recently, we rebase of nuttx mainline to our internal branch. When running 
the HTTP audio streaming testing suite, we found that the audio streaming often 
crash in the iob_free.c:
   
   assert:
   `[  143.635905] [28] ap: up_assert: Assertion failed at file:iob/iob_free.c 
line: 101 task: media_src_movie`
   
   backtrace:
   
   ```
   (gdb) bt
   #0  _assert (
   filename=0xef3f8000 
"ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336ᆳ\336",
 ..., 
   linenum=0) at assert/lib_assert.c:35
   #1  0x570ac655 in iob_free (iob=0x5a223350 , 
producerid=IOBUSER_NET_TCP_READAHEAD) at iob/iob_free.c:101
   #2  0x5839724a in iob_trimhead (iob=0x5a223350 , 
trimlen=468, producerid=IOBUSER_NET_TCP_READAHEAD) at iob/iob_trimhead.c:103
   #3  0x582edf45 in tcp_readahead (pstate=0xef3f9ab0) at tcp/tcp_recvfrom.c:284
   #4  0x582ef580 in psock_tcp_recvfrom (psock=0xf4804db0, buf=0xef3f9e90, 
len=1024, flags=0, from=0x0, fromlen=0xef3f9c94) at tcp/tcp_recvfrom.c:651
   #5  0x582dc391 in inet_recvmsg (psock=0xf4804db0, msg=0xef3f9c90, flags=0) 
at inet/inet_sockif.c:1602
   #6  0x56f404fe in psock_recvmsg (psock=0xf4804db0, msg=0xef3f9c90, flags=0) 
at socket/recvmsg.c:103
   #7  0x56f3eded in psock_recvfrom (psock=0xf4804db0, buf=0xef3f9e90, 
len=1024, flags=0, from=0x0, fromlen=0x0) at socket/recvfrom.c:92
   #8  0x56f3efc1 in nx_recvfrom (sockfd=6, buf=0xef3f9e90, len=1024, flags=0, 
from=0x0, fromlen=0x0) at socket/recvfrom.c:139
   #9  0x56f3f03b in recvfrom (sockfd=6, buf=0xef3f9e90, len=1024, flags=0, 
from=0x0, fromlen=0x0) at socket/recvfrom.c:204
   #10 0x56f3e9ee in recv (sockfd=6, buf=0xef3f9e90, len=1024, flags=0) at 
socket/recv.c:61
   #11 0x5812922f in tcp_read (h=0xf2201d00, buf=0xf4a05208 "\027\003\003@", 
size=5) at libavformat/tcp.c:267
   #12 0x58105759 in retry_transfer_wrapper (h=0xf2201d00, buf=0xf4a05208 
"\027\003\003@", size=5, size_min=1, transfer_func=0x58128f55 ) at 
libavformat/avio.c:375
   #13 0x58105d8c in ffurl_read (h=0xf2201d00, buf=0xf4a05208 "\027\003\003@", 
size=5) at libavformat/avio.c:410
   #14 0x5812b048 in mbedtls_recv (ctx=0xf2201d00, buf=0xf4a05208 
"\027\003\003@", len=5) at libavformat/tls_mbedtls.c:102
   #15 0x57e80cb2 in mbedtls_ssl_fetch_input (ssl=0xf2001f6c, nb_want=5) at 
library/ssl_msg.c:2033
   #16 0x57e953fa in ssl_get_next_record (ssl=0xf2001f6c) at 
library/ssl_msg.c:4536
   #17 0x57e90d71 in mbedtls_ssl_read_record (ssl=0xf2001f6c, 
update_hs_digest=1) at library/ssl_msg.c:3898
   #18 0x57e9b905 in mbedtls_ssl_read (ssl=0xf2001f6c, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , len=32768) at library/ssl_msg.c:5363
   #19 0x5812cc46 in tls_read (h=0xf2201e00, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768) at libavformat/tls_mbedtls.c:304
   #20 0x58105759 in retry_transfer_wrapper (h=0xf2201e00, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768, size_min=1, 
   transfer_func=0x5812cb29 ) at libavformat/avio.c:375
   #21 0x58105d8c in ffurl_read (h=0xf2201e00, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768) at libavformat/avio.c:410
   #22 0x5790de66 in http_buf_read (h=0xf1e010c0, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768) at libavformat/http.c:1437
   #23 0x5790eb6f in http_read_stream (h=0xf1e010c0, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768) at libavformat/http.c:1511
   #24 0x5791085a in http_read (h=0xf1e010c0, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768) at libavformat/http.c:1635
   #25 0x58105759 in retry_transfer_wrapper (h=0xf1e010c0, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768, size_min=1, 
   transfer_func=0x57910682 ) at libavformat/avio.c:375
   #26 0x58105d8c in ffurl_read (h=0xf1e010c0, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768) at libavformat/avio.c:410
   #27 0x578a65c9 in read_packet_wrapper (s=0xf3c01a80, buf=0xf2a8c400 
"\215\n\005\022]a\210\017\a!K\032\063\032N\247\335C\255", , size=32768) at libavformat/aviobuf.c:513
   #28 0x578a7a0f in fill_buffer (s=0xf3c01a80) at libavformat/aviobuf.c:562
   #29 0x578a9763 in avio_read (s=0xf3c01a80, buf=0xf362866e '\276' ..., size=786) at libavformat/aviobuf.c:655
   #30 0x57aa67a5 in append_packet_chunked (s=0xf3c01a80, pkt=0xef3fb590, 
size=1024) at libavformat/utils.c:288
   #31 0x57aa6cdd in av_get_packet (s=0xf3c01a80, pkt=0xef3fb590, size=1024) at 
libavformat/utils.c:311
   #32 0x579e48e7 in mp3_read_packet (s=0xf3002a80, 

[GitHub] [incubator-nuttx] GUIDINGLI commented on a change in pull request #4179: Update socket rpmsg

2021-07-19 Thread GitBox


GUIDINGLI commented on a change in pull request #4179:
URL: https://github.com/apache/incubator-nuttx/pull/4179#discussion_r672395696



##
File path: net/rpmsg/rpmsg_sockif.c
##
@@ -505,8 +502,25 @@ static void rpmsg_socket_ns_bind(FAR struct rpmsg_device 
*rdev,
   strcpy(new->rpaddr.rp_cpu, rpmsg_get_cpuname(rdev));
   strcpy(new->rpaddr.rp_name, name);
 
+  rpmsg_socket_lock(>recvlock);
+
+  for (tmp = server; tmp->next; tmp = tmp->next)
+{
+  if (++cnt >= server->backlog)
+{
+  /* Reject the connection */
+
+  rpmsg_destroy_ept(>ept);
+  rpmsg_socket_free(new);
+  rpmsg_socket_lock(>recvlock);

Review comment:
   Yes, you are right !




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

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

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




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

2021-07-19 Thread GitBox


acassis commented on pull request #566:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/566#issuecomment-882552606


   Thank you @btashton, please let me know how we can help you to complete it. 
Our new Wi-Fi library will not include the wpa_supplicant internally and we 
need to provide mbedTLS to be able to use it. Also the MCUBoot port that 
@gustavonihei is doing will benefit from using mbedTLS.


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

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

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




[GitHub] [incubator-nuttx] yamt commented on pull request #3900: Revert "Make: use gcc as LD"

2021-07-19 Thread GitBox


yamt commented on pull request #3900:
URL: https://github.com/apache/incubator-nuttx/pull/3900#issuecomment-882551932


   btw, i updated my demo to use a library. it seems working for both of gcc 
and clang so far.
   
https://github.com/yamt/garbage/commit/506efb8445aaa5a7abf6879873b0b5d701a3cab6


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

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

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




[GitHub] [incubator-nuttx] btashton merged pull request #4180: Remove duplicated Documentation of the bl602evb

2021-07-19 Thread GitBox


btashton merged pull request #4180:
URL: https://github.com/apache/incubator-nuttx/pull/4180


   


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

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

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




[incubator-nuttx] branch master updated: Remove duplicated Documentation of the bl602evb

2021-07-19 Thread btashton
This is an automated email from the ASF dual-hosted git repository.

btashton 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 b9ec006  Remove duplicated Documentation of the bl602evb
b9ec006 is described below

commit b9ec0063bc847d4ddf01dbf37027b3636c4c62a5
Author: Alan C. Assis 
AuthorDate: Mon Jul 19 10:23:14 2021 -0300

Remove duplicated Documentation of the bl602evb
---
 boards/risc-v/bl602/bl602evb/README.txt | 197 
 1 file changed, 197 deletions(-)

diff --git a/boards/risc-v/bl602/bl602evb/README.txt 
b/boards/risc-v/bl602/bl602evb/README.txt
deleted file mode 100644
index 427c8e3..000
--- a/boards/risc-v/bl602/bl602evb/README.txt
+++ /dev/null
@@ -1,197 +0,0 @@
-# Getting Started with nsh configuration
-1. Download and install toolchain
-
-  $ curl 
https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz
-
-2. Download flash tools
-  There are multiple tools that can be used, but option (a) is recommended.
-  a. blflash -- cross platform open-source (recommended)
-  curl -L -o blflash 
https://github.com/spacemeowx2/blflash/releases/download/v0.3.0/blflash-linux-amd64
-  chmod +x ./blflash
-
-  b. Bouffalo Lab flash tools (official)
-  https://github.com/bouffalolab/flash_tools.git
-
-3. Configure and build NuttX
-
-  $ mkdir ./nuttx; cd ./nuttx
-  $ git clone https://github.com/apache/incubator-nuttx.git nuttx
-  $ git clone https://github.com/apache/incubator-nuttx-apps.git apps
-  $ cd nuttx
-  $ make distclean
-  $ ./tools/configure.sh bl602evb:nsh
-  $ make -j
-
-4. Connect bl602 and computer via USB
-
-5. Flash
-  Use option (a) or (b) based on tool selection in section 2.
-  a. Using blflash
-Place the board in bootloader mode
- bl602evb: Jumper IO8 to HI and press reset
- DT-BL10: Press and hold D8, press and release EN, release D8
-
-$ blflash flash nuttx.bin --port /dev/ttyUSB0
-  [INFO  blflash::flasher] Start connection...
-  [TRACE blflash::flasher] 5ms send count 55
-  [TRACE blflash::flasher] handshake sent elapsed 159.674µs
-  [INFO  blflash::flasher] Connection Succeed
-  [INFO  blflash] Bootrom version: 1
-  [TRACE blflash] Boot info: BootInfo { len: 14, bootrom_version: 1, 
otp_info: [0, 0, 0, 0, 3, 0, 0, 0, a4, 9b, 2, 42, e8, b4, 1d, 0] }
-  [INFO  blflash::flasher] Sending eflash_loader...
-  [INFO  blflash::flasher] Finished 2.563450723s 11.15KB/s
-  [TRACE blflash::flasher] 5ms send count 500
-  [TRACE blflash::flasher] handshake sent elapsed 5.065786ms
-  [INFO  blflash::flasher] Entered eflash_loader
-  [INFO  blflash::flasher] Skip segment addr: 0 size: 47504 sha256 matches
-  [INFO  blflash::flasher] Skip segment addr: e000 size: 272 sha256 matches
-  [INFO  blflash::flasher] Skip segment addr: f000 size: 272 sha256 matches
-  [INFO  blflash::flasher] Skip segment addr: 1 size: 351584 sha256 
matches
-  [INFO  blflash::flasher] Skip segment addr: 1f8000 size: 5671 sha256 
matches
-  [INFO  blflash] Success
-
-  b Using BL flash_tools
-Run flash tools, select the nuttx.bin generated in the previous step in the
-Firmware bin field, and refer to the document for the settings of the 
remaining fields.
-
-6. Run connect terminal to UART  (default baudrate 200)
-$ screen /dev/ttyUSB0 200
-7. Reset Device
-bl602evb: Press reset
-DT-BL10: Press and release EN
-8. NSH should appear on console
-
-
-# Using openocd and gdb:
-This guide is focused on the bl602evb board. See the reference manual for
-how to connect to the JTAG interface for other boards.
-
-1. Make sure you are running a recently built version of openocd.  The packaged
-versions are very old, and will likely not work. 
https://github.com/ntfreak/openocd
-
-
-2. Create a openocd-bl602.cfg file
-##
-adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
-ftdi_channel 1
-
-transport select jtag
-adapter speed 2000
-
-ftdi_layout_init 0x00f8 0x00fb
-set _CHIPNAME riscv
-jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x2c05
-
-set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
-$_TARGETNAME.0 configure -work-area-phys 0x2202 -work-area-size 0x1 
-work-area-backup 1
-
-echo "Ready for Remote Connections"
-
-$_TARGETNAME.0 configure -event reset-assert-pre {
-echo "reset-assert-pre"
-adapter speed 100
-}
-
-$_TARGETNAME.0 configure -event reset-deassert-post {
-echo "reset-deassert-post"
-adapter speed 4000
-reg mstatus 0x8000
-reg pc 0x2100
-}
-
-$_TARGETNAME.0 configure -event reset-init {
-echo "reset-init"
-adapter speed 4000
-}
-
-gdb_memory_map enable
-gdb_flash_program disable
-
-riscv 

[GitHub] [incubator-nuttx] btashton commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

2021-07-19 Thread GitBox


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


   > @btashton 
   > On the advice of @gustavonihei , I have changed this PR to add `-c 
'versionsort.suffix=-'`. Will this PR be accepted? If not, I will close it.
   
   Probably should have been `-RC` to filter off the full suffix but that is 
not too important here. Thanks for making this change!


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

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

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




[GitHub] [incubator-nuttx] acassis opened a new pull request #4180: Remove duplicated Documentation of the bl602evb

2021-07-19 Thread GitBox


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


   ## Summary
   Remove duplicated Documentation of the bl602evb
   ## Impact
   Only bl602evb
   ## Testing
   Pass build!
   


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

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

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




[GitHub] [incubator-nuttx] acassis commented on pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


acassis commented on pull request #4178:
URL: https://github.com/apache/incubator-nuttx/pull/4178#issuecomment-882542489


   Ok, @SunJun8 could you please submit a PR to remove the documentation from 
boards/risc-v/bl602/bl602evb/README.txt ?


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

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

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




[GitHub] [incubator-nuttx-apps] btashton commented on pull request #749: Add initial support libtommath and libtomcrypt libraries

2021-07-19 Thread GitBox


btashton commented on pull request #749:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/749#issuecomment-882542240


   Unfortunate that this was merged with outstanding issues. This PR should not 
have been merged without the security export work completed...


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

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

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




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

2021-07-19 Thread GitBox


btashton commented on pull request #566:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/566#issuecomment-882539476


   @acassis this should _not_ be merged (or the other crypto PR I have) until 
the export control work for Apache is completed. I can try to start the process 
for that this week, depending on my time.
   
   


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

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

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




[GitHub] [incubator-nuttx] btashton edited a comment on pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


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


   > BTW @btashton did you see @gustavonihei comment at 
https://github.com/apache/incubator-nuttx-apps/pull/566 ? 
   > What do you suggest? We have three options: 1) wait more few days for your 
patch, if you think it is feasible; 2) Merge it ignoring the missing 
configuration options; 3) Close the PR and use an mbedTLS port that @Ouss4 did 
sometime ago.
   
   This is not related to this PR, the ask here was to remove the duplicated 
documentation


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

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

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




[GitHub] [incubator-nuttx] btashton commented on pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


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


   > BTW @btashton did you see @gustavonihei comment at 
https://github.com/apache/incubator-nuttx-apps/pull/566 ? 
   > What do you suggest? We have three options: 1) wait more few days for your 
patch, if you think it is feasible; 2) Merge it ignoring the missing 
configuration options; 3) Close the PR and use an mbedTLS port that @Ouss4 did 
sometime ago.
   
   This is not related. To this PR, the ask here was to remove the duplicated 
documentation


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

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

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




[GitHub] [incubator-nuttx] acassis commented on pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


acassis commented on pull request #4178:
URL: https://github.com/apache/incubator-nuttx/pull/4178#issuecomment-882534374


   BTW @btashton did you see @gustavonihei comment at 
https://github.com/apache/incubator-nuttx-apps/pull/566 ? 
   What do you suggest? We have three options: 1) wait more few days for your 
patch, if you think it is feasible; 2) Merge it ignoring the missing 
configuration options; 3) Close the PR and use an mbedTLS port that @Ouss4 did 
sometime ago.


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

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

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




[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4179: Update socket rpmsg

2021-07-19 Thread GitBox


gustavonihei commented on a change in pull request #4179:
URL: https://github.com/apache/incubator-nuttx/pull/4179#discussion_r672279701



##
File path: net/rpmsg/rpmsg_sockif.c
##
@@ -505,8 +502,25 @@ static void rpmsg_socket_ns_bind(FAR struct rpmsg_device 
*rdev,
   strcpy(new->rpaddr.rp_cpu, rpmsg_get_cpuname(rdev));
   strcpy(new->rpaddr.rp_name, name);
 
+  rpmsg_socket_lock(>recvlock);
+
+  for (tmp = server; tmp->next; tmp = tmp->next)
+{
+  if (++cnt >= server->backlog)
+{
+  /* Reject the connection */
+
+  rpmsg_destroy_ept(>ept);
+  rpmsg_socket_free(new);
+  rpmsg_socket_lock(>recvlock);

Review comment:
   ```suggestion
 rpmsg_socket_unlock(>recvlock);
   ```
   Shouldn't you unlock here instead?




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

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

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




[GitHub] [incubator-nuttx] acassis commented on pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


acassis commented on pull request #4178:
URL: https://github.com/apache/incubator-nuttx/pull/4178#issuecomment-882530711


   Oops, sorry I missed it!


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

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

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




[GitHub] [incubator-nuttx] yamt edited a comment on pull request #3900: Revert "Make: use gcc as LD"

2021-07-19 Thread GitBox


yamt edited a comment on pull request #3900:
URL: https://github.com/apache/incubator-nuttx/pull/3900#issuecomment-882527566


   @xiaoxiang781216 @gustavonihei 
   
   i haven't found a chance to investigate the lto things.
   you haven't either, it guess.
   on the other hand, the "cc as LD" thing seems still causing issues. 
https://github.com/apache/incubator-nuttx/pull/4173
   how about merging this revert for now?


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

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

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




[GitHub] [incubator-nuttx] btashton commented on pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


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


   @acassis there was an outstanding comment


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

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

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




[GitHub] [incubator-nuttx] yamt commented on pull request #3900: Revert "Make: use gcc as LD"

2021-07-19 Thread GitBox


yamt commented on pull request #3900:
URL: https://github.com/apache/incubator-nuttx/pull/3900#issuecomment-882527566


   the "cc as LD

[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request #4179: Update socket rpmsg

2021-07-19 Thread GitBox


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


   ## Summary
   
socket_rpmsg: fix recv block when remote close early
socket_rpmsg: add lock to bind list, reject if list more than backlog
   
   ## Impact
   
   ## Testing
   
   


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

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

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




[GitHub] [incubator-nuttx] acassis merged pull request #4173: Make: fix use of gcc as LD for modules and ELF executables builds

2021-07-19 Thread GitBox


acassis merged pull request #4173:
URL: https://github.com/apache/incubator-nuttx/pull/4173


   


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

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

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




[incubator-nuttx] branch master updated: Make: fix use of gcc as LD for modules and ELF executables builds

2021-07-19 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6c2c70c  Make: fix use of gcc as LD for modules and ELF executables 
builds
6c2c70c is described below

commit 6c2c70c61eb3f18c636cbf864a11b8f0cdb4594c
Author: Pavel Pisa 
AuthorDate: Sun Jul 18 17:48:25 2021 +0200

Make: fix use of gcc as LD for modules and ELF executables builds

The patch

  Make: use gcc as LD

introduced use of GCC wrapper as linker. LD variable references GCC
executable now. But when GCC wrapper s used to build relocatable
loadable objects (ELF executables and modules) then it causes
linking of toolchain default libc and other libraries even when -r
is usd. Another problem is that incorrect multiarch variant is selected
for libraries search and possibly even for LTO or C++ templates
instantiating and other glue code which causes fails during linking
if CFLAGS selects non/default miltiarch variant.

Corresponding CFLAGS are passed to LDMODULEFLAGS and LDELFFLAGS
as well as -nostartfiles -nodefaultlibs options.

Separate line is used to easily find and adjust lines if link
process is changed in future.

Signed-off-by: Pavel Pisa 
---
 boards/arm/cxd56xx/spresense/scripts/Make.defs   | 2 ++
 boards/arm/imx6/sabre-6quad/scripts/Make.defs| 1 +
 boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs | 1 +
 boards/arm/lpc17xx_40xx/lx_cpu/scripts/Make.defs | 2 ++
 boards/arm/sama5/giant-board/scripts/Make.defs   | 1 +
 boards/arm/sama5/sama5d2-xult/scripts/Make.defs  | 1 +
 boards/arm/sama5/sama5d3-xplained/scripts/Make.defs  | 1 +
 boards/arm/sama5/sama5d3x-ek/scripts/Make.defs   | 1 +
 boards/arm/sama5/sama5d4-ek/configs/knsh/Make.defs   | 1 +
 boards/arm/sama5/sama5d4-ek/scripts/Make.defs| 1 +
 boards/arm/stm32/axoloti/scripts/Make.defs   | 2 ++
 boards/arm/stm32/olimex-stm32-p407/configs/kelf/Make.defs| 2 ++
 boards/arm/stm32/olimex-stm32-p407/configs/kmodule/Make.defs | 2 ++
 boards/arm/stm32/omnibusf4/scripts/Make.defs | 2 ++
 boards/arm/stm32/stm32f4discovery/scripts/Make.defs  | 2 ++
 boards/arm/stm32h7/nucleo-h743zi/scripts/Make.defs   | 1 +
 boards/arm/stm32h7/nucleo-h743zi2/scripts/Make.defs  | 1 +
 boards/arm/tiva/lm3s6965-ek/scripts/Make.defs| 2 ++
 boards/arm/tms570/launchxl-tms57004/scripts/Make.defs| 1 +
 boards/arm/tms570/tms570ls31x-usb-kit/scripts/Make.defs  | 1 +
 20 files changed, 28 insertions(+)

diff --git a/boards/arm/cxd56xx/spresense/scripts/Make.defs 
b/boards/arm/cxd56xx/spresense/scripts/Make.defs
index 03001a3..36d562a 100644
--- a/boards/arm/cxd56xx/spresense/scripts/Make.defs
+++ b/boards/arm/cxd56xx/spresense/scripts/Make.defs
@@ -70,6 +70,7 @@ LDNXFLATFLAGS = -e main -s 2048
 CMODULEFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
 
 LDMODULEFLAGS = -r -e module_initialize
+LDMODULEFLAGS += $(CMODULEFLAGS) -nostartfiles -nodefaultlibs
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   LDMODULEFLAGS += -T "${shell cygpath -w 
$(TOPDIR)/libs/libc/modlib/gnu-elf.ld}"
 else
@@ -82,6 +83,7 @@ CELFFLAGS = $(CFLAGS)
 CXXELFFLAGS = $(CXXFLAGS)
 
 LDELFFLAGS = -r -e main
+LDELFFLAGS += $(CELFFLAGS) -nostartfiles -nodefaultlibs
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   LDELFFLAGS += -T "${shell cygpath -w 
$(BOARD_DIR)$(DELIM)scripts$(DELIM)gnu-elf.ld}"
 else
diff --git a/boards/arm/imx6/sabre-6quad/scripts/Make.defs 
b/boards/arm/imx6/sabre-6quad/scripts/Make.defs
index 8617cf7..f63c06b 100644
--- a/boards/arm/imx6/sabre-6quad/scripts/Make.defs
+++ b/boards/arm/imx6/sabre-6quad/scripts/Make.defs
@@ -65,6 +65,7 @@ CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
 CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs
 
 LDELFFLAGS = -r -e main
+LDELFFLAGS += $(CELFFLAGS) -nostartfiles -nodefaultlibs
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   LDELFFLAGS += -T "${shell cygpath -w 
$(BOARD_DIR)$(DELIM)scripts$(DELIM)gnu-elf.ld}"
 else
diff --git a/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs 
b/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs
index 9ede772..18cbeb4 100644
--- a/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs
+++ b/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs
@@ -71,6 +71,7 @@ CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
 CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs
 
 LDELFFLAGS = -r -e main
+LDELFFLAGS += $(CELFFLAGS) -nostartfiles -nodefaultlibs
 ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
   LDELFFLAGS += -T "${shell cygpath -w 
$(BOARD_DIR)$(DELIM)scripts$(DELIM)gnu-elf.ld}"
 else
diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/scripts/Make.defs 
b/boards/arm/lpc17xx_40xx/lx_cpu/scripts/Make.defs
index 

[GitHub] [incubator-nuttx] acassis merged pull request #4176: ARM: fix CPSR corruption after exception handling

2021-07-19 Thread GitBox


acassis merged pull request #4176:
URL: https://github.com/apache/incubator-nuttx/pull/4176


   


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

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

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




[incubator-nuttx] branch master updated: ARM: fix CPSR corruption after exception handling

2021-07-19 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new aac0db3  ARM: fix CPSR corruption after exception handling
aac0db3 is described below

commit aac0db368c223528e5bbe4a31bb44bca8e541b84
Author: ligd 
AuthorDate: Mon Jul 19 16:00:44 2021 +0800

ARM: fix CPSR corruption after exception handling

It seems to be caused by the corrupted or wrong CPSR restored on return
from exception. NuttX restores the context using code like this:

msr spsr, r1

GCC translates this to:

msr spsr_fc, r1

As a result, not all SPSR fields are updated on exception return. This
should be:

msr spsr_fsxc, r1

This bug has been fixed by Heesub Shin in:
343243c7c0de3d0696fa19c08d8d81e8d6cf0a1c

Change-Id: Ibc64db7bceecd0fb6ef39284fb5bc467f5603e2e
---
 arch/arm/src/arm/arm_fullcontextrestore.S |  2 +-
 arch/arm/src/arm/arm_vectors.S| 10 +-
 arch/arm/src/armv7-a/arm_fullcontextrestore.S |  2 +-
 arch/arm/src/armv7-a/arm_vectors.S| 12 ++--
 arch/arm/src/armv7-r/arm_fullcontextrestore.S |  2 +-
 arch/arm/src/armv7-r/arm_vectors.S| 12 ++--
 arch/arm/src/c5471/c5471_vectors.S| 10 +-
 7 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/arch/arm/src/arm/arm_fullcontextrestore.S 
b/arch/arm/src/arm/arm_fullcontextrestore.S
index a3a41ac..426098f 100644
--- a/arch/arm/src/arm/arm_fullcontextrestore.S
+++ b/arch/arm/src/arm/arm_fullcontextrestore.S
@@ -87,7 +87,7 @@ arm_fullcontextrestore:
 */
 
ldr r1, [r0, #(4*REG_CPSR)] /* Fetch the stored CPSR value */
-   msr spsr, r1/* Set the SPSR */
+   msr spsr_cxsf, r1   /* Set the SPSR */
 
/* Now recover r0-r1, pc and cpsr, destroying the stack frame */
 
diff --git a/arch/arm/src/arm/arm_vectors.S b/arch/arm/src/arm/arm_vectors.S
index 96271d4..4c50aef 100644
--- a/arch/arm/src/arm/arm_vectors.S
+++ b/arch/arm/src/arm/arm_vectors.S
@@ -122,7 +122,7 @@ arm_vectorirq:
/* Restore the CPSR, SVC mode registers and return */
 
ldr r0, [sp, #(4*REG_CPSR)] /* Fetch the return SPSR */
-   msr spsr, r0/* Set the return mode SPSR */
+   msr spsr_cxsf, r0   /* Set the return mode SPSR */
ldmia   sp, {r0-r15}^   /* Return */
 
 #if CONFIG_ARCH_INTERRUPTSTACK > 3
@@ -180,7 +180,7 @@ arm_vectorsvc:
/* Restore the CPSR, SVC mode registers and return */
 
ldr r0, [sp, #(4*REG_CPSR)] /* Fetch the return SPSR */
-   msr spsr, r0/* Set the return mode SPSR */
+   msr spsr_cxsf, r0   /* Set the return mode SPSR */
ldmia   sp, {r0-r15}^   /* Return */
.size   arm_vectorsvc, . - arm_vectorsvc
 
@@ -254,7 +254,7 @@ arm_vectordata:
/* Restore the CPSR, SVC mode registers and return */
 
ldr r0, [sp, #(4*REG_CPSR)] /* Fetch the return SPSR */
-   msr spsr, r0/* Set the return mode SPSR */
+   msr spsr_cxsf, r0   /* Set the return mode SPSR */
ldmia   sp, {r0-r15}^   /* Return */
.size   arm_vectordata, . - arm_vectordata
 
@@ -324,7 +324,7 @@ arm_vectorprefetch:
/* Restore the CPSR, SVC mode registers and return */
 
ldr r0, [sp, #(4*REG_CPSR)] /* Fetch the return SPSR */
-   msr spsr, r0/* Set the return mode SPSR */
+   msr spsr_cxsf, r0   /* Set the return mode SPSR */
ldmia   sp, {r0-r15}^   /* Return */
.size   arm_vectorprefetch, . - arm_vectorprefetch
 
@@ -392,7 +392,7 @@ arm_vectorundefinsn:
/* Restore the CPSR, SVC mode registers and return */
 
ldr r0, [sp, #(4*REG_CPSR)] /* Fetch the return SPSR */
-   msr spsr, r0/* Set the return mode SPSR */
+   msr spsr_cxsf, r0   /* Set the return mode SPSR */
ldmia   sp, {r0-r15}^   /* Return */
.size   arm_vectorundefinsn, . - arm_vectorundefinsn
 
diff --git a/arch/arm/src/armv7-a/arm_fullcontextrestore.S 
b/arch/arm/src/armv7-a/arm_fullcontextrestore.S
index f101650..fded879 100644
--- a/arch/arm/src/armv7-a/arm_fullcontextrestore.S
+++ b/arch/arm/src/armv7-a/arm_fullcontextrestore.S
@@ -144,7 +144,7 @@ arm_fullcontextrestore:
 * disabled.
 */
 
-   msr spsr, r2/* Set the SPSR */
+   msr spsr_cxsf, r2   /* Set the SPSR */
 
/* Now recover r0-r2, pc and cpsr, destroying the stack frame */
 
diff --git a/arch/arm/src/armv7-a/arm_vectors.S 
b/arch/arm/src/armv7-a/arm_vectors.S
index 50f30f3..f5b966b 100644
--- 

[GitHub] [incubator-nuttx] acassis merged pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


acassis merged pull request #4178:
URL: https://github.com/apache/incubator-nuttx/pull/4178


   


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

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

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




[incubator-nuttx] branch master updated: tools/version.sh: Fix version number to get on master branch

2021-07-19 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 383b2b7  tools/version.sh: Fix version number to get on master branch
383b2b7 is described below

commit 383b2b7af294e6208def52ae8e6b00f8eaff0f2f
Author: baggio63446333 
AuthorDate: Tue Jul 13 12:25:19 2021 +0900

tools/version.sh: Fix version number to get on master branch

Fix an issue that the nuttx version is not '10.1.0' but '10.1.0-RC1'
on the master branch. Add a pattern match of "nuttx-" to tags obtained
from git describe.
---
 tools/version.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/version.sh b/tools/version.sh
index f0e5efb..4eb987a 100755
--- a/tools/version.sh
+++ b/tools/version.sh
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut 
-d'-' -f2`
 
   # If the VERSION does not match X.Y.Z, retrieve version from the tag
 
   if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
-VERSION=`git -C ${WD} tag --sort=v:refname | grep -E 
"nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
+VERSION=`git -C ${WD} -c 'versionsort.suffix=-' tag --sort=v:refname | 
grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
   fi
 
 fi


[GitHub] [incubator-nuttx] acassis merged pull request #4144: tools/version.sh: Fix version number to get on master branch

2021-07-19 Thread GitBox


acassis merged pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144


   


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

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

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




[incubator-nuttx] branch master updated: Add BL602 documentation

2021-07-19 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new e968240  Add BL602 documentation
e968240 is described below

commit e968240855dcd00ebc02274e28199c433c946951
Author: jsun 
AuthorDate: Mon Jul 19 16:42:41 2021 +0800

Add BL602 documentation
---
 Documentation/platforms/risc-v/bl602/index.rst | 212 -
 1 file changed, 206 insertions(+), 6 deletions(-)

diff --git a/Documentation/platforms/risc-v/bl602/index.rst 
b/Documentation/platforms/risc-v/bl602/index.rst
index 3e3b017..d9bce20 100644
--- a/Documentation/platforms/risc-v/bl602/index.rst
+++ b/Documentation/platforms/risc-v/bl602/index.rst
@@ -2,11 +2,211 @@
 Bouffalo Lab BL602
 ==
 
-Toolchain
-=
+BL602/BL604 is Wi-Fi + BLE combo chipset for ultra-low-cost and
+low-power application. Wireless subsystem contains 2.4G radio, Wi-Fi
+802.11b/g/n and BLE 5.0 baseband/MAC designs. Microcontroller subsystem
+contains a low-power 32-bit RISC CPU, high-speed cache and memories.
+Power Management Unit controls low-power modes. Moreover, variety of
+security features are supported.
 
-OpenOCD

+-  32-bit RISC CPU with FPU (floating point unit)
 
-Peripheral Support
-==
+-  276KB RAM
+
+-  128KB ROM
+
+-  1Kb eFuse
+
+-  Embedded Flash (Optional)
+
+-  Four DMA channels
+
+BL602 Toolchain
+===
+
+Toolchain can be obtained from
+`bl_iot_sdk/toolchain/riscv 
`__
+
+In addition, SiFive’s toolchain can be downloaded from:
+
+https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz
+
+Building
+
+
+nsh
+---
+
+First make sure the ``riscv-gnu-toolchain`` has been installed
+correctly.
+
+Configure the NUttX project: ``./tools/configure.sh bl602evb:nsh``. Run
+``make`` to build the project.
+
+.. code:: shell
+
+   root@pc:~/nuttx$ tools/configure.sh bl602evb:nsh
+
+   root@pc:~/nuttx$ make
+
+wifi
+
+
+Configure the NUttX project: ``./tools/configure.sh bl602evb:wifi``. Run
+``make`` to build the project.
+
+.. code:: shell
+
+   root@pc:~/nuttx$ tools/configure.sh bl602evb:wifi
+
+   root@pc:~/nuttx$ make
+
+Flashing
+
+
+Dev Cube is a chip integrated development tool provided by Bouffalolab,
+which includes three functions: IOT program download, MCU program
+download and RF performance test.
+
+Dev Cube provides users with the function of downloading programs, and
+supports the configuration of parameters such as clock and flash. Users
+can decide whether to encrypt the program, add signatures, and replace
+the information file, user resource file, partition table and other
+functional configurations according to their own needs when the program
+is started.
+
+Users can get the latest version of Dev Cube through `Bouffalo Lab
+Dev `__.
+
+Config download
+---
+
+**Configuration parameters include:**
+
+-  **Interface**: Select the communication interface for flashing, here
+   select Uart to download
+
+-  **COM Port**: When select UART for downloading, select the COM port
+   number connected to the chip, and you can click the Refresh button to
+   refresh the COM port
+
+-  **Uart Rate**: When select UART for downloading, fill in the baud
+   rate. The recommended download baud rate is 2MHz,
+
+-  **Xtal**: Select the crystal oscillator frequency when downloading.
+   If the board does not have a soldered crystal oscillator, the
+   internal RC32M clock source should be selected here,default is 40M
+
+-  **Chip Erase**: default setting is False
+
+**Configuration parameters include:**
+
+-  **Partition Table**: Use the partition table in the partition folder
+   of the corresponding chip model in the Dev Cube directory, and 2M
+   files are selected by default for BL602
+
+..
+
+   For the nuttx operating system, BL602 has a dedicated partition file.
+   For details, please contact us.
+
+-  **Boot2 Bin**: It is the first Flash program that runs after the
+   system is started. It is responsible for establishing the BLSP
+   security environment and guiding the main program to run. It uses the
+   Boot2 file in the builtin_imgs folder of the corresponding chip model
+   in the Dev Cube directory.
+
+-  **Firmware Bin**: Bin file path generated by user compilation
+
+-  **Media/Romfs**: Choose one of Media and Romfs. If you check media,
+   you should provide a file. If you check Romfs, a folder should be
+   provided.
+
+-  **MFG Bin**: Select MFG file
+
+-  **AES-Encrypt**: If you use the encryption function, you need to
+   select the AES-Encrypt option, and enter the Key and IV used for
+   encryption. Hexadecimal characters should be entered, and a Byte is
+   composed of 

[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4172: sched: Remove unused TLS member from task_group_s

2021-07-19 Thread GitBox


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


   


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

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

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




[incubator-nuttx] branch master updated (e5dafc8 -> ad2f859)

2021-07-19 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 e5dafc8  fs: mount: Change the format for df
 new 95cb33d  sched: Remove unused TLS member from task_group_s
 new ad2f859  sched: Move tls_ndxset_t & tls_dtor_t to tls.h

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


Summary of changes:
 include/nuttx/sched.h | 27 ---
 include/nuttx/tls.h   | 21 +
 2 files changed, 21 insertions(+), 27 deletions(-)


[incubator-nuttx] 01/02: sched: Remove unused TLS member from task_group_s

2021-07-19 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 95cb33dbf5d0ed0e5e6f85eb623b22388e458033
Author: Huang Qi 
AuthorDate: Sun Jul 18 19:42:06 2021 +0800

sched: Remove unused TLS member from task_group_s

Signed-off-by: Huang Qi 
---
 include/nuttx/sched.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index 2167119..8b12a13 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -537,12 +537,6 @@ struct task_group_s
 
   FAR struct task_info_s *tg_info;
 
-#if CONFIG_TLS_NELEM > 0
-  tls_ndxset_t tg_tlsset;   /* Set of TLS indexes allocated */
-
-  tls_dtor_t  tg_tlsdestr[CONFIG_TLS_NELEM];  /* List of TLS destructors*/
-#endif
-
   /* POSIX Signal Control Fields /
 
   sq_queue_t tg_sigactionq; /* List of actions for signals 
 */


[incubator-nuttx] 02/02: sched: Move tls_ndxset_t & tls_dtor_t to tls.h

2021-07-19 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 ad2f859170e49067a1903776cc970947e0f90271
Author: Huang Qi 
AuthorDate: Sun Jul 18 21:01:24 2021 +0800

sched: Move tls_ndxset_t & tls_dtor_t to tls.h

Signed-off-by: Huang Qi 
---
 include/nuttx/sched.h | 21 -
 include/nuttx/tls.h   | 21 +
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index 8b12a13..36c7eba 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -348,27 +348,6 @@ struct pthread_cleanup_s
 };
 #endif
 
-/* type tls_ndxset_t & tls_dtor_t ***/
-
-/* Smallest addressable type that can hold the entire configured number of
- * TLS data indexes.
- */
-
-#if CONFIG_TLS_NELEM > 0
-#  if CONFIG_TLS_NELEM > 32
-#error Too many TLS elements
-#  elif CONFIG_TLS_NELEM > 16
- typedef uint32_t tls_ndxset_t;
-#  elif CONFIG_TLS_NELEM > 8
- typedef uint16_t tls_ndxset_t;
-#  else
- typedef uint8_t tls_ndxset_t;
-#  endif
-
-typedef CODE void (*tls_dtor_t)(FAR void *);
-
-#endif
-
 /* struct dspace_s **/
 
 /* This structure describes a reference counted D-Space region.
diff --git a/include/nuttx/tls.h b/include/nuttx/tls.h
index d893059..5e655f7 100644
--- a/include/nuttx/tls.h
+++ b/include/nuttx/tls.h
@@ -61,6 +61,27 @@
  * Public Types
  /
 
+/* type tls_ndxset_t & tls_dtor_t ***/
+
+/* Smallest addressable type that can hold the entire configured number of
+ * TLS data indexes.
+ */
+
+#if CONFIG_TLS_NELEM > 0
+#  if CONFIG_TLS_NELEM > 32
+#error Too many TLS elements
+#  elif CONFIG_TLS_NELEM > 16
+ typedef uint32_t tls_ndxset_t;
+#  elif CONFIG_TLS_NELEM > 8
+ typedef uint16_t tls_ndxset_t;
+#  else
+ typedef uint8_t tls_ndxset_t;
+#  endif
+
+typedef CODE void (*tls_dtor_t)(FAR void *);
+
+#endif
+
 struct task_info_s
 {
   sem_t   ta_sem;


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4174: Fix nfs and statfs

2021-07-19 Thread GitBox


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


   


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

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

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




[incubator-nuttx] branch master updated (3834e7e -> e5dafc8)

2021-07-19 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 3834e7e  serial: use Ctrl+? composite key to force panic"
 new a3f1abf  fs: nfs: Fix statfs for NFS
 new cfd1c28  fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t
 new e5dafc8  fs: mount: Change the format for df

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


Summary of changes:
 fs/fat/fs_fat32.h  |  2 +-
 fs/fat/fs_fat32util.c  |  2 +-
 fs/mount/fs_procfs_mount.c |  8 +---
 fs/nfs/nfs_proto.h |  1 -
 include/sys/statfs.h   | 16 
 5 files changed, 15 insertions(+), 14 deletions(-)


[incubator-nuttx] 03/03: fs: mount: Change the format for df

2021-07-19 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 e5dafc825d683cb9b3ebfe0c97609600e7c2a34b
Author: Masayuki Ishikawa 
AuthorDate: Mon Jul 19 16:16:52 2021 +0900

fs: mount: Change the format for df

Summary:
- This commit changes the format for df to support big
  storage up to 2TB.

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa 
---
 fs/mount/fs_procfs_mount.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/mount/fs_procfs_mount.c b/fs/mount/fs_procfs_mount.c
index 3a02cb2..6107fb7 100644
--- a/fs/mount/fs_procfs_mount.c
+++ b/fs/mount/fs_procfs_mount.c
@@ -246,14 +246,16 @@ static int blocks_entry(FAR const char *mountpoint,
 
   if (!info->header)
 {
-  mount_sprintf(info, "  Block  Number\n");
-  mount_sprintf(info, "  Size   Blocks Used Available Mounted on\n");
+  mount_sprintf(info,
+"  BlockNumber\n");
+  mount_sprintf(info,
+"  Size Blocks   Used   Available Mounted on\n");
   info->header = true;
 }
 
   /* Generate blocks list one line at a time */
 
-  mount_sprintf(info, "%6ld %8ld %8ld  %8ld %s\n",
+  mount_sprintf(info, "%6lu %10lu %10lu  %10lu %s\n",
 statbuf->f_bsize, statbuf->f_blocks,
 statbuf->f_blocks - statbuf->f_bavail, statbuf->f_bavail,
 mountpoint);


[incubator-nuttx] 01/03: fs: nfs: Fix statfs for NFS

2021-07-19 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 a3f1abfb458ea2adcebc9f4c0d4722847781f863
Author: Masayuki Ishikawa 
AuthorDate: Mon Jul 19 15:58:46 2021 +0900

fs: nfs: Fix statfs for NFS

Summary:
- I noticed that the results of the df command are incorrect for NFS.
- Finally, I found that obj_attributes is not needed to
  communicate with the NFS server on Linux
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa 
---
 fs/nfs/nfs_proto.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/nfs/nfs_proto.h b/fs/nfs/nfs_proto.h
index 5b4a1f9..11d30cd 100644
--- a/fs/nfs/nfs_proto.h
+++ b/fs/nfs/nfs_proto.h
@@ -308,7 +308,6 @@ struct nfsv3_sattr
 struct nfs_statfs
 {
   uint32_t   obj_attributes_follow;
-  struct nfs_fattr   obj_attributes;
   nfsuint64  sf_tbytes;
   nfsuint64  sf_fbytes;
   nfsuint64  sf_abytes;


[incubator-nuttx] 02/03: fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t

2021-07-19 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 cfd1c28606198e1c3f452610b7e6dc87676b498f
Author: Masayuki Ishikawa 
AuthorDate: Mon Jul 19 16:04:01 2021 +0900

fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t

Summary:
- On Linux, fsblkcnt_t and fsfilcnt_t are used in struct statfs
- This commit applies the same logic

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa 
---
 fs/fat/fs_fat32.h |  2 +-
 fs/fat/fs_fat32util.c |  2 +-
 include/sys/statfs.h  | 16 
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/fat/fs_fat32.h b/fs/fat/fs_fat32.h
index 70e958e..d2cf889 100644
--- a/fs/fat/fs_fat32.h
+++ b/fs/fat/fs_fat32.h
@@ -1084,7 +1084,7 @@ EXTERN intfat_ffcacheinvalidate(struct fat_mountpt_s 
*fs,
 EXTERN intfat_updatefsinfo(struct fat_mountpt_s *fs);
 EXTERN intfat_computefreeclusters(struct fat_mountpt_s *fs);
 EXTERN intfat_nfreeclusters(struct fat_mountpt_s *fs,
-off_t *pfreeclusters);
+fsblkcnt_t *pfreeclusters);
 EXTERN intfat_currentsector(struct fat_mountpt_s *fs,
 struct fat_file_s *ff, off_t position);
 
diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c
index d24d8fe..63b15e3 100644
--- a/fs/fat/fs_fat32util.c
+++ b/fs/fat/fs_fat32util.c
@@ -2135,7 +2135,7 @@ int fat_computefreeclusters(struct fat_mountpt_s *fs)
  *
  /
 
-int fat_nfreeclusters(struct fat_mountpt_s *fs, off_t *pfreeclusters)
+int fat_nfreeclusters(struct fat_mountpt_s *fs, fsblkcnt_t *pfreeclusters)
 {
   /* If number of the first free cluster is valid, then just return that
* value.
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index 82c304f..0817e31 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -100,14 +100,14 @@
 
 struct statfs
 {
-  uint32_t f_type; /* Type of filesystem (see definitions above) */
-  size_t   f_namelen;  /* Maximum length of filenames */
-  size_t   f_bsize;/* Optimal block size for transfers */
-  off_tf_blocks;   /* Total data blocks in the file system of this size */
-  off_tf_bfree;/* Free blocks in the file system */
-  off_tf_bavail;   /* Free blocks avail to non-superuser */
-  off_tf_files;/* Total file nodes in the file system */
-  off_tf_ffree;/* Free file nodes in the file system */
+  uint32_t   f_type; /* Type of filesystem (see definitions above) */
+  size_t f_namelen;  /* Maximum length of filenames */
+  size_t f_bsize;/* Optimal block size for transfers */
+  fsblkcnt_t f_blocks;   /* Total data blocks in the file system of this size 
*/
+  fsblkcnt_t f_bfree;/* Free blocks in the file system */
+  fsblkcnt_t f_bavail;   /* Free blocks avail to non-superuser */
+  fsfilcnt_t f_files;/* Total file nodes in the file system */
+  fsfilcnt_t f_ffree;/* Free file nodes in the file system */
 };
 
 /


[incubator-nuttx] branch master updated (7689392 -> 3834e7e)

2021-07-19 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 7689392  author: Zilogic Systems: update licenses to Apache
 add 3834e7e  serial: use Ctrl+? composite key to force panic"

No new revisions were added by this update.

Summary of changes:
 drivers/serial/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4177: serial: use Ctrl+? composite key to force panic"

2021-07-19 Thread GitBox


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


   


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

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

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




[GitHub] [incubator-nuttx] baggio63446333 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

2021-07-19 Thread GitBox


baggio63446333 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-882460932


   @btashton 
   On the advice of @gustavonihei , I have changed this PR to add `-c 
'versionsort.suffix=-'`. Will this PR be accepted? If not, I will close it.


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

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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4175: author: Zilogic Systems: update licenses to Apache

2021-07-19 Thread GitBox


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


   


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

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

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




[incubator-nuttx] branch master updated: author: Zilogic Systems: update licenses to Apache

2021-07-19 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 7689392  author: Zilogic Systems: update licenses to Apache
7689392 is described below

commit 7689392528683bd2620c1724f19b00a58213abb9
Author: Alin Jerpelea 
AuthorDate: Mon Jul 19 10:06:32 2021 +0200

author: Zilogic Systems: update licenses to Apache

Gregory Nutt has submitted the SGA

Zilogic Systems has submitted the SGA

Uniquix Tecnologia has submitted the SGA

Michael Jung has submitted the ICLA

Alan Carvalho de Assis has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea 
---
 .../lpcxpresso-lpc1768/src/lpc17_40_adc.c  | 44 +
 .../lpcxpresso-lpc1768/src/lpc17_40_dac.c  | 44 +
 boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_can.c  | 44 +
 boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_adc.c| 46 +
 boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_dac.c| 46 +
 boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_adc.c | 46 +
 boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_dac.c | 46 +
 boards/arm/lpc17xx_40xx/pnev5180b/include/board.h  | 44 +
 .../arm/lpc17xx_40xx/pnev5180b/scripts/Make.defs   | 45 +
 boards/arm/lpc17xx_40xx/pnev5180b/scripts/flash.ld | 44 +
 .../lpc17xx_40xx/u-blox-c027/src/lpc17_40_adc.c| 46 +
 .../lpc17xx_40xx/u-blox-c027/src/lpc17_40_dac.c| 46 +
 .../arm/lpc17xx_40xx/zkit-arm-1769/include/board.h | 45 +
 .../lpc17xx_40xx/zkit-arm-1769/scripts/Make.defs   | 45 +
 .../lpc17xx_40xx/zkit-arm-1769/scripts/ld.script   | 44 +
 boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_adc.c  | 44 +
 .../zkit-arm-1769/src/lpc17_40_appinit.c   | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c | 44 +
 .../zkit-arm-1769/src/lpc17_40_buttons.c   | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_can.c  | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_dac.c  | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_lcd.c  | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_leds.c | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_spi.c  | 44 +
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_ssp.c  | 44 +
 .../zkit-arm-1769/src/lpc17_40_usbmsc.c| 46 +
 .../lpc17xx_40xx/zkit-arm-1769/src/zkit-arm-1769.h | 44 +
 boards/arm/lpc43xx/lpc4337-ws/src/lpc43_adc.c  | 44 +
 boards/arm/lpc43xx/lpc4370-link2/src/lpc43_adc.c   | 44 +
 .../stm32/stm32f103-minimum/src/stm32_lcd_st7567.c | 46 +
 .../arm/stm32/stm32f4discovery/src/stm32_st7567.c  | 46 +
 drivers/lcd/pcd8544.c  | 53 ++--
 drivers/lcd/st7565.c   | 57 ++
 drivers/lcd/st7565.h   | 48 +-
 drivers/lcd/st7567.c   | 48 ++
 drivers/lcd/st7567.h   | 44 +
 include/nuttx/lcd/st7565.h | 56 ++---
 include/nuttx/lcd/st7567.h | 51 ++-
 39 files changed, 480 insertions(+), 1306 deletions(-)

diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_adc.c 
b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_adc.c
index 56375a9..87183ad 100644
--- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_adc.c
+++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_adc.c
@@ -1,40 +1,20 @@
 /
  * boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_adc.c
  *
- *   Copyright (C) 2013 Zilogic Systems. All rights reserved.
- *   Author: Kannan 
+ * 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
  *
- * Based on boards/stm3220g-eval/src/lpc17_40_adc.c
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *   Copyright (C) 2012, 2014, 2016 

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #808: system/cu: fix setting termios with parity

2021-07-19 Thread GitBox


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


   


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

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

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




[incubator-nuttx-apps] branch master updated: system/cu: fix setting termios with parity

2021-07-19 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 51c778b  system/cu: fix setting termios with parity
51c778b is described below

commit 51c778bc5c92e7f9643758e849e8f09da7d230e1
Author: Oleg 
AuthorDate: Mon Jul 19 11:40:28 2021 +0300

system/cu: fix setting termios with parity

clear only the bits in c_cflag that will be set by cu
---
 system/cu/cu_main.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/system/cu/cu_main.c b/system/cu/cu_main.c
index 54fae73..54edc6c 100644
--- a/system/cu/cu_main.c
+++ b/system/cu/cu_main.c
@@ -146,14 +146,16 @@ static int set_termios(int fd, int rate, enum parity_mode 
parity,
 
   tio = g_tio_dev;
 
+  tio.c_cflag &= ~(PARENB | PARODD | CRTSCTS);
+
   switch (parity)
 {
   case PARITY_EVEN:
-tio.c_cflag = PARENB;
+tio.c_cflag |= PARENB;
 break;
 
   case PARITY_ODD:
-tio.c_cflag = PARENB | PARODD;
+tio.c_cflag |= PARENB | PARODD;
 break;
 
   case PARITY_NONE:


[GitHub] [incubator-nuttx-apps] lukegluke removed a comment on pull request #808: system/cu: fix setting termios with parity

2021-07-19 Thread GitBox


lukegluke removed a comment on pull request #808:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/808#issuecomment-882372301


   It was much easier to fix this here in web github, so can't amend previous 
commit with style fix. Please squash.


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

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

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




[GitHub] [incubator-nuttx-apps] lukegluke commented on pull request #808: system/cu: fix setting termios with parity

2021-07-19 Thread GitBox


lukegluke commented on pull request #808:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/808#issuecomment-882372301


   It was much easier to fix this here in web github, so can't amend previous 
commit with style fix. Please squash.


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

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

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




[GitHub] [incubator-nuttx-apps] lukegluke opened a new pull request #808: system/cu: fix setting termios with parity

2021-07-19 Thread GitBox


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


   Clear only the bits in `c_cflag` that will be set by cu.
   
   Otherwise if even or odd parity is set all other bits of `c_cflag` will be 
cleared.
   Including `CS8` default character size. And this will leads in the end to 
the error `EINVAL` in sanity checks on termios setting in `up_ioctl()` in 
stm32_serial:
   
https://github.com/apache/incubator-nuttx/blob/02a6966ad5de551a9f2adb0f97c21d404170c79b/arch/arm/src/stm32/stm32_serial.c#L2349-L2360
   
   
   


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

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

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




[GitHub] [incubator-nuttx] SunJun8 opened a new pull request #4178: Add BL602 documentation

2021-07-19 Thread GitBox


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


   ## Summary
   Add BL602 documentation
   ## Impact
   
   ## Testing
   
   


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

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

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




[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request #4177: serial: use Ctrl+? composite key to force panic"

2021-07-19 Thread GitBox


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


   
   ## Summary
   
   serial: use Ctrl+? composite key to force panic"
   
   because ctrl+@ ascii is zero, the key is too common, if you send break from 
terminal, then the system crash.
   For the safety, change the default value.
   
   ## Impact
   
   ## Testing
   
   


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

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

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




[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request #4176: ARM: fix CPSR corruption after exception handling

2021-07-19 Thread GitBox


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


   ARM: fix CPSR corruption after exception handling
   
   It seems to be caused by the corrupted or wrong CPSR restored on return
   from exception. NuttX restores the context using code like this:
   
   msr spsr, r1
   
   GCC translates this to:
   
   msr spsr_fc, r1
   
   As a result, not all SPSR fields are updated on exception return. This
   should be:
   
   msr spsr_fsxc, r1
   
   This bug has been fixed by Heesub Shin in:
   343243c7c0de3d0696fa19c08d8d81e8d6cf0a1c
   
   Change-Id: Ibc64db7bceecd0fb6ef39284fb5bc467f5603e2e
   
   ## Summary
   
   ## Impact
   
   ## Testing
   
   


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

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

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




[GitHub] [incubator-nuttx] jerpelea opened a new pull request #4175: author: Zilogic Systems: update licenses to Apache

2021-07-19 Thread GitBox


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


   ## Summary
   
   Gregory Nutt has submitted the SGA
   
   Zilogic Systems has submitted the SGA
   
   Uniquix Tecnologia has submitted the SGA
   
   Michael Jung has submitted the ICLA
   
   Alan Carvalho de Assis has submitted the ICLA
   
   as a result we can migrate the licenses to Apache.
   
   ## Impact
   LICENSE
   
   ## 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.

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

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




[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request #4174: Fix nfs and statfs

2021-07-19 Thread GitBox


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


   ## Summary
   
   - This PR consists of the following 3 commits
   - commit1: fs: nfs: Fix statfs for NFS
 - I noticed that the results of the df command are incorrect for NFS.
 - Finally, I found that obj_attributes is not needed to
 communicate with the NFS server on Linux
 - This commit fixes this issue
   - commit2: fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t
 - On Linux, fsblkcnt_t and fsfilcnt_t are used in struct statfs
 - This commit applies the same logic
   - commit3: fs: mount: Change the format for df
 - This commit changes the format for df to support big
 storage up to 2TB.
   
   ## Impact
   
   - None
   
   ## Testing
   
   - Tested with spresense:rndis_smp (nfs/fat32/smartfs)
   


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

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

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