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

How to control disassembly mode in uVision IDE ?

Hi,

How can I force the disassembly mode in uVision ?

e.g. If the code I'm currently looking at is in THUMB mode, but I want to look at code at another address (which I know is in ARM mode), how can I tell the disassembler this ?

It often gets it wrong, and I end up with displays like this :-

0x00000000  FFFE      (???)
0x00000002  EAFF      ???
0x00000004  F018      (???)
0x00000006  E59F      B         0xFFFFFB48
0x00000008  F018      (???)
0x0000000A  E59F      B         0xFFFFFB4C
0x0000000C  F018      (???)
0x0000000E  E59F      B         0xFFFFFB50
0x00000010  F018      (???)
0x00000012  E59F      B         0xFFFFFB54
0x00000014  0000      LSL       R0,R0,#0
0x00000016  E1A0      B         0x0000035A
0x00000018  FFF0      (???)
0x0000001A  E51F      B         0xFFFFFA5C
0x0000001C  135E      ASR       R6,R3,#13
0x0000001E  EA00      ???
0x00000020  0000      LSL       R0,R0,#0

If there is currently no way to do this, can I suggest an optional ",A" or ",T" parameter to the address specified in the "Show Code At Address" dialog ?

Regards,

David

  • uVision normally derrives the code attributes (ARM/Thumb) while loading the .axf (RVCT) or .elf (GNU) file which is a elf/dwarf formatted file.

    Currently there is no way to specify the mode for disassembly for those code ranges without an attribute. Disassembly can even get more worse in case of constants or trampolines within/around the code leading to nonsense output, most likely.

    Did you load a hex file, or is there another reason for the code ranges without specific attributes ?

  • You are correct that the image was programmed from a hex file.

    I have a (USB-capable) BootLoader which downloads an application image and writes it to FLASH. On startup, the BootLoader verifies the image (via CRC) and transfers control to it.

    I can debug the application using uVision, but if I want to look at code in the BootLoader (or vector table) while debugging the applicationj, I come across this problem.

    Is there any way to load symbolic information for more than one executable image (assuming of course that they are at different addresses) into uVision ?

    My usual solution to this problem is to set a breakpoint in an interrupt handler (so that I know I am in ARM mode) and then disassemble the relevant area so that it is shown properly. This works, but is convoluted and clumsy.

    I'm sure this is not an uncommon requirement.

    Can I request that Keil consider implemeting a mechanism that allows the user to decide whether the diassembled code is interpreted as being in ARM or THUMB mode ?

    Thanks,

    David.

  • Is there any way to load symbolic information for more than one executable image (assuming of course that they are at different addresses) into uVision ?

    This might solve your problem: there is a way to load multiple files without killing the previously loaded debug info:

      LOAD whatever.axf INCREMENTAL
    

    For the first file that is loaded, INCREMENTAL is not necessary, for every following file (e.g. loaded via .ini file or somehow else) 'INCREMENTAL' is required to avoid killing all the debug and instruction coloring info collected by previous loads.