Hot!MPLAB X IDE editor does not recognize MULW instruction

Author
theozo
Starting Member
  • Total Posts : 27
  • Reward points : 0
  • Joined: 2015/03/15 02:30:18
  • Location: Hungary
  • Status: offline
2017/08/12 01:57:42 (permalink)
0

MPLAB X IDE editor does not recognize MULW instruction

Hi!
It seems to be just a cosmetical issue, but MPLAB X IDE editor does not recognize the MULW instruction, so when I type it it does not change color like any other asm instructions do, however the compiler does not generate any error on it. In other hand MUL.W instruction get coloured as an instruction, but generates error at build.
I am using XC16 toolchain, the target device is a member of dsPIC33E family, the MPLAB X IDE version is v3.51, the XC16 version is  1.3.
I was wondering if it is depending on the project properities, did I set up something wrong?
#1

8 Replies Related Threads

    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 1035
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/12 06:23:46 (permalink)
    0
    You are missing the sign types.
    ie.
     
    mulw.uu w0,w2,w6
     
    There is no mul.w instruction.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #2
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 1035
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/12 07:03:37 (permalink)
    0
    If you plan on making your library to use on dspic33f then mul with word destination is not in the instruction set, only dspic33e.
     
    You have to be careful when writing for both chips.
     
     

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #3
    theozo
    Starting Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2015/03/15 02:30:18
    • Location: Hungary
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/12 12:50:23 (permalink)
    +1 (1)
    It does not get recognized even with .UU, .SU, .SS as well. And yes, the MUL.W does not exist, that's why it looks pretty weird.
    This never going to be a library, functions are too specific, and I guess the compiler have to generate errors anyway.
    #4
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 1035
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/12 13:29:58 (permalink)
    0
    It should work.
     
    The assembler should know that you have extended instructions.
    You have the correct chip installed?

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #5
    theozo
    Starting Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2015/03/15 02:30:18
    • Location: Hungary
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/13 07:23:06 (permalink)
    0
    Yes it is correct. I debug the code on harware with ICD 3 without problem.
    That's why I assume something wrong with the editor, maybe some setup I do not know about. Or bug...?
    #6
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 1035
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/13 10:10:38 (permalink)
    +1 (1)
    Possibly a bug, I get quite a few with the assembler where accumulator B becomes highlighted the same color as an opcode/mnenonic.  Still works ok.
     
    As long as it assembles.
    Have you tried changing the assembly colors? btw, sometimes they don't work in assembler.
    I've had the directives not change color.  You have to close all files then re-open.
     
    I also get the comment error where if I click on the comment icon instead of ';'
    I get "# " hash and space.  It still works but numbers inside the "# ", causes syntax errors.
    If I uncoment '#' is removed but the space remains.
     
    This tends to happen when more than 1 file is open in separate windows.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #7
    RISC
    Super Member
    • Total Posts : 4229
    • Reward points : 0
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/13 11:30:46 (permalink)
    +1 (1)
    Hi,
    The MPLAB X (NETBEANS) editor is primarily tuned to recognize C language.
    It could be that the editor does not recognize some instructions but the only important point is that they are recognized by the assembler (compiler) correctly which is most probably the case...
    So please compile the project and tell us if you have assembly errors.
    I have used the XC16 assembler since many years including some specific MAC instructions and I never found any issue with assembly instructions when assembling them.
    Make sure to read the dsPIC Programmers Reference Manual for the correct instructions syntax
    Regards
     
    #8
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 1035
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: MPLAB X IDE editor does not recognize MULW instruction 2017/08/13 13:33:12 (permalink)
    +1 (1)
    I can confirm the same problem.
    The extended instructions do not show the correct colors for mnemonics.
     
    Also the dsp accumulator color bug but now it is working ok but I know it will be back.
    Earlier on accumulator B was the same color as an opcode.
     
    It still assembles ok.
     
    Still the annoying comment bug.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #9
    Jump to:
    © 2017 APG vNext Commercial Version 4.5