adafruit / Adafruit_Wippersnapper_Arduino

WipperSnapper is a firmware for creating no-code IoT electronics projects.
https://io.adafruit.com/welcome
MIT License
29 stars 44 forks source link

Improve PlatformIO Build Instructions in README.md #336

Closed brentru closed 1 year ago

brentru commented 1 year ago

The PlatformIO build instructions in the README.md could use some improvement:

  1. Test the PlatformIO build instructions on your local machine, comment below with feedback on how it can be improved. We'll discuss more below!
  2. Update the build instructions in the README.md to reflect feedback from discussion
  3. Create a pull request with the updated README.md file
tyeth commented 1 year ago

Hiya, I've tried running and the feather32v2 compiles but wont link for me. image The feather-s2 runs into a tinyUSB error maybe due to missing tiny_usb rename script (ref https://github.com/platformio/platform-espressif32/issues/809 ). image The feather8266 builds and wont link image Running on windows 11 in vscode and a powershell / platformio terminal

Regarding readme assumptions etc, it seems fair although there is the assumption you've installed all the prerequisite libraries in arduino (maybe part of one of the learn guides), and have platformio.ini pointing at the right place for those installed arduino libraries (99% of people it works for anyway at ~/docs/ardu/libr...).

My local environment is not fresh, so maybe contributing.

brentru commented 1 year ago

@tyeth Here's what my current .ini looks like.

; PlatformIO Project Configuration File for Adafruit.IO WipperSnapper
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
description = "Adafruit.IO WipperSnapper"
default_envs = featheresp32v2, featheresp32s2

; Common WipperSnapper Build Environment
; https://docs.platformio.org/en/latest/projectconf/section_env.html
[env]
framework = arduino
monitor_speed = 115200
lib_compat_mode = strict
lib_extra_dirs = ~/Documents/Arduino/libraries

; WipperSnapper local build environment for Adafruit Feather ESP32 v2
[env:featheresp32v2]
platform = https://github.com/platformio/platform-espressif32.git
;platform = https://github.com/Jason2866/platform-espressif32.git
monitor_filters = time, esp32_exception_decoder, colorize
board = adafruit_feather_esp32_v2
build_flags = -D ARDUINO_ADAFRUIT_FEATHER_ESP32_V2
upload_port = /dev/cu.wchusbserial54790143761
monitor_port = /dev/cu.wchusbserial54790143761
lib_deps = adafruit/Adafruit TinyUSB Library@^1.10.3
; build_src_filter = +<*> -<../.pio/libdeps/featheresp32v2/MAX31850 OneWire>
;board_build.partitions = default_8MB.csv
;extra_scripts = ./littlefsbuilder.py

; WipperSnapper local build environment for Adafruit Feather ESP32-S2
[env:featheresp32s2]
platform = espressif32
board = featheresp32-s2
upload_port = /dev/cu.usbmodem01
monitor_port = /dev/cu.usbmodem1330
build_flags = -D ARDUINO_ADAFRUIT_FEATHER_ESP32S2
monitor_filters = time, esp32_exception_decoder, colorize
extra_scripts = 
    pre:rename_usb_config.py
lib_deps = adafruit/Adafruit TinyUSB Library@^1.10.3

; WipperSnapper local build environment for Adafruit Feather ESP8266
[env:featheresp8266]
platform = https://github.com/platformio/platform-espressif8266.git
board = huzzah
build_flags = -D ARDUINO_ESP8266_ADAFRUIT_HUZZAH
lib_ignore = Adafruit TinyUSB Library
build_src_filter = +<*> -<../.pio/libdeps/featheresp8266/Adafruit TinyUSB Library>
upload_port = /dev/cu.usbserial-017C8C08
monitor_port = /dev/cu.usbserial-017C8C08
build_type = debug
monitor_filters = esp8266_exception_decoder

Hiya, I've tried running and the feather32v2 compiles but wont link for me.

Could you show me a screenshot of what your VSCode side-bar looks like, with all the files listed?

tyeth commented 1 year ago

@brentru similar situation on a fresh installed pc (well actually Windows Sandbox), with vscode + platformio + git for windows. I didn't install anything arduino related, so I ended up having to install the libraries to platform io with the pio lib install which is now deprecated. Is there a way to get platformIO to install requirements from library.properties? I had to do a regex replace and make a list of commands as I am under the impression each library must be installed individually. I tried pio pkg install and I think it just did tiny-usb

Also there is a dallas ds18b20 dependency missing (it's silently cloned as part of the CI, but not listed in library.properties)

My local (not fresh) looks like this (I also have another clone/copy in linux / WSL with same situation - not fresh) image

brentru commented 1 year ago

@tyeth This is good information. I haven't tried building from scratch but would like to..

so I ended up having to install the libraries to platform io with the pio lib install which is now deprecated. Is there a way to get platformIO to install requirements from library.properties? I had to do a regex replace and make a list of commands as I am under the impression each library must be installed individually. I tried pio pkg install and I think it just did tiny-usb

My understanding is that this line tells PIO to source from the standard Arduino library folder via the PIO Lib Dep. Finder.

Output from my Build command, for reference

LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ strict
Found 219 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Adafruit TinyUSB Library @ 1.14.3
|-- Adafruit WipperSnapper @ 1.0.0-beta.52
|   |-- Adafruit DotStar @ 1.2.1
...

Also there is a dallas ds18b20 dependency missing (it's silently cloned as part of the CI, but not listed in library.properties)

Yep, expected. We may want to pull that into the platformio.ini for local builds.

What does doing a Build on the ESP32v2 platform look like for you?

tyeth commented 1 year ago

Okay so the readme probably needs to say follow the arduino guide and install the required arduino libraries. Alternatively use the arduino-cli which can install all the libraries in one go and no arduino IDE needed.

## on windows in powershell
( tail .\library.properties -n1 ).split('=')[1].split(',') | ForEach-Object { arduino-cli.exe lib install $_.trim() } 

Lastly if you only want platformio (no arduino CLI/IDE) then you can install the libraries mentioned in library.properties directly with platformIO. ( tail .\library.properties -n1 ).split('=')[1].split(',') | ForEach-Object { pio.exe lib install $_.trim() } The ds18b20 works fine for me (got one). It does need the libraries adding to the library.propties as currently the arduino guide/build is broken without.

brentru commented 1 year ago

Lastly if you only want platformio (no arduino CLI/IDE) then you can install the libraries mentioned in library.properties directly with platformIO. ( tail .\library.properties -n1 ).split('=')[1].split(',') | ForEach-Object { pio.exe lib install $_.trim() }

Where did you insert this snippet? Is this Powershell? You can execute python scripts from the platformio.ini file, maybe we'll want something like this in there?

It does need the libraries adding to the library.propties as currently the arduino guide/build is broken without.

Yeah, maybe we'll have a version of library.properties which is only used by the CI.

tyeth commented 1 year ago

Yeah powershell, ran in platformIO terminal, tried to do code highlight in markdown but it just colour-codes not labels.

My espV2 as requested builds (this is another laptop) but wont link ```ShellSession Executing task: C:\Users\tyeth\.platformio\penv\Scripts\platformio.exe run --environment featheresp32v2 Processing featheresp32v2 (platform: https://github.com/platformio/platform-espressif32.git; board: adafruit_feather_esp32_v2; framework: arduino) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Verbose mode can be enabled via `-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/adafruit_feather_esp32_v2.html PLATFORM: Espressif 32 (5.2.0+sha.03254d4) > Adafruit Feather ESP32 V2 HARDWARE: ESP32 240MHz, 320KB RAM, 8MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES: - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5) - tool-esptoolpy @ 1.40201.0 (4.2.1) - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3 LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ strict Found 66 compatible libraries Scanning dependencies... Dependency Graph |-- Adafruit NeoPixel @ 1.10.6 | |-- Adafruit TinyUSB Library @ 1.14.4 |-- Adafruit SPIFlash @ 4.0.0 | |-- SPI @ 2.0.0 | |-- SdFat - Adafruit Fork @ 2.2.1 | | |-- SPI @ 2.0.0 |-- ArduinoJson @ 6.19.4 |-- Adafruit DotStar @ 1.2.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 |-- Adafruit SleepyDog Library @ 1.6.1 |-- Adafruit TinyUSB Library @ 1.14.4 |-- Adafruit AHTX0 @ 2.0.3 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit BME280 Library @ 2.2.2 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit DPS310 @ 1.1.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit SCD30 @ 1.0.9 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Sensirion I2C SCD4x @ 0.3.1 | |-- Wire @ 2.0.0 | |-- Sensirion Core @ 0.6.0 | | |-- Wire @ 2.0.0 |-- arduino-sht @ 1.2.2 | |-- Wire @ 2.0.0 |-- Adafruit Si7021 Library @ 1.5.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit MQTT Library @ 2.4.3 |-- Adafruit MCP9808 Library @ 2.0.0 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit MCP9600 Library @ 2.0.0 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 |-- Adafruit TSL2591 Library @ 1.4.3 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit PM25 AQI Sensor @ 1.0.6 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit VEML7700 Library @ 2.1.2 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 |-- Adafruit LC709203F @ 1.3.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit seesaw Library @ 1.6.3 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit BME680 Library @ 2.0.2 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- DallasTemperature @ 3.11.0 | |-- OneWire @ 2.3.7 |-- SPI @ 2.0.0 |-- Adafruit Unified Sensor @ 1.1.6 |-- Wire @ 2.0.0 |-- FS @ 2.0.0 |-- LittleFS @ 2.0.0 | |-- FS @ 2.0.0 |-- SdFat - Adafruit Fork @ 2.2.1 | |-- SPI @ 2.0.0 Building in release mode Linking .pio\build\featheresp32v2\firmware.elf c:/users/tyeth/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/featheresp32v2/libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined reference to `setup()' c:/users/tyeth/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/featheresp32v2/libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to `loop()' c:/users/tyeth/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/featheresp32v2/libFrameworkArduino.a(main.cpp.o): in function `loopTask(void*)': C:/Users/tyeth/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:42: undefined reference to `setup()' c:/users/tyeth/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/tyeth/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:48: undefined reference to `loop()' collect2.exe: error: ld returned 1 exit status *** [.pio\build\featheresp32v2\firmware.elf] Error 1 ============================================================================================================== [FAILED] Took 79.38 seconds ============================================================================================================== Environment Status Duration -------------- -------- ------------ featheresp32v2 FAILED 00:01:19.378 ========================================================================================================= 1 failed, 0 succeeded in 00:01:19.378 ========================================================================================================= ```

I ended up adding DallasTemperature in platformIO as same author.

Build as esp32 _s2_ ``` Processing featheresp32s2 (platform: espressif32; board: featheresp32-s2; framework: arduino) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Removing unused dependencies... Verbose mode can be enabled via `-v, --verbose` option warning: Calling missing SConscript without error is deprecated. Transition by adding must_exist=False to SConscript calls. Missing SConscript 'rename_usb_config.py' File "C:\Users\tyeth\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 186, in CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/featheresp32-s2.html PLATFORM: Espressif 32 (5.2.0+sha.03254d4) > Adafruit ESP32-S2 Feather Development Board HARDWARE: ESP32S2 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES: - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5) - tool-esptoolpy @ 1.40201.0 (4.2.1) - toolchain-riscv32-esp @ 8.4.0+2021r2-patch3 - toolchain-xtensa-esp32s2 @ 8.4.0+2021r2-patch3 Warning! An extra UF2 bootloader image is already added! LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ strict Found 66 compatible libraries Scanning dependencies... Dependency Graph |-- Adafruit NeoPixel @ 1.10.6 | |-- Adafruit TinyUSB Library @ 1.14.4 |-- Adafruit SPIFlash @ 4.0.0 | |-- SPI @ 2.0.0 | |-- SdFat - Adafruit Fork @ 2.2.1 | | |-- SPI @ 2.0.0 |-- ArduinoJson @ 6.19.4 |-- Adafruit DotStar @ 1.2.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 |-- Adafruit SleepyDog Library @ 1.6.1 |-- Adafruit TinyUSB Library @ 1.14.4 |-- Adafruit AHTX0 @ 2.0.3 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit BME280 Library @ 2.2.2 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit DPS310 @ 1.1.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit SCD30 @ 1.0.9 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Sensirion I2C SCD4x @ 0.3.1 | |-- Wire @ 2.0.0 | |-- Sensirion Core @ 0.6.0 | | |-- Wire @ 2.0.0 |-- arduino-sht @ 1.2.2 | |-- Wire @ 2.0.0 |-- Adafruit Si7021 Library @ 1.5.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit MQTT Library @ 2.4.3 |-- Adafruit MCP9808 Library @ 2.0.0 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit MCP9600 Library @ 2.0.0 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 |-- Adafruit TSL2591 Library @ 1.4.3 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- Adafruit PM25 AQI Sensor @ 1.0.6 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit VEML7700 Library @ 2.1.2 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 |-- Adafruit LC709203F @ 1.3.1 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit seesaw Library @ 1.6.3 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 |-- Adafruit BME680 Library @ 2.0.2 | |-- Adafruit BusIO @ 1.13.2 | | |-- SPI @ 2.0.0 | | |-- Wire @ 2.0.0 | |-- Wire @ 2.0.0 | |-- SPI @ 2.0.0 | |-- Adafruit Unified Sensor @ 1.1.6 |-- DallasTemperature @ 3.11.0 | |-- OneWire @ 2.3.7 |-- SPI @ 2.0.0 |-- Adafruit Unified Sensor @ 1.1.6 |-- Wire @ 2.0.0 |-- FS @ 2.0.0 |-- LittleFS @ 2.0.0 | |-- FS @ 2.0.0 |-- SdFat - Adafruit Fork @ 2.2.1 | |-- SPI @ 2.0.0 Building in release mode Compiling .pio\build\featheresp32s2\FrameworkArduinoVariant\variant.cpp.o Compiling .pio\build\featheresp32s2\src\Wippersnapper.cpp.o Compiling .pio\build\featheresp32s2\src\components\analogIO\Wippersnapper_AnalogIO.cpp.o Compiling .pio\build\featheresp32s2\src\components\digitalIO\Wippersnapper_DigitalGPIO.cpp.o Compiling .pio\build\featheresp32s2\src\components\ds18x20\ws_ds18x20.cpp.o Compiling .pio\build\featheresp32s2\src\components\i2c\WipperSnapper_I2C.cpp.o Compiling .pio\build\featheresp32s2\src\components\ledc\drivers\ws_ledc_servo.cpp.o Compiling .pio\build\featheresp32s2\src\components\ledc\ws_ledc.cpp.o Compiling .pio\build\featheresp32s2\src\components\register\Wippersnapper_Register.cpp.o In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/Wippersnapper.cpp:34: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/analogIO/Wippersnapper_AnalogIO.h:19, from src/components/analogIO/Wippersnapper_AnalogIO.cpp:17: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/digitalIO/Wippersnapper_DigitalGPIO.h:19, from src/components/digitalIO/Wippersnapper_DigitalGPIO.cpp:17: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/i2c/WipperSnapper_I2C.h:19, from src/components/i2c/WipperSnapper_I2C.cpp:17: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/ds18x20/ws_ds18x20.h:19, from src/components/ds18x20/ws_ds18x20.cpp:17: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/ledc/ws_ledc.h:19, from src/components/ledc/drivers/ws_ledc_servo.h:21, from src/components/ledc/drivers/ws_ledc_servo.cpp:23: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/register/Wippersnapper_Register.cpp:16: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/ledc/ws_ledc.h:19, from src/components/ledc/ws_ledc.cpp:18: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ Compiling .pio\build\featheresp32s2\src\components\servo\ws_servo.cpp.o Compiling .pio\build\featheresp32s2\src\components\statusLED\Wippersnapper_StatusLED.cpp.o Compiling .pio\build\featheresp32s2\src\nanopb\pb_common.c.o Compiling .pio\build\featheresp32s2\src\nanopb\pb_decode.c.o Compiling .pio\build\featheresp32s2\src\nanopb\pb_encode.c.o Compiling .pio\build\featheresp32s2\src\provisioning\littlefs\WipperSnapper_LittleFS.cpp.o Compiling .pio\build\featheresp32s2\src\provisioning\tinyusb\Wippersnapper_FS.cpp.o Compiling .pio\build\featheresp32s2\src\provisioning\tinyusb\fatfs\ff.c.o Compiling .pio\build\featheresp32s2\src\wippersnapper\description\v1\description.pb.c.o In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from src/provisioning/tinyusb/Wippersnapper_FS.h:19, from src/Wippersnapper.h:62, from src/components/statusLED/Wippersnapper_StatusLED.cpp:17: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from .pio/libdeps/featheresp32s2/Adafruit NeoPixel/Adafruit_NeoPixel.h:48, from src/components/statusLED/Wippersnapper_StatusLED.h:19, from src/Wippersnapper.h:35, from src/components/servo/ws_servo.h:20, from src/components/servo/ws_servo.cpp:16: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ Compiling .pio\build\featheresp32s2\src\wippersnapper\ds18x20\v1\ds18x20.pb.c.o Compiling .pio\build\featheresp32s2\src\wippersnapper\i2c\v1\i2c.pb.c.o Compiling .pio\build\featheresp32s2\src\wippersnapper\pin\v1\pin.pb.c.o Compiling .pio\build\featheresp32s2\src\wippersnapper\pwm\v1\pwm.pb.c.o In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/Adafruit_TinyUSB.h:34, from src/provisioning/tinyusb/Wippersnapper_FS.h:19, from src/provisioning/tinyusb/Wippersnapper_FS.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ Compiling .pio\build\featheresp32s2\src\wippersnapper\servo\v1\servo.pb.c.o Compiling .pio\build\featheresp32s2\src\wippersnapper\signal\v1\signal.pb.c.o Generating partitions .pio\build\featheresp32s2\partitions.bin Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\Adafruit_TinyUSB_API.cpp.o In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/Adafruit_TinyUSB_API.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\Adafruit_USBD_CDC.cpp.o Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\Adafruit_USBD_Device.cpp.o Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\Adafruit_USBH_Host.cpp.o Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\hid\Adafruit_USBD_HID.cpp.o In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/Adafruit_USBD_CDC.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:46:1: error: 'Adafruit_USBD_MSC' does not name a type; did you mean 'Adafruit_SCD30'? Adafruit_USBD_MSC usb_msc; /*!< USB mass storage object */ Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\midi\Adafruit_USBD_MIDI.cpp.o ^~~~~~~~Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\msc\Adafruit_USBD_MSC.cpp.o ~~~~~~~~~ Adafruit_SCD30 src/provisioning/tinyusb/Wippersnapper_FS.cpp: In constructor 'Wippersnapper_FS::Wippersnapper_FS()': src/provisioning/tinyusb/Wippersnapper_FS.cpp:82:3: error: 'TinyUSBDevice' was not declared in this scope TinyUSBDevice.detach(); ^~~~~~~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp: In member function 'bool Wippersnapper_FS::initFilesystem()': src/provisioning/tinyusb/Wippersnapper_FS.cpp:154:3: error: 'File' was not declared in this scope File writeFile = wipperFatFs.open("/.fseventsd/no_log", FILE_WRITE); ^~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:154:3: note: suggested alternative: 'Wire' File writeFile = wipperFatFs.open("/.fseventsd/no_log", FILE_WRITE); ^~~~ Wire src/provisioning/tinyusb/Wippersnapper_FS.cpp:155:8: error: 'writeFile' was not declared in this scope if (!writeFile) ^~~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:155:8: note: suggested alternative: 'PrintFile' if (!writeFile) ^~~~~~~~~ PrintFile src/provisioning/tinyusb/Wippersnapper_FS.cpp:157:3: error: 'writeFile' was not declared in this scope writeFile.close(); ^~~~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/Adafruit_USBD_Device.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:157:3: note: suggested alternative: 'PrintFile' writeFile.close(); ^~~~~~~~~ PrintFile src/provisioning/tinyusb/Wippersnapper_FS.cpp: In member function 'void Wippersnapper_FS::initUSBMSC()': src/provisioning/tinyusb/Wippersnapper_FS.cpp:190:3: error: 'usb_msc' was not declared in this scope usb_msc.setID("Adafruit", "External Flash", "1.0"); ^~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:205:3: error: 'TinyUSBDevice' was not declared in this scope TinyUSBDevice.attach(); ^~~~~~~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp: In member function 'void Wippersnapper_FS::eraseCPFS()': src/provisioning/tinyusb/Wippersnapper_FS.cpp:232:5: error: 'File' was not declared in this scope File libDir = wipperFatFs.open("/lib"); ^~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:232:5: note: suggested alternative: 'Wire' File libDir = wipperFatFs.open("/lib"); ^~~~ Wire src/provisioning/tinyusb/Wippersnapper_FS.cpp:233:5: error: 'libDir' was not declared in this scope libDir.rmRfStar(); ^~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp: In member function 'bool Wippersnapper_FS::createBootFile()': src/provisioning/tinyusb/Wippersnapper_FS.cpp:258:3: error: 'File' was not declared in this scope File bootFile = wipperFatFs.open("/wipper_boot_out.txt", FILE_WRITE); ^~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:258:3: note: suggested alternative: 'Wire' File bootFile = wipperFatFs.open("/wipper_boot_out.txt", FILE_WRITE); ^~~~ Wire src/provisioning/tinyusb/Wippersnapper_FS.cpp:259:7: error: 'bootFile' was not declared in this scope if (bootFile) { ^~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:259:7: note: suggested alternative: 'FatFile' if (bootFile) { ^~~~~~~~ FatFile src/provisioning/tinyusb/Wippersnapper_FS.cpp: In member function 'void Wippersnapper_FS::createConfigFileSkel()': src/provisioning/tinyusb/Wippersnapper_FS.cpp:290:3: error: 'File' was not declared in this scope File secretsFile = wipperFatFs.open("/secrets.json", FILE_WRITE); ^~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:290:3: note: suggested alternative: 'Wire' File secretsFile = wipperFatFs.open("/secrets.json", FILE_WRITE); ^~~~ Wire src/provisioning/tinyusb/Wippersnapper_FS.cpp:291:8: error: 'secretsFile' was not declared in this scope if (!secretsFile) { ^~~~~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:291:8: note: suggested alternative: 'StreamFile' if (!secretsFile) { ^~~~~~~~~~~ StreamFile In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/Adafruit_USBH_Host.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:299:3: error: 'secretsFile' was not declared in this scope secretsFile.print("{\n\t\"io_username\":\"YOUR_IO_USERNAME_HERE\",\n\t\"io_" ^~~~~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:299:3: note: suggested alternative: 'StreamFile' secretsFile.print("{\n\t\"io_username\":\"YOUR_IO_USERNAME_HERE\",\n\t\"io_" ^~~~~~~~~~~ StreamFile src/provisioning/tinyusb/Wippersnapper_FS.cpp: In member function 'void Wippersnapper_FS::parseSecrets()': src/provisioning/tinyusb/Wippersnapper_FS.cpp:320:3: error: 'File' was not declared in this scope File secretsFile = wipperFatFs.open("/secrets.json"); ^~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:320:3: note: suggested alternative: 'Wire' File secretsFile = wipperFatFs.open("/secrets.json"); ^~~~ Compiling .pio\build\featheresp32s2\lib767\Adafruit TinyUSB Library\arduino\ports\esp32\Adafruit_TinyUSB_esp32.cpp.o Wire src/provisioning/tinyusb/Wippersnapper_FS.cpp:321:8: error: 'secretsFile' was not declared in this scope if (!secretsFile) { ^~~~~~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/hid/Adafruit_USBD_HID.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:321:8: note: suggested alternative: 'StreamFile' if (!secretsFile) { ^~~~~~~~~~~ StreamFile src/provisioning/tinyusb/Wippersnapper_FS.cpp:327:51: error: 'secretsFile' was not declared in this scope DeserializationError err = deserializeJson(doc, secretsFile); ^~~~~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:327:51: note: suggested alternative: 'StreamFile' DeserializationError err = deserializeJson(doc, secretsFile); ^~~~~~~~~~~ StreamFile src/provisioning/tinyusb/Wippersnapper_FS.cpp: In member function 'void Wippersnapper_FS::writeToBootOut(const char*)': src/provisioning/tinyusb/Wippersnapper_FS.cpp:479:3: error: 'File' was not declared in this scope File bootFile = wipperFatFs.open("/wipper_boot_out.txt", FILE_WRITE); ^~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:479:3: note: suggested alternative: 'Wire' File bootFile = wipperFatFs.open("/wipper_boot_out.txt", FILE_WRITE); ^~~~ Wire src/provisioning/tinyusb/Wippersnapper_FS.cpp:480:7: error: 'bootFile' was not declared in this scope if (bootFile) { ^~~~~~~~ src/provisioning/tinyusb/Wippersnapper_FS.cpp:480:7: note: suggested alternative: 'FatFile' if (bootFile) { ^~~~~~~~ FatFile In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/msc/Adafruit_USBD_MSC.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/midi/Adafruit_USBD_MIDI.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ *** [.pio\build\featheresp32s2\src\provisioning\tinyusb\Wippersnapper_FS.cpp.o] Error 1 In file included from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/tusb_option.h:179, from .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/arduino/ports/esp32/Adafruit_TinyUSB_esp32.cpp:25: .pio/libdeps/featheresp32s2/Adafruit TinyUSB Library/src/common/tusb_mcu.h:275:4: warning: #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" [-Wcpp] #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8" ^~~~~~~ ============================================================================================================== [FAILED] Took 47.84 seconds ============================================================================================================== ```
tyeth commented 1 year ago

So I've got a branch with the dallas dependency, and the python script to setup platformio dependencies. I still get the usb errors for the S2/S3 chipset builds, was trying to build the featherS2 (dont have one) and add the QTPY-S2, and feather-s3 (which I have) related to issue #337 As far as this issue goes, I've got a python script which will install the dependencies mentioned in library.properties and I've made a suggested change to the readme. Let me know what you think - pull request #357