cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to CPU Registers using MACROs IAR EW C-Spy Debugger and ST-link

kirem
Associate II
Posted on December 26, 2014 at 00:39

Dear All,

I'm interested to know if anyone knows a way of writing to CPU registers using MACROs in IAR EW C-Spy Debugger and ST-LINK.

I've read the documentation and searched around for an answer. Seems such a simple task.

Thanks,

Kirem
3 REPLIES 3
Posted on December 26, 2014 at 01:24

Presumably something like R1=0x11223344; doesn't work?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
kirem
Associate II
Posted on December 26, 2014 at 16:11

Hi Clive,

I was looking for a way to change the program counter in the execUserReset() {} macro.

There are the obvious memory read and write macros but I can't see anything for registers. I don't know if this is a limitation of the st-link API. There are some additional macros for the j-link interface that aren't supported on the st-link. 

Thanks, Kirem

kirem
Associate II
Posted on December 26, 2014 at 16:25

Hi Clive,

Just to add that memory accesses are through inbuilt macros. I will check if your suggestion works.

Thanks, Kirem