SAMd21 how to modify register values??

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

I'm clickin' but it ain't happenin'

With AVRs I can change (at least I could) the register values by clicking on the register and enter a new value for it, can't do it with the SAM chip. Or is this one of those "improved" things in AS7?

 

 

 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

So I found an answer but that's not what I want to hear sad if they cannot be modified from the register view can they be modified from elsewhere? A watch? I tried and failed with that too.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Having a break (and a beer) from gardening. I can change registers with AVRs via the watch view, not as easy/convenient as AS4 but can be done. Not possible with ARMs?

 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

That'll teach me asking the hard questions! No one knows out of 60+ people. Or is the question too simple to deserve an answer?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I don't know the answer.  I did a bit of searching to see if setting the registers is one of the standard capabilities of JTAG debugging on ARM, but I couldn't find anything ("register" being too broad a term.)

 

I'll note that a software-based debugger (gdb-hook and similar) never has a problem changing registers, since it's really changing the values in memory locations that will be restored to the registers when the debug stub is done.  But I don't think that that's particularly helpful!

 

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

What build of Studio are you running? I just tested the old one - build 1188 and it works just fine. Both register view and Processor status allow to change the registers.

Edit: uhhhhh, register view seems to be broken when debugging asm files, processor status works though. Go to Debug->Windows->Processor view
Edit2: too late at night... both ways work for me.

Last Edited: Tue. Mar 21, 2017 - 10:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using Version: 7.0.1188 (like you?) and I can't click on the registers in registers view as in #1. Inputting R00 (or others) in Watch like I'm doing with the AVR shows VOID in both Value and Type fields.
 

 

By the way I'm using the Xplained board for the D21 with EDGB, just in case it makes a difference.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

It's not an ASM file, the screen is the disassembly view of the compiled  C file.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Tue. Mar 21, 2017 - 10:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm also using an XPRO that should be fine. Can you try marking the nibble you want to change(as in clicking left of it and keeping it pressed while doing the marking) and then type the desired value?

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

Processor status works for changing resisters, thank you, so at least I have a way of doing it.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

as in clicking left of it and keeping it pressed while doing the marking

Not good. I can do the marking but can't change the value.

 

oops closed the old register view and reopened and now sort of works, at times I can do 2 bytes at times just 1 byte.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly