-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
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
Builds for esp32-c6.
Actual behavior (suspected bug)
Build fails.
Error logs or terminal output
/home/ozan/projects/esp-idf-cxx/i2c_cxx.cpp:22:15: error: 'I2C_NUM_1' was not declared in this scope; did you mean 'I2C_NUM_0'?
22 | static_assert(I2C_NUM_1 == 1, "I2C_NUM_1 must be equal to 1");
| ^~~~~~~~~
| I2C_NUM_0
[597/604] Building CXX object esp-idf/esp-idf-cxx/CMakeFiles/__idf_esp-idf-cxx.dir/esp_event_cxx.cpp.obj
ninja: build stopped: subcommand failed.
Steps to reproduce the behavior
- Clone this repo
- cd examples/simple_i2c_rw_example
- idf.py set-target esp32c6
- idf.py build
Project release version
latest
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Ubuntu 24.04.2 LTS
Shell
Bash
Additional context
The following should fix (in i2c_cxx.cpp, SOC_I2C_NUM -> SOC_HP_I2C_NUM)
/**
* I2C bus are defined in the header files, let's check that the values are correct
*/
#if SOC_HP_I2C_NUM >= 2
static_assert(I2C_NUM_1 == 1, "I2C_NUM_1 must be equal to 1");
#endif // SOC_I2C_NUM >= 2
Metadata
Metadata
Assignees
Labels
No labels