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

Multiple definitions of bsp_i2c_init with esp-box-3 2.0.0 (AIS-1831) #146

Open
3 tasks done
milas opened this issue Jan 1, 2025 · 1 comment
Open
3 tasks done

Comments

@milas
Copy link

milas commented Jan 1, 2025

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

Can use Skainet with https://components.espressif.com/components/espressif/esp-box-3/versions/2.0.0

Actual behavior (suspected bug)

Conflicting/duplicate definitions of bsp_i2c_init prevent usage together.

Definition in esp-bsp:
https://github.com/espressif/esp-bsp/blob/f770b1736221766cbc736024f29236ae654b2ce7/bsp/esp-box-3/esp-box-3.c#L98

Definition in esp-skainet:

esp_err_t bsp_i2c_init(i2c_port_t i2c_num, uint32_t clk_speed)

Error logs or terminal output

= note: [ldproxy] Running ldproxy
          Error: Linker /home/esp/project/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc failed: exit status: 1
          STDERR OUTPUT:
          /home/esp/project/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/hardware_driver/libhardware_driver.a(bsp_board.c.obj): in function `bsp_i2c_init':
          /home/esp/proj/esp/skainet/components/hardware_driver/boards/esp32s3-box-3/bsp_board.c:66: multiple definition of `bsp_i2c_init'; esp-idf/espressif__esp-box-3/libespressif__esp-box-3.a(esp-box-3.c.obj):/home/esp/project/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-8425f7018bb94d23/out/managed_components/espressif__esp-box-3/esp-box-3.c:99: first defined here
          collect2: error: ld returned 1 exit status

Note: I'm using Rust via esp-rs and compiling extra components for esp-idf-sys, but other than the error, this isn't actually Rust-specific -- problem is on the C side with the ESP IDF components.

Steps to reproduce the behavior

  1. Create a project with espressif/esp-box-3 (2.0.0) & skainet/components/hardware_driver (master)
  2. Try to build

Project release version

unreleased master

System architecture

Intel/AMD 64-bit (modern PC, older Mac)

Operating system

Linux

Operating system version

NixOS

Shell

ZSH

Additional context

I'm guessing that pre-2.0.0, the BSP package did not provide bsp_i2c_init, and now it does.

I'm trying to use with ESP-SR 1.9.5.

I can't downgrade ESP-BSP because I need IDF 5.3.2.

@github-actions github-actions bot changed the title Multiple definitions of bsp_i2c_init with esp-box-3 2.0.0 Multiple definitions of bsp_i2c_init with esp-box-3 2.0.0 (AIS-1831) Jan 1, 2025
@sun-xiangyu
Copy link
Contributor

When esp-skainet started, the esp-bsp driver had some bugs, so we used the esp-bsp interface in the hardware, but modified part of the implementation.
Now esp-bsp and hardware, you can choose to use any one of them, and you need to delete the other one to avoid conflicts.
We plan to use esp-bsp directly in the future instead of maintaining a set of driver code ourselves.

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

No branches or pull requests

2 participants