Skip to content

esp32c2 - Unable to build, i2c sensor SHT3XD #87281

Open
@sailormani

Description

@sailormani

Build failing with 'undefined reference' error.
How to fix this issue?

west.yml

  • name: hal_espressif
    revision: 59d49a284136fb718cdd6e7b6a56d484f746d215
    path: modules/hal/espressif

west blobs list | grep esp32c2
hal_espressif A lib/esp32c2/libespnow.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libespnow.a
hal_espressif A lib/esp32c2/libsmartconfig.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libsmartconfig.a
hal_espressif A lib/esp32c2/libcore.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libcore.a
hal_espressif A lib/esp32c2/libnet80211.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libnet80211.a
hal_espressif A lib/esp32c2/libpp.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libpp.a
hal_espressif A lib/esp32c2/librfate.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/librfate.a
hal_espressif A lib/esp32c2/librftest.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/librftest.a
hal_espressif A lib/esp32c2/libphy.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libphy.a
hal_espressif A lib/esp32c2/libbtbb.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libbtbb.a
hal_espressif A lib/esp32c2/libbttestmode.a lib /u/zephyr/zephyrproject/modules/hal/espressif/zephyr/blobs/lib/esp32c2/libbttestmode.a

esp8684_devkitm_i2c.overlay
pinctrl {
i2c0_def: i2c0_def {
group1 {
pinmux = <I2C0_SCL_GPIO0>, <I2C0_SDA_GPIO0>;
bias-pull-up;
drive-open-drain;
output-high;
};
/* I2C Bus Configuration /
&i2c0 {
status = "okay"; /
Enable I2C /
clock-frequency = <100000>; /
Standard 100kHz I²C speed */
pinctrl-0 = <&i2c0_def>;
pinctrl-names = "default";
sht3xd@44 {
compatible = "sensirion,sht3xd";
reg = <0x44>;
};
};

Build cmd -
west build -p always -b esp8684_devkitm samples/sensor/sht3xd -- -DDTC_OVERLAY_FILE=/u/my_proj/esp8684/dts/esp8684_devkitm_i2c.overlay

Error -
-- Board: esp8684_devkitm, qualifiers: esp32c2

/home/ee213134/zephyr-sdk-0.17.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: zephyr/drivers/i2c/libdrivers__i2c.a(i2c_esp32.c.obj): in function i2c_hw_fsm_reset': /u/zephyr/zephyrproject/zephyr/drivers/i2c/i2c_esp32.c:238: undefined reference to i2c_hal_master_init'
/home/ee213134/zephyr-sdk-0.17.0/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/12.2.0/../../../../riscv64-zephyr-elf/bin/ld.bfd: zephyr/drivers/i2c/libdrivers__i2c.a(i2c_esp32.c.obj): in function `i2c_esp32_isr':

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: ESP32Espressif ESP32priority: lowLow impact/importance bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions