cancel
Showing results for 
Search instead for 
Did you mean: 

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

MScho.10
Associate

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.

1 REPLY 1
Imen.D
ST Employee

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".
Thanks
Imen