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.

MSP430F6749A: Code Composer Studio 12 showing incorrect MSP430 mnemonics in Disassembly View

Part Number: MSP430F6749A
Other Parts Discussed in Thread: CCSTUDIO

Tool/software:

Code Composer Studio v12.8.1.00005

Version: 12.8.0.202407141830
Build id: N202407141830

Compiler version: TI v20.2.5.LTS [TI v21.6.1.LTS]

The Disassembly view seems to be showing the wrong instruction mnemonics, eg.

_c_int00_noargs():
00c600: 0081 .word 0x0081
00c602: 5DC0 13B2 ADD.B R13,0xd9b6
111 if(_system_pre_init() != 0)
00c606: F6E8 930C AND.B @R6,0x930c(R8)
00c60a: 2402 JEQ ($C$L2)
114 _auto_init();
00c60c: 13B2 .word 0x13B2
00c60e: CFB8 430C BIC.W @R15+,0x430c(R8)
123 main(0);
00c612: 13B2 .word 0x13B2
00c614: D36C BIS.B #2,R12
125 exit(1);
00c616: 431C MOV.W #1,R12
00c618: 13B3 .word 0x13B3
00c61a: 1EF0 .word 0x1EF0

The above code as displayed in the Disassembly view, is from boot.c. Why is '0081' not displayed as 'MOVA __STACK_END, SP'? The next line '5DC0 13B2' should be decoded as 'CALLA #_system_pre_init'. And so on.

It seems the only correct instruction decoded is '00c616: 431C MOV.W #1.R12'

Why is the disassembly so different?

Is there any setting that could cause this incorrect display?

Thanks.

  • The disassembler doesn't appear to have gotten the news that this is code for the CPUX variant of the MSP430. On the basic MSP430 0x0081 is not a valid opcode so it gets displayed as a constant. Things go downhill from there.

  • OK, So how do i send the news to the disassembler that i'm using the CPUX variant?

    Thanks!

  • I use the GNU tools rather than CCS so can't help there. But from I see CSS uses the same .elf file format as GNU. That file includes this information. Or at least it does with GNU.

    $ /usr/ti/gcc/bin/msp430-elf-readelf -A a.out
    Attribute Section: mspabi
    File Attributes
      Tag_ISA: MSP430X
      Tag_Code_Model: Large
      Tag_Data_Model: Large
    Attribute Section: gnu
    File Attributes
      Tag_GNU_MSP430_Data_Region: Lower Region Only

  • Ok, i installed msp430-gcc from TI's website and got the following on the CCS linker output file:

    C:\...>msp430-elf-readelf.exe -A a.out
    ...
    Attribute Section: mspabi
    File Attributes
      Tag_ISA: MSP430X
      Tag_Code_Model: Large
      Tag_Data_Model: Large
      <unknown tag 10>: 1 (0x1)
    

    Looks like the output file is correct. Perhaps there is some bug in the CCS Disassemby viewer in detecting the CPU variant?

    Thanks.

  • Since you have the GNU tools, you can use msp430-elf-objdump to disassemble your code. The -S option interleaves your source code (if it hasn't been stripped out) with the output.

  • Thanks for the suggestion. CCS also provided a command line disassembler, dis430.exe, which worked correctly. Since i'm using the CCS GUI, it's more convenient if the CCS disassembly viewer in the GUI just work as intended.

    i guess the last resort is to just uninstall/re-install CCS and create the project again...

    i hope the CCS Team can take a look at this issue.

    Thanks again, David.

  • Hi,

    You can start a new thread and put CCSTUDIO as the part number. Then the CCS team will look into the thread.

    Best regards,
    Cash Hao

**Attention** This is a public forum