Ok. The title may be a little flippant but it sure is acting funny.
I have been using VM with VS for a long time with lots of different Arduino and Teensy applications. I am now working on two applications that use different microcontrollers for the first time. One is for the Adafruit ItsyBitsy Express and the other is for the ESP32-DEVKIT.
I believe that I have loaded all the libraries in correctly but Intellisense has thrown up all over the code with errors. Mostly with undefined identifiers yet the libraries are right there and the include statements do not show errors. Also, the code compiles and runs successfully even though there are warnings and at least one error.
Here is output from the build:
Compiling '******-Itsy' for 'Adafruit ItsyBitsy nRF52840 Express'
ld.exe: warning: changing start of section .bss by 4 bytes
ld.exe: warning: changing start of section .bss by 4 bytes
ld.exe: warning: changing start of section .bss by 4 bytes
ld.exe: warning: changing start of section .bss by 4 bytes
ld.exe: warning: changing start of section .bss by 4 bytes
ERROR*: One of the files to merge cannot be found
Zip created at 0\Debug/******-Itsy.ino.zip
Program size: 101,204 bytes (used 12% of a 815,104 byte maximum) (48.67 secs)
Minimum Memory Usage: 13044 bytes (5% of a 237568 byte maximum)
Uploading '******-Itsy' to 'Adafruit ItsyBitsy nRF52840 Express' using 'COM10'
Unable to 'touch' hardware serial port: COM10. Now assuming selected port is bootloader port. This might still fail, have you got the correct board selected?
Upgrading target on COM11 with DFU package \Debug\*******-Itsy.ino.zip. Flow control is disabled, Single bank, Touch disabled
########################################
########################################
########################################
########################################
######################################
Activating new firmware
Device programmed.
The upload process has finished. via 'COM11'
************
Also, you can't tell by the listing below but all of the instantiations have squigglies under them. Even Serial.begin is not recognized.
Thanks for any help. I make enough errors without Intellisense indicating some that aren't real.
#include <AutoPID.h>
#include <Arduino.h>
#include <bluefruit.h>
#include <Adafruit_DotStar.h>
#include <Adafruit_LittleFS.h>
#include <InternalFileSystem.h>
// Instantiate the two PID loops for TEC temperature control
AutoPID PID1(&TECTempF[1], &SetTemp, &TECPWM[1], 0, 255, Kp, Ki, Kd);
AutoPID PID2(&TECTempF[2], &SetTemp, &TECPWM[2], 0, 255, Kp, Ki, Kd);
// Instantiate the DotStar LED
Adafruit_DotStar DotStar(DotStarPixels, pinDotStarData, pinDotStarCLK, DOTSTAR_GBR);
// Instantiate the Bluetooth Services
BLEDfu bledfu; // OTA DFU service
BLEDis bledis; // device information
BLEUart bleuart; // uart over ble
BLEBas blebas; // battery