This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR6989: __mpuseg and __mpusam definitions in the linker command file

Part Number: MSP430FR6989


In section 4.3.4, "Initialization of the FRAM Memory Protection Unit," on page 72 of the MSP430 Optimizing C/C++ Compiler Guide (SLAU132), it says

"If you want to manually adjust how the MPU is initialized you can modify the __mpuseg and __mpusam definitions in the linker command file."

I do not see those definitions in the linker file. Can somebody tell me why?

  • Perhaps Texas Instruments prefers that we use the project properties window to make those modifications, instead of directly in the linker file.

  • Hi Thomas,

    You are correct, using the CCS properties panel is going to be the easiest way to modify the MPU configuration. Under the hood this is getting passed to the compiler with these flags:

    --define=_MPU_ENABLE
    --define=_MPU_MANUAL
    --define=_MPU_SEGB1=0x4400
    --define=_MPU_SEGB2=0x4800
    --define=_MPU_SAM1=11
    --define=_MPU_SAM2=11
    --define=_MPU_SAM3=13
    --define=_MPU_SAM0=9

    I'm not sure why the __mpuseg and __mpusam references are missing for the .cmd file. Based on the compiler document "If you do not want the MPU initialized you can remove these definitions from the linker command file." This means that by default the MPU is not enabled.

    Regards,

    Evan

  • Evan: Thank you.

**Attention** This is a public forum