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

Add subfamilly distinction to ARMV7M family #269

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

gerard5
Copy link
Contributor

@gerard5 gerard5 commented Jul 12, 2023

Description

On armv7m, the main development is focused on two i.MX RT processor subfamilies, i.e. IMXRT10XX, IMXRT1176, and ST STM32L4.

There are differences in the set of header files due to differences in functionality. This requires a way to distinguish at the build stage from which subfamily to assign the appropriate header file with platform definitions. This change adds such distinction to Makefile and CFLAGS.

Motivation and Context

Fixes included wrong header file if libphoenix is built to target imxrt1176.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: imxrt1176-nil, imxrt1064-bes.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

@gerard5 gerard5 self-assigned this Jul 12, 2023
@gerard5 gerard5 marked this pull request as ready for review July 12, 2023 07:17
@gerard5 gerard5 requested a review from agkaminski July 12, 2023 07:23
agkaminski
agkaminski previously approved these changes Jul 12, 2023
Copy link
Member

@nalajcie nalajcie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea (for now or for the future): maybe it's worth to make it a phoenix-rtos-build feature (with sensible prefix - like CPU_*, TARGET_* or something similar) - I see it's a third / fourth place it's being done in sub-component so maybe we can refactor it? (phoenix-rtos-devices/_targets/Makefile.armv7m7-imxrt106x, plo/devices/flash-flexspi/Makefile, phoenix-rtos-filesystems/_targets/Makefile.armv7m7-imxrt106x - and phoenix-rtos-build/Makefile.armv7m but enabled just for kernel?)

arch/armv7m/Makefile Outdated Show resolved Hide resolved
@gerard5
Copy link
Contributor Author

gerard5 commented Jul 12, 2023

Idea (for now or for the future): maybe it's worth to make it a phoenix-rtos-build feature (with sensible prefix - like CPU_, TARGET_ or something similar) - I see it's a third / fourth place it's being done in sub-component so maybe we can refactor it? (phoenix-rtos-devices/_targets/Makefile.armv7m7-imxrt106x, plo/devices/flash-flexspi/Makefile, phoenix-rtos-filesystems/_targets/Makefile.armv7m7-imxrt106x - and phoenix-rtos-build/Makefile.armv7m but enabled just for kernel?)

The availability of TARGET_* from phoenix-rtos-build sounds best to me. I'll try to implement this modification in phoenix-rtos-build right away.

Update: added PR phoenix-rtos/phoenix-rtos-build#145 and changed this one to depend on the mentioned PR.

@gerard5 gerard5 marked this pull request as draft July 12, 2023 09:08
agkaminski
agkaminski previously approved these changes Jul 12, 2023
nalajcie
nalajcie previously approved these changes Jul 12, 2023
Fixes the availability of proper pctl definitions
for the subfamily the project will be built for.

JIRA: NIL-436
@gerard5 gerard5 dismissed stale reviews from nalajcie and agkaminski via 627ef23 July 12, 2023 14:26
@gerard5 gerard5 marked this pull request as ready for review July 12, 2023 14:28
@gerard5 gerard5 merged commit d26c40e into master Jul 12, 2023
24 checks passed
@gerard5 gerard5 deleted the gerard5/NIL-436 branch July 12, 2023 14:39
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

Successfully merging this pull request may close these issues.

4 participants