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


Announcement: there is an English version of this forum on EmbDev.net. Posts you create there will be displayed on Mikrocontroller.net and EmbDev.net.
von Ximena (Gast)


Bewertung
0 lesenswert
nicht 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:
$ openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg -c "program /build/main.elf reset exit"

Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty (2020-05-19-11:19)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : NULINK is Nu-Link1
Info : NULINK firmware_version(6773), product_id(0x40012009)
Info : IDCODE: 0x0BF11477
Info : NuMicro.cpu: hardware has 23 breakpoints, 0 watchpoints
Error: timed out while waiting for target halted
TARGET: NuMicro.cpu - Not halted
in procedure 'program' 
in procedure 'reset' called at file "embedded:startup.tcl", line 478
in procedure 'ocd_bouncer'

** Unable to reset target **
shutdown command invoked

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)


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

Versuch 1:
$ openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg

Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty (2020-05-19-11:19)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : NULINK is Nu-Link1
Info : NULINK firmware_version(6773), product_id(0x40012009)
Info : IDCODE: 0x0BF11477
Info : NuMicro.cpu: hardware has 23 breakpoints, 0 watchpoints
Info : accepting 'telnet' connection on tcp/4444
#0 : NuMicro.flash_aprom (numicro) at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0
#1 : NuMicro.flash_data (numicro) at 0x0001f000, size 0x00000000, buswidth 0, chipwidth 0
#2 : NuMicro.flash_ldrom (numicro) at 0x00100000, size 0x00000000, buswidth 0, chipwidth 0
#3 : NuMicro.flash_config (numicro) at 0x00300000, size 0x00000000, buswidth 0, chipwidth 0
{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}
Info : Device ID: 0x0bf11477
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
Info : Device Name: UNKNOWN
Warn : NuMicro flash driver: Failed to detect a known part
Info : bank base = 0x00000000, size = 0x10080000
Error: Target not halted
Error: failed erasing sectors 0 to 0
requesting target halt and executing a soft reset
Error: Target NuMicro.cpu does not support soft_reset_halt
Error: timed out while waiting for target halted
TARGET: NuMicro.cpu - Not halted
in procedure 'reset' 
in procedure 'ocd_bouncer'


shutdown command invoked
Info : dropped 'telnet' connection
$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> flash banks
#0 : NuMicro.flash_aprom (numicro) at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0
#1 : NuMicro.flash_data (numicro) at 0x0001f000, size 0x00000000, buswidth 0, chipwidth 0
#2 : NuMicro.flash_ldrom (numicro) at 0x00100000, size 0x00000000, buswidth 0, chipwidth 0
#3 : NuMicro.flash_config (numicro) at 0x00300000, size 0x00000000, buswidth 0, chipwidth 0
> flash list
{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}
> flash erase_sector 0 0 0
Device ID: 0x0bf11477
NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
Device Name: UNKNOWN
NuMicro flash driver: Failed to detect a known part
bank base = 0x00000000, size = 0x10080000
Target not halted
failed erasing sectors 0 to 0
> soft_reset_halt
requesting target halt and executing a soft reset
Target NuMicro.cpu does not support soft_reset_halt
> reset halt
timed out while waiting for target halted
TARGET: NuMicro.cpu - Not halted
in procedure 'reset' 
in procedure 'ocd_bouncer'


> shutdown
shutdown command invoked
Connection closed by foreign host.

Versuch 2:
$ openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg

Open On-Chip Debugger 0.10.0-dev-g7a28f97d-dirty (2020-05-19-11:19)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : NULINK is Nu-Link1
Info : NULINK firmware_version(6773), product_id(0x40012009)
Info : IDCODE: 0x0BF11477
Info : NuMicro.cpu: hardware has 23 breakpoints, 0 watchpoints
Info : accepting 'gdb' connection on tcp/3333
Info : Device ID: 0x0bf11477
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
Info : Device Name: UNKNOWN
Warn : NuMicro flash driver: Failed to detect a known part
Info : bank base = 0x00000000, size = 0x10080000
Info : Device ID: 0x0bf11477
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
Info : Device Name: UNKNOWN
Warn : NuMicro flash driver: Failed to detect a known part
Info : bank base = 0x0001f000, size = 0x00000000
Info : Device ID: 0x0bf11477
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
Info : Device Name: UNKNOWN
Warn : NuMicro flash driver: Failed to detect a known part
Info : bank base = 0x00100000, size = 0x00001000
Info : Device ID: 0x0bf11477
Warn : NuMicro flash driver: Failed to search PartID. Use 'UNKNOWN' instead.
Info : Device Name: UNKNOWN
Warn : NuMicro flash driver: Failed to detect a known part
Info : bank base = 0x00300000, size = 0x00000010
undefined debug reason 7 - target needs reset

läuft immer noch
$ arm-none-eabi-gdb

GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git
Copyright (C) 2019 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".
(gdb) load build/main.elf
You can't do that when your target is `None'
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
warning: Overlapping regions in memory map: ignoring
0x00000000 in ?? ()
(gdb) load build/main.elf
Loading section .text, size 0xca68 lma 0x0
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Loading section .ARM.exidx, size 0x8 lma 0xca68
Ignoring packet error, continuing...
Loading section .data, size 0xd1c lma 0xca70
Ignoring packet error, continuing...
Loading section .xom_region, size 0x100 lma 0x70000
Ignoring packet error, continuing...
Start address 0x458, load size 55436
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Transfer rate: 1 KB/sec, 7919 bytes/write.
(gdb) q
A debugging session is active.

  Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y
Detaching from program: , Remote target
Ignoring packet error, continuing...
Can't detach process.

von W.S. (Gast)


Bewertung
-1 lesenswert
nicht lesenswert
Versuche es doch einmal mit dem originalen NuLink und der zugehörigen 
Software von Nuvoton.

W.S.

von Jim M. (turboj)


Bewertung
0 lesenswert
nicht 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)


Bewertung
0 lesenswert
nicht 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)


Bewertung
0 lesenswert
nicht lesenswert
Ok also hier der -d3 Output:
openocd -f /tcl/interface/nulink.cfg -f /tcl/target/numicroM23.cfg -d3 -c "program /build/main.elf reset exit"

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

Debug: 446 18403 command.c:626 run_command(): Command failed with error code -4
Debug: 447 18403 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_echo ** Unable to reset target **
Debug: 448 18403 command.c:143 script_debug(): command - echo ocd_echo ** Unable to reset target **
User : 450 18522 command.c:762 jim_echo(): ** Unable to reset target **
Debug: 451 18522 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_shutdown error
Debug: 452 18522 command.c:143 script_debug(): command - shutdown ocd_shutdown error
User : 455 18662 server.c:895 handle_shutdown_command(): shutdown command invoked
Debug: 456 18662 command.c:626 run_command(): Command failed with error code -4
User : 457 18662 command.c:687 command_run_line(): 
Debug: 458 18662 hla_interface.c:117 hl_interface_quit(): hl_interface_quit
Debug: 459 18662 nulink_usb.c:1328 nulink_usb_close(): nulink_usb_close
Debug: 460 18662 nulink_usb.c:1331 nulink_usb_close(): trying to disconnect with nulink

von W.S. (Gast)


Bewertung
-1 lesenswert
nicht 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)


Bewertung
0 lesenswert
nicht 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)


Bewertung
0 lesenswert
nicht 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)


Bewertung
-1 lesenswert
nicht 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)


Bewertung
0 lesenswert
nicht 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)


Bewertung
0 lesenswert
nicht 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.

Antwort schreiben

Die Angabe einer E-Mail-Adresse ist freiwillig. Wenn Sie automatisch per E-Mail über Antworten auf Ihren Beitrag informiert werden möchten, melden Sie sich bitte an.

Wichtige Regeln - erst lesen, dann posten!

  • Groß- und Kleinschreibung verwenden
  • Längeren Sourcecode nicht im Text einfügen, sondern als Dateianhang

Formatierung (mehr Informationen...)

  • [c]C-Code[/c]
  • [avrasm]AVR-Assembler-Code[/avrasm]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] - Link zu Artikel
  • Verweis auf anderen Beitrag einfügen: Rechtsklick auf Beitragstitel,
    "Adresse kopieren", und in den Text einfügen




Bild automatisch verkleinern, falls nötig
Bitte das JPG-Format nur für Fotos und Scans verwenden!
Zeichnungen und Screenshots im PNG- oder
GIF-Format hochladen. Siehe Bildformate.

Mit dem Abschicken bestätigst du, die Nutzungsbedingungen anzuerkennen.