Another example, we use MPU to protect the code section for NOXIP case
in the flat mode.

On Sat, Mar 21, 2020 at 5:41 AM David Sidrane <david.sidr...@nscdg.com> wrote:
>
> > the error will crop back up if MPU support is enabled without also
> > performing a protected build since up_mpu.c is only included in a
> > protected build.
>
> Just a heads up there are some case on some HW (imxrt, maybe the K66 for the
> DMA) were the MPU is needed to enable the proper access but not in protected
> build.
>
> ifeq ($(CONFIG_ARM_MPU),y)
>   ifneq ($(CONFIG_BUILD_PROTECTED),y)
> CMN_CSRCS += up_mpu.c
>   endif
> CHIP_CSRCS += imxrt_mpuinit.c
>   ifeq ($(CONFIG_BUILD_PROTECTED),y)
> CHIP_CSRCS += imxrt_userspace.c
>   endif
> endif
>
> -----Original Message-----
> From: John Rippetoe [mailto:jrippe...@roboticresearch.com]
> Sent: Friday, March 20, 2020 2:09 PM
> To: dev@nuttx.apache.org
> Subject: Re: Build errors with inline functions
>
> I think at a minimum, we need to conditionally include mpu.h only when
> the MPU support is actually needed. Options for that are CONFIG_ARM_MPU,
> CONFIG_ARCH_USE_MPU, or CONFIG_BUILD_PROTECTED. If we use either of the
> first two, the error will crop back up if MPU support is enabled without
> also performing a protected build since up_mpu.c is only included in a
> protected build. I know that it is possible to enable MPU support
> without performing a protected build, but is there any use case for
> this? If not, it seems odd that these would be separate options. But if
> there is, then we need to figure out how to get the build to compile in
> that scenario. That might be as simple as including up_mpu.c whenever
> MPU support is enabled as opposed to only doing so when a protected
> build is requested. Someone with more knowledge on how these two
> features interact would be a better source of info on that than I am.
>
> On 3/20/20 11:21 AM, Gregory Nutt wrote:
> >
> >> If we want to support the compiler which don't support inline, it's
> >> better that:
> >> 1.Remove CONFIG_HAVE_INLINE from include/nuttx/compiler.h
> >> 2.Convert inline fucntion to macro to normal function
> >> It isn't hard to fix because grep just can find inline about 100 times.
> > There are inline functions in common C files which are not a problem
> > because we have the definitions in compiler.h.  The use in header
> > files is causing all of the problems.
> CONFIDENTIALITY NOTICE: This communication may contain private, confidential
> and privileged material for the sole use of the intended recipient. If you
> are not the intended recipient, please delete this e-mail and any
> attachments permanently.

Reply via email to