Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#54 Define complete set of access permissions for MPU port

open
nobody
None
5
2012-03-31
2012-03-31
Anonymous
No

Cortex-M3 MPU, memory regions.
Not all access permissions combinations can be achieved from defined macros in MPU port. For example, I have to define additionally 0x2 value (priveleged read/write and unpriveleged read-only).

Discussion

  • Freddie Chopin
    Freddie Chopin
    2012-06-29

    A small patch as my proposal:

    Index: portmacro.h

    --- portmacro.h (revision 1751)
    +++ portmacro.h (working copy)
    @@ -104,6 +104,8 @@
    #define portUSING_MPU_WRAPPERS 1
    #define portPRIVILEGE_BIT ( 0x80000000UL )

    +#define portMPU_REGION_NO_ACCESS ( 0x00UL << 24UL )
    +#define portMPU_REGION_READ_ONLY_PRIVILEGED_READ_WRITE ( 0x02UL << 24UL )
    #define portMPU_REGION_READ_WRITE ( 0x03UL << 24UL )
    #define portMPU_REGION_PRIVILEGED_READ_ONLY ( 0x05UL << 24UL )
    #define portMPU_REGION_READ_ONLY ( 0x06UL << 24UL )