Multiple definitions warning for PAGESIZE
I am getting a multiple definitions warning when compiling due to Inc/Legacy/stm32_hal_legacy.h redefining PAGESIZE, which is already defined in limits.h (in the RTEMS lib). I am using STM32H7xx specifically, but this issue appears to affect all of the STM32 HALs.
arm-rtems4.11/include/limits.h line 445
#define PAGESIZE (1<<12) |
STM32H7xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
| #define PAGESIZE FLASH_PAGE_SIZE |
When searching I found some corespondents about a pull-request on the stm32f4x HAL to remove this definition from the HAL.
https://www.mail-archive.com/devel@rtems.org/msg28694.html
From what I can tell this definition doesn't get used anywhere, and I don't see any reason why the HAL should be redefining something that is already defined by the compiler. Just like the person that created that pull request, I also tried simply removing the PAGESIZE definition from stm32_hal_legacy.h and didn't have any issues recompiling.
Am I missing something here? Is there a reason this is being redefined, or is this possibly just an oversight?
