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

C51/V6.22 OPTIMIZING-PROBLEM

We currently use the µVision 1 environment includig C51/V5.xx.

We now want to update to µVision-2 / C51 V6.22.

Cause we want to be sure the new version works without any problems we are currently testing the new version before using it for our developments.

The import-feature of µV-2 works proper, but when we want to use the new optimizing-levels 7, 8 and 9 of the compiler, the code would be compiled without an error but doesn't work correctly.

When limiting the optimizing-level to 6, also µV-2 will produce "working" code.

Has anybody made similar experiences?
Are there any known bugs in version 6.22?

Best regards
Andy

Parents
  • "compiled without an error but doesn't work correctly."

    What precisely do you mean by, "doesn't work correctly?"

    Have you examined the generated code to see what's going on, or tried it in the simulator?

    Have you checked carefully for situations requiring the volatile qualifier?

    Note that each optimisation level includes all previous levels; so, as it starts to go "wrong" at level 7, I'd start looking there.
    The manual describes Level 7 thus:

    "Extended Index Access Optimizing: Uses the DPTR for register variables where appropriate. Pointer and array access are optimized for both execution speed and code size."

    Do you have any code (especially assembler) which might be "confused" by this use of the DPTR?
    Check the generated assembler.

Reply
  • "compiled without an error but doesn't work correctly."

    What precisely do you mean by, "doesn't work correctly?"

    Have you examined the generated code to see what's going on, or tried it in the simulator?

    Have you checked carefully for situations requiring the volatile qualifier?

    Note that each optimisation level includes all previous levels; so, as it starts to go "wrong" at level 7, I'd start looking there.
    The manual describes Level 7 thus:

    "Extended Index Access Optimizing: Uses the DPTR for register variables where appropriate. Pointer and array access are optimized for both execution speed and code size."

    Do you have any code (especially assembler) which might be "confused" by this use of the DPTR?
    Check the generated assembler.

Children
No data