[solved] Avr-iot cellular mini board won't compile using microchip library examples (does work in arduino ide)

Trying to compile the http example from the library for the avr-iot-wb board. First it said that Wire.h was missing so i added that. Now it’s complaining that Serial3 doesn’t exist and a whole bunch of pin assignments don’t exist. It compiles in Arduino IDE which is kinda baffling. There were a bunch of extra settings required to set in the Arduino IDE like which processor to use and which Wire to use all shown on the Microchip setup page : Microchip IoT Documentation
The library with the examples is here : GitHub - microchip-pic-avr-solutions/avr-iot-cellular-arduino-library: Arduino library for developing Cellular IoT Applications with the AVR-IoT Cellular Mini development board from Microchip
The simple HTTP example compiles fine but completely barfs when trying to build in PIO. I have no idea what to do. Has anybody got this board to work in PlatformIO ?
Why do new boards have to be such a pain?
ini file

[env:avr_iot_wg]
platform = atmelmegaavr
board = avr_iot_wg
framework = arduino
lib_deps = https://github.com/microchip-pic-avr-solutions/avr-iot-cellular-arduino-library

Here is the compile output with the bare HTTP example:

Compiling .pio/build/avr_iot_wg/libf5b/AVR-IoT-Cellular/lte.cpp.o
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/hal_i2c_driver.cpp:11:10: fatal error: Wire.h: No such file or directory

**************************************************************
* Looking for Wire.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Wire.h"
* Web  > https://registry.platformio.org/search?q=header:Wire.h
*
**************************************************************

 #include <Wire.h>
          ^~~~~~~~
compilation terminated.
Compiling .pio/build/avr_iot_wg/libf5b/AVR-IoT-Cellular/mqtt_client.cpp.o
*** [.pio/build/avr_iot_wg/libf5b/AVR-IoT-Cellular/hal_i2c_driver.cpp.o] Error 1
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp: In member function 'void LedCtrlClass::begin()':
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp:15:65: error: no matching function for call to 'pinConfigure(int, unsigned int)'
     pinConfigure(LED_CELL_PIN, PIN_DIR_OUTPUT | PIN_INPUT_ENABLE);
                                                                 ^
In file included from .pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.h:4:0,
                 from .pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp:1:
/Users/tavis/.platformio/packages/framework-arduino-megaavr-megacorex/cores/MegaCoreX/Arduino.h:255:6: note: candidate: template<class ... MODES> void pinConfigure(uint8_t, pin_configure_t, const MODES& ...)
 void pinConfigure(const uint8_t digital_pin, const pin_configure_t mode, const MODES&... modes)
      ^~~~~~~~~~~~
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp:10:23: error: 'PIN_PB2' was not declared in this scope
 #define LED_USER_PIN  PIN_PB2
                       ^
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp:19:18: note: in expansion of macro 'LED_USER_PIN'
     pinConfigure(LED_USER_PIN, PIN_DIR_OUTPUT | PIN_INPUT_ENABLE);
                  ^~~~~~~~~~~~
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp:10:23: note: suggested alternative: 'PIN_PD2'
 #define LED_USER_PIN  PIN_PB2
                       ^
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp:19:18: note: in expansion of macro 'LED_USER_PIN'
     pinConfigure(LED_USER_PIN, PIN_DIR_OUTPUT | PIN_INPUT_ENABLE);
                  ^~~~~~~~~~~~
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp: In member function 'uint8_t LedCtrlClass::getLedPin(Led)':
.pio/libdeps/avr_iot_wg/AVR-IoT-Cellular/src/led_ctrl.cpp:10:23: error: 'PIN_PB2' was not declared in this scope

OK turns out I don’t actually have the avr-iot-wg board (WG emphasized) The example compiles now if I change the ini file board = AVR64DB48

Also need in include <Wire.h> and change upload_protocol to to Curiosity nano ( pkobn_updi and add upload_flags = -F

[env:avr_iot]
platform = atmelmegaavr
board = AVR64DB48
upload_protocol = pkobn_updi
upload_flags = -F
framework = arduino
lib_deps = 
    https://github.com/microchip-pic-avr-solutions/avr-iot-cellular-arduino-library