-
Notifications
You must be signed in to change notification settings - Fork 8k
nxp/s32k3: add C40 internal flash driver + MCUboot flow for MR-CANHUBK3 #97401
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
1c43b9b
ce92150
d01c6ab
38081d9
eea1be7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -118,3 +118,32 @@ choice FLASH_LOG_LEVEL_CHOICE | |||||||||||
endchoice | ||||||||||||
|
||||||||||||
endif # DT_HAS_NXP_IMX_FLEXSPI_ENABLED | ||||||||||||
|
||||||||||||
# MCUX C40 internal flash API shim (S32K3x) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
config FLASH_MCUX_C40_API | ||||||||||||
def_bool y | ||||||||||||
depends on SOC_SERIES_S32K3 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redundant with DT_HAS_NXP_S32K3X_C40_FLASH_ENABLED |
||||||||||||
depends on DT_HAS_NXP_S32K3X_C40_FLASH_ENABLED | ||||||||||||
select FLASH_HAS_DRIVER_ENABLED | ||||||||||||
select FLASH_HAS_EXPLICIT_ERASE | ||||||||||||
select FLASH_HAS_PAGE_LAYOUT | ||||||||||||
# C40 uses controller commands, not CPU stores to flash | ||||||||||||
# so we are not relaxing MPU for ROM writes. | ||||||||||||
# Relocate driver/HAL when XIP so erase/program run from SRAM: | ||||||||||||
imply CODE_DATA_RELOCATION if XIP | ||||||||||||
imply CODE_DATA_RELOCATION_SRAM if XIP | ||||||||||||
help | ||||||||||||
Enable the MCUX C40 internal flash API shim used on NXP S32K3x | ||||||||||||
(e.g. S32K344). Provides Zephyr flash driver glue for &flash0 using | ||||||||||||
the MCUX C40 HAL. Needed for FLASH_MAP/MCUboot on internal flash | ||||||||||||
Comment on lines
+136
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
# NXP MCUX C40 internal flash: optional protection pass at init | ||||||||||||
config FLASH_MCUX_C40_APPLY_PROTECTION | ||||||||||||
bool "Apply default protection windows (IVT/MCUboot) at init" | ||||||||||||
depends on FLASH_MCUX_C40_API | ||||||||||||
default y if XIP | ||||||||||||
help | ||||||||||||
When enabled, the driver locks/unlocks protection for well-known | ||||||||||||
regions derived from devicetree (e.g. ivt_header, ivt_pad, mcuboot) | ||||||||||||
during driver init. Useful on XIP systems to keep IVT/bootloader | ||||||||||||
areas read-only. Disable if your bootloader/policy manages this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake indent is 2 spaces