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

AFX & HEX outputs are different

I have an application that, when loaded on to the device (via ULink or JLink) as a .axf file, works as expected. When the .hex output is used instead, the application fails to function.

Has anyone seen this before?
Is there anything in the project setup that I'm missing?

  • How are you generating the Hex file ?

    Basically.AXF is the executable file which contains the debug information and you can debug your source code.

    The HEX file is just the file contains the translation of your source code in HEX format.

  • It appears that the issue is with the optimisation level.
    -O3 AXF runs correctly, HEX doesn't
    -O2 AXF runs correctly, HEX does too.

  • Usually, when code stops working at higher optimisation levels, that indicates a flaw in the source code - relying upon something that should not be relied upon.

    But it doesn't explain why Hex & AXF should differ!

    Does it make any difference if you do a full chip erase before programming?

    You could try programming your chip using the AXF, then verifying against the Hex - and see if that shows up anything interesting ...

    Or, maybe, program from AXF and read-back; then program from HEX and read-back - and compare the two read-backs ...