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.

Hercules RM48x code samples

Other Parts Discussed in Thread: RM48L952, HALCOGEN

Hi,

I am new to the Hercules safety processor family, but am considering the RM48L952 chip for a new design. In my previous projects TI supplied lots of sample code with the MSP430 family of the processors that showed how the peripherals could be configured for various applications, complete with project build files for IAR & CCS. Is there a similar sample code available for the RM48x processor? I purchased the RM48 HDK assuming that it would contain such samples, but it comes with CCS & HALCoGen and little to no sample code.

Any help is appreciated,

Fred

  • The Halcogen tool delivers the examples in a different way.

    Start Halcogen and select "help" from the top menu. Select examples from the the help topics. Then you can find instructions about how build examples with the files provided.

    Thanks and regards,

    Zhaohong
  • Hi Zhaohong,

    The number of examples provided in Halcogen is a small fraction of the examples source codes provided in the MSP430. However, I did just as you said and followed the instructions to build the example_rti_blnki.c project in Haclcogen, for the RM48L952 MCU and then, generated code, and created a CCS project in that same directory. However, there were many compile errors along the way. (BTW, I have the latest Halcogen [04.04.00 03Apr2015] & CCS [6.1.0.00104 2014] versions).

    I have been able to resolve most of the other errors except for 18 compile errors (E0002) in the sys_core.asm which complain about missing VFP / NEON support for this one instruction as follows:

    fmxr fpexc, r2  "../source/sys_core.asm", ERROR! at line 107: [E0002] Instruction requires VFP or NEON support.

    AND

    fmdrr d0, r1, r1 "../source/sys_core.asm", ERROR! at line 110: [E0002] Instruction requires VFP support

    It is not obvious to me why floating point support is required for this blink LED example, or how it was requested in Halcogen, so I can turn it off. Other treads dating back to 2011, suggest that to resolve this error, the linker needs to use / point to the correct FP lib path, but I am getting this during the file compile. Furthermore, I'm not sure which lib is appropriate now for my MCU.

    Your help in resolving this problem is appreciated,

    Fred

  • Fred,
    Regarding VFP in HalCoGen - there is a checkbox for it on the RM48L952ZWT->R4-MPU-PMU tab, in the "Cortex R4" group.
    There are actually different versions of the EABI standard for float v.s. non-float and if you do enable the VFP then the registers need to be initialized to avoid possible core-compare errors - which is what HalCoGen is doing with those instructions in sys_core.asm. (CPU registers are not initialized by 'reset').
  • Thank you for the explanation Anthony. When compiled without the VFP flag, CCS compiles and downloads code successfully just as you explained.

    I still need to resolve the error with the VFP flag as I will be using FP math in my final product. can you help with that question too or is there a different group for VFP support?

    Fred

  • Fred,

    It sounds like you're building with the --float-support option set wrong (i.e. to something like 'fpalib' or something other than 'vfplib' or 'VFPv3D16".

    It may be easier to create a new project. If you select RM48L952 from the new project wizard under the 'Variant' you'll get a project setup for the floating point unit and you can simply import your code into this new project & it should build with the VFP option checked in HalCoGen.

    You could also try changing the options on your existing project - but if you're brand new to the tools this can be trickier than simply importing the sources into a clean project.