ARM-USB-OCD-H and eclipse error dgb --version

Started by cusna, September 25, 2013, 05:13:45 PM

Previous topic - Next topic

cusna

Hello,
I just bought the jtag in question to debug a processor STM32F4x.
the jtag is seen by the launch of the eclipse but I debug this error:
"Error while launching command: gdb --version"
It 's the first time I use with the JTAG debugger in eclipse and I have no experience!
Thanks un advance.

LubOlimex

#1
Hello cusna,

Do you use the Eclipse Olimex distributes? I mean the one that might be found here: https://www.olimex.com/Products/ARM/JTAG/_resources/OpenOCD/.

There are two things that usually are hard to figure out when using it for first time:

1. The whole package should be installed to a location containing no "space" character in its name (e.g. "Program Files" doesn't work). This is a problem with the compiler - it cannot be found in a path with a "space".

2. When you have opened the project for your board make sure you have opened at least one of the source files that it contains AND you have placed your mouse pointer somewhere in the code. This is required since Eclipse can't detect which project is highlighted.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

cusna

Thanks for response.
That problem is solved. error in the path
of "arm-none-eabi-gdb.exe." But now I get these errors, as if the jtag is not able to write to the processor:


target remote localhost:3333
0x00000000 in ?? ()
monitor reset halt
JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
Invalid ACK 0 in JTAG-DP transaction


in procedure 'reset'
stm32f4x.cpu -- clearing lockup after double fault
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08024064 msp: 0x20020000
Polling target stm32f4x.cpu failed, GDB will be halted. Polling again in 100ms
monitor wait_halt
Polling target stm32f4x.cpu succeeded again
monitor sleep 100
monitor poll
background polling: on
TAP: stm32f4x.cpu (enabled)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08024064 msp: 0x20020000
monitor flash protect 0 0 11 off
cleared protection for sectors 0 through 11 on flash bank 0
monitor flash erase_sector 0 0 11
stm32x device protected
failed erasing sectors 0 to 11
monitor flash write_image "C:/vr-universal-ide/workspaces/UF4_AP/vrbrain/Acopter32-STM32F4/build/laserlab_MP32V1F4.elf" 0 elf
flash write algorithm aborted by target
error executing stm32x flash write algorithm
flash memory write protected
flash write failed = 00000010
error writing to flash at address 0x08000000 at offset 0x00000000
in procedure 'flash'
monitor sleep 200
symbol-file  build/laserlab_MP32V1F4.elf
monitor soft_reset_halt
requesting target halt and executing a soft reset
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x01000000 pc: 0x08024064 msp: 0x20020000
monitor wait_halt
monitor poll
background polling: on
TAP: stm32f4x.cpu (enabled)
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x01000000 pc: 0x08024064 msp: 0x20020000
set breakpoint auto-hw off
set can-use-hw-watchpoints 0
info breakpoint
Num     Type           Disp Enb Address    What
1       breakpoint     del  y   0x0804aefc in main() at ./ArduCopter/ArduCopter.pde:2327
continue
warning: cannot set software breakpoint at readonly address 0x804aefc


LubOlimex

Hey cusna,

Which board are you using? Is it Olimex made? What exactly is your processor?

If not using Olimex board you would need to add a proper board configuration and adjust the project and the makefiles probably.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

cusna

I use custom board with STM32F407.
I put a configuration file (name: project.cfg) in the project directory that contains:

# Find the board config file in the scripts/board/  directory

gdb_memory_map enable
gdb_flash_program enable

source [find scripts/board/olimex_stm32_e407.cfg]


if I understand your question ...
Thanks

LubOlimex

Hello cusna,

As far as I see the board and the debugger connect fine.

The problem comes at a later stage... The code you are trying to use is custom... You need to create own makefile. There are a lot of documents how a project should be created under Ecliplse + Yagart + OpenOCD. This matter had been discussed a lot of times in this forum also. It is not possible to grab any project and try to compile it in this IDE without any modifications.

You are trying to program C:/vr-universal-ide/workspaces/UF4_AP/vrbrain/Acopter32-STM32F4/build/laserlab_MP32V1F4.elf.

I recommend you to start with a simple connection via OpenOCD with the board and the debugger (without any Eclipse and Yagarto involved). You need just the OpenOCD (you can use the 0.6.1 version in the Olimex ODS install folders or download the latest one from Freddie Chopin's web site - version 0.7.0). Then please follow this guide: https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_PROGRAMMER.pdf or via telnet connection: https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_TELNET.pdf.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex