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

DCC-EX ESP32 compile errors with latest IDE ESP32 core #411

Open
daverow opened this issue Jul 3, 2024 · 1 comment
Open

DCC-EX ESP32 compile errors with latest IDE ESP32 core #411

daverow opened this issue Jul 3, 2024 · 1 comment

Comments

@daverow
Copy link

daverow commented Jul 3, 2024

ESP32 espressif V3.0.2 on Arduino IDE 2.3.2

Espressif changes cause multiple compile errors for DCC-EX Command Station

FQBN: esp32:esp32:esp32
Using board 'esp32' from platform in folder: C:\Users\dave_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2
Using core 'esp32' from platform in folder: C:\Users\dave_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2
....................................................
C:\Users\dave_\AppData\Local\Temp\arduino\sketches\B52F40FAA5940F30F8A62642B642184B\sketch\WifiInboundHandler.cpp.o
In file included from C:\Users\dave_\Downloads\CommandStation-EX\DCC.h:27,
from C:\Users\dave_\Downloads\CommandStation-EX\DCCEX.h:30,
from C:\Users\dave_\Downloads\CommandStation-EX\CommandStation-EX.ino:52:
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h: In member function 'void MotorDriver::setSignal(bool)':
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:34:42: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
34 | #define setHIGH(fastpin) *fastpin.inout |= fastpin.maskHIGH
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:135:11: note: in expansion of macro 'setHIGH'
135 | setHIGH(fastSignalPin);
| ^~~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:35:42: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
35 | #define setLOW(fastpin) *fastpin.inout &= fastpin.maskLOW
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:136:27: note: in expansion of macro 'setLOW'
136 | if (dualSignal) setLOW(fastSignalPin2);
| ^~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:35:42: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
35 | #define setLOW(fastpin) *fastpin.inout &= fastpin.maskLOW
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:139:11: note: in expansion of macro 'setLOW'
139 | setLOW(fastSignalPin);
| ^~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:34:42: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
34 | #define setHIGH(fastpin) *fastpin.inout |= fastpin.maskHIGH
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\MotorDriver.h:140:27: note: in expansion of macro 'setHIGH'
140 | if (dualSignal) setHIGH(fastSignalPin2);
| ^~~~~~~
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp: In function 'void feedTheDog0()':
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp:42:11: error: 'timg_dev_t' {aka 'struct timg_dev_t'} has no member named 'wdt_wprotect'; did you mean 'wdtwprotect'?
42 | TIMERG0.wdt_wprotect=TIMG_WDT_WKEY_VALUE; // write enable
| ^~~~~~~~~~~~
| wdtwprotect
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp:43:11: error: 'timg_dev_t' {aka 'struct timg_dev_t'} has no member named 'wdt_feed'; did you mean 'wdtfeed'?
43 | TIMERG0.wdt_feed=1; // feed dog
| ^~~~~~~~
| wdtfeed
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp:44:11: error: 'timg_dev_t' {aka 'struct timg_dev_t'} has no member named 'wdt_wprotect'; did you mean 'wdtwprotect'?
44 | TIMERG0.wdt_wprotect=0; // write protect
| ^~~~~~~~~~~~
| wdtwprotect
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp: At global scope:
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp:75:27: error: expected ')' before 'c'
75 | NetworkClient(WiFiClient c) {
| ~ ^~
| )
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp: In static member function 'static void WifiESP::loop()':
C:\Users\dave_\Downloads\CommandStation-EX\WifiESP32.cpp:287:28: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'inUse'
287 | if(clients[clientId].inUse && !clients[clientId].wifi.connected()) {
| ^~~~~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:287:56: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'wifi'
287 | if(clients[clientId].inUse && !clients[clientId].wifi.connected()) {
| ^~~~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:290:27: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'wifi'
290 | clients[clientId].wifi.stop();
| ^~~~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:291:27: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'inUse'
291 | clients[clientId].inUse = false;
| ^~~~~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:300:33: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'recycle'
300 | if (clients[clientId].recycle(client)) {
| ^~~~~~~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:314:28: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'ok'
314 | if(clients[clientId].ok()) {
| ^~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:316:38: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'wifi'
316 | if ((len = clients[clientId].wifi.available()) > 0) {
| ^~~~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:320:38: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'wifi'
320 | cmd[i]=clients[clientId].wifi.read();
| ^~~~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:352:74: error: '__gnu_cxx::_alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'ok'
352 | if((unsigned int)clientId <= clients.size() && clients[clientId].ok()) {
| ^~
C:\Users\dave
\Downloads\CommandStation-EX\WifiESP32.cpp:355:29: error: '__gnu_cxx::__alloc_traits<std::allocator, NetworkClient>::value_type' {aka 'class NetworkClient'} has no member named 'wifi'
355 | clients[clientId].wifi.write(buffer,count);
| ^~~~

Using library Wire at version 2.0.0 in folder: C:\Users\dave_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Wire
Using library ESPmDNS at version 2.0.0 in folder: C:\Users\dave_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\ESPmDNS
Using library WiFi at version 2.0.0 in folder: C:\Users\dave_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\WiFi
Using library Networking at version 1.0.0 in folder: C:\Users\dave_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Network
exit status 1

Compilation error: 'timg_dev_t' {aka 'struct timg_dev_t'} has no member named 'wdt_wprotect'; did you mean 'wdtwprotect'?

@Ash-4
Copy link
Contributor

Ash-4 commented Jul 3, 2024

The recent changes from ESP have breaking changes.
Downgrade the package to 2.0.17 or 2.0.16 -- selectable in Boards Manager in the Arduino IDE.
2.0.16 is now defined when using vsc/platformio to compile.

Regards,
Ash

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

No branches or pull requests

2 participants