@@ -59,169 +59,29 @@ application binary. :ref:`nxp_opensda_firmware` with this application.
59
59
Flashing
60
60
========
61
61
62
- Use the ``make flash `` build target with ``OPENSDA_FW=daplink `` to build your
63
- Zephyr application, invoke the pyOCD flash tool and program your Zephyr
64
- application to flash.
65
-
66
- .. code-block :: console
67
-
68
- $ make OPENSDA_FW=daplink flash
69
- Using /home/maureen/zephyr/boards/arm/frdm_k64f/frdm_k64f_defconfig as base
70
- Merging /home/maureen/zephyr/tests/include/test.config
71
- Merging prj.conf
72
- #
73
- # configuration written to .config
74
- #
75
- make[1]: Entering directory '/home/maureen/zephyr'
76
- make[2]: Entering directory '/home/maureen/zephyr/samples/hello_world/outdir/frdm_k64f'
77
- GEN ./Makefile
78
- scripts/kconfig/conf --silentoldconfig Kconfig
79
- Using /home/maureen/zephyr as source for kernel
80
- GEN ./Makefile
81
- CHK include/generated/version.h
82
- UPD include/generated/version.h
83
- DTC dts/arm/frdm_k64f.dts_compiled
84
- CHK include/generated/generated_dts_board.h
85
- UPD include/generated/generated_dts_board.h
86
- CHK misc/generated/configs.c
87
- UPD misc/generated/configs.c
88
- CHK include/generated/offsets.h
89
- UPD include/generated/offsets.h
90
- CC lib/libc/minimal/source/stdlib/strtol.o
91
-
92
- <snip>
93
-
94
- CC kernel/work_q.o
95
- AR kernel/lib.a
96
- CC src/main.o
97
- LD src/built-in.o
98
- AR libzephyr.a
99
- LINK zephyr.lnk
100
- IRQ isr_tables.c
101
- CC isr_tables.o
102
- LINK zephyr.elf
103
- BIN zephyr.bin
104
- Flashing frdm_k64f
105
- Flashing Target Device
106
- INFO:root:DAP SWD MODE initialised
107
- INFO:root:K64F not in secure state
108
- INFO:root:ROM table #0 @ 0xe00ff000 cidr=b105100d pidr=4000bb4c4
109
- INFO:root:[0]<e000e000:SCS-M4 cidr=b105e00d, pidr=4000bb00c, class=14>
110
- WARNING:root:Invalid coresight component, cidr=0x0
111
- INFO:root:[1]<e0001000: cidr=0, pidr=0, component invalid>
112
- INFO:root:[2]<e0002000:FPB cidr=b105e00d, pidr=4002bb003, class=14>
113
- WARNING:root:Invalid coresight component, cidr=0x1010101
114
- INFO:root:[3]<e0000000: cidr=1010101, pidr=101010101010101, component invalid>
115
- WARNING:root:Invalid coresight component, cidr=0x0
116
- INFO:root:[4]<e0040000: cidr=0, pidr=0, component invalid>
117
- INFO:root:[5]<e0041000:ETM-M4 cidr=b105900d, pidr=4000bb925, class=9, devtype=13, devid=0>
118
- INFO:root:[6]<e0042000:ETB cidr=b105900d, pidr=4003bb907, class=9, devtype=21, devid=0>
119
- INFO:root:[7]<e0043000:CSTF cidr=b105900d, pidr=4001bb908, class=9, devtype=12, devid=28>
120
- INFO:root:CPU core is Cortex-M4
121
- INFO:root:FPU present
122
- INFO:root:6 hardware breakpoints, 4 literal comparators
123
- INFO:root:4 hardware watchpoints
124
- [====================] 100%
125
- INFO:root:Programmed 12288 bytes (3 pages) at 10.57 kB/s
126
- make[2]: Leaving directory '/home/maureen/zephyr/samples/hello_world/outdir/frdm_k64f'
127
- make[1]: Leaving directory '/home/maureen/zephyr'
62
+ Use the CMake ``flash `` target with the argument ``OPENSDA_FW=daplink `` to
63
+ build your Zephyr application, invoke the pyOCD flash tool and program your
64
+ Zephyr application to flash. Some boards set the argument by default, so it is
65
+ not always necessary to set explicitly.
128
66
67
+ .. zephyr-app-commands ::
68
+ :zephyr-app: samples/hello_world
69
+ :gen-args: -DOPENSDA_FW=daplink
70
+ :goals: flash
129
71
130
72
Debugging
131
73
=========
132
74
133
- Use the `` make debug `` build target with ``OPENSDA_FW=daplink `` to build your
134
- Zephyr application, invoke the pyOCD GDB server, attach a GDB client, and
135
- program your Zephyr application to flash. It will leave you at a gdb prompt.
136
-
137
- .. code-block :: console
75
+ Use the CMake `` debug `` target with the argument ``OPENSDA_FW=daplink `` to
76
+ build your Zephyr application, invoke the pyOCD GDB server, attach a GDB
77
+ client, and program your Zephyr application to flash. It will leave you at a
78
+ GDB prompt. Some boards set the argument by default, so it is not always
79
+ necessary to set explicitly.
138
80
139
- $ make OPENSDA_FW=daplink debug
140
- Using /home/maureen/zephyr/boards/arm/frdm_k64f/frdm_k64f_defconfig as base
141
- Merging /home/maureen/zephyr/tests/include/test.config
142
- Merging prj.conf
143
- #
144
- # configuration written to .config
145
- #
146
- make[1]: Entering directory '/home/maureen/zephyr'
147
- make[2]: Entering directory '/home/maureen/zephyr/samples/hello_world/outdir/frdm_k64f'
148
- GEN ./Makefile
149
- scripts/kconfig/conf --silentoldconfig Kconfig
150
- Using /home/maureen/zephyr as source for kernel
151
- GEN ./Makefile
152
- CHK include/generated/version.h
153
- UPD include/generated/version.h
154
- DTC dts/arm/frdm_k64f.dts_compiled
155
- CHK include/generated/generated_dts_board.h
156
- UPD include/generated/generated_dts_board.h
157
- CHK misc/generated/configs.c
158
- UPD misc/generated/configs.c
159
- CHK include/generated/offsets.h
160
- UPD include/generated/offsets.h
161
- CC lib/libc/minimal/source/stdlib/strtol.o
162
-
163
- <snip>
164
-
165
- CC kernel/work_q.o
166
- AR kernel/lib.a
167
- CC src/main.o
168
- LD src/built-in.o
169
- AR libzephyr.a
170
- LINK zephyr.lnk
171
- IRQ isr_tables.c
172
- CC isr_tables.o
173
- LINK zephyr.elf
174
- BIN zephyr.bin
175
- pyOCD GDB server running on port 3333
176
- GNU gdb (GDB) 7.11.0.20160511-git
177
- Copyright (C) 2016 Free Software Foundation, Inc.
178
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
179
- This is free software: you are free to change and redistribute it.
180
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
181
- and "show warranty" for details.
182
- This GDB was configured as "--host=x86_64-pokysdk-linux --target=arm-zephyr-eabi".
183
- Type "show configuration" for configuration details.
184
- For bug reporting instructions, please see:
185
- <http://www.gnu.org/software/gdb/bugs/>.
186
- Find the GDB manual and other documentation resources online at:
187
- <http://www.gnu.org/software/gdb/documentation/>.
188
- For help, type "help".
189
- Type "apropos word" to search for commands related to "word"...
190
- Reading symbols from /home/maureen/zephyr/samples/hello_world/outdir/frdm_k64f/zephyr.elf...done.
191
- INFO:root:DAP SWD MODE initialised
192
- INFO:root:K64F not in secure state
193
- INFO:root:ROM table #0 @ 0xe00ff000 cidr=b105100d pidr=4000bb4c4
194
- INFO:root:[0]<e000e000:SCS-M4 cidr=b105e00d, pidr=4000bb00c, class=14>
195
- WARNING:root:Invalid coresight component, cidr=0x0
196
- INFO:root:[1]<e0001000: cidr=0, pidr=0, component invalid>
197
- INFO:root:[2]<e0002000:FPB cidr=b105e00d, pidr=4002bb003, class=14>
198
- WARNING:root:Invalid coresight component, cidr=0x1010101
199
- INFO:root:[3]<e0000000: cidr=1010101, pidr=101010101010101, component invalid>
200
- WARNING:root:Invalid coresight component, cidr=0x0
201
- INFO:root:[4]<e0040000: cidr=0, pidr=0, component invalid>
202
- INFO:root:[5]<e0041000:ETM-M4 cidr=b105900d, pidr=4000bb925, class=9, devtype=13, devid=0>
203
- INFO:root:[6]<e0042000:ETB cidr=b105900d, pidr=4003bb907, class=9, devtype=21, devid=0>
204
- INFO:root:[7]<e0043000:CSTF cidr=b105900d, pidr=4001bb908, class=9, devtype=12, devid=28>
205
- INFO:root:CPU core is Cortex-M4
206
- INFO:root:FPU present
207
- INFO:root:6 hardware breakpoints, 4 literal comparators
208
- INFO:root:4 hardware watchpoints
209
- INFO:root:Telnet: server started on port 4444
210
- INFO:root:GDB server started at port:3333
211
- Remote debugging using :3333
212
- INFO:root:One client connected!
213
- k_cpu_idle () at /home/maureen/zephyr/arch/arm/core/cpu_idle.S:135
214
- 135 bx lr
215
- Loading section text, size 0x233e lma 0x0
216
- Loading section devconfig, size 0xa8 lma 0x2340
217
- Loading section rodata, size 0x5d4 lma 0x23e8
218
- Loading section datas, size 0x14 lma 0x29bc
219
- Loading section initlevel, size 0xa8 lma 0x29d0
220
- [====================] 100%
221
- INFO:root:Programmed 45056 bytes (3 pages) at 38.21 kB/s
222
- Start address 0x1b64, load size 10870
223
- Transfer rate: 9 KB/sec, 1207 bytes/write.
224
- (gdb)
81
+ .. zephyr-app-commands ::
82
+ :zephyr-app: samples/hello_world
83
+ :gen-args: -DOPENSDA_FW=daplink
84
+ :goals: debug
225
85
226
86
227
87
.. _nxp_opensda_jlink :
@@ -248,136 +108,21 @@ Flashing
248
108
========
249
109
250
110
The Segger J-Link firmware does not support command line flashing, therefore
251
- the `` make flash `` build target is not supported.
111
+ the CMake `` flash `` target is not supported.
252
112
253
113
Debugging
254
114
=========
255
115
256
- Use the ``make debug `` build target with ``OPENSDA_FW=jlink `` to build your
257
- Zephyr application, invoke the J-Link GDB server, attach a GDB client, and
258
- program your Zephyr application to flash. It will leave you at a gdb prompt.
259
-
260
- .. code-block :: console
261
-
262
- $ make OPENSDA_FW=jlink debug
263
- Using /home/maureen/zephyr/boards/arm/frdm_k64f/frdm_k64f_defconfig as base
264
- Merging /home/maureen/zephyr/tests/include/test.config
265
- Merging prj.conf
266
- #
267
- # configuration written to .config
268
- #
269
- make[1]: Entering directory '/home/maureen/zephyr'
270
- make[2]: Entering directory '/home/maureen/zephyr/samples/hello_world/outdir/frdm_k64f'
271
- GEN ./Makefile
272
- scripts/kconfig/conf --silentoldconfig Kconfig
273
- Using /home/maureen/zephyr as source for kernel
274
- GEN ./Makefile
275
- CHK include/generated/version.h
276
- UPD include/generated/version.h
277
- DTC dts/arm/frdm_k64f.dts_compiled
278
- CHK include/generated/generated_dts_board.h
279
- UPD include/generated/generated_dts_board.h
280
- CHK misc/generated/configs.c
281
- UPD misc/generated/configs.c
282
- CHK include/generated/offsets.h
283
- UPD include/generated/offsets.h
284
- CC lib/libc/minimal/source/stdlib/strtol.o
285
-
286
- <snip>
287
-
288
- CC kernel/work_q.o
289
- AR kernel/lib.a
290
- CC src/main.o
291
- LD src/built-in.o
292
- AR libzephyr.a
293
- LINK zephyr.lnk
294
- IRQ isr_tables.c
295
- CC isr_tables.o
296
- LINK zephyr.elf
297
- BIN zephyr.bin
298
- JLink GDB server running on port 2331
299
- SEGGER J-Link GDB Server V6.14b Command Line Version
300
-
301
- JLinkARM.dll V6.14b (DLL compiled Mar 9 2017 08:48:20)
302
-
303
- -----GDB Server start settings-----
304
- GDBInit file: none
305
- GDB Server Listening port: 2331
306
- SWO raw output listening port: 2332
307
- Terminal I/O port: 2333
308
- Accept remote connection: yes
309
- Generate logfile: off
310
- Verify download: off
311
- Init regs on start: off
312
- Silent mode: off
313
- Single run mode: on
314
- Target connection timeout: 0 ms
315
- ------J-Link related settings------
316
- J-Link Host interface: USB
317
- J-Link script: none
318
- J-Link settings file: none
319
- ------Target related settings------
320
- Target device: MK64FN1M0xxx12
321
- Target interface: SWD
322
- Target interface speed: 1000kHz
323
- Target endian: little
324
-
325
- Connecting to J-Link...
326
- GNU gdb (GDB) 7.11.0.20160511-git
327
- Copyright (C) 2016 Free Software Foundation, Inc.
328
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
329
- This is free software: you are free to change and redistribute it.
330
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
331
- and "show warranty" for details.
332
- This GDB was configured as "--host=x86_64-pokysdk-linux --target=arm-zephyr-eabi".
333
- Type "show configuration" for configuration details.
334
- For bug reporting instructions, please see:
335
- <http://www.gnu.org/software/gdb/bugs/>.
336
- Find the GDB manual and other documentation resources online at:
337
- <http://www.gnu.org/software/gdb/documentation/>.
338
- For help, type "help".
339
- Type "apropos word" to search for commands related to "word"...
340
- Reading symbols from /home/maureen/zephyr/samples/hello_world/outdir/frdm_k64f/zephyr.elf...done.
341
- J-Link is connected.
342
- Firmware: J-Link OpenSDA 2 compiled Feb 28 2017 19:27:57
343
- Hardware: V1.00
344
- S/N: 621000000
345
- Checking target voltage...
346
- Target voltage: 3.30 V
347
- Listening on TCP/IP port 2331
348
- Connecting to target...Connected to target
349
- Waiting for GDB connection...Remote debugging using :2331
350
- Connected to 127.0.0.1
351
- Reading all registers
352
- Read 4 bytes @ address 0x00001A04 (Data = 0xBF004770)
353
- Read 2 bytes @ address 0x000019FC (Data = 0x4040)
354
- Read 2 bytes @ address 0x000019FE (Data = 0xF380)
355
- Read 2 bytes @ address 0x00001A00 (Data = 0x8811)
356
- Read 2 bytes @ address 0x00001A02 (Data = 0xBF30)
357
- k_cpu_idle () at /home/maureen/zephyr/arch/arm/core/cpu_idle.S:135
358
- 135 bx lr
359
- Halting target CPU...
360
- ...Target halted (PC = 0x00001A04)
361
- Loading section text, size 0x233e lma 0x0
362
- Downloading 4096 bytes @ address 0x00000000
363
- Downloading 4096 bytes @ address 0x00001000
364
- Downloading 830 bytes @ address 0x00002000
365
- Loading section devconfig, size 0xa8 lma 0x2340
366
- Downloading 168 bytes @ address 0x00002340
367
- Loading section rodata, size 0x5d4 lma 0x23e8
368
- Downloading 1492 bytes @ address 0x000023E8
369
- Loading section datas, size 0x14 lma 0x29bc
370
- Downloading 20 bytes @ address 0x000029BC
371
- Loading section initlevel, size 0xa8 lma 0x29d0
372
- Downloading 168 bytes @ address 0x000029D0
373
- Start address 0x1b64, load size 10870
374
- Writing register (PC = 0x641b0000)
375
- Transfer rate: 5307 KB/sec, 1552 bytes/write.
376
- Read 4 bytes @ address 0x00001B64 (Data = 0xF3802010)
377
- Resetting target
378
- Resetting target
379
- (gdb)
116
+ Use the CMake ``debug `` target with the argument ``OPENSDA_FW=jlink `` to build
117
+ your Zephyr application, invoke the J-Link GDB server, attach a GDB client, and
118
+ program your Zephyr application to flash. It will leave you at a GDB prompt.
119
+ Some boards set the argument by default, so it is not always necessary to set
120
+ explicitly.
380
121
122
+ .. zephyr-app-commands ::
123
+ :zephyr-app: samples/hello_world
124
+ :gen-args: -DOPENSDA_FW=jlink
125
+ :goals: debug
381
126
382
127
Console
383
128
=======
0 commit comments