Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling for board Ai-Thinker BW16 (RTL8720DN) #226

Open
1 task done
KilimSerg opened this issue Mar 22, 2024 · 3 comments
Open
1 task done

Error compiling for board Ai-Thinker BW16 (RTL8720DN) #226

KilimSerg opened this issue Mar 22, 2024 · 3 comments

Comments

@KilimSerg
Copy link

Boards

BW16 (RTL8720DN)

External Hardware

ILI9341 display

Hardware Configuration

No

Version

latest master (checkout manually)

IDE Name

Arduino IDE 1.8.13 and Arduino IDE 2.2.1

Operating System

Win 10

Auto Flash Mode

Disable

Erase All Flash Memory (4MB)

Disable

Standard Lib

Disable

Upload Speed

1500000

Description

Hello.
I don't speak English so I apologize in advance for any inaccuracies in Google Translate

I'm trying to replicate the “RTLWiFiAnalyzer” project on the BW16-kit (RTL8720DN) board.

image622_1

and encountered a problem when compiling the program /
If there are no logical or syntax errors at the end of the compilation, the Arduino IDE throws an error that it cannot compile the program for a specific board

Arduino IDE 1.8.13
exit status 1
Error compiling for board Ai-Thinker BW16 (RTL8720DN).

As far as I understand from the compiler message, the problem lies in two libraries
“Arduino GFX library” and “lwip_netconf.h”.

Below is a listing of the program compilation:

In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:4:0,
from C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_DataBus.h:145:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
#if (ESP_ARDUINO_VERSION_MAJOR < 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:9:0,
from C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32LCD8.h:5:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
#if (ESP_ARDUINO_VERSION_MAJOR < 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:10:0,
from C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32LCD16.h:7:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
#if (ESP_ARDUINO_VERSION_MAJOR < 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:19:0,
from C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:3:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
#if (ESP_ARDUINO_VERSION_MAJOR < 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:81:0,
from C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/display/Arduino_RGB_Display.h:3:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
#if (ESP_ARDUINO_VERSION_MAJOR < 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/timeouts.h:44:0,
from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/tcpip.h:45,
from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/api/lwip_netconf.h:18,
from C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:20:
C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/sys.h:351:7: error: conflicting declaration of 'u32_t sys_now()' with 'C' linkage
u32_t sys_now(void);
^~~~~~~
In file included from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/opt.h:51:0,
from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/errno.h:40,
from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\cerrno:42,
from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\ext\string_conversions.h:44,
from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\bits\basic_string.h:5429,
from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\string:52,
from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\cores\ambd/Arduino.h:36,
from C:\Users\User\AppData\Local\Temp\arduino\sketches\7639B3E19B93B90426C91C194E6DEA76\sketch\RTLWiFiAnalyzer.ino.cpp:1:
C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/api/network/include/lwipopts.h:177:21: note: previous declaration with 'C++' linkage
extern unsigned int sys_now(void);
^~~~~~~
exit status 1
Error compiling for board Ai-Thinker BW16 (RTL8720DN).

After communicating with the author of the Arduino GFX library and more detailed configuration of the board for the desired ILI9341 display, only two lines with an error remained in the Arduino GFX library

C:\Program Files (x86)\Arduino\libraries\Arduino_GFX-master\src\databus\Arduino_HWSPI.cpp: In member function 'virtual bool Arduino_HWSPI::begin(int32_t, int8_t)':
C:\Program Files (x86)\Arduino\libraries\Arduino_GFX-master\src\databus\Arduino_HWSPI.cpp:184:17: error: 'SPI_MODE2' was not declared in this scope
_dataMode = SPI_MODE2;
^~~~~~~~~
and with the library “lwip_netconf.h” all the lines with errors remained in place.

The author of Arduino GFX suggested that the problem might be in the Amebe software and advised me to roll back to an older version; before that, I had version 3.1.7.

After rolling back to version 3.1.6 everything worked fine.
IMG_20240320_124905_1
IMG_20240321_144617_1

I was advised to send you the errors I received so that corrections could be made.

Sketch

RTLWiFiAnalyzer.ino
HelloWorld.ino

Error/Debug Message

In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:4:0,
                 from C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_DataBus.h:145:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
 #if (ESP_ARDUINO_VERSION_MAJOR < 3)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:9:0,
                 from C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32LCD8.h:5:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
 #if (ESP_ARDUINO_VERSION_MAJOR < 3)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:10:0,
                 from C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32LCD16.h:7:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
 #if (ESP_ARDUINO_VERSION_MAJOR < 3)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:19:0,
                 from C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:3:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
 #if (ESP_ARDUINO_VERSION_MAJOR < 3)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:81:0,
                 from C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:27:
c:\Users\User\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/display/Arduino_RGB_Display.h:3:6: warning: "ESP_ARDUINO_VERSION_MAJOR" is not defined, evaluates to 0 [-Wundef]
 #if (ESP_ARDUINO_VERSION_MAJOR < 3)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/timeouts.h:44:0,
                 from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/tcpip.h:45,
                 from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/api/lwip_netconf.h:18,
                 from C:\Users\User\AppData\Local\Temp\.arduinoIDE-unsaved2024217-7288-19klnw8.xxp9\RTLWiFiAnalyzer\RTLWiFiAnalyzer.ino:20:
C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/sys.h:351:7: error: conflicting declaration of 'u32_t sys_now()' with 'C' linkage
 u32_t sys_now(void);
       ^~~~~~~
In file included from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/opt.h:51:0,
                 from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/network/lwip/lwip_v2.0.2/src/include/lwip/errno.h:40,
                 from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\cerrno:42,
                 from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\ext\string_conversions.h:44,
                 from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\bits\basic_string.h:5429,
                 from c:\users\user\appdata\local\arduino15\packages\realtek\tools\ameba_d_asdk_toolchain\1.0.1\arm-none-eabi\include\c++\6.5.0\string:52,
                 from C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\cores\ambd/Arduino.h:36,
                 from C:\Users\User\AppData\Local\Temp\arduino\sketches\7639B3E19B93B90426C91C194E6DEA76\sketch\RTLWiFiAnalyzer.ino.cpp:1:
C:\Users\User\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD\3.1.7\system/component/common/api/network/include/lwipopts.h:177:21: note: previous declaration with 'C++' linkage
 extern unsigned int sys_now(void);
                     ^~~~~~~
exit status 1
Error compiling for board Ai-Thinker BW16 (RTL8720DN).


C:\Program Files (x86)\Arduino\libraries\Arduino_GFX-master\src\databus\Arduino_HWSPI.cpp: In member function 'virtual bool Arduino_HWSPI::begin(int32_t, int8_t)':
C:\Program Files (x86)\Arduino\libraries\Arduino_GFX-master\src\databus\Arduino_HWSPI.cpp:184:17: error: 'SPI_MODE2' was not declared in this scope
     _dataMode = SPI_MODE2;
                 ^~~~~~~~~

Reproduce remarks

No response

I have checked online documentation, FAQ, GitHub Wiki and existing/closed issues.

  • I confirm I have checked online documentation, FAQ, GitHub Wiki and existing/closed issues.
@KilimSerg KilimSerg added the pending It is a feature/bug-fix request, currently on hold label Mar 22, 2024
Copy link

Hello, hope this message finds you well. Congrats to your first Issue! We will review it as soon as possiable. Feel free to have a look at https://www.amebaiot.com/en/ameba-arduino-summary/ for more information

Copy link

github-actions bot commented Apr 6, 2024

This issue is stale because it has been open for 14 days with no activity.

@M-ichae-l M-ichae-l removed the pending It is a feature/bug-fix request, currently on hold label May 21, 2024
@M-ichae-l
Copy link
Contributor

Could you try the new early release version 3.1.8-build20240610 for the SPI pin issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants