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

Different .HEX code when Assembler SRC is selected C51 V6.10

Is there a bug? I have a well debugged and tested C program, that works fine with a normal compile. (Optimization Level 8, emphasis on code size ) It does not work correct when I enable the Assembler SRC generation and assemble the SRC files.

The bytes of code generated are exactly the same, but a comparison of the 2 resultant *.HEX files shows some differences. The differences occur near the beginning of the .hex file, and then the files are identical for the rest of the 3600+ bytes. Can anyone help?

Parents
  • Thanks all for your help. I believe the problem is a compiler bug (V6.10) and not my program. For the curious, the function is

    void myFunc( unsigned char, unsigned char, unsigned char, unsigned int );
    The unsigned int is not retrieved correctly in myFunc when .SRC generation is enabled.

    To work around the problem I have had to leave .SRC generation OFF in general. If I want a function with inline assembler, I put it into a seperate code module, and enable .SRC generation for just that module. Then I do an extra testing step that makes sure the paramaters are being passed correctly. Then I write code.

    Is there a place on this site where Keil posts the known bugs in their current and past releases?

Reply
  • Thanks all for your help. I believe the problem is a compiler bug (V6.10) and not my program. For the curious, the function is

    void myFunc( unsigned char, unsigned char, unsigned char, unsigned int );
    The unsigned int is not retrieved correctly in myFunc when .SRC generation is enabled.

    To work around the problem I have had to leave .SRC generation OFF in general. If I want a function with inline assembler, I put it into a seperate code module, and enable .SRC generation for just that module. Then I do an extra testing step that makes sure the paramaters are being passed correctly. Then I write code.

    Is there a place on this site where Keil posts the known bugs in their current and past releases?

Children