Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-C6 support #327

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

Spacefish
Copy link

@Spacefish Spacefish commented May 1, 2024

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
Copy link
Contributor

l0ud commented May 1, 2024

We already did than on sfusion PR #322 too bad it's merging so slowly.
It shouldn't conflict though.

Copy link
Member

@TheDevMinerTV TheDevMinerTV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TheDevMinerTV
Copy link
Member

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
Copy link
Author

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

@Spacefish Spacefish changed the title Designate all initializer clauses to fix errors with newer compilers ESP32-C6 support May 1, 2024
@Spacefish
Copy link
Author

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
Copy link
Author

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

Copy link
Contributor

@unlogisch04 unlogisch04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update it with the current main. Also check the portArray / PortExclude. When i did try todo mine, i had seen differences but did not brother then as it was all more alpha.

lib/i2cscan/i2cscan.cpp Outdated Show resolved Hide resolved
lib/i2cscan/i2cscan.cpp Outdated Show resolved Hide resolved
platformio-tools.ini Outdated Show resolved Hide resolved
platformio.ini Outdated Show resolved Hide resolved
@unlogisch04
Copy link
Contributor

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.

unlogisch04 and others added 6 commits June 28, 2024 19:43
…limeVR#321 (SlimeVR#328)

* fshelper: fixed ESP8266 regression caused by abstracting FS access SlimeVR#321

* Removing not needed ifdef

l0ud spotted that this is not need.

Co-Authored-By: Przemyslaw Romaniak <[email protected]>

---------

Co-authored-by: Przemyslaw Romaniak <[email protected]>
* feat: add macro for calculating radians

* style: silence unused variable warning

* remove unnecessary float cast in macro
…ations (SlimeVR#322)

* Update readme to mention BMI270 support.

* Soft fusion sensor initial code, wip

* Soft fusion ICM-42688-P lazy WIP implementation.

* sfusion: Cleanup, implemented sensor frequency calibration

* icm42688: add more comments, basic driver (no hw filtering) should be working

* sfustion: compilation fix

* sfusion: start calibration when upside down

* cleanup: remove confusing had data flag

* sensor manager: use unique_ptr instead of raw pointers

* sfusion: big refactoring wip

* sfusion: make aux work, at least sfusion sensors should now be functional

* sfusion: lightweight implementation of BMI270 sensor, no sensitivity cal yet

* sfusion: BMI270: added CRT and gyro zx factor. should be functionally equivalent to the old driver

* Added lsm6dsv

* Trying to work around esp32c3 compilation problem, not liking that solution

* sfusion: fix problems found after rebase

* Update README.md

* Bump Arduino core to 3.0 to match GCC12

* Remove fast pin swapping that is no longer compatible with arduino core v3

* Bring back fast pin swapping

* Update platformio-tools.ini

* Fix accel timescale (calibration no longer takes forever)

* Fix non-sfusion sensors

* Added LSM6DSO and DSR support and refactored DSV support

* Removed template float param from the implementation

* sfusion: port MPU6050 driver wip, not expecting to be functional yet

* sfusion: add headers specifying main code owners

* connection: fix warning

* update README.md

* fshelper: fixed ESP8266 regression caused by abstracting FS access

* sfusion: fix error on merge

* bno080: differentiate bno080, bno085, bno086 again

* sfusion: final touches

* restore hadData functionality, implementing it in every sensor, made configured flag bno-only

* fix address supplement in non-sfusion sensors, do i2c bus reset for all sensors

* sfusion: make MPU6050 driver use normal MPU6050 ImuID, change eatSamplesAndReturn function to take ms instead of seconds

* sfusion: hotfix, don't apply sensorOffset, it's applied in sensor base

* Log FIFO overruns on LSMs

* Reset the soft watchdog while eating or collecting calibration samples

Resolves an issue where the soft watchdog would trigger.

* Fix missing word in comment, switch to constexpr

* Update esp32/esp8266

---------

Co-authored-by: Gorbit99 <[email protected]>
Co-authored-by: nekomona <[email protected]>
Co-authored-by: nekomona <[email protected]>
Co-authored-by: unlogisch04 <[email protected]>
Co-authored-by: kounocom <[email protected]>
Co-authored-by: Kubuxu <[email protected]>
Add haritora consts, fix misspelling
@Spacefish
Copy link
Author

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

  • Removed the boot delay (wasn´t required)
  • Removed special case handling for one sensor which has it for the C3 as well but which did essentially nothing

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants