Debug programmed code without loading new code.

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

I'm trying to debug an issue that I'm pretty sure is a result of having a wrong (inconsistent) value of a symbolic constant defined.

 

The relevant code is:

 

#define TRIGGER_ADDR {0xe7,0xE8, 0xD7, 0xD5, 0xAF};
uint8_t trigger_addr[5] =  TRIGGER_ADDR;

 

The value of TRIGGER_ADDR is different for every unique chip.  I want to know what's programmed in a specific chip, using the Atmel ICE and Studio 6.

 

Is it possible?

 

When I debug using debugwire, I know Studio first reprograms the device.

 

I don't know where to look for assembly code that initializes the global array trigger_addr or how to use the .lss, .map, or other compiler generated file to figure out the memory location of the trigger_addr[5] array.  Maybe if I could figure that out, I use the Studio 6 debugger to figure out what's being loaded to that address?

 

Or, is there no way to use Studio 6 and Atmel Ice to debug without first clobbering whatever has previously been programmed?

 

Thanks!

 

 

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

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

Was just going to post that I figured out attach works, then do a reset.

 

Thanks!
 

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

Wow, never noticed that! Could have used it dozens of times in the last few months.

 

Thanks, Morten

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net