Administración del Repositorio
Últimos cambios
Descripción
Instalación
Administración del Repositorio
Descripción
Instalación
Configurar debugging:
$HOME/ciaa-ide/Firmware/out/bin/blinking.axf
openocd
-f $HOME/ciaa-ide/Firmware/modules/tools/openocd/cfg/cortexM4/lpc43xx/lpc4337/ciaa-nxp.cfg
/home/luis
).
Hay que abrir dos terminales, una para OpenOCD y otra para el debugger.
./bin/openocd-0.9.0/src/openocd -f ./modules/tools/openocd/cfg/cortexM4/lpc43xx/lpc4337/ciaa-nxp.cfg -c "gdb_memory_map disable"
Va a mostrar algo como
Open On-Chip Debugger 0.9.0 (2016-06-11-10:53) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html adapter speed: 2000 kHz BOARD variable undefined: Using CIAA-NXP as default board, qspi flash defined! none separate cortex_m reset_config vectreset Info : clock speed 2000 kHz Info : JTAG tap: lpc4337.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4) Info : JTAG tap: lpc4337.m0 tap/device found: 0x0ba01477 (mfg: 0x23b, part: 0xba01, ver: 0x0) Info : lpc4337.m4: hardware has 6 breakpoints, 4 watchpoints Info : lpc4337.m0: hardware has 2 breakpoints, 1 watchpoints
./bin/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi-gdb
Va a mostrar algo como
GNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150304-cvs 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=i686-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 out/bin/encoder.axf...done. (gdb)
Hay que ingresar:
(gdb) target remote localhost:3333
Mostrará algo como
Remote debugging using localhost:3333 ResetISR () at ./externals/drivers/cortexM4/lpc43xx/src/cr_startup_lpc43xx.c:134 134 void ResetISR(void) { (gdb)
y simultáneamente, en la terminal de OpenOCD, se verá:
Info : accepting 'gdb' connection on tcp/3333 Reset Halt, due to gdb attached...! Info : JTAG tap: lpc4337.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4) Info : JTAG tap: lpc4337.m0 tap/device found: 0x0ba01477 (mfg: 0x23b, part: 0xba01, ver: 0x0) Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support. Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support. target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x1a001834 msp: 0x10008000 Error: timed out while waiting for target halted TARGET: lpc4337.m0 - Not halted in procedure 'reset' in procedure 'ocd_bouncer' Info : Halt timed out, wake up GDB.
y tambien se pausará cualquier actividad de la placa, como mensajes que se estuvieran enviando por UART, prendido y apagado de leds o movimientos de motores.
ddd es un front end amistoso para gdb, se ejecuta en lugar de gdb en las instrucciones anteriores
ddd --debugger bin/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi-gdb out/programa.axf
Igual que con gdb, la ventana de gdb hay que conectarse a OpenOCD:
(gdb) target remote localhost:3333