simbit18 commented on PR #17229:
URL: https://github.com/apache/nuttx/pull/17229#issuecomment-3448444579

   @erkan-vatan The chip supports MPU, so why isn't it enabled in the 
configuration?
   
   In this case, it might be better to proceed as follows:
   
   - enable CONFIG_ARM_MPU=y
     
https://github.com/t3gemstone/nuttx/blob/c0eedfef556bc709229b6624d3612f62c6ccee65/boards/arm/am67/t3-gem-o1/configs/nsh/defconfig
   
   - add in the CMakeLists.tx
    ```
    if(CONFIG_ARM_MPU OR CONFIG_BUILD_PROTECTED)
          list(APPEND SRCS arm_mpu.c)
      endif()
    ```
   
https://github.com/t3gemstone/nuttx/blob/c0eedfef556bc709229b6624d3612f62c6ccee65/arch/arm/src/armv7-r/CMakeLists.txt#L58
   
   - add in the  Make.defs
   
     ```
     ifneq ($(filter y,$(CONFIG_ARM_MPU) $(CONFIG_BUILD_PROTECTED)),)
        CMN_CSRCS += arm_mpu.c
     endif
     ```
    
https://github.com/t3gemstone/nuttx/blob/c0eedfef556bc709229b6624d3612f62c6ccee65/arch/arm/src/armv7-r/Make.defs#L49C1-L51C6
   
   
   - remove this in the CMakeLists.tx
   
     ```
     ../${ARCH_SUBDIR}/arm_mpu.c
     ```
   
https://github.com/t3gemstone/nuttx/blob/c0eedfef556bc709229b6624d3612f62c6ccee65/arch/arm/src/am67/CMakeLists.txt#L30
   
   
   - remove this   in the Make.defs
   
     ```
     CHIP_CSRCS += arm_mpu.c
     ```
   
https://github.com/t3gemstone/nuttx/blob/c0eedfef556bc709229b6624d3612f62c6ccee65/arch/arm/src/am67/Make.defs#L33C1-L33C24


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to