Skip to main content
MScho.10
Visitor II
August 24, 2020
Question

X-CUBE-EEPROM missing GetBankNumber() definition for STM32G474

  • August 24, 2020
  • 1 reply
  • 641 views

In the X-CUBE-EEPROM library (https://www.st.com/en/embedded-software/x-cube-eeprom.html)

FLASH_OPTR_BFB2 is defined for the stm32g474 in

Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g474xx.h

and therefore the following in

Middlewares/ST/EEPROM_Emul/Porting/STM32G4/flash_interface.c is also defined.

```

uint32_t bank = FLASH_BANK_1, page_error = 0U;

#if defined(FLASH_OPTR_BFB2)

  bank = GetBankNumber(PAGE_ADDRESS(Page));

#endif

```

however, GetBankNumber() is only defined in the L4 and L5 flash_interface.c files. It does not have a function definition in the .../STM32G4/flash_interface.c

This seems like a bug in X-CUBE-EEPROM. Is there a way to report this bug directly? or anyone know of a fix for it? just commenting out "bank = Get..." gets it to compile, though I have not tested if this actually works yet.

This topic has been closed for replies.

1 reply

Technical Moderator
August 28, 2020

Hello @MScho.10​ ,

Thank you for your reported issue.

I raised this internally to the appropriate team for correction and adding definition of GetBankNumber().

Best Regards,

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"