JTAG write to Node Config registers?

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

Hi Steve,

Yep, like that. Note you can simply use getps() instead
of read_pswitch_reg() to get at the debug scratch regs.

The point of swapping code in is so it works with any
program loaded (if any at all!)

The point of swapping the original code back of course
is that it wouldn't be very social to just overwrite random
pieces of memory ;-)

This also neatly sidesteps all of your 1), 2), 3). I'd write
the code in assembler, something like program-sregs-tramp.s
in my JTAG tools. It needs no stack -- well it doesn't return
as-is, but you can shuffle LR around a bit, or something :-)