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.

TMS320C66x_0: Error: Illegal opcode

Other Parts Discussed in Thread: MSP430F5438A

Hi,

 

I created a simple CSS simulation project just to create the Queue Manager using the C6678 Little Endain devices.

I build and debug the project with no errors. 

But However, after I load the program file and run, I get the error

TMS320C66x_0: Error: Illegal opcode (b5a975c6) at pc = 0x0000c9e4 Opcode exception at PC: 0xc9e4. Illegal opcode at pc = 0x0000c9e4 

 

Am new to CSS. Can anyone help?

  • Samuel,

    What silicon revision is your project building for?  If you check the project options there should be a setting for --silicon_revision or -mv.  It is listed under basic options and should be 6600 for a C6678.

    John

     

  • Am building for C6000

  • The basic options should look like this:

  • it does look like that.

  • Samuel,

    This error is coming from the simulator. The opcode b5a975c6 seems to be a valid instruction ( [!A2]  STDW.D2T2     B11:B10,*B10--[11]) and the PC (0x0000c9e4 ) corresponds to a reserved section in the memory map of C6678  device. But we do model the reserved section as memory in simulator. I am able to reproduce by writing the given opcode onto the given address in simulator. Have filed an internal issue no. SDSCM00042362 to analyse this issue. I will get back on the analysis.

    regards,

    Sheshadri

  • Samuel,

    Got a chance to relook at this and found that the opcode  b5a975c6 is not exactly correct for the instruction string displayed in disassenmbler window. When I gave the instruction string in disassembler for compilation, the generated opcode was B52975C6. As you can observe the 3rd nibble is different. Even though disassembly is showing some string, the simulator will not accept the instruction encoding and throws an error, which is appropriate.

    The confusion caused was because disassembler window shows a valid instruction string when the opcode was invalid.

    I am suspecting there may be an application error here which might have taken the execution into weeds and ended up in going to non text segments of the .out. check and confirm if  the address b5a975c6  belongs to a valida text segment in your application.

    regards,

    Sheshadri

     

     

     

     

  • I can confirm that SDSCM00042362 is a bug in the disassembler; the disassembler should reject that encoding. However, something else created the bad opcode, so a fix for SDSCM00042362 will not fix your problem.

  • Hi Sheshadri Chakravarthy,

                we are new to CCS, MSP430. Currently we are working on CCS V4.2, MSP430F5438A.

    We have a requirement of using interrupts and timers. Can we have timers running simultaneously with other code (we know Execution is serial). And as per the data sheet P1,  P2 have port interrupt option.  How to handle external interrupts. How to include interrupts in the code.

    Regards

    Chakradhar

  • Hello,

    I'm modifying an FFT algorithm code, but when I simulate the program, there came an illegal opcode error. how can I solve it? its been quite a long time since this post.

    Hope someone can help me.

    best regards, 

    Wendy

  • Hi Wendy.Z,

    I was also facing the same issue some time back. You need to allocate some larger size for stack in the C6000 linker basic options. If you are using dynamic memory allocation then you need increase the size for heap too. Thing is that your program memory is getting corrupted somehow and this is one of the reasons for that. I hope this resolves your problem.