This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CX51 using EMOV instruction on non- MX cored device

I'm currently running a SiLabs C8051F336 processor using the CX51 compiler. I'm getting and illegal op-code (A5-the EMOV instruction) when I compile the following line:

*string = map_char_to_index(*string, font);

this get compiled as

        ; SOURCE LINE # 77
001E AD00        R     MOV     R5,font
0020 120000      R     LCALL   _map_char_to_index
0023 AB00        R     MOV     R3,string
0025 AA00        R     MOV     R2,string+01H
0027 A900        R     MOV     R1,string+02H
0029 EF                MOV     A,R7
002A A558              EMOV    @PR0,A


Any ideas as to why that instruction is implemented on a non MX core, and non Phillips device? How do I disable it?

Parents
  • Okay, sorry that was my bad on using the CX51 compiler.

    I have switched to the C51 compiler and the LX51 linker, which I believe is correct. However, I'm still running into problems now.

    1) I am using userclasses in my project, following is the C code

    #pragma userclass (code = SERVO)
    

    I'm not getting any compiler errors/warnings.

    Then I link with the following option

    LX51 ... CLASSES ( CODE_SERVO (C:0x600 - C:0x3A00) )
    


    And I get the error

    *** WARNING L47: NO SEGMENTS ASSIGNED TO USER CLASS
        CLASS:   CODE_SERVO
    


    Any suggestions?

    2) Upon downloading using the SILabs IDE, it crashes when processing OMF file. I realize this isn't a Keil product, but has anyone seen or dealt with this issue?

    Thanks,
    Steve

Reply
  • Okay, sorry that was my bad on using the CX51 compiler.

    I have switched to the C51 compiler and the LX51 linker, which I believe is correct. However, I'm still running into problems now.

    1) I am using userclasses in my project, following is the C code

    #pragma userclass (code = SERVO)
    

    I'm not getting any compiler errors/warnings.

    Then I link with the following option

    LX51 ... CLASSES ( CODE_SERVO (C:0x600 - C:0x3A00) )
    


    And I get the error

    *** WARNING L47: NO SEGMENTS ASSIGNED TO USER CLASS
        CLASS:   CODE_SERVO
    


    Any suggestions?

    2) Upon downloading using the SILabs IDE, it crashes when processing OMF file. I realize this isn't a Keil product, but has anyone seen or dealt with this issue?

    Thanks,
    Steve

Children