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.

TMS570LC4357: How to enable the FPU

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

I am trying to perform the fastest math operations possible (of course). The datasheet states an FPU is available, but the arm_math.h (from the sample code) relies on a defined "FPU_PRESENT". Is it as simple as defining FPU_PRESENT, or must I change the float_point support in the Properties->Processor options? Note I tried changing from VFPv3D16 to FPv4SPD16 but it states my target processor (7R4) is incorrect.

Thanks,

Jim

  • I had a look at a project for a TMS570LC4357 that was created with using HALCoGen 04.07.01 and TI ARM compiler v20.2.5, and using hardware floating point instructions.

    In HALCoGen had selected "Enable Vectored Floating Point Unit":

    With the above, the HALCoGen created startup function _coreInitRegisters_ in HL_sys_core.asm is enabling the FPU by granting Privileged and User mode access in the Coprocessor Access Control Register (CPACR), and setting the EN bit in the Floating-Point Exception Register (FPEXC):

            mrc   p15,     #0x00,      r2,       c1, c0, #0x02
            orr   r2,      r2,         #0xF00000
            mcr   p15,     #0x00,      r2,       c1, c0, #0x02
            mov   r2,      #0x40000000
            fmxr  fpexc,   r2

    The Processor Options in the CCS project were:

    Edit: Corrected the screenshot of the Processor Options to be for the TI ARM, rather than TI Clang compiler

  • Chester, 

    Sorry it took me a while to get back to this. I am also using HalCoGen 4.07.01, ARM compiler 20.2.5LTS, and CCS 10.2.0, but my Processor Options dialog looks different than yours. I cannot fully read your options, as the resolution of the screen-shot to too low to zoom in on, but I can see that you have 6 options on your dialog – mine only has 3.

    It looks like your first selection is “Select ARM architecture variant” – I don’t have that selection. Here are my 3 Processor Options and the settings:

    Target Processor version: 7R4

    Designate code state: 32

    Specify floating point: VFPvD16

    I did notice you did not include “LTS” in your compiler version. Is there an LTS and non-LTS version? Other than that, do you know why I would have different selections?

    Thanks,

    Jim

  • Never mind; the email I received had your previous Processor Options screen-shot, and I see your corrected version. I updated my processor-version to 7R5 as per your settings.