Well, you are absolutely correct. Thank you. I looked at the chip on the board. I don't know where I got the idea that it was the Mega328. Still acting the same, however.
Arduino: 1.8.16 (Mac OS X), Board: "Arduino Uno WiFi Rev2, None (ATMEGA4809)"
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/k7kz/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/k7kz/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/k7kz/Documents/Arduino/libraries -fqbn=arduino:megaavr:uno2018:mode=off -vid-pid=03EB_2145 -ide-version=10816 -build-path /var/folders/rw/kv9fdr1d34j6yw0x670tf8wm0000gp/T/arduino_build_416720 -warnings=default -build-cache /var/folders/rw/kv9fdr1d34j6yw0x670tf8wm0000gp/T/arduino_cache_675798 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /Users/k7kz/Documents/Arduino/libraries/WiFi101/examples/FirmwareUpdater/FirmwareUpdater.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/k7kz/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/k7kz/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/k7kz/Documents/Arduino/libraries -fqbn=arduino:megaavr:uno2018:mode=off -vid-pid=03EB_2145 -ide-version=10816 -build-path /var/folders/rw/kv9fdr1d34j6yw0x670tf8wm0000gp/T/arduino_build_416720 -warnings=default -build-cache /var/folders/rw/kv9fdr1d34j6yw0x670tf8wm0000gp/T/arduino_cache_675798 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/k7kz/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /Users/k7kz/Documents/Arduino/libraries/WiFi101/examples/FirmwareUpdater/FirmwareUpdater.ino
Using board 'uno2018' from platform in folder: /Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7
Using core 'arduino' from platform in folder: /Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7
Detecting libraries used...
/Users/k7kz/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega4809 -DF_CPU=16000000L -DARDUINO=10816 -DARDUINO_AVR_UNO_WIFI_REV2 -DARDUINO_ARCH_MEGAAVR -DMILLIS_USE_TIMERB3 -I/Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/deprecated -I/Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino -I/Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7/variants/uno2018 /var/folders/rw/kv9fdr1d34j6yw0x670tf8wm0000gp/T/arduino_build_416720/sketch/FirmwareUpdater.ino.cpp -o /dev/null
Alternatives for avr/pgmspace.h: []
ResolveLibrary(avr/pgmspace.h)
-> candidates: []
In file included from /Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24:0,
from /Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
from /Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
from /var/folders/rw/kv9fdr1d34j6yw0x670tf8wm0000gp/T/arduino_build_416720/sketch/FirmwareUpdater.ino.cpp:1:
/Users/k7kz/Library/Arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31:10: fatal error: avr/pgmspace.h: No such file or directory #include "avr/pgmspace.h"
^~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.
Thanks for your effort.
I did find a copy of the pgmspcace.h file on my machine but it's not where it needs to be. I could copy it and place it where I think it needs to be and try it.
I installed the Arduino Mega AVR boards v1.87 using the Boards Manager, and compiled a sample sketch for the Arduino Uno WiFi Rev 2. Did not have problems using Registers emulation: "None (ATMEGA4809)"
I do not have that board, but this just a compilation (of a very simple sketch), not an upload...
Odd, looking at String.h at the line where the error is being flagged, the compiler should not be using line 31, but instead line 33.
The compiler is using line 31, but there does not seem to be any problem locating the file on my computer.
@k7kz, your topic has been moved to a more suitable location on the forum as it has nothing to do with Avrdude, stk500 or Bootloader issues.
The 328P in "Arduino Uno WiFi Rev2, ATMEGA328" is what is called emulation mode. I haven't figured out the exact details (yet) but it adds a layer to modify some functions.