Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed for STM32 L476: "PageAddress" member for FLASH_EraseInitTypeDef not applicable #21

Open
Uxion opened this issue Sep 18, 2023 · 2 comments

Comments

@Uxion
Copy link

Uxion commented Sep 18, 2023

https://github.com/nimaltd/ee/blob/d9f9c7d7ac48163c2c69e4359703ae5de9669f7f/ee.c#L245C19-L245C19

Line 245 of ee.c " flashErase.PageAddress = _EE_ADDR_INUSE; "
Function is ee_format.

References FLASH_EraseInitTypeDef in stm32l4xx_hal_flash.h driver.

The L4 driver's FLASH_EraseInitTypeDef is missing "PageAddress" member.

Directly from the stm32 L4 driver file:


typedef struct
{
  uint32_t TypeErase;   /*!< Mass erase or page erase.
                             This parameter can be a value of @ref FLASH_Type_Erase */
  uint32_t Banks;       /*!< Select bank to erase.
                             This parameter must be a value of @ref FLASH_Banks
                             (FLASH_BANK_BOTH should be used only for mass erase) */
  uint32_t Page;        /*!< Initial Flash page to erase when page erase is disabled
                             This parameter must be a value between 0 and (max number of pages in the bank - 1)
                             (eg : 255 for 1MB dual bank) */
  uint32_t NbPages;     /*!< Number of pages to be erased.
                             This parameter must be a value between 1 and (max number of pages in the bank - value of initial page)*/
} FLASH_EraseInitTypeDef;
@nimaltd
Copy link
Owner

nimaltd commented Oct 8, 2023

Please ensure your Selected MCU is Correct. It should be works

#elif _EE_PAGE_OR_SECTOR == PAGE_NUM
flashErase.NbPages = 1;
flashErase.Page = _EE_USE_FLASH_PAGE_OR_SECTOR;
flashErase.TypeErase = FLASH_TYPEERASE_PAGES;
#endif

@nimaltd
Copy link
Owner

nimaltd commented Mar 28, 2024

I have updated the LIB. please try again for any devices you have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants