Buenas, estoy usando sobre linux la versión del openocd 0.9.0 desde hace un tiempo largo y sin problemas hasta ayer. Hoy quise ponerme a debuguear con eclipse mas el openocd corriendo desde una terminal, y el eclipse me devuelve el siguiente mensaje:
Error in final launch sequence
Failed to execute MI command:
load /home/fran/CIAA/Repositorios/repoTpFinal/firmware/out/lpc4337_m4/consola_analog_input.axf
Error message from debugger back end:
Error erasing flash with vFlashErase packet
Failed to execute MI command:
load /home/fran/CIAA/Repositorios/repoTpFinal/firmware/out/lpc4337_m4/consola_analog_input.axf
Error message from debugger back end:
Error erasing flash with vFlashErase packet
Error erasing flash with vFlashErase packet
Mientras que en la terminal veo lo siguiente:
Starting OpenOCD for lpc4337_m4...
Open On-Chip Debugger 0.9.0 (2016-08-22-21:28)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 2000 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
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
Info : accepting 'gdb' connection on tcp/3333
undefined debug reason 7 - target needs reset
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: 0x1a006020 msp: 0x10007fe0
Error: timed out while waiting for target halted
TARGET: lpc4337.m0 - Not halted
in procedure 'reset'
in procedure 'ocd_bouncer'
semihosting is enabled
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: 0x1a006020 msp: 0x10007fe0, semihosting
Error: timed out while waiting for target halted
TARGET: lpc4337.m0 - Not halted
in procedure 'reset'
in procedure 'ocd_bouncer'
Error: timed out while waiting for target halted
Error: timed out while waiting for target halted
Warn : target not halted
Warn : lpc2000 prepare sectors returned -368391288
Error: failed erasing sectors 0 to 8
Error: flash_erase returned -902
Info : Halt timed out, wake up GDB.
Info : dropped 'gdb' connection
Info : Halt timed out, wake up GDB.
Intente grabarlo desde la terminal y es lo mismo.
Luego intente borrar forzada mente desde una terminal al localhost 4444 usando el comando flash (y otros que vi pero que no quiero detallar tanto porque no creo tengan relevancia) pero siempre termino viendo un mensaje de "timed out" desde el openocd. La verdad es que no quiero seguir tocando de mas por ahora, por temor a empeorarla.
Hay dos cosas que no entiendo, una es lo que dice "Warm: lpc2000 prepare sectors..." me da la sensación de que esta tomando un parámetro erróneamente. Y por las dudas agregue la variable global BOARD edu-ciaa-nxp en el eclipse pero es lo mismo.
La otra cosa es que de ayer a hoy no cambie nada y estaba funcionando perfecto mi firmware. En el mismo estoy intentando grabar y leer desde la eeprom interna, no creo que hay podido dañar la flash usando las rutinas del lpc open.
Por ultimo,investigue en los distintos treds relacionados en el grupo y no encontré un caso similar, o al menos me pareció.
Espero haber sido claro y que me puedan dar una mano, es desesperante esto!
Saludos