Community
cancel
Showing results for 
Search instead for 
Did you mean: 
WONG
Novice
2,620 Views

Connect OpenOCD to Intel Galileo GEN1 board - "si" command didnt work as expected

There is strange thing is here :

EIP register is set to 0xc10094d1.

When I modify the opcode at the address 0xc10094d1 to 0xc10094d2 to 0x9090 (NOP, NOP) , and then issue a "si" ( single step – step one instruction exactly, the EIP jump from 0xc10094d1 to 0xc10094ef.

I expect it to jump from 0xc10094d1 to 0xc10094d2 but the system jump from 0xc10094d1 to 0xc10094ef.

Can anyone advice what is the problem here ?

Commmand :

  • - monitor mdw [addr] à read one byte opcode
  • - monitor mww [add] [val] -> write one byte opcode
  • - monitor reg ( dump all the registers in lakemont CPU )
  • - "si" command is single step

8 Replies
Sergio_A_Intel
Employee
47 Views

Hi,

Do you mind providing more information so we can try to replicate this issue?

OpenOCD version, gdb, OS running on your computer, JTAG probe, drivers, etc.

Sergio

WONG
Novice
47 Views

Hi ;

GDB version is 6.6

openOCD is 0.9.0 (2015-11-1)

OS running on the computer - Ubuntu 14.01 LTS

SD card is SanDisk Ultra PLUS 16GB

Debugger is Olimex ARM-USB-OCD-H

WONG
Novice
47 Views

Hi Sergio ;

Are you able to reproduce this issue ?? =P

Sergio_A_Intel
Employee
47 Views

We are still working to reproduce your issue. We'll post a reply soon.

Sergio

Sergio_A_Intel
Employee
47 Views

Did you build your own custom image, if so, what changes did you apply, what features have you added?

Did you modify the boot/grub/grub.conf, if so, what did you change?

Additionally what steps you followed that led you to this issue, did you follow any guides?

Finally, remember the user that the Quark Debug Operations guide states:

"EIP Management

The core automatically resets EIP after each instruction while in Probe Mode. This is done to prevent segment violations and triggering breakpoints while in Probe Mode"

Sergio

Sergio_A_Intel
Employee
47 Views

Additionally, have you made any rules in udev as mentioned in the Quark Source Debug using OpenOCD document?

Sergio

Sergio_A_Intel
Employee
47 Views

Have you had a chance to continue working with OpenOCD? Please provide the information requested on the previous reply.

Sergio

WONG
Novice
47 Views

Hi Sergio ;

Thanks or the reply here.

The problem that the "si" command didnt work is because the previous instruction before the EIP 0xc10094ef is "HLT" ( which is at EIP 0xc10094ee) and causing the CPU to stuck at this LIP when "si" command is sent to the OpenOCD.

Modify the HLT instruction at EIP 0xc10094ee to NOP then only load my assembly program at EIP 0xc10094ef, I able to get my assembly source executed.