forked from Archive/PX4-Autopilot
Use NuttX MPU Reset (#18283)
* NuttX with MPU reset backports * Use NuttX MPU reset
This commit is contained in:
parent
8088c82b6a
commit
38e2e6a01f
|
@ -38,6 +38,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
@ -71,6 +72,7 @@ CONFIG_FS_FAT=y
|
|||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
|
@ -83,7 +85,6 @@ CONFIG_IDLETHREAD_STACKSIZE=750
|
|||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MMCSD=y
|
||||
|
|
|
@ -129,16 +129,6 @@ __EXPORT void board_on_reset(int status)
|
|||
************************************************************************************/
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
// clear all existing MPU configuration from bootloader
|
||||
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) {
|
||||
putreg32(region, MPU_RNR);
|
||||
putreg32(0, MPU_RBAR);
|
||||
putreg32(0, MPU_RASR);
|
||||
|
||||
// save
|
||||
putreg32(0, MPU_CTRL);
|
||||
}
|
||||
|
||||
/* Reset PWM first thing */
|
||||
board_on_reset(-1);
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
@ -71,6 +72,7 @@ CONFIG_FS_FAT=y
|
|||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
|
@ -83,7 +85,6 @@ CONFIG_IDLETHREAD_STACKSIZE=750
|
|||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MMCSD=y
|
||||
|
|
|
@ -129,16 +129,6 @@ __EXPORT void board_on_reset(int status)
|
|||
************************************************************************************/
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
// clear all existing MPU configuration from bootloader
|
||||
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) {
|
||||
putreg32(region, MPU_RNR);
|
||||
putreg32(0, MPU_RBAR);
|
||||
putreg32(0, MPU_RASR);
|
||||
|
||||
// save
|
||||
putreg32(0, MPU_CTRL);
|
||||
}
|
||||
|
||||
/* Reset PWM first thing */
|
||||
board_on_reset(-1);
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
|
|
@ -38,6 +38,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
|
|
@ -120,16 +120,6 @@ __EXPORT void board_on_reset(int status)
|
|||
************************************************************************************/
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
// clear all existing MPU configuration from bootloader
|
||||
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) {
|
||||
putreg32(region, MPU_RNR);
|
||||
putreg32(0, MPU_RBAR);
|
||||
putreg32(0, MPU_RASR);
|
||||
|
||||
// save
|
||||
putreg32(0, MPU_CTRL);
|
||||
}
|
||||
|
||||
/* Reset PWM first thing */
|
||||
board_on_reset(-1);
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
@ -72,6 +73,7 @@ CONFIG_FS_FAT=y
|
|||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
|
@ -84,7 +86,6 @@ CONFIG_IDLETHREAD_STACKSIZE=750
|
|||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MMCSD=y
|
||||
|
|
|
@ -162,16 +162,6 @@ __EXPORT void board_on_reset(int status)
|
|||
__EXPORT void
|
||||
stm32_boardinitialize(void)
|
||||
{
|
||||
// clear all existing MPU configuration from bootloader
|
||||
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) {
|
||||
putreg32(region, MPU_RNR);
|
||||
putreg32(0, MPU_RBAR);
|
||||
putreg32(0, MPU_RASR);
|
||||
|
||||
// save
|
||||
putreg32(0, MPU_CTRL);
|
||||
}
|
||||
|
||||
board_on_reset(-1); /* Reset PWM first thing */
|
||||
|
||||
/* configure LEDs */
|
||||
|
|
|
@ -38,6 +38,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
@ -73,6 +74,7 @@ CONFIG_FS_FAT=y
|
|||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
|
@ -85,7 +87,6 @@ CONFIG_IDLETHREAD_STACKSIZE=750
|
|||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MMCSD=y
|
||||
|
|
|
@ -123,16 +123,6 @@ __EXPORT void board_on_reset(int status)
|
|||
************************************************************************************/
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
// clear all existing MPU configuration from bootloader
|
||||
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) {
|
||||
putreg32(region, MPU_RNR);
|
||||
putreg32(0, MPU_RBAR);
|
||||
putreg32(0, MPU_RASR);
|
||||
|
||||
// save
|
||||
putreg32(0, MPU_CTRL);
|
||||
}
|
||||
|
||||
/* Reset PWM first thing */
|
||||
board_on_reset(-1);
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
@ -73,6 +74,7 @@ CONFIG_FS_FAT=y
|
|||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
|
@ -85,7 +87,6 @@ CONFIG_IDLETHREAD_STACKSIZE=750
|
|||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MMCSD=y
|
||||
|
|
|
@ -123,16 +123,6 @@ __EXPORT void board_on_reset(int status)
|
|||
************************************************************************************/
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
// clear all existing MPU configuration from bootloader
|
||||
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) {
|
||||
putreg32(region, MPU_RNR);
|
||||
putreg32(0, MPU_RBAR);
|
||||
putreg32(0, MPU_RASR);
|
||||
|
||||
// save
|
||||
putreg32(0, MPU_CTRL);
|
||||
}
|
||||
|
||||
/* Reset PWM first thing */
|
||||
board_on_reset(-1);
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ CONFIG_ARMV7M_DTCM=y
|
|||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
|
@ -71,6 +72,7 @@ CONFIG_FS_FAT=y
|
|||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
|
@ -83,7 +85,6 @@ CONFIG_IDLETHREAD_STACKSIZE=750
|
|||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MMCSD=y
|
||||
|
|
|
@ -123,16 +123,6 @@ __EXPORT void board_on_reset(int status)
|
|||
************************************************************************************/
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
// clear all existing MPU configuration from bootloader
|
||||
for (int region = 0; region < CONFIG_ARM_MPU_NREGIONS; region++) {
|
||||
putreg32(region, MPU_RNR);
|
||||
putreg32(0, MPU_RBAR);
|
||||
putreg32(0, MPU_RASR);
|
||||
|
||||
// save
|
||||
putreg32(0, MPU_CTRL);
|
||||
}
|
||||
|
||||
/* Reset PWM first thing */
|
||||
board_on_reset(-1);
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ca1938fbcccc1a0a3429b5d141a92324e790b025
|
||||
Subproject commit 769bc6a6c3209ab5f7a0bbf651f38dd0aea4f74b
|
Loading…
Reference in New Issue