address increments within disassembly window [6.0.1882]

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

my problem occurs in a debug session of a correctly compiled C project running on a real controller hardware (connected via AvrDragon and JTAG).

When choose the "data IRAM" scope within the memory view, the difference between every two addresses is always one byte (8bit):

data 0x0100  70 72 65 73 73 20 3c 53 50 41 43 45 3e 20 74 6f
data 0x0110  20 63 6f 6e 74 69 6e 75 65 00 .. .. .. .. .. ..

This corresponds to the address increment usage for the .data section within the project's map file. When I choose the "prog FLASH" scope within the memory view, the addresses increment in the same way (corresponding to the .text section of the map file.

But in the disassembly window ("Show addresses" is enabled), the addresses increment every WORD (16bit), which creates some extra calculation to match the addresses between "prog FLASH" memory view and disassembly window.

Does anybody know the place for this kind of disassembly window settings? Or is this a program bug?

Thanks.
Peter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no bug. Atmel display flash with a "word view" because the minimum granularity (shortest opcodes) in flash is 16 bits. It's also why you will find byte-wise data held in PROGMEM padded at the end to a 16 bit boundary,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
There is no bug. Atmel display flash with a "word view" because the minimum granularity (shortest opcodes) in flash is 16 bits. It's also why you will find byte-wise data held in PROGMEM padded at the end to a 16 bit boundary

Ok, thanks. The padding is logical, then, when considering the program memory with 16bit wide granularity. But why can't I re-configure the disassembly window or the other views to show addresses of 16bit wide data correspondingly? Why do I have to multiply the addresses I see within the disassembly window with 2 in order to get to the "right" address values used by the memory window or the MAP file?

Is there any possibility to solve this discrepancy or is it just somethink I have to keep in mind when using AtmelStudio?