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.

how to add mpu function in ucos-ii

Other Parts Discussed in Thread: HALCOGEN

HI,
The uc/cos-II demo programm I dowanloaded  from micrium can work crectlly ,in order to make sure the Async EMIF can be used correctly, MPU function must be added(http://e2e.ti.com/support/microcontrollers/hercules/f/312/t/188446.aspx),its code is as follows in sys_startup.c: 

void _c_int00()
{
/* Enable VFP Unit */
#if (__TI_VFPV3D16_SUPPORT__ == 1)
_coreEnableVfp_();
#endif

/* Initialize Core Registers */
_coreInitRegisters_();

/* Initialize Stack Pointers */
_coreInitStackPointer_();

/* Enable IRQ offset via Vic controller */
#if 0
_coreEnableIrqVicOffset_();
#endif

_mpuInit_();
_mpuEnable_();

/* Initialize System */
systemInit();

When i debug new code,it can't work properly. 

Any help please? 

In addition the version of uC/OS-II demo programm I dowanloaded from micrium is too old.

Thanks


  • Xin,

    I can confirm that the uC/OS-II port to Hercules is indeed old - it's imported code from HalCoGen 1.xx and the latest HalCoGen is 3.0.8 which you can tell means there are significant additional functionalities added.

    We are discussing with Micrium to get the port updated but at this time I really would recommend you use FreeRTOS that is included with HalCoGen if you are able to - in order to get the functionality that you want.  It will probably take some time to get the uC/OS-II port updated... And we really can't help you with making your own customizations to uC/OS-II here.  (If you want help doing this, then I think you need to go to Micrium). 

    The FreeRTOS port in HalCoGen fully supports the MPU and not only for the reason talked about in the errata, it also supports a task model where you can set individual tasks to run either in User or Privilege mode, and you can customize the MPU settings per task so that you can restrict the memory each task can access and protect one task from other tasks...  This is quite a lot of value IMO.

     

  • Hi Anthony,

    Thanks for taking the time to respond to me.

    I will consider your suggestion,The FreeRTOS is not popular in CHINA,Maybe I need to take some time to relearn if use FreeRTOS.

    Where can I get help about  FreeRTOS?

    Regards

  • Hi Xin,

    www.freertos.org

    I think you'll find it pretty comparable.  There is also a migration from FreeRTOS to SafeRTOS that you can make, where SafeRTOS is a product of Wittenstein.