You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "michi-jung (via GitHub)" <gi...@apache.org> on 2024/04/19 18:35:57 UTC

[PR] Support for W5500-EVB-Pico board [nuttx]

michi-jung opened a new pull request, #12186:
URL: https://github.com/apache/nuttx/pull/12186

   ## Summary
   
   This pull request contains support for the WIZnet W5500-EVB-Pico bord.
   
   ## Impact
   
   Should not have any impact on other board configurations.
   
   ## Testing
   
   Tested this on a W5500-EVB-Pico including Ethernet with TCP/IPv4 & IPv6.
   


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "michi-jung (via GitHub)" <gi...@apache.org>.
michi-jung commented on code in PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#discussion_r1573192115


##########
boards/arm/rp2040/w5500-evb-pico/include/rp2040_i2cdev.h:
##########
@@ -0,0 +1,72 @@
+/****************************************************************************
+ * boards/arm/rp2040/w5500-evb-pico/include/rp2040_i2cdev.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_RP2040_I2CDEV_H
+#define __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_RP2040_I2CDEV_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <stdint.h>
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_i2cdev_initialize
+ *
+ * Description:
+ *   Initialize i2c driver and register the /dev/i2c device.
+ *

Review Comment:
   Thanks! 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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#issuecomment-2067299668

   @michi-jung also please include the board documentation with its picture, see reference:
   https://nuttx.apache.org/docs/latest/platforms/arm/rp2040/boards/raspberrypi-pico/index.html


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "michi-jung (via GitHub)" <gi...@apache.org>.
michi-jung commented on code in PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#discussion_r1573316338


##########
boards/arm/rp2040/common/src/rp2040_w5500.c:
##########
@@ -0,0 +1,209 @@
+/****************************************************************************
+ * boards/arm/rp2040/common/src/rp2040_w5500.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 <stdio.h>
+#include <assert.h>
+#include <debug.h>
+
+#include <nuttx/spi/spi.h>
+#include <nuttx/net/w5500.h>
+
+#include "rp2040_spi.h"
+#include "rp2040_gpio.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Sanity Check *************************************************************/
+
+#if (CONFIG_RP2040_W5500_SPI_CH == 0) && !defined(CONFIG_RP2040_SPI0)
+# error "W5500 configured to use SPI0, but SPI0 is not enabled"
+#endif
+
+#if (CONFIG_RP2040_W5500_SPI_CH == 1) && !defined(CONFIG_RP2040_SPI1)
+# error "W5500 configured to use SPI1, but SPI1 is not enabled"
+#endif
+
+/* SPI Assumptions **********************************************************/
+
+#define W5500_DEVNO      0   /* Only one W5500 */
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+struct rp2040_lower_s
+{
+  const struct w5500_lower_s lower;    /* Low-level MCU interface */
+  xcpt_t                     handler;  /* W5500 interrupt handler */
+  void                      *arg;      /* Argument that accompanies IRQ */
+};
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static int  up_attach(const struct w5500_lower_s *lower, xcpt_t handler,
+                      void *arg);
+static void up_enable(const struct w5500_lower_s *lower, bool enable);
+static void up_reset(const struct w5500_lower_s *lower, bool reset);
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static struct rp2040_lower_s g_enclower =
+{
+  .lower =
+  {
+    .frequency = (CONFIG_RP2040_W5500_SPI_FREQ * 1000),
+    .spidevid  = 0,
+    .mode      = SPIDEV_MODE0,
+    .attach    = up_attach,

Review Comment:
   Good idea.  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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#discussion_r1573246107


##########
boards/arm/rp2040/common/src/rp2040_w5500.c:
##########
@@ -0,0 +1,209 @@
+/****************************************************************************
+ * boards/arm/rp2040/common/src/rp2040_w5500.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 <stdio.h>
+#include <assert.h>
+#include <debug.h>
+
+#include <nuttx/spi/spi.h>
+#include <nuttx/net/w5500.h>
+
+#include "rp2040_spi.h"
+#include "rp2040_gpio.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Sanity Check *************************************************************/
+
+#if (CONFIG_RP2040_W5500_SPI_CH == 0) && !defined(CONFIG_RP2040_SPI0)
+# error "W5500 configured to use SPI0, but SPI0 is not enabled"
+#endif
+
+#if (CONFIG_RP2040_W5500_SPI_CH == 1) && !defined(CONFIG_RP2040_SPI1)
+# error "W5500 configured to use SPI1, but SPI1 is not enabled"
+#endif
+
+/* SPI Assumptions **********************************************************/
+
+#define W5500_DEVNO      0   /* Only one W5500 */
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+struct rp2040_lower_s
+{
+  const struct w5500_lower_s lower;    /* Low-level MCU interface */
+  xcpt_t                     handler;  /* W5500 interrupt handler */
+  void                      *arg;      /* Argument that accompanies IRQ */
+};
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+static int  up_attach(const struct w5500_lower_s *lower, xcpt_t handler,
+                      void *arg);
+static void up_enable(const struct w5500_lower_s *lower, bool enable);
+static void up_reset(const struct w5500_lower_s *lower, bool reset);
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static struct rp2040_lower_s g_enclower =
+{
+  .lower =
+  {
+    .frequency = (CONFIG_RP2040_W5500_SPI_FREQ * 1000),
+    .spidevid  = 0,
+    .mode      = SPIDEV_MODE0,
+    .attach    = up_attach,

Review Comment:
   should we name up_ to rp2040_



-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "michi-jung (via GitHub)" <gi...@apache.org>.
michi-jung commented on PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#issuecomment-2067705969

   > > Hi @acassis
   > > Thanks a lot for your review.
   > > I did open [apache/nuttx-apps#2361](https://github.com/apache/nuttx-apps/pull/2361) for the printf-style format string errors in dhcp6c.c
   > > The board documentation is in [182c02a](https://github.com/apache/nuttx/commit/182c02a71486350b4d24705891d2e75320c4bfe0)
   > > I will handle your other remarks.
   > 
   > Thank you @michi-jung! Please convert the README.txt to ReStructuredText to include pictures. Those README.txt were moved to Documentation/ by @raiden00pl to be fixed/converted later, but he didn't finish the convertion yet.
   > 
   > So it is causing confusion, you are the second person to submit an old style README.txt this week instead of using the new format.
   
   Ok, I basically integrated the contents of the README.txt file into the ReStructuredText file.  Thanks for your support, @acassis 


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12186:
URL: https://github.com/apache/nuttx/pull/12186


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#issuecomment-2067271882

   Nice work @michi-jung !!!
   
   Could you please this error reported in the network stack:
   
   ```
   In file included from dhcp6c.c:37:
   dhcp6c.c: In function 'dhcp6c_get_result':
   Error: dhcp6c.c:435:9: error: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
     435 |   ninfo("T1:%d T2:%d for iface %i\n", presult->t1, presult->t2,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
         |                                              |
         |                                              uint32_t {aka long unsigned int}
   dhcp6c.c:435:14: note: format string is defined here
     435 |   ninfo("T1:%d T2:%d for iface %i\n", presult->t1, presult->t2,
         |             ~^
         |              |
         |              int
         |             %ld
   Error: dhcp6c.c:435:9: error: format '%d' expects argument of type 'int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
     435 |   ninfo("T1:%d T2:%d for iface %i\n", presult->t1, presult->t2,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~               ~~~~~~~~~~~
         |                                                           |
         |                                                           uint32_t {aka long unsigned int}
   dhcp6c.c:435:20: note: format string is defined here
     435 |   ninfo("T1:%d T2:%d for iface %i\n", presult->t1, presult->t2,
         |                   ~^
         |                    |
         |                    int
         |                   %ld
   dhcp6c.c: In function 'dhcp6c_command':
   Error: dhcp6c.c:796:9: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
     796 |   ninfo("Sending %s (timeout %u s)\n", retx->name, timeout);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ~~~~~~~
         |                                                    |
         |                                                    uint32_t {aka long unsigned int}
   dhcp6c.c:796:31: note: format string is defined here
     796 |   ninfo("Sending %s (timeout %u s)\n", retx->name, timeout);
         |                              ~^
         |                               |
         |                               unsigned int
         |                              %lu
   ```
   
   It is just replacing %u with PRIu32


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "michi-jung (via GitHub)" <gi...@apache.org>.
michi-jung commented on code in PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#discussion_r1573191899


##########
boards/arm/rp2040/w5500-evb-pico/include/board.h:
##########
@@ -0,0 +1,167 @@
+/****************************************************************************
+ * boards/arm/rp2040/w5500-evb-pico/include/board.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+#define __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "rp2040_i2cdev.h"
+#include "rp2040_spidev.h"
+#include "rp2040_i2sdev.h"
+
+#include "rp2040_spisd.h"
+
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+#define MHZ                     1000000
+
+#define BOARD_XOSC_FREQ         (12 * MHZ)
+#define BOARD_PLL_SYS_FREQ      (125 * MHZ)
+#define BOARD_PLL_USB_FREQ      (48 * MHZ)
+
+#define BOARD_REF_FREQ          (12 * MHZ)
+#define BOARD_SYS_FREQ          (125 * MHZ)
+#define BOARD_PERI_FREQ         (125 * MHZ)
+#define BOARD_USB_FREQ          (48 * MHZ)
+#define BOARD_ADC_FREQ          (48 * MHZ)
+#define BOARD_RTC_FREQ          46875
+
+#define BOARD_UART_BASEFREQ     BOARD_PERI_FREQ
+
+#define BOARD_TICK_CLOCK        (1 * MHZ)
+
+/* GPIO definitions *********************************************************/
+
+#define BOARD_GPIO_LED_PIN      25
+#define BOARD_NGPIOOUT          1
+#define BOARD_NGPIOIN           1
+#define BOARD_NGPIOINT          1
+
+/* LED definitions **********************************************************/
+
+/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs
+ * in any way. The following definitions are used to access individual LEDs.
+ */
+
+/* LED index values for use with board_userled() */
+
+#define BOARD_LED1        0
+#define BOARD_NLEDS       1
+
+#define BOARD_LED_GREEN   BOARD_LED1
+
+/* LED bits for use with board_userled_all() */
+
+#define BOARD_LED1_BIT    (1 << BOARD_LED1)
+
+/* 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/rp2040_autoleds.c. The LED is used to encode
+ * OS-related events as follows:
+ *
+ *   -------------------- ----------------------------- ------
+ *   SYMBOL                   Meaning                   LED
+ *   -------------------- ----------------------------- ------
+ */
+
+#define LED_STARTED       0  /* NuttX has been started  OFF    */
+#define LED_HEAPALLOCATE  0  /* Heap has been allocated OFF    */
+#define LED_IRQSENABLED   0  /* Interrupts enabled      OFF    */
+#define LED_STACKCREATED  1  /* Idle stack created      ON     */
+#define LED_INIRQ         2  /* In an interrupt         N/C    */
+#define LED_SIGNAL        2  /* In a signal handler     N/C    */
+#define LED_ASSERTION     2  /* An assertion failed     N/C    */
+#define LED_PANIC         3  /* The system has crashed  FLASH  */
+#undef  LED_IDLE             /* Not used                       */
+
+/* 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.
+ */
+
+/* BUTTON definitions *******************************************************/
+
+#define NUM_BUTTONS       2
+
+#define BUTTON_USER1      0
+#define BUTTON_USER2      1
+#define BUTTON_USER1_BIT  (1 << BUTTON_USER1)
+#define BUTTON_USER2_BIT  (1 << BUTTON_USER2)
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: rp2040_boardearlyinitialize
+ *
+ * Description:
+ *

Review Comment:
   Thanks! Done.



##########
boards/arm/rp2040/w5500-evb-pico/include/board.h:
##########
@@ -0,0 +1,167 @@
+/****************************************************************************
+ * boards/arm/rp2040/w5500-evb-pico/include/board.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+#define __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "rp2040_i2cdev.h"
+#include "rp2040_spidev.h"
+#include "rp2040_i2sdev.h"
+
+#include "rp2040_spisd.h"
+
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+#define MHZ                     1000000
+
+#define BOARD_XOSC_FREQ         (12 * MHZ)
+#define BOARD_PLL_SYS_FREQ      (125 * MHZ)
+#define BOARD_PLL_USB_FREQ      (48 * MHZ)
+
+#define BOARD_REF_FREQ          (12 * MHZ)
+#define BOARD_SYS_FREQ          (125 * MHZ)
+#define BOARD_PERI_FREQ         (125 * MHZ)
+#define BOARD_USB_FREQ          (48 * MHZ)
+#define BOARD_ADC_FREQ          (48 * MHZ)
+#define BOARD_RTC_FREQ          46875
+
+#define BOARD_UART_BASEFREQ     BOARD_PERI_FREQ
+
+#define BOARD_TICK_CLOCK        (1 * MHZ)
+
+/* GPIO definitions *********************************************************/
+
+#define BOARD_GPIO_LED_PIN      25
+#define BOARD_NGPIOOUT          1
+#define BOARD_NGPIOIN           1
+#define BOARD_NGPIOINT          1
+
+/* LED definitions **********************************************************/
+
+/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs
+ * in any way. The following definitions are used to access individual LEDs.
+ */
+
+/* LED index values for use with board_userled() */
+
+#define BOARD_LED1        0
+#define BOARD_NLEDS       1
+
+#define BOARD_LED_GREEN   BOARD_LED1
+
+/* LED bits for use with board_userled_all() */
+
+#define BOARD_LED1_BIT    (1 << BOARD_LED1)
+
+/* 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/rp2040_autoleds.c. The LED is used to encode
+ * OS-related events as follows:
+ *
+ *   -------------------- ----------------------------- ------
+ *   SYMBOL                   Meaning                   LED
+ *   -------------------- ----------------------------- ------
+ */
+
+#define LED_STARTED       0  /* NuttX has been started  OFF    */
+#define LED_HEAPALLOCATE  0  /* Heap has been allocated OFF    */
+#define LED_IRQSENABLED   0  /* Interrupts enabled      OFF    */
+#define LED_STACKCREATED  1  /* Idle stack created      ON     */
+#define LED_INIRQ         2  /* In an interrupt         N/C    */
+#define LED_SIGNAL        2  /* In a signal handler     N/C    */
+#define LED_ASSERTION     2  /* An assertion failed     N/C    */
+#define LED_PANIC         3  /* The system has crashed  FLASH  */
+#undef  LED_IDLE             /* Not used                       */
+
+/* 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.
+ */
+
+/* BUTTON definitions *******************************************************/
+
+#define NUM_BUTTONS       2
+
+#define BUTTON_USER1      0
+#define BUTTON_USER2      1
+#define BUTTON_USER1_BIT  (1 << BUTTON_USER1)
+#define BUTTON_USER2_BIT  (1 << BUTTON_USER2)
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: rp2040_boardearlyinitialize
+ *
+ * Description:
+ *
+ ****************************************************************************/
+
+void rp2040_boardearlyinitialize(void);
+
+/****************************************************************************
+ * Name: rp2040_boardinitialize
+ *
+ * Description:
+ *

Review Comment:
   Thanks! 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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "michi-jung (via GitHub)" <gi...@apache.org>.
michi-jung commented on PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#issuecomment-2067580833

   Hi @acassis 
   
   Thanks a lot for your review.
   
   I did open https://github.com/apache/nuttx-apps/pull/2361 for the printf-style format string errors in dhcp6c.c
   
   The board documentation is in https://github.com/apache/nuttx/pull/12186/commits/54e61ca08da87ab52597ca2a27a47488786b8d7d
   
   I will handle your other remarks.


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#issuecomment-2067637267

   > Hi @acassis
   > 
   > Thanks a lot for your review.
   > 
   > I did open [apache/nuttx-apps#2361](https://github.com/apache/nuttx-apps/pull/2361) for the printf-style format string errors in dhcp6c.c
   > 
   > The board documentation is in [182c02a](https://github.com/apache/nuttx/commit/182c02a71486350b4d24705891d2e75320c4bfe0)
   > 
   > I will handle your other remarks.
   
   Thank you @michi-jung! Please convert the README.txt to ReStructuredText to include pictures. Those README.txt were moved to Documentation/ by @raiden00pl to be fixed/converted later, but he didn't finish the convertion yet.
   
   So it is causing confusion, you are the second person to submit an old style README.txt instead of using the new format.


-- 
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: commits-unsubscribe@nuttx.apache.org

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


Re: [PR] Support for W5500-EVB-Pico board [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #12186:
URL: https://github.com/apache/nuttx/pull/12186#discussion_r1572963749


##########
boards/arm/rp2040/w5500-evb-pico/include/board.h:
##########
@@ -0,0 +1,167 @@
+/****************************************************************************
+ * boards/arm/rp2040/w5500-evb-pico/include/board.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+#define __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "rp2040_i2cdev.h"
+#include "rp2040_spidev.h"
+#include "rp2040_i2sdev.h"
+
+#include "rp2040_spisd.h"
+
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+#define MHZ                     1000000
+
+#define BOARD_XOSC_FREQ         (12 * MHZ)
+#define BOARD_PLL_SYS_FREQ      (125 * MHZ)
+#define BOARD_PLL_USB_FREQ      (48 * MHZ)
+
+#define BOARD_REF_FREQ          (12 * MHZ)
+#define BOARD_SYS_FREQ          (125 * MHZ)
+#define BOARD_PERI_FREQ         (125 * MHZ)
+#define BOARD_USB_FREQ          (48 * MHZ)
+#define BOARD_ADC_FREQ          (48 * MHZ)
+#define BOARD_RTC_FREQ          46875
+
+#define BOARD_UART_BASEFREQ     BOARD_PERI_FREQ
+
+#define BOARD_TICK_CLOCK        (1 * MHZ)
+
+/* GPIO definitions *********************************************************/
+
+#define BOARD_GPIO_LED_PIN      25
+#define BOARD_NGPIOOUT          1
+#define BOARD_NGPIOIN           1
+#define BOARD_NGPIOINT          1
+
+/* LED definitions **********************************************************/
+
+/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs
+ * in any way. The following definitions are used to access individual LEDs.
+ */
+
+/* LED index values for use with board_userled() */
+
+#define BOARD_LED1        0
+#define BOARD_NLEDS       1
+
+#define BOARD_LED_GREEN   BOARD_LED1
+
+/* LED bits for use with board_userled_all() */
+
+#define BOARD_LED1_BIT    (1 << BOARD_LED1)
+
+/* 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/rp2040_autoleds.c. The LED is used to encode
+ * OS-related events as follows:
+ *
+ *   -------------------- ----------------------------- ------
+ *   SYMBOL                   Meaning                   LED
+ *   -------------------- ----------------------------- ------
+ */
+
+#define LED_STARTED       0  /* NuttX has been started  OFF    */
+#define LED_HEAPALLOCATE  0  /* Heap has been allocated OFF    */
+#define LED_IRQSENABLED   0  /* Interrupts enabled      OFF    */
+#define LED_STACKCREATED  1  /* Idle stack created      ON     */
+#define LED_INIRQ         2  /* In an interrupt         N/C    */
+#define LED_SIGNAL        2  /* In a signal handler     N/C    */
+#define LED_ASSERTION     2  /* An assertion failed     N/C    */
+#define LED_PANIC         3  /* The system has crashed  FLASH  */
+#undef  LED_IDLE             /* Not used                       */
+
+/* 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.
+ */
+
+/* BUTTON definitions *******************************************************/
+
+#define NUM_BUTTONS       2
+
+#define BUTTON_USER1      0
+#define BUTTON_USER2      1
+#define BUTTON_USER1_BIT  (1 << BUTTON_USER1)
+#define BUTTON_USER2_BIT  (1 << BUTTON_USER2)
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: rp2040_boardearlyinitialize
+ *
+ * Description:
+ *

Review Comment:
   Please include description



##########
boards/arm/rp2040/w5500-evb-pico/include/board.h:
##########
@@ -0,0 +1,167 @@
+/****************************************************************************
+ * boards/arm/rp2040/w5500-evb-pico/include/board.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+#define __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include "rp2040_i2cdev.h"
+#include "rp2040_spidev.h"
+#include "rp2040_i2sdev.h"
+
+#include "rp2040_spisd.h"
+
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+#define MHZ                     1000000
+
+#define BOARD_XOSC_FREQ         (12 * MHZ)
+#define BOARD_PLL_SYS_FREQ      (125 * MHZ)
+#define BOARD_PLL_USB_FREQ      (48 * MHZ)
+
+#define BOARD_REF_FREQ          (12 * MHZ)
+#define BOARD_SYS_FREQ          (125 * MHZ)
+#define BOARD_PERI_FREQ         (125 * MHZ)
+#define BOARD_USB_FREQ          (48 * MHZ)
+#define BOARD_ADC_FREQ          (48 * MHZ)
+#define BOARD_RTC_FREQ          46875
+
+#define BOARD_UART_BASEFREQ     BOARD_PERI_FREQ
+
+#define BOARD_TICK_CLOCK        (1 * MHZ)
+
+/* GPIO definitions *********************************************************/
+
+#define BOARD_GPIO_LED_PIN      25
+#define BOARD_NGPIOOUT          1
+#define BOARD_NGPIOIN           1
+#define BOARD_NGPIOINT          1
+
+/* LED definitions **********************************************************/
+
+/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs
+ * in any way. The following definitions are used to access individual LEDs.
+ */
+
+/* LED index values for use with board_userled() */
+
+#define BOARD_LED1        0
+#define BOARD_NLEDS       1
+
+#define BOARD_LED_GREEN   BOARD_LED1
+
+/* LED bits for use with board_userled_all() */
+
+#define BOARD_LED1_BIT    (1 << BOARD_LED1)
+
+/* 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/rp2040_autoleds.c. The LED is used to encode
+ * OS-related events as follows:
+ *
+ *   -------------------- ----------------------------- ------
+ *   SYMBOL                   Meaning                   LED
+ *   -------------------- ----------------------------- ------
+ */
+
+#define LED_STARTED       0  /* NuttX has been started  OFF    */
+#define LED_HEAPALLOCATE  0  /* Heap has been allocated OFF    */
+#define LED_IRQSENABLED   0  /* Interrupts enabled      OFF    */
+#define LED_STACKCREATED  1  /* Idle stack created      ON     */
+#define LED_INIRQ         2  /* In an interrupt         N/C    */
+#define LED_SIGNAL        2  /* In a signal handler     N/C    */
+#define LED_ASSERTION     2  /* An assertion failed     N/C    */
+#define LED_PANIC         3  /* The system has crashed  FLASH  */
+#undef  LED_IDLE             /* Not used                       */
+
+/* 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.
+ */
+
+/* BUTTON definitions *******************************************************/
+
+#define NUM_BUTTONS       2
+
+#define BUTTON_USER1      0
+#define BUTTON_USER2      1
+#define BUTTON_USER1_BIT  (1 << BUTTON_USER1)
+#define BUTTON_USER2_BIT  (1 << BUTTON_USER2)
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: rp2040_boardearlyinitialize
+ *
+ * Description:
+ *
+ ****************************************************************************/
+
+void rp2040_boardearlyinitialize(void);
+
+/****************************************************************************
+ * Name: rp2040_boardinitialize
+ *
+ * Description:
+ *

Review Comment:
   Ditto



##########
boards/arm/rp2040/w5500-evb-pico/include/rp2040_i2cdev.h:
##########
@@ -0,0 +1,72 @@
+/****************************************************************************
+ * boards/arm/rp2040/w5500-evb-pico/include/rp2040_i2cdev.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_RP2040_I2CDEV_H
+#define __BOARDS_ARM_RP2040_W5500_EVB_PICO_INCLUDE_RP2040_I2CDEV_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <stdint.h>
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_i2cdev_initialize
+ *
+ * Description:
+ *   Initialize i2c driver and register the /dev/i2c device.
+ *

Review Comment:
   Please include the Input parameter: bus



-- 
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: commits-unsubscribe@nuttx.apache.org

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