You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/12 03:13:27 UTC

[GitHub] [incubator-nuttx] curuvar opened a new pull request, #6838: Added support for raspberrypi pico-w

curuvar opened a new pull request, #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838

   ## Summary
   
   Added support for RaspberryPi Pico W
   
   ## Impact
   
   Adding support for the Pico W required changes to the networking software.  The existing BCMF chips use SDIO to communicate with the processor.  The 43439 in the Pi W uses gSPI.  In order to use as much common code as possible, I implemented bcmf_gspi.c to parallel bcmf_spio.c. I also added a file bcmf_interface.c that server as an abstraction layer between the two.
   
   Most files that used "struct bcmf_sdio_dev_s sbus" were changed to use "bcmf_interface_def_t ibus".   The "sbus" name was kept in places specific to SDIO, where "gbus" is used in places specific to gSPI.
   
   ## Testing
   
   Have tested the Pico-W in general and the Pico-w WiFi access using telnet, telnetd, ping and renew.
   
   I do not have the hardware to test the existing SPIO code.
   
   ## Known Bugs
   
   DNS queries to don't currently work.
   


-- 
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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r944143366


##########
arch/arm/src/rp2040/Kconfig:
##########
@@ -685,6 +685,8 @@ config RP2040_BOARD_HAS_WS2812
 	bool "Has ws2812 pixels"
 	default n
 	depends on WS2812
+  select WS2812_NON_SPI_DRIVER

Review Comment:
   tab



##########
arch/arm/src/Makefile:
##########
@@ -157,7 +157,7 @@ endef
 nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) $(ARCHSCRIPT)
 	$(Q) echo "LD: nuttx"
 ifneq ($(CONFIG_ALLSYMS),y)
-	$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
+	$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \

Review Comment:
   why change this?



##########
net/arp/arp_arpin.c:
##########
@@ -108,7 +108,10 @@ void arp_arpin(FAR struct net_driver_s *dev)
   switch (arp->ah_opcode)
     {
       case HTONS(ARP_REQUEST):
-        ninfo("ARP request for IP %04lx\n", (unsigned long)ipaddr);
+        ninfo("ARP request for IP %ld.%ld.%ld.%ld\n", ip4_addr1(ipaddr),

Review Comment:
   move to other patch



##########
include/nuttx/wireless/ieee80211/bcmf_gspi.h:
##########
@@ -0,0 +1,130 @@
+/****************************************************************************
+ * include/nuttx/ieee80211/bmcf_gspi.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 __INCLUDE_NUTTX_WIRELESS_IEEE80211_BCMF_GSPI_H
+#define __INCLUDE_NUTTX_WIRELESS_IEEE80211_BCMF_GSPI_H

Review Comment:
   could we split the bcmf related change to new PR?



##########
arch/arm/src/rp2040/Kconfig:
##########
@@ -685,6 +685,8 @@ config RP2040_BOARD_HAS_WS2812
 	bool "Has ws2812 pixels"
 	default n
 	depends on WS2812
+  select WS2812_NON_SPI_DRIVER
 	---help---
 		See the Board Selection menu to configure the pins used
 		by ws2812.
+		

Review Comment:
   revert the change



##########
libs/libc/netdb/lib_dnsquery.c:
##########
@@ -709,6 +709,14 @@ int dns_query(FAR const char *hostname, FAR union dns_addr_u *addr,
   FAR struct dns_query_s query;
   int ret;
 
+  /* Has the DNS client been properly initialized? */
+
+  if (!dns_initialize())

Review Comment:
   we have a better patch to fix this problem. @zhhyu7 please provide the patch.



##########
net/arp/arp_out.c:
##########
@@ -260,7 +260,10 @@ void arp_out(FAR struct net_driver_s *dev)
   ret = arp_find(ipaddr, &ethaddr);
   if (ret < 0)
     {
-      ninfo("ARP request for IP %08lx\n", (unsigned long)ipaddr);
+      ninfo("ARP request for IP %ld.%ld.%ld.%ld\n", ip4_addr1(ipaddr),

Review Comment:
   let's move to other patch



-- 
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


[GitHub] [incubator-nuttx] curuvar commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
curuvar commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r944497652


##########
include/nuttx/wireless/ieee80211/bcmf_gspi.h:
##########
@@ -0,0 +1,130 @@
+/****************************************************************************
+ * include/nuttx/ieee80211/bmcf_gspi.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 __INCLUDE_NUTTX_WIRELESS_IEEE80211_BCMF_GSPI_H
+#define __INCLUDE_NUTTX_WIRELESS_IEEE80211_BCMF_GSPI_H

Review Comment:
   Sure.  
   
   To be clear I will pull all the actual Pico-W related changes in the "boards" and "arch/arm" directories and resubmit the PR as "adding gSPI support to bcmf".  I will submit a separate PR for "adding pico-w".
   
   Does this match your intent? 



-- 
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


[GitHub] [incubator-nuttx] spiriou commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
spiriou commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r945534764


##########
arch/arm/src/Makefile:
##########
@@ -157,7 +157,7 @@ endef
 nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) $(ARCHSCRIPT)
 	$(Q) echo "LD: nuttx"
 ifneq ($(CONFIG_ALLSYMS),y)
-	$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
+	$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \

Review Comment:
   Revert this change?



-- 
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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r944222641


##########
libs/libc/netdb/lib_dnsquery.c:
##########
@@ -709,6 +709,14 @@ int dns_query(FAR const char *hostname, FAR union dns_addr_u *addr,
   FAR struct dns_query_s query;
   int ret;
 
+  /* Has the DNS client been properly initialized? */
+
+  if (!dns_initialize())

Review Comment:
   @curuvar please review the patch here: https://github.com/apache/incubator-nuttx/pull/6841



-- 
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


[GitHub] [incubator-nuttx] davids5 commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
davids5 commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r944317526


##########
drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c:
##########
@@ -252,7 +252,7 @@ static void bcmf_receive(FAR struct bcmf_dev_s *priv)
       priv->bc_dev.d_buf = frame->data;
       priv->bc_dev.d_len = frame->len - (frame->data - frame->base);
 
-      wlinfo("Got frame %p %d\n", frame, priv->bc_dev.d_len);
+      /* wlinfo("Got frame %p %d\n", frame, priv->bc_dev.d_len); */

Review Comment:
   #if 0 would be preferred of commenting out



-- 
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


[GitHub] [incubator-nuttx] davids5 commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
davids5 commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r944317526


##########
drivers/wireless/ieee80211/bcm43xxx/bcmf_netdev.c:
##########
@@ -252,7 +252,7 @@ static void bcmf_receive(FAR struct bcmf_dev_s *priv)
       priv->bc_dev.d_buf = frame->data;
       priv->bc_dev.d_len = frame->len - (frame->data - frame->base);
 
-      wlinfo("Got frame %p %d\n", frame, priv->bc_dev.d_len);
+      /* wlinfo("Got frame %p %d\n", frame, priv->bc_dev.d_len); */

Review Comment:
   #if 0 would be preferred over commenting out



-- 
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


[GitHub] [incubator-nuttx] curuvar closed pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
curuvar closed pull request #6838: Added support for raspberrypi pico-w
URL: https://github.com/apache/incubator-nuttx/pull/6838


-- 
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


[GitHub] [incubator-nuttx] curuvar commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
curuvar commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r944391091


##########
arch/arm/src/Makefile:
##########
@@ -157,7 +157,7 @@ endef
 nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) $(ARCHSCRIPT)
 	$(Q) echo "LD: nuttx"
 ifneq ($(CONFIG_ALLSYMS),y)
-	$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
+	$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \

Review Comment:
   It was done for testing as I had some weird linking issue.  I'll revert 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.

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

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


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6838: Added support for raspberrypi pico-w

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6838:
URL: https://github.com/apache/incubator-nuttx/pull/6838#discussion_r944499857


##########
include/nuttx/wireless/ieee80211/bcmf_gspi.h:
##########
@@ -0,0 +1,130 @@
+/****************************************************************************
+ * include/nuttx/ieee80211/bmcf_gspi.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 __INCLUDE_NUTTX_WIRELESS_IEEE80211_BCMF_GSPI_H
+#define __INCLUDE_NUTTX_WIRELESS_IEEE80211_BCMF_GSPI_H

Review Comment:
   Yes, the split looks reasonable.



-- 
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