[GitHub] [incubator-nuttx-testing] liuguo09 commented on a change in pull request #2: Multibranch pipeline job example
liuguo09 commented on a change in pull request #2: Multibranch pipeline job example URL: https://github.com/apache/incubator-nuttx-testing/pull/2#discussion_r377534899 ## File path: vars/runContinuousIntegrationPipeline.groovy ## @@ -0,0 +1,103 @@ +#!/usr/bin/env groovy + +/ + * vars/runContinuousIntegrationPipeline.groovy + * Logic for the Continuous Integration pipeline + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +def call() { + pipeline { +agent { + node { + label 'ubuntu' + } +} +environment { + EXAMPLE_ENV = 'example_value' + // GIT_CREDENTIALS_ID = '' + NUTTX_APPS_REPO_URL = 'https://github.com/apache/incubator-nuttx-apps' + NUTTX_TESTING_REPO_URL = 'https://github.com/apache/incubator-nuttx-testing' +} +stages { + stage('Checkout') { + steps { + deleteDir() // clean up our workspace Review comment: @maht, I used the scripts setup jenkins pipiline job locally well. But I notice the nuttx repo firstly checkouted before deleteDir from the build log. Is this right? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-nuttx-testing] liuguo09 commented on a change in pull request #2: Multibranch pipeline job example
liuguo09 commented on a change in pull request #2: Multibranch pipeline job example URL: https://github.com/apache/incubator-nuttx-testing/pull/2#discussion_r377536019 ## File path: vars/runContinuousIntegrationPipeline.groovy ## @@ -0,0 +1,103 @@ +#!/usr/bin/env groovy + +/ + * vars/runContinuousIntegrationPipeline.groovy + * Logic for the Continuous Integration pipeline + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +def call() { + pipeline { +agent { + node { + label 'ubuntu' + } +} +environment { + EXAMPLE_ENV = 'example_value' + // GIT_CREDENTIALS_ID = '' + NUTTX_APPS_REPO_URL = 'https://github.com/apache/incubator-nuttx-apps' + NUTTX_TESTING_REPO_URL = 'https://github.com/apache/incubator-nuttx-testing' +} +stages { + stage('Checkout') { + steps { + deleteDir() // clean up our workspace + sh 'ls' + sh 'printenv' + + // incubator-nuttx-apps repository master // + + checkout([ + $class: 'GitSCM', + // branches: [[name: '*/master']], // default one + doGenerateSubmoduleConfigurations: false, + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'apps']], + submoduleCfg: [], + userRemoteConfigs: [[ + // credentialsId: "${GIT_CREDENTIALS_ID}", + url: "${NUTTX_APPS_REPO_URL}", + refspec: '+refs/heads/master:refs/remotes/origin/master', + ]] + ]) + /// + // incubator-nuttx-testing repository master // + /// + checkout([ + $class: 'GitSCM', + // branches: [[name: '*/master']], // default one + doGenerateSubmoduleConfigurations: false, + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'testing']], + submoduleCfg: [], + userRemoteConfigs: [[ + // credentialsId: "${GIT_CREDENTIALS_ID}", + url: "${NUTTX_TESTING_REPO_URL}", + refspec: '+refs/heads/master:refs/remotes/origin/master', + ]] + ]) + / + // some commands to check everything is ok // + / + sh 'ls' + sh 'cd apps; git show' + sh 'cd testing; git show' + } + } + stage('Builds') { + steps { + sh './testing/cibuild.sh -b full' Review comment: Since I have update cibuild.sh to decouple -b option without setup repos. Should we checkout nuttx repo like the above apps and testing repo? This is an automated message from the 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 With regards, Apache Git Services
[GitHub] [incubator-nuttx-testing] maht commented on a change in pull request #2: Multibranch pipeline job example
maht commented on a change in pull request #2: Multibranch pipeline job example URL: https://github.com/apache/incubator-nuttx-testing/pull/2#discussion_r377561127 ## File path: vars/runContinuousIntegrationPipeline.groovy ## @@ -0,0 +1,103 @@ +#!/usr/bin/env groovy + +/ + * vars/runContinuousIntegrationPipeline.groovy + * Logic for the Continuous Integration pipeline + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +def call() { + pipeline { +agent { + node { + label 'ubuntu' + } +} +environment { + EXAMPLE_ENV = 'example_value' + // GIT_CREDENTIALS_ID = '' + NUTTX_APPS_REPO_URL = 'https://github.com/apache/incubator-nuttx-apps' + NUTTX_TESTING_REPO_URL = 'https://github.com/apache/incubator-nuttx-testing' +} +stages { + stage('Checkout') { + steps { + deleteDir() // clean up our workspace Review comment: No, sorry, this is not ok. It need to update the script. It should be checked out in the `nuttx/` path. Let me fix 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 With regards, Apache Git Services
[GitHub] [incubator-nuttx-testing] maht commented on a change in pull request #2: Multibranch pipeline job example
maht commented on a change in pull request #2: Multibranch pipeline job example URL: https://github.com/apache/incubator-nuttx-testing/pull/2#discussion_r377561623 ## File path: vars/runContinuousIntegrationPipeline.groovy ## @@ -0,0 +1,103 @@ +#!/usr/bin/env groovy + +/ + * vars/runContinuousIntegrationPipeline.groovy + * Logic for the Continuous Integration pipeline + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +def call() { + pipeline { +agent { + node { + label 'ubuntu' + } +} +environment { + EXAMPLE_ENV = 'example_value' + // GIT_CREDENTIALS_ID = '' + NUTTX_APPS_REPO_URL = 'https://github.com/apache/incubator-nuttx-apps' + NUTTX_TESTING_REPO_URL = 'https://github.com/apache/incubator-nuttx-testing' +} +stages { + stage('Checkout') { + steps { + deleteDir() // clean up our workspace + sh 'ls' + sh 'printenv' + + // incubator-nuttx-apps repository master // + + checkout([ + $class: 'GitSCM', + // branches: [[name: '*/master']], // default one + doGenerateSubmoduleConfigurations: false, + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'apps']], + submoduleCfg: [], + userRemoteConfigs: [[ + // credentialsId: "${GIT_CREDENTIALS_ID}", + url: "${NUTTX_APPS_REPO_URL}", + refspec: '+refs/heads/master:refs/remotes/origin/master', + ]] + ]) + /// + // incubator-nuttx-testing repository master // + /// + checkout([ + $class: 'GitSCM', + // branches: [[name: '*/master']], // default one + doGenerateSubmoduleConfigurations: false, + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'testing']], + submoduleCfg: [], + userRemoteConfigs: [[ + // credentialsId: "${GIT_CREDENTIALS_ID}", + url: "${NUTTX_TESTING_REPO_URL}", + refspec: '+refs/heads/master:refs/remotes/origin/master', + ]] + ]) + / + // some commands to check everything is ok // + / + sh 'ls' + sh 'cd apps; git show' + sh 'cd testing; git show' + } + } + stage('Builds') { + steps { + sh './testing/cibuild.sh -b full' Review comment: Yes, we should checkout using the same code I guess, to checkout the specific commit and not the top of the master branch. This is an automated message from the 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 With regards, Apache Git Services
nuttx website
I noticed the website nuttx.org doesn't mention a word about the new Apache move. Moreover the documentation section seems to be broken and leads to empty pages (eg documentation/userguide). Wouldn't be easiest just to simply redirect the page to nuttx.apache.org? Since google's first hit is nuttx.org, people looking for more information might think the project isn't very active.
NuttX SocketCAN implementation
Hi all, This is a follow up to the SocketCAN integration into NuttX discussion. As discussed before we proposed the idea to include SocketCAN support in NuttX to provide a generic well-known interface for CAN transmission. The initial feedback was great and Gregory Nutt looked into the possibility to integrate SocketCAN (socket family and legal issues). The other feedback we also got was about the realtime behavior which might suffer due to SocketCAN. To measure the impact in realtime behavior I created a testbed using Zephyr RTOS, which already implemented SocketCAN in their RTOS. The results of this testbed have been posted here https://forum.uavcan.org/t/socketcan-api-on-a-rtos/750. To summarize: from the Zephyr SocketCAN I noticed a delay increase from interrupt to userspace application of ~ 55us and measured jitter didn't increase and stayed < 0.001us. I would like gather feedback if 65us is acceptable and if the NuttX network stack might perform better or worse than that. Furthermore I've got some questions about some implementation details, below the figure shows my estimated guess of the current NuttX CAN implementation and the NuttX Ethernet implementation. If we're going to implement SocketCAN do we want to support the old NuttX CAN implementation and SocketCAN implementation at the same time through a single hardware driver? Do people use the NuttX CAN implementation? Can we implement SocketCAN through the NuttX Ethernet implementation and completely skip the NuttX CAN implementation? NuttX CAN Implementation NuttX Ethernet Implementation +---+ +---+ | Application | | Application | +---+ +---+ +---+ +---+ |POSIX Interface| |POSIX Interface| +---+ +---+ +-+ +-+ +-+ +-+ |System calls | |VFS (fs/vfs) | |System calls | |BSD socket | | | | | | | |net/sockets | +-+ +-+ +-+ +-+ +---+ +---+ | NuttX CAN Driver (can.c)| | NuttX Network driver | | ++ ++ | | ++ ++ | | |Syscall glue| |Char driver | | | |Syscall glue| |BSD Socket | | | || |glue| | | || |glue| | | ++ ++ | | ++ ++ | +---+ +---+ +---+ +---+ | Hardware CAN driver | | Hardware MAC driver | +---+ +---+ +---+ +---+ |OS (sched/), memory manager| |OS (sched/), memory manager| |(mm/), common libraries (libs/)| |(mm/), common libraries (libs/)| +---+ +---+ +---+ +---+ | Hardware| | Hardware| +---+ +---+ (Note this is ASCII art use a monospace font to view correctly) Everything is still a WIP but I would like gather feedback and come up with an architectural concept for the SocketCAN implementation. Best regards, Peter van der Perk
RE: NuttX SocketCAN implementation
+pavel -Original Message- From: Peter Van Der Perk [mailto:peter.vanderp...@nxp.com] Sent: Tuesday, February 11, 2020 6:58 AM To: dev@nuttx.apache.org Subject: NuttX SocketCAN implementation Hi all, This is a follow up to the SocketCAN integration into NuttX discussion. As discussed before we proposed the idea to include SocketCAN support in NuttX to provide a generic well-known interface for CAN transmission. The initial feedback was great and Gregory Nutt looked into the possibility to integrate SocketCAN (socket family and legal issues). The other feedback we also got was about the realtime behavior which might suffer due to SocketCAN. To measure the impact in realtime behavior I created a testbed using Zephyr RTOS, which already implemented SocketCAN in their RTOS. The results of this testbed have been posted here https://forum.uavcan.org/t/socketcan-api-on-a-rtos/750. To summarize: from the Zephyr SocketCAN I noticed a delay increase from interrupt to userspace application of ~ 55us and measured jitter didn't increase and stayed < 0.001us. I would like gather feedback if 65us is acceptable and if the NuttX network stack might perform better or worse than that. Furthermore I've got some questions about some implementation details, below the figure shows my estimated guess of the current NuttX CAN implementation and the NuttX Ethernet implementation. If we're going to implement SocketCAN do we want to support the old NuttX CAN implementation and SocketCAN implementation at the same time through a single hardware driver? Do people use the NuttX CAN implementation? Can we implement SocketCAN through the NuttX Ethernet implementation and completely skip the NuttX CAN implementation? NuttX CAN Implementation NuttX Ethernet Implementation +---+ +---+ | Application | | Application | +---+ +---+ +---+ +---+ |POSIX Interface| |POSIX Interface| +---+ +---+ +-+ +-+ +-+ +-+ |System calls | |VFS (fs/vfs) | |System calls | |BSD socket | | | | | | | |net/sockets | +-+ +-+ +-+ +-+ +---+ +---+ | NuttX CAN Driver (can.c)| | NuttX Network driver | | ++ ++ | | ++ ++ | | |Syscall glue| |Char driver | | | |Syscall glue| |BSD Socket | | | || |glue| | | || |glue| | | ++ ++ | | ++ ++ | +---+ +---+ +---+ +---+ | Hardware CAN driver | | Hardware MAC driver | +---+ +---+ +---+ +---+ |OS (sched/), memory manager| |OS (sched/), memory manager| |(mm/), common libraries (libs/)| |(mm/), common libraries (libs/)| +---+ +---+ +---+ +---+ | Hardware| | Hardware| +---+ +---+ (Note this is ASCII art use a monospace font to view correctly) Everything is still a WIP but I would like gather feedback and come up with an architectural concept for the SocketCAN implementation. Best regards, Peter van der Perk
Re: nuttx website
I just changed nuttx.org so that it should re-direct to nuttx.apache.org. This involved changing the name server so there will be some delay before it is effective. If you do not see anything after a reasonable amount of time, let me know and I will look into it. I noticed the website nuttx.org doesn't mention a word about the new Apache move. Moreover the documentation section seems to be broken and leads to empty pages (eg documentation/userguide). Wouldn't be easiest just to simply redirect the page to nuttx.apache.org? Since google's first hit is nuttx.org, people looking for more information might think the project isn't very active.
Re: NuttX SocketCAN implementation
NuttX CAN Implementation NuttX Ethernet Implementation +---+ +---+ | Application | | Application | +---+ +---+ +---+ +---+ |POSIX Interface| |POSIX Interface| +---+ +---+ +-+ +-+ +-+ +-+ |System calls | |VFS (fs/vfs) | |System calls | |BSD socket | | | | | | | |net/sockets | +-+ +-+ +-+ +-+ +---+ +---+ | NuttX CAN Driver (can.c)| | NuttX Network driver | | ++ ++ | | ++ ++ | | |Syscall glue| |Char driver | | | |Syscall glue| |BSD Socket | | | || |glue| | | || |glue| | | ++ ++ | | ++ ++ | +---+ +---+ +---+ +---+ | Hardware CAN driver | | Hardware MAC driver | +---+ +---+ +---+ +---+ |OS (sched/), memory manager| |OS (sched/), memory manager| |(mm/), common libraries (libs/)| |(mm/), common libraries (libs/)| +---+ +---+ +---+ +---+ | Hardware| | Hardware| +---+ +---+ (Note this is ASCII art use a monospace font to view correctly) I believe that both sides would be the same. Both would use BSD sockets, SocketCAN would be added to the network stacks, and the CAN drivers would be a network drivers. Your picture shows the existing implementation using character drivers. SocketCAN is intended to be integrated into the network.
RE: Thread aware debugging for JLink
Hi, We got thread aware debugging "working" for our S32K boards by making some modifications to sony/openocd-nuttx. But it's more of a workaround than a real solution. Some of it is described in the S32K146EVB README: https://github.com/apache/incubator-nuttx/blob/master/boards/arm/s32k1xx/s32k146evb/README.txt#L112 However, we also put in a request at SEGGER to add NuttX thread-aware debugging support to their J-Link tools. I haven't heard about it in a few weeks, but maybe we get an update this Thursday. Regards, Jari van Ewijk -Original Message- From: Gregory Nutt Sent: Monday, February 10, 2020 2:20 PM To: dev@nuttx.apache.org Subject: [EXT] Re: Thread aware debugging for JLink Caution: EXT Email > is there any support for thread aware debugging using JLink? Something > like sony/openocd-nuttx but usable with JLink adapter. I have heard "through the grapevine" that such a work is in progress but have no further information. I would suggest that you contact Segger directly.
Re: NuttX SocketCAN implementation
I amn't familiar with CAN, but is it possible to implement a general CAN MAC driver on top of CAN CHAR driver like this? +---+ | NuttX Network driver | | ++ ++ | | |Syscall glue| |BSD Socket | | | || |glue| | | ++ ++ | +---+ +---+ file_*+---+ | Hardware MAC driver |-->| NuttX CAN Driver (can.c)| +---+ | ++ ++ | | |Syscall glue| |Char driver | | | || |glue| | | ++ ++ | +---+ +---+ | Hardware CAN driver | +---+ So we just need write one CAN driver, but the user can select socket or char as they want. Thanks Xiang On Tue, Feb 11, 2020 at 11:21 PM Gregory Nutt wrote: > > > > NuttX CAN Implementation NuttX Ethernet Implementation > > > > +---+ +---+ > > | Application | | Application | > > +---+ +---+ > > +---+ +---+ > > |POSIX Interface| |POSIX Interface| > > +---+ +---+ > > +-+ +-+ +-+ +-+ > > |System calls | |VFS (fs/vfs) | |System calls | |BSD socket | > > | | | | | | |net/sockets | > > +-+ +-+ +-+ +-+ > > +---+ +---+ > > | NuttX CAN Driver (can.c)| | NuttX Network driver | > > | ++ ++ | | ++ ++ | > > | |Syscall glue| |Char driver | | | |Syscall glue| |BSD Socket | | > > | || |glue| | | || |glue| | > > | ++ ++ | | ++ ++ | > > +---+ +---+ > > +---+ +---+ > > | Hardware CAN driver | | Hardware MAC driver | > > +---+ +---+ > > +---+ +---+ > > |OS (sched/), memory manager| |OS (sched/), memory manager| > > |(mm/), common libraries (libs/)| |(mm/), common libraries (libs/)| > > +---+ +---+ > > +---+ +---+ > > | Hardware| | Hardware| > > +---+ +---+ > > (Note this is ASCII art use a monospace font to view correctly) > > > I believe that both sides would be the same. Both would use BSD > sockets, SocketCAN would be added to the network stacks, and the CAN > drivers would be a network drivers. > > Your picture shows the existing implementation using character drivers. > SocketCAN is intended to be integrated into the network. > >
RE: Re: NuttX SocketCAN implementation
>I believe that both sides would be the same. Both would use BSD sockets, >SocketCAN would be added to the network stacks, and the CAN drivers would be a >network drivers. > >Your picture shows the existing implementation using character drivers. >SocketCAN is intended to be integrated into the network. Thanks for the quick response, indeed you're right the CAN drivers would become network drivers and in the BSD sockets layer we can add the PF_CAN protocol. However my question is then, would there still be a need for need for CAN using character drivers (and userspace api)? If so, do we have to make 2 separate HW drivers, one for CAN using character devices and one for CAN using SocketCAN? Or does the current infrastructure support both? The reason why I'm asking this is to think about trade-offs between compatibility, realtime performance and maintainability. >I amn't familiar with CAN, but is it possible to implement a general CAN MAC >driver on top of CAN CHAR driver like this? >+---+ >| NuttX Network driver | >| ++ ++ | >| |Syscall glue| |BSD Socket | | >| || |glue| | >| ++ ++ | >+---+ >+---+ file_*+---+ >| Hardware MAC driver |-->| NuttX CAN Driver (can.c)| >+---+ | ++ >+---+ ++ | >| |Syscall glue| |Char driver | | >| || |glue| | >| ++ ++ | >+---+ >+---+ >| Hardware CAN driver | >+---+ > So we just need write one CAN driver, but the user can select socket or char > as they want. From ease-of-implementation perspective that would be the way to go. However this would mean that a CAN frame would go through the CAN driver -> Char driver -> VFS -> Socket -> user space. This would add unnecessary delay and jitter which would be certainly worse. Ideally I would implement it as shown below. The question is though then how do deal with existing CAN character device implementation? NuttX SocketCAN implementation Proposal +---+ | Application | +---+ +---+ |POSIX Interface| +---+ +-+ +-+ |System calls | |BSD socket | | | |net/sockets | +-+ +-+ +---+ | NuttX Network driver | | ++ ++ | | |Syscall glue| |BSD Socket | | | || |glue PF_CAN| | | ++ ++ | +---+ +---+ | NEW Hardware CAN driver | +---+ +---+ |OS (sched/), memory manager| |(mm/), common libraries (libs/)| +---+ +---+ | Hardware| +---+
RE: Re: NuttX SocketCAN implementation
The requirements from Pavel are inconsistent with the current character driver. Certainly it could be possible to use a common backend, but I suspect it would be simpler not to.Sent from my Samsung Galaxy smartphone. Original message From: Peter Van Der Perk Date: 2/11/20 9:48 AM (GMT-06:00) To: dev@nuttx.apache.org Subject: RE: Re: NuttX SocketCAN implementation >I believe that both sides would be the same. Both would use BSD sockets, SocketCAN would be added to the network stacks, and the CAN drivers would be a network drivers.>>Your picture shows the existing implementation using character drivers.>SocketCAN is intended to be integrated into the network.Thanks for the quick response, indeed you're right the CAN drivers would become network drivers and in the BSD sockets layer we can add the PF_CAN protocol. However my question is then, would there still be a need for need for CAN using character drivers (and userspace api)? If so, do we have to make 2 separate HW drivers, one for CAN using character devices and one for CAN using SocketCAN? Or does the current infrastructure support both? The reason why I'm asking this is to think about trade-offs between compatibility, realtime performance and maintainability.>I amn't familiar with CAN, but is it possible to implement a general CAN MAC driver on top of CAN CHAR driver like this?>+---+>| NuttX Network driver |>| ++ ++ |>| |Syscall glue| |BSD Socket | |>| | | |glue | |>| ++ ++ |>+---+>+---+ file_* +---+>| Hardware MAC driver |-->| NuttX CAN Driver (can.c) |>+---+ | ++ >+---+ ++ |> | |Syscall glue| |Char driver | |> | | | |glue | |> | ++ ++ |> +---+> +---+> | Hardware CAN driver |> +---+ So we just need write one CAN driver, but the user can select socket or char as they want.From ease-of-implementation perspective that would be the way to go. However this would mean that a CAN frame would go through the CAN driver -> Char driver -> VFS -> Socket -> user space. This would add unnecessary delay and jitter which would be certainly worse. Ideally I would implement it as shown below. The question is though then how do deal with existing CAN character device implementation? NuttX SocketCAN implementation Proposal+---+| Application |+---++---+| POSIX Interface |+---++-+ +-+|System calls | |BSD socket || | |net/sockets |+-+ +-++---+| NuttX Network driver || ++ ++ || |Syscall glue| |BSD Socket | || | | |glue PF_CAN| || ++ ++ |+---++---+| NEW Hardware CAN driver |+---++---+|OS (sched/), memory manager ||(mm/), common libraries (libs/)|+---++---+| Hardware |+---+
[GitHub] [incubator-nuttx-testing] maht commented on issue #2: Multibranch pipeline job example
maht commented on issue #2: Multibranch pipeline job example URL: https://github.com/apache/incubator-nuttx-testing/pull/2#issuecomment-584760466 I pushed new versions of the commits. Now the main repository is checked out in `$WORKSPACE/nuttx` directory, at the same level as `apps` and `testing`, as expected by `cibuild.sh`. This is preferable over repeating the code of checkout for `apps` and `testing`. The problem is that it makes this script specific for `incubator-nuttx` CI (not directly reusable for `incubator-nuttx-apps` or `incubator-nuttx-testing`), but at this stage that should not be a problem. We can improve it in next iterations. Also, the job XML config now add the 'Cleanup before checkout' option, despite a 'Clean' stage is also added. This is an automated message from the 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 With regards, Apache Git Services
NuttX SocketCAN implementation
Hi all, This is a follow up to the SocketCAN integration into NuttX discussion. As discussed before we proposed the idea to include SocketCAN support in NuttX to provide a generic well-known interface for CAN transmission. The initial feedback was great and Gregory Nutt looked into the possibility to integrate SocketCAN (socket family and legal issues). The other feedback we also got was about the realtime behavior which might suffer due to SocketCAN. To measure the impact in realtime behavior I created a testbed using Zephyr RTOS, which already implemented SocketCAN in their RTOS. The results of this testbed have been posted here https://forum.uavcan.org/t/socketcan-api-on-a-rtos/750. To summarize: from the Zephyr SocketCAN I noticed a delay increase from interrupt to userspace application of ~ 55us and measured jitter didn't increase and stayed < 0.001us. I would like gather feedback if 65us is acceptable and if the NuttX network stack might perform better or worse than that. Furthermore I've got some questions about some implementation details, below the figure shows my estimated guess of the current NuttX CAN implementation and the NuttX Ethernet implementation. If we're going to implement SocketCAN do we want to support the old NuttX CAN implementation and SocketCAN implementation at the same time through a single hardware driver? Do people use the NuttX CAN implementation? Can we implement SocketCAN through the NuttX Ethernet implementation and completely skip the NuttX CAN implementation? NuttX CAN Implementation NuttX Ethernet Implementation +---+ +---+ | Application | | Application | +---+ +---+ +---+ +---+ |POSIX Interface| |POSIX Interface| +---+ +---+ +-+ +-+ +-+ +-+ |System calls | |VFS (fs/vfs) | |System calls | |BSD socket | | | | | | | |net/sockets | +-+ +-+ +-+ +-+ +---+ +---+ | NuttX CAN Driver (can.c)| | NuttX Network driver | | ++ ++ | | ++ ++ | | |Syscall glue| |Char driver | | | |Syscall glue| |BSD Socket | | | || |glue| | | || |glue| | | ++ ++ | | ++ ++ | +---+ +---+ +---+ +---+ | Hardware CAN driver | | Hardware MAC driver | +---+ +---+ +---+ +---+ |OS (sched/), memory manager| |OS (sched/), memory manager| |(mm/), common libraries (libs/)| |(mm/), common libraries (libs/)| +---+ +---+ +---+ +---+ | Hardware| | Hardware| +---+ +---+ Everything is still a WIP but I would like gather feedback and come up with an architectural concept for the SocketCAN implementation. Best regards, Peter van der Perk
[GitHub] [incubator-nuttx-testing] liuguo09 commented on issue #2: Multibranch pipeline job example
liuguo09 commented on issue #2: Multibranch pipeline job example URL: https://github.com/apache/incubator-nuttx-testing/pull/2#issuecomment-584984210 That's good. Another thing I wonder if it is necessary for us to create a subdirectory jenkins to hold the pipeline job stuffs. And create subdir travis If travis CI stuffs coming. Anyway, it' a suggestion. You changes look good to me :) @maht , do your apache jenkins access permission available now? I think you would be the right person to create jenkins pipeline job for nitghtly build and tune it if needed on 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 With regards, Apache Git Services
Re: problems with TCP send sizes greater than ETH_PKTSIZE (SAMA5D36)
I did some more debugging today. It seems like the GMAC is sending multiple buffers sometimes when the TCP send is larger than MSS. So it's not sending not just a single one by itself. When that happens, the GMAC driver marks the first TX buffer descriptor as used (sent), txdesc->status = GMACTXD_STA_USED; but subsequent buffers are unmarked until the last, which is marked with GMACTXD_STA_LAST. Buffers that are not marked never get returned to the free pool. Hence the GMAC driver leaks buffers, eventually runs out of TX buffers, stops receiving, can't send, and eventually the txtimeout happens. Then the driver reinitializes the GMAC and the TX buffer pool, and frames start sending again. And the process repeats. I have a fix that works at slow speeds– with some logging turned on. It can do unlimited TCP sends of any size. With logging off, it hangs. I'm guessing that's because at high speeds it can send longer chains of packets and buffers all at once. I'm probably not handling chains of more than two consecutive packets correctly. I'll work on it some more tomorrow. -adam On Mon, Feb 10, 2020 at 5:38 PM Adam Feuer wrote: > I put a log statement in sam_txdone()... what appears to be happening is > that the TX descriptor-in-use case is executed at sam_txdone(), line 1364, > in sam_gmac.c, so the TX buffer fills up. > > So it seems like the GMAC driver or hardware gets into a state where it is > not able to send packets until the driver and hardware is reset. Still not > sure why that's happening. > > -adam > > On Mon, Feb 10, 2020 at 3:50 PM Adam Feuer wrote: > >> It seems like the SAMA5D36 GMAC driver in sam_gmac.c is running out of TX >> buffers. I can set a large number of buffers, but it always seems to run >> out. I get these entries in the log: >> >> [ 402.31] sam_transmit: Disabling RX interrupts >> >> That seems to come from line 769 which notes that it's doing this because >> it can't transmit due to lack of TX buffers. Immediately afterwards, the >> transmission stalls, and then a minute later there is a txtimeout fired, >> the driver restarts, packets can be sent again until it runs out of TX >> buffers again. >> >> So it seems like there might be something wrong here. Could it be my >> configuration? Or could it be that the GMAC driver is leaking TX buffers? >> Does anyone have any ideas on how to find the leak? >> >> cheers >> adam >> >> On Mon, Feb 10, 2020 at 1:51 PM Adam Feuer wrote: >> >>> Well, at least that is a lot of progress for a day. Going from clueless >>> to pinpointing the failure. >>> >>> Greg, >>> >>> Yes! Thank you for the help. >>> >>> cheers >>> adam >>> -- >>> Adam Feuer >>> >> >> >> -- >> Adam Feuer >> > > > -- > Adam Feuer > -- Adam Feuer
Re: dev board recommendation?
On Tue, Feb 11, 2020 at 1:40 PM Ishikawa, Masayuki (SHES) wrote: > > Yamamoto-san, > > Could you tell me what kind of network applications you > are trying with Spresense + GS2200M? for now, just a mqtt client. (i know gs2200m has some mqtt functionalities. but i'm not going to use it) > > Also, are you using a Wi-Fi router or directly connecting to > a PC in AP mode? I'd like to know about your network > environment. i'm using station mode. connecting to the existing AP. using WPA2. it sometimes work, sometimes not. when it doesn't work, usually AT+WA gets ERROR response. ("WLAN CONNECT ERROR" if you raise log level of gs2200m) it's somehow mitigated by the following change. https://github.com/apache/incubator-nuttx-apps/commit/2f4b309b1b9faad87788d0668617b07bcfbca305 occasiionally AT+WA even timeouts (SPI_TIMEOUT) and it causes assertion failures in the following AT commands because the driver and gs2200m are now out of sync. i guess the driver should reset the chip after giving up waiting for it. even when it's working, tcp connections are occasionally dropped. usually it recovers if i tcp-reconnect. i haven't investigated this symptom. > > On 2020/02/11 1:20, "Takashi Yamamoto" wrote: > > Thank you. > It looks like the same board as I have. > For me I feel it works 30% of the time. > I wonder what's the difference. > > On Tue, Feb 11, 2020, 01:10 Alin Jerpelea wrote: > > > I am using this one > > > > > https://www.chip1stop.com/SWE/en/product/detail?partId=IDYC-001&mpn=iS110B&keyword=spresense&zaikoFlg=false&partSameFlg=false > > > > On Mon, Feb 10, 2020 at 5:06 PM Xiang Xiao > > wrote: > > > > > Ubuntu 18.04 run on VirtualBox with NAT. For me, I just spend the time > > > with the hardware my project will use or the simulator. > > > > > > On Mon, Feb 10, 2020 at 11:53 PM Takashi Yamamoto > > > wrote: > > > > > > > > which host os are you using? > > > > > > > > On Tue, Feb 11, 2020 at 12:46 AM Xiang Xiao > > > > > > wrote: > > > > > > > > > > We use sim which work very well and stable, all > > > > > TCP/IP(IP[v6]/ICMP[v6]/UDP/DHCP/DNS/NTP/TCP/TELNET) stack can run > in > > > > > this virtual environment. > > > > > > > > > > On Mon, Feb 10, 2020 at 11:41 PM Takashi Yamamoto > > > > > wrote: > > > > > > > > > > > > hi, > > > > > > > > > > > > i'm working on some apps which need network connectivity. > > > > > > does anyone have a recommendation of a board for development on > > which > > > > > > i can run nuttx reliably with network? (wifi or ethernet) > > > > > > either a real board i can purchase, or emulators/simulators. > > > > > > > > > > > > right now i'm using spresense and gs2200m-based wifi board. > > > > > > https://developer.sony.com/develop/spresense > > > > > > https://idy-design.com/product/is110b.html > > > > > > but i feel this wifi board is quite unreliable. > > > > > > while it might be fun to fix it, unfortunately i have to > > concentrate > > > > > > on my app rather than the wifi driver in the meantime. > > > > > > > > > > > > thank you. > > > > > > >
Re: dev board recommendation?
Thanks for the details. I think it's a GS2200M firmware issue. Could you tell me a product name of the Wi-Fi router? And the issue might be mitigated if you change Wi-Fi router settings. On 2020/02/12 12:32, "Takashi Yamamoto" wrote: On Tue, Feb 11, 2020 at 1:40 PM Ishikawa, Masayuki (SHES) wrote: > > Yamamoto-san, > > Could you tell me what kind of network applications you > are trying with Spresense + GS2200M? for now, just a mqtt client. (i know gs2200m has some mqtt functionalities. but i'm not going to use it) > > Also, are you using a Wi-Fi router or directly connecting to > a PC in AP mode? I'd like to know about your network > environment. i'm using station mode. connecting to the existing AP. using WPA2. it sometimes work, sometimes not. when it doesn't work, usually AT+WA gets ERROR response. ("WLAN CONNECT ERROR" if you raise log level of gs2200m) it's somehow mitigated by the following change. https://github.com/apache/incubator-nuttx-apps/commit/2f4b309b1b9faad87788d0668617b07bcfbca305 occasiionally AT+WA even timeouts (SPI_TIMEOUT) and it causes assertion failures in the following AT commands because the driver and gs2200m are now out of sync. i guess the driver should reset the chip after giving up waiting for it. even when it's working, tcp connections are occasionally dropped. usually it recovers if i tcp-reconnect. i haven't investigated this symptom. > > On 2020/02/11 1:20, "Takashi Yamamoto" wrote: > > Thank you. > It looks like the same board as I have. > For me I feel it works 30% of the time. > I wonder what's the difference. > > On Tue, Feb 11, 2020, 01:10 Alin Jerpelea wrote: > > > I am using this one > > > > https://www.chip1stop.com/SWE/en/product/detail?partId=IDYC-001&mpn=iS110B&keyword=spresense&zaikoFlg=false&partSameFlg=false > > > > On Mon, Feb 10, 2020 at 5:06 PM Xiang Xiao > > wrote: > > > > > Ubuntu 18.04 run on VirtualBox with NAT. For me, I just spend the time > > > with the hardware my project will use or the simulator. > > > > > > On Mon, Feb 10, 2020 at 11:53 PM Takashi Yamamoto > > > wrote: > > > > > > > > which host os are you using? > > > > > > > > On Tue, Feb 11, 2020 at 12:46 AM Xiang Xiao > > > > > wrote: > > > > > > > > > > We use sim which work very well and stable, all > > > > > TCP/IP(IP[v6]/ICMP[v6]/UDP/DHCP/DNS/NTP/TCP/TELNET) stack can run in > > > > > this virtual environment. > > > > > > > > > > On Mon, Feb 10, 2020 at 11:41 PM Takashi Yamamoto > > > > > wrote: > > > > > > > > > > > > hi, > > > > > > > > > > > > i'm working on some apps which need network connectivity. > > > > > > does anyone have a recommendation of a board for development on > > which > > > > > > i can run nuttx reliably with network? (wifi or ethernet) > > > > > > either a real board i can purchase, or emulators/simulators. > > > > > > > > > > > > right now i'm using spresense and gs2200m-based wifi board. > > > > > > https://developer.sony.com/develop/spresense > > > > > > https://idy-design.com/product/is110b.html > > > > > > but i feel this wifi board is quite unreliable. > > > > > > while it might be fun to fix it, unfortunately i have to > > concentrate > > > > > > on my app rather than the wifi driver in the meantime. > > > > > > > > > > > > thank you. > > > > > > >
Re: dev board recommendation?
Or what happens if you move GS2200M near the Wi-Fi router? On 2020/02/12 13:02, "Ishikawa, Masayuki (SHES)" wrote: Thanks for the details. I think it's a GS2200M firmware issue. Could you tell me a product name of the Wi-Fi router? And the issue might be mitigated if you change Wi-Fi router settings. On 2020/02/12 12:32, "Takashi Yamamoto" wrote: On Tue, Feb 11, 2020 at 1:40 PM Ishikawa, Masayuki (SHES) wrote: > > Yamamoto-san, > > Could you tell me what kind of network applications you > are trying with Spresense + GS2200M? for now, just a mqtt client. (i know gs2200m has some mqtt functionalities. but i'm not going to use it) > > Also, are you using a Wi-Fi router or directly connecting to > a PC in AP mode? I'd like to know about your network > environment. i'm using station mode. connecting to the existing AP. using WPA2. it sometimes work, sometimes not. when it doesn't work, usually AT+WA gets ERROR response. ("WLAN CONNECT ERROR" if you raise log level of gs2200m) it's somehow mitigated by the following change. https://github.com/apache/incubator-nuttx-apps/commit/2f4b309b1b9faad87788d0668617b07bcfbca305 occasiionally AT+WA even timeouts (SPI_TIMEOUT) and it causes assertion failures in the following AT commands because the driver and gs2200m are now out of sync. i guess the driver should reset the chip after giving up waiting for it. even when it's working, tcp connections are occasionally dropped. usually it recovers if i tcp-reconnect. i haven't investigated this symptom. > > On 2020/02/11 1:20, "Takashi Yamamoto" wrote: > > Thank you. > It looks like the same board as I have. > For me I feel it works 30% of the time. > I wonder what's the difference. > > On Tue, Feb 11, 2020, 01:10 Alin Jerpelea wrote: > > > I am using this one > > > > https://www.chip1stop.com/SWE/en/product/detail?partId=IDYC-001&mpn=iS110B&keyword=spresense&zaikoFlg=false&partSameFlg=false > > > > On Mon, Feb 10, 2020 at 5:06 PM Xiang Xiao > > wrote: > > > > > Ubuntu 18.04 run on VirtualBox with NAT. For me, I just spend the time > > > with the hardware my project will use or the simulator. > > > > > > On Mon, Feb 10, 2020 at 11:53 PM Takashi Yamamoto > > > wrote: > > > > > > > > which host os are you using? > > > > > > > > On Tue, Feb 11, 2020 at 12:46 AM Xiang Xiao > > > > > wrote: > > > > > > > > > > We use sim which work very well and stable, all > > > > > TCP/IP(IP[v6]/ICMP[v6]/UDP/DHCP/DNS/NTP/TCP/TELNET) stack can run in > > > > > this virtual environment. > > > > > > > > > > On Mon, Feb 10, 2020 at 11:41 PM Takashi Yamamoto > > > > > wrote: > > > > > > > > > > > > hi, > > > > > > > > > > > > i'm working on some apps which need network connectivity. > > > > > > does anyone have a recommendation of a board for development on > > which > > > > > > i can run nuttx reliably with network? (wifi or ethernet) > > > > > > either a real board i can purchase, or emulators/simulators. > > > > > > > > > > > > right now i'm using spresense and gs2200m-based wifi board. > > > > > > https://developer.sony.com/develop/spresense > > > > > > https://idy-design.com/product/is110b.html > > > > > > but i feel this wifi board is quite unreliable. > > > > > > while it might be fun to fix it, unfortunately i have to > > concentrate > > > > > > on my app rather than the wifi driver in the meantime. > > > > > > > > > > > > thank you. > > > > > > >
Re: NuttX at FOSDEM 2020
Hi, Some feeback from FOSDEM, Alin Jerpelea and I were able to present in IoT room, and It was recorded and published at: https://fosdem.org/2020/schedule/event/iotnuttx/ Feel free to rehost the video on NuttX channel If curious about what I've been building with JavaScript on MCU (STM32), fell free to reach me, you'll find more details at: https://purl.org/rzr/presentations Also may I suggest to check about others presentations : https://fosdem.org/2020/schedule/track/internet_of_things/ https://fosdem.org/2020/schedule/track/hardware_enablement/ https://fosdem.org/2020/schedule/track/embedded_mobile_and_automotive/ https://fosdem.org/2020/schedule/events/ If slides or videos are missing let me know Regards
Re: dev board recommendation?
hi, what settings do you have in mind? the wifi router is in the same room, a few meters away from the board. the smart person managing the network told me: Wireles N fixed on channel 5 (20MHz width), AP in WMM Mode, Short Preamble, WPA2 PSK (CCMP) encryption, with "key reinstallation (KRACK) countermeasures" enabled it is OpenWrt 18.06.3 firmware using Atheros AR9223 wifi chip On Wed, Feb 12, 2020 at 1:09 PM Ishikawa, Masayuki (SHES) wrote: > > Or what happens if you move GS2200M near the Wi-Fi router? > > > On 2020/02/12 13:02, "Ishikawa, Masayuki (SHES)" > wrote: > > Thanks for the details. > > I think it's a GS2200M firmware issue. > Could you tell me a product name of the Wi-Fi router? > And the issue might be mitigated if you change Wi-Fi router settings. > > > On 2020/02/12 12:32, "Takashi Yamamoto" > wrote: > > On Tue, Feb 11, 2020 at 1:40 PM Ishikawa, Masayuki (SHES) > wrote: > > > > Yamamoto-san, > > > > Could you tell me what kind of network applications you > > are trying with Spresense + GS2200M? > > for now, just a mqtt client. > (i know gs2200m has some mqtt functionalities. but i'm not going to > use it) > > > > > Also, are you using a Wi-Fi router or directly connecting to > > a PC in AP mode? I'd like to know about your network > > environment. > > i'm using station mode. connecting to the existing AP. using WPA2. > it sometimes work, sometimes not. > > when it doesn't work, usually AT+WA gets ERROR response. ("WLAN > CONNECT ERROR" if you raise log level of gs2200m) > it's somehow mitigated by the following change. > > https://github.com/apache/incubator-nuttx-apps/commit/2f4b309b1b9faad87788d0668617b07bcfbca305 > > occasiionally AT+WA even timeouts (SPI_TIMEOUT) and it causes > assertion failures in the following AT commands because the driver > and gs2200m are now out of sync. i guess the driver should reset the > chip after giving up waiting for it. > > even when it's working, tcp connections are occasionally dropped. > usually it recovers if i tcp-reconnect. i haven't investigated this > symptom. > > > > > On 2020/02/11 1:20, "Takashi Yamamoto" > wrote: > > > > Thank you. > > It looks like the same board as I have. > > For me I feel it works 30% of the time. > > I wonder what's the difference. > > > > On Tue, Feb 11, 2020, 01:10 Alin Jerpelea > wrote: > > > > > I am using this one > > > > > > > https://www.chip1stop.com/SWE/en/product/detail?partId=IDYC-001&mpn=iS110B&keyword=spresense&zaikoFlg=false&partSameFlg=false > > > > > > On Mon, Feb 10, 2020 at 5:06 PM Xiang Xiao > > > > wrote: > > > > > > > Ubuntu 18.04 run on VirtualBox with NAT. For me, I just > spend the time > > > > with the hardware my project will use or the simulator. > > > > > > > > On Mon, Feb 10, 2020 at 11:53 PM Takashi Yamamoto > > > > wrote: > > > > > > > > > > which host os are you using? > > > > > > > > > > On Tue, Feb 11, 2020 at 12:46 AM Xiang Xiao > > > > > > > > wrote: > > > > > > > > > > > > We use sim which work very well and stable, all > > > > > > TCP/IP(IP[v6]/ICMP[v6]/UDP/DHCP/DNS/NTP/TCP/TELNET) > stack can run in > > > > > > this virtual environment. > > > > > > > > > > > > On Mon, Feb 10, 2020 at 11:41 PM Takashi Yamamoto > > > > > > wrote: > > > > > > > > > > > > > > hi, > > > > > > > > > > > > > > i'm working on some apps which need network > connectivity. > > > > > > > does anyone have a recommendation of a board for > development on > > > which > > > > > > > i can run nuttx reliably with network? (wifi or > ethernet) > > > > > > > either a real board i can purchase, or > emulators/simulators. > > > > > > > > > > > > > > right now i'm using spresense and gs2200m-based wifi > board. > > > > > > > https://developer.sony.com/develop/spresense > > > > > > > https://idy-design.com/product/is110b.html > > > > > > > but i feel this wifi board is quite unreliable. > > > > > > > while it might be fun to fix it, unfortunately i have > to > > > concentrate > > > > > > > on my app rather than the wifi driver in the meantime. > > > > > > > > > > > > > > thank you. > > > > > > > > > > > > > > >