An update to this issue:
I was building on Windows using PlatformIO when I had the issue. I always install libraries using Arduino as I like to swap between Arduino ID and PlatformIO. My platformio.ini contains the following:
[env:WIO-Terminal-Clock]
platform = atmelsam
board = seeed_wio_terminal
framework = arduino
lib_extra_dirs = C:\Users\stuart\Documents\Arduino\librariesplatform_packages = framework-arduino-samd-seeed@GitHub - Seeed-Studio/ArduinoCore-samd
lib_ldf_mode = deep
I did some experimenting and downloaded some examples that I build using tha Adruino IDE. These compiled and uploaded and now the PlatformIO build compiles and uploads OK. I cannot be 100% sure that it was building using Arduino IDE but that is all I can think of.
So now it builds and uploads. I have some issues in that the scanner (example from the WIKI) does not list my 2.4Ghz SSID. It only lists my 5Ghz channels.
I have 2 WIO devices. I swap them when I do a release. The current (live) one runs using the atWIFI and connects to my 2.4Ghz SSID, the other (dev) one uses rpcWIFI and cannot see the 2.4Ghz SSID. It will however connect the the 5Ghz SSID.
This is a bit of a problem as the range for 5Ghz is lower and I am operating at a distance. I really need it to connect to 2.4Ghz channels.
Any advise for this would be really usefull.
Stuart