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

west.yml: stm32: Remove PAGESIZE definition #74428

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

erwango
Copy link
Member

@erwango erwango commented Jun 17, 2024

PAGESIZE definition from legacy.h conflicts with POSIX definition. Since this definition comes from legacy.h file which is only there for Cube backward compatibility that we don't maintain in Zephyr, simply remove it.

Note:
This is a second fix for #73363 which wasn't sufficiently tested. Legacy file is included in stm32yyxx_hal_def.h headers and actually removing it generates build errors as we're relying on some of the definitions. Removing this inclusion is necessary and will be done but on next release.

Fixes #73896

@zephyrbot zephyrbot added the size: XS A PR changing only a single line of code label Jun 17, 2024
@zephyrbot
Copy link
Collaborator

zephyrbot commented Jun 17, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_stm32 zephyrproject-rtos/hal_stm32@6443e5c zephyrproject-rtos/hal_stm32@855f195 (main) zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_stm32 DNM This PR should not be merged (Do Not Merge) labels Jun 17, 2024
PAGESIZE definition from legacy.h conflicts with POSIX definition.
Since this definition comes from legacy.h file which is only there
for Cube backward compatibility that we don't maintain in Zephyr,
simply remove it.

Note:
This is a second fix for zephyrproject-rtos#73363 which wasn't sufficiently tested.
Legacy file is included in stm32yyxx_hal_def.h headers and actually
removing it generates build errors as we're relying on some of the
definitions. Removing this inclusion is necessary and will be done
but on next release.

Signed-off-by: Erwan Gouriou <[email protected]>
@besmarsh
Copy link
Contributor

I just found the same PAGESIZE issue and found a different fix before finding this PR (and #73363, #73896, #70136). I created issue #74623 and PR #74624 with a fix that doesn't require any changes to the STM32 HAL and additionally makes the _SC_PAGESIZE/_SC_PAGE_SIZE options more consistent.

@nashif nashif added this to the v3.7.0 milestone Jun 20, 2024
@nashif nashif merged commit e1b13b6 into zephyrproject-rtos:main Jun 21, 2024
24 of 25 checks passed
besmarsh added a commit to besmarsh/zephyr that referenced this pull request Jun 25, 2024
The POSIX macros ATEXIT_MAX, PAGE_SIZE, and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

This commit defines ATEXIT_MAX, PAGE_SIZE, and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
besmarsh added a commit to besmarsh/zephyr that referenced this pull request Jul 8, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE, and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
besmarsh added a commit to besmarsh/zephyr that referenced this pull request Jul 8, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
aescolar pushed a commit that referenced this pull request Jul 10, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See #74623 and #74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
AlienSarlak pushed a commit to AlienSarlak/zephyr that referenced this pull request Jul 13, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
CZKikin pushed a commit to nxp-upstream/zephyr that referenced this pull request Jul 18, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
Devansh0210 pushed a commit to Devansh0210/zephyr that referenced this pull request Jul 20, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
Thalley pushed a commit to Thalley/zephyr that referenced this pull request Aug 1, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

Signed-off-by: Ben Marsh <[email protected]>
Chenhongren pushed a commit to Chenhongren/zephyr that referenced this pull request Aug 26, 2024
The POSIX macros PAGE_SIZE and PAGESIZE (queriable through
sysconf()) were conditionally defined only if an existing definition
did not already exist. These should be defined unconditionally in their
header to ensure they get the correct values.

If these macros are defined elsewhere with a different meaning, that's a
problem. There was an issue where PAGESIZE was already defined with a
different meaning. See zephyrproject-rtos#74623 and zephyrproject-rtos#74428.

The POSIX macro ATEXIT_MAX is also conditionally defined and should be
unconditionally defined, but there is currently a definition in picolibc
(picolibc/newlib/libc/include/stdlib.h) so this change will be done
separately.

This commit defines PAGE_SIZE and PAGESIZE unconditionally.

(cherry picked from commit 8c0d3de)

Original-Signed-off-by: Ben Marsh <[email protected]>
GitOrigin-RevId: 8c0d3de
Change-Id: Icb9ff7549525906d976333b9327e3b7dd42975b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5692888
Tested-by: ChromeOS Prod (Robot) <[email protected]>
Tested-by: Keith Short <[email protected]>
Reviewed-by: Keith Short <[email protected]>
Commit-Queue: Keith Short <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manifest manifest-hal_stm32 size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FLASH_PAGE_SIZE on stm32h5
5 participants