casaroli commented on code in PR #19250:
URL: https://github.com/apache/nuttx/pull/19250#discussion_r4386944276


##########
boards/arm/rp23xx/raspberrypi-pico-2-w/configs/composite/defconfig:
##########
@@ -0,0 +1,80 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_ARCH_LEDS is not set
+# CONFIG_DEV_CONSOLE is not set
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_DATE is not set
+# CONFIG_NSH_DISABLE_LOSMART is not set
+# CONFIG_STANDARD_SERIAL is not set
+CONFIG_ALLOW_BSD_COMPONENTS=y

Review Comment:
   Nothing in this config depends on `CONFIG_ALLOW_BSD_COMPONENTS`. Please 
remove it.



##########
boards/arm/rp23xx/raspberrypi-pico-2-w/configs/composite/defconfig:
##########
@@ -0,0 +1,80 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_ARCH_LEDS is not set
+# CONFIG_DEV_CONSOLE is not set
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_DATE is not set
+# CONFIG_NSH_DISABLE_LOSMART is not set
+# CONFIG_STANDARD_SERIAL is not set
+CONFIG_ALLOW_BSD_COMPONENTS=y
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="raspberrypi-pico-2-w"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_RASPBERRYPI_PICO_2_W=y
+CONFIG_ARCH_CHIP="rp23xx"
+CONFIG_ARCH_CHIP_RP23XX=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+CONFIG_ARCH_RAMVECTORS=y
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARDCTL_RESET=y
+CONFIG_BOARD_LOOPSPERMSEC=10450
+CONFIG_BUILTIN=y
+CONFIG_CDCACM=y
+CONFIG_CDCACM_COMPOSITE=y

Review Comment:
   A CDC-ACM function in a composite device needs `CONFIG_COMPOSITE_IAD`; 
`cdcacm.h` warns about it during the build. Please also set 
`CONFIG_COMPOSITE_VENDORID` and `CONFIG_COMPOSITE_PRODUCTID` like the other 
rp2xxx composite configs; without them the device enumerates as 0000:0000, as 
in the test log.



##########
boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_composite.c:
##########
@@ -0,0 +1,123 @@
+/****************************************************************************
+ * boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_composite.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <sys/types.h>
+#include <debug.h>
+#include <assert.h>
+
+#include <nuttx/usb/usbdev.h>
+#include <nuttx/usb/composite.h>
+
+#ifdef CONFIG_CDCACM_COMPOSITE
+#  include <nuttx/usb/cdcacm.h>
+#endif
+#ifdef CONFIG_CDCNCM_COMPOSITE
+#  include <nuttx/usb/cdcncm.h>
+#endif
+
+#if defined(CONFIG_BOARDCTL_USBDEVCTRL) && defined(CONFIG_USBDEV_COMPOSITE)
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_composite_initialize
+ ****************************************************************************/
+
+int board_composite_initialize(int port)
+{
+  return OK;
+}
+
+/****************************************************************************
+ * Name:  board_composite_connect
+ *
+ * Description:
+ *   Connect the CDC/ACM serial console + CDC/NCM network composite device.
+ *   The two classes use disjoint endpoint numbers (ACM: 1/2/3, NCM: 4/5/6)
+ *   so they can coexist in one configuration.
+ *
+ ****************************************************************************/
+
+void *board_composite_connect(int port, int configid)

Review Comment:
   `boards/arm/rp23xx/common/src/rp23xx_composite.c` also defines 
`board_composite_connect()` and is built for `CONFIG_USBDEV_COMPOSITE`, so this 
config builds two files with the same name. With CMake both objects go into 
`libboard.a` and the linker takes the common one: in a CMake build of 
`raspberrypi-pico-2-w:composite`, `cdcncm_get_composite_devdesc` is not in the 
image, so there is no `eth0`. With make, VPATH picks this file and make warns 
"target `rp23xx_composite.o' given more than once". Please add the CDC-NCM case 
to the common file (for example NCM on endpoints 6/7/8 after ACM 3/4/5) and 
remove this file.



##########
boards/arm/rp23xx/raspberrypi-pico-2-w/configs/telnet/defconfig:
##########
@@ -0,0 +1,90 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_ARCH_LEDS is not set
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_DATE is not set
+# CONFIG_NSH_DISABLE_LOSMART is not set
+# CONFIG_STANDARD_SERIAL is not set
+CONFIG_ALLOW_BSD_COMPONENTS=y

Review Comment:
   Nothing in this config depends on `CONFIG_ALLOW_BSD_COMPONENTS`. Please 
remove it.



##########
boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_buttons.c:
##########
@@ -0,0 +1,177 @@
+/****************************************************************************
+ * boards/arm/rp23xx/raspberrypi-pico-2-w/src/rp23xx_buttons.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+#include <errno.h>
+
+#include <nuttx/arch.h>
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+
+#include "rp23xx_gpio.h"
+#include "rp23xx_pico.h"
+
+#if defined(CONFIG_ARCH_BUTTONS)
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#if defined(CONFIG_INPUT_BUTTONS) && !defined(CONFIG_ARCH_IRQBUTTONS)
+#  error "The NuttX Buttons Driver depends on IRQ support to work!\n"
+#endif
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/* Pin configuration for external raspberrypi-pico-2 buttons. */
+
+static const uint32_t g_buttons[NUM_BUTTONS] =

Review Comment:
   The board does not select `ARCH_HAVE_BUTTONS`, and BOOTSEL is not a GPIO, as 
the documentation says. So this file and the GPIO 16/17 button definitions in 
`rp23xx_pico.h` and `board.h` are never built. Please remove them.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to