From: Kiwamu O. <ki...@de...> - 2014-11-12 11:15:39
|
Hi Paul, On Thu, Nov 6, 2014 at 5:29 PM, Paul Fertser <fer...@gm...> wrote: >> $ arm-none-eabi-gdb build/hacker-emblem.elf >> (gdb) tar ext :3333 >> Remote debugging using :3333 >> reset () at sys.c:699 >> 699 asm volatile ("cpsid i\n\t" /* Mask all interrupts. */ > > That means you've successfully connected and control the target equipment. > >> (gdb) c >> Continuing. >> jtag status contains invalid mode value - communication failure >> Polling target stm32f0x.cpu failed, GDB will be halted. Polling again in 100ms > > This means you let the firmware run and shortly after that the > firmware is either remapping the SWD pins or switching to some > extremely low frequency or entering some power saving mode, so the > debugger can no longer access the target at all. > > So far everything seems normal, and you should also be able to do > "load" to reflash new firmware etc. Thank's. I can load firmware on gdb! However, the board does not run with gdb's continue command... I'm using following firmware running on my STM32F030F4P6 board. http://git.gniibe.org/gitweb/?p=chopstx/chopstx.git;a=shortlog;h=refs/heads/cortex-m0-support Is it the firmware issue or my openocd setting issue?? ``` console_A$ cat board/openocd-fsm-55.cfg # This is a FSM-55 LED Matrix Display board with a single STM32F030F4P6 chip. # Manufactured by gniibe (http://www.gniibe.org/). # Product page at http://www.seeedstudio.com/depot/FSM55-LED-Matrix-Display-p-2121.html. source [find interface/stlink-v2.cfg] transport select hla_swd # The STM32F030F4P6 is a *tightly* constrained chip; the work area size must be # similarly constrained. set WORKAREASIZE 0x1000 source [find target/stm32f0x.cfg] # use hardware reset, connect under reset reset_config srst_only srst_nogate connect_assert_srst $_TARGETNAME configure -event gdb-attach { reset init } console_A$ sudo openocd -f board/openocd-fsm-55.cfg Open On-Chip Debugger 0.9.0-dev-00184-g885f438 (2014-10-30-21:18) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 1000 kHz adapter_nsrst_delay: 100 srst_only separate srst_nogate srst_open_drain connect_assert_srst Info : clock speed 1000 kHz Info : STLINK v2 JTAG v16 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.050821 Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints Info : accepting 'gdb' connection on tcp/3333 target state: halted target halted due to debug-request, current mode: Thread xPSR: 0xc1000000 pc: 0x080002a0 msp: 0x20005000 Info : device id = 0x10006444 Info : flash size = 16kbytes target state: halted target halted due to debug-request, current mode: Thread xPSR: 0xc1000000 pc: 0x080002a0 msp: 0x20005000 Info : Padding image section 0 with 4 bytes target state: halted target halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x2000003a msp: 0x20005000 target state: halted target halted due to debug-request, current mode: Thread xPSR: 0xc1000000 pc: 0x080002a0 msp: 0x20005000 ``` ``` console_B$ arm-none-eabi-gdb build/hacker-emblem.elf GNU gdb (7.7.1+dfsg-1+6) 7.7.1 Copyright (C) 2014 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 "--host=x86_64-linux-gnu --target=arm-none-eabi". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from build/hacker-emblem.elf...done. (gdb) tar ext :3333 Remote debugging using :3333 reset () at sys.c:699 699 asm volatile ("cpsid i\n\t" /* Mask all interrupts. */ (gdb) load Loading section .sys, size 0x400 lma 0x8000000 Loading section .startup, size 0xf0 lma 0x8000400 Loading section .text, size 0xfc4 lma 0x80004f0 Loading section .data, size 0xf0 lma 0x80014b8 Start address 0x80004f0, load size 5540 Transfer rate: 13 KB/sec, 1385 bytes/write. (gdb) c Continuing. ``` Best reagards, -- Kiwamu Okabe at METASEPI DESIGN |