Olimex ARM-USB-OCD-H + OpenOCD + Intel Galileo Quark real mode debugging

Started by tcp7628, July 15, 2016, 11:44:29 AM

Previous topic - Next topic

tcp7628

I got a technical problem when using the Olimex ARM-USB-OCD-H with Intel Galileo Board. 

                  Platform: Windows 7 / Windows 10 / Ubuntu
                  Board : Intel Galileo Gen 1
                  Software: OpenOCD-0.9.0-rc1 (From Olimex website) / GNU gdb (GDB) 7.6.1


We have modified the Intel Galileo (Quark processor) firmware, so that it can operate in real mode instead of protected mode. 

We used Olimex ARM-USB-OCD-H, OpenOCD and gdb for debugging, it works well in the protected mode but got the following errors in real mode.

C:\Users\tcp7628\Desktop>cd C:\Users\tcp7628\Desktop\OpenOCD-OLIMEX-WINDOWS\open
ocd-0.9.0-rc1\bin-x64

C:\Users\tcp7628\Desktop\OpenOCD-OLIMEX-WINDOWS\openocd-0.9.0-rc1\bin-x64>openoc
d.exe -f ./interface/ftdi/olimex-arm-usb-ocd-h.cfg -f ./target/quark_x10xx.cfg
Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 6000 kHz
Info : auto-selecting first available session transport "jtag". To override use
'transport select <transport>'.
Info : clock speed 6000 kHz
Info : JTAG tap: quark_x10xx.cltap tap/device found: 0x0e681013 (mfg: 0x009, par
t: 0xe681, ver: 0x0)
enabling core tap
Info : JTAG tap: quark_x10xx.cpu enabled
Info : accepting 'gdb' connection on tcp/3333

Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: target running, halt it first
Error: x86_32_common_read_memory invalid params count=0x1, buf=00000000007fb7f0,
addr=0x00000000
Error: target running, halt it first
Error: x86_32_common_read_memory invalid params count=0x1, buf=00000000007fb7f0,
addr=0x00000000
Error: target running, halt it first
Error: x86_32_common_read_memory invalid params count=0x1, buf=00000000007fb7f0,
addr=0x00000000
Error: target running, halt it first
Error: x86_32_common_read_memory invalid params count=0x1, buf=00000000007fb7f0,
addr=0x00000000
Error: target running, halt it first
Error: x86_32_common_read_memory invalid params count=0x1, buf=00000000007fb7f0,
addr=0x00000000
Error: target running, halt it first
Error: x86_32_common_read_memory invalid params count=0x1, buf=00000000007fb7f0,
addr=0x00000000
Error: enter_probemode PM enter error, tapstatus = 0x40000010



Is it I did something wrongly? :o
Or the Olimex ARM-USB-OCD-H and OpenOCD cannot debug x86 CPU in real mode? 

Thank you.


JohnS

It's telling you to halt the board.

If you think you have then maybe it's an OpenOCD bug in which case your log tells you what to do.

John

tcp7628

Hi John,

Thanks for your quick reply.

The GDB shows the following error when I try to halt the board.

GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
0x00000000 in ?? ()

(gdb) monitor halt
enter_probemode PM enter error, tapstatus = 0x40000010

(gdb) monitor resume
target running, halt it first

(gdb) monitor halt
lakemont_halt target not running



Thanks!

tcp7628

JohnS

Doesn't look to be an Olimex problem.  Try other forums/etc.

John

tcp7628

Hi John,

I will ask on other forum too.

Thanks for your suggestion!

tcp7628