Keil Logo


Information in this article applies to:

  • C166 All Versions
  • C251 All Versions
  • C251 All Versions


When I debug my application in the µVision simulator I see a NOP instruction at address 0x0022. However, when I generate a HEX file and program it to an Flash ROM this NOP instruction is missing. It looks like the HEX file is incomplete. What can be the reason?


The HEX file only contains content for program space that is allocated in your application. Therefore, it is important that you refer to the MAP file (*.M51 for the BL51 linker, *.MAP for other linkers) of your application to be sure that all required memory space is properly allocated.

The MEMORY MAP OF MODULE section displays how memory is allocated. For example:

CODE    0000H     0003H     ABSOLUTE
CODE    0003H     001FH     UNIT         ?PR?MAIN?TEST
        0022H     0001H                  *** GAP ***
CODE    0023H     0003H     ABSOLUTE
CODE    0026H     035CH     UNIT         ?PR?PRINTF?PRINTF

As you can see from this example, there is no content for code address 0x0022. For this reason, no content will be output in the HEX file.

By default, µVision initializes all unused memory with 0. So, when you load this program into the µVision2 simulator you will see a NOP instruction at unused/unallocated memory addresses.


Last Reviewed: Thursday, May 6, 2004

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.