mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
bootloader: Set first partition's region as executable.
If the first partition has a valid leave region, leave it as executable as it's typically used for the bootloader itself. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
parent
557d293538
commit
0bcef07794
@ -100,7 +100,9 @@ __weak void port_mpu_init(void) {
|
|||||||
|
|
||||||
// Configure read-only MPU regions for boot partitions.
|
// Configure read-only MPU regions for boot partitions.
|
||||||
for (size_t i = 0; i < OMV_BOOT_PARTITIONS_COUNT; i++) {
|
for (size_t i = 0; i < OMV_BOOT_PARTITIONS_COUNT; i++) {
|
||||||
port_mpu_config(&OMV_BOOT_PARTITIONS[i], 1, 1, 1);
|
// Note first region is the bootloader's partition,
|
||||||
|
// which normally needs to be executable.
|
||||||
|
port_mpu_config(&OMV_BOOT_PARTITIONS[i], 1, 1, (i == 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user