You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/22 17:34:28 UTC

[incubator-nuttx-apps] branch master updated (cc5b99a -> b5128c4)

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-apps.git.


    from cc5b99a  system/uniqueid: Add a tool to get the board uniqueid
     new 267d198  canutils/candump: make stacksize configurable
     new 13fcbcb  canutils/cansend: make stacksize configurable
     new f4a1d28  canutils/slcan: make stacksize configurable
     new b5128c4  canutils/libcanutils: remove redundant SocketCAN error definitions, we already have them in nuttx/can.h

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


Summary of changes:
 canutils/candump/Kconfig     |   5 ++
 canutils/candump/Makefile    |   2 +-
 canutils/cansend/Kconfig     |   5 ++
 canutils/cansend/Makefile    |   2 +-
 canutils/libcanutils/error.h | 131 -------------------------------------------
 canutils/libcanutils/lib.c   |   1 -
 canutils/slcan/Kconfig       |   4 ++
 canutils/slcan/Makefile      |   4 +-
 8 files changed, 18 insertions(+), 136 deletions(-)
 delete mode 100644 canutils/libcanutils/error.h

[incubator-nuttx-apps] 04/04: canutils/libcanutils: remove redundant SocketCAN error definitions, we already have them in nuttx/can.h

Posted by xi...@apache.org.
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

commit b5128c401f5c65f44298f46c3887d6bb57bfb90b
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Jan 22 17:08:33 2022 +0100

    canutils/libcanutils: remove redundant SocketCAN error definitions, we already have them in nuttx/can.h
---
 canutils/libcanutils/error.h | 131 -------------------------------------------
 canutils/libcanutils/lib.c   |   1 -
 2 files changed, 132 deletions(-)

diff --git a/canutils/libcanutils/error.h b/canutils/libcanutils/error.h
deleted file mode 100644
index 01ab7e0..0000000
--- a/canutils/libcanutils/error.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* SPDX-License-Identifier:
- * include/nuttx/can/error.h
- */
-
-/****************************************************************************
- * linux/can/error.h
- *
- * Definitions of the CAN error messages to be filtered and passed to the
- * user.
- *
- * Author: Oliver Hartkopp <ol...@volkswagen.de>
- * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
- * 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 of Volkswagen nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Alternatively, provided that this notice is retained in full, this
- * software may be distributed under the terms of the GNU General
- * Public License ("GPL") version 2, in which case the provisions of the
- * GPL apply INSTEAD OF those given above.
- *
- * The provided data structures and external interfaces from this code
- * are not restricted to be used by modules with a GPL compatible license.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- ****************************************************************************/
-
-#ifndef _UAPI_CAN_ERROR_H
-#define _UAPI_CAN_ERROR_H
-
-#define CAN_ERR_DLC 8 /* dlc for error message frames */
-
-/* error class (mask) in can_id */
-#define CAN_ERR_TX_TIMEOUT   0x00000001U /* TX timeout (by netdevice driver) */
-#define CAN_ERR_LOSTARB      0x00000002U /* lost arbitration    / data[0]    */
-#define CAN_ERR_CRTL         0x00000004U /* controller problems / data[1]    */
-#define CAN_ERR_PROT         0x00000008U /* protocol violations / data[2..3] */
-#define CAN_ERR_TRX          0x00000010U /* transceiver status  / data[4]    */
-#define CAN_ERR_ACK          0x00000020U /* received no ACK on transmission */
-#define CAN_ERR_BUSOFF       0x00000040U /* bus off */
-#define CAN_ERR_BUSERROR     0x00000080U /* bus error (may flood!) */
-#define CAN_ERR_RESTARTED    0x00000100U /* controller restarted */
-
-/* arbitration lost in bit ... / data[0] */
-#define CAN_ERR_LOSTARB_UNSPEC   0x00 /* unspecified */
-
-/* else bit number in bitstream */
-
-/* error status of CAN-controller / data[1] */
-#define CAN_ERR_CRTL_UNSPEC      0x00 /* unspecified */
-#define CAN_ERR_CRTL_RX_OVERFLOW 0x01 /* RX buffer overflow */
-#define CAN_ERR_CRTL_TX_OVERFLOW 0x02 /* TX buffer overflow */
-#define CAN_ERR_CRTL_RX_WARNING  0x04 /* reached warning level for RX errors */
-#define CAN_ERR_CRTL_TX_WARNING  0x08 /* reached warning level for TX errors */
-#define CAN_ERR_CRTL_RX_PASSIVE  0x10 /* reached error passive status RX */
-#define CAN_ERR_CRTL_TX_PASSIVE  0x20 /* reached error passive status TX */
-                                      /* (at least one error counter exceeds */
-                                      /* the protocol-defined level of 127)  */
-#define CAN_ERR_CRTL_ACTIVE      0x40 /* recovered to error active state */
-
-/* error in CAN protocol (type) / data[2] */
-#define CAN_ERR_PROT_UNSPEC      0x00 /* unspecified */
-#define CAN_ERR_PROT_BIT         0x01 /* single bit error */
-#define CAN_ERR_PROT_FORM        0x02 /* frame format error */
-#define CAN_ERR_PROT_STUFF       0x04 /* bit stuffing error */
-#define CAN_ERR_PROT_BIT0        0x08 /* unable to send dominant bit */
-#define CAN_ERR_PROT_BIT1        0x10 /* unable to send recessive bit */
-#define CAN_ERR_PROT_OVERLOAD    0x20 /* bus overload */
-#define CAN_ERR_PROT_ACTIVE      0x40 /* active error announcement */
-#define CAN_ERR_PROT_TX          0x80 /* error occurred on transmission */
-
-/* error in CAN protocol (location) / data[3] */
-#define CAN_ERR_PROT_LOC_UNSPEC  0x00 /* unspecified */
-#define CAN_ERR_PROT_LOC_SOF     0x03 /* start of frame */
-#define CAN_ERR_PROT_LOC_ID28_21 0x02 /* ID bits 28 - 21 (SFF: 10 - 3) */
-#define CAN_ERR_PROT_LOC_ID20_18 0x06 /* ID bits 20 - 18 (SFF: 2 - 0 )*/
-#define CAN_ERR_PROT_LOC_SRTR    0x04 /* substitute RTR (SFF: RTR) */
-#define CAN_ERR_PROT_LOC_IDE     0x05 /* identifier extension */
-#define CAN_ERR_PROT_LOC_ID17_13 0x07 /* ID bits 17-13 */
-#define CAN_ERR_PROT_LOC_ID12_05 0x0f /* ID bits 12-5 */
-#define CAN_ERR_PROT_LOC_ID04_00 0x0e /* ID bits 4-0 */
-#define CAN_ERR_PROT_LOC_RTR     0x0c /* RTR */
-#define CAN_ERR_PROT_LOC_RES1    0x0d /* reserved bit 1 */
-#define CAN_ERR_PROT_LOC_RES0    0x09 /* reserved bit 0 */
-#define CAN_ERR_PROT_LOC_DLC     0x0b /* data length code */
-#define CAN_ERR_PROT_LOC_DATA    0x0a /* data section */
-#define CAN_ERR_PROT_LOC_CRC_SEQ 0x08 /* CRC sequence */
-#define CAN_ERR_PROT_LOC_CRC_DEL 0x18 /* CRC delimiter */
-#define CAN_ERR_PROT_LOC_ACK     0x19 /* ACK slot */
-#define CAN_ERR_PROT_LOC_ACK_DEL 0x1b /* ACK delimiter */
-#define CAN_ERR_PROT_LOC_EOF     0x1a /* end of frame */
-#define CAN_ERR_PROT_LOC_INTERM  0x12 /* intermission */
-
-/* error status of CAN-transceiver / data[4] */
-
-                                            /* CANH CANL */
-#define CAN_ERR_TRX_UNSPEC             0x00 /* 0000 0000 */
-#define CAN_ERR_TRX_CANH_NO_WIRE       0x04 /* 0000 0100 */
-#define CAN_ERR_TRX_CANH_SHORT_TO_BAT  0x05 /* 0000 0101 */
-#define CAN_ERR_TRX_CANH_SHORT_TO_VCC  0x06 /* 0000 0110 */
-#define CAN_ERR_TRX_CANH_SHORT_TO_GND  0x07 /* 0000 0111 */
-#define CAN_ERR_TRX_CANL_NO_WIRE       0x40 /* 0100 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_BAT  0x50 /* 0101 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_VCC  0x60 /* 0110 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_GND  0x70 /* 0111 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_CANH 0x80 /* 1000 0000 */
-
-/* controller specific additional information / data[5..7] */
-
-#endif /* _UAPI_CAN_ERROR_H */
diff --git a/canutils/libcanutils/lib.c b/canutils/libcanutils/lib.c
index a890ff1..f12cfc3 100644
--- a/canutils/libcanutils/lib.c
+++ b/canutils/libcanutils/lib.c
@@ -48,7 +48,6 @@
 
 #include <sys/socket.h> /* for sa_family_t */
 #include <nuttx/can.h>
-#include "error.h"
 #include <netpacket/can.h>
 
 #include "lib.h"

[incubator-nuttx-apps] 01/04: canutils/candump: make stacksize configurable

Posted by xi...@apache.org.
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

commit 267d19821299c2cc375e027e858eb8bd21f2c2ae
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Jan 22 17:05:43 2022 +0100

    canutils/candump: make stacksize configurable
---
 canutils/candump/Kconfig  | 5 +++++
 canutils/candump/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/canutils/candump/Kconfig b/canutils/candump/Kconfig
index 0ba3eb0..eaf41db 100644
--- a/canutils/candump/Kconfig
+++ b/canutils/candump/Kconfig
@@ -13,4 +13,9 @@ config CANUTILS_CANDUMP
 		https://github.com/linux-can/can-utils
 
 if CANUTILS_CANDUMP
+
+config CANUTILS_CANDUMP_STACKSIZE
+	int "SocketCAN candump stack size"
+	default DEFAULT_TASK_STACKSIZE
+
 endif
diff --git a/canutils/candump/Makefile b/canutils/candump/Makefile
index abbccfb..869cbce 100644
--- a/canutils/candump/Makefile
+++ b/canutils/candump/Makefile
@@ -25,7 +25,7 @@ include $(APPDIR)/Make.defs
 
 PROGNAME = candump
 PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = 3072
+STACKSIZE = $(CONFIG_CANUTILS_CANDUMP_STACKSIZE)
 MODULE = $(CONFIG_CANUTILS_CANDUMP)
 
 CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/canutils/libcanutils}

[incubator-nuttx-apps] 03/04: canutils/slcan: make stacksize configurable

Posted by xi...@apache.org.
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

commit f4a1d28fd5274cce08ea67386834a233a05c15a7
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Jan 22 17:06:45 2022 +0100

    canutils/slcan: make stacksize configurable
---
 canutils/slcan/Kconfig  | 4 ++++
 canutils/slcan/Makefile | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/canutils/slcan/Kconfig b/canutils/slcan/Kconfig
index 39b4eff..04f7811 100644
--- a/canutils/slcan/Kconfig
+++ b/canutils/slcan/Kconfig
@@ -12,6 +12,10 @@ config CANUTILS_SLCAN
 
 if CANUTILS_SLCAN
 
+config CANUTILS_SLCAN_STACKSIZE
+	int "SocketCAN slcan stack size"
+	default DEFAULT_TASK_STACKSIZE
+
 config SLCAN_TRACE
 	bool "Print trace output"
 	default y
diff --git a/canutils/slcan/Makefile b/canutils/slcan/Makefile
index 974d68e..5ff4ce6 100644
--- a/canutils/slcan/Makefile
+++ b/canutils/slcan/Makefile
@@ -24,10 +24,10 @@
 
 PROGNAME = slcan
 PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = 3048
+STACKSIZE = $(CONFIG_CANUTILS_SLCAN_STACKSIZE)
 MODULE = $(CONFIG_CANUTILS_SLCAN)
 
-CSRCS = 
+CSRCS =
 
 MAINSRC = slcan.c
 

[incubator-nuttx-apps] 02/04: canutils/cansend: make stacksize configurable

Posted by xi...@apache.org.
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

commit 13fcbcb3d1f3cf66b7ade640fbbea9c35f9ed896
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Jan 22 17:06:32 2022 +0100

    canutils/cansend: make stacksize configurable
---
 canutils/cansend/Kconfig  | 5 +++++
 canutils/cansend/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/canutils/cansend/Kconfig b/canutils/cansend/Kconfig
index 9d4adea..c471b7d 100644
--- a/canutils/cansend/Kconfig
+++ b/canutils/cansend/Kconfig
@@ -13,4 +13,9 @@ config CANUTILS_CANSEND
 		https://github.com/linux-can/can-utils
 
 if CANUTILS_CANSEND
+
+config CANUTILS_CANSEND_STACKSIZE
+	int "SocketCAN cansend stack size"
+	default DEFAULT_TASK_STACKSIZE
+
 endif
diff --git a/canutils/cansend/Makefile b/canutils/cansend/Makefile
index 8df2057..0f10627 100644
--- a/canutils/cansend/Makefile
+++ b/canutils/cansend/Makefile
@@ -25,7 +25,7 @@ include $(APPDIR)/Make.defs
 
 PROGNAME = cansend
 PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = 2048
+STACKSIZE = $(CONFIG_CANUTILS_CANSEND_STACKSIZE)
 MODULE = $(CONFIG_CANUTILS_CANSEND)
 
 CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/canutils/libcanutils}