Skip to main content
C Austin
Associate II
July 22, 2021
Question

Updated MX to latest and get incorrect code generated...

  • July 22, 2021
  • 4 replies
  • 1230 views

I updated to the latest 1.7.0 for IDE and 6.3.0 for MX and when I regenerate configuration code using MX I get the following for ADC clock configuration.

   PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;

   PeriphClkInit.AdcClockSelection = ADCCLockSelection;

The second line gives an error, when I comment the second line out it compiles correctly. It seems that the code generation might have an error in it regarding this.

Caleb

This topic has been closed for replies.

4 replies

dmberry
Visitor II
July 22, 2021

I have also experienced a similar issue to this when regenerating a configuration. Even a simple label/name will cause the issue.

On my side it is causing multiple definitions in APB, AHB and SysCoreClock

multiple definition of `APBPrescTable'; ./Core/Src/system_stm32f4xx.o:(.rodata.APBPrescTable+0x0): first defined here

multiple definition of `AHBPrescTable'; ./Core/Src/system_stm32f4xx.o:(.rodata.AHBPrescTable+0x0): first defined here

multiple definition of `SystemCoreClock'; ./Core/Src/system_stm32f4xx.o:(.data.SystemCoreClock+0x0): first defined here

Mike_ST
ST Technical Moderator
July 22, 2021

>> "PeriphClkInit.AdcClockSelection = ADCCLockSelection;"

Thank you, ticket entered.

If you can, please share your .ioc files.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
C Austin
C AustinAuthor
Associate II
July 26, 2021

IOC file attached.

This file was from previous version. Also getting it when I do a new file from current (latest version).

Caleb

Mike_ST
ST Technical Moderator
July 27, 2021

The dev team has reproduced the problem.

Thank you very much !

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.