AVR Debugger question- Up/Download Memory

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

Hi all,

I am currently working in a project in which I want to get an array value to the host machine I am working in.
I tried to send the array through USART using hapsim but it seems to struggle at the middle of the loop probably because the array is 1024 bytes long.

Next I tried the function available in AVRStudio 4 debug menu "Up/Download" memory. there I could write the array to a hex file.

But the problem is when I compare the file in HxD hex editor and the AVRStudio watch window the array indexes has different values.

As per a suggestion given in the thread I tried to copy different areas of memory but none gave me the expected result.

https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=122573

the array is used for 128*64 lcd driver and is defined as,

uint8_t lcd_buf[DISPLAY_W*DISPLAY_H/8];

and according to the watch window has the address of 0x09E7,

Processor used is Atmega 64.

I have attached the watch window screen shot and 2 hex files I have got.

Can anybody give any hand on achieving this task.

Thanks much.

Attachment(s): 

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

Quote:

but it seems to struggle at the middle of the loop probably because the array is 1024 bytes long.

Tell us more about "struggle"

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

Hi Clawson,

Thanks for replying.. but actually I stopped trying that method to capture..

Quote:

I tried to send the array through USART using hapsim but it seems to struggle at the middle of the loop probably because the array is 1024 bytes long.

by struggle I mean the hapsim stopped working time to time in the middle of the routine so I ended up with wrong result and it was a pain to collect the info in that way.

I am actually interested in dumping this variable in AVR to a file in host machine with the Up/Download method in AVRstudio4..

Anyway thanks much for the reply..

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

Hi all,

I found the answer.. Just posting it here because somebody finding the same topic will get benefit out of this.

the problem I faced with came from the Hex editor.. for example if the hex byte is 0xCA then in hex editor 2 nibbles are shown as 3C 3C. (Dont know why. obviously there should be a reason behind it)

I found the format in wiki
http://en.wikipedia.org/wiki/Int...

and when opened and manipulated as a text file (could easily do even with excel) the problem diapered.

Thanks.

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

Quote:

obviously there should be a reason behind it)

Two possibilities:

1) It might be interpreting the data as some format such as UTF8

2) It's a bug