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 2021/01/27 10:43:46 UTC
[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
masayuki2009 opened a new pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755
## Summary
- This commit fixes compile errors in esp32_spiflash.c and
esp32_wifi_adapter.c with CONFIG_SMP=y
## Impact
- SMP only
## Testing
- Tested with esp32-devkitc:wapi
- NOTE: the following configs need to be added.
+CONFIG_SMP=y
+CONFIG_SMP_IDLETHREAD_STACKSIZE=3072
+CONFIG_SMP_NCPUS=2
+CONFIG_SPINLOCK_IRQ=y
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755#issuecomment-768248369
>@masayuki2009 the following could solve that:
@Ouss4
Thanks.
Can you create a new PR for 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:
users@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755#issuecomment-768199753
Please ignore style errors in esp32_spiflash.c
The symbols exist in the ROM code.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755#issuecomment-768227168
@Ouss4
By the way, do you know how to suppress the following messages?
I'd like to see such messages only with CONFIG_DEBUG_WIRELESS_INFO=y
```
I (99533) wifi:mode : sta (3c:71:bf:8a:dd:10)
I (99534) wifi:enable tsf
I (99536) wifi:Set ps type: 0
...
```
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 edited a comment on pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
masayuki2009 edited a comment on pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755#issuecomment-768248369
>@masayuki2009 the following could solve that:
@Ouss4
Thanks.
Can you create a new PR for it?
I think we need to support CONFIG_DEBUG_WIRELESS_ERROR and CONFIG_DEBUG_WIRELESS_WARN as well.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755#issuecomment-768220887
ESP32 Wi-Fi works in SMP mode now.
```
NuttShell (NSH) NuttX-10.0.1
nsh> wapi psk wlan0 wifi-test-24g 1
nsh> wapi essid wlan0 raspi3-g 1
I (99533) wifi:mode : sta (3c:71:bf:8a:dd:10)
I (99534) wifi:enable tsf
I (99536) wifi:Set ps type: 0
I (100145) wifi:new:<5,0>, old:<1,0>, ap:<255,255>, sta:<5,0>, prof:1
I (100824) wifi:state: init -> auth (b0)
I (100832) wifi:state: auth -> assoc (0)
I (100838) wifi:state: assoc -> run (10)
I (100858) wifi:connected with raspi3-g, aid = 2, channel 5, BW20, bssid = b8:27:eb:62:e8:30
I (100859) wifi:security: WPA2-PSK, phy: bgn, rssi: -51
I (100984) wifi:pm start, type: 0
nsh> I (100986) wifi:AP's beacon interval = 102400 us, DTIM period = 2
nsh> renew wlan0
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 3c:71:bf:8a:dd:10 at UP
inet addr:192.168.10.12 DRaddr:192.168.10.1 Mask:255.255.255.0
nsh> ps
PID CPU PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK COMMAND
0 0 0 FIFO Kthread N-- Assigned 00000000 003072 CPU0 IDLE
1 1 0 FIFO Kthread N-- Running 00000000 003072 CPU1 IDLE
3 --- 100 RR Kthread --- Waiting Signal 00000000 002128 lpwork
4 1 100 RR Task --- Running 00000000 002128 init
5 --- 223 RR Kthread --- Waiting Semaphore 00000000 002112 rt_timer
6 --- 253 RR Kthread --- Waiting MQ empty 00000000 003664 wifi
nsh> free
total used free largest
Umem: 252432 50960 201472 152576
```
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] Ouss4 commented on pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
Ouss4 commented on pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755#issuecomment-768235520
> By the way, do you know how to suppress the following messages?
I'd like to see such messages only with CONFIG_DEBUG_WIRELESS_INFO=y
@masayuki2009 the following could solve that:
```diff
diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.c b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
index cda5d937be..bdebc7263a 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_adapter.c
+++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
@@ -3343,6 +3343,7 @@ static uint32_t esp_rand(void)
static void esp_log_writev(uint32_t level, const char *tag,
const char *format, va_list args)
{
+#ifdef CONFIG_DEBUG_WIRELESS_INFO
int pri;
switch (level)
@@ -3362,6 +3363,7 @@ static void esp_log_writev(uint32_t level, const char *tag,
}
vsyslog(pri, format, args);
+#endif
}
/****************************************************************************
@@ -3384,10 +3386,12 @@ void esp_log_write(uint32_t level,
const char *tag,
const char *format, ...)
{
+#ifdef CONFIG_DEBUG_WIRELESS_INFO
va_list list;
va_start(list, format);
esp_log_writev(level, tag, format, list);
va_end(list);
+#endif
}
/****************************************************************************
@@ -3997,11 +4001,13 @@ int phy_printf(const char *format, ...)
int net80211_printf(const char *format, ...)
{
+#ifdef CONFIG_DEBUG_WIRELESS_INFO
va_list arg;
va_start(arg, format);
vsyslog(LOG_INFO, format, arg);
va_end(arg);
+#endif
return 0;
}
```
@donghengqaz what do you think?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] Ouss4 edited a comment on pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
Ouss4 edited a comment on pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755#issuecomment-768235520
> By the way, do you know how to suppress the following messages?
I'd like to see such messages only with CONFIG_DEBUG_WIRELESS_INFO=y
@masayuki2009 the following could solve that:
```diff
diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.c b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
index cda5d937be..bdebc7263a 100644
--- a/arch/xtensa/src/esp32/esp32_wifi_adapter.c
+++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.c
@@ -3343,6 +3343,7 @@ static uint32_t esp_rand(void)
static void esp_log_writev(uint32_t level, const char *tag,
const char *format, va_list args)
{
+#ifdef CONFIG_DEBUG_WIRELESS_INFO
int pri;
switch (level)
@@ -3362,6 +3363,7 @@ static void esp_log_writev(uint32_t level, const char *tag,
}
vsyslog(pri, format, args);
+#endif
}
/****************************************************************************
@@ -3384,10 +3386,12 @@ void esp_log_write(uint32_t level,
const char *tag,
const char *format, ...)
{
+#ifdef CONFIG_DEBUG_WIRELESS_INFO
va_list list;
va_start(list, format);
esp_log_writev(level, tag, format, list);
va_end(list);
+#endif
}
/****************************************************************************
@@ -3997,11 +4001,13 @@ int phy_printf(const char *format, ...)
int net80211_printf(const char *format, ...)
{
+#ifdef CONFIG_DEBUG_WIRELESS_INFO
va_list arg;
va_start(arg, format);
vsyslog(LOG_INFO, format, arg);
va_end(arg);
+#endif
return 0;
}
```
@donghengqaz what do you think, is there any reason to keep the logs?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2755: arch: esp32: Fix compile errors with CONFIG_SMP=y
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2755:
URL: https://github.com/apache/incubator-nuttx/pull/2755
----------------------------------------------------------------
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:
users@infra.apache.org