SlimeVR / SlimeVR-Tracker-ESP

SlimeVR tracker firmware for ESP32/ESP8266 and different IMUs
Apache License 2.0
840 stars 288 forks source link

ESP32-C6 support #327

Open Spacefish opened 5 months ago

Spacefish commented 5 months ago

Building SlimeVR for a ESP32-C6 (with better WiFi) i get some compiler errors like: src/defines_sensitivity.h:53:46: error: either all initializer clauses should be designated or none of them should be

This MR fixes this, by just adding a designation to all initializer values.

How to reproduce, use the following config:

[env:esp32c6]
platform =  https://github.com/tasmota/platform-espressif32/releases/download/2024.04.14/platform-espressif32.zip
board = esp32-c6-devkitc-1

Also had to use the existing ESP32C3 functionality for I2C as well as the 2s wait during startup.

I don´t have a working IMU right now, as the chip did not arrive yet. However i can see the I2C Scans on the listed pins on my scope, so i guess it will work, once there is an IMU connected.

l0ud commented 5 months ago

We already did than on sfusion PR https://github.com/SlimeVR/SlimeVR-Tracker-ESP/pull/322 too bad it's merging so slowly. It shouldn't conflict though.

TheDevMinerTV commented 5 months ago

Also, feel free to PR the PlatformIO.ini changes in a new PR so it can be automatically checked through CI. Don't forget to also change the platformio-tools.ini.

Spacefish commented 5 months ago

Ok i will add a littlebit more, as the I2C does not work yet, i will append it to this MR!

Spacefish commented 5 months ago

B.t.w. the code in icm20948sensor.cpp does not make any sense to me: image

ICM20948_ODRGYR and ICM20948_ODRAXL will be 1 no matter which branch is choosen..

Spacefish commented 4 months ago

Ok seems to work fine, got my BMI160 sensors today: https://www.youtube.com/shorts/CuVVX6oVG7U

unlogisch04 commented 3 months ago

B.t.w. the code in icm20948sensor.cpp does not make any sense to me: image

ICM20948_ODRGYR and ICM20948_ODRAXL will be 1 no matter which branch is choosen..

Oddly the ESP32-S2 can not handle as much I2C traffic as the ESP8266 or the ESP32-C3 or at least when i did test it i had often Buffer overflows on ESP32-S2.

Spacefish commented 3 months ago

Made most of the changes requested.

Ports I added all ports of the ESP32-C6 excluding the USB pins used for serial communication and the UART TX/RX.

I2C retries Removed it as it does not seem to be necessary

Small things

platformio ESP32-C6 arduino support Unfortunately the "official" platformio platform-espressif32 package still does not support any C6 board with the arduino framework. The only two supported C6 boards in platformio are 'esp32-c6-devkitc-1' and 'esp32-c6-devkitm-1' both list only 'espidf' as framework, even on the develop branch.

Support for the C6 was added by espressif to espressif/arduino-esp32 in 3.0.0 though. So support is probably comming to platformio sooner or later in the official packages.

For now have to stick to the tasmoto platform-espressif32.