BME688 sensor does not work with the Firebeetle 2 (ESP32C6 based microcontroller) using the ESP32-C2/C3 library

I am using the FireBeetle 2 ESP32-C6 and using the ESP32-C2/C3 library causes a core panic.

Steps:

  1. In BSEC_Software_Library/src, copied esp32_c2c3 library to esp32c6 library

  2. In File/Examples/BSEC Software Library/ selected esp32DeepSleep example

  3. Example compiles ok.

  4. Uploaded to FireBeetle 2 ESP32-C6 successfully. Output was:

    Library BSEC Software Library has been declared precompiled:

    Using precompiled library in /home/danny/Arduino/libraries/BSEC_Software_Library/src/esp32c6

    Sketch uses 295696 bytes (22%) of program storage space. Maximum is 1310720 bytes.

    Global variables use 14692 bytes (4%) of dynamic memory, leaving 312988 bytes for local variables. Maximum is 327680 bytes.

    esptool.py v4.6

    Serial port /dev/ttyACM0

    Connecting...

    Chip is ESP32-C6FH4 (QFN32) (revision v0.0)

    Features: WiFi 6, BT 5, IEEE802.15.4

    Crystal is 40MHz

    MAC: XXXXXXXXXX

    Uploading stub...

    Running stub...

    Stub running...

    Changing baud rate to 921600

    Changed.

    Configuring flash size...

    ...

    Compressed 19648 bytes to 12545...

    Writing at 0x00000000... (100 %)

    Wrote 19648 bytes (12545 compressed) at 0x00000000 in 0.3 seconds (effective 508.8 kbit/s)...

    Hash of data verified.

    Compressed 3072 bytes to 146...

    Writing at 0x00008000... (100 %)

    Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 510.7 kbit/s)...

    Hash of data verified.

    Compressed 8192 bytes to 47...

    Writing at 0x0000e000... (100 %)

    Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 568.6 kbit/s)...

    Hash of data verified.

    Compressed 315760 bytes to 178046...

    Writing at 0x00010000... (9 %)

    ...

    Wrote 315760 bytes (178046 compressed) at 0x00010000 in 2.8 seconds (effective 908.9 kbit/s)...

    Hash of data verified.

    Leaving...

    Hard resetting via RTS pin...

  5. Serial output was:

09:15:15.096 -> 000000773: Sensor error, bme680_status -3!

09:15:15.128 -> 000000773: Failed to init BME680, check wiring!

09:15:15.160 -> Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled.

09:15:15.160 ->

09:15:15.160 -> Core 0 register dump:

09:15:15.160 -> MEPC : 0x00020004 RA : 0x00020005 SP : 0x4087f3e0 GP : 0x4080d2f4

09:15:15.160 -> TP : 0x4087244c T0 : 0xfffffffe T1 : 0x40807bf8 T2 : 0x838c0000

09:15:15.160 -> S0/FP : 0x01400140 S1 : 0x014000c8 A0 : 0x00000000 A1 : 0x0b43e940

09:15:15.193 -> A2 : 0x00000000 A3 : 0x4087f390 A4 : 0x4087f3a8 A5 : 0x4087f3a8

09:15:15.193 -> A6 : 0x00000018 A7 : 0x00000001 S2 : 0x00c800c8 S3 : 0x00000000

09:15:15.193 -> S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000

09:15:15.193 -> S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000

09:15:15.193 -> T3 : 0x00000000 T4 : 0x00000e4a T5 : 0x14bcc46f T6 : 0x00863460

09:15:15.225 -> MSTATUS : 0x00001881 MTVEC : 0x40800001 MCAUSE : 0x00000001 MTVAL : 0x00020004

09:15:15.225 -> MHARTID : 0x00000000

09:15:15.225 ->

09:15:15.225 -> Stack memory:

09:15:15.225 -> 4087f3e0: 0x001e000a 0x00050005 0x00050005 0x00050005 0x0000000a 0x00000000 0x00000000 0x00000000

09:15:15.225 -> 4087f400: 0x00000000 0x40810000 0x42006df6 0x42006b66 0x00000000 0x00000000 0x00000000 0x40809bf2

...

09:15:15.579 -> ELF file SHA256: 1efab4a10d69a7e6

09:15:15.579 ->

09:15:15.579 -> Rebooting...

09:15:15.579 -> ESP-ROM:esp32c6-20220919

09:15:15.579 -> Build:Sep 19 2022

09:15:15.579 -> rst:0xc (SW_CPU),boot:0x8 (SPI_FAST_FLASH_BOOT)

09:15:15.579 -> Saved PC:0x4001975a

09:15:15.579 -> SPIWP:0xee

09:15:15.579 -> mode:DIO, clock div:2

09:15:15.579 -> load:0x4086c410,len:0xcf8

09:15:15.579 -> load:0x4086e610,len:0x2e30

09:15:15.579 -> load:0x40875728,len:0x113c

09:15:15.612 -> entry 0x4086c410

09:15:15.772 -> 000001424: Sensor error, bme680_status -3!

09:15:15.772 -> 000001424: Failed to init BME680, check wiring!

09:15:15.805 -> Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled.

09:15:15.805 ->

2 replies