MCUdude / MegaCoreX

An Arduino hardware package for ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808
GNU Lesser General Public License v2.1
247 stars 52 forks source link

Fix MegaCoreX library to support ArduinoModBus and ArduinoRS485 #198

Closed DrItanium closed 1 month ago

DrItanium commented 8 months ago

This is a fix for #192 .

Arduino's modbus library is written assuming that the ArduinoCore-API is new enough that there is an arduino namespace. The version inside MegaCoreX is an older version of the api and does not have this. This pull request adds the minimal number of classes in the api to the arduino namespace to allow ArduinoModbus to compile.

The second change is related, the ArduinoRS485 library is written with the assumption that the macro SERIAL_PORT_HARDWARE is available from the board's variant header. This assumption was violated for the standard 28/32/40/48 pin variants. This pull request introduces these missing macros for libraries such as ArduinoRS485 so that they can compile successfully. I tried using what I viewed as sane defaults.

MCUdude commented 1 month ago

Sorry for being so slow to adopt. Thanks the PR!

MCUdude commented 1 week ago

Turns out that this PR broke support for the ethernet library. How can this be resolved?


#include <Ethernet.h>

void setup() {

}

void loop() {

}

/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/hans/Library/Arduino15/packages -hardware /Users/hans/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/hans/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/hans/Documents/Arduino/libraries -fqbn=MegaCoreX:megaavr:4809:pinout=48pin_standard,eeprom=keep,resetpin=reset,BOD=2v6,clock=internal_16MHz,bootloader=no_bootloader -ide-version=10819 -build-path /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539 -warnings=all -build-cache /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_cache_299930 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Users/hans/Library/Arduino15/packages/MegaCoreX/tools/avrdude/8.0-arduino.1 -prefs=runtime.tools.avrdude-8.0-arduino.1.path=/Users/hans/Library/Arduino15/packages/MegaCoreX/tools/avrdude/8.0-arduino.1 -prefs=runtime.tools.avr-gcc.path=/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=/Users/hans/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/hans/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_modified_sketch_335042/Blink.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/hans/Library/Arduino15/packages -hardware /Users/hans/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/hans/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/hans/Documents/Arduino/libraries -fqbn=MegaCoreX:megaavr:4809:pinout=48pin_standard,eeprom=keep,resetpin=reset,BOD=2v6,clock=internal_16MHz,bootloader=no_bootloader -ide-version=10819 -build-path /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539 -warnings=all -build-cache /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_cache_299930 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Users/hans/Library/Arduino15/packages/MegaCoreX/tools/avrdude/8.0-arduino.1 -prefs=runtime.tools.avrdude-8.0-arduino.1.path=/Users/hans/Library/Arduino15/packages/MegaCoreX/tools/avrdude/8.0-arduino.1 -prefs=runtime.tools.avr-gcc.path=/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=/Users/hans/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/hans/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_modified_sketch_335042/Blink.ino
Using board '4809' from platform in folder: /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3
Using core 'coreX-corefiles' from platform in folder: /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3
Detecting libraries used...
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/sketch/Blink.ino.cpp -o /dev/null
Alternatives for Ethernet.h: [Ethernet@2.0.0]
ResolveLibrary(Ethernet.h)
  -> candidates: [Ethernet@2.0.0]
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/sketch/Blink.ino.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dhcp.cpp -o /dev/null
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dhcp.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/EthernetClient.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/EthernetServer.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/EthernetUdp.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/socket.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/utility/w5100.cpp -o /dev/null
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src/SPI.cpp -o /dev/null
Generating function prototypes...
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -mrelax -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/sketch/Blink.ino.cpp -o /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/sketch/Blink.ino.cpp -o /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling library "Ethernet"
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dhcp.cpp -o /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/libraries/Ethernet/Dhcp.cpp.o
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp -o /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/libraries/Ethernet/Ethernet.cpp.o
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp -o /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/libraries/Ethernet/Dns.cpp.o
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/EthernetClient.cpp -o /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/libraries/Ethernet/EthernetClient.cpp.o
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In static member function 'static int EthernetClass::begin(uint8_t*, long unsigned int, long unsigned int)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:38:52: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
  W5100.setIPAddress(IPAddress(0,0,0,0).raw_address());
                                                    ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:47:54: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
   W5100.setIPAddress(_dhcp->getLocalIp().raw_address());
                                                      ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:48:56: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
   W5100.setGatewayIp(_dhcp->getGatewayIp().raw_address());
                                                        ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:49:58: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
   W5100.setSubnetMask(_dhcp->getSubnetMask().raw_address());
                                                          ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In static member function 'static void EthernetClass::begin(uint8_t*, arduino::IPAddress, arduino::IPAddress, arduino::IPAddress, arduino::IPAddress)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:87:24: error: 'arduino::IPAddress::<unnamed union> arduino::IPAddress::_address' is private within this context
  W5100.setIPAddress(ip._address.bytes);
                        ^~~~~~~~
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:36:5: note: declared private here
   } _address;
     ^~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:88:29: error: 'arduino::IPAddress::<unnamed union> arduino::IPAddress::_address' is private within this context
  W5100.setGatewayIp(gateway._address.bytes);
                             ^~~~~~~~
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:36:5: note: declared private here
   } _address;
     ^~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:89:29: error: 'arduino::IPAddress::<unnamed union> arduino::IPAddress::_address' is private within this context
  W5100.setSubnetMask(subnet._address.bytes);
                             ^~~~~~~~
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:36:5: note: declared private here
   } _address;
     ^~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In static member function 'static int EthernetClass::maintain()':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:138:55: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
    W5100.setIPAddress(_dhcp->getLocalIp().raw_address());
                                                       ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:139:57: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
    W5100.setGatewayIp(_dhcp->getGatewayIp().raw_address());
                                                         ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:140:59: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
    W5100.setSubnetMask(_dhcp->getSubnetMask().raw_address());
                                                           ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In static member function 'static arduino::IPAddress EthernetClass::localIP()':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:164:37: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
  W5100.getIPAddress(ret.raw_address());
                                     ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp: In member function 'int DNSClient::getHostByName(const char*, arduino::IPAddress&, uint16_t)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp:99:20: error: 'INADDR_NONE' was not declared in this scope
  if (iDNSServer == INADDR_NONE) {
                    ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp:99:20: note: suggested alternative:
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp:5:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:78:24: note:   'arduino::INADDR_NONE'
 extern const IPAddress INADDR_NONE;
                        ^~~~~~~~~~~
In file included from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp:8:0:
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp: In member function 'uint16_t DNSClient::BuildRequest(const char*)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/utility/w5100.h:457:25: warning: result of '(256 << 8)' requires 18 bits to represent, but 'int' only has 16 bits [-Wshift-overflow=]
 #define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
                      ~~~^~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp:164:18: note: in expansion of macro 'htons'
  twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG);
                  ^~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp: In member function 'uint16_t DNSClient::ProcessResponse(uint16_t, arduino::IPAddress&)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp:340:35: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
    iUdp.read(aAddress.raw_address(), 4);
                                   ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Dns.cpp:5:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In static member function 'static arduino::IPAddress EthernetClass::subnetMask()':
/Users/hans/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mrelax -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega4809 -DARDUINO_ARCH_MEGAAVR -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/deprecated -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/variants/48pin-standard -I/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src -I/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI/src /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/EthernetServer.cpp -o /var/folders/50/f9myvbw51nbgddp3cc57tzp40000gn/T/arduino_build_117539/libraries/Ethernet/EthernetServer.cpp.o
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:173:38: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
  W5100.getSubnetMask(ret.raw_address());
                                      ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In static member function 'static arduino::IPAddress EthernetClass::gatewayIP()':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:182:37: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
  W5100.getGatewayIp(ret.raw_address());
                                     ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In member function 'void EthernetClass::setLocalIP(arduino::IPAddress)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:198:36: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
  W5100.setIPAddress(ip.raw_address());
                                    ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In member function 'void EthernetClass::setSubnetMask(arduino::IPAddress)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:206:37: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
  W5100.setSubnetMask(ip.raw_address());
                                     ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp: In member function 'void EthernetClass::setGatewayIP(arduino::IPAddress)':
/Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:214:36: error: 'uint8_t* arduino::IPAddress::raw_address()' is private within this context
  W5100.setGatewayIp(ip.raw_address());
                                    ^
In file included from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/Client.h:22:0,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/ArduinoAPI.h:29,
                 from /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/Arduino.h:23,
                 from /Applications/Arduino.app/Contents/Java/libraries/Ethernet/src/Ethernet.cpp:21:
/Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/cores/coreX-corefiles/api/IPAddress.h:42:12: note: declared private here
   uint8_t* raw_address() { return _address.bytes; };
            ^~~~~~~~~~~
Using library Ethernet at version 2.0.0 in folder: /Applications/Arduino.app/Contents/Java/libraries/Ethernet 
Using library SPI at version 1.0 in folder: /Users/hans/Library/Arduino15/packages/MegaCoreX/hardware/megaavr/1.1.3/libraries/SPI 
exit status 1
Error compiling for board ATmega4809.
DrItanium commented 1 week ago

Huh... that is really strange... the EthernetClass is marked as a friend so raw_address should be accessible... let me see if another synchronization is necessary...

DrItanium commented 1 week ago

Yeah... this is my fault since I made the minimal number of changes necessary to get ArudinoModBus to compile. The friend statement is different on the ArduinoCore-API's version: https://github.com/arduino/ArduinoCore-API/blob/4a02bfc0a924e1fec34c3bb82ffd5dfba7643a0c/api/IPAddress.h#L107