Page 1 of 1

Debug halt from command line?

PostPosted: Fri Aug 28, 2015 3:57 pm
by markd
I'm trying to put the Epiphany chip into a debug halt state using e-write, and it doesn't seem to be working.

If I understand correctly, writing a one to E_REG_DEBUGCMD should work
e-write 0 0 0xf0448 1

And then the E_REG_DEBUGSTATUS register should reflect that with a 1 in bit 0. But it returns 0 instead:

parallella@parallella:~$ e-read 0 0 0xf040c
[0x000f040c] = 0x00000000

(I had written an infinite loop and run it on core 0 0 prior to trying the debug break)

Also using e-read on almost any register returns 0 (including E_REG_PC) while running an example

I'm running ubuntu-14.04-headless-z7010-20150130.1.img

Re: Debug halt from command line?

PostPosted: Fri Aug 28, 2015 4:39 pm
by sebraa
In my C code, I do:
Code: Select all
uint32_t cmd = 0x1;
e_write(dev, i, j, E_REG_DEBUGCMD, &cmd, sizeof(uint32_t));

to stop the core (i, j are the core coordinates), which works.

Check your constants and make sure that the e-write command line tool actually does that, too.
I have to admit that I never used these tools.