-
-
Notifications
You must be signed in to change notification settings - Fork 356
Description
Hi I try to compile my own firmware but it seem it to take defines.h change in consideration.
i also disable external clock in icm45686.h :
#if IMU_USE_EXTERNAL_CLOCK
//m_RegisterInterface.writeReg(Regs::Pin9Config::reg, Regs::Pin9Config::value);
//m_RegisterInterface.writeReg(Regs::RtcConfig::reg, Regs::RtcConfig::value);
#endif
return ICM45Base::initializeBase();
}
};
defines.h :
// Set parameters of IMU and board used
#ifndef IMU
#define IMU IMU_ICM45686
#endif
#ifndef SECOND_IMU
#define SECOND_IMU IMU_NONE
#endif
#ifndef BOARD
#define BOARD BOARD_CUSTOM
#endif
#ifndef IMU_ROTATION
#define IMU_ROTATION DEG_270
#endif
#ifndef SECOND_IMU_ROTATION
#define SECOND_IMU_ROTATION DEG_270
#endif
#ifndef PRIMARY_IMU_OPTIONAL
#define PRIMARY_IMU_OPTIONAL false
#endif
#ifndef SECONDARY_IMU_OPTIONAL
#define SECONDARY_IMU_OPTIONAL true
#endif
// Set I2C address here or directly in IMU_DESC_ENTRY for each IMU used
// If not set, default address is used based on the IMU and Sensor ID
// #define PRIMARY_IMU_ADDRESS_ONE 0x4a
// #define SECONDARY_IMU_ADDRESS_TWO 0x4b
#ifndef BATTERY_MONITOR
// Battery monitoring options (comment to disable):
// BAT_EXTERNAL for ADC pin,
// BAT_INTERNAL for internal - can detect only low battery,
// BAT_MCP3021 for external ADC connected over I2C
#define BATTERY_MONITOR BAT_EXTERNAL
#endif
// --- OVERRIDES FOR DEFAULT PINS
#define PIN_IMU_SDA 8
#define PIN_IMU_SCL 9
i see wrong pin usages on compil log :
-Verbose mode can be enabled via -v, --verbose option
Appending build flags:
-DBOARD=BOARD_ESP32C3DEVKITM1
-DLED_PIN=LED_BUILTIN
-DLED_INVERTED=false
-DPIN_IMU_SDA=5
-DPIN_IMU_SCL=4
-DPIN_IMU_INT_2=7
-DPIN_IMU_INT=6
Upload is on but track dont connect even on usb debug in slimevr
Executing task: C:\Users\drepou.platformio\penv\Scripts\platformio.exe run --target upload --environment BOARD_ESP32C3DEVKITM1 --upload-port COM5
Processing BOARD_ESP32C3DEVKITM1 (platform: espressif32 @ 6.7.0; board: esp32-c3-devkitm-1; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
Appending build flags:
-DBOARD=BOARD_ESP32C3DEVKITM1
-DLED_PIN=LED_BUILTIN
-DLED_INVERTED=false
-DPIN_IMU_SDA=5
-DPIN_IMU_SCL=4
-DPIN_IMU_INT_2=7
-DPIN_IMU_INT=6
-DSENSOR_DESC_LIST='SENSOR_DESC_ENTRY(IMU_ICM45686,PRIMARY_IMU_ADDRESS_ONE,DEG_270,DIRECT_WIRE(4, 5),false,DIRECT_PIN(6),0) SENSOR_DESC_ENTRY(IMU_ICM45686,SECONDARY_IMU_ADDRESS_TWO,DEG_270,DIRECT_WIRE(4, 5),true,DIRECT_PIN(7),0)'
-DBATTERY_MONITOR=BAT_EXTERNAL
-DPIN_BATTERY_LEVEL=3
-DBATTERY_SHIELD_RESISTANCE=180
-DBATTERY_SHIELD_R1=100
-DBATTERY_SHIELD_R2=220
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-c3-devkitm-1.html
PLATFORM: Espressif 32 (6.7.0) > Espressif ESP32-C3-DevKitM-1
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, 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.0.1+sha.cc50d90
- framework-arduinoespressif32-libs @ 5.1.0+sha.442a798083
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-riscv32-esp @ 12.2.0+20230208
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 56 compatible libraries
Scanning dependencies...
Dependency Graph
|-- CmdParser @ 0.0.0+sha.dcaa7ea
|-- base64 @ 1.4.0+sha.ac168f5
|-- Adafruit MCP23017 Arduino Library @ 2.3.2+sha.9e67e37
|-- PCA9547 @ 0.1.1+sha.1286452
|-- LittleFS @ 2.0.0
|-- ota
|-- Wire @ 2.0.0
|-- i2cscan
|-- bno080
|-- mpu6050
|-- magneto
|-- math
|-- i2cdev
|-- SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library @ 1.2.9
|-- WiFi @ 2.0.0
|-- SPI @ 2.0.0
|-- vqf
|-- bno055_adafruit
|-- mpu9250
Building in release mode
Retrieving maximum program size .pio\build\BOARD_ESP32C3DEVKITM1\firmware.elf
Checking size .pio\build\BOARD_ESP32C3DEVKITM1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 12.1% (used 39804 bytes from 327680 bytes)
Flash: [========= ] 92.9% (used 1217444 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: COM5
Uploading .pio\build\BOARD_ESP32C3DEVKITM1\firmware.bin
esptool.py v4.5.1
Serial port COM5
Connecting...
Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: cc:ba:97:be:1a:78
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00144fff...
Compressed 13632 bytes to 9883...
Writing at 0x00000000... (100 %)
Wrote 13632 bytes (9883 compressed) at 0x00000000 in 0.3 seconds (effective 331.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.2 seconds (effective 118.0 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 314.8 kbit/s)...
Hash of data verified.
Compressed 1264704 bytes to 762207...
Writing at 0x00010000... (2 %)
Writing at 0x0001c40c... (4 %)
Writing at 0x000281b8... (6 %)
Writing at 0x0002e408... (8 %)
Writing at 0x00033c7a... (10 %)
...
Writing at 0x001271e6... (91 %)
Writing at 0x0012e85e... (93 %)
Writing at 0x0013538f... (95 %)
Writing at 0x0013aecc... (97 %)
Writing at 0x0014143a... (100 %)
Wrote 1264704 bytes (762207 compressed) at 0x00010000 in 11.0 seconds (effective 918.1 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
================================================================== [SUCCESS] Took 31.24 seconds ==================================================================
Environment Status Duration
BOARD_ESP32C3DEVKITM1 SUCCESS 00:00:31.236
=================================================================== 1 succeeded in 00:00:31.236 =================================================================== * Terminal will be reused by tasks, press any key to close it.
imu is not found refer to android serial console :
[INFO ] [SlimeVR] SlimeVR vmain starting up...
[INFO ] [SlimeVR] Vendor: Drepou, product: DIY SlimeVR Tracker
[INFO ] [Configuration] Found up-to-date configuration v1
[INFO ] [Configuration] Loaded configuration
[ERROR] [SensorManager] Mandatory sensor 1 not found at address I2C(0x00)
[DEBUG] [SensorManager] Optional sensor 2 not found at address I2C(0x69)
[INFO ] [SensorManager] 0 sensor(s) configured
[ERROR] [SensorManager] Can't find I2C device on provided addresses, scanning for all I2C devices in the background
[INFO ] [WiFiHandler] Setting up WiFi
[INFO ] [WiFiHandler] Loaded credentials for SSID '' and pass length 0
[DEBUG] [WiFiHandler] Skipping saved credentials attempt on 0-length SSID...
[NOTICE] OTA updates allowed
[ 814][E][Wire.cpp:449] endTransmission(): NULL TX buffer pointer
[WARN ] I2C (@ 2(2) : 3(3)): Unable to start transaction at address 0x01!
[ 821][E][Wire.cpp:449] endTransmission(): NULL TX buffer pointer
[WARN ] I2C (@ 2(2) : 3(3)): Unable to start transaction at address 0x02!
[ 827][E][Wire.cpp:449] endTransmission(): NULL TX buffer pointer
sample code from 45686 arduino lib work perfect https://github.com/tdk-invn-oss/motion.arduino.ICM45686/tree/main/examples/Polling_I2C