[GitHub] [incubator-nuttx] donghengqaz opened a new pull request #3735: riscv/esp32c3: Add ESP32-C3 ADC driver

2021-05-16 Thread GitBox


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


   ## Summary
   
   Add ESP32-C3 ADC driver.
   
   It use software triggering mode by `ioctl`.
   
   ## 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] branch master updated: tools/ci: Remove sim01.dat and sim02.dat

2021-05-16 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 b3e1d1c  tools/ci: Remove sim01.dat and sim02.dat
b3e1d1c is described below

commit b3e1d1c3dfc731d7d1d035c6658e3af99e856ef5
Author: Xiang Xiao 
AuthorDate: Mon May 17 02:24:59 2021 +0800

tools/ci: Remove sim01.dat and sim02.dat

Signed-off-by: Xiang Xiao 
---
 .github/workflows/build.yml |  2 +-
 tools/ci/testlist/sim01.dat | 23 ---
 tools/ci/testlist/sim02.dat | 10 --
 3 files changed, 1 insertion(+), 34 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a678126..122d1dc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -159,7 +159,7 @@ jobs:
 needs: Fetch-Source
 strategy:
   matrix:
-boards: [macos, sim01, sim02]
+boards: [macos, sim-01, sim-02]
 steps:
   - name: Download Source Artifact
 uses: actions/download-artifact@v1
diff --git a/tools/ci/testlist/sim01.dat b/tools/ci/testlist/sim01.dat
deleted file mode 100644
index bb9292a..000
--- a/tools/ci/testlist/sim01.dat
+++ /dev/null
@@ -1,23 +0,0 @@
-/sim/*/*/*/[a-n]*
-
-# macOS doesn't have ALSA
--Darwin,sim:alsa
-
--Darwin,sim:cxxtest
--Darwin,sim:libcxxtest
-
-# Do not build Linux configs
--Darwin,sim:linuxi2c
-
-# macOS doesn't support 32bit(CONFIG_SIM_M32=y) anymore
--Darwin,sim:elf
--Darwin,sim:foc
--Darwin,sim:loadable
--Darwin,sim:module32
-
-# macOS doesn't have X11
--Darwin,sim:lvgl
--Darwin,sim:nsh2
--Darwin,sim:nx11
--Darwin,sim:nxlines
--Darwin,sim:nxwm
diff --git a/tools/ci/testlist/sim02.dat b/tools/ci/testlist/sim02.dat
deleted file mode 100644
index 1974acb..000
--- a/tools/ci/testlist/sim02.dat
+++ /dev/null
@@ -1,10 +0,0 @@
-/sim/*/*/*/[o-z]*
-
-# macOS doesn't support 32bit anymore(CONFIG_SIM_M32=y)
--Darwin,sim:posix_spawn
--Darwin,sim:rpproxy
--Darwin,sim:rpserver
--Darwin,sim:sotest32
-
-# macOS doesn't have X11
--Darwin,sim:touchscreen


[GitHub] [incubator-nuttx] btashton merged pull request #3734: tools/ci: Remove sim01.dat and sim02.dat

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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 opened a new pull request #3734: tools/ci: Remove sim01.dat and sim02.dat

2021-05-16 Thread GitBox


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


   ## Summary
   Follow up: https://github.com/apache/incubator-nuttx/pull/3710
   
   ## Impact
   
   ## Testing
   Pass CI
   


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

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




[incubator-nuttx] branch master updated (4a7f998 -> d8ca691)

2021-05-16 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 4a7f998  riscv/esp32c3: Fix RT timer issues
 new bd0e586  boards: sabre-6quad: Add elf/defconfig
 new a036546  boards: sabre-6quad: Add posix_spawn/defconfig
 new d8ca691  boards: sabre-6quad: Add ELF support to netnsh and netnsh_smp

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:
 .../sabre-6quad/configs/{nsh => elf}/defconfig | 29 +++-
 .../arm/imx6/sabre-6quad/configs/netnsh/defconfig  | 10 ++-
 .../imx6/sabre-6quad/configs/netnsh_smp/defconfig  | 10 ++-
 .../configs/{nsh => posix_spawn}/defconfig | 32 ++
 4 files changed, 42 insertions(+), 39 deletions(-)
 copy boards/arm/imx6/sabre-6quad/configs/{nsh => elf}/defconfig (72%)
 copy boards/arm/imx6/sabre-6quad/configs/{nsh => posix_spawn}/defconfig (74%)


[incubator-nuttx] 02/03: boards: sabre-6quad: Add posix_spawn/defconfig

2021-05-16 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 a036546febfb7205f0617c4a96aefdb6244e1a50
Author: Masayuki Ishikawa 
AuthorDate: Mon May 17 09:46:13 2021 +0900

boards: sabre-6quad: Add posix_spawn/defconfig

Summary:
- This commit adds sabre-6quad/configs/posix_spawn/defconfig

Impact:
- None

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa 
---
 .../imx6/sabre-6quad/configs/posix_spawn/defconfig | 62 ++
 1 file changed, 62 insertions(+)

diff --git a/boards/arm/imx6/sabre-6quad/configs/posix_spawn/defconfig 
b/boards/arm/imx6/sabre-6quad/configs/posix_spawn/defconfig
new file mode 100644
index 000..010b729
--- /dev/null
+++ b/boards/arm/imx6/sabre-6quad/configs/posix_spawn/defconfig
@@ -0,0 +1,62 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="sabre-6quad"
+CONFIG_ARCH_BOARD_SABRE_6QUAD=y
+CONFIG_ARCH_BUTTONS=y
+CONFIG_ARCH_CHIP="imx6"
+CONFIG_ARCH_CHIP_IMX6=y
+CONFIG_ARCH_CHIP_IMX6_6QUAD=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQBUTTONS=y
+CONFIG_ARCH_LOWVECTORS=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARMV7A_ASSOCIATIVITY_16WAY=y
+CONFIG_ARMV7A_L2CC_PL310=y
+CONFIG_ARMV7A_WAYSIZE_64KB=y
+CONFIG_BOARDCTL_APP_SYMTAB=y
+CONFIG_BOARDCTL_ROMDISK=y
+CONFIG_BOARD_LOOPSPERMSEC=99369
+CONFIG_BOOT_RUNFROMSDRAM=y
+CONFIG_BUILTIN=y
+CONFIG_CLOCK_MONOTONIC=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DEV_ZERO=y
+CONFIG_ELF=y
+CONFIG_EXAMPLES_POSIXSPAWN=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_FS_PROCFS=y
+CONFIG_FS_PROCFS_REGISTER=y
+CONFIG_FS_ROMFS=y
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+CONFIG_IMX6_UART1=y
+CONFIG_IMX_DDR_SIZE=1073741824
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_EXECFUNCS=y
+CONFIG_LIB_BOARDCTL=y
+CONFIG_LIB_ENVPATH=y
+CONFIG_MAX_TASKS=16
+CONFIG_PATH_INITIAL="/mnt/romfs"
+CONFIG_PL310_LOCKDOWN_BY_LINE=y
+CONFIG_PL310_LOCKDOWN_BY_MASTER=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAM_SIZE=1073741824
+CONFIG_RAM_START=0x1000
+CONFIG_RAM_VSTART=0x1000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_STACK_COLORATION=y
+CONFIG_START_DAY=17
+CONFIG_START_MONTH=5
+CONFIG_START_YEAR=2021
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_UART1_SERIAL_CONSOLE=y
+CONFIG_USER_ENTRYPOINT="posix_spawn_main"


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3733: imx6 elf support

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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/03: boards: sabre-6quad: Add elf/defconfig

2021-05-16 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 bd0e586c23582d5b2fc814bf150e8d95b671f57f
Author: Masayuki Ishikawa 
AuthorDate: Mon May 17 09:41:11 2021 +0900

boards: sabre-6quad: Add elf/defconfig

Summary:
- This commit adds sabre-6quad/configs/elf/defconfig

Impact:
- None

Testing:
-Tested with QEMU

Signed-off-by: Masayuki Ishikawa 
---
 boards/arm/imx6/sabre-6quad/configs/elf/defconfig | 57 +++
 1 file changed, 57 insertions(+)

diff --git a/boards/arm/imx6/sabre-6quad/configs/elf/defconfig 
b/boards/arm/imx6/sabre-6quad/configs/elf/defconfig
new file mode 100644
index 000..e64a483
--- /dev/null
+++ b/boards/arm/imx6/sabre-6quad/configs/elf/defconfig
@@ -0,0 +1,57 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="sabre-6quad"
+CONFIG_ARCH_BOARD_SABRE_6QUAD=y
+CONFIG_ARCH_BUTTONS=y
+CONFIG_ARCH_CHIP="imx6"
+CONFIG_ARCH_CHIP_IMX6=y
+CONFIG_ARCH_CHIP_IMX6_6QUAD=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_IRQBUTTONS=y
+CONFIG_ARCH_LOWVECTORS=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_ARMV7A_ASSOCIATIVITY_16WAY=y
+CONFIG_ARMV7A_L2CC_PL310=y
+CONFIG_ARMV7A_WAYSIZE_64KB=y
+CONFIG_BOARDCTL_ROMDISK=y
+CONFIG_BOARD_LOOPSPERMSEC=99369
+CONFIG_BOOT_RUNFROMSDRAM=y
+CONFIG_BUILTIN=y
+CONFIG_CLOCK_MONOTONIC=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DEV_ZERO=y
+CONFIG_ELF=y
+CONFIG_EXAMPLES_ELF=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_FS_PROCFS=y
+CONFIG_FS_PROCFS_REGISTER=y
+CONFIG_FS_ROMFS=y
+CONFIG_HAVE_CXX=y
+CONFIG_IMX6_UART1=y
+CONFIG_IMX_DDR_SIZE=1073741824
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LIB_BOARDCTL=y
+CONFIG_MAX_TASKS=16
+CONFIG_PL310_LOCKDOWN_BY_LINE=y
+CONFIG_PL310_LOCKDOWN_BY_MASTER=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAM_SIZE=1073741824
+CONFIG_RAM_START=0x1000
+CONFIG_RAM_VSTART=0x1000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_STACK_COLORATION=y
+CONFIG_START_DAY=17
+CONFIG_START_MONTH=5
+CONFIG_START_YEAR=2021
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_UART1_SERIAL_CONSOLE=y
+CONFIG_USER_ENTRYPOINT="elf_main"


[incubator-nuttx] 03/03: boards: sabre-6quad: Add ELF support to netnsh and netnsh_smp

2021-05-16 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 d8ca691e2a18a82054642b52f66beb7a8b8f58bc
Author: Masayuki Ishikawa 
AuthorDate: Mon May 17 09:57:57 2021 +0900

boards: sabre-6quad: Add ELF support to netnsh and netnsh_smp

Summary:
- This commit adds ELF support to netnsh and netnsh_smp

Impact:
- None

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa 
---
 boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig | 10 +-
 boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig | 10 +-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig 
b/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig
index 8f5a3d4..b4b72fb 100644
--- a/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig
+++ b/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig
@@ -25,8 +25,9 @@ CONFIG_CODECS_HASH_MD5=y
 CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
+CONFIG_ELF=y
 CONFIG_ETH0_PHY_KSZ8081=y
-CONFIG_EXAMPLES_HELLO=y
+CONFIG_EXAMPLES_HELLO=m
 CONFIG_EXAMPLES_TCPBLASTER=y
 CONFIG_EXAMPLES_TCPBLASTER_GROUPSIZE=500
 CONFIG_EXAMPLES_TCPBLASTER_SERVER=y
@@ -41,6 +42,8 @@ CONFIG_IMX6_UART1=y
 CONFIG_IMX_DDR_SIZE=1073741824
 CONFIG_IMX_ENET_NTXBUFFERS=1
 CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_EXECFUNCS=y
+CONFIG_LIB_ENVPATH=y
 CONFIG_MAX_TASKS=16
 CONFIG_NET=y
 CONFIG_NETDB_DNSCLIENT=y
@@ -69,6 +72,7 @@ CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
+CONFIG_PATH_INITIAL="/mnt/nfs/bin"
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=1073741824
 CONFIG_RAM_START=0x1000
@@ -87,8 +91,12 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y
 CONFIG_SYSLOG_TIMESTAMP=y
 CONFIG_SYSTEM_DHCPC_RENEW=y
 CONFIG_SYSTEM_NSH=y
+CONFIG_SYSTEM_NSH_SYMTAB=y
+CONFIG_SYSTEM_NSH_SYMTAB_ARRAYNAME="g_symtab"
+CONFIG_SYSTEM_NSH_SYMTAB_COUNTNAME="g_nsymbols"
 CONFIG_SYSTEM_PING=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
 CONFIG_UART1_SERIAL_CONSOLE=y
+CONFIG_USERMAIN_STACKSIZE=3072
 CONFIG_USER_ENTRYPOINT="nsh_main"
diff --git a/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig 
b/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig
index 11f4484..0d33db9 100644
--- a/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig
+++ b/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig
@@ -25,8 +25,9 @@ CONFIG_CODECS_HASH_MD5=y
 CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
+CONFIG_ELF=y
 CONFIG_ETH0_PHY_KSZ8081=y
-CONFIG_EXAMPLES_HELLO=y
+CONFIG_EXAMPLES_HELLO=m
 CONFIG_EXAMPLES_TCPBLASTER=y
 CONFIG_EXAMPLES_TCPBLASTER_GROUPSIZE=500
 CONFIG_EXAMPLES_TCPBLASTER_SERVER=y
@@ -41,6 +42,8 @@ CONFIG_IMX6_UART1=y
 CONFIG_IMX_DDR_SIZE=1073741824
 CONFIG_IMX_ENET_NTXBUFFERS=1
 CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_EXECFUNCS=y
+CONFIG_LIB_ENVPATH=y
 CONFIG_NET=y
 CONFIG_NETDB_DNSCLIENT=y
 CONFIG_NETDB_DNSCLIENT_ENTRIES=4
@@ -68,6 +71,7 @@ CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
+CONFIG_PATH_INITIAL="/mnt/nfs/bin"
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=1073741824
 CONFIG_RAM_START=0x1000
@@ -86,6 +90,9 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y
 CONFIG_SYSLOG_TIMESTAMP=y
 CONFIG_SYSTEM_DHCPC_RENEW=y
 CONFIG_SYSTEM_NSH=y
+CONFIG_SYSTEM_NSH_SYMTAB=y
+CONFIG_SYSTEM_NSH_SYMTAB_ARRAYNAME="g_symtab"
+CONFIG_SYSTEM_NSH_SYMTAB_COUNTNAME="g_nsymbols"
 CONFIG_SYSTEM_PING=y
 CONFIG_SYSTEM_SYSTEM=y
 CONFIG_SYSTEM_TASKSET=y
@@ -93,4 +100,5 @@ CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
 CONFIG_TESTING_SMP=y
 CONFIG_UART1_SERIAL_CONSOLE=y
+CONFIG_USERMAIN_STACKSIZE=3072
 CONFIG_USER_ENTRYPOINT="nsh_main"


[GitHub] [incubator-nuttx] Donny9 commented on pull request #3718: sched/init: don't check remain stack for idle task

2021-05-16 Thread GitBox


Donny9 commented on pull request #3718:
URL: https://github.com/apache/incubator-nuttx/pull/3718#issuecomment-841943374


   > Ah I see, could we create a Kconfig that is set for arch that do colorize 
the idle stack correctly with the idea that eventually it can go away?
   
   ok.


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

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




[GitHub] [incubator-nuttx-apps] tanushreebaindur commented on a change in pull request #716: Apps Issue #246:Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-16 Thread GitBox


tanushreebaindur commented on a change in pull request #716:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/716#discussion_r633169701



##
File path: examples/thttpd/thttpd_main.c
##
@@ -252,12 +259,18 @@ int main(int argc, FAR char *argv[])
 
   netlib_ifup("eth0");
 
+#ifdef CONFIG_THTTPD_NXFLAT

Review comment:
   I first submitted the changes without the guard CONFIG_THTTPD_NXFLAT. 
The build broke with the error: unused variable 'desc'. This is the link for 
the build break: 
https://github.com/apache/incubator-nuttx-apps/runs/2581333837?check_suite_focus=true
   
   Also, originally in the code there is a check to see if CONFIG_FS_ROMFS is 
enabled (line 91) if  CONFIG_THTTPD_NXFLAT is defined (line 86). For this 
reason I added the guard CONFIG_THTTPD_NXFLAT  before registering romdisk.
   




-- 
This is an automated message from the 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] masayuki2009 opened a new pull request #3733: imx6 elf support

2021-05-16 Thread GitBox


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


   ## Summary
   
   - This PR consists of the following commits
   - commit 1: boards: sabre-6quad: Add elf/defconfig
   - commit 2: boards: sabre-6quad: Add posix_spawn/defconfig
   - commit 3: boards: sabre-6quad: Add ELF support to netnsh and netnsh_smp
   
   ## Impact
   
   - None
   
   ## Testing
   
   - Tested 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




[incubator-nuttx-website] branch asf-site updated: Publishing web: 1a68dd3405cfbf4f87c58d8ba31efe69f551d462 docs: 4a7f998c335fa948ad9f940dd68d41b5bc8ff6e8

2021-05-16 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 6789c12  Publishing web: 1a68dd3405cfbf4f87c58d8ba31efe69f551d462 
docs: 4a7f998c335fa948ad9f940dd68d41b5bc8ff6e8
6789c12 is described below

commit 6789c1247ddb8bcdc32111db812d0211798c08e2
Author: Brennan 
AuthorDate: Mon May 17 00:43:31 2021 +

Publishing web: 1a68dd3405cfbf4f87c58d8ba31efe69f551d462 docs: 
4a7f998c335fa948ad9f940dd68d41b5bc8ff6e8
---
 content/docs/10.0.0/index.html | 2 +-
 content/docs/10.0.1/index.html | 2 +-
 content/docs/latest/index.html | 2 +-
 content/feed.xml   | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html
index b65abeb..c477065 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: 16 May 21 at 00:45
+Last Updated: 17 May 21 at 00:40
 
 Table of Contents
 
diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html
index 32e788f..de4 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: 16 May 21 at 00:45
+Last Updated: 17 May 21 at 00:41
 
 Table of Contents
 
diff --git a/content/docs/latest/index.html b/content/docs/latest/index.html
index fa7d4b6..02a45cb 100644
--- a/content/docs/latest/index.html
+++ b/content/docs/latest/index.html
@@ -212,7 +212,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: 16 May 21 at 00:45
+Last Updated: 17 May 21 at 00:41
 
 Table of Contents
 
diff --git a/content/feed.xml b/content/feed.xml
index 7a65b4e..e525462 100644
--- a/content/feed.xml
+++ b/content/feed.xml
@@ -5,8 +5,8 @@
 
 /
 
-Sun, 16 May 2021 00:47:14 +
-Sun, 16 May 2021 00:47:14 +
+Mon, 17 May 2021 00:43:29 +
+Mon, 17 May 2021 00:43:29 +
 Jekyll v3.8.5
 
   


[GitHub] [incubator-nuttx-apps] yamt commented on pull request #695: webclient: Implement non-blocking I/O

2021-05-16 Thread GitBox


yamt commented on pull request #695:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/695#issuecomment-841904553


   the last push was a conflict resolution.


-- 
This is an automated message from the 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] Ouss4 merged pull request #718: ci: change sim01 and sim02 to sim-01 and sim-02

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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: ci: change sim01 and sim02 to sim-01 and sim-02

2021-05-16 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-apps.git


The following commit(s) were added to refs/heads/master by this push:
 new b7e9c43  ci: change sim01 and sim02 to sim-01 and sim-02
b7e9c43 is described below

commit b7e9c434891611f0f0d0b2ea683bf4043e629107
Author: Xiang Xiao 
AuthorDate: Mon May 17 01:57:00 2021 +0800

ci: change sim01 and sim02 to sim-01 and sim-02

follow up the kernel side chnage:
commit 09a0ed111c0c193a57b2a538e23c2b6a6e9cdf26
Author: Xiang Xiao 
Date:   Thu May 13 21:28:43 2021 +0800

tools/ci: Rename sim0x.dat to sim-0x.dat to align with arm-xx.dat

To avoid the build break sim0x.dat will remove in the upcoming patch

Signed-off-by: Xiang Xiao 
---
 .github/workflows/build.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1386f90..4969492 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -110,7 +110,7 @@ jobs:
 
 strategy:
   matrix:
-boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, 
arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, other, risc-v, sim01, sim02, 
xtensa]
+boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, 
arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, other, risc-v, sim-01, sim-02, 
xtensa]
 
 steps:
   - name: Download Source Artifact
@@ -155,7 +155,7 @@ jobs:
 needs: Fetch-Source
 strategy:
   matrix:
-boards: [macos, sim01, sim02]
+boards: [macos, sim-01, sim-02]
 steps:
   - name: Download Source Artifact
 uses: actions/download-artifact@v1


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #716: Apps Issue #246:Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-16 Thread GitBox


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



##
File path: examples/thttpd/thttpd_main.c
##
@@ -252,12 +259,18 @@ int main(int argc, FAR char *argv[])
 
   netlib_ifup("eth0");
 
+#ifdef CONFIG_THTTPD_NXFLAT

Review comment:
   why do we need guard romfs_img registery by CONFIG_THTTPD_NXFLAT?




-- 
This is an automated message from the 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 #3697: riscv/esp32c3: Fix RT timer issues

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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: riscv/esp32c3: Fix RT timer issues

2021-05-16 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 4a7f998  riscv/esp32c3: Fix RT timer issues
4a7f998 is described below

commit 4a7f998c335fa948ad9f940dd68d41b5bc8ff6e8
Author: Dong Heng 
AuthorDate: Wed May 12 10:28:24 2021 +0800

riscv/esp32c3: Fix RT timer issues

1. Enable alarm if there is timer active
2. Wake up main thread to delete timer
3. Wake up main thread when timer is timeout in ISR
---
 arch/risc-v/src/esp32c3/esp32c3_rt_timer.c | 32 +-
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/esp32c3_rt_timer.c 
b/arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
index 4320d73..2d624b9 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_rt_timer.c
@@ -253,6 +253,7 @@ static void stop_rt_timer(FAR struct rt_timer_s *timer)
 
 static void delete_rt_timer(FAR struct rt_timer_s *timer)
 {
+  int ret;
   irqstate_t flags;
 
   flags = enter_critical_section();
@@ -273,6 +274,14 @@ static void delete_rt_timer(FAR struct rt_timer_s *timer)
   list_add_after(_toutlist, >list);
   timer->state = RT_TIMER_DELETE;
 
+  /* Wake up thread to process deleted timers */
+
+  ret = nxsem_post(_toutsem);
+  if (ret < 0)
+{
+  tmrerr("ERROR: Failed to post sem ret=%d\n", ret);
+}
+
 exit:
   leave_critical_section(flags);
 }
@@ -387,20 +396,18 @@ static int rt_timer_thread(int argc, FAR char *argv[])
 
 static int rt_timer_isr(int irq, void *context, void *arg)
 {
+  int ret;
   irqstate_t flags;
   struct rt_timer_s *timer;
   uint64_t alarm;
   uint64_t counter;
+  bool wake = false;
   struct esp32c3_tim_dev_s *tim = s_esp32c3_tim_dev;
 
   /* Clear interrupt register status */
 
   ESP32C3_TIM_ACKINT(tim);
 
-  /* Wake up thread to process timeout timers */
-
-  nxsem_post(_toutsem);
-
   flags = enter_critical_section();
 
   /* Check if there is timer running */
@@ -428,6 +435,7 @@ static int rt_timer_isr(int irq, void *context, void *arg)
   list_delete(>list);
   timer->state = RT_TIMER_TIMEOUT;
   list_add_after(_toutlist, >list);
+  wake = true;
 
   /* Check if thers is timer running */
 
@@ -439,9 +447,23 @@ static int rt_timer_isr(int irq, void *context, void *arg)
   alarm = timer->alarm;
 
   ESP32C3_TIM_SETALRVL(tim, alarm);
-  ESP32C3_TIM_SETALRM(tim, true);
 }
 }
+
+  /* If there is timer in list, alarm should be enable */
+
+  ESP32C3_TIM_SETALRM(tim, true);
+}
+
+  if (wake)
+{
+  /* Wake up thread to process timeout timers */
+
+  ret = nxsem_post(_toutsem);
+  if (ret < 0)
+{
+  tmrerr("ERROR: Failed to post sem ret=%d\n", ret);
+}
 }
 
   leave_critical_section(flags);


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3731: stm32/stm32f7 tickless: Fix up_timer_getmask to be correct for the width of the timer.

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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 (4c74f46 -> fa2b9ca)

2021-05-16 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 4c74f46  Add basic support for MCP23017 I/O Expander
 add fa2b9ca  stm32/stm32f7 tickless: Fix up_timer_getmask to be correct 
for the width of the timer.

No new revisions were added by this update.

Summary of changes:
 arch/arm/src/stm32/stm32_tickless.c   | 16 +---
 arch/arm/src/stm32f7/stm32_tickless.c | 16 +---
 2 files changed, 10 insertions(+), 22 deletions(-)


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 opened a new pull request #718: ci: change sim01 and sim02 to sim-01 and sim-02

2021-05-16 Thread GitBox


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


   ## Summary
   follow up the kernel side chnage:
   ```
   commit 09a0ed111c0c193a57b2a538e23c2b6a6e9cdf26
   Author: Xiang Xiao 
   Date:   Thu May 13 21:28:43 2021 +0800
   
   tools/ci: Rename sim0x.dat to sim-0x.dat to align with arm-xx.dat
   
   To avoid the build break sim0x.dat will remove in the upcoming patch
   ```
   
   ## 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




[GitHub] [incubator-nuttx] Ouss4 commented on pull request #3710: tools/ci: Rename sim0x.dat to sim-0x.dat to align with arm-xx.dat

2021-05-16 Thread GitBox


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


   Sorry for the delay @xiaoxiang781216.  Thanks for the merge @btashton.


-- 
This is an automated message from the 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 (09a0ed1 -> 4c74f46)

2021-05-16 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 09a0ed1  tools/ci: Rename sim0x.dat to sim-0x.dat to align with 
arm-xx.dat
 add 4c74f46  Add basic support for MCP23017 I/O Expander

No new revisions were added by this update.

Summary of changes:
 drivers/ioexpander/Kconfig |  44 ++
 drivers/ioexpander/Make.defs   |   4 +
 drivers/ioexpander/{pca9555.c => mcp23x17.c}   | 469 +++--
 drivers/ioexpander/mcp23x17.h  | 175 
 include/nuttx/ioexpander/{pca9538.h => mcp23x17.h} |  45 +-
 5 files changed, 481 insertions(+), 256 deletions(-)
 copy drivers/ioexpander/{pca9555.c => mcp23x17.c} (61%)
 create mode 100644 drivers/ioexpander/mcp23x17.h
 copy include/nuttx/ioexpander/{pca9538.h => mcp23x17.h} (70%)


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3727: Add basic support for MCP23017 I/O Expander

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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 #3718: sched/init: don't check remain stack for idle task

2021-05-16 Thread GitBox


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


   Ah I see, could we create a Kconfig that is set for arch that do colorize 
the idle stack correctly with the idea that eventually it can go away?


-- 
This is an automated message from the 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 merged pull request #3710: tools/ci: Rename sim0x.dat to sim-0x.dat to align with arm-xx.dat

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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 (4a2d4c1 -> 09a0ed1)

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

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


from 4a2d4c1  board/circuit-express: Add usbnsh configuration
 add 09a0ed1  tools/ci: Rename sim0x.dat to sim-0x.dat to align with 
arm-xx.dat

No new revisions were added by this update.

Summary of changes:
 .github/workflows/build.yml | 2 +-
 tools/ci/testlist/{sim01.dat => sim-01.dat} | 0
 tools/ci/testlist/{sim02.dat => sim-02.dat} | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 copy tools/ci/testlist/{sim01.dat => sim-01.dat} (100%)
 copy tools/ci/testlist/{sim02.dat => sim-02.dat} (100%)


[GitHub] [incubator-nuttx] btashton commented on pull request #3710: tools/ci: Rename sim0x.dat to sim-0x.dat to align with arm-xx.dat

2021-05-16 Thread GitBox


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


   Ah I see you just added them. Understood I'll merge this 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.

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




[GitHub] [incubator-nuttx] btashton commented on pull request #3710: tools/ci: Rename sim0x.dat to sim-0x.dat to align with arm-xx.dat

2021-05-16 Thread GitBox


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


   @xiaoxiang781216 if you can put the app one up shortly I'll merge them 
directly to keep the breakage minimal. 


-- 
This is an automated message from the 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 #3710: tools/ci: Rename sim0x.dat to sim-0x.dat to align with arm-xx.dat

2021-05-16 Thread GitBox


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


   @Ouss4 I am waiting for this patch merging first, otherwise the patch in 
apps will always fail.


-- 
This is an automated message from the 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 #3718: sched/init: don't check remain stack for idle task

2021-05-16 Thread GitBox


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


   It isn't only for sim, but many soc doesn't setup idle thread stack color 
correctly: https://github.com/apache/incubator-nuttx/issues/1769


-- 
This is an automated message from the 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] antmerlino commented on a change in pull request #3730: stm32h7 rcc: Sync h7x7xx and h7x3xx. Changes are relevant to both

2021-05-16 Thread GitBox


antmerlino commented on a change in pull request #3730:
URL: https://github.com/apache/incubator-nuttx/pull/3730#discussion_r633103855



##
File path: arch/arm/src/stm32h7/stm32h7x3xx_rcc.c
##
@@ -473,6 +479,18 @@ static inline void rcc_enableapb2(void)
   regval |= RCC_APB2ENR_SPI5EN;
 #endif
 
+#ifdef CONFIG_STM32H7_USART1
+  /* USART1 clock enable */
+
+  regval |= RCC_APB2ENR_USART1EN;
+#endif
+
+#ifdef CONFIG_STM32H7_USART6
+  /* USART1 clock enable */

Review comment:
   Fixed.




-- 
This is an automated message from the 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] antmerlino commented on a change in pull request #3730: stm32h7 rcc: Sync h7x7xx and h7x3xx. Changes are relevant to both

2021-05-16 Thread GitBox


antmerlino commented on a change in pull request #3730:
URL: https://github.com/apache/incubator-nuttx/pull/3730#discussion_r633103567



##
File path: arch/arm/src/stm32h7/stm32h7x7xx_rcc.c
##
@@ -826,8 +830,6 @@ void stm32_stdclockconfig(void)
   regval |= STM32_PWR_CR3_LDOEN | STM32_PWR_CR3_LDOESCUEN;
   putreg32(regval, STM32_PWR_CR3);
 
-#if 0

Review comment:
   So I _think_ that the change directly below this was the reason it 
wasn't working. @davids5 fixed this in stm32h7x3xx_rcc.c after this was blocked 
out. 
   
   
https://github.com/apache/incubator-nuttx/pull/3730/files#diff-60aa753b9f6076921466b4eda3676f762ea547fd270a563d5ca10b0d39204ef5R844
   
   But yes, it would be good if you can validate this on hardware that you 
think once had the issue. 




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

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




[GitHub] [incubator-nuttx] antmerlino commented on a change in pull request #3729: stm32 timers: Prefer GTIM macros and make this use more uniform.

2021-05-16 Thread GitBox


antmerlino commented on a change in pull request #3729:
URL: https://github.com/apache/incubator-nuttx/pull/3729#discussion_r633103142



##
File path: arch/arm/src/stm32/stm32_tickless.c
##
@@ -267,7 +268,7 @@ static int stm32_tickless_setchannel(uint8_t channel)
 
   /* Set polarity */
 
-  ccer_val |= ATIM_CCER_CC1P << (channel << 2);
+  ccer_val |= ATIM_CCER_CC1P << GTIM_CCER_CCXBASE(channel);

Review comment:
   @btashton I just pushed an update to replace even more ATIM_/BTIM_ 
macros with GTIM_ macros for consistency. There are now no uses of BTIM_ macros 
in the codebase - which makes sense since all our drivers focus on General 
timer implementation with some extended features for Advanced timers. I've left 
the use of ATIM_ anywhere we were actually meaning to use advanced features.
   
   I'm sure I missed some things.




-- 
This is an automated message from the 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] 02/02: board/circuit-express: Add usbnsh configuration

2021-05-16 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

commit 4a2d4c1950e6c111daf1cf2932239547196a4d11
Author: Brennan Ashton 
AuthorDate: Sat May 15 23:45:48 2021 -0700

board/circuit-express: Add usbnsh configuration
---
 .../circuit-express/configs/usbnsh/defconfig   | 66 
 boards/arm/samd2l2/circuit-express/include/board.h | 14 
 boards/arm/samd2l2/circuit-express/src/Makefile|  4 +
 boards/arm/samd2l2/circuit-express/src/sam_usb.c   | 87 ++
 4 files changed, 171 insertions(+)

diff --git a/boards/arm/samd2l2/circuit-express/configs/usbnsh/defconfig 
b/boards/arm/samd2l2/circuit-express/configs/usbnsh/defconfig
new file mode 100644
index 000..b612d05
--- /dev/null
+++ b/boards/arm/samd2l2/circuit-express/configs/usbnsh/defconfig
@@ -0,0 +1,66 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_NSH_DISABLEBG is not set
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLE_CMP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_ITEF is not set
+# CONFIG_NSH_DISABLE_LOOPS is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_SEMICOLON is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="circuit-express"
+CONFIG_ARCH_BOARD_CIRCUIT_EXPRESS=y
+CONFIG_ARCH_CHIP="samd2l2"
+CONFIG_ARCH_CHIP_SAMD21G18A=y
+CONFIG_ARCH_CHIP_SAMD2X=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=3410
+CONFIG_BUILTIN=y
+CONFIG_CDCACM=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DEFAULT_SMALL=y
+CONFIG_MAX_TASKS=16
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_USBCONSOLE=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_PTHREAD_STACK_DEFAULT=1536
+CONFIG_RAM_SIZE=32768
+CONFIG_RAM_START=0x2000
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SAMD2L2_SERCOM4=y
+CONFIG_SAMD2L2_USB=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_SDCLONE_DISABLE=y
+CONFIG_STACK_COLORATION=y
+CONFIG_START_DAY=21
+CONFIG_START_MONTH=6
+CONFIG_START_YEAR=2015
+CONFIG_SYSTEM_NSH=y
+CONFIG_TASK_NAME_SIZE=0
+CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
+CONFIG_USART4_RXBUFSIZE=64
+CONFIG_USART4_SERIAL_CONSOLE=y
+CONFIG_USART4_TXBUFSIZE=64
+CONFIG_USBDEV=y
+CONFIG_USERMAIN_STACKSIZE=1536
+CONFIG_USER_ENTRYPOINT="nsh_main"
diff --git a/boards/arm/samd2l2/circuit-express/include/board.h 
b/boards/arm/samd2l2/circuit-express/include/board.h
index 884c305..f55fc80 100644
--- a/boards/arm/samd2l2/circuit-express/include/board.h
+++ b/boards/arm/samd2l2/circuit-express/include/board.h
@@ -349,6 +349,20 @@
 
 #define BOARD_SERCOM4_FREQUENCY  BOARD_GCLK0_FREQUENCY
 
+/* USB definitions **/
+
+/* This is the source clock generator for the GCLK_USB clock
+ */
+
+#define BOARD_USB_GCLKGEN0
+#define BOARD_USB_FREQUENCY  BOARD_GCLK0_FREQUENCY
+
+/* default USB Pad calibration (not used yet by USB driver) */
+
+#define BOARD_USB_PADCAL_P   29
+#define BOARD_USB_PADCAL_N   5
+#define BOARD_USB_PADCAL_TRIM3
+
 /* LED definitions **/
 
 /* There are 2 LEDs on board the Adafruit Circuit Express board in addition
diff --git a/boards/arm/samd2l2/circuit-express/src/Makefile 
b/boards/arm/samd2l2/circuit-express/src/Makefile
index 8024baf..e210f70 100644
--- a/boards/arm/samd2l2/circuit-express/src/Makefile
+++ b/boards/arm/samd2l2/circuit-express/src/Makefile
@@ -34,4 +34,8 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y)
 CSRCS += sam_appinit.c
 endif
 
+ifeq ($(CONFIG_USBDEV),y)
+CSRCS += sam_usb.c
+endif
+
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/samd2l2/circuit-express/src/sam_usb.c 
b/boards/arm/samd2l2/circuit-express/src/sam_usb.c
new file mode 100644
index 000..eed0eca
--- /dev/null
+++ b/boards/arm/samd2l2/circuit-express/src/sam_usb.c
@@ -0,0 +1,87 @@
+/
+ * boards/arm/samd2l2/circuit-express/src/sam_usb.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 

[GitHub] [incubator-nuttx] acassis merged pull request #3732: board: Add support for Adafruit Circuit Express

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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 (a81166a -> 4a2d4c1)

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

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


from a81166a  Update libcxx to 12.0.0 release
 new 2972e70  board: Add support for Adafruit Circuit Express
 new 4a2d4c1  board/circuit-express: Add usbnsh configuration

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:
 boards/Kconfig |  12 +
 boards/arm/samd2l2/circuit-express/Kconfig |   9 +
 .../samd2l2/circuit-express/configs/nsh/defconfig  |  64 
 .../circuit-express/configs/usbnsh/defconfig   |  66 
 boards/arm/samd2l2/circuit-express/include/board.h | 410 +
 .../arm/samd2l2/circuit-express/scripts/Make.defs  |  63 
 .../arm/samd2l2/circuit-express/scripts/flash.ld   | 111 ++
 boards/arm/samd2l2/circuit-express/src/Makefile|  41 +++
 .../samd2l2/circuit-express/src/circuit_express.h  | 102 +
 .../arm/samd2l2/circuit-express/src/sam_appinit.c  |  71 
 .../arm/samd2l2/circuit-express/src/sam_autoleds.c | 138 +++
 boards/arm/samd2l2/circuit-express/src/sam_boot.c  |  86 +
 .../arm/samd2l2/circuit-express/src/sam_bringup.c  |  60 +++
 boards/arm/samd2l2/circuit-express/src/sam_usb.c   |  87 +
 14 files changed, 1320 insertions(+)
 create mode 100644 boards/arm/samd2l2/circuit-express/Kconfig
 create mode 100644 boards/arm/samd2l2/circuit-express/configs/nsh/defconfig
 create mode 100644 boards/arm/samd2l2/circuit-express/configs/usbnsh/defconfig
 create mode 100644 boards/arm/samd2l2/circuit-express/include/board.h
 create mode 100644 boards/arm/samd2l2/circuit-express/scripts/Make.defs
 create mode 100644 boards/arm/samd2l2/circuit-express/scripts/flash.ld
 create mode 100644 boards/arm/samd2l2/circuit-express/src/Makefile
 create mode 100644 boards/arm/samd2l2/circuit-express/src/circuit_express.h
 create mode 100644 boards/arm/samd2l2/circuit-express/src/sam_appinit.c
 create mode 100644 boards/arm/samd2l2/circuit-express/src/sam_autoleds.c
 create mode 100644 boards/arm/samd2l2/circuit-express/src/sam_boot.c
 create mode 100644 boards/arm/samd2l2/circuit-express/src/sam_bringup.c
 create mode 100644 boards/arm/samd2l2/circuit-express/src/sam_usb.c


[incubator-nuttx] 01/02: board: Add support for Adafruit Circuit Express

2021-05-16 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

commit 2972e7015ec6a3748eedd807b902580387d0fd86
Author: Brennan Ashton 
AuthorDate: Sat May 15 22:34:10 2021 -0700

board: Add support for Adafruit Circuit Express
---
 boards/Kconfig |  12 +
 boards/arm/samd2l2/circuit-express/Kconfig |   9 +
 .../samd2l2/circuit-express/configs/nsh/defconfig  |  64 
 boards/arm/samd2l2/circuit-express/include/board.h | 396 +
 .../arm/samd2l2/circuit-express/scripts/Make.defs  |  63 
 .../arm/samd2l2/circuit-express/scripts/flash.ld   | 111 ++
 boards/arm/samd2l2/circuit-express/src/Makefile|  37 ++
 .../samd2l2/circuit-express/src/circuit_express.h  | 102 ++
 .../arm/samd2l2/circuit-express/src/sam_appinit.c  |  71 
 .../arm/samd2l2/circuit-express/src/sam_autoleds.c | 138 +++
 boards/arm/samd2l2/circuit-express/src/sam_boot.c  |  86 +
 .../arm/samd2l2/circuit-express/src/sam_bringup.c  |  60 
 12 files changed, 1149 insertions(+)

diff --git a/boards/Kconfig b/boards/Kconfig
index 643ccaa..de620b1 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -92,6 +92,14 @@ config ARCH_BOARD_C5471EVM
NuttX runs on the ARM core and is built with a GNU 
arm-nuttx-elf toolchain*.
This port is complete and verified.
 
+config ARCH_BOARD_CIRCUIT_EXPRESS
+   bool "Adafruit Circuit Express"
+   depends on ARCH_CHIP_SAMD21G18A
+   select ARCH_HAVE_LEDS
+   ---help---
+   This options selects the Adafruit Circuit Express board 
featuring the Atmel
+   ATSAMD21 MCU.
+
 config ARCH_BOARD_CLICKER2_STM32
bool "Mikroe Clicker2 STM32"
depends on ARCH_CHIP_STM32F407VG
@@ -2261,6 +2269,7 @@ config ARCH_BOARD
default "bambino-200e" if ARCH_BOARD_BAMBINO_200E
default "bl602evb" if ARCH_BOARD_BL602EVB
default "c5471evm" if ARCH_BOARD_C5471EVM
+   default "circuit-express"  if ARCH_BOARD_CIRCUIT_EXPRESS
default "clicker2-stm32"   if ARCH_BOARD_CLICKER2_STM32
default "cloudctrl"if ARCH_BOARD_CLOUDCTRL
default "demo9s12ne64" if ARCH_BOARD_DEMOS92S12NEC64
@@ -2713,6 +2722,9 @@ endif
 if ARCH_BOARD_ARDUINO_M0
 source "boards/arm/samd2l2/arduino-m0/Kconfig"
 endif
+if ARCH_BOARD_CIRCUIT_EXPRESS
+source "boards/arm/samd2l2/circuit-express/Kconfig"
+endif
 if ARCH_BOARD_FLIPNCLICK_SAM3X
 source "boards/arm/sam34/flipnclick-sam3x/Kconfig"
 endif
diff --git a/boards/arm/samd2l2/circuit-express/Kconfig 
b/boards/arm/samd2l2/circuit-express/Kconfig
new file mode 100644
index 000..4570cae
--- /dev/null
+++ b/boards/arm/samd2l2/circuit-express/Kconfig
@@ -0,0 +1,9 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_CIRCUIT_EXPRESS
+
+endif
+
diff --git a/boards/arm/samd2l2/circuit-express/configs/nsh/defconfig 
b/boards/arm/samd2l2/circuit-express/configs/nsh/defconfig
new file mode 100644
index 000..9efe3d5
--- /dev/null
+++ b/boards/arm/samd2l2/circuit-express/configs/nsh/defconfig
@@ -0,0 +1,64 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_NSH_DISABLEBG is not set
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLE_CMP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_ITEF is not set
+# CONFIG_NSH_DISABLE_LOOPS is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_SEMICOLON is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="circuit-express"
+CONFIG_ARCH_BOARD_CIRCUIT_EXPRESS=y
+CONFIG_ARCH_CHIP="samd2l2"
+CONFIG_ARCH_CHIP_SAMD21G18A=y
+CONFIG_ARCH_CHIP_SAMD2X=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=3410
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_ERROR=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DEBUG_WARN=y
+CONFIG_DEFAULT_SMALL=y
+CONFIG_MAX_TASKS=16
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_PTHREAD_STACK_DEFAULT=1536
+CONFIG_RAM_SIZE=32768
+CONFIG_RAM_START=0x2000
+CONFIG_RR_INTERVAL=200
+CONFIG_SAMD2L2_SERCOM4=y

[GitHub] [incubator-nuttx-apps] acassis merged pull request #715: webclient: Fix buffer overruns in header parsing

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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] 02/04: webclient.c: Don't parse the status line as the first header line

2021-05-16 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-apps.git

commit eb1a99fdd6980c2366ab8afd7327c38941438d08
Author: YAMAMOTO Takashi 
AuthorDate: Fri May 14 10:57:57 2021 +0900

webclient.c: Don't parse the status line as the first header line
---
 netutils/webclient/webclient.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index d48196d..40c6951 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -447,6 +447,7 @@ static inline int wget_parsestatus(struct webclient_context 
*ctx,
*/
 
   ws->state = WEBCLIENT_STATE_HEADERS;
+  ndx = 0;
   break;
 }
   else


[incubator-nuttx-apps] 03/04: webclient.c: Fix buffer overrun in HTTP header parsing

2021-05-16 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-apps.git

commit b53375074b5fa17a7270cb41c8a44ae0af029907
Author: YAMAMOTO Takashi 
AuthorDate: Fri May 14 11:09:32 2021 +0900

webclient.c: Fix buffer overrun in HTTP header parsing

* Detect a long header line which doesn't fit the buffer.

* If the header line in question doesn't seem important for us,
  just ignore it.

* Otherwise, bail out with -E2BIG.

The overrun was found by LLVM UBSan on macOS.

The following is an example of a long header line,
which doesn't fit the default CONFIG_WEBCLIENT_MAXHTTPLINE=200.
```
pacetanuki% curl -v https://www.midokura.com
:
:
< HTTP/2 200
< server: nginx
< date: Fri, 14 May 2021 02:16:24 GMT
< content-type: text/html; charset=UTF-8
< content-length: 131313
< x-powered-by: PHP/7.4.18
< link: ; rel="https://api.w.org/;, 
; rel="alternate"; 
type="application/json", ; rel=shortlink
< x-powered-by: PleskLin
<
```
---
 netutils/webclient/webclient.c | 74 ++
 1 file changed, 67 insertions(+), 7 deletions(-)

diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index 40c6951..7f84ccc 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -152,6 +152,7 @@ struct wget_s
 
   char line[CONFIG_WEBCLIENT_MAXHTTPLINE];
   int  ndx;
+  bool skip_to_next_line;
 
 #ifdef CONFIG_WEBCLIENT_GETMIMETYPE
   char mimetype[CONFIG_WEBCLIENT_MAXMIMESIZE];
@@ -518,16 +519,35 @@ static inline int wget_parseheaders(struct wget_s *ws)
 
   while (offset < ws->datend)
 {
+  bool got_nl;
+
   ws->line[ndx] = ws->buffer[offset];
-  if (ws->line[ndx] == ISO_NL)
+  got_nl = ws->line[ndx] == ISO_NL;
+  if (got_nl || ndx == CONFIG_WEBCLIENT_MAXHTTPLINE - 1)
 {
-  /* We have an entire HTTP header line in s.line, so
-   * we parse it.
+  bool found;
+
+  if (ws->skip_to_next_line)
+{
+  if (got_nl)
+{
+  ws->skip_to_next_line = false;
+}
+
+  ndx = 0;
+  continue;
+}
+
+  /* We have an entire HTTP header line in ws->line, or
+   * our buffer is already full, so we start parsing it.
*/
 
+  found = false;
   if (ndx > 0) /* Should always be true */
 {
-  ninfo("Got HTTP header line: %.*s\n", ndx - 1, >line[0]);
+  ninfo("Got HTTP header line%s: %.*s\n",
+got_nl ? "" : " (truncated)",
+ndx - 1, >line[0]);
   if (ws->line[0] == ISO_CR)
 {
   /* This was the last header line (i.e., and empty "\r\n"),
@@ -541,7 +561,30 @@ static inline int wget_parseheaders(struct wget_s *ws)
 
   /* Truncate the trailing \r\n */
 
-  ws->line[ndx - 1] = '\0';
+  if (got_nl)
+{
+  ndx--;
+  if (ws->line[ndx] != ISO_CR)
+{
+  nerr("ERROR: unexpected EOL from the server\n");
+  return -EPROTO;
+}
+}
+
+  ws->line[ndx] = '\0';
+
+  if (!strchr(ws->line, ':'))
+{
+  if (got_nl)
+{
+  nerr("ERROR: invalid header possibly due to "
+   "small CONFIG_WEBCLIENT_MAXHTTPLINE\n");
+  return -E2BIG;
+}
+
+  nerr("ERROR: invalid header\n");
+  return -EPROTO;
+}
 
   /* Check for specific HTTP header fields. */
 
@@ -559,6 +602,7 @@ static inline int wget_parseheaders(struct wget_s *ws)
 
   strncpy(ws->mimetype, ws->line + strlen(g_httpcontenttype),
   sizeof(ws->mimetype));
+  found = true;
 }
   else
 #endif
@@ -573,14 +617,30 @@ static inline int wget_parseheaders(struct wget_s *ws)
   ret = parseurl(ws->line + strlen(g_httplocation), ws);
   ninfo("New hostname='%s' filename='%s'\n",
 ws->hostname, ws->filename);
+  found = true;
 }
 }
 
-  /* We're done parsing this line, so we reset the index to the start
-   * of the next line.
+  if (found && !got_nl)
+{
+  /* We found something we might care.
+   * but we couldn't process it correctly.
+   */
+
+  nerr("ERROR: 

[incubator-nuttx-apps] branch master updated (d74ac65 -> 95c9007)

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

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


from d74ac65  hdc1008_demo: set intial measurement mode
 new f17af21  webclient: Add a few ninfo in header parsing
 new eb1a99f  webclient.c: Don't parse the status line as the first header 
line
 new b533750  webclient.c: Fix buffer overrun in HTTP header parsing
 new 95c9007  webclient: Fix buffer overrun in wget_parsestatus

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:
 netutils/webclient/webclient.c | 88 ++
 1 file changed, 81 insertions(+), 7 deletions(-)


[incubator-nuttx-apps] 04/04: webclient: Fix buffer overrun in wget_parsestatus

2021-05-16 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-apps.git

commit 95c90076683d0f8e68cd53cc9f62acc40f4477a6
Author: YAMAMOTO Takashi 
AuthorDate: Fri May 14 11:24:58 2021 +0900

webclient: Fix buffer overrun in wget_parsestatus

Similarly to the fix in wget_parseheaders.
But simply always bail out as i guess it's very rare to see
that long status line.

Tested with an aritifically small CONFIG_WEBCLIENT_MAXHTTPLINE=20,
which is smaller than "HTTP/1.1 301 Moved Permanently".
---
 netutils/webclient/webclient.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index 7f84ccc..72f5585 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -376,9 +376,20 @@ static inline int wget_parsestatus(struct 
webclient_context *ctx,
 
   while (offset < ws->datend)
 {
+  bool got_nl;
+
   ws->line[ndx] = ws->buffer[offset];
-  if (ws->line[ndx] == ISO_NL)
+  got_nl = ws->line[ndx] == ISO_NL;
+  if (got_nl || ndx == CONFIG_WEBCLIENT_MAXHTTPLINE - 1)
 {
+  if (!got_nl)
+{
+  nerr("ERROR: HTTP status line didn't fit "
+   "CONFIG_WEBCLIENT_MAXHTTPLINE: %.*s\n",
+   ndx, ws->line);
+  return -E2BIG;
+}
+
   ws->line[ndx] = '\0';
   if ((strncmp(ws->line, g_http10, strlen(g_http10)) == 0) ||
   (strncmp(ws->line, g_http11, strlen(g_http11)) == 0))


[incubator-nuttx-apps] 01/04: webclient: Add a few ninfo in header parsing

2021-05-16 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-apps.git

commit f17af21f9c36a56e79ca26028a2857bea2578f73
Author: YAMAMOTO Takashi 
AuthorDate: Fri May 14 12:19:24 2021 +0900

webclient: Add a few ninfo in header parsing
---
 netutils/webclient/webclient.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index e8c50d7..d48196d 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -406,6 +406,7 @@ static inline int wget_parsestatus(struct webclient_context 
*ctx,
 }
 
   ctx->http_status = http_status;
+  ninfo("Got HTTP status %lu\n", http_status);
   if (ctx->http_reason != NULL)
 {
   strncpy(ctx->http_reason,
@@ -525,6 +526,7 @@ static inline int wget_parseheaders(struct wget_s *ws)
 
   if (ndx > 0) /* Should always be true */
 {
+  ninfo("Got HTTP header line: %.*s\n", ndx - 1, >line[0]);
   if (ws->line[0] == ISO_CR)
 {
   /* This was the last header line (i.e., and empty "\r\n"),


[GitHub] [incubator-nuttx-apps] acassis merged pull request #717: hdc1008_demo: set intial measurement mode

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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: hdc1008_demo: set intial measurement mode

2021-05-16 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-apps.git


The following commit(s) were added to refs/heads/master by this push:
 new d74ac65  hdc1008_demo: set intial measurement mode
d74ac65 is described below

commit d74ac654a94c794c1c456576c54f96595693d7d9
Author: Diego Herranz 
AuthorDate: Sun May 16 12:32:54 2021 +0100

hdc1008_demo: set intial measurement mode

No mode was set before the first read by the app.
The first time the app was run, it worked properly, reading
temperature and humidity on the first read(). But subsequent reads
returned humidity only since that was last mode set up.
Also, the ioctl read was returning invalid results.
---
 examples/hdc1008_demo/hdc1008_main.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/examples/hdc1008_demo/hdc1008_main.c 
b/examples/hdc1008_demo/hdc1008_main.c
index 016dca7..f34daf3 100644
--- a/examples/hdc1008_demo/hdc1008_main.c
+++ b/examples/hdc1008_demo/hdc1008_main.c
@@ -69,6 +69,14 @@ int main(int argc, FAR char *argv[])
 
   /* Read both t and rh */
 
+  ret = ioctl(fd, SNIOC_SET_OPERATIONAL_MODE, HDC1008_MEAS_T_AND_RH);
+  if (ret < 0)
+{
+  printf("Failed to set temperature and humidity measurement mode: %d\n",
+ errno);
+  goto out;
+}
+
   ret = read(fd, buf, sizeof(buf));
   if (ret < 0)
 {


[incubator-nuttx-apps] branch master updated: system/embedlog: update to v0.6.0

2021-05-16 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-apps.git


The following commit(s) were added to refs/heads/master by this push:
 new ccc8dda  system/embedlog: update to v0.6.0
ccc8dda is described below

commit ccc8ddaf5d1e5ba0bbb985830816cdb70510ae1e
Author: Michał Łyszczek 
AuthorDate: Fri May 14 01:20:52 2021 +0200

system/embedlog: update to v0.6.0

Changes from v0.4.0
- add thread safety code
- add option to print function info (name) in logs
- abi/api stabilization
- bug fixes + increased reliability

Signed-off-by: Michał Łyszczek 

---
v1 -> v2 [suggested by Brennan Ashton]
 - fix path to embedlog_main.c in header comment
 - change license from bsd3 to apache2.0
---
 examples/embedlog/Make.defs   |  39 ---
 examples/embedlog/Makefile|  39 ---
 examples/embedlog/embedlog_main.c |  43 
 system/embedlog/Kconfig   |  72 +--
 system/embedlog/Make.defs |  39 ---
 system/embedlog/Makefile  | 141 +-
 6 files changed, 211 insertions(+), 162 deletions(-)

diff --git a/examples/embedlog/Make.defs b/examples/embedlog/Make.defs
index 26aeae6..c66d52f 100644
--- a/examples/embedlog/Make.defs
+++ b/examples/embedlog/Make.defs
@@ -2,35 +2,20 @@
 # apps/examples/embedlog/Make.defs
 # Adds selected applications to apps/ build
 #
-#   Copyright (C) 2019 Michał Łyszczek. All rights reserved.
-#   Author: Michał Łyszczek 
+# 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
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
+# 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.
 #
 
 
diff --git a/examples/embedlog/Makefile b/examples/embedlog/Makefile
index 1f7d627..f3476b3 100644
--- a/examples/embedlog/Makefile
+++ b/examples/embedlog/Makefile
@@ -1,35 +1,20 @@
 
 # apps/examples/embedlog/Makefile
 #
-#   Copyright (C) 2019 Michał Łyszczek. All rights reserved.
-#   Author: Michał Łyszczek 
+# 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:
+#   

[GitHub] [incubator-nuttx-apps] acassis merged pull request #714: system/embedlog: update to v0.6.0

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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] mlyszczek commented on pull request #714: system/embedlog: update to v0.6.0

2021-05-16 Thread GitBox


mlyszczek commented on pull request #714:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/714#issuecomment-841822206


   > Can you please fix the file path comment to be
   > `apps/examples/embedlog/embedlog_main.c` that will close out the CI 
failure.
   
   Done, thanks for the correct path, I was kinda scratching my head about that 
and was just charging my mana to look into it closely. Saved me some time, 
thanks.
   
   > Also if you would be willing to update the license header to the new 
Apache 2.0 one as you contributed it, that would be helpful to the project, but 
it is up to you.
   
   Changed license to apache 2.0 in all related embedlog 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-apps] diegoherranz opened a new pull request #717: hdc1008_demo: set intial measurement mode

2021-05-16 Thread GitBox


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


   ## Summary
   No mode was set before the first read by the app.
   The first time the app was run, it worked properly, reading temperature and 
humidity on the first read(). But subsequent reads returned humidity only since 
that was last mode set up.
   
   First run of the app:
   ```
   nsh> hdc1008
   Temperature and humidity
   
   data=20.54 56.9
   
   Temperature and humidity (ioctl)
   
   t=20.54, h=56.9
   
   Temperature, 11 bit resolution
   ==
   data=20.78
   
   Temperature, 14 bit resolution
   ==
   data=20.69
   
   Humidity, 8 bit resolution
   ===
   data=57.1
   
   Humidity, 11 bit resolution
   ===
   data=56.9
   
   Humidity, 14 bit resolution
   ===
   data=56.9
   ```
   
   Second run of the app:
   ```nsh> hdc1008
   Temperature and humidity
   
   data=56.9
   
   Temperature and humidity (ioctl)
   
   t=2684430.32, h=56.9
   
   Temperature, 11 bit resolution
   ==
   data=20.71
   
   Temperature, 14 bit resolution
   ==
   data=20.72
   
   Humidity, 8 bit resolution
   ===
   data=57.3
   
   Humidity, 11 bit resolution
   ===
   data=56.9
   
   Humidity, 14 bit resolution
   ===
   data=56.9
   ```
   
   ## Impact
   hdc1008 app only
   
   ## Testing
   Tested on custom board.
   Now, every run of the app returns temperature and humidity on the first read
   
   ```
   nsh> hdc1008
   Temperature and humidity
   
   data=20.94 56.0
   
   [...]
   
   nsh> hdc1008
   Temperature and humidity
   
   data=20.97 55.9
   [...]
   ```
   
   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




[incubator-nuttx] branch master updated: Update libcxx to 12.0.0 release

2021-05-16 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 a81166a  Update libcxx to 12.0.0 release
a81166a is described below

commit a81166aef6ccd4993e22619fc54ea3451b3a0236
Author: Xiang Xiao 
AuthorDate: Thu May 13 17:52:38 2021 +0800

Update libcxx to 12.0.0 release

and remove the temporary patch since all patch is in the mainline now

Signed-off-by: Xiang Xiao 
---
 boards/sim/sim/sim/scripts/Make.defs   |   5 +-
 libs/libxx/0001-libc-Fix-a-few-warnings.patch  |  43 ---
 ...sts-failing-with-Clang-after-removing-GCC.patch |  26 
 ...ix-several-GCC-warnings-in-the-test-suite.patch | 135 -
 ...k-_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE-fir.patch |  78 
 ...Port-to-NuttX-https-nuttx.apache.org-RTOS.patch | 112 -
 libs/libxx/libcxx.defs |   7 +-
 7 files changed, 4 insertions(+), 402 deletions(-)

diff --git a/boards/sim/sim/sim/scripts/Make.defs 
b/boards/sim/sim/sim/scripts/Make.defs
index 1e78f79..bd17433 100644
--- a/boards/sim/sim/sim/scripts/Make.defs
+++ b/boards/sim/sim/sim/scripts/Make.defs
@@ -108,14 +108,15 @@ CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) \
 AFLAGS := $(CFLAGS) -D__ASSEMBLY__
 
 ifeq ($(CONFIG_LIBCXX),y)
-  # Why c++14?
+  # Why c++17?
   #  * libcxx seems to require c++11.
   #  * The compiler defaults varies:
   #  clang/macOS (from xcode): 199711L
   #  gcc/ubuntu:   201402L
   #  * There is a precedent to use c++14.
   #(boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs)
-  CXXFLAGS += -std=c++14
+  #  * libs/libxx/libcxx/src/barrier.cpp depends on aligned new
+  CXXFLAGS += -std=c++17
 
   ifeq ($(CONFIG_HOST_MACOS),y)
 # macOS uses libc++abi
diff --git a/libs/libxx/0001-libc-Fix-a-few-warnings.patch 
b/libs/libxx/0001-libc-Fix-a-few-warnings.patch
deleted file mode 100644
index b7bb109..000
--- a/libs/libxx/0001-libc-Fix-a-few-warnings.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From acd7be74ca12f8f08e52d6d80850a9b230109134 Mon Sep 17 00:00:00 2001
-From: YAMAMOTO Takashi 
-Date: Wed, 28 Oct 2020 15:40:16 -0400
-Subject: [PATCH] [libc++] Fix a few warnings
-
-Found during a NuttX porting effort.
-But these changes are not directly relevant to NuttX.
-
-Differential Revision: https://reviews.llvm.org/D90139

- src/filesystem/operations.cpp | 2 +-
- src/locale.cpp| 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/filesystem/operations.cpp libcxx/src/filesystem/operations.cpp
-index 95d7d0d9642..788e31b673a 100644
 a/src/filesystem/operations.cpp
-+++ libcxx/src/filesystem/operations.cpp
-@@ -534,7 +534,7 @@ path __canonical(path const& orig_p, error_code* ec) {
-   ErrorHandler err("canonical", ec, _p, );
- 
-   path p = __do_absolute(orig_p, , ec);
--#if _POSIX_VERSION >= 200112
-+#if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112
-   std::unique_ptr
- hold(::realpath(p.c_str(), nullptr), &::free);
-   if (hold.get() == nullptr)
-diff --git a/src/locale.cpp libcxx/src/locale.cpp
-index b9180880e49..02dbb334ff8 100644
 a/src/locale.cpp
-+++ libcxx/src/locale.cpp
-@@ -1149,7 +1149,7 @@ ctype::__classic_upper_table() _NOEXCEPT
- {
- return _LIBCPP_GET_C_LOCALE->__ctype_toupper;
- }
--#elif __NetBSD__
-+#elif defined(__NetBSD__)
- const short*
- ctype::__classic_lower_table() _NOEXCEPT
- {
--- 
-2.17.1
-
diff --git 
a/libs/libxx/0001-libc-Fix-tests-failing-with-Clang-after-removing-GCC.patch 
b/libs/libxx/0001-libc-Fix-tests-failing-with-Clang-after-removing-GCC.patch
deleted file mode 100644
index 5e28838..000
--- a/libs/libxx/0001-libc-Fix-tests-failing-with-Clang-after-removing-GCC.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 81b6aa0e27abc3037c84d1ff2065bf60207f9b8b Mon Sep 17 00:00:00 2001
-From: Louis Dionne 
-Date: Fri, 30 Oct 2020 14:55:37 -0400
-Subject: [PATCH] [libc++] Fix tests failing with Clang after removing GCC
- warnings
-

- src/filesystem/filesystem_common.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/filesystem/filesystem_common.h 
libcxx/src/filesystem/filesystem_common.h
-index a7828ef3863..dc55f93da70 100644
 a/src/filesystem/filesystem_common.h
-+++ libcxx/src/filesystem/filesystem_common.h
-@@ -198,7 +198,7 @@ private:
- using chrono::duration;
- using chrono::duration_cast;
- 
--using TimeSpec = std::timespec;
-+using TimeSpec = timespec;
- using StatT = struct stat;
- 
- template 
-Date: Fri, 30 Oct 2020 11:19:07 -0400
-Subject: [PATCH] [libc++] NFC: Fix several GCC warnings in the test suite
-
-- Several -Wshadow warnings
-- Several places where we did not initialize our base class explicitly
-- Unused variable warnings
-- Some tautological comparisons
-- Some places where we'd pass null 

[GitHub] [incubator-nuttx] btashton merged pull request #3709: Update libcxx to 12.0.0 release

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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 merged pull request #3724: fs/hostfs: fix bug about getting error file size by fstat

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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: fs/hostfs: fix bug about getting error file size by fstat

2021-05-16 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 9980a1c  fs/hostfs: fix bug about getting error file size by fstat
9980a1c is described below

commit 9980a1c27dfef1796b243417bb703da3ae0811d7
Author: Jiuzhu Dong 
AuthorDate: Fri Apr 23 17:44:03 2021 +0800

fs/hostfs: fix bug about getting error file size by fstat

Change-Id: I10a0d52da649e4c3138e5a2301bcb6525e2e3350
Signed-off-by: Jiuzhu Dong 
---
 fs/hostfs/hostfs_rpmsg.h | 27 ---
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/fs/hostfs/hostfs_rpmsg.h b/fs/hostfs/hostfs_rpmsg.h
index 6482f02..b5b9822 100644
--- a/fs/hostfs/hostfs_rpmsg.h
+++ b/fs/hostfs/hostfs_rpmsg.h
@@ -116,9 +116,17 @@ begin_packed_struct struct hostfs_rpmsg_ioctl_s
 begin_packed_struct struct hostfs_rpmsg_fstat_s
 {
   struct hostfs_rpmsg_header_s header;
-  int32_t  fd;
-  uint32_t reserved;
-  struct stat  buf;
+  union
+  {
+struct statbuf;
+uint32_t   reserved[16];
+  };
+
+  union
+  {
+int32_tfd;
+char   pathname[0];
+  };
 } end_packed_struct;
 
 begin_packed_struct struct hostfs_rpmsg_ftruncate_s
@@ -169,17 +177,6 @@ begin_packed_struct struct hostfs_rpmsg_mkdir_s
 
 #define hostfs_rpmsg_rmdir_s hostfs_rpmsg_opendir_s
 #define hostfs_rpmsg_rename_s hostfs_rpmsg_opendir_s
-
-begin_packed_struct struct hostfs_rpmsg_stat_s
-{
-  struct hostfs_rpmsg_header_s header;
-  union
-  {
-struct statbuf;
-uint32_t   reserved[16];
-  };
-
-  char pathname[0];
-} end_packed_struct;
+#define hostfs_rpmsg_stat_s hostfs_rpmsg_fstat_s
 
 #endif /* __FS_HOSTFS_HOSTFS_RPMSG_H */


[GitHub] [incubator-nuttx] btashton commented on a change in pull request #3730: stm32h7 rcc: Sync h7x7xx and h7x3xx. Changes are relevant to both

2021-05-16 Thread GitBox


btashton commented on a change in pull request #3730:
URL: https://github.com/apache/incubator-nuttx/pull/3730#discussion_r633059010



##
File path: arch/arm/src/stm32h7/stm32h7x3xx_rcc.c
##
@@ -473,6 +479,18 @@ static inline void rcc_enableapb2(void)
   regval |= RCC_APB2ENR_SPI5EN;
 #endif
 
+#ifdef CONFIG_STM32H7_USART1
+  /* USART1 clock enable */
+
+  regval |= RCC_APB2ENR_USART1EN;
+#endif
+
+#ifdef CONFIG_STM32H7_USART6
+  /* USART1 clock enable */

Review comment:
   typeo in comment: `USART6` not `USART1`

##
File path: arch/arm/src/stm32h7/stm32h7x7xx_rcc.c
##
@@ -826,8 +830,6 @@ void stm32_stdclockconfig(void)
   regval |= STM32_PWR_CR3_LDOEN | STM32_PWR_CR3_LDOESCUEN;
   putreg32(regval, STM32_PWR_CR3);
 
-#if 0

Review comment:
   I recall some boards having issues starting correctly with this.  I need 
to check my boards.




-- 
This is an automated message from the 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: stm32f7: Remove references to BOARD_ENABLE_USBOTG_HSULPI. Prefer Kconfig option instead.

2021-05-16 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 99a9d75  stm32f7: Remove references to BOARD_ENABLE_USBOTG_HSULPI. 
Prefer Kconfig option instead.
99a9d75 is described below

commit 99a9d75cdd3245ed13697bf9bfa4aa6079dd8c51
Author: Anthony Merlino 
AuthorDate: Mon Apr 12 19:17:26 2021 -0400

stm32f7: Remove references to BOARD_ENABLE_USBOTG_HSULPI. Prefer Kconfig 
option instead.
---
 arch/arm/src/stm32f7/stm32f72xx73xx_rcc.c | 4 +++-
 arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c | 5 +++--
 arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c | 4 +++-
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/stm32f7/stm32f72xx73xx_rcc.c 
b/arch/arm/src/stm32f7/stm32f72xx73xx_rcc.c
index d724d4f..589488e 100644
--- a/arch/arm/src/stm32f7/stm32f72xx73xx_rcc.c
+++ b/arch/arm/src/stm32f7/stm32f72xx73xx_rcc.c
@@ -211,7 +211,9 @@ static inline void rcc_enableahb1(void)
 #endif
 
 #ifdef CONFIG_STM32F7_OTGFSHS
-#if defined(CONFIG_STM32F7_INTERNAL_ULPI) || 
defined(CONFIG_STM32F7_EXTERNAL_ULPI)
+#  if defined(CONFIG_STM32F7_INTERNAL_ULPI) ||
+  defined(CONFIG_STM32F7_EXTERNAL_ULPI)
+
   /* Enable clocking for  USB OTG HS and external PHY */
 
   regval |= (RCC_AHB1ENR_OTGHSEN | RCC_AHB1ENR_OTGHSULPIEN);
diff --git a/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c 
b/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c
index 8643801..e288291 100644
--- a/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c
+++ b/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c
@@ -215,12 +215,13 @@ static inline void rcc_enableahb1(void)
 #endif
 
 #ifdef CONFIG_STM32F7_OTGFSHS
- #if defined(CONFIG_STM32F7_INTERNAL_ULPI) || 
defined(CONFIG_STM32F7_EXTERNAL_ULPI)
+#  if defined(CONFIG_STM32F7_INTERNAL_ULPI) || \
+  defined(CONFIG_STM32F7_EXTERNAL_ULPI)
+
   /* Enable clocking for  USB OTG HS and external PHY */
 
   regval |= (RCC_AHB1ENR_OTGHSEN | RCC_AHB1ENR_OTGHSULPIEN);
 #else
-
   /* Enable only clocking for USB OTG HS */
 
   regval |= RCC_AHB1ENR_OTGHSEN;
diff --git a/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c 
b/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c
index ed1bc93..32f2a62 100644
--- a/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c
+++ b/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c
@@ -221,7 +221,9 @@ static inline void rcc_enableahb1(void)
 #endif
 
 #ifdef CONFIG_STM32F7_OTGFSHS
-#ifdef BOARD_ENABLE_USBOTG_HSULPI
+#  if defined(CONFIG_STM32F7_INTERNAL_ULPI) || \
+  defined(CONFIG_STM32F7_EXTERNAL_ULPI)
+
   /* Enable clocking for  USB OTG HS and external PHY */
 
   regval |= (RCC_AHB1ENR_OTGHSEN | RCC_AHB1ENR_OTGHSULPIEN);


[GitHub] [incubator-nuttx] btashton merged pull request #3728: stm32f7: Remove references to BOARD_ENABLE_USBOTG_HSULPI.

2021-05-16 Thread GitBox


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


   


-- 
This is an automated message from the 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 a change in pull request #3729: stm32 timers: Prefer GTIM macros and make this use more uniform.

2021-05-16 Thread GitBox


btashton commented on a change in pull request #3729:
URL: https://github.com/apache/incubator-nuttx/pull/3729#discussion_r633058432



##
File path: arch/arm/src/stm32/stm32_tickless.c
##
@@ -267,7 +268,7 @@ static int stm32_tickless_setchannel(uint8_t channel)
 
   /* Set polarity */
 
-  ccer_val |= ATIM_CCER_CC1P << (channel << 2);
+  ccer_val |= ATIM_CCER_CC1P << GTIM_CCER_CCXBASE(channel);

Review comment:
   I get that the macro is the same, but why not use `ATIM_CCER_CCXBASE` 
here, seems wrong to use that in the context of `ATIM`?




-- 
This is an automated message from the 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 a change in pull request #3729: stm32 timers: Prefer GTIM macros and make this use more uniform.

2021-05-16 Thread GitBox


btashton commented on a change in pull request #3729:
URL: https://github.com/apache/incubator-nuttx/pull/3729#discussion_r633058432



##
File path: arch/arm/src/stm32/stm32_tickless.c
##
@@ -267,7 +268,7 @@ static int stm32_tickless_setchannel(uint8_t channel)
 
   /* Set polarity */
 
-  ccer_val |= ATIM_CCER_CC1P << (channel << 2);
+  ccer_val |= ATIM_CCER_CC1P << GTIM_CCER_CCXBASE(channel);

Review comment:
   I get that the macro is the same, but why not use `ATIM_CCER_CCXBASE` 
here?




-- 
This is an automated message from the 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