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.

HALCOGEN: Disabling MPU not possible in HALCoGen on TMS570LC43 when using FreeRTOS

Part Number: HALCOGEN

When creating a HALCoGen project for the TMS570LC43 (and maybe others, I did not check that), there are two options

  • without FreeRTOS
  • withFreeRTOS

If one creates a project without FreeRTOS it is possible to

  • uncheck  the Enable MPU and
  • disable all MPU regions (see first screenshot).

If one creates a project with FreeRTOS it is possible

  • to uncheck  the Enable MPU
  • but not possible to disable all MPU regions (see second screenshot).

The MPU regions 1-4 are sill selected. Why is it not possible to globally disbale MPU when FreeRTOS is used?

Screenshot 1: Without FreeRTOS MPU can be completely disabled Screenshot 2: With FreeRTOS MPU can NOT be completely disabled

  • Generating code with FreeRTOS, but without checking Enable MPU this leads to code, that does not initalize the MPU:

    In HL_sys_mpu.asm the code part that enables the MPU is completed removed. This code is missing:

            ; Enable mpu
            mrc   p15, #0, r0, c1, c0, #0
            orr   r0,  r0, #1
            dsb
            mcr   p15, #0, r0, c1, c0, #0
            isb

    If the MPU is disabled (or not enabled), why is there a configuration forcing to enable MPU regions?

    And one gets the impression when reading FreeRTOS on Hercules Decives Application Report Table 1 that these regions and the MPU must be enabled. But there seems to be no reason that it should not work without MPU.

    Could you please also clarify that?

  • Hello,

    For freeRTOS example, it is allowed to configure MPU settings in HALCoGen. You have to modify the code manually.

  • "For freeRTOS example, it is allowed to configure MPU settings in HALCoGen". Could yopu please clarify what this means? In HALCoGen it is no possible to fully disable all MPU settings as the two screenshots show.

    • Is it possible, to have FreeRTOS running on TMS570LC43xx without MPU (meaning manually removed PMU Code from HALCoGen generated sources)?
    • Is it possible, to have FreeRTOS running on TMS570LC43xx without MPU (meaning manually removed PMU Code from HALCoGen generated Sources) but cache enabled?

  • In freeRTOS mode, the MPU is not configurable. If you want to change the MPU settings, you need to change the c code manually.  

  • Please refer to this application note (and included code example CCS project):

    www.ti.com/.../spna177.pdf

    A link to the CCS project is included in the document.