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.

MPU configuration of TMS570LS0332 in HALCOGEN

Other Parts Discussed in Thread: HALCOGEN, TMS570LS0332, TMS570LC4357, TMS570LS0232

Hi,

I am trying to configure the MPU of TMS570LS0332 in HALCOGEN.  I do not see the following lines of code in sys_startup.c file in the generated code even though i enabled the MPU in R4-MPU_PMU tab of HALCOGEN.  

#include "sys_mpu.h"

/* MPU initialisation as per the HALCoGen GUI */

_mpuInit_();

Please find the attached file for R4-MPU_PMU tab settings of HALCOGEN.

Thanks in advance.

Best Regards,

Sreekanth Reddy Challa

 

  • The code is in the file sys_mpu.asm.
  • Bob Crosby said:
    The code is in the file sys_mpu.asm.

    I think this query was about if the _mpuInit_() function gets called in the HALCoGen generated code for _c_int00() or not.

    E.g. with HALCoGen 04.05.02 found that:

    1) When create a project for a RM46L852PGE on the "R4-MPU-PMU" tab the MPU is enabled by default. However, the _mpuInit_()  function isn't called by the HALCoGen generated code for  _c_int00() in sys_startup.c

    2) When create a project for a TMS570LC4357 on the "R5-MPU-PMU" tab the MPU is enabled by default. The _mpuInit_()  function is called by the HALCoGen generated code for  _c_int00() in HL_sys_startup.c

    Is it intentional that for Cortex-R4 devices HALCoGen has the MPU enabled by default on the "R4-MPU-PMU" tab, but omits to automatically call the  _mpuInit_()  function during the system startup?

    I wasn't sure if the reason _mpuInit_()  function get called automatically during system startup for the Cortex-R5 devices was tied into the use of the processor caches.

  • Hi Chester Gillon

    We are using HALCoGen 04.05.02.  This is not same for 2 Cortex-R4 devices as well.

    We have another HALCoGen project for TMS570LS0232 in which the mpuInit_()  function is called by the HALCoGen generated code.  TMS570LS0232  and TMS570LS0332  are  Cortex-R4 devices with change in flash size.

    Thanks & Best Regards,

    Sreekanth Reddy challa