[GitHub] [incubator-nuttx] masayuki2009 commented on a change in pull request #3707: Fix NFS over TCP

2021-05-12 Thread GitBox


masayuki2009 commented on a change in pull request #3707:
URL: https://github.com/apache/incubator-nuttx/pull/3707#discussion_r631571627



##
File path: fs/nfs/rpc_clnt.c
##
@@ -297,29 +299,47 @@ static int rpcclnt_socket(FAR struct rpcclnt *rpc, 
in_port_t rport)
 static int rpcclnt_send(FAR struct rpcclnt *rpc,
 FAR void *call, int reqlen)
 {
+  FAR uint8_t *pkt = NULL;
   uint32_t mark;
   int ret = OK;
 
-  /* Send the record marking(RM) for stream only */
+  /* Prepare the record marking(RM) for stream only
+   * NOTE: Sending a separate packet does not work with Linux host
+   */
 
   if (rpc->rc_sotype == SOCK_STREAM)
 {
-  mark = txdr_unsigned(0x8000 | reqlen);
-  ret = psock_send(>rc_so, , sizeof(mark), 0);
-  if (ret < 0)
+  pkt = (uint8_t *)kmm_malloc(sizeof(mark) + reqlen);
+
+  if (NULL == pkt)
 {
   ferr("ERROR: psock_send mark failed: %d\n", ret);
-  return ret;
+  return -ENOMEM;
 }
+
+  mark = txdr_unsigned(0x8000 | reqlen);
+  memcpy(pkt, , sizeof(mark));
 }
 
-  /* Send the call message
+  /* Send a RPC message
+   * For TCP, the record marking + call message will be sent
+   * For UDP, call message will be sent
*
* On success, psock_send returns the number of bytes sent;
* On failure, it returns a negated errno value.
*/
 
-  ret = psock_send(>rc_so, call, reqlen, 0);
+  if (pkt)
+{
+  memcpy(pkt + sizeof(mark), call, reqlen);
+  ret = psock_send(>rc_so, pkt, sizeof(mark) + reqlen, 0);

Review comment:
   @xiaoxiang781216 
   Done.
   




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

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




[incubator-nuttx] branch master updated: binfmt/elf: Don't close filfd in the fail path

2021-05-12 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 85c1354  binfmt/elf: Don't close filfd in the fail path
85c1354 is described below

commit 85c1354043c66221d0e7b819c44a66e05f0102ad
Author: Xiang Xiao 
AuthorDate: Fri May 7 21:48:02 2021 +0800

binfmt/elf: Don't close filfd in the fail path

to avoid close the same handle twice because
the caller also call elf_uninit in this case

Signed-off-by: Xiang Xiao 
Change-Id: Iddcbae9587d11d3b5b06e876d4a037ac0d11992e
---
 binfmt/libelf/libelf_init.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/binfmt/libelf/libelf_init.c b/binfmt/libelf/libelf_init.c
index 7f4ae3c..6658aa0 100644
--- a/binfmt/libelf/libelf_init.c
+++ b/binfmt/libelf/libelf_init.c
@@ -161,7 +161,6 @@ int elf_init(FAR const char *filename, FAR struct 
elf_loadinfo_s *loadinfo)
   if (ret < 0)
 {
   berr("Failed to read ELF header: %d\n", ret);
-  nx_close(loadinfo->filfd);
   return ret;
 }
 
@@ -181,7 +180,6 @@ int elf_init(FAR const char *filename, FAR struct 
elf_loadinfo_s *loadinfo)
*/
 
   berr("Bad ELF header: %d\n", ret);
-  nx_close(loadinfo->filfd);
   return ret;
 }
 


[GitHub] [incubator-nuttx] btashton merged pull request #3671: binfmt/elf: Don't close filfd in the fail path

2021-05-12 Thread GitBox


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


   


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

2021-05-12 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 4befbdf  docker: add ninja-build
 add e1ff0c4  libc: Implement openpty function

No new revisions were added by this update.

Summary of changes:
 .../src/lc823450/lc823450_wdt.h => include/pty.h   |  31 ++--
 libs/libc/stdlib/Make.defs |   3 +
 libs/libc/stdlib/lib_openpty.c | 159 +
 3 files changed, 176 insertions(+), 17 deletions(-)
 copy arch/arm/src/lc823450/lc823450_wdt.h => include/pty.h (74%)
 create mode 100644 libs/libc/stdlib/lib_openpty.c


[GitHub] [incubator-nuttx] btashton merged pull request #3681: libc: Implement openpty function

2021-05-12 Thread GitBox


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


   


-- 
This is an automated message from the 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 #3707: Fix NFS over TCP

2021-05-12 Thread GitBox


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


   > Hmm, build error happened with sim/posix_spawn.
   > I think the error does not relate to this PR.
   > 
   > ```
   > 

   > Configuration/Tool: sim/posix_spawn
   > 

   >   Cleaning...
   >   Configuring...
   >   Building NuttX...
   > machine/sim/arch_setjmp.S: Assembler messages:
   > machine/sim/arch_setjmp.S:101: Error: operand type mismatch for `jmp'
   > make[1]: *** [Makefile:130: bin/arch_setjmp.o] Error 1
   > stdio/lib_libvsprintf.c: In function 'vsprintf_internal':
   > Error: stdio/lib_libvsprintf.c:405:19: error: duplicate case value
   >   405 |   case sizeof(unsigned long long):
   >   |   ^~~~
   > ```
   
   Should be fixed by: https://github.com/apache/incubator-nuttx/pull/3706


-- 
This is an automated message from the 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 commented on a change in pull request #3707: Fix NFS over TCP

2021-05-12 Thread GitBox


masayuki2009 commented on a change in pull request #3707:
URL: https://github.com/apache/incubator-nuttx/pull/3707#discussion_r631525622



##
File path: fs/nfs/rpc_clnt.c
##
@@ -297,29 +299,47 @@ static int rpcclnt_socket(FAR struct rpcclnt *rpc, 
in_port_t rport)
 static int rpcclnt_send(FAR struct rpcclnt *rpc,
 FAR void *call, int reqlen)
 {
+  FAR uint8_t *pkt = NULL;
   uint32_t mark;
   int ret = OK;
 
-  /* Send the record marking(RM) for stream only */
+  /* Prepare the record marking(RM) for stream only
+   * NOTE: Sending a separate packet does not work with Linux host
+   */
 
   if (rpc->rc_sotype == SOCK_STREAM)
 {
-  mark = txdr_unsigned(0x8000 | reqlen);
-  ret = psock_send(>rc_so, , sizeof(mark), 0);
-  if (ret < 0)
+  pkt = (uint8_t *)kmm_malloc(sizeof(mark) + reqlen);
+
+  if (NULL == pkt)
 {
   ferr("ERROR: psock_send mark failed: %d\n", ret);
-  return ret;
+  return -ENOMEM;
 }
+
+  mark = txdr_unsigned(0x8000 | reqlen);
+  memcpy(pkt, , sizeof(mark));
 }
 
-  /* Send the call message
+  /* Send a RPC message
+   * For TCP, the record marking + call message will be sent
+   * For UDP, call message will be sent
*
* On success, psock_send returns the number of bytes sent;
* On failure, it returns a negated errno value.
*/
 
-  ret = psock_send(>rc_so, call, reqlen, 0);
+  if (pkt)
+{
+  memcpy(pkt + sizeof(mark), call, reqlen);
+  ret = psock_send(>rc_so, pkt, sizeof(mark) + reqlen, 0);

Review comment:
   @xiaoxiang781216 
   
   I thought the same thing but I found that we need to modify the existing 
data structure which might give an impact.
   Anyway, I will try to investigate again.
   
   




-- 
This is an automated message from the 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 #3689: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-12 Thread GitBox


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


   I am taking a look, @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




[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #712: examples/elf: Fix error: unused variable 'desc' [-Werror=unused-variable]

2021-05-12 Thread GitBox


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


   


-- 
This is an automated message from the 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 a change in pull request #3707: Fix NFS over TCP

2021-05-12 Thread GitBox


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



##
File path: fs/nfs/rpc_clnt.c
##
@@ -297,29 +299,47 @@ static int rpcclnt_socket(FAR struct rpcclnt *rpc, 
in_port_t rport)
 static int rpcclnt_send(FAR struct rpcclnt *rpc,
 FAR void *call, int reqlen)
 {
+  FAR uint8_t *pkt = NULL;
   uint32_t mark;
   int ret = OK;
 
-  /* Send the record marking(RM) for stream only */
+  /* Prepare the record marking(RM) for stream only
+   * NOTE: Sending a separate packet does not work with Linux host
+   */
 
   if (rpc->rc_sotype == SOCK_STREAM)
 {
-  mark = txdr_unsigned(0x8000 | reqlen);
-  ret = psock_send(>rc_so, , sizeof(mark), 0);
-  if (ret < 0)
+  pkt = (uint8_t *)kmm_malloc(sizeof(mark) + reqlen);
+
+  if (NULL == pkt)
 {
   ferr("ERROR: psock_send mark failed: %d\n", ret);
-  return ret;
+  return -ENOMEM;
 }
+
+  mark = txdr_unsigned(0x8000 | reqlen);
+  memcpy(pkt, , sizeof(mark));
 }
 
-  /* Send the call message
+  /* Send a RPC message
+   * For TCP, the record marking + call message will be sent
+   * For UDP, call message will be sent
*
* On success, psock_send returns the number of bytes sent;
* On failure, it returns a negated errno value.
*/
 
-  ret = psock_send(>rc_so, call, reqlen, 0);
+  if (pkt)
+{
+  memcpy(pkt + sizeof(mark), call, reqlen);
+  ret = psock_send(>rc_so, pkt, sizeof(mark) + reqlen, 0);

Review comment:
   it's better to call psock_sendmsg instead to avoid kmalloc in every 
transaction.




-- 
This is an automated message from the 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: examples/elf: Fix error: unused variable 'desc' [-Werror=unused-variable]

2021-05-12 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 e25a303  examples/elf: Fix error: unused variable 'desc' 
[-Werror=unused-variable]
e25a303 is described below

commit e25a303a738e4926fc55b4ab2f91910944a4d9c0
Author: Xiang Xiao 
AuthorDate: Thu May 13 10:16:45 2021 +0800

examples/elf: Fix error: unused variable 'desc' [-Werror=unused-variable]

Signed-off-by: Xiang Xiao 
---
 examples/elf/elf_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c
index 352f835..94e3454 100644
--- a/examples/elf/elf_main.c
+++ b/examples/elf/elf_main.c
@@ -203,10 +203,12 @@ int main(int argc, FAR char *argv[])
 #ifdef CONFIG_EXAMPLES_ELF_FSREMOVEABLE
   struct stat buf;
 #endif
+#ifdef CONFIG_EXAMPLES_ELF_ROMFS
+  struct boardioc_romdisk_s desc;
+#endif
   FAR char *args[1];
   int ret;
   int i;
-  struct boardioc_romdisk_s desc;
 
   /* Initialize the memory monitor */
 


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #712: examples/elf: Fix error: unused variable 'desc' [-Werror=unused-variable]

2021-05-12 Thread GitBox


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


   Since CI is breaking now, I will merge this first and restart PR 
https://github.com/apache/incubator-nuttx/pull/3706 directly.


-- 
This is an automated message from the 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 #3706: board: Enable CONFIG_BOARDCTL_ROMDISK

2021-05-12 Thread GitBox


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


   Fix here: https://github.com/apache/incubator-nuttx-apps/pull/712


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

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




[GitHub] [incubator-nuttx-apps] xiaoxiang781216 opened a new pull request #712: examples/elf: Fix error: unused variable 'desc' [-Werror=unused-variable]

2021-05-12 Thread GitBox


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


   # Summary
   Regress by PR https://github.com/apache/incubator-nuttx-apps/pull/709
   
   ## Impact
   Minor, warning only fix
   
   ## 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




[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #3707: Fix NFS over TCP

2021-05-12 Thread GitBox


masayuki2009 commented on pull request #3707:
URL: https://github.com/apache/incubator-nuttx/pull/3707#issuecomment-840158060


   Hmm, build error happened with sim/posix_spawn.
   I think the error does not relate to this PR.
   
   
   ```
   

   Configuration/Tool: sim/posix_spawn
   

 Cleaning...
 Configuring...
 Building NuttX...
   machine/sim/arch_setjmp.S: Assembler messages:
   machine/sim/arch_setjmp.S:101: Error: operand type mismatch for `jmp'
   make[1]: *** [Makefile:130: bin/arch_setjmp.o] Error 1
   stdio/lib_libvsprintf.c: In function 'vsprintf_internal':
   Error: stdio/lib_libvsprintf.c:405:19: error: duplicate case value
 405 |   case sizeof(unsigned long long):
 |   ^~~~
   ```


-- 
This is an automated message from the 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 #3707: Fix NFS over TCP

2021-05-12 Thread GitBox


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


   ## Summary
   
   - This PR consists of the following commits to fix NFS over TCP
   - commit 1: fs: nfs: Fix rpcclnt_send() in TCP mode 
 - I noticed that NFS over TCP does not work with Ubuntu 18.04
 - Finally, I found that the record marking packet should not
be sent separately
 - This commit fixes this issue
   - commit 2: fs: nfs: Fix to read a large packet in TCP mode
  - I noticed that receiving a read large packet (e.g. 2KB) in TCP
 mode does not work correctly
  - Actually, rpcclnt_receive() only received up to MSS
  - This commit fixes this issue  
   - commit 3: fs: nfs: Do not bind to a local port in TCP mode
  - Since binding to a local port is not necessary in TCP mode,
 it should be removed
   - commit 4: boards: sabre-6quad: Update netnsh/netnsh_smp defconfigs
   - commit 5: boards: spresense: Update rndis/rndis_smp/wifi/wifi_smp 
defconfigs
   
   ## Impact
   
   -  TCP mode only
   
   ## Testing
   
   - Tested with NFS server on Ubuntu 18.04 (x86_64)
   
   


-- 
This is an automated message from the 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 #3706: board: Enable CONFIG_BOARDCTL_ROMDISK

2021-05-12 Thread GitBox


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


   Still failing 
   ```
   elf_main.c: In function 'elf_main':
   Error: elf_main.c:209:29: error: unused variable 'desc' 
[-Werror=unused-variable]
 209 |   struct boardioc_romdisk_s desc;
 | ^~~~
   
   ```


-- 
This is an automated message from the 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] tanushreebaindur commented on pull request #3689: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-12 Thread GitBox


tanushreebaindur commented on pull request #3689:
URL: https://github.com/apache/incubator-nuttx/pull/3689#issuecomment-840055584


   I have seen that build error when CONFIG_BOARDCTL_ROMDISK is not enabled in 
the defconfig. 
   
   CONFIG_BOARDCTL_ROMDISK can be enabled by doing the following in menuconfig: 
BOARD  SELECTION -> Enable application space creation of ROM disks.
   
   I have used a simulator only to test the code changes. Could the  build 
break in  docker: add ninja-build #3705 be happening because a similar change 
must be made to the defconfig in spresense/elf, spresense/posix_spawn and 
spresense/module?


-- 
This is an automated message from the 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] gustavonihei edited a comment on pull request #695: webclient: Implement non-blocking I/O

2021-05-12 Thread GitBox


gustavonihei edited a comment on pull request #695:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/695#issuecomment-839761694


   > > > if the code is bug-free, the value doesn't matter.
   > > > they should not be used by anyone.
   > > > thus those NULLify should not be necessary.
   > > 
   > > 
   > > The value wouldn't matter if it were stored in a local variable, but it 
is not the case. Since the lifetime of this dangling pointer is extended, the 
value does matter.
   > > And all it takes for a software to change from "Bug-free" to 
"Vulnerable" is one single commit.
   > > And if this single commit naively operates on this dangling pointer, the 
system will crash.
   > 
   > why doesn't a local variable matter?
   > with your logic, i think the value left on stack might be unintentionally 
used by a buggy software.
   > 
   Well, I was referring to local variables that are about to go out-of-scope, 
that's why I mentioned the extended lifetime for the other cases where the 
value does matter.
   If a local variable goes out-of-scope (i.e. its lifetime is over), it cannot 
be referenced anymore, so its pointer value is harmless. But I won't bother if 
you still want to nullify it.
   
   > > > i pushed a counter-proposal to the defensive style. 
[219356c](https://github.com/apache/incubator-nuttx-apps/commit/219356ce7d1b8a26140c98d303d493c6f04b19e9)
   > > 
   > > 
   > > Good, this commit may be a proof that this code is not **currently** 
buggy. But that's not the issue I raised.
   > > Now, here it is a simple unit test for making this potential bug evident:
   > > https://godbolt.org/z/f4dzW8M44
   > 
   > the unit test is just broken.
   > it doesn't seem to support your argument.
   
   Guess why it is broken?
   ```
   Program stderr
   free(): double free detected in tcache 2
   ```
   I rest my case.
   
   


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

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




[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on issue #246: Illegal calls to romdisk_register()

2021-05-12 Thread GitBox


xiaoxiang781216 commented on issue #246:
URL: 
https://github.com/apache/incubator-nuttx-apps/issues/246#issuecomment-840011222


   Since the modification is simple, the change pass the CI  should be OK to 
merge.


-- 
This is an automated message from the 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 #3706: board: Enable CONFIG_BOARDCTL_ROMDISK

2021-05-12 Thread GitBox


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


   ## Summary
   to fix build break by commit 3156aa7532c5097c9
   
   ## 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] v01d commented on pull request #3705: docker: add ninja-build

2021-05-12 Thread GitBox


v01d commented on pull request #3705:
URL: https://github.com/apache/incubator-nuttx/pull/3705#issuecomment-840007917


   ok, thanks!


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

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




[GitHub] [incubator-nuttx] btashton commented on pull request #3689: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-12 Thread GitBox


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


   This PR seemed to have broken master can someone please 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.

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




[incubator-nuttx] branch master updated: docker: add ninja-build

2021-05-12 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 4befbdf  docker: add ninja-build
4befbdf is described below

commit 4befbdfa4ba22dfd8fd9875db49842854cc258a1
Author: Matias N 
AuthorDate: Wed May 12 13:01:37 2021 -0300

docker: add ninja-build
---
 tools/ci/docker/linux/Dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile
index b43eac8..4df92c3 100644
--- a/tools/ci/docker/linux/Dockerfile
+++ b/tools/ci/docker/linux/Dockerfile
@@ -203,6 +203,7 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" 
apt-get install -y -q
   libxext-dev libxext-dev:i386 \
   linux-libc-dev:i386 \
   linux-headers-generic \
+  ninja-build \
   python3 \
   python3-pip \
   python-is-python3 \


[GitHub] [incubator-nuttx] btashton merged pull request #3705: docker: add ninja-build

2021-05-12 Thread GitBox


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


   


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

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




[GitHub] [incubator-nuttx] v01d commented on pull request #3705: docker: add ninja-build

2021-05-12 Thread GitBox


v01d commented on pull request #3705:
URL: https://github.com/apache/incubator-nuttx/pull/3705#issuecomment-839986828


   There's a failure that I'm not sure why is happening here: 
https://github.com/apache/incubator-nuttx/runs/2568398269?check_suite_focus=true#step:7:202
   Seems to be on spressense.


-- 
This is an automated message from the 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 issue #246: Illegal calls to romdisk_register()

2021-05-12 Thread GitBox


tanushreebaindur commented on issue #246:
URL: 
https://github.com/apache/incubator-nuttx-apps/issues/246#issuecomment-839938663


   @xiaoxiang781216 examples/nxflat and examples/thttpd still contain the 
illegal calls to the romdisk_register(). I wasn't able to test those on the 
simulator or board so they are still unchanged. Please let me know if I need to 
open a new issue to track those 2 examples.
   
   This is the message thread for reference: 
http://mail-archives.apache.org/mod_mbox/nuttx-dev/202104.mbox/%3CCABHE6qt1K5P_SNMhZNB6tKba-nqaK1EmfOseVfqRfymdQZwhkQ%40mail.gmail.com%3E
 


-- 
This is an automated message from the 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] davids5 commented on pull request #3699: sched/task: Remove stack argument from nxtask_init

2021-05-12 Thread GitBox


davids5 commented on pull request #3699:
URL: https://github.com/apache/incubator-nuttx/pull/3699#issuecomment-839915698


   @xiaoxiang781216 
   
   I thought the AP supported it. (living in the past I guess) 
   
   This type of a change should be discussed, I see the value but, this is just 
my opinion. Let's get some more feedback
   @antmerlino @btashton @patacongo, @v01d ? 


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

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




[GitHub] [incubator-nuttx] v01d opened a new pull request #3705: docker: add ninja-build

2021-05-12 Thread GitBox


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


   ## Summary
   
   Add ninja-build to docker in order to support CMake ninja generation
   
   ## Impact
   
   None, not used in mainline
   
   ## Testing
   
   CI
   


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

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




[incubator-nuttx-apps] branch releases/cmake created (now 39c5fa8)

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

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


  at 39c5fa8  wireless/wapi: Fix issue of getting the operating frequency

No new revisions were added by this update.


[GitHub] [incubator-nuttx] v01d closed pull request #3589: Migrate build system to CMake

2021-05-12 Thread GitBox


v01d closed pull request #3589:
URL: https://github.com/apache/incubator-nuttx/pull/3589


   


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

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




[GitHub] [incubator-nuttx] v01d commented on pull request #3589: Migrate build system to CMake

2021-05-12 Thread GitBox


v01d commented on pull request #3589:
URL: https://github.com/apache/incubator-nuttx/pull/3589#issuecomment-839879623


   I found an easy way to create the branch from GitHub (I have my remote set 
to a bogus "no_push" to avoid accidental pushes to main repo): 
https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository
   
   I recreated the PR in #3704 


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

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




[GitHub] [incubator-nuttx] v01d opened a new pull request #3704: Migrate build system to CMake

2021-05-12 Thread GitBox


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


   ## Summary
   
   This is an incomplete work in progress, please do not perform a detailed 
review. I've been working quite hard on this last few weeks and my interest at 
this point is to gain visibility to how I structured this, gain some feedback 
to continue the work and hopefully get some help to complete migration and 
testing.
   
   Note that this depends on accompanying apps/ change (which I have in my 
fork's cmake branch: [master..cmake compare 
link](https://github.com/apache/incubator-nuttx-apps/compare/master...v01d:cmake)).
   
   I will continue migration until complete and then rebase to incorporate 
relevant changes that happened in between. 
   For colaboration, I can either accept PRs to my fork or we could setup a new 
branch. Either way, if someone is willing to help, we should coordinate.
   
   ## Some changes part of migration
   
   1. Since the goal is to allow for out-of-tree builds, the context step does 
not create symlinks inside source tree, but in build directory. Include path is 
extended to expose this as expected
   2. Debug/Release flags are handled via CMAKE_BUILD_TYPE as expected, not 
from config options
   3. APPDIR is taken from cmake command line, not from config
   4. Each arch should have a cmake/ directory preparing the required toolchain 
and relevant options
   5. Some specialty functions are defined:
 * nuttx_add_application: defines an application as expected. it adds an 
OBJECT library for each app, which is then built into the libapps.a static lib 
as expected
 * nuttx_add_library: adds a top-level static library which is linked into 
final nuttx binary (libfs, libnet, etc.)
 * nuttx_add_user_library: similar to add_application but not defining an 
application, but a "library"
   6. apps/Kconfig is no longer build-time generated but it is now a static file
   
   Similar to 2 and 3, most likely options defining the host platform should 
not be part of config file.
   
   ## TODO
   
   The following are not yet addressed
   
   - two-phase build: how to handle this?
   - revise toolchain handling: I based my changes on @dagar but I'm not 
entirely sure if there's a 1:1 arch-toolchain mapping or not
   - extend to other arch/boards: only sim and one board supported right now
   - verify all Make.defs/Makefile against CMakeLists.txt once all Make.defs 
are complete
   - support custom boards (currently disabled inclusion of 
boards/dummy/Kconfig)
   - Similar to 2 and 3 points above, remove host/toolchain definition from 
Kconfig, this should be a config time setting
   - Remove control of optimization from Kconfig, this is handled via 
CMAKE_BUILD_TYPE
   - Support module building (extend nuttx_add_application to take a symbol?)
   - Module handling in sim build
   - export: probably needs redesign using cmake, maybe even not needed?
   - Add a flash target (debug also?), and other useful ones
   - ~Avoid having to place .config on source tree (kconfig utils supposeddly 
takes the path to this file and the Kconfig)~ DONE!
   - examples/bridge, examples/flowc, examples/nettest?
 They include host code, this will probably require creating a subproject 
as we cannot have a mixed build as is.
   - examples/module: builds a character device?? Is this right?
   - how to support building apps with external code?
 - ~FetchContent: if child project is CMake, it automatically configures it 
(not always wanted, see libaudiosrc)~ FetchContent_Populate() only downloads + 
extracts
 - ~ExternalProject: delays child configure to build stage, does not allow 
adding sources to parent~
 - ~file(DOWNLOAD ...): manual process~
   - Update GitHub workflow: I've done this but I'm not sure if it works yet
   - Perform extensive testing on other target and host platforms
   - Document the build system under Documentation/ (design and how to add 
board/arch/app)
   - sim_m32 does not link correctly on my machine: test
   
   ### Low-priority (could be in later PR)
   
   - Make applications conform to /include/ and /src/ so that a 
general include/
 is not needed (external apps can also split implementation from interface 
and expose the latter).
   - remove unneeded support for renaming most applications, not real use, only 
adds Kconfig options
   - do we need setting priority via Kconfig of most applications? shouldn't 
this be done on runtime?
   
   ## Conversion checklist:
   
   So far I, this is how far I got the conversion, which allows for sim:nsh to 
build. You fill find some CMakeLists.txt there from @dagar which need adapting 
(you'll see I'm using `target_sources` and `CONFIG` variables are not evaluated 
with `STREQUAL` on the ones I converted). This is quite a tedious and manual 
process so it will take some time to complete (maybe someone wants to lend a 
hand? I can give some instructions). I will definitely need help for 

[incubator-nuttx] branch releases/cmake created (now 8334843)

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

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


  at 8334843  Make noreturn proxies and stubs actually not return

No new revisions were added by this update.


[GitHub] [incubator-nuttx] v01d commented on pull request #3589: Migrate build system to CMake

2021-05-12 Thread GitBox


v01d commented on pull request #3589:
URL: https://github.com/apache/incubator-nuttx/pull/3589#issuecomment-839872969


   Great, thanks. I'll create the branch and recreate this PR to point it there.


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

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




[GitHub] [incubator-nuttx] btashton edited a comment on pull request #3589: Migrate build system to CMake

2021-05-12 Thread GitBox


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


   > Thanks!
   > 
   > We can merge to a branch as Brennan suggests in the meantime. That would 
keep that branch point stable and I will be able to test Mac as well.
   > 
   > How do I create a branch via GitHub? Ideally I would like it to be at the 
branch point of the branch in my fork so CI runs OK. Is that possible?
   
   You have commit access do you can just push the branch to the remote.
   
   To work with the CI system in a clean way where you build with your branch 
on the app side I would recommend using `releases/cmake` as the branch name for 
both repos as that will do the correct pattern matching. 
   


-- 
This is an automated message from the 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 #3589: Migrate build system to CMake

2021-05-12 Thread GitBox


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


   > Thanks!
   > 
   > We can merge to a branch as Brennan suggests in the meantime. That would 
keep that branch point stable and I will be able to test Mac as well.
   > 
   > How do I create a branch via GitHub? Ideally I would like it to be at the 
branch point of the branch in my fork so CI runs OK. Is that possible?
   
   You have commit access do you can just push the branch to the remote.
   
   To work with the CI system in a clean way where you build with your branch 
on the app side I would recommend using the `releases/cmake` for both repos as 
that will do the correct pattern matching. 
   


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

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




[GitHub] [incubator-nuttx] v01d commented on issue #3695: using "simu" instead of "sim"

2021-05-12 Thread GitBox


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


   This would be a breaking change in lots of places (including docs). I don't 
think the benefit of the rename are good enough to justify the work, IMHO.


-- 
This is an automated message from the 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 #3699: sched/task: Remove stack argument from nxtask_init

2021-05-12 Thread GitBox


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


   @davids5 I create a new PR 
https://github.com/apache/incubator-nuttx/pull/3703 to utilize the stack 
pointer fully. One of these two PR need to merge to avoid the partial solution.


-- 
This is an automated message from the 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/02: Documentation/platforms: added documentation for imxrt10xx boards

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

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

commit 1856a85b2850a49065e8869ccc952fb98dd02c34
Author: Michal Lenc 
AuthorDate: Wed Apr 28 22:54:05 2021 +0200

Documentation/platforms: added documentation for imxrt10xx boards
---
 .../arm/imxrt/boards/imxrt1020-evk/index.rst   |  97 ++
 .../arm/imxrt/boards/imxrt1050-evk/index.rst   | 208 
 .../arm/imxrt/boards/imxrt1060-evk/index.rst   | 272 +++
 .../arm/imxrt/boards/imxrt1064-evk/index.rst   | 272 +++
 boards/arm/imxrt/imxrt1020-evk/README.txt  | 167 --
 boards/arm/imxrt/imxrt1050-evk/README.txt  | 297 -
 boards/arm/imxrt/imxrt1060-evk/README.txt  | 363 -
 boards/arm/imxrt/imxrt1064-evk/README.txt  | 363 -
 8 files changed, 849 insertions(+), 1190 deletions(-)

diff --git a/Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst 
b/Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst
new file mode 100644
index 000..67e53f4
--- /dev/null
+++ b/Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst
@@ -0,0 +1,97 @@
+===
+i.MX RT1020 EVK
+===
+
+`i.MX RT1020 EVK 
`_
+is an evaluation kit by NXP company. This kit uses the i.MX RT1020 crossover 
MCU in LQFP144 package with Arm Cortex M7 core.
+
+Features
+
+
+- Processor
+- MIMXRT1021DAG5A processor
+- Memory
+- 256 Mb SDRAM memory
+- 64 Mb QSPI Flash
+- TF socket for SD card
+- Display and Audio
+- Audio CODEC
+- 4-pole audio headphone jack
+- External speaker connection
+- Microphone
+- Connectivity
+- Micro USB host and OTG connectors
+- Ethernet (10/100T) connector
+- CAN transceivers
+- Arduino® interface
+
+Serial Console
+==
+
+The EVK default console is on LPUART1, which is multiplexed onto
+the debug port (either OpenSDA or SEGGER JLink).
+
+It runs at 115200,n,8,1.
+
+LEDs and Buttons
+
+
+LEDs
+
+
+There is one user accessible LED status indicator located on the 1020-EVK,
+USERLED.  The function of the LEDs include:
+
+- D3: Power (Green) & Overpower (Red)
+- D5: User LED (Green) GPIO_AD_B0_05
+- D15: RST LED (Red)
+
+This LED is not used by the board port unless CONFIG_ARCH_LEDS is
+defined.  In that case, the usage by the board port is defined in
+include/board.h and src/imxrt_autoleds.c. The LED is used to encode
+OS-related events as documented in board.h
+
+ === =
+SYMBOL   Meaning LED
+ === =
+LED_STARTED  NuttX has been started  OFF
+LED_HEAPALLOCATE Heap has been allocated OFF
+LED_IRQSENABLED  Interrupts enabled  OFF
+LED_STACKCREATED Idle stack created  ON
+LED_INIRQIn an interrupt N/C
+LED_SIGNAL   In a signal handler N/C
+LED_ASSERTIONAn assertion failed N/C
+LED_PANICThe system has crashed  FLASH
+ === =
+
+Thus if the LED is statically on, NuttX has successfully  booted and is,
+apparently, running normally.  If the LED is flashing at approximately
+2Hz, then a fatal error has been detected and the system has halted.
+
+
+Buttons
+---
+
+This IMXRT board has three external buttons
+
+- SW2 (IRQ88, ONOFF)  Not on a GPIO, No muxing
+- SW3 (IRQ88, POR)Not on a GPIO, No muxing
+- SW4 (IRQ88, USER)   Wakeup, GPIO5-0
+
+Configurations
+==
+
+netnsh
+--
+
+This configuration is similar to the nsh configuration except that is
+has networking enabled, both IPv4 and IPv6.  This NSH configuration is
+focused on network-related testing.
+
+nsh
+---
+
+Configures the NuttShell (nsh) located at examples/nsh.  This NSH
+configuration is focused on low level, command-line driver testing.
+Built-in applications are supported, but none are enabled.  This
+configuration does not support a network.
diff --git a/Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst 
b/Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst
new file mode 100644
index 000..1bbc7dc
--- /dev/null
+++ b/Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst
@@ -0,0 +1,208 @@
+===
+i.MX RT1050 EVK
+===
+
+`i.MX RT1050 EVK 
`_
+is an evaluation kit by NXP company. This kit uses the i.MX RT1050 crossover 
MCU with Arm Cortex M7 core.
+
+Features
+
+
+- Processor
+- MIMXRT1052DVL6A processor
+- Memory
+- 256 Mb SDRAM memory
+- 512 Mb Hyper Flash
+- 

[GitHub] [incubator-nuttx] v01d merged pull request #3634: Documentation/platforms: added documentation for imxrt10xx boards

2021-05-12 Thread GitBox


v01d merged pull request #3634:
URL: https://github.com/apache/incubator-nuttx/pull/3634


   


-- 
This is an automated message from the 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: Documentation/platforms: fix docs style and add photo for imxrt1060-evk board

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

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

commit d6227623b78ea213a8627edbbdbcfebc357b12ea
Author: Michal Lenc 
AuthorDate: Thu Apr 29 17:41:11 2021 +0200

Documentation/platforms: fix docs style and add photo for imxrt1060-evk 
board

Signed-off-by: Michal Lenc 
---
 .../arm/imxrt/boards/imxrt1020-evk/index.rst   |  20 ++--
 .../arm/imxrt/boards/imxrt1050-evk/index.rst   | 125 ---
 .../boards/imxrt1060-evk/imxrt1060-evk-front.jpg   | Bin 0 -> 109235 bytes
 .../arm/imxrt/boards/imxrt1060-evk/index.rst   | 132 +
 .../arm/imxrt/boards/imxrt1064-evk/index.rst   |  39 +++---
 5 files changed, 88 insertions(+), 228 deletions(-)

diff --git a/Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst 
b/Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst
index 67e53f4..922e062 100644
--- a/Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst
+++ b/Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst
@@ -3,7 +3,7 @@ i.MX RT1020 EVK
 ===
 
 `i.MX RT1020 EVK 
`_
-is an evaluation kit by NXP company. This kit uses the i.MX RT1020 crossover 
MCU in LQFP144 package with Arm Cortex M7 core.
+is an evaluation kit by NXP company. This kit uses the i.MX RT1020 crossover 
MCU in LQFP144 package with ARM Cortex M7 core.
 
 Features
 
@@ -42,9 +42,13 @@ LEDs
 There is one user accessible LED status indicator located on the 1020-EVK,
 USERLED.  The function of the LEDs include:
 
-- D3: Power (Green) & Overpower (Red)
-- D5: User LED (Green) GPIO_AD_B0_05
-- D15: RST LED (Red)
+===  ==
+Pin Description  Colour
+===  ==
+D3  Power Supply Green
+D5  User LED Green
+D15 Reset LEDRed
+===  ==
 
 This LED is not used by the board port unless CONFIG_ARCH_LEDS is
 defined.  In that case, the usage by the board port is defined in
@@ -74,9 +78,11 @@ Buttons
 
 This IMXRT board has three external buttons
 
-- SW2 (IRQ88, ONOFF)  Not on a GPIO, No muxing
-- SW3 (IRQ88, POR)Not on a GPIO, No muxing
-- SW4 (IRQ88, USER)   Wakeup, GPIO5-0
+=== ==  
+SW2 (IRQ88, ONOFF)  Not on a GPIO, No muxing
+SW3 (IRQ88, POR)Not on a GPIO, No muxing
+SW4 (IRQ88, USER)   Wakeup, GPIO5-0
+=== ==  
 
 Configurations
 ==
diff --git a/Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst 
b/Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst
index 1bbc7dc..ad90ec8 100644
--- a/Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst
+++ b/Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst
@@ -3,7 +3,7 @@ i.MX RT1050 EVK
 ===
 
 `i.MX RT1050 EVK 
`_
-is an evaluation kit by NXP company. This kit uses the i.MX RT1050 crossover 
MCU with Arm Cortex M7 core.
+is an evaluation kit by NXP company. This kit uses the i.MX RT1050 crossover 
MCU with ARM Cortex M7 core.
 
 Features
 
@@ -34,13 +34,17 @@ Serial Console
 
 Virtual console port provided by OpenSDA:
 
-- UART1_TXD   GPIO_AD_B0_12  LPUART1_TX
-- UART1_RXD   GPIO_AD_B0_13  LPUART1_RX
+= = ==
+UART1_TXD GPIO_AD_B0_12 LPUART1_TX
+UART1_RXD GPIO_AD_B0_13 LPUART1_RX
+= = ==
 
 Arduino RS-232 Shield:
 
-- J22 D0 UART_RX/D0  GPIO_AD_B1_07  LPUART3_RX
-- J22 D1 UART_TX/D1  GPIO_AD_B1_06  LPUART3_TX
+=== == === = ==
+J22 D0 UART_RX GPIO_AD_B1_07 LPUART3_RX
+J22 D1 UART_TX GPIO_AD_B1_06 LPUART3_TX
+=== == === = ==
 
 LEDs and buttons
 
@@ -51,13 +55,14 @@ LEDs
 There are four LED status indicators located on the EVK Board.  The
 functions of these LEDs include:
 
-- Main Power Supply(D3)
-- Green: DC 5V main supply is normal.
-- Red:   J2 input voltage is over 5.6V.
-- Off:   The board is not powered.
-- Reset RED LED(D15)
-- OpenSDA LED(D16)
-- USER LED(D18)
+=== 
+Pin Description
+=== 
+D3  Power Supply
+D15 Reset LED
+D16 OpenSDA
+D18 User LED
+=== 
 
 Only a single LED, D18, is under software control.  It connects to
 GPIO_AD_B0_09 which is shared with JTAG_TDI and ENET_RST
@@ -89,10 +94,10 @@ Buttons
 
 There are four user interface switches on the MIMXRT1050 EVK Board:
 
-- SW1: Power Switch (slide switch)
-- SW2: ON/OFF Button
-- SW3: Reset button
-- SW8: User button
+  - SW1: Power Switch (slide switch)
+  - SW2: ON/OFF Button
+  - SW3: Reset button
+  - SW8: User button
 
 Only the user button is available to the 

[incubator-nuttx] branch master updated (77bb231 -> d622762)

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

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


from 77bb231  Documentation/esp32c3-devkit: Fix the name of the ESP32-C3 
DevkitM image.
 new 1856a85  Documentation/platforms: added documentation for imxrt10xx 
boards
 new d622762  Documentation/platforms: fix docs style and add photo for 
imxrt1060-evk board

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:
 .../arm/imxrt/boards/imxrt1020-evk/index.rst   | 103 ++
 .../arm/imxrt/boards/imxrt1050-evk/index.rst   | 129 
 .../boards/imxrt1060-evk/imxrt1060-evk-front.jpg   | Bin 0 -> 109235 bytes
 .../arm/imxrt/boards/imxrt1060-evk/index.rst   | 200 
 .../arm/imxrt/boards/imxrt1064-evk/index.rst   | 277 
 boards/arm/imxrt/imxrt1020-evk/README.txt  | 167 --
 boards/arm/imxrt/imxrt1050-evk/README.txt  | 297 -
 boards/arm/imxrt/imxrt1060-evk/README.txt  | 363 -
 boards/arm/imxrt/imxrt1064-evk/README.txt  | 363 -
 9 files changed, 709 insertions(+), 1190 deletions(-)
 create mode 100644 
Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst
 create mode 100644 
Documentation/platforms/arm/imxrt/boards/imxrt1050-evk/index.rst
 create mode 100644 
Documentation/platforms/arm/imxrt/boards/imxrt1060-evk/imxrt1060-evk-front.jpg
 create mode 100644 
Documentation/platforms/arm/imxrt/boards/imxrt1060-evk/index.rst
 create mode 100644 
Documentation/platforms/arm/imxrt/boards/imxrt1064-evk/index.rst
 delete mode 100644 boards/arm/imxrt/imxrt1020-evk/README.txt
 delete mode 100644 boards/arm/imxrt/imxrt1050-evk/README.txt
 delete mode 100644 boards/arm/imxrt/imxrt1060-evk/README.txt
 delete mode 100644 boards/arm/imxrt/imxrt1064-evk/README.txt


[GitHub] [incubator-nuttx] antmerlino commented on pull request #3589: Migrate build system to CMake

2021-05-12 Thread GitBox


antmerlino commented on pull request #3589:
URL: https://github.com/apache/incubator-nuttx/pull/3589#issuecomment-839833532


   @v01d 
   
   I don't use loadable modules or kernel/protected modes at the moment - so 
I'm not sure I'd understand the subtleties as much as others might.
   
   @btashton suggestion to move to a branch for CI/development should make 
things a little easier to collaborate. 
   
   Let me see if I can pull the branch and at least catch up on where you are 
at. Full disclosure, I'm not sure I'll have time to dig into this, but I'll try 
and do what I can - I really appreciate the effort you are putting into this. 
It will be a really good improvement. 


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

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




[GitHub] [incubator-nuttx] v01d commented on pull request #3634: Documentation/platforms: added documentation for imxrt10xx boards

2021-05-12 Thread GitBox


v01d commented on pull request #3634:
URL: https://github.com/apache/incubator-nuttx/pull/3634#issuecomment-839833486


   Looks good now, thanks


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

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




[GitHub] [incubator-nuttx] acassis edited a comment on issue #3695: using "simu" instead of "sim"

2021-05-12 Thread GitBox


acassis edited a comment on issue #3695:
URL: 
https://github.com/apache/incubator-nuttx/issues/3695#issuecomment-839831993


   maybe replacing "sim" with "simulator" is a better alternative, it will 
avoid confusion and the name is not big at all.


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

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




[GitHub] [incubator-nuttx] acassis commented on issue #3695: using "simu" instead of "sim"

2021-05-12 Thread GitBox


acassis commented on issue #3695:
URL: 
https://github.com/apache/incubator-nuttx/issues/3695#issuecomment-839831993


   maybe replace "sim" with "simulator" is a better alternative, it will avoid 
confusion and the name is not big at all.


-- 
This is an automated message from the 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 #3703: sched/spawn: Support the stack address argument

2021-05-12 Thread GitBox


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


   ## Summary
   This patch enable user pass the custom stack point.
   
   ## Impact
   new API
   
   ## 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] michallenc commented on a change in pull request #3634: Documentation/platforms: added documentation for imxrt10xx boards

2021-05-12 Thread GitBox


michallenc commented on a change in pull request #3634:
URL: https://github.com/apache/incubator-nuttx/pull/3634#discussion_r631077544



##
File path: Documentation/platforms/arm/imxrt/boards/imxrt1020-evk/index.rst
##
@@ -0,0 +1,99 @@
+===
+i.MX RT1020 EVK
+===
+
+`i.MX RT1020 EVK 
`_
+is an evaluation kit by NXP company. This kit uses the i.MX RT1020 crossover 
MCU in LQFP144 package with ARM Cortex M7 core.
+
+Features
+
+
+- Processor
+- MIMXRT1021DAG5A processor
+- Memory
+- 256 Mb SDRAM memory
+- 64 Mb QSPI Flash
+- TF socket for SD card
+- Display and Audio
+- Audio CODEC
+- 4-pole audio headphone jack
+- External speaker connection
+- Microphone
+- Connectivity
+- Micro USB host and OTG connectors
+- Ethernet (10/100T) connector
+- CAN transceivers
+- Arduino® interface
+
+Serial Console
+==
+
+The EVK default console is on LPUART1, which is multiplexed onto
+the debug port (either OpenSDA or SEGGER JLink).
+
+It runs at 115200,n,8,1.
+
+LEDs and Buttons
+
+
+LEDs
+
+
+There is one user accessible LED status indicator located on the 1020-EVK,
+USERLED.  The function of the LEDs include:
+
+- D3: Power (Green) & Overpower (Red)
+- D5: User LED (Green) GPIO_AD_B0_05
+- D15: RST LED (Red)

Review comment:
   @v01d Could you take a look at it? I think we can merge it now.




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

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




[GitHub] [incubator-nuttx-apps] gustavonihei edited a comment on pull request #695: webclient: Implement non-blocking I/O

2021-05-12 Thread GitBox


gustavonihei edited a comment on pull request #695:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/695#issuecomment-839761694


   > > > if the code is bug-free, the value doesn't matter.
   > > > they should not be used by anyone.
   > > > thus those NULLify should not be necessary.
   > > 
   > > 
   > > The value wouldn't matter if it were stored in a local variable, but it 
is not the case. Since the lifetime of this dangling pointer is extended, the 
value does matter.
   > > And all it takes for a software to change from "Bug-free" to 
"Vulnerable" is one single commit.
   > > And if this single commit naively operates on this dangling pointer, the 
system will crash.
   > 
   > why doesn't a local variable matter?
   > with your logic, i think the value left on stack might be unintentionally 
used by a buggy software.
   > 
   Well, I was referring to local variables that are about to go out-of-scope, 
that's why I mentioned the extended lifetime for the other cases where the 
value does matter.
   If a local variable goes out-of-scope (i.e. it's lifetime is over), it 
cannot be referenced anymore, so its pointer value is harmless. But I won't 
bother if you still want to nullify it.
   
   > > > i pushed a counter-proposal to the defensive style. 
[219356c](https://github.com/apache/incubator-nuttx-apps/commit/219356ce7d1b8a26140c98d303d493c6f04b19e9)
   > > 
   > > 
   > > Good, this commit may be a proof that this code is not **currently** 
buggy. But that's not the issue I raised.
   > > Now, here it is a simple unit test for making this potential bug evident:
   > > https://godbolt.org/z/f4dzW8M44
   > 
   > the unit test is just broken.
   > it doesn't seem to support your argument.
   
   Guess why it is broken?
   ```
   Program stderr
   free(): double free detected in tcache 2
   ```
   I rest my case.
   
   


-- 
This is an automated message from the 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] gustavonihei commented on a change in pull request #3701: riscv/esp32c3: Add ESP32C3 LEDC(PWM) driver

2021-05-12 Thread GitBox


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



##
File path: boards/risc-v/esp32c3/esp32c3-devkit/configs/pwm/defconfig
##
@@ -0,0 +1,47 @@
+#
+# 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_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+# CONFIG_NSH_CMDPARMS is not set
+CONFIG_ARCH="risc-v"
+CONFIG_ARCH_BOARD="esp32c3-devkit"
+CONFIG_ARCH_BOARD_ESP32C3_DEVKIT=y
+CONFIG_ARCH_CHIP="esp32c3"
+CONFIG_ARCH_CHIP_ESP32C3=y
+CONFIG_ARCH_CHIP_ESP32C3WROOM02=y
+CONFIG_ARCH_INTERRUPTSTACK=1536
+CONFIG_ARCH_RISCV=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=15000
+CONFIG_BUILTIN=y
+CONFIG_DEV_ZERO=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=2048
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_PERROR_STDOUT=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_MAX_TASKS=8
+CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_NSH_STRERROR=y
+CONFIG_PREALLOC_TIMERS=0
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSTEM_NSH=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+CONFIG_ESP32C3_LEDC=y
+CONFIG_ESP32C3_LEDC_TIM0=y
+CONFIG_EXAMPLES_PWM=y

Review comment:
   This defconfig does not seem have been automatically generated, since 
the configs are not alphabetically sorted.
   That is the reason the CI is complaining.




-- 
This is an automated message from the 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] gustavonihei commented on a change in pull request #3701: riscv/esp32c3: Add ESP32C3 LEDC(PWM) driver

2021-05-12 Thread GitBox


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



##
File path: boards/risc-v/esp32c3/esp32c3-devkit/configs/pwm/defconfig
##
@@ -0,0 +1,47 @@
+#
+# 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_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+# CONFIG_NSH_CMDPARMS is not set
+CONFIG_ARCH="risc-v"
+CONFIG_ARCH_BOARD="esp32c3-devkit"
+CONFIG_ARCH_BOARD_ESP32C3_DEVKIT=y
+CONFIG_ARCH_CHIP="esp32c3"
+CONFIG_ARCH_CHIP_ESP32C3=y
+CONFIG_ARCH_CHIP_ESP32C3WROOM02=y
+CONFIG_ARCH_INTERRUPTSTACK=1536
+CONFIG_ARCH_RISCV=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=15000
+CONFIG_BUILTIN=y
+CONFIG_DEV_ZERO=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=2048
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_PERROR_STDOUT=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_MAX_TASKS=8
+CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_NSH_STRERROR=y
+CONFIG_PREALLOC_TIMERS=0
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSTEM_NSH=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+CONFIG_ESP32C3_LEDC=y
+CONFIG_ESP32C3_LEDC_TIM0=y
+CONFIG_EXAMPLES_PWM=y

Review comment:
   This defconfig does not seem have been automatically generated, since 
the configs are not alphabetically sorted.




-- 
This is an automated message from the 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] gustavonihei commented on a change in pull request #3701: riscv/esp32c3: Add ESP32C3 LEDC(PWM) driver

2021-05-12 Thread GitBox


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



##
File path: boards/risc-v/esp32c3/esp32c3-devkit/configs/pwm/defconfig
##
@@ -0,0 +1,47 @@
+#
+# 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_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+# CONFIG_NSH_CMDPARMS is not set
+CONFIG_ARCH="risc-v"
+CONFIG_ARCH_BOARD="esp32c3-devkit"
+CONFIG_ARCH_BOARD_ESP32C3_DEVKIT=y
+CONFIG_ARCH_CHIP="esp32c3"
+CONFIG_ARCH_CHIP_ESP32C3=y
+CONFIG_ARCH_CHIP_ESP32C3WROOM02=y
+CONFIG_ARCH_INTERRUPTSTACK=1536
+CONFIG_ARCH_RISCV=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=15000
+CONFIG_BUILTIN=y
+CONFIG_DEV_ZERO=y
+CONFIG_FS_PROCFS=y
+CONFIG_IDLETHREAD_STACKSIZE=2048
+CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_PERROR_STDOUT=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_MAX_TASKS=8
+CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_NSH_STRERROR=y
+CONFIG_PREALLOC_TIMERS=0
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_START_DAY=29
+CONFIG_START_MONTH=11
+CONFIG_START_YEAR=2019
+CONFIG_SYSTEM_NSH=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+CONFIG_ESP32C3_LEDC=y
+CONFIG_ESP32C3_LEDC_TIM0=y
+CONFIG_EXAMPLES_PWM=y

Review comment:
   ```suggestion
   CONFIG_ESP32C3_LEDC=y
   CONFIG_ESP32C3_LEDC_TIM0=y
   CONFIG_EXAMPLES_PWM=y
   ```
   This defconfig does not seem have been automatically generated, since the 
configs are not alphabetically sorted.




-- 
This is an automated message from the 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 (1666793 -> 77bb231)

2021-05-12 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 1666793  risc-v/esp32c3: Support ESP32-C3 PM standby and sleep
 new 42232fa  Documentation/esp32c3: Fix the OpenOCD board.
 new 77bb231  Documentation/esp32c3-devkit: Fix the name of the ESP32-C3 
DevkitM image.

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:
 Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/index.rst | 2 +-
 Documentation/platforms/risc-v/esp32c3/index.rst   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


[GitHub] [incubator-nuttx] acassis merged pull request #3702: Documentation/esp32c3: Fix a couple of issues from #3700

2021-05-12 Thread GitBox


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


   


-- 
This is an automated message from the 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: Documentation/esp32c3-devkit: Fix the name of the ESP32-C3 DevkitM image.

2021-05-12 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 77bb23182763c128acc57ead69ba500f8dd4a0c9
Author: Abdelatif Guettouche 
AuthorDate: Wed May 12 13:41:40 2021 +0100

Documentation/esp32c3-devkit: Fix the name of the ESP32-C3 DevkitM
image.
---
 Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/index.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/index.rst 
b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/index.rst
index 85d01ff..180245a 100644
--- a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/index.rst
+++ b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/index.rst
@@ -18,7 +18,7 @@ mount ESP32-C3 DevKit on a breadboard.
 
   ESP32-C3-DevKitC-02
 
- - .. figure:: ESP32-C3-DevKitM-v1.0.png
+ - .. figure:: ESP32-C3-DevKitM-1-v1.0.png
   :align: center
 
   ESP32-C3-DevKitM-1


[incubator-nuttx] 01/02: Documentation/esp32c3: Fix the OpenOCD board.

2021-05-12 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 42232fa98e2a81116d8aed90c547a9e043348357
Author: Abdelatif Guettouche 
AuthorDate: Wed May 12 13:40:50 2021 +0100

Documentation/esp32c3: Fix the OpenOCD board.

Signed-off-by: Abdelatif Guettouche 
---
 Documentation/platforms/risc-v/esp32c3/index.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/platforms/risc-v/esp32c3/index.rst 
b/Documentation/platforms/risc-v/esp32c3/index.rst
index 8c8026f..3a9c9ca 100644
--- a/Documentation/platforms/risc-v/esp32c3/index.rst
+++ b/Documentation/platforms/risc-v/esp32c3/index.rst
@@ -78,7 +78,7 @@ integrates a USB-to-JTAG adapter.
 
 OpenOCD can then be used::
 
-   openocd -c 'set ESP_RTOS none' -f board/esp32c3_builtin.cfg
+   openocd -c 'set ESP_RTOS none' -f board/esp32c3-builtin.cfg
 
 For versions prior to ESP32-C3 ECO3, an external JTAG adapter is needed.
 It can be connected as follows::


[GitHub] [incubator-nuttx] acassis merged pull request #3679: risc-v/esp32c3: Support ESP32-C3 PM standby and sleep

2021-05-12 Thread GitBox


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


   


-- 
This is an automated message from the 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] gustavonihei edited a comment on pull request #695: webclient: Implement non-blocking I/O

2021-05-12 Thread GitBox


gustavonihei edited a comment on pull request #695:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/695#issuecomment-839761694


   > > > if the code is bug-free, the value doesn't matter.
   > > > they should not be used by anyone.
   > > > thus those NULLify should not be necessary.
   > > 
   > > 
   > > The value wouldn't matter if it were stored in a local variable, but it 
is not the case. Since the lifetime of this dangling pointer is extended, the 
value does matter.
   > > And all it takes for a software to change from "Bug-free" to 
"Vulnerable" is one single commit.
   > > And if this single commit naively operates on this dangling pointer, the 
system will crash.
   > 
   > why doesn't a local variable matter?
   > with your logic, i think the value left on stack might be unintentionally 
used by a buggy software.
   > 
   Well, I was referring to local variables that are about to go out-of-scope, 
that's why I mentioned the extended lifetime for the other cases that the value 
does matter.
   If a local variable goes out-of-scope (i.e. it's lifetime is over), it 
cannot be referenced anymore, so its pointer value is harmless. But I won't 
bother if you still want to nullify it.
   
   > > > i pushed a counter-proposal to the defensive style. 
[219356c](https://github.com/apache/incubator-nuttx-apps/commit/219356ce7d1b8a26140c98d303d493c6f04b19e9)
   > > 
   > > 
   > > Good, this commit may be a proof that this code is not **currently** 
buggy. But that's not the issue I raised.
   > > Now, here it is a simple unit test for making this potential bug evident:
   > > https://godbolt.org/z/f4dzW8M44
   > 
   > the unit test is just broken.
   > it doesn't seem to support your argument.
   
   Oh, really? Guess why it is broken?
   ```
   Program stderr
   free(): double free detected in tcache 2
   ```
   I rest my case.
   
   


-- 
This is an automated message from the 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] gustavonihei edited a comment on pull request #695: webclient: Implement non-blocking I/O

2021-05-12 Thread GitBox


gustavonihei edited a comment on pull request #695:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/695#issuecomment-839761694


   > > > if the code is bug-free, the value doesn't matter.
   > > > they should not be used by anyone.
   > > > thus those NULLify should not be necessary.
   > > 
   > > 
   > > The value wouldn't matter if it were stored in a local variable, but it 
is not the case. Since the lifetime of this dangling pointer is extended, the 
value does matter.
   > > And all it takes for a software to change from "Bug-free" to 
"Vulnerable" is one single commit.
   > > And if this single commit naively operates on this dangling pointer, the 
system will crash.
   > 
   > why doesn't a local variable matter?
   > with your logic, i think the value left on stack might be unintentionally 
used by a buggy software.
   > 
   Well, I was referring to local variables that are about to go out-of-scope, 
that's why I mentioned the extended lifetime for the other cases where the 
value does matter.
   If a local variable goes out-of-scope (i.e. it's lifetime is over), it 
cannot be referenced anymore, so its pointer value is harmless. But I won't 
bother if you still want to nullify it.
   
   > > > i pushed a counter-proposal to the defensive style. 
[219356c](https://github.com/apache/incubator-nuttx-apps/commit/219356ce7d1b8a26140c98d303d493c6f04b19e9)
   > > 
   > > 
   > > Good, this commit may be a proof that this code is not **currently** 
buggy. But that's not the issue I raised.
   > > Now, here it is a simple unit test for making this potential bug evident:
   > > https://godbolt.org/z/f4dzW8M44
   > 
   > the unit test is just broken.
   > it doesn't seem to support your argument.
   
   Oh, really? Guess why it is broken?
   ```
   Program stderr
   free(): double free detected in tcache 2
   ```
   I rest my case.
   
   


-- 
This is an automated message from the 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] gustavonihei commented on pull request #695: webclient: Implement non-blocking I/O

2021-05-12 Thread GitBox


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


   > > > > By the way, instead of undervaluing the reviewer's methods, please 
explain clearly on why an issue is not valid. If I am still wrong on the other 
raised issues, I'd like to learn from them.
   > > > 
   > > > 
   > > > if the code is bug-free, the value doesn't matter.
   > > > they should not be used by anyone.
   > > > thus those NULLify should not be necessary.
   > > 
   > > 
   > > The value wouldn't matter if it were stored in a local variable, but it 
is not the case. Since the lifetime of this dangling pointer is extended, the 
value does matter.
   > > And all it takes for a software to change from "Bug-free" to 
"Vulnerable" is one single commit.
   > > And if this single commit naively operates on this dangling pointer, the 
system will crash.
   > 
   > why doesn't a local variable matter?
   > with your logic, i think the value left on stack might be unintentionally 
used by a buggy software.
   > 
   Well, I was referring to local variables that are about to go out-of-scope, 
that's why I mentioned the extended lifetime for the other cases that the value 
does matter.
   If a local variable goes out-of-scope (i.e. it's lifetime is over), it 
cannot be referenced anymore, so its pointer value is harmless. But I won't 
bother if you still want to nullify it.
   
   > > > i pushed a counter-proposal to the defensive style. 
[219356c](https://github.com/apache/incubator-nuttx-apps/commit/219356ce7d1b8a26140c98d303d493c6f04b19e9)
   > > 
   > > 
   > > Good, this commit may be a proof that this code is not **currently** 
buggy. But that's not the issue I raised.
   > > Now, here it is a simple unit test for making this potential bug evident:
   > > https://godbolt.org/z/f4dzW8M44
   > 
   > the unit test is just broken.
   > it doesn't seem to support your argument.
   
   Oh, really? Guess why it is broken?
   ```
   Program stderr
   free(): double free detected in tcache 2
   ```
   I rest my case.
   
   


-- 
This is an automated message from the 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 opened a new pull request #3702: Documentation/esp32c3: Fix a couple of issues from #3700

2021-05-12 Thread GitBox


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


   ## Summary
   Fix a couple of issues from 
https://github.com/apache/incubator-nuttx/pull/3700
   ## Impact
   N/A
   ## Testing
   N/A


-- 
This is an automated message from the 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 edited a comment on pull request #3699: sched/task: Remove stack argument from nxtask_init

2021-05-12 Thread GitBox


xiaoxiang781216 edited a comment on pull request #3699:
URL: https://github.com/apache/incubator-nuttx/pull/3699#issuecomment-839709958


   > @xiaoxiang781216 - This precludes a statically defined system. It should 
not brought in.
   
   Here is my thought:
   
   1. All public API task_create/kthread_create/posix_spawn doesn't accept 
stack pointer as argument
   2. nxtask_init still do the dynamical allocation internally(e.g. 
task_group...)
   
   If the statical allocation is the target, the public API should accept the 
stack pointer at least. Do you think it's better to add stackaddr field in 
posix_a like this:
   ```
   struct posix_spawnattr_s
   {
 FAR void *stackaddr;   
 size_tstacksize;
   };
   ```


-- 
This is an automated message from the 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 #3699: sched/task: Remove stack argument from nxtask_init

2021-05-12 Thread GitBox


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


   > @xiaoxiang781216 - This precludes a statically defined system. It should 
not brought in.
   
   Here is my thought:
   
   1. All public API task_create/kthread_create/posix_spawn doesn't accept 
stack pointer as argument
   2. nxtask_init still do the dynamical allocation internally(e.g. 
task_group...)
   
   If the statical allocation is the target, the public API should accept the 
stack pointer at least. Do you think it's better to add stackaddr field in 
posix_a like this:
   ```
   struct posix_spawnattr_s
   {
 FAR void *stackaddr;   
 size_tstacksize;
   };
   ```


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

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




[GitHub] [incubator-nuttx] acassis commented on pull request #3664: avr32dev1: Fix compilation problems for default configuration

2021-05-12 Thread GitBox


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


   > > @ramangopalan thank you for submitting these patches, they are fine. As 
@xiaoxiang781216 said, it should be nice if you can help us to integrate an 
AVR32 toolchain into our CI.
   > 
   > Microchip never upstreamed there avr32 support so the gcc super old and is 
behind a login wall which makes it really unfriendly to include in CI which is 
why we had avoided it.
   
   @btashton Raman pointed me these 32-bit and 64-bit toolchain that doesn't 
need login to download:
   
   
http://www.atmel.com/images/avr32-gnu-toolchain-3.4.2.435-linux.any.x86.tar.gz
   
http://www.atmel.com/Images/avr32-gnu-toolchain-3.4.2.435-linux.any.x86_64.tar.gz
   
   Maybe we can use it


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

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




[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #3689: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-12 Thread GitBox


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


   


-- 
This is an automated message from the 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: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) C file changes: examples/bastest/bastest_main.c, examples/elf/elf_main.c, examples/

2021-05-12 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 3156aa7  Apps Issue #246: Replace romdisk_register() with 
boardctl(BOARDIOC_ROMDISK) C file changes: examples/bastest/bastest_main.c, 
examples/elf/elf_main.c, examples/module/module_main.c, 
examples/posix_spawn/spawn_main.c, examples/romfs/romfs_main.c, 
examples/sotest/sotest_main.c, examples/unionfs/unionfs_main.c
3156aa7 is described below

commit 3156aa7532c5097c96f3394071904c7f91723e33
Author: Tanushree Baindur 
AuthorDate: Sat May 8 13:49:38 2021 -0500

Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
C file changes:
examples/bastest/bastest_main.c, examples/elf/elf_main.c,
examples/module/module_main.c, examples/posix_spawn/spawn_main.c,
examples/romfs/romfs_main.c, examples/sotest/sotest_main.c,
examples/unionfs/unionfs_main.c

Corresponding defconfig files added/modified to test above changes:
   new file:   boards/sim/sim/sim/configs/bastest/defconfig
   new file:   boards/sim/sim/sim/configs/elf/defconfig
   modified:   boards/sim/sim/sim/configs/module/defconfig
   new file:   boards/sim/sim/sim/configs/posix_spawn/defconfig
   new file:   boards/sim/sim/sim/configs/romfs/defconfig
   modified:   boards/sim/sim/sim/configs/sotest/defconfig
   modified:   boards/sim/sim/sim/configs/unionfs/defconfig
   modified:   boards/sim/sim/sim/configs/module32/defconfig
   modified:   boards/sim/sim/sim/configs/sotest32/defconfig
---
 .../sim/sim/configs/{unionfs => bastest}/defconfig | 24 +++---
 .../sim/sim/sim/configs/{unionfs => elf}/defconfig | 28 +++--
 boards/sim/sim/sim/configs/module/defconfig|  3 ++-
 boards/sim/sim/sim/configs/module32/defconfig  |  3 ++-
 .../sim/configs/{unionfs => posix_spawn}/defconfig | 29 --
 .../sim/sim/configs/{unionfs => romfs}/defconfig   | 22 
 boards/sim/sim/sim/configs/sotest/defconfig|  3 ++-
 boards/sim/sim/sim/configs/sotest32/defconfig  |  3 ++-
 boards/sim/sim/sim/configs/unionfs/defconfig   |  1 +
 9 files changed, 87 insertions(+), 29 deletions(-)

diff --git a/boards/sim/sim/sim/configs/unionfs/defconfig 
b/boards/sim/sim/sim/configs/bastest/defconfig
similarity index 65%
copy from boards/sim/sim/sim/configs/unionfs/defconfig
copy to boards/sim/sim/sim/configs/bastest/defconfig
index 6bf932b..30ad75d 100644
--- a/boards/sim/sim/sim/configs/unionfs/defconfig
+++ b/boards/sim/sim/sim/configs/bastest/defconfig
@@ -11,31 +11,47 @@ CONFIG_ARCH_BOARD="sim"
 CONFIG_ARCH_BOARD_SIM=y
 CONFIG_ARCH_CHIP="sim"
 CONFIG_ARCH_SIM=y
+CONFIG_BOARDCTL_APP_SYMTAB=y
+CONFIG_BOARDCTL_POWEROFF=y
 CONFIG_BOARD_LOOPSPERMSEC=0
 CONFIG_BOOT_RUNFROMEXTSRAM=y
 CONFIG_BUILTIN=y
 CONFIG_DEBUG_SYMBOLS=y
-CONFIG_EXAMPLES_UNIONFS=y
-CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_A=4
-CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_B=5
+CONFIG_DEV_LOOP=y
+CONFIG_DEV_ZERO=y
+CONFIG_EXAMPLES_BASTEST=y
+CONFIG_EXAMPLES_BASTEST_DEVMINOR=6
+CONFIG_EXAMPLES_BASTEST_DEVPATH="/dev/ram6"
+CONFIG_EXAMPLES_HELLO=y
 CONFIG_FAT_LCNAMES=y
 CONFIG_FAT_LFN=y
+CONFIG_FSUTILS_PASSWD=y
+CONFIG_FSUTILS_PASSWD_READONLY=y
+CONFIG_FS_BINFS=y
 CONFIG_FS_FAT=y
 CONFIG_FS_PROCFS=y
 CONFIG_FS_ROMFS=y
-CONFIG_FS_UNIONFS=y
 CONFIG_IDLETHREAD_STACKSIZE=4096
+CONFIG_INTERPRETERS_BAS=y
 CONFIG_LIBC_EXECFUNCS=y
+CONFIG_LIBC_STRERROR=y
+CONFIG_LIBM=y
 CONFIG_LIB_ENVPATH=y
 CONFIG_MAX_TASKS=64
 CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_ARCHROMFS=y
 CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_CONSOLE_LOGIN=y
 CONFIG_NSH_FATDEVNO=2
 CONFIG_NSH_FILE_APPS=y
+CONFIG_NSH_MOTD=y
+CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator"
 CONFIG_NSH_READLINE=y
 CONFIG_NSH_ROMFSDEVNO=1
 CONFIG_NSH_ROMFSETC=y
 CONFIG_PATH_INITIAL="/bin"
+CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=2048
+CONFIG_READLINE_TABCOMPLETION=y
 CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_ONEXIT=y
 CONFIG_SCHED_WAITPID=y
diff --git a/boards/sim/sim/sim/configs/unionfs/defconfig 
b/boards/sim/sim/sim/configs/elf/defconfig
similarity index 63%
copy from boards/sim/sim/sim/configs/unionfs/defconfig
copy to boards/sim/sim/sim/configs/elf/defconfig
index 6bf932b..20dad3e 100644
--- a/boards/sim/sim/sim/configs/unionfs/defconfig
+++ b/boards/sim/sim/sim/configs/elf/defconfig
@@ -11,31 +11,43 @@ CONFIG_ARCH_BOARD="sim"
 CONFIG_ARCH_BOARD_SIM=y
 CONFIG_ARCH_CHIP="sim"
 CONFIG_ARCH_SIM=y
+CONFIG_BOARDCTL_APP_SYMTAB=y
+CONFIG_BOARDCTL_POWEROFF=y
+CONFIG_BOARDCTL_ROMDISK=y
 CONFIG_BOARD_LOOPSPERMSEC=0
 CONFIG_BOOT_RUNFROMEXTSRAM=y
 CONFIG_BUILTIN=y
 CONFIG_DEBUG_SYMBOLS=y
-CONFIG_EXAMPLES_UNIONFS=y
-CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_A=4
-CONFIG_EXAMPLES_UNIONFS_RAMDEVNO_B=5
+CONFIG_DEV_LOOP=y
+CONFIG_DEV_ZERO=y
+CONFIG_ELF=y

[incubator-nuttx-apps] branch master updated: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK) C file changes: examples/bastest/bastest_main.c examples/elf/elf_main.c exampl

2021-05-12 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 f0c044a  Apps Issue #246: Replace romdisk_register() with 
boardctl(BOARDIOC_ROMDISK) C file changes:examples/bastest/bastest_main.c   
 examples/elf/elf_main.cexamples/module/module_main.c
examples/posix_spawn/spawn_main.cexamples/romfs/romfs_main.c
examples/sotest/sotest_main.cexamples/unionfs/unionfs_main.c
f0c044a is described below

commit f0c044adb11bd10c23da5ec8e785b57a2671f1dc
Author: Tanushree Baindur 
AuthorDate: Sat May 8 13:33:52 2021 -0500

Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)
C file changes:
   examples/bastest/bastest_main.c
   examples/elf/elf_main.c
   examples/module/module_main.c
   examples/posix_spawn/spawn_main.c
   examples/romfs/romfs_main.c
   examples/sotest/sotest_main.c
   examples/unionfs/unionfs_main.c

Update examples/elf/elf_main.c

Co-authored-by: Xiang Xiao 

Update examples/unionfs/unionfs_main.c

Co-authored-by: Xiang Xiao 

Update examples/unionfs/unionfs_main.c

Co-authored-by: Xiang Xiao 

Update examples/posix_spawn/spawn_main.c

Co-authored-by: Xiang Xiao 

Update examples/elf/elf_main.c

Co-authored-by: Xiang Xiao 

Update examples/elf/elf_main.c

Co-authored-by: Xiang Xiao 
---
 examples/bastest/bastest_main.c   | 25 ---
 examples/elf/elf_main.c   | 43 +++
 examples/module/module_main.c | 40 
 examples/posix_spawn/spawn_main.c | 33 +-
 examples/romfs/romfs_main.c   | 16 ++-
 examples/sotest/sotest_main.c | 31 ++--
 examples/unionfs/unionfs_main.c   | 33 --
 7 files changed, 119 insertions(+), 102 deletions(-)

diff --git a/examples/bastest/bastest_main.c b/examples/bastest/bastest_main.c
index f38e2af..fa244af 100644
--- a/examples/bastest/bastest_main.c
+++ b/examples/bastest/bastest_main.c
@@ -1,5 +1,5 @@
 /
- * examples/bastest/bastest_main.c
+ * apps/examples/bastest/bastest_main.c
  *
  *   Copyright (C) 2014 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt 
@@ -40,7 +40,9 @@
 #include 
 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 #include 
@@ -92,15 +94,23 @@
 int main(int argc, FAR char *argv[])
 {
   int ret;
+  struct boardioc_romdisk_s desc;
 
   /* Create a ROM disk for the ROMFS filesystem */
 
-  printf("Registering romdisk at /dev/ram%d\n", 
CONFIG_EXAMPLES_BASTEST_DEVMINOR);
-  ret = romdisk_register(CONFIG_EXAMPLES_BASTEST_DEVMINOR, (FAR uint8_t 
*)romfs_img,
- NSECTORS(romfs_img_len), SECTORSIZE);
+  printf("Registering romdisk at /dev/ram%d\n",
+  CONFIG_EXAMPLES_BASTEST_DEVMINOR);
+
+  desc.minor= CONFIG_EXAMPLES_BASTEST_DEVMINOR; /* Minor device number 
of the ROM disk. */
+  desc.nsectors = NSECTORS(romfs_img_len);  /* The number of 
sectors in the ROM disk */
+  desc.sectsize = SECTORSIZE;   /* The size of one 
sector in bytes */
+  desc.image= (FAR uint8_t *)romfs_img; /* File system image */
+
+  ret = boardctl(BOARDIOC_ROMDISK, (uintptr_t));
   if (ret < 0)
 {
-  fprintf(stderr, "ERROR: romdisk_register failed: %d\n", ret);
+  fprintf(stderr, "ERROR: romdisk_register failed: %s\n",
+  strerror(errno));
   return 1;
 }
 
@@ -109,11 +119,12 @@ int main(int argc, FAR char *argv[])
   printf("Mounting ROMFS filesystem at target=%s with source=%s\n",
  MOUNTPT, CONFIG_EXAMPLES_BASTEST_DEVPATH);
 
-  ret = mount(CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, "romfs", MS_RDONLY, 
NULL);
+  ret = mount(CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, "romfs",
+  MS_RDONLY, NULL);
   if (ret < 0)
 {
   fprintf(stderr, "ERROR: mount(%s,%s,romfs) failed: %s\n",
-  CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, errno);
+  CONFIG_EXAMPLES_BASTEST_DEVPATH, MOUNTPT, strerror(errno));
   return 1;
 }
 
diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c
index d72d5a9..352f835 100644
--- a/examples/elf/elf_main.c
+++ b/examples/elf/elf_main.c
@@ -1,5 +1,5 @@
 /
- * examples/elf/elf_main.c
+ * apps/examples/elf/elf_main.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ 

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-12 Thread GitBox


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


   


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

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




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

2021-05-12 Thread GitBox


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


   Let's merge both PR and watch the potential build break.


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

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




[GitHub] [incubator-nuttx-apps] xiaoxiang781216 closed issue #246: Illegal calls to romdisk_register()

2021-05-12 Thread GitBox


xiaoxiang781216 closed issue #246:
URL: https://github.com/apache/incubator-nuttx-apps/issues/246


   


-- 
This is an automated message from the 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 #3700: Convert ESP32-C3 README to the new Documentation

2021-05-12 Thread GitBox


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


   


-- 
This is an automated message from the 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 (276fa2f -> 5bd970d)

2021-05-12 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 276fa2f  drivers/serial: Change the default value of 
SERIAL_NPOLLWAITERS to 4
 add df7bd12  boards/risc-v/esp32c3: Convert the README.txt to the new 
Documentation.
 add 5bd970d  Documentation/esp32c3: Explain debugging with OpenOCD.

No new revisions were added by this update.

Summary of changes:
 .../esp32c3-devkit/ESP32-C3-DevKitC-02-v1.1.png| Bin 0 -> 1227567 bytes
 .../esp32c3-devkit/ESP32-C3-DevKitM-1-v1.0.png | Bin 0 -> 1529086 bytes
 .../risc-v/esp32c3/boards/esp32c3-devkit/index.rst |  97 ++
 Documentation/platforms/risc-v/esp32c3/index.rst   | 127 ++
 boards/risc-v/esp32c3/esp32c3-devkit/README.txt| 147 -
 5 files changed, 224 insertions(+), 147 deletions(-)
 create mode 100644 
Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/ESP32-C3-DevKitC-02-v1.1.png
 create mode 100644 
Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/ESP32-C3-DevKitM-1-v1.0.png
 create mode 100644 
Documentation/platforms/risc-v/esp32c3/boards/esp32c3-devkit/index.rst
 create mode 100644 Documentation/platforms/risc-v/esp32c3/index.rst
 delete mode 100644 boards/risc-v/esp32c3/esp32c3-devkit/README.txt


[GitHub] [incubator-nuttx] donghengqaz opened a new pull request #3701: riscv/esp32c3: Add ESP32C3 LEDC(PWM) driver

2021-05-12 Thread GitBox


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


   ## Summary
   
   Add ESP32C3 LEDC(PWM) driver.
   
   ## 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] davids5 commented on pull request #3589: Migrate build system to CMake

2021-05-12 Thread GitBox


davids5 commented on pull request #3589:
URL: https://github.com/apache/incubator-nuttx/pull/3589#issuecomment-839672735


   @v01d - This is great progress. I have a lot going on at the moment and I 
will need to carve out some time to help on this over the next couple of weeks. 


-- 
This is an automated message from the 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] davids5 commented on pull request #3699: sched/task: Remove stack argument from nxtask_init

2021-05-12 Thread GitBox


davids5 commented on pull request #3699:
URL: https://github.com/apache/incubator-nuttx/pull/3699#issuecomment-839661748


   @xiaoxiang781216 - This precludes a statically defined system. It should not 
brought in.


-- 
This is an automated message from the 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: netutils/wakeonlan: Remove the tab from the blank line in Kconfig

2021-05-12 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 bb1e93c  netutils/wakeonlan: Remove the tab from the blank line in 
Kconfig
bb1e93c is described below

commit bb1e93cb67062ccfb65fc1c7236b6745c06c4b08
Author: Xiang Xiao 
AuthorDate: Wed May 12 12:19:11 2021 +0800

netutils/wakeonlan: Remove the tab from the blank line in Kconfig

Signed-off-by: Xiang Xiao 
---
 netutils/wakeonlan/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netutils/wakeonlan/Kconfig b/netutils/wakeonlan/Kconfig
index 92cdd1d..3a3a5ea 100644
--- a/netutils/wakeonlan/Kconfig
+++ b/netutils/wakeonlan/Kconfig
@@ -12,7 +12,7 @@ config NETUTILS_WAKEONLAN
sends a WakeOnLAN magic packet to target MAC address.
 
 if NETUTILS_WAKEONLAN
-   
+
 config NETUTILS_WAKEONLAN_PROGNAME
string "Program name"
default "wol"


[GitHub] [incubator-nuttx-apps] Ouss4 merged pull request #711: netutils/wakeonlan: Remove the tab from the blank line in Kconfig

2021-05-12 Thread GitBox


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


   


-- 
This is an automated message from the 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 opened a new pull request #3700: Convert ESP32-C3 README to the new Documentation

2021-05-12 Thread GitBox


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


   ## Summary
- Convert ESP32-C3 README to the new Documentation
- Explain the required steps to debug with OpenOCD
   ## Impact
   N/A
   ## Testing
   N/A
   


-- 
This is an automated message from the 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 a change in pull request #3696: Realtek AmebaZ2 rtl8720c init

2021-05-12 Thread GitBox


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



##
File path: boards/arm/rtl8720c/rtl8720c/src/Makefile
##
@@ -0,0 +1,47 @@
+
+# boards/arm/rtl8720c/rtl8720c/src/Makefile
+#
+#   Copyright (C) 2012 Gregory Nutt. All rights reserved.
+#   Author: Gregory Nutt 

Review comment:
   Please change all copyright to apache

##
File path: boards/arm/rtl8720c/rtl8720c/src/etc/init.d/rcS
##
@@ -0,0 +1,81 @@
+/
+ * boards/arm/ameba/amebaZ/src/etc/init.d/rcS
+ *
+ *   Copyright (C) 2019 Xiaomi Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ * 3. Neither the name 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

Review comment:
   Please change all copyright to apache

##
File path: boards/arm/rtl8720c/rtl8720c/src/amebaz_bringup.c
##
@@ -0,0 +1,70 @@
+/
+ * boards/arm/ameba/amebaZ/src/amebaz_bringup.c
+ *
+ *   Copyright (C) 2019 Xiaomi Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ * 3. Neither the name 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

Review comment:
   Please change all copyright to apache




-- 
This is an automated message from the 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 pull request #709: Apps Issue #246: Replace romdisk_register() with boardctl(BOARDIOC_ROMDISK)

2021-05-12 Thread GitBox


tanushreebaindur commented on pull request #709:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/709#issuecomment-839481579


   > > So I only see the first commit with commit id 
[bb6379d](https://github.com/apache/incubator-nuttx-apps/commit/bb6379d1b0f7ef484ddfda00364c3d5e5b714793).
 I don't see the next 6 commits which I did through this page by pressing the 
"Commit Suggestion" button. How do I see those on my terminal?
   > 
   > you can fetch from your github repo like this:
   > 
   > ```
   > git fetch origin
   > git rebase origin/test/my-new-branch
   > ```
   
   @xiaoxiang781216 Thank you. 


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

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