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.

Compiler Errors [E0002] and [E0004]

Other Parts Discussed in Thread: HALCOGEN

 

Hello,

Im working with TMS570LS controller and  TI v4.9.0 compiler.

I generated  startup code from Halcogen.While compiling the startup code i got the below  assembly errors.

1) For the below instruction in sys_core.asm

 .arm

Error--[E0002]  Illegal Cortex-M instruction/directive

2) For the below instructions in sys_core.asm

mrs r1, cpsr

msr spsr_cxsf, r1

Error--[E0004]---Status register unsupported by this architecture.

3)For the below instruction in sys_core.asm

cps #17

Error--[E0002] Illegal Cortex-M instruction/directive

4)For the below instruction in sys_core.asm

fmxr  fpexc,   r2

Error--[E0002]Instruction requires VFP or NEON support

5)For the below instruction in sys_core.asm

fmdrr d1,         r1,     r1

Error--[E0002] Instruction requires VFP support

 

Please help me

Regards,

Silpa M.

  • We compiler experts are not familiar with the Halcogen tool.  I'll move this thread to the TMS570 forum.

    Thanks and regards,

    -George

  • Hello,

    Based on the error messages I suspect you are using the wrong command line for the compiler.  The error message indicates you are trying to compile for Cortex M3 and without floating point support.  The command line for the compiler should respect both the proper Cortex R4 architecture (-mv7R4) and presence of FPU (-vfpv3D16).  

    Regards,

    Karl

  • Thank you Mr.KGreb...

    One more compiler error im facing in my code in Intvecs.asm

    Instruction--->ldr pc,[pc,#-0x1b0] ; [KEEP 32-BIT INS]

    Error---> [E0200] Offset out of range, must be [-255,4095]

    Regards,

    Silpa M

  • Silpa,

    The Intvecs.asm routine has to be compiled in ARM mode (32bit)
    Please check the option for this file.

    If your project is compiled for thumb2 mode (16 bit) you have to make an exception for this file.

    In CCS project, you can right click on this source code and specify this option. (see screen shot)

    Regards,

    Jean-Marc