Forum: Compiler & IDEs NuMicroM2351 "TARGET: NuMicro.cpu - Not halted"


von Ximena (Gast)


Lesenswert?

Hallo zusammen,

ich arbeite mit einem NuMicro M2351 Microcontroller (ARM Cortex-M23). 
Leider kann ich nun seit ein paar Tagen nichts mehr flashen, weil ich 
einfach die CPU nicht anhalten kann und ich hab keine Ahnung, was ich 
noch ausprobieren könnte. Ich kenne mich damit auch nicht so gut aus, 
deswegen hier meine Suche nach Hilfe.

Mein Setup:
OpenOCD: Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty 
(2020-05-19-11:19)
GDB: GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 
8.3.0.20190709-git

Was ich mache:
Grundsätzlich möchte ich gerne ein Program auf den uC laden. Dies tue 
ich mit dem folgenden Befehl und erhalte dann die nachfolgende 
Fehlermeldung:
1
$ openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg -c "program /build/main.elf reset exit"
2
3
Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty (2020-05-19-11:19)
4
Licensed under GNU GPL v2
5
For bug reports, read
6
  http://openocd.org/doc/doxygen/bugs.html
7
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
8
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
9
Info : clock speed 1000 kHz
10
Info : NULINK is Nu-Link1
11
Info : NULINK firmware_version(6773), product_id(0x40012009)
12
Info : IDCODE: 0x0BF11477
13
Info : NuMicro.cpu: hardware has 23 breakpoints, 0 watchpoints
14
Error: timed out while waiting for target halted
15
TARGET: NuMicro.cpu - Not halted
16
in procedure 'program' 
17
in procedure 'reset' called at file "embedded:startup.tcl", line 478
18
in procedure 'ocd_bouncer'
19
20
** Unable to reset target **
21
shutdown command invoked
22
23
make: *** [Makefile:78: flash] Error 1

Woran es liegen könnte:
Bevor es nicht mehr funktioniert hatte, habe ich ein Program 
draufgeladen, dass mit dem XOM Feature spielt. Dabei habe ich XOMR0 an 
Adresse 0x70000 mit einer size von 255 pages konfiguriert. Das 
draufladen ging, und seither kann ich aber nichts mehr machen. Wenn ich 
mich mit gdb oder telnet verbinde und etwas versuche kommt immer die 
Meldung, dass die CPU nicht angehalten werden konnte.

Ich bin wirklich ratlos und weiss nicht, was ich noch machen kann. Ich 
würde gerne den Flash komplett löschen, aber dazu muss ja die CPU 
angehalten sein. Hat jemand einen Tipp für mich, was ich noch 
ausprobieren könnte?

von Ximena (Gast)


Lesenswert?

Hier ist noch etwas mehr Info, respektive Output von OpenOCD und 
Telnet/GDB:

Versuch 1:
1
$ openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg
2
3
Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty (2020-05-19-11:19)
4
Licensed under GNU GPL v2
5
For bug reports, read
6
  http://openocd.org/doc/doxygen/bugs.html
7
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
8
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
9
Info : clock speed 1000 kHz
10
Info : NULINK is Nu-Link1
11
Info : NULINK firmware_version(6773), product_id(0x40012009)
12
Info : IDCODE: 0x0BF11477
13
Info : NuMicro.cpu: hardware has 23 breakpoints, 0 watchpoints
14
Info : accepting 'telnet' connection on tcp/4444
15
#0 : NuMicro.flash_aprom (numicro) at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0
16
#1 : NuMicro.flash_data (numicro) at 0x0001f000, size 0x00000000, buswidth 0, chipwidth 0
17
#2 : NuMicro.flash_ldrom (numicro) at 0x00100000, size 0x00000000, buswidth 0, chipwidth 0
18
#3 : NuMicro.flash_config (numicro) at 0x00300000, size 0x00000000, buswidth 0, chipwidth 0
19
{name numicro base 0 size 0 bus_width 0 chip_width 0} {name numicro base 126976 size 0 bus_width 0 chip_width 0} {name numicro base 1048576 size 0 bus_width 0 chip_width 0} {name numicro base 3145728 size 0 bus_width 0 chip_width 0}
20
Info : Device ID: 0x0bf11477
21
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
22
Info : Device Name: UNKNOWN
23
Warn : NuMicro flash driver: Failed to detect a known part
24
Info : bank base = 0x00000000, size = 0x10080000
25
Error: Target not halted
26
Error: failed erasing sectors 0 to 0
27
requesting target halt and executing a soft reset
28
Error: Target NuMicro.cpu does not support soft_reset_halt
29
Error: timed out while waiting for target halted
30
TARGET: NuMicro.cpu - Not halted
31
in procedure 'reset' 
32
in procedure 'ocd_bouncer'
33
34
35
shutdown command invoked
36
Info : dropped 'telnet' connection
1
$ telnet localhost 4444
2
Trying 127.0.0.1...
3
Connected to localhost.
4
Escape character is '^]'.
5
Open On-Chip Debugger
6
> flash banks
7
#0 : NuMicro.flash_aprom (numicro) at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0
8
#1 : NuMicro.flash_data (numicro) at 0x0001f000, size 0x00000000, buswidth 0, chipwidth 0
9
#2 : NuMicro.flash_ldrom (numicro) at 0x00100000, size 0x00000000, buswidth 0, chipwidth 0
10
#3 : NuMicro.flash_config (numicro) at 0x00300000, size 0x00000000, buswidth 0, chipwidth 0
11
> flash list
12
{name numicro base 0 size 0 bus_width 0 chip_width 0} {name numicro base 126976 size 0 bus_width 0 chip_width 0} {name numicro base 1048576 size 0 bus_width 0 chip_width 0} {name numicro base 3145728 size 0 bus_width 0 chip_width 0}
13
> flash erase_sector 0 0 0
14
Device ID: 0x0bf11477
15
NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
16
Device Name: UNKNOWN
17
NuMicro flash driver: Failed to detect a known part
18
bank base = 0x00000000, size = 0x10080000
19
Target not halted
20
failed erasing sectors 0 to 0
21
> soft_reset_halt
22
requesting target halt and executing a soft reset
23
Target NuMicro.cpu does not support soft_reset_halt
24
> reset halt
25
timed out while waiting for target halted
26
TARGET: NuMicro.cpu - Not halted
27
in procedure 'reset' 
28
in procedure 'ocd_bouncer'
29
30
31
> shutdown
32
shutdown command invoked
33
Connection closed by foreign host.

Versuch 2:
1
$ openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg
2
3
Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty (2020-05-19-11:19)
4
Licensed under GNU GPL v2
5
For bug reports, read
6
  http://openocd.org/doc/doxygen/bugs.html
7
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
8
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
9
Info : clock speed 1000 kHz
10
Info : NULINK is Nu-Link1
11
Info : NULINK firmware_version(6773), product_id(0x40012009)
12
Info : IDCODE: 0x0BF11477
13
Info : NuMicro.cpu: hardware has 23 breakpoints, 0 watchpoints
14
Info : accepting 'gdb' connection on tcp/3333
15
Info : Device ID: 0x0bf11477
16
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
17
Info : Device Name: UNKNOWN
18
Warn : NuMicro flash driver: Failed to detect a known part
19
Info : bank base = 0x00000000, size = 0x10080000
20
Info : Device ID: 0x0bf11477
21
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
22
Info : Device Name: UNKNOWN
23
Warn : NuMicro flash driver: Failed to detect a known part
24
Info : bank base = 0x0001f000, size = 0x00000000
25
Info : Device ID: 0x0bf11477
26
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
27
Info : Device Name: UNKNOWN
28
Warn : NuMicro flash driver: Failed to detect a known part
29
Info : bank base = 0x00100000, size = 0x00001000
30
Info : Device ID: 0x0bf11477
31
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
32
Info : Device Name: UNKNOWN
33
Warn : NuMicro flash driver: Failed to detect a known part
34
Info : bank base = 0x00300000, size = 0x00000010
35
undefined debug reason 7 - target needs reset
36
37
läuft immer noch
1
$ arm-none-eabi-gdb
2
3
GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git
4
Copyright (C) 2019 Free Software Foundation, Inc.
5
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
6
This is free software: you are free to change and redistribute it.
7
There is NO WARRANTY, to the extent permitted by law.
8
Type "show copying" and "show warranty" for details.
9
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
10
Type "show configuration" for configuration details.
11
For bug reporting instructions, please see:
12
<http://www.gnu.org/software/gdb/bugs/>.
13
Find the GDB manual and other documentation resources online at:
14
    <http://www.gnu.org/software/gdb/documentation/>.
15
16
For help, type "help".
17
Type "apropos word" to search for commands related to "word".
18
(gdb) load build/main.elf
19
You can't do that when your target is `None'
20
(gdb) target remote localhost:3333
21
Remote debugging using localhost:3333
22
warning: No executable has been specified and target does not support
23
determining executable automatically.  Try using the "file" command.
24
warning: Overlapping regions in memory map: ignoring
25
0x00000000 in ?? ()
26
(gdb) load build/main.elf
27
Loading section .text, size 0xca68 lma 0x0
28
Ignoring packet error, continuing...
29
Ignoring packet error, continuing...
30
Ignoring packet error, continuing...
31
Loading section .ARM.exidx, size 0x8 lma 0xca68
32
Ignoring packet error, continuing...
33
Loading section .data, size 0xd1c lma 0xca70
34
Ignoring packet error, continuing...
35
Loading section .xom_region, size 0x100 lma 0x70000
36
Ignoring packet error, continuing...
37
Start address 0x458, load size 55436
38
Ignoring packet error, continuing...
39
Ignoring packet error, continuing...
40
Transfer rate: 1 KB/sec, 7919 bytes/write.
41
(gdb) q
42
A debugging session is active.
43
44
  Inferior 1 [Remote target] will be detached.
45
46
Quit anyway? (y or n) y
47
Detaching from program: , Remote target
48
Ignoring packet error, continuing...
49
Can't detach process.

von W.S. (Gast)


Lesenswert?

Versuche es doch einmal mit dem originalen NuLink und der zugehörigen 
Software von Nuvoton.

W.S.

von Jim M. (turboj)


Lesenswert?

Ximena schrieb:
> Info : Device ID: 0x0bf11477
> Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN'
> instead.

Das sieht ungesund aus, OpenOCD erkennt den Flash/Chip Variante nicht 
richtig.


Bei OpenOCD Problemen braucht man i.d.R. das "-d3" Log.

Ximena schrieb:
> XOM Feature spielt. Dabei habe ich XOMR0 an
> Adresse 0x70000 mit einer size von 255 pages konfiguriert

Was ist XOM? Irgendwas mit Memory, was den AHB blockieren könnte?

von Ximena (Gast)


Lesenswert?

Vielen Dank für eure Antworten.

@W.S. Was meinst du mit originalem NuLink?

@Jim M. Brauche ich das -d3 beim openocd Teil oder beim telnet Teil? Ich 
probier damit bisschen rum.
Also liegt das Problem eher nicht daran, dass die CPU nicht angehalten 
werden kann, sondern dass er den Chip nicht richtig erkennt? Woran 
könnte das denn liegen, an SW oder HW?

Ja XOM ist so ein eXecute Only Memory Feature von Nuvoton.

UPDATE:
Also Zwischenzeitlich ging es einfach so wieder. Habe nichts anders 
gemacht, nur gedacht "Jetzt probier ichs einfach nochmal". Dann gings 
jetzt ne Weile und jetzt bin ich wieder genau so weit wie oben 
beschrieben.

von Ximena (Gast)


Lesenswert?

Ok also hier der -d3 Output:
1
openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg -d3 -c "program /build/main.elf reset exit"
2
3
Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty (2020-05-19-11:19)
4
Licensed under GNU GPL v2
5
For bug reports, read
6
  http://openocd.org/doc/doxygen/bugs.html
7
User : 13 1 command.c:544 command_print(): debug_level: 3
8
Debug: 14 1 options.c:96 add_default_dirs(): bindir=/usr/local/bin
9
Debug: 15 1 options.c:97 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
10
Debug: 16 1 options.c:98 add_default_dirs(): run_prefix=
11
Debug: 17 1 configuration.c:42 add_script_search_dir(): adding /home/.openocd
12
Debug: 18 1 configuration.c:42 add_script_search_dir(): adding /usr/local/share/openocd/site
13
Debug: 19 1 configuration.c:42 add_script_search_dir(): adding /usr/local/share/openocd/scripts
14
Debug: 20 1 configuration.c:82 find_file(): found /tcl/interface/nulink.cfg
15
Debug: 21 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_interface hla
16
Debug: 22 3 command.c:143 script_debug(): command - interface ocd_interface hla
17
Debug: 24 3 command.c:364 register_command_handler(): registering 'ocd_hla_device_desc'...
18
Debug: 25 3 command.c:364 register_command_handler(): registering 'ocd_hla_serial'...
19
Debug: 26 3 command.c:364 register_command_handler(): registering 'ocd_hla_layout'...
20
Debug: 27 3 command.c:364 register_command_handler(): registering 'ocd_hla_close'...
21
Debug: 28 3 command.c:364 register_command_handler(): registering 'ocd_hla_reset'...
22
Debug: 29 3 command.c:364 register_command_handler(): registering 'ocd_hla_vid_pid'...
23
Debug: 30 3 command.c:364 register_command_handler(): registering 'ocd_hla_vids_pids'...
24
Debug: 31 3 command.c:364 register_command_handler(): registering 'ocd_hla_command'...
25
Debug: 32 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_hla_layout nulink
26
Debug: 33 3 command.c:143 script_debug(): command - hla_layout ocd_hla_layout nulink
27
Debug: 35 3 hla_interface.c:239 hl_interface_handle_layout_command(): hl_interface_handle_layout_command
28
Debug: 36 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_hla_device_desc Nu-Link
29
Debug: 37 3 command.c:143 script_debug(): command - hla_device_desc ocd_hla_device_desc Nu-Link
30
Debug: 39 3 hla_interface.c:213 hl_interface_handle_device_desc_command(): hl_interface_handle_device_desc_command
31
Debug: 40 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_hla_vids_pids 0x0416 0x511b 0x0416 0x511c 0x0416 0x511d
32
Debug: 41 3 command.c:143 script_debug(): command - hla_vids_pids ocd_hla_vids_pids 0x0416 0x511b 0x0416 0x511c 0x0416 0x511d
33
Debug: 43 3 hla_interface.c:312 hl_interface_handle_vids_pids_command(): hl_interface_handle_vids_pids_command
34
Debug: 44 3 configuration.c:82 find_file(): found /tcl/target/numicroM23.cfg
35
Debug: 45 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
36
Debug: 46 3 command.c:143 script_debug(): command - ocd_transport ocd_transport select
37
Info : 47 3 transport.c:285 jim_transport_select(): auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
38
Debug: 48 3 hla_transport.c:191 hl_transport_select(): hl_transport_select
39
Debug: 49 3 command.c:364 register_command_handler(): registering 'ocd_hla'...
40
Debug: 50 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
41
Debug: 51 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
42
Debug: 52 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
43
Debug: 53 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
44
Debug: 54 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
45
Debug: 55 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
46
Debug: 56 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
47
Debug: 57 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
48
Debug: 58 3 command.c:364 register_command_handler(): registering 'ocd_jtag'...
49
Debug: 59 3 command.c:364 register_command_handler(): registering 'ocd_jtag_ntrst_delay'...
50
Debug: 60 3 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
51
Debug: 61 3 command.c:143 script_debug(): command - ocd_transport ocd_transport select
52
Debug: 62 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
53
Debug: 63 4 command.c:143 script_debug(): command - ocd_transport ocd_transport select
54
Debug: 64 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
55
Debug: 65 4 command.c:143 script_debug(): command - ocd_transport ocd_transport select
56
Debug: 66 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_hla newtap NuMicro cpu -irlen 4 -expected-id 0x0BF11477
57
Debug: 67 4 command.c:143 script_debug(): command - ocd_hla ocd_hla newtap NuMicro cpu -irlen 4 -expected-id 0x0BF11477
58
Debug: 68 4 hla_tcl.c:115 jim_hl_newtap_cmd(): Creating New Tap, Chip: NuMicro, Tap: cpu, Dotted: NuMicro.cpu, 4 params
59
Debug: 69 4 hla_tcl.c:126 jim_hl_newtap_cmd(): Processing option: -irlen
60
Debug: 70 4 hla_tcl.c:126 jim_hl_newtap_cmd(): Processing option: -expected-id
61
Debug: 71 4 core.c:1300 jtag_tap_init(): Created Tap: NuMicro.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
62
Debug: 72 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target create NuMicro.cpu cortex_m -chain-position NuMicro.cpu
63
Debug: 73 4 command.c:143 script_debug(): command - ocd_target ocd_target create NuMicro.cpu cortex_m -chain-position NuMicro.cpu
64
Debug: 74 4 nulink_usb.c:1253 nulink_usb_override_target(): nulink_usb_override_target
65
Info : 75 4 target.c:5256 target_create(): The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
66
Debug: 76 4 target.c:1892 target_free_all_working_areas_restore(): freeing all working areas
67
Debug: 77 4 command.c:364 register_command_handler(): registering 'ocd_arm'...
68
Debug: 78 4 command.c:364 register_command_handler(): registering 'ocd_arm'...
69
Debug: 79 4 command.c:364 register_command_handler(): registering 'ocd_arm'...
70
Debug: 80 4 command.c:364 register_command_handler(): registering 'ocd_arm'...
71
Debug: 81 4 command.c:364 register_command_handler(): registering 'ocd_arm'...
72
Debug: 82 4 command.c:364 register_command_handler(): registering 'ocd_arm'...
73
Debug: 83 4 command.c:364 register_command_handler(): registering 'ocd_tpiu'...
74
Debug: 84 4 command.c:364 register_command_handler(): registering 'ocd_itm'...
75
Debug: 85 4 command.c:364 register_command_handler(): registering 'ocd_itm'...
76
Debug: 86 4 hla_target.c:351 adapter_target_create(): adapter_target_create
77
Debug: 87 4 hla_target.c:322 adapter_init_arch_info(): adapter_init_arch_info
78
Debug: 88 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
79
Debug: 89 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
80
Debug: 90 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
81
Debug: 91 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
82
Debug: 92 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
83
Debug: 93 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
84
Debug: 94 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
85
Debug: 95 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
86
Debug: 96 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
87
Debug: 97 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
88
Debug: 98 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
89
Debug: 99 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
90
Debug: 100 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
91
Debug: 101 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
92
Debug: 102 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
93
Debug: 103 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
94
Debug: 104 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
95
Debug: 105 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
96
Debug: 106 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
97
Debug: 107 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
98
Debug: 108 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
99
Debug: 109 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
100
Debug: 110 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
101
Debug: 111 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
102
Debug: 112 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
103
Debug: 113 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
104
Debug: 114 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
105
Debug: 115 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
106
Debug: 116 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
107
Debug: 117 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
108
Debug: 118 4 command.c:364 register_command_handler(): registering 'ocd_NuMicro.cpu'...
109
Debug: 119 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu configure -work-area-phys 0x20000000 -work-area-size 0x2000 -work-area-backup 0
110
Debug: 120 4 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu configure -work-area-phys 0x20000000 -work-area-size 0x2000 -work-area-backup 0
111
Debug: 121 4 target.c:1892 target_free_all_working_areas_restore(): freeing all working areas
112
Debug: 122 4 target.c:1892 target_free_all_working_areas_restore(): freeing all working areas
113
Debug: 123 4 target.c:1892 target_free_all_working_areas_restore(): freeing all working areas
114
Debug: 124 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_flash bank NuMicro.flash_aprom numicro 0x00000000 0 0 0 NuMicro.cpu
115
Debug: 125 4 command.c:143 script_debug(): command - ocd_flash ocd_flash bank NuMicro.flash_aprom numicro 0x00000000 0 0 0 NuMicro.cpu
116
Debug: 127 4 command.c:364 register_command_handler(): registering 'ocd_numicro'...
117
Debug: 128 4 command.c:364 register_command_handler(): registering 'ocd_numicro'...
118
Debug: 129 4 command.c:364 register_command_handler(): registering 'ocd_numicro'...
119
Debug: 130 4 command.c:319 command_new(): BUG: command 'numicro chip_erase' does not have the '.usage' field filled out
120
Debug: 131 4 command.c:364 register_command_handler(): registering 'ocd_numicro'...
121
Debug: 132 5 command.c:319 command_new(): BUG: command 'numicro M2351_erase' does not have the '.usage' field filled out
122
Debug: 133 5 command.c:364 register_command_handler(): registering 'ocd_numicro'...
123
Debug: 134 5 command.c:319 command_new(): BUG: command 'numicro NUC505_sram_ini' does not have the '.usage' field filled out
124
Debug: 135 5 command.c:364 register_command_handler(): registering 'ocd_numicro'...
125
Debug: 136 5 command.c:319 command_new(): BUG: command 'numicro NUC505_chip_reset' does not have the '.usage' field filled out
126
Debug: 137 5 command.c:364 register_command_handler(): registering 'ocd_numicro'...
127
Debug: 138 5 numicro.c:2382 numicro_flash_bank_command(): add flash_bank numicro NuMicro.flash_aprom
128
Debug: 139 5 tcl.c:1032 handle_flash_bank_command(): 'numicro' driver usage field missing
129
Debug: 140 5 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_flash bank NuMicro.flash_data numicro 0x0001F000 0 0 0 NuMicro.cpu
130
Debug: 141 5 command.c:143 script_debug(): command - ocd_flash ocd_flash bank NuMicro.flash_data numicro 0x0001F000 0 0 0 NuMicro.cpu
131
Debug: 143 5 command.c:398 register_command(): command 'numicro' is already registered in '<global>' context
132
Debug: 144 5 command.c:398 register_command(): command 'read_isp' is already registered in 'numicro' context
133
Debug: 145 5 command.c:398 register_command(): command 'write_isp' is already registered in 'numicro' context
134
Debug: 146 5 command.c:398 register_command(): command 'erase_isp' is already registered in 'numicro' context
135
Debug: 147 5 command.c:398 register_command(): command 'chip_erase' is already registered in 'numicro' context
136
Debug: 148 5 command.c:398 register_command(): command 'M2351_erase' is already registered in 'numicro' context
137
Debug: 149 5 command.c:398 register_command(): command 'NUC505_sram_ini' is already registered in 'numicro' context
138
Debug: 150 5 command.c:398 register_command(): command 'NUC505_chip_reset' is already registered in 'numicro' context
139
Debug: 151 5 numicro.c:2382 numicro_flash_bank_command(): add flash_bank numicro NuMicro.flash_data
140
Debug: 152 6 tcl.c:1032 handle_flash_bank_command(): 'numicro' driver usage field missing
141
Debug: 153 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_flash bank NuMicro.flash_ldrom numicro 0x00100000 0 0 0 NuMicro.cpu
142
Debug: 154 6 command.c:143 script_debug(): command - ocd_flash ocd_flash bank NuMicro.flash_ldrom numicro 0x00100000 0 0 0 NuMicro.cpu
143
Debug: 156 6 command.c:398 register_command(): command 'numicro' is already registered in '<global>' context
144
Debug: 157 6 command.c:398 register_command(): command 'read_isp' is already registered in 'numicro' context
145
Debug: 158 6 command.c:398 register_command(): command 'write_isp' is already registered in 'numicro' context
146
Debug: 159 6 command.c:398 register_command(): command 'erase_isp' is already registered in 'numicro' context
147
Debug: 160 6 command.c:398 register_command(): command 'chip_erase' is already registered in 'numicro' context
148
Debug: 161 6 command.c:398 register_command(): command 'M2351_erase' is already registered in 'numicro' context
149
Debug: 162 6 command.c:398 register_command(): command 'NUC505_sram_ini' is already registered in 'numicro' context
150
Debug: 163 6 command.c:398 register_command(): command 'NUC505_chip_reset' is already registered in 'numicro' context
151
Debug: 164 6 numicro.c:2382 numicro_flash_bank_command(): add flash_bank numicro NuMicro.flash_ldrom
152
Debug: 165 6 tcl.c:1032 handle_flash_bank_command(): 'numicro' driver usage field missing
153
Debug: 166 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_flash bank NuMicro.flash_config numicro 0x00300000 0 0 0 NuMicro.cpu
154
Debug: 167 6 command.c:143 script_debug(): command - ocd_flash ocd_flash bank NuMicro.flash_config numicro 0x00300000 0 0 0 NuMicro.cpu
155
Debug: 169 6 command.c:398 register_command(): command 'numicro' is already registered in '<global>' context
156
Debug: 170 6 command.c:398 register_command(): command 'read_isp' is already registered in 'numicro' context
157
Debug: 171 6 command.c:398 register_command(): command 'write_isp' is already registered in 'numicro' context
158
Debug: 172 6 command.c:398 register_command(): command 'erase_isp' is already registered in 'numicro' context
159
Debug: 173 6 command.c:398 register_command(): command 'chip_erase' is already registered in 'numicro' context
160
Debug: 174 6 command.c:398 register_command(): command 'M2351_erase' is already registered in 'numicro' context
161
Debug: 175 6 command.c:398 register_command(): command 'NUC505_sram_ini' is already registered in 'numicro' context
162
Debug: 176 6 command.c:398 register_command(): command 'NUC505_chip_reset' is already registered in 'numicro' context
163
Debug: 177 6 numicro.c:2382 numicro_flash_bank_command(): add flash_bank numicro NuMicro.flash_config
164
Debug: 178 6 tcl.c:1032 handle_flash_bank_command(): 'numicro' driver usage field missing
165
Debug: 179 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 1000
166
Debug: 180 6 command.c:143 script_debug(): command - adapter_khz ocd_adapter_khz 1000
167
Debug: 182 6 core.c:1631 jtag_config_khz(): handle jtag khz
168
Debug: 183 6 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
169
Debug: 184 6 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
170
Debug: 185 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_reset_config none
171
Debug: 186 6 command.c:143 script_debug(): command - reset_config ocd_reset_config none
172
Debug: 188 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
173
Debug: 189 6 command.c:143 script_debug(): command - ocd_transport ocd_transport select
174
Debug: 190 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu configure -event gdb-detach  exitDebugging 
175
Debug: 191 6 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu configure -event gdb-detach  exitDebugging 
176
Debug: 192 7 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_init
177
Debug: 193 7 command.c:143 script_debug(): command - init ocd_init
178
Debug: 195 7 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target init
179
Debug: 196 20 command.c:143 script_debug(): command - ocd_target ocd_target init
180
Debug: 198 20 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target names
181
Debug: 199 20 command.c:143 script_debug(): command - ocd_target ocd_target names
182
Debug: 200 20 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu cget -event gdb-flash-erase-start
183
Debug: 201 20 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu cget -event gdb-flash-erase-start
184
Debug: 202 20 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu configure -event gdb-flash-erase-start reset init
185
Debug: 203 20 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu configure -event gdb-flash-erase-start reset init
186
Debug: 204 20 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu cget -event gdb-flash-write-end
187
Debug: 205 20 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu cget -event gdb-flash-write-end
188
Debug: 206 20 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu configure -event gdb-flash-write-end reset halt
189
Debug: 207 20 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu configure -event gdb-flash-write-end reset halt
190
Debug: 208 20 target.c:1317 handle_target_init_command(): Initializing targets...
191
Debug: 209 20 hla_target.c:341 adapter_init_target(): adapter_init_target
192
Debug: 210 20 command.c:364 register_command_handler(): registering 'ocd_target_request'...
193
Debug: 211 20 command.c:364 register_command_handler(): registering 'ocd_trace'...
194
Debug: 212 20 command.c:364 register_command_handler(): registering 'ocd_trace'...
195
Debug: 213 20 command.c:364 register_command_handler(): registering 'ocd_fast_load_image'...
196
Debug: 214 20 command.c:364 register_command_handler(): registering 'ocd_fast_load'...
197
Debug: 215 20 command.c:364 register_command_handler(): registering 'ocd_profile'...
198
Debug: 216 20 command.c:364 register_command_handler(): registering 'ocd_virt2phys'...
199
Debug: 217 20 command.c:364 register_command_handler(): registering 'ocd_reg'...
200
Debug: 218 20 command.c:364 register_command_handler(): registering 'ocd_poll'...
201
Debug: 219 20 command.c:364 register_command_handler(): registering 'ocd_wait_halt'...
202
Debug: 220 20 command.c:364 register_command_handler(): registering 'ocd_halt'...
203
Debug: 221 20 command.c:364 register_command_handler(): registering 'ocd_resume'...
204
Debug: 222 20 command.c:364 register_command_handler(): registering 'ocd_reset'...
205
Debug: 223 20 command.c:364 register_command_handler(): registering 'ocd_soft_reset_halt'...
206
Debug: 224 20 command.c:364 register_command_handler(): registering 'ocd_step'...
207
Debug: 225 20 command.c:364 register_command_handler(): registering 'ocd_mdw'...
208
Debug: 226 20 command.c:364 register_command_handler(): registering 'ocd_mdh'...
209
Debug: 227 20 command.c:364 register_command_handler(): registering 'ocd_mdb'...
210
Debug: 228 20 command.c:364 register_command_handler(): registering 'ocd_mww'...
211
Debug: 229 20 command.c:364 register_command_handler(): registering 'ocd_mwh'...
212
Debug: 230 20 command.c:364 register_command_handler(): registering 'ocd_mwb'...
213
Debug: 231 20 command.c:364 register_command_handler(): registering 'ocd_bp'...
214
Debug: 232 20 command.c:364 register_command_handler(): registering 'ocd_rbp'...
215
Debug: 233 20 command.c:364 register_command_handler(): registering 'ocd_wp'...
216
Debug: 234 20 command.c:364 register_command_handler(): registering 'ocd_rwp'...
217
Debug: 235 20 command.c:364 register_command_handler(): registering 'ocd_load_image'...
218
Debug: 236 20 command.c:364 register_command_handler(): registering 'ocd_dump_image'...
219
Debug: 237 20 command.c:364 register_command_handler(): registering 'ocd_verify_image'...
220
Debug: 238 20 command.c:364 register_command_handler(): registering 'ocd_test_image'...
221
Debug: 239 20 command.c:364 register_command_handler(): registering 'ocd_reset_nag'...
222
Debug: 240 20 command.c:364 register_command_handler(): registering 'ocd_ps'...
223
Debug: 241 20 command.c:364 register_command_handler(): registering 'ocd_test_mem_access'...
224
Debug: 242 20 hla_interface.c:109 hl_interface_init(): hl_interface_init
225
Debug: 243 20 hla_layout.c:89 hl_layout_init(): hl_layout_init
226
Debug: 244 20 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
227
Debug: 245 20 core.c:1601 adapter_khz_to_speed(): have interface set up
228
Debug: 246 20 nulink_usb.c:1263 nulink_speed(): nulink_speed: query(1)
229
Debug: 247 20 nulink_usb.c:1282 nulink_speed(): NULINK nulink_speed: 1000
230
Debug: 248 20 core.c:1598 adapter_khz_to_speed(): convert khz to interface specific speed value
231
Debug: 249 20 core.c:1601 adapter_khz_to_speed(): have interface set up
232
Debug: 250 20 nulink_usb.c:1263 nulink_speed(): nulink_speed: query(1)
233
Debug: 251 20 nulink_usb.c:1282 nulink_speed(): NULINK nulink_speed: 1000
234
Info : 252 20 core.c:1386 adapter_init(): clock speed 1000 kHz
235
Debug: 253 20 openocd.c:137 handle_init_command(): Debug Adapter init complete
236
Debug: 254 21 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport init
237
Debug: 255 21 command.c:143 script_debug(): command - ocd_transport ocd_transport init
238
Debug: 257 21 transport.c:239 handle_transport_init(): handle_transport_init
239
Debug: 258 21 hla_transport.c:152 hl_transport_init(): hl_transport_init
240
Debug: 259 21 hla_transport.c:169 hl_transport_init(): current transport hla_swd
241
Debug: 260 21 hla_interface.c:42 hl_interface_open(): hl_interface_open
242
Debug: 261 21 hla_layout.c:40 hl_layout_open(): hl_layout_open
243
Debug: 262 21 nulink_usb.c:1362 nulink_usb_open(): nulink_usb_open
244
Debug: 263 21 nulink_usb.c:1369 nulink_usb_open(): Stat Case 1: -1
245
Debug: 264 21 nulink_usb.c:1392 nulink_usb_open(): Stat Case 2: -1
246
Debug: 265 21 nulink_usb.c:1414 nulink_usb_open(): Skip running NuLink.exe
247
Info : 266 26 nulink_usb.c:1463 nulink_usb_open(): NULINK is Nu-Link1
248
Debug: 267 26 nulink_usb.c:1466 nulink_usb_open(): jtag_libusb_open succeeded
249
Debug: 268 26 nulink_usb.c:1472 nulink_usb_open(): detach kernel driver failed(-5)
250
Debug: 269 26 nulink_usb.c:1485 nulink_usb_open(): jtag_libusb_claim_interface succeeded
251
Debug: 270 26 nulink_usb.c:291 nulink_usb_version(): nulink_usb_version
252
Info : 271 45 nulink_usb.c:306 nulink_usb_version(): NULINK firmware_version(6773), product_id(0x40012009)
253
Debug: 272 45 nulink_usb.c:321 nulink_usb_version(): NULINK is Normal Nu-Link
254
Debug: 273 45 nulink_usb.c:1263 nulink_speed(): nulink_speed: query(0)
255
Debug: 274 45 nulink_usb.c:1282 nulink_speed(): NULINK nulink_speed: 1000
256
Debug: 275 52 nulink_usb.c:1308 nulink_speed(): nulink_speed: h->hardwareConfig(0)
257
Debug: 276 102 nulink_usb.c:1523 nulink_usb_open(): nulink_usb_open: we manually perform nulink_usb_reset
258
Debug: 277 102 nulink_usb.c:360 nulink_usb_write_debug_reg(): nulink_usb_write_debug_reg(0xe000edf0): 0xa05f0001
259
Debug: 278 332 nulink_usb.c:483 nulink_usb_reset(): nulink_usb_reset
260
Debug: 279 5876 nulink_usb.c:1552 nulink_usb_open(): max page size: 1024
261
Debug: 280 5876 hla_interface.c:127 hl_interface_execute_queue(): hl_interface_execute_queue: ignored
262
Debug: 281 5876 core.c:729 jtag_add_reset(): SRST line released
263
Debug: 282 5876 core.c:753 jtag_add_reset(): TRST line released
264
Debug: 283 5876 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
265
Debug: 284 5876 hla_interface.c:67 hl_interface_init_target(): hl_interface_init_target
266
Debug: 285 5876 nulink_usb.c:334 nulink_usb_idcode(): nulink_usb_idcode
267
Info : 286 5884 nulink_usb.c:350 nulink_usb_idcode(): IDCODE: 0x0BF11477
268
Debug: 287 5884 openocd.c:150 handle_init_command(): Examining targets...
269
Debug: 288 5884 target.c:1509 target_call_event_callbacks(): target event 21 (examine-start)
270
Debug: 289 5884 hla_target.c:750 adapter_read_memory(): adapter_read_memory 0xe000ed00 4 1
271
Debug: 290 5996 target.c:2234 target_read_u32(): address: 0xe000ed00, value: 0x0bf11477
272
Debug: 291 5996 cortex_m.c:1984 cortex_m_examine(): Cortex-M7 r15p7 processor detected
273
Debug: 292 5996 cortex_m.c:1993 cortex_m_examine(): cpuid: 0x0bf11477
274
Debug: 293 5996 hla_target.c:750 adapter_read_memory(): adapter_read_memory 0xe000ef40 4 1
275
Debug: 294 6116 target.c:2234 target_read_u32(): address: 0xe000ef40, value: 0x0bf11477
276
Debug: 295 6116 hla_target.c:750 adapter_read_memory(): adapter_read_memory 0xe000ef44 4 1
277
Debug: 296 6376 target.c:2234 target_read_u32(): address: 0xe000ef44, value: 0x0bf11477
278
Debug: 297 6376 target.c:2322 target_write_u32(): address: 0xe000edfc, value: 0x01000000
279
Debug: 298 6376 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000edfc 4 1
280
Debug: 299 6516 hla_target.c:750 adapter_read_memory(): adapter_read_memory 0xe0002000 4 1
281
Debug: 300 6636 target.c:2234 target_read_u32(): address: 0xe0002000, value: 0x0bf11477
282
Debug: 301 6636 target.c:2322 target_write_u32(): address: 0xe0002008, value: 0x00000000
283
Debug: 302 6636 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002008 4 1
284
Debug: 303 6756 target.c:2322 target_write_u32(): address: 0xe000200c, value: 0x00000000
285
Debug: 304 6756 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000200c 4 1
286
Debug: 305 6876 target.c:2322 target_write_u32(): address: 0xe0002010, value: 0x00000000
287
Debug: 306 6876 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002010 4 1
288
Debug: 307 7116 target.c:2322 target_write_u32(): address: 0xe0002014, value: 0x00000000
289
Debug: 308 7116 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002014 4 1
290
Debug: 309 7236 target.c:2322 target_write_u32(): address: 0xe0002018, value: 0x00000000
291
Debug: 310 7236 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002018 4 1
292
Debug: 311 7356 target.c:2322 target_write_u32(): address: 0xe000201c, value: 0x00000000
293
Debug: 312 7356 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000201c 4 1
294
Debug: 313 7476 target.c:2322 target_write_u32(): address: 0xe0002020, value: 0x00000000
295
Debug: 314 7476 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002020 4 1
296
Debug: 315 7596 target.c:2322 target_write_u32(): address: 0xe0002024, value: 0x00000000
297
Debug: 316 7596 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002024 4 1
298
Debug: 317 7717 target.c:2322 target_write_u32(): address: 0xe0002028, value: 0x00000000
299
Debug: 318 7717 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002028 4 1
300
Debug: 319 7956 target.c:2322 target_write_u32(): address: 0xe000202c, value: 0x00000000
301
Debug: 320 7956 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000202c 4 1
302
Debug: 321 8077 target.c:2322 target_write_u32(): address: 0xe0002030, value: 0x00000000
303
Debug: 322 8077 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002030 4 1
304
Debug: 323 8197 target.c:2322 target_write_u32(): address: 0xe0002034, value: 0x00000000
305
Debug: 324 8197 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002034 4 1
306
Debug: 325 8317 target.c:2322 target_write_u32(): address: 0xe0002038, value: 0x00000000
307
Debug: 326 8317 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002038 4 1
308
Debug: 327 8437 target.c:2322 target_write_u32(): address: 0xe000203c, value: 0x00000000
309
Debug: 328 8437 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000203c 4 1
310
Debug: 329 8557 target.c:2322 target_write_u32(): address: 0xe0002040, value: 0x00000000
311
Debug: 330 8557 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002040 4 1
312
Debug: 331 8817 target.c:2322 target_write_u32(): address: 0xe0002044, value: 0x00000000
313
Debug: 332 8817 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002044 4 1
314
Debug: 333 8957 target.c:2322 target_write_u32(): address: 0xe0002048, value: 0x00000000
315
Debug: 334 8957 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002048 4 1
316
Debug: 335 9077 target.c:2322 target_write_u32(): address: 0xe000204c, value: 0x00000000
317
Debug: 336 9077 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000204c 4 1
318
Debug: 337 9197 target.c:2322 target_write_u32(): address: 0xe0002050, value: 0x00000000
319
Debug: 338 9197 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002050 4 1
320
Debug: 339 9317 target.c:2322 target_write_u32(): address: 0xe0002054, value: 0x00000000
321
Debug: 340 9317 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002054 4 1
322
Debug: 341 9457 target.c:2322 target_write_u32(): address: 0xe0002058, value: 0x00000000
323
Debug: 342 9457 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002058 4 1
324
Debug: 343 9577 target.c:2322 target_write_u32(): address: 0xe000205c, value: 0x00000000
325
Debug: 344 9577 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000205c 4 1
326
Debug: 345 9937 target.c:2322 target_write_u32(): address: 0xe0002060, value: 0x00000000
327
Debug: 346 9937 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002060 4 1
328
Debug: 347 10057 target.c:2322 target_write_u32(): address: 0xe0002064, value: 0x00000000
329
Debug: 348 10057 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002064 4 1
330
Debug: 349 10178 target.c:2322 target_write_u32(): address: 0xe0002068, value: 0x00000000
331
Debug: 350 10178 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002068 4 1
332
Debug: 351 10318 target.c:2322 target_write_u32(): address: 0xe000206c, value: 0x00000000
333
Debug: 352 10318 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe000206c 4 1
334
Debug: 353 10438 target.c:2322 target_write_u32(): address: 0xe0002070, value: 0x00000000
335
Debug: 354 10438 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0xe0002070 4 1
336
Debug: 355 10558 cortex_m.c:2130 cortex_m_examine(): FPB fpcr 0xbf11477, numcode 23, numlit 4
337
Debug: 356 10558 hla_target.c:750 adapter_read_memory(): adapter_read_memory 0xe0001000 4 1
338
Debug: 357 10698 target.c:2234 target_read_u32(): address: 0xe0001000, value: 0x0bf11477
339
Debug: 358 10698 cortex_m.c:1892 cortex_m_dwt_setup(): DWT dwtcr 0xbf11477, comp 0, watch only
340
Info : 359 10698 cortex_m.c:2140 cortex_m_examine(): NuMicro.cpu: hardware has 23 breakpoints, 0 watchpoints
341
Debug: 360 10698 target.c:1509 target_call_event_callbacks(): target event 22 (examine-end)
342
Debug: 361 10698 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_flash init
343
Debug: 362 10698 command.c:143 script_debug(): command - ocd_flash ocd_flash init
344
Debug: 363 10698 log.c:428 keep_alive(): keep_alive() was not invoked in the 1000ms timelimit (10698). This may cause trouble with GDB connections.
345
Debug: 366 10818 tcl.c:1098 handle_flash_init_command(): Initializing flash devices...
346
Debug: 367 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
347
Debug: 368 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
348
Debug: 369 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
349
Debug: 370 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
350
Debug: 371 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
351
Debug: 372 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
352
Debug: 373 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
353
Debug: 374 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
354
Debug: 375 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
355
Debug: 376 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
356
Debug: 377 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
357
Debug: 378 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
358
Debug: 379 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
359
Debug: 380 10818 command.c:364 register_command_handler(): registering 'ocd_flash'...
360
Debug: 381 10818 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_mflash init
361
Debug: 382 10818 command.c:143 script_debug(): command - ocd_mflash ocd_mflash init
362
Debug: 384 10938 mflash.c:1377 handle_mflash_init_command(): Initializing mflash devices...
363
Debug: 385 10938 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_nand init
364
Debug: 386 10938 command.c:143 script_debug(): command - ocd_nand ocd_nand init
365
Debug: 388 11058 tcl.c:495 handle_nand_init_command(): Initializing NAND devices...
366
Debug: 389 11058 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_pld init
367
Debug: 390 11058 command.c:143 script_debug(): command - ocd_pld ocd_pld init
368
Debug: 392 11198 pld.c:205 handle_pld_init_command(): Initializing PLDs...
369
Debug: 393 11198 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_reset init
370
Debug: 394 11198 command.c:143 script_debug(): command - reset ocd_reset init
371
Debug: 396 11318 target.c:1527 target_call_reset_callbacks(): target reset 3 (init)
372
Debug: 397 11318 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_target names
373
Debug: 398 11318 command.c:143 script_debug(): command - ocd_target ocd_target names
374
Debug: 399 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu invoke-event reset-start
375
Debug: 400 11319 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu invoke-event reset-start
376
Debug: 401 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
377
Debug: 402 11319 command.c:143 script_debug(): command - ocd_transport ocd_transport select
378
Debug: 403 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
379
Debug: 404 11319 command.c:143 script_debug(): command - ocd_transport ocd_transport select
380
Debug: 405 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu invoke-event examine-start
381
Debug: 406 11319 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu invoke-event examine-start
382
Debug: 407 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu arp_examine
383
Debug: 408 11319 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu arp_examine
384
Debug: 409 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu invoke-event examine-end
385
Debug: 410 11319 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu invoke-event examine-end
386
Debug: 411 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu invoke-event reset-assert-pre
387
Debug: 412 11319 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu invoke-event reset-assert-pre
388
Debug: 413 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
389
Debug: 414 11319 command.c:143 script_debug(): command - ocd_transport ocd_transport select
390
Debug: 415 11319 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu arp_reset assert 1
391
Debug: 416 11319 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu arp_reset assert 1
392
Debug: 417 11319 target.c:1892 target_free_all_working_areas_restore(): freeing all working areas
393
Debug: 418 11319 hla_target.c:483 adapter_assert_reset(): adapter_assert_reset
394
Debug: 419 11319 nulink_usb.c:360 nulink_usb_write_debug_reg(): nulink_usb_write_debug_reg(0xe000edf0): 0xa05f0001
395
Debug: 420 11580 nulink_usb.c:360 nulink_usb_write_debug_reg(): nulink_usb_write_debug_reg(0xe000edfc): 0x01000001
396
Debug: 421 11718 nulink_usb.c:360 nulink_usb_write_debug_reg(): nulink_usb_write_debug_reg(0xe000ed0c): 0x05fa0004
397
Debug: 422 11838 nulink_usb.c:483 nulink_usb_reset(): nulink_usb_reset
398
Debug: 423 17266 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu invoke-event reset-assert-post
399
Debug: 424 17266 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu invoke-event reset-assert-post
400
Debug: 425 17266 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu invoke-event reset-deassert-pre
401
Debug: 426 17266 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu invoke-event reset-deassert-pre
402
Debug: 427 17266 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
403
Debug: 428 17267 command.c:143 script_debug(): command - ocd_transport ocd_transport select
404
Debug: 429 17267 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu arp_reset deassert 1
405
Debug: 430 17267 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu arp_reset deassert 1
406
Debug: 431 17267 target.c:1892 target_free_all_working_areas_restore(): freeing all working areas
407
Debug: 432 17267 hla_target.c:546 adapter_deassert_reset(): adapter_deassert_reset
408
Debug: 433 17267 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu invoke-event reset-deassert-post
409
Debug: 434 17267 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu invoke-event reset-deassert-post
410
Debug: 435 17267 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_transport select
411
Debug: 436 17267 command.c:143 script_debug(): command - ocd_transport ocd_transport select
412
Debug: 437 17267 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu arp_waitstate halted 1000
413
Debug: 438 17267 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu arp_waitstate halted 1000
414
Debug: 439 17391 target.c:2797 target_wait_state(): waiting for target halted...
415
Debug: 440 18021 log.c:428 keep_alive(): keep_alive() was not invoked in the 1000ms timelimit (7323). This may cause trouble with GDB connections.
416
Error: 442 18402 target.c:2805 target_wait_state(): timed out while waiting for target halted
417
Debug: 443 18403 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_NuMicro.cpu curstate
418
Debug: 444 18403 command.c:143 script_debug(): command - ocd_NuMicro.cpu ocd_NuMicro.cpu curstate
419
User : 445 18403 command.c:544 command_print(): TARGET: NuMicro.cpu - Not halted
420
in procedure 'program' 
421
in procedure 'reset' called at file "embedded:startup.tcl", line 478
422
in procedure 'ocd_bouncer'
423
424
Debug: 446 18403 command.c:626 run_command(): Command failed with error code -4
425
Debug: 447 18403 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_echo ** Unable to reset target **
426
Debug: 448 18403 command.c:143 script_debug(): command - echo ocd_echo ** Unable to reset target **
427
User : 450 18522 command.c:762 jim_echo(): ** Unable to reset target **
428
Debug: 451 18522 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_shutdown error
429
Debug: 452 18522 command.c:143 script_debug(): command - shutdown ocd_shutdown error
430
User : 455 18662 server.c:895 handle_shutdown_command(): shutdown command invoked
431
Debug: 456 18662 command.c:626 run_command(): Command failed with error code -4
432
User : 457 18662 command.c:687 command_run_line(): 
433
Debug: 458 18662 hla_interface.c:117 hl_interface_quit(): hl_interface_quit
434
Debug: 459 18662 nulink_usb.c:1328 nulink_usb_close(): nulink_usb_close
435
Debug: 460 18662 nulink_usb.c:1331 nulink_usb_close(): trying to disconnect with nulink

von W.S. (Gast)


Lesenswert?

Ximena schrieb:
> @W.S. Was meinst du mit originalem NuLink?

Genau das, was ich schrieb. Nuvoton hat auch seinen eigenen 
Programmieradapter und der heißt eben NuLink. Dazu gibt es die passende 
PC-Software bei Nuvoton zum herunterladen.

Ist das unverständlich?

W.S.

von Ximena (Gast)


Lesenswert?

Hallo W.S.

tut mir Leid, ja es war für mich etwas unverständlich, was du damit 
meintest. Aber gut, also ich benutze den NuLink, der ist bei meinem Bord 
mit dabei (NuMaker-PFM_M2351). Da verbinde ich mich über OpenOCD drauf. 
Diese Software kann ich leider nicht benutzen, da meine Aufgabe lautet, 
dass ich es mit OpenOCD machen soll.

von A. B. (Gast)


Lesenswert?

Seufz, man sollte nur mit solchen "Features" wie XOM, PCROP, RDP (bei 
STM32) etc. herum spielen, wenn man genau weiß, was das macht und wie 
man ggf. wieder zurück kommt ...

AN0020, "Precautions" gelesen? Vermutlich hilft nur ein "Mass Erase" -> 
Siehe Doku zu OpenOCD, ob das dort implementiert ist. Ansonsten entweder 
selbst einbauen oder andere SW nehmen.

von W.S. (Gast)


Lesenswert?

Ximena schrieb:
> Da verbinde ich mich über OpenOCD drauf.
> Diese Software kann ich leider nicht benutzen, da meine Aufgabe lautet,
> dass ich es mit OpenOCD machen soll.

Das ist dann dein Problem - mal wieder kein technisches Problem, sondern 
ein bürokratisches. Ich würde trotzdem die Nuvoton-Software benutzen - 
wenigstens um den Chip damit generalzulöschen und die Flags für 
APROM/LDROM richtig setzen zu lassen. Dann kannst du ja wieder mit 
OpenDingsda spielen, bis es wieder soweit ist, daß nix mehr geht.

W.S.

von Ximena (Gast)


Lesenswert?

@W.S. Ich habe nun doch das NuLink Command Tool ausprobiert (meintest du 
das?). Leider kann ich da nichts löschen, da ich immer die Meldung "No 
Chip Info!!!" erhalte.

@A.B. Ich hatte schon gewisse Ahnung, was das XOM Feature macht und ich 
wollte mich eben genau damit vertraut machen. Irgendwo muss man ja 
anfangen und ausprobieren :) Den AN0020 habe ich gelesen, genauso die 
Precautions (also davor schon natürlich). Ich würde sehr gerne einen 
"Mass Erase" durchführen, aber ich finde leider keine Infos dazu, wie 
man das (z.B. mit openOCD) machen kann. Das war ja auch eine meiner 
ursprünglichen Fragen, wie man denn den ganzen Chip löschen kann.

Und außerdem hatte es ja zwischenzeitlich funktioniert und ich habe das 
XOM Feature genau so benutzt wie im AN0020 beschrieben. Trotzdem stehe 
ich nun wieder vor diesem Problem. Also ganz so doof bin ich nun auch 
nicht :) Und sicher ob es am XOM Feature liegt bin ich mir auch nicht. 
Denn generell habe ich bei den Fehlermeldungen (egal in welchem 
Programm) immer das Problem, dass der Chip nicht erkannt wird.

Ich habe es nun auch einmal mit einem Segger J-Link (über die SWD Pins) 
probiert, da vielleicht der NuLink Debugger spinnt, allerdings hat das 
nichts geändert.

Deswegen nochmal die Frage: Weiss jemand, wie ich den gesamten Flash 
löschen kann? Ich finde dazu wirklich rein gar nichts - respektive habe 
ich die gängigen Sachen (über gdb, NuLink Command Tool, telnet) schon 
ausprobiert und immer kommt die Meldung, dass die CPU nicht angehalten 
werden kann und dass der Chip nicht erkannt wurde.

von W.S. (Gast)


Lesenswert?

Ximena schrieb:
> Deswegen nochmal die Frage: Weiss jemand, wie ich den gesamten Flash
> löschen kann?

Wurde schon gesagt. Mit dem JLink kann man wenigstens Bulk-Erase. Aber 
das setzt alles voraus, daß am JLink nicht nur die 2 SWD Strippen, 
sondern auch noch Reset angeschlossen ist. Mit so gelöschtem Chip zeigt 
jedoch die Config auf den LDROM und nicht auf den APROM.

W.S.

von Ximena (Gast)


Lesenswert?

Ich hatte beim Versuch mit JLink auch den Reset angeschlossen, also wäre 
diese Voraussetzung gegeben.
Benutzt man dann für dieses Bulk-Erase ein spezielles Program (J-Flash 
oder so was)? Oder wie kann man das Bulk-Erase durchführen?
Ich hatte mit dem JLink bis jetzt nur eine Verbindung über openOCD 
probiert, dazu braucht man kein extra Program/GUI.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.