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.

TMS320F28035: 2 coff files are not same as the PREAD command

Part Number: TMS320F28035


2 same project on 2 PCs, using the same compiler V6.4.2, get the different COFF file because the  PREAD command.

 check the asm file, the different statement is as below:

003f7bbc a8a9 MOVL ACC, XAR4
003f7bbd 8141 ADD ACC, *-SP[1]
003f7bbe 8aa9 MOVL XAR4, ACC
003f7bbf 24c4 PREAD *+XAR4[0], *XAR7
003f7bc0 0a41 INC *-SP[1]
003f7bc1 9241 MOV AL, *-SP[1]
003f7bc2 5204 CMPB AL, #0x4
003f7bc3 56c4 BF -16, LT
003f7bc4 fff0

and

003f7bbc a8a9 MOVL ACC, XAR4
003f7bbd 8141 ADD ACC, *-SP[1]
003f7bbe 8aa9 MOVL XAR4, ACC
003f7bbf 92c7 MOV AL, *+XAR7[0]
003f7bc0 96c4 MOV *+XAR4[0], AL
003f7bc1 0a41 INC *-SP[1]
003f7bc2 9241 MOV AL, *-SP[1]
003f7bc3 5204 CMPB AL, #0x4
003f7bc4 56c4 BF -17, LT
003f7bc5 ffef

hope to be same as the below one, don't want to use 'PREAD', how to solve it?

 thanks!

  • I'm not certain, but I suspect the first bit of code uses compiler option --unified_memory, and the second one does not.  Compare the compiler build options.  Is this the case?

    Thanks and regards,

    -George

  • George,

    Thanks for your answer.

    The problem of 'PREAD' is solved by cancelling the compiler option --unified_memory, but the other difference is appear.

    The code is as below:

    3f7bb3: $C$L3:
    003f7bb3 5d41 MOVZ AR5, *-SP[1]
    003f7bb4 8f3e MOVL XAR4, #0x3e800a
    003f7bb5 800a
    003f7bb6 a8a9 MOVL ACC, XAR4
    003f7bb7 dd02 ADDB XAR5, #2
    003f7bb8 81a5 ADD ACC, AR5
    003f7bb9 8aa9 MOVL XAR4, ACC
    003f7bba 88c4 MOVZ AR6, *+XAR4[0]
    003f7bbb 8f00 MOVL XAR4, #0x0007da
    003f7bbc 07da
    003f7bbd a8a9 MOVL ACC, XAR4
    003f7bbe 8141 ADD ACC, *-SP[1]
    003f7bbf 8aa9 MOVL XAR4, ACC
    003f7bc0 7ec4 MOV *+XAR4[0], AR6
    003f7bc1 0a41 INC *-SP[1]
    003f7bc2 9241 MOV AL, *-SP[1]
    003f7bc3 5204 CMPB AL, #0x4
    003f7bc4 56c4 BF -17, LT
    003f7bc5 ffef

    The original code is:

    3f7bb3: $C$L3:
    003f7bb3 8f3e MOVL XAR4, #0x3e800a
    003f7bb4 800a
    003f7bb5 a8a9 MOVL ACC, XAR4
    003f7bb6 5c41 MOVZ AR4, *-SP[1]
    003f7bb7 dc02 ADDB XAR4, #2
    003f7bb8 81a4 ADD ACC, AR4
    003f7bb9 1ea7 MOVL XAR7, ACC
    003f7bba 8f00 MOVL XAR4, #0x0007da
    003f7bbb 07da
    003f7bbc a8a9 MOVL ACC, XAR4
    003f7bbd 8141 ADD ACC, *-SP[1]
    003f7bbe 8aa9 MOVL XAR4, ACC
    003f7bbf 92c7 MOV AL, *+XAR7[0]
    003f7bc0 96c4 MOV *+XAR4[0], AL
    003f7bc1 0a41 INC *-SP[1]
    003f7bc2 9241 MOV AL, *-SP[1]
    003f7bc3 5204 CMPB AL, #0x4
    003f7bc4 56c4 BF -17, LT
    003f7bc5 ffef

    Is it caused by any other compiler option?

    Best regards!

  • To get the same output from the compiler, many things have to exactly match.  This includes the compiler version, and all the build options.

    Thanks and regards,

    -George