Hmmm...so ganz klappt die Kommunikation mit dem nRF51 noch nicht.
Der VisualGSB-Support meinte, ich soll das [code]set WORKAREASIZE 0[code] an den Anfang meiner target.cfg einbinden:
You can try adding "set WORKAREASIZE 0" at the beginning of the %LOCALAPPDATA%\VisualGDB\EmbeddedDebugPackages\com .sysprogs.arm.openocd\share\openocd\scripts\target \nrf51.cfg file
Aber eine Kommunikation mit dem nRF51 schlägt immer noch fehl:
Code:
Open On-Chip Debugger 0.9.0 (2016-10-14) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
swd
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
VisualGDB_OpenOCD_Ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x0bb11477
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : accepting 'gdb' connection on tcp/50327
Info : nRF51822-CEAA(build code: C0) 256kB Flash
undefined debug reason 7 - target needs reset
Error: address + size wrapped(0xfffffffe, 0x00000004)
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
Warn : not enough working area available(requested 32)
Warn : no working area available, falling back to slow memory writes
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
Error: nrf51.cpu -- clearing lockup after double fault
Polling target nrf51.cpu failed, trying to reexamine
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Error: address + size wrapped(0xfffffffe, 0x00000004)
Error: nrf51.cpu -- clearing lockup after double fault
Polling target nrf51.cpu failed, trying to reexamine
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Error: address + size wrapped(0xfffffffe, 0x00000004)
Error: nrf51.cpu -- clearing lockup after double fault
Polling target nrf51.cpu failed, trying to reexamine
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Error: address + size wrapped(0xfffffffe, 0x00000004)
Error: nrf51.cpu -- clearing lockup after double fault
Polling target nrf51.cpu failed, trying to reexamine
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
Error: address + size wrapped(0xfffffffe, 0x00000004)
- - - Aktualisiert - - -
Nachdem ich zunächst als VisualGDB-Ausgabe immer eine SIGINT-Meldung bekommen habe, hab ich als ergänzende Attribute
Code:
handle SIGINT nostop
angehangen (Quelle: http://stackoverflow.com/questions/2...-reason-sigint).
Daraufhin lief GDB ohne weitere Meldung durch und die Logdatei spuckt folgendes aus:
Code:
Open On-Chip Debugger 0.9.0 (2016-10-14) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
swd
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x0bb11477
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
VisualGDB_OpenOCD_Ready
Info : accepting 'gdb' connection on tcp/50423
Info : nRF51822-CEAA(build code: C0) 256kB Flash
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
Eigentlich war ich davon ausgegangen, dass ich nun als Output des Blink-Samples eine blinkende LED auf dem entsprechenden Pin haben sollte:
Code:
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "nrf_delay.h"
#include "nrf_gpio.h"
#ifdef __cplusplus
}
#endif
int main(void)
{
nrf_gpio_cfg_output(13);
for (;;)
{
nrf_gpio_pin_set(13);
nrf_delay_ms(500);
nrf_gpio_pin_clear(13);
nrf_delay_ms(500);
}
}
Aber es regt sich nichts.
Ich schätze mal, dass ich nach dem Flashen irgendwie dem Gerät sagen muss, dass es den Code abarbeiten muss?
Solande VisualGDB aktiv ist, signalisiert mir die Übertragungs-LED am jTag-Lock-Pick Tiny 2 eine aktive Verbindung. Wenn ich das Debugging anhalte, härt die auf zu flackern.
Lesezeichen