Skip to main content
Andrei Chichak
Lead
June 27, 2022
Question

STM32CubeMX 6.5.0 includes code for I2C when not being used.

  • June 27, 2022
  • 1 reply
  • 604 views

I think I spotted a bug in CubeMX.

Target processor STM32F767ZIT6. Firmware for F7 package 1.16.2.

I don't tend to use I2C (it's a terrible hack), so I was surprised when I saw that I had stm32f7xx_hal_i2c.c and stm32f7xx_hal_i2c_ex.c showing in my map file.

I checked my Cube model and all I2C devices were disabled, and yet Cube was throwing the I2C support code into my Drivers/STM32F7xx_HAL_Driver/Src and Inc folders. Everything else is accounted for, but I2C??? no thanks.

In stm32f7xx_hal_conf.h, I2C is enabled too. If I comment that out and delete the i2c.c files, my project still compiles.

A flag from a previous time that didn't get cleared? Not likely, I stay away from I2C for my mental health.

Extra cruft.

Thanks,

Andrei (from The Great White (as in snow) North)

This topic has been closed for replies.

1 reply

Foued_KH
ST Employee
October 25, 2022

Hi @Andrei Chichak​ (Community Member)​,

Thanks for bringing this issue to our attention. I reported it to our STM32CubeMX team.

Internal ticket number: 137268 (This is an internal tracking number and is not accessible or usable by customers).

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.