walmis / blackmagic-espidf

Blackmagic Wireless SWD Debug probe hosted on esp-idf SDK (for ESP8266) with UART on Telnet port and HTTP using xterm.js
249 stars 48 forks source link

compiler error because `CONFIG_ESP_WIFI_IS_STATION` is not defined #15

Open aguaviva opened 4 months ago

aguaviva commented 4 months ago

For some reason CONFIG_ESP_WIFI_IS_STATION is not set in sdkconfig

CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=74
CONFIG_ESPTOOLPY_MONITOR_BAUD=230400
CONFIG_ESP_WIFI_IS_SOFTAP=y
# CONFIG_ESP_WIFI_IS_STATION is not set   <--
CONFIG_ESP_WIFI_MODE_AP=y
CONFIG_ESP_WIFI_SSID="auto"
CONFIG_ESP_WIFI_PASSWORD="helloworld"
CONFIG_MAX_STA_CONN=4

And this causes a compilation error here https://github.com/walmis/blackmagic-espidf/blob/2f58e68c22b46e27bfc8942f7854c82f5ed24de5/main/platform.c#L453

aguaviva commented 4 months ago

This was my lazy fix

-    if(strcmp(CONFIG_ESP_WIFI_SSID, "auto") == 0 || CONFIG_ESP_WIFI_IS_STATION) {
+    if(strcmp(CONFIG_ESP_WIFI_SSID, "auto") == 0 
+#ifdef CONFIG_ESP_WIFI_IS_STATION
+        || CONFIG_ESP_WIFI_IS_STATION
+#endif
+    ) 
+    {
aguaviva commented 4 months ago

I also had to comment the two instances of esp_log_set_putchar in platform.c, otherwise the app hangs there. I believe that might be because the UART is disables in an earlier call.