Hello,
MCUXpresso SDK 2.2 has a bug in the MMU configuration of read-only access permissions. The fix is:
diff --git a/src/cpu/cortexa/core_ca7.h b/src/cpu/cortexa/core_ca7.h
index 4e3a347..b9982c9 100644
--- a/src/cpu/cortexa/core_ca7.h
+++ b/src/cpu/cortexa/core_ca7.h
@@ -1033,7 +1033,7 @@ FORCEDINLINE __STATIC_INLINE void MMU_ConfigPage(uint32_t *L1Table, uint32_t *L2
(Attr->notExec ? 1UL : 0) | /* XN */
(((Attr->type >> 2) & 7UL) << 6) | /* TEX */
((Attr->type & 3UL) << 2) | /* C,B */
- ((Attr->accessPerm & 4UL) << 9) | /* AP[2] */
+ ((Attr->accessPerm & 4UL) ? (1UL << 9) : 0 ) | /* AP[2] */
((Attr->accessPerm & 3UL) << 4) | /* AP[1:0] */
2UL; /* Small Page */
@@ -1068,7 +1068,7 @@ FORCEDINLINE __STATIC_INLINE void MMU_ConfigLargePage(uint32_t *L1Table, uint32_
(Attr->notExec ? (1UL << 15) : 0) | /* XN */
(((Attr->type >> 2) & 7UL) << 12) | /* TEX */
((Attr->type & 3UL) << 2) | /* C,B */
- ((Attr->accessPerm & 4UL) << 9) | /* AP[2] */
+ ((Attr->accessPerm & 4UL) ? (1UL << 9) : 0 ) | /* AP[2] */
((Attr->accessPerm & 3UL) << 4) | /* AP[1:0] */
1UL; /* Large Page */
@@ -1104,7 +1104,7 @@ FORCEDINLINE __STATIC_INLINE void MMU_ConfigSection(uint32_t *L1Table, const voi
(((Attr->type >> 2) & 7UL) << 12) | /* TEX */
((Attr->type & 3UL) << 2) | /* C,B */
((Attr->domain & 15UL) << 5) | /* Domain */
- ((Attr->accessPerm & 4UL) << 15) | /* AP[2] */
+ ((Attr->accessPerm & 4UL) ? (1UL << 15) : 0 ) | /* AP[2] */
((Attr->accessPerm & 3UL) << 10) | /* AP[1:0] */
2UL; /* Section */
@@ -1125,7 +1125,7 @@ FORCEDINLINE __STATIC_INLINE void MMU_ConfigSuperSection(uint32_t *L1Table, cons
(((Attr->type >> 2) & 7UL) << 12) | /* TEX */
((Attr->type & 3UL) << 2) | /* C,B */
/* Supersection has fixed domain 0 */
- ((Attr->accessPerm & 4UL) << 15) | /* AP[2] */
+ ((Attr->accessPerm & 4UL) ? (1UL << 15) : 0 ) | /* AP[2] */
((Attr->accessPerm & 3UL) << 10) | /* AP[1:0] */
2; /* Section */
Is there a newer SDK version I should be using with i.MX6ULL?
Thanks.
Hello!
NXP appreciates your collaboration.
The last release of the SDK was 2.2, we do not have a new one.
Best regards!