-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 support for flash controller with XIP on i.MX RT series #33701
Add support for flash controller with XIP on i.MX RT series #33701
Conversation
53b9242
to
0fbf6da
Compare
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.
Thank you for the contribution!
0fbf6da
to
6d9538f
Compare
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
6d9538f
to
3ff2b05
Compare
757ae96
to
5d56a7c
Compare
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.
With some hacky changes to move the storage partition, I was able to confirm that samples/subsys/fs/littlefs
can now work on the mimxrt1064_evk
internal flash:
diff --git a/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts b/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts
index 13e0399c7d..03c86766c9 100644
--- a/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts
+++ b/boards/arm/mimxrt1064_evk/mimxrt1064_evk.dts
@@ -152,14 +152,30 @@ arduino_i2c: &lpi2c1 {};
#address-cells = <1>;
#size-cells = <1>;
- storage_partition: partition@0 {
- label = "storage";
+ partition@0 {
reg = <0x00000000 DT_SIZE_M(8)>;
};
};
};
};
+&flexspi2 {
+ status = "okay";
+};
+
+&w25q32jvwj0 {
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ storage_partition: partition@14000 {
+ label = "storage";
+ reg = <0x00014000 DT_SIZE_K(32)>;
+ };
+ };
+};
+
&lpuart1 {
status = "okay";
current-speed = <115200>;
Please rebase |
5be15af
to
9d3aa70
Compare
aafd2f3
to
0252785
Compare
This change allows writing to the flash while running in XIP mode, and enables mcuboot or NVS settings to be used on i.MX RT socs. Signed-off-by: Pieter De Gendt <[email protected]>
The bootloader application itself should contain the IVT/DCD in the header, but the chainable application doesn't. The ROM_START_OFFSET defaults to 0x400 otherwise the linker alignment isn't taken into account. Signed-off-by: Pieter De Gendt <[email protected]>
This allows signing the binary for use with mcuboot Signed-off-by: Pieter De Gendt <[email protected]>
This fixes a bug in the write function of the MCUX FlexSPI flash driver if the length of the data is larger than a single page. Signed-off-by: Pieter De Gendt <[email protected]>
0252785
to
c0e7fa2
Compare
This feature prevents issues when trying to write data to the flash device that is located on or addressed at the same flash device. An example is the mcuboot logic that writes a magic number to the secondary partition header. Signed-off-by: Pieter De Gendt <[email protected]>
c0e7fa2
to
37a441a
Compare
This change allows writing to the flash while running in XIP mode, and enables
mcuboot
or NVS settings to be used on i.MX RT socs with a single flash chip.The bootloader application itself should contain the IVT/DCD in the header, but the chainable application doesn't.
The ROM_START_OFFSET defaults to 0x400 otherwise the linker alignment isn't taken into account.
It is required when running with XIP to enable code relocation, because accessing the flash needs to run in RAM.
Tested on i.MX RT1064 internal flash